vue2-client 1.8.140 → 1.8.141
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
CHANGED
|
@@ -17,13 +17,28 @@
|
|
|
17
17
|
<!-- 占位 -->
|
|
18
18
|
</template>
|
|
19
19
|
<template v-else-if="cell.type === 'value'">
|
|
20
|
-
|
|
20
|
+
<template v-if="cell.customFunction === undefined">
|
|
21
|
+
{{ cell.value }}
|
|
22
|
+
</template>
|
|
23
|
+
<template v-else>
|
|
24
|
+
{{ deserializeFunctionAndRun(cell.customFunction, cell.value) }}
|
|
25
|
+
</template>
|
|
21
26
|
</template>
|
|
22
27
|
<template v-else-if="cell.type === 'input'">
|
|
23
|
-
|
|
28
|
+
<template v-if="cell.customFunction === undefined">
|
|
29
|
+
{{ configData[cell.dataIndex] }}
|
|
30
|
+
</template>
|
|
31
|
+
<template v-else>
|
|
32
|
+
{{ deserializeFunctionAndRun(cell.customFunction, configData[cell.dataIndex]) }}
|
|
33
|
+
</template>
|
|
24
34
|
</template>
|
|
25
35
|
<template v-else-if="cell.type === 'inputs'">
|
|
26
|
-
|
|
36
|
+
<template v-if="cell.customFunction === undefined">
|
|
37
|
+
{{ showSubRowValue(cell) }}
|
|
38
|
+
</template>
|
|
39
|
+
<template v-else>
|
|
40
|
+
{{ deserializeFunctionAndRun(cell.customFunction, showSubRowValue(cell)) }}
|
|
41
|
+
</template>
|
|
27
42
|
</template>
|
|
28
43
|
<template v-else-if="cell.type === 'images'">
|
|
29
44
|
<template v-for="(img,imgIndex) in configData.images[cell.dataIndex]">
|
|
@@ -44,16 +59,36 @@
|
|
|
44
59
|
{{ cell.text }}
|
|
45
60
|
</template>
|
|
46
61
|
<template v-else-if="cell.type === 'value'">
|
|
47
|
-
|
|
62
|
+
<template v-if="cell.customFunction === undefined">
|
|
63
|
+
{{ cell.value }}
|
|
64
|
+
</template>
|
|
65
|
+
<template v-else>
|
|
66
|
+
{{ deserializeFunctionAndRun(cell.customFunction, cell.value) }}
|
|
67
|
+
</template>
|
|
48
68
|
</template>
|
|
49
69
|
<template v-else-if="cell.type === 'increment'">
|
|
50
|
-
|
|
70
|
+
<template v-if="cell.customFunction === undefined">
|
|
71
|
+
{{ configData.arr[inputColumnsDefinitionIndex][cell.dataIndex] }}
|
|
72
|
+
</template>
|
|
73
|
+
<template v-else>
|
|
74
|
+
{{ deserializeFunctionAndRun(cell.customFunction, configData.arr[inputColumnsDefinitionIndex][cell.dataIndex]) }}
|
|
75
|
+
</template>
|
|
51
76
|
</template>
|
|
52
77
|
<template v-else-if="cell.type === 'input'">
|
|
53
|
-
|
|
78
|
+
<template v-if="cell.customFunction === undefined">
|
|
79
|
+
{{ configData.arr[inputColumnsDefinitionIndex][cell.dataIndex] }}
|
|
80
|
+
</template>
|
|
81
|
+
<template v-else>
|
|
82
|
+
{{ deserializeFunctionAndRun(cell.customFunction, configData.arr[inputColumnsDefinitionIndex][cell.dataIndex]) }}
|
|
83
|
+
</template>
|
|
54
84
|
</template>
|
|
55
85
|
<template v-else-if="cell.type === 'inputs'">
|
|
56
|
-
|
|
86
|
+
<template v-if="cell.customFunction === undefined">
|
|
87
|
+
{{ configData.arr[inputColumnsDefinitionIndex][cell.dataIndex] }}
|
|
88
|
+
</template>
|
|
89
|
+
<template v-else>
|
|
90
|
+
{{ deserializeFunctionAndRun(cell.customFunction, configData.arr[inputColumnsDefinitionIndex][cell.dataIndex]) }}
|
|
91
|
+
</template>
|
|
57
92
|
</template>
|
|
58
93
|
</td>
|
|
59
94
|
</template>
|
|
@@ -193,6 +228,12 @@ export default {
|
|
|
193
228
|
}
|
|
194
229
|
},
|
|
195
230
|
methods: {
|
|
231
|
+
deserializeFunctionAndRun (functionStr, value) {
|
|
232
|
+
console.warn('执行了!')
|
|
233
|
+
// eslint-disable-next-line no-eval
|
|
234
|
+
const fun = eval('(' + functionStr + ')')
|
|
235
|
+
return fun(value)
|
|
236
|
+
},
|
|
196
237
|
setImages (imageIds, dataIndex) {
|
|
197
238
|
console.warn('接收', imageIds)
|
|
198
239
|
this.configData.images[dataIndex] = imageIds
|