imatrix-ui 2.8.25 → 2.8.26

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": "imatrix-ui",
3
- "version": "2.8.25",
3
+ "version": "2.8.26",
4
4
  "description": "前端组件库:表格、表单、组织结构树等",
5
5
  "main": "lib/super-ui.umd.min.js",
6
6
  "private": false,
@@ -758,6 +758,21 @@ const apis = {
758
758
  }
759
759
  const gridParams = store.get(listCode)
760
760
  return gridParams.pagination
761
+ },
762
+ // 获得该列表中,下拉选是选项组的字段信息,返回的key是属性名,value是选项集合
763
+ getOptionsValueSet(listCode) {
764
+ const result = {}
765
+ if (!listCode) {
766
+ listCode = store.get('_list_code')
767
+ }
768
+ const gridParams = store.get(listCode)
769
+ const columns = gridParams.columns
770
+ columns.forEach(col => {
771
+ if (col.valueSet && col.valueSet.length > 0) {
772
+ result[col.prop] = col.valueSet
773
+ }
774
+ })
775
+ return result
761
776
  }
762
777
  }
763
778
  export default apis
@@ -1356,11 +1356,11 @@ export default {
1356
1356
  // 子表无记录时不需要刷新子表记录。表示是新建或修改时子表无记录,且不需要刷新子表。
1357
1357
  if (
1358
1358
  this.isSubTableEmpty(gridParams)
1359
- ){
1359
+ ) {
1360
1360
  // 表示是新建表单时,子表记录集合是空数组
1361
1361
  console.log('子表无记录----code=', this.code, gridParams)
1362
1362
  const subTableData = []
1363
- this.packageSubTableData(gridParams,subTableData)
1363
+ this.packageSubTableData(gridParams, subTableData)
1364
1364
  }
1365
1365
  this.hasLoadData = true
1366
1366
  gridParams.loaded = true
@@ -1368,7 +1368,7 @@ export default {
1368
1368
  }
1369
1369
  }
1370
1370
  },
1371
- isSubTableEmpty (gridParams) {
1371
+ isSubTableEmpty(gridParams) {
1372
1372
  return gridParams.options && gridParams.options.isFormSubTable &&
1373
1373
  ((gridParams.options.subTableData === undefined || gridParams.options.subTableData === null) ||
1374
1374
  gridParams.options.subTableData.length === 0)
@@ -1416,7 +1416,7 @@ export default {
1416
1416
  JSON.parse(JSON.stringify(this.gridData))
1417
1417
  )
1418
1418
  },
1419
- canRefreshTableData (gridParams) {
1419
+ canRefreshTableData(gridParams) {
1420
1420
  let isCanRefreshTableData = false
1421
1421
  if (gridParams.options && !gridParams.options.isFormSubTable) {
1422
1422
  // 如果不是子表时