vue2-client 1.14.13 → 1.14.14
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 +1 -1
- package/src/base-client/components/common/XFormTable/XFormTable.vue +4 -0
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +5 -0
- package/src/base-client/components/common/XTable/XTable.vue +5 -0
- package/src/base-client/components/common/XTable/XTableWrapper.vue +5 -0
- package/src/components/STable/index.js +12 -0
package/package.json
CHANGED
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
@editButtonStateDataClick="editButtonStateDataClick"
|
|
83
83
|
@importExcelOk="importExcelOk"
|
|
84
84
|
@rowClick="handleRowClick"
|
|
85
|
+
@beforeDataChange="beforeDataChange"
|
|
85
86
|
@expand="onExpand">
|
|
86
87
|
<template slot="leftButton" slot-scope="{selectedRowKeys, selectedRows}">
|
|
87
88
|
<slot name="leftButton" :selectedRowKeys="selectedRowKeys" :selectedRows="selectedRows"></slot>
|
|
@@ -824,6 +825,9 @@ export default {
|
|
|
824
825
|
handleRowClick (record) {
|
|
825
826
|
this.$emit('rowClick', record)
|
|
826
827
|
},
|
|
828
|
+
beforeDataChange (record) {
|
|
829
|
+
this.$emit('beforeDataChange', record)
|
|
830
|
+
},
|
|
827
831
|
onExpand (expanded, record) {
|
|
828
832
|
this.$emit('expand', expanded, record)
|
|
829
833
|
}
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
:serverName="cell.serviceName"
|
|
35
35
|
v-on="getEventHandlers(cell)"
|
|
36
36
|
@hook:mounted="(h)=>onComponentMounted(h,cell,cellIndex)"
|
|
37
|
+
@beforeDataChange="beforeDataChange"
|
|
37
38
|
@rowClick="handleRowClick"
|
|
38
39
|
@onExpand="onExpand"
|
|
39
40
|
:queryParamsName="cell.slotConfig"
|
|
@@ -71,6 +72,7 @@
|
|
|
71
72
|
:serverName="cell.serviceName"
|
|
72
73
|
v-on="getEventHandlers(cell)"
|
|
73
74
|
@hook:mounted="(h)=>onComponentMounted(h,cell,cellIndex)"
|
|
75
|
+
@beforeDataChange="beforeDataChange"
|
|
74
76
|
@rowClick="handleRowClick"
|
|
75
77
|
@onExpand="onExpand"
|
|
76
78
|
:queryParamsName="cell.slotConfig"
|
|
@@ -220,6 +222,9 @@ export default {
|
|
|
220
222
|
handleRowClick (record) {
|
|
221
223
|
this.$emit('rowClick', record)
|
|
222
224
|
},
|
|
225
|
+
beforeDataChange (record) {
|
|
226
|
+
this.$emit('beforeDataChange', record)
|
|
227
|
+
},
|
|
223
228
|
onExpand (expanded, record) {
|
|
224
229
|
this.$emit('expand', expanded, record)
|
|
225
230
|
},
|
|
@@ -152,6 +152,7 @@
|
|
|
152
152
|
<x-table-wrapper
|
|
153
153
|
ref="table"
|
|
154
154
|
@rowClick="handleRowClick"
|
|
155
|
+
@beforeDataChange="beforeDataChange"
|
|
155
156
|
@expand="onExpand">
|
|
156
157
|
<template slot="expandedRowRender">
|
|
157
158
|
<!-- 列扩展栅格 -->
|
|
@@ -257,6 +258,7 @@
|
|
|
257
258
|
<x-table-wrapper
|
|
258
259
|
ref="selectedDataTable"
|
|
259
260
|
:load-selected-data="true"
|
|
261
|
+
@beforeDataChange="beforeDataChange"
|
|
260
262
|
@rowClick="handleRowClick">
|
|
261
263
|
</x-table-wrapper>
|
|
262
264
|
</a-modal>
|
|
@@ -1332,6 +1334,9 @@ export default {
|
|
|
1332
1334
|
handleRowClick (record) {
|
|
1333
1335
|
this.$emit('rowClick', record)
|
|
1334
1336
|
},
|
|
1337
|
+
beforeDataChange (record) {
|
|
1338
|
+
this.$emit('beforeDataChange', record)
|
|
1339
|
+
},
|
|
1335
1340
|
onExpand (expanded, record) {
|
|
1336
1341
|
this.$emit('expand', expanded, record)
|
|
1337
1342
|
}
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
:setScrollYHeight="tableContext.setScrollYHeight"
|
|
19
19
|
:selectRowMode="tableContext.selectRowMode"
|
|
20
20
|
:size="tableContext.tableSize"
|
|
21
|
+
@beforeDataChange="beforeDataChange"
|
|
21
22
|
@expand="onExpand"
|
|
22
23
|
@rowClick="handleRowClick"
|
|
23
24
|
>
|
|
@@ -152,6 +153,7 @@
|
|
|
152
153
|
:selectRowMode="tableContext.selectRowMode"
|
|
153
154
|
:size="tableContext.tableSize"
|
|
154
155
|
@rowClick="handleRowClick"
|
|
156
|
+
@beforeDataChange="beforeDataChange"
|
|
155
157
|
>
|
|
156
158
|
<template
|
|
157
159
|
v-for="(item, c_index) in tableContext.tableColumns"
|
|
@@ -297,6 +299,9 @@ export default {
|
|
|
297
299
|
handleRowClick (record) {
|
|
298
300
|
this.$emit('rowClick', record)
|
|
299
301
|
},
|
|
302
|
+
beforeDataChange (record) {
|
|
303
|
+
this.$emit('beforeDataChange', record)
|
|
304
|
+
},
|
|
300
305
|
onExpand (expanded, record) {
|
|
301
306
|
this.$emit('expand', expanded, record)
|
|
302
307
|
},
|
|
@@ -187,6 +187,18 @@ export default {
|
|
|
187
187
|
(this.sortOrder && { sortOrder: this.sortOrder }) || {},
|
|
188
188
|
{ ...filters }
|
|
189
189
|
)
|
|
190
|
+
|
|
191
|
+
// 在加载新数据前,将当前数据传递给父组件
|
|
192
|
+
if (this.localDataSource && this.localDataSource.length > 0) {
|
|
193
|
+
// 变化前的数据: oldData, 分页信息: pagination, 过滤条件: filters, 排序信息: sorter
|
|
194
|
+
this.$emit('beforeDataChange', {
|
|
195
|
+
oldData: this.localDataSource,
|
|
196
|
+
pagination: this.localPagination,
|
|
197
|
+
filters: filters,
|
|
198
|
+
sorter: sorter
|
|
199
|
+
})
|
|
200
|
+
}
|
|
201
|
+
|
|
190
202
|
const result = this.data(parameter)
|
|
191
203
|
// 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.totalCount, r.data
|
|
192
204
|
// eslint-disable-next-line
|