lw-cdp-ui 1.3.10 → 1.3.12

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.
@@ -172,14 +172,13 @@ export default function registerEt2l(lf, node, dynamicGroup) {
172
172
  class HtmlNodeModelAttributes extends dynamicGroup.model {
173
173
  // 监听分组状态变化
174
174
  toggleCollapse(value) {
175
- console.log(value)
176
175
  super.toggleCollapse(value)
177
176
  }
178
177
  // 计算子装载节点画布大小
179
178
  async getChildSize() {
180
179
  let children = Array.from(this.children)
181
180
  let nodes = [...this.graphModel.nodes].filter((node) => children.includes(node.id))
182
- console.log(nodes)
181
+
183
182
  if (nodes.length === 0) {
184
183
  return { width: 300, height: 240 } // 默认展开大小
185
184
  }
@@ -341,7 +341,6 @@ export default {
341
341
  if (distanceFromTop >= 0 && distanceFromTop <= 100 && _this.scrollObserverEnabled) {
342
342
  const dataIndex = entry.target.getAttribute('data-index');
343
343
  _this.affixIndex = dataIndex; // 更新 affixIndex
344
- console.log(dataIndex)
345
344
  }
346
345
  }, {
347
346
  root: elMain, // 设置根元素为 el-main
@@ -66,7 +66,7 @@
66
66
  </el-button>
67
67
 
68
68
  <div :class="options.length - expandNumber >= columnNumber ? 'expand-button' : 'hidden'"
69
- @click="isExpandStatus = !isExpandStatus">
69
+ @click="handleExpandStatus()">
70
70
  <span>{{ isExpandStatus ? "收起" : "展开" }}</span>
71
71
  </div>
72
72
  </div>
@@ -195,6 +195,13 @@ export default {
195
195
  },
196
196
  deep: true,
197
197
  },
198
+ options: {
199
+ handler(newVal) {
200
+ // 变化时计算稿表格高度
201
+ this.$bus.$emit("setTableHeight")
202
+ },
203
+ deep: true,
204
+ },
198
205
  },
199
206
  mounted() {
200
207
  this.isExpandStatus = this.isExpand;
@@ -206,6 +213,11 @@ export default {
206
213
  : this.defaultForm;
207
214
  },
208
215
  methods: {
216
+ // 切换展开状态
217
+ handleExpandStatus() {
218
+ this.isExpandStatus = !this.isExpandStatus;
219
+ this.$bus.$emit("setTableHeight")
220
+ },
209
221
  // 根据renderType设置对应组件
210
222
  setComponent(type) {
211
223
  const typeList = {
@@ -318,7 +330,7 @@ export default {
318
330
  // 一键收缩展开
319
331
  expandAll() {
320
332
  this.isExpandAll = !this.isExpandAll;
321
- },
333
+ }
322
334
  },
323
335
  };
324
336
  </script>
@@ -346,7 +358,6 @@ export default {
346
358
  .lw-search-card {
347
359
  width: 100%;
348
360
  background: var(--color-bg-2);
349
- // position: relative;
350
361
  overflow: hidden;
351
362
  .arco-col {
352
363
  margin: 5px 0;
@@ -232,7 +232,7 @@ export default {
232
232
  name: 'TableColumn',
233
233
  props: {
234
234
  col: {
235
- type: Array,
235
+ type: [Array, Object],
236
236
  default: () => []
237
237
  }
238
238
  },
@@ -120,6 +120,12 @@ export default {
120
120
  this.$nextTick(() => {
121
121
  this.handleResize()
122
122
  })
123
+ // 获取订阅
124
+ this.$bus.$on('setTableHeight', () => {
125
+ this.$nextTick(() => {
126
+ this.handleResize()
127
+ })
128
+ })
123
129
  },
124
130
 
125
131
  beforeDestroy() {
@@ -250,25 +256,25 @@ export default {
250
256
  }
251
257
 
252
258
  // 自动计算稿表格高度
253
- const container = document.querySelector('.adminui-main > .el-container') || { clientHeight: 0 }
259
+ const container = document.querySelector('.adminui-main') || { clientHeight: 0 }
254
260
  const btnContainer = document.querySelector('.table-block > .btn-container')
255
- const formTabele = document.querySelector('.el-form-item__content > .lw-table-page')
256
261
  const searchCard = document.querySelector('.lw-search-card')
257
- this.tableHeight = container.clientHeight
258
262
 
263
+ const formTabele = document.querySelector('.el-form-item__content > .lw-table-page')
264
+
265
+ this.tableHeight = container.clientHeight
259
266
  if (searchCard) {
260
267
  this.tableHeight = this.tableHeight - searchCard.clientHeight
261
268
  }
262
269
  if (btnContainer) {
263
270
  this.tableHeight = this.tableHeight - btnContainer.clientHeight - 10
264
271
  }
265
-
266
- if (!formTabele) {
267
- this.tableHeight = this.tableHeight - 110
268
- } else {
269
- this.tableHeight = ''
270
- }
271
-
272
+
273
+ if (!formTabele) {
274
+ this.tableHeight = this.tableHeight - 110
275
+ } else {
276
+ this.tableHeight = ''
277
+ }
272
278
  },
273
279
  // 拖动选中
274
280
  onSelect({ selected }) {
@@ -38,7 +38,6 @@ export function useFullscreen() {
38
38
 
39
39
  // 全屏切换
40
40
  const toggleFullScreen = () => {
41
- console.log(isFullscreen.value)
42
41
  if (isFullscreen.value) {
43
42
  exitFullscreen()
44
43
  } else {
@@ -50,7 +49,6 @@ export function useFullscreen() {
50
49
  // 检查全屏状态
51
50
  const handleFullscreenChange = () => {
52
51
  isFullscreen.value = Boolean(document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement)
53
- console.log('--------', isFullscreen.value)
54
52
  }
55
53
 
56
54
  // 监听全屏状态变化