sh-view 2.5.5 → 2.5.6
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
|
@@ -71,12 +71,9 @@ export default function (props, context, proxy, isGrid) {
|
|
|
71
71
|
const tableViewData = computed(() => tableFilterData.value || props.dataSourse)
|
|
72
72
|
const tablePrevColumns = computed(() => {
|
|
73
73
|
let prevColumns = []
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
prevColumns.push(columnsMapDefault[prev])
|
|
78
|
-
}
|
|
79
|
-
})
|
|
74
|
+
const { seq, selectType } = tableGlobalConfig.value
|
|
75
|
+
if (seq) prevColumns.push(columnsMapDefault.seq)
|
|
76
|
+
if (selectType) prevColumns.push(columnsMapDefault[selectType])
|
|
80
77
|
return prevColumns
|
|
81
78
|
})
|
|
82
79
|
const tableColumns = computed(() => {
|
|
@@ -155,7 +152,8 @@ export default function (props, context, proxy, isGrid) {
|
|
|
155
152
|
return selectionRows.value || []
|
|
156
153
|
}
|
|
157
154
|
// 获取全部数据
|
|
158
|
-
|
|
155
|
+
// visible为true获取视图数据
|
|
156
|
+
const getFullData = ({ visible }) => {
|
|
159
157
|
let data = $vUtils.clone(tableRef.value.getTableData().fullData, true)
|
|
160
158
|
const columns = tableRef.value.getColumns()
|
|
161
159
|
let rnameColumns = columns.filter(col => col.rname)
|
|
@@ -165,7 +163,7 @@ export default function (props, context, proxy, isGrid) {
|
|
|
165
163
|
let cellValue = $vUtils.get(row, property)
|
|
166
164
|
if (!$vUtils.isNone(cellValue)) {
|
|
167
165
|
let { rvalue, rtext } = $vUtils.formatRender(cellValue, property, row, rname, rprops, proxy)
|
|
168
|
-
$vUtils.set(row, property, ['$vMoney'].includes(rname) ? rtext : rvalue)
|
|
166
|
+
$vUtils.set(row, property, visible || ['$vMoney'].includes(rname) ? rtext : rvalue)
|
|
169
167
|
}
|
|
170
168
|
})
|
|
171
169
|
})
|
|
@@ -397,13 +395,10 @@ export default function (props, context, proxy, isGrid) {
|
|
|
397
395
|
searchFields.push({ rkey: col.property, rname: renderObj.name, rprops: Object.assign({}, renderObj.props, col.rprops) })
|
|
398
396
|
}
|
|
399
397
|
})
|
|
400
|
-
|
|
398
|
+
let fullVisibleData = getFullData({ visible: true })
|
|
399
|
+
filterData = $vUtils.searchTree(fullVisibleData, row => {
|
|
401
400
|
return searchFields.some(item => {
|
|
402
401
|
let cellValue = $vUtils.get(row, item.rkey)
|
|
403
|
-
if ($vxePluginNames.expendRenders && $vxePluginNames.expendRenders.includes(item.rname)) {
|
|
404
|
-
let { rtext } = $vUtils.formatRender(cellValue, item.rkey, row, item.rname, item.rprops, proxy)
|
|
405
|
-
return String(rtext).toLowerCase().indexOf(filterText) > -1
|
|
406
|
-
}
|
|
407
402
|
return $vUtils.trim(cellValue).toLowerCase().indexOf(filterText) > -1
|
|
408
403
|
})
|
|
409
404
|
})
|