fix(admin): bind FaIconPicker with v-model so icon clicks update the value

This commit is contained in:
2026-09-06 16:10:28 +08:00
parent 5acd1e0e25
commit af04fcfd3c
3 changed files with 9 additions and 4 deletions
@@ -97,6 +97,11 @@ test('custom settings pages and standalone save paths speak the three icon forma
assert.match(source, /import FaIconPicker from '@\/components\/form\/FaIconPicker\.vue'/);
assert.match(source, /import IconValue from '@\/components\/form\/IconValue\.vue'/);
assert.match(source, /<FaIconPicker/, `${page} uses the picker for icon fields`);
// FaIconPicker declares modelValue / emits update:modelValue; the Naive UI
// v-model:value convention binds a prop the picker never reads, so
// selection clicks would be dropped.
assert.doesNotMatch(source, /<FaIconPicker[^>]*v-model:value/, `${page} must not bind the picker with v-model:value`);
assert.match(source, /<FaIconPicker v-model=/, `${page} binds the picker with v-model`);
}
// Their REST save paths keep customsvg markup intact.
const controller = read('src/Admin/GlobalControllerPart1.php');