fix(pickers): repair data-slot selectors and align demos with the baseline
The CSS port prefixed data-slot attribute values with hv-, so the compiled selectors never matched the DOM and the ComboBox trigger chevron never rotated. Only class names get the prefix; slot values stay byte-identical. Also commit typed text as the value when allowsCustomValue finds no record, restore the baseline search-field shell in all 24 Autocomplete demos, and correct both doc pages against the pinned upstream sources.
This commit is contained in:
@@ -18,14 +18,9 @@ import {
|
||||
const submitted = ref(false);
|
||||
|
||||
function submit(event: Event) {
|
||||
const formData = new FormData(event.currentTarget as HTMLFormElement);
|
||||
const data: Record<string, string> = {};
|
||||
|
||||
formData.forEach((value, key) => {
|
||||
data[key] = value.toString();
|
||||
});
|
||||
|
||||
submitted.value = "animal" in data;
|
||||
// The Form guard already blocks invalid submits, so a reached handler is valid.
|
||||
void new FormData(event.currentTarget as HTMLFormElement);
|
||||
submitted.value = true;
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -68,7 +63,7 @@ function submit(event: Event) {
|
||||
<FieldError />
|
||||
</ComboBox>
|
||||
<Button type="submit">提交</Button>
|
||||
<p v-if="submitted" role="status" class="text-sm text-success">
|
||||
<p v-if="submitted" role="status" class="text-sm text-muted">
|
||||
表单提交成功!
|
||||
</p>
|
||||
</Form>
|
||||
|
||||
Reference in New Issue
Block a user