three-trees-ui 1.0.15 → 1.0.16

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-trees-ui",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "publicPath": "/ui",
5
5
  "author": "hotent",
6
6
  "private": false,
@@ -27,6 +27,10 @@
27
27
  if (!this.formInst) {
28
28
  this.formInst = utils.getOnlineFormInstance(this.$parent)
29
29
  }
30
+ // 如果是只读时不触发关联查询
31
+ if (this.formInst.isView === true) {
32
+ return
33
+ }
30
34
  if (this.queryJson.length > 0) {
31
35
  let _this = this
32
36
  this.queryJson.forEach((item) => {
@@ -303,6 +303,9 @@
303
303
  const _me = this
304
304
  const exp = this.mathExp
305
305
  const formVm = utils.getOnlineFormInstance(_me)
306
+ if (formVm && formVm.isView === true) {
307
+ return
308
+ }
306
309
  // 初始化流水号配置
307
310
  this.initIdentity(_me, formVm)
308
311
  // 数学运算表达式
@@ -15,6 +15,10 @@ const conformanceJudge = (value, vnode) => {
15
15
 
16
16
  const formula = {
17
17
  bind(el, binding, vnode) {
18
+ // 如果是只读的就不执行js脚本计算
19
+ if (el && el.__vue__ && el.formIsView === true) {
20
+ return
21
+ }
18
22
  if (!conformanceJudge(binding.value.value, vnode)) {
19
23
  return
20
24
  }
@@ -46,6 +50,10 @@ const formula = {
46
50
  }
47
51
  },
48
52
  update(el, binding, vnode) {
53
+ // 如果是只读的就不执行js脚本计算
54
+ if (el && el.__vue__ && el.formIsView === true) {
55
+ return
56
+ }
49
57
  if (!conformanceJudge(binding.value.value, vnode)) {
50
58
  return
51
59
  }
@@ -69,6 +69,10 @@ export default {
69
69
  }
70
70
  if (parent) {
71
71
  this.formIsView = parent.$options.propsData.isView
72
+ // 如果是只读 第一时间将状态改为flase 避免渲染
73
+ if (this.formIsView === true) {
74
+ this.writeable = false
75
+ }
72
76
  }
73
77
  },
74
78
  mounted() {