three-trees-ui 1.0.44 → 1.0.45

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.44",
3
+ "version": "1.0.45",
4
4
  "publicPath": "/ui",
5
5
  "author": "hotent",
6
6
  "private": false,
@@ -460,14 +460,14 @@
460
460
  if (this.isLoadTable) {
461
461
  this.load()
462
462
  }
463
- this.calcTableHeight()
463
+ this.calcTableHeight(300)
464
464
  this.$watch('showAdvancedSearch', (n, o) => {
465
465
  if (n !== o) {
466
466
  if (n) {
467
467
  this.quickSearchWord = null
468
468
  }
469
469
  // 显示或收起搜索面板时,重新计算表格高度
470
- this.calcTableHeight(300)
470
+ this.calcTableHeight(800)
471
471
  this.$emit('advanced-show', n)
472
472
  }
473
473
  })
@@ -832,7 +832,8 @@
832
832
  initTablePanelHeight() {
833
833
  this.tablePanelHeight = this.$refs.tablePanel.$el.clientHeight
834
834
  },
835
- calcTableHeight(delay) {
835
+ async calcTableHeight(delay) {
836
+ await this.$nextTick()
836
837
  // 动态计算表格的高度,自适应当前容器
837
838
  setTimeout(() => {
838
839
  const toolbarPanelHeight =
@@ -44,6 +44,10 @@
44
44
  return value > 0 && value < 5
45
45
  },
46
46
  },
47
+ resetSearchLoad: {
48
+ type: Boolean,
49
+ default: false,
50
+ },
47
51
  labelWidth: {
48
52
  type: Number,
49
53
  default: 70,
@@ -133,6 +137,8 @@
133
137
  }
134
138
  },
135
139
  reset() {
140
+
141
+
136
142
  if (this.formModelExpression) {
137
143
  Object.keys(this.data[this.formModelExpression]).forEach((key) => {
138
144
  this.$set(
@@ -146,7 +152,12 @@
146
152
  vm.$emit('input-reset')
147
153
  })
148
154
  this.$nextTick(() => {
149
- this.search()
155
+ if(this.resetSearchLoad){
156
+ this.$emit('resetSearch',this.resetSearchLoad);
157
+ return;
158
+ }else{
159
+ this.search()
160
+ }
150
161
  })
151
162
  },
152
163
  },
@@ -145,7 +145,7 @@
145
145
  },
146
146
  },
147
147
  watch: {
148
- templateKey: function(n, o) {
148
+ templateKey: function (n, o) {
149
149
  if (n && o && n != o) {
150
150
  this.init()
151
151
  }
@@ -201,9 +201,8 @@
201
201
  printDetail() {
202
202
  this.$refs.btnRegion.style.display = 'none'
203
203
  setTimeout(() => {
204
- document.body.innerHTML = document.getElementsByClassName(
205
- 'custom-form'
206
- )[0].innerHTML
204
+ document.body.innerHTML =
205
+ document.getElementsByClassName('custom-form')[0].innerHTML
207
206
  window.print()
208
207
  this.$refs.btnRegion.style.display = 'block'
209
208
  location.reload()
@@ -256,6 +255,9 @@
256
255
  .then((result) => {
257
256
  if (result.state) {
258
257
  if (this.closeSave) {
258
+ if (this.isMobile) {
259
+ this.$notify({ type: 'success', message: result.message })
260
+ }
259
261
  this.close()
260
262
  return
261
263
  }
@@ -286,7 +288,10 @@
286
288
  this.disabled = false
287
289
  }
288
290
  })
289
- .catch(() => {
291
+ .catch((err) => {
292
+ if (this.isMobile) {
293
+ this.$notify.error(err)
294
+ }
290
295
  this.disabled = false
291
296
  })
292
297
  })