tenghui-ui 2.2.12 → 2.2.13
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/style.css +1 -1
- package/dist/tenghui-ui.es.js +21 -6
- package/dist/tenghui-ui.es.js.map +1 -1
- package/dist/tenghui-ui.umd.js +2 -2
- package/dist/tenghui-ui.umd.js.map +1 -1
- package/package.json +1 -1
- package/packages/form-item/src/index.vue +3 -0
- package/packages/search/src/Record.vue +5 -0
- package/packages/search/src/index.vue +8 -2
package/package.json
CHANGED
|
@@ -324,6 +324,7 @@ export default {
|
|
|
324
324
|
return {
|
|
325
325
|
modelForm: this.model,
|
|
326
326
|
bigOptions: [],
|
|
327
|
+
staticOptions: [],
|
|
327
328
|
|
|
328
329
|
// 特殊处理时使用标识
|
|
329
330
|
itemFlag: Math.ceil(Math.random() * 10000),
|
|
@@ -378,7 +379,9 @@ export default {
|
|
|
378
379
|
};
|
|
379
380
|
});
|
|
380
381
|
}
|
|
382
|
+
|
|
381
383
|
return tempArr;
|
|
384
|
+
// return [...this.staticOptions.filter(v => !tempArr.some(_v => _v.value == v.value)), ...tempArr];
|
|
382
385
|
},
|
|
383
386
|
},
|
|
384
387
|
created() {
|
|
@@ -127,6 +127,11 @@ export default {
|
|
|
127
127
|
this.$parent.$children.forEach(ref => {
|
|
128
128
|
const findItem = (item.labels || item).find(v => v.label == ref.label);
|
|
129
129
|
if (findItem) {
|
|
130
|
+
if (Array.isArray(findItem.value)) {
|
|
131
|
+
ref.staticOptions.splice(0, ref.staticOptions.length, ...findItem.value.map((v, i) => ({ label: findItem.valueLabel[i], value: v })))
|
|
132
|
+
} else {
|
|
133
|
+
ref.staticOptions.splice(0, ref.staticOptions.length, ...[{ label: findItem.valueLabel, value: findItem.value }])
|
|
134
|
+
}
|
|
130
135
|
ref.modelForm = findItem.value;
|
|
131
136
|
} else if (ref.label) {
|
|
132
137
|
// ref.modelForm = '';
|
|
@@ -190,9 +190,15 @@ export default {
|
|
|
190
190
|
let valueLabel;
|
|
191
191
|
if (item.options && Object.entries(item.options).length > 0) {
|
|
192
192
|
if (Array.isArray(item.modelForm)) {
|
|
193
|
-
valueLabel = item.modelForm.map(iv => item.selectOption.find(v => v.value == iv)?.label || iv)
|
|
193
|
+
valueLabel = item.modelForm.map(iv => [...item.selectOption, ...item.staticOptions].find(v => v.value == iv)?.label || iv)
|
|
194
194
|
} else {
|
|
195
|
-
valueLabel = item.selectOption.find(v => v.value == item.modelForm)?.label || item.modelForm
|
|
195
|
+
valueLabel = [...item.selectOption, ...item.staticOptions].find(v => v.value == item.modelForm)?.label || item.modelForm
|
|
196
|
+
}
|
|
197
|
+
} else {
|
|
198
|
+
if (Array.isArray(item.modelForm)) {
|
|
199
|
+
valueLabel = item.modelForm.map(iv => item.staticOptions.find(v => v.value == iv)?.label || iv)
|
|
200
|
+
} else {
|
|
201
|
+
valueLabel = item.staticOptions.find(v => v.value == item.modelForm)?.label || item.modelForm
|
|
196
202
|
}
|
|
197
203
|
}
|
|
198
204
|
|