@hostlink/nuxt-light 1.27.0 → 1.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -47,8 +47,10 @@ export default {
|
|
|
47
47
|
dense: { type: Boolean, default: undefined },
|
|
48
48
|
square: { type: Boolean, default: undefined },
|
|
49
49
|
stackLabel: { type: Boolean, default: undefined },
|
|
50
|
-
optionLabel: { type: String, default: 'label' },
|
|
50
|
+
optionLabel: { type: [String, Function], default: 'label' },
|
|
51
51
|
optionValue: { type: String, default: 'value' },
|
|
52
|
+
inputDebounce: { type: [Number, String], default: 0 },
|
|
53
|
+
|
|
52
54
|
},
|
|
53
55
|
data() {
|
|
54
56
|
const normalizedOptions = normalizeOptions(this.options); // 將選項標準化
|
|
@@ -66,7 +68,8 @@ export default {
|
|
|
66
68
|
|
|
67
69
|
update(() => {
|
|
68
70
|
this.filteredOptions = this.normalizedOptions.filter(option => {
|
|
69
|
-
|
|
71
|
+
|
|
72
|
+
const label = typeof this.optionLabel === 'function' ? this.optionLabel(option) : option[this.optionLabel];
|
|
70
73
|
return label && label.toLowerCase().includes(inputValue.toLowerCase());
|
|
71
74
|
});
|
|
72
75
|
});
|