@zscreate/zhxy-app-component 1.0.238 → 1.0.240
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.
|
@@ -1779,16 +1779,7 @@ export default {
|
|
|
1779
1779
|
}
|
|
1780
1780
|
},
|
|
1781
1781
|
dataModel: {
|
|
1782
|
-
immediate: true,
|
|
1783
1782
|
handler(v) {
|
|
1784
|
-
let defaultValue = this.widget.options?.defaultValue
|
|
1785
|
-
if (String(defaultValue).startsWith('script:')) {
|
|
1786
|
-
defaultValue = defaultValue.replace('script:', '')
|
|
1787
|
-
const tempValue = {value: ''}
|
|
1788
|
-
run(`tempValue.value = ${defaultValue}`, {'this': this, tempValue})
|
|
1789
|
-
v = this.dataModel = tempValue.value
|
|
1790
|
-
this.widget.options.defaultValue = ''
|
|
1791
|
-
}
|
|
1792
1783
|
if (this.tableKey) {
|
|
1793
1784
|
this.tableValueSet(v);
|
|
1794
1785
|
} else {
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
+
import { run } from "../../../utils/formula_run"
|
|
2
|
+
|
|
1
3
|
export const valueChangeMixin = {
|
|
4
|
+
watch: {
|
|
5
|
+
dataModel: {
|
|
6
|
+
immediate: true,
|
|
7
|
+
handler() {
|
|
8
|
+
let defaultValue = this.widget.options?.defaultValue
|
|
9
|
+
if (String(defaultValue).startsWith('script:')) {
|
|
10
|
+
defaultValue = defaultValue.replace('script:', '')
|
|
11
|
+
const tempValue = {value: ''}
|
|
12
|
+
run(`tempValue.value = ${defaultValue}`, {'this': this, tempValue})
|
|
13
|
+
this.dataModel = tempValue.value
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
}
|
|
17
|
+
},
|
|
2
18
|
methods: {
|
|
3
19
|
/**文件dataModal**/
|
|
4
20
|
filePost(val) {
|