@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) {
@@ -601,6 +601,7 @@ export default {
601
601
  this.models[model] instanceof Array &&
602
602
  this.models[model].length > 0
603
603
  ) {
604
+ debugger
604
605
  // console.log('--',this.tableModel[model], model)
605
606
  this.models[model].forEach((item, index) => {
606
607
  this.originIndex++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.238",
3
+ "version": "1.0.240",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",