ci-plus 1.4.7 → 1.4.8
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/package.json +2 -2
- package/src/select/select.vue +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ci-plus",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "ci组件库",
|
|
5
5
|
"main": "./index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"vue",
|
|
13
13
|
"element-plus",
|
|
14
14
|
"ui组件库二次封装",
|
|
15
|
-
"
|
|
15
|
+
"调整select组件的一个警告"
|
|
16
16
|
],
|
|
17
17
|
"type": "module",
|
|
18
18
|
"author": {
|
package/src/select/select.vue
CHANGED
|
@@ -163,8 +163,11 @@ const selectAll = (val: any) => {
|
|
|
163
163
|
}
|
|
164
164
|
// 自定义label显示
|
|
165
165
|
const customLabelHandler = (item) => {
|
|
166
|
-
|
|
167
|
-
return eval(props.customLabel)
|
|
166
|
+
console.log('customLabelHandler', item)
|
|
167
|
+
// return eval(props.customLabel)
|
|
168
|
+
const expression = props.customLabel.replace(/item/g, 'item.value');
|
|
169
|
+
const safeEval = new Function('item', `return ${expression};`);
|
|
170
|
+
return safeEval({ value: item });
|
|
168
171
|
}
|
|
169
172
|
</script>
|
|
170
173
|
<style lang="scss" scoped>
|