vue2-client 1.16.65 → 1.16.67
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/demo.vue +1 -2
- package/src/base-client/components/common/XReportGrid/XReportTrGroup.vue +13 -1
- package/src/base-client/components/common/XTable/XTableWrapper.vue +12 -2
- package/src/base-client/components/his/XSidebar/XSidebar.vue +5 -2
- package/src/router/async/router.map.js +2 -1
package/package.json
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
title="示例表单"
|
|
5
5
|
:queryParamsName="queryParamsName"
|
|
6
6
|
:fixedAddForm="fixedAddForm"
|
|
7
|
-
:x-tree-config-name="xTreeConfigName"
|
|
8
7
|
:externalSelectedRowKeys="selectedKeys"
|
|
9
8
|
@action="action"
|
|
10
9
|
@selectRow="selectRow"
|
|
@@ -27,7 +26,7 @@ export default {
|
|
|
27
26
|
data () {
|
|
28
27
|
return {
|
|
29
28
|
// 查询配置文件名
|
|
30
|
-
queryParamsName: '
|
|
29
|
+
queryParamsName: 'chargeQueryCRUD',
|
|
31
30
|
// 查询配置左侧tree
|
|
32
31
|
xTreeConfigName: 'addressType',
|
|
33
32
|
// 新增表单固定值
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a-row id="has_row" type="flex" :gutter="
|
|
2
|
+
<a-row id="has_row" type="flex" :gutter="dynamicGutter" :style="isWidget ? {margin: '0px'} : {'margin-bottom': '.5rem'}">
|
|
3
3
|
<template v-for="(cell, cellIndex) in columns">
|
|
4
4
|
<a-col
|
|
5
5
|
name="trGroup"
|
|
@@ -268,6 +268,18 @@ export default {
|
|
|
268
268
|
}
|
|
269
269
|
})
|
|
270
270
|
return sum
|
|
271
|
+
},
|
|
272
|
+
// 动态 gutter 配置:当包含 x-sidebar 时禁用 gutter
|
|
273
|
+
dynamicGutter () {
|
|
274
|
+
// 检查当前行是否包含 x-sidebar 组件
|
|
275
|
+
const hasXSidebar = this.columns.some(cell => {
|
|
276
|
+
if (Array.isArray(cell)) {
|
|
277
|
+
return cell.some(item => item.slotType === 'x-sidebar')
|
|
278
|
+
}
|
|
279
|
+
return cell.slotType === 'x-sidebar'
|
|
280
|
+
})
|
|
281
|
+
// 如果包含 x-sidebar,禁用 gutter 以避免影响同级组件的 padding
|
|
282
|
+
return hasXSidebar ? 0 : this.gutter
|
|
271
283
|
}
|
|
272
284
|
},
|
|
273
285
|
data () {
|
|
@@ -209,7 +209,8 @@
|
|
|
209
209
|
<a @click="tableContext.gotoUserDetail(item.dataIndex,text,record)">{{ text }}</a>
|
|
210
210
|
</span>
|
|
211
211
|
<span v-else-if="item.slotType === 'ellipsis'" :key="'ellipsis-' + c_index">
|
|
212
|
-
<ellipsis :length="item.slotValue" tooltip>{{ text === '' ? '--' : text }}</ellipsis>
|
|
212
|
+
<!-- <ellipsis :length="item.slotValue" tooltip>{{ text === '' ? '--' : text }}</ellipsis> -->
|
|
213
|
+
<span>{{ text === '' ? '--' : text }}</span>
|
|
213
214
|
</span>
|
|
214
215
|
<span v-else-if="item.slotType === 'progress'" :key="'progress-' + c_index">
|
|
215
216
|
<!-- websocket-id (配置名称-字段名称-用户id-数据行id) -->
|
|
@@ -320,7 +321,16 @@ export default {
|
|
|
320
321
|
return this.tableContext.expandedGrid ? this.$refs.expandableTable : this.$refs.simpleTable
|
|
321
322
|
},
|
|
322
323
|
realTableColumns () {
|
|
323
|
-
return this.tableContext.tableColumns.filter(item => item.slotType !== 'action' || !this.disableAction)
|
|
324
|
+
return this.tableContext.tableColumns.filter(item => item.slotType !== 'action' || !this.disableAction).map((item) => {
|
|
325
|
+
// todo delete 后台现在也是200 不过要清楚配置缓存 这里是为了让不清缓存也能达到争取的效果
|
|
326
|
+
if (item.slotType === 'date' || item.slotType === 'dateTime') {
|
|
327
|
+
item.width = 200
|
|
328
|
+
}
|
|
329
|
+
if (['ellipsis', 'towDecimal', 'date', 'dateTime', 'fourDecimal', 'int'].includes(item.slotType)) {
|
|
330
|
+
item.ellipsis = true
|
|
331
|
+
}
|
|
332
|
+
return item
|
|
333
|
+
})
|
|
324
334
|
},
|
|
325
335
|
components () {
|
|
326
336
|
return {
|
|
@@ -135,7 +135,10 @@ export default {
|
|
|
135
135
|
|
|
136
136
|
// 设置布局样式
|
|
137
137
|
Object.entries(layoutStyles).forEach(([property, value]) => {
|
|
138
|
-
|
|
138
|
+
// 将驼峰命名转换为CSS标准命名
|
|
139
|
+
const cssProperty = property.replace(/([A-Z])/g, '-$1').toLowerCase()
|
|
140
|
+
element.style.setProperty(cssProperty, value)
|
|
141
|
+
console.log(`设置样式: ${cssProperty} = ${value}`, element)
|
|
139
142
|
})
|
|
140
143
|
|
|
141
144
|
// 恢复保护的样式
|
|
@@ -335,7 +338,7 @@ export default {
|
|
|
335
338
|
// 使用安全的方式设置布局样式
|
|
336
339
|
this.safeSetLayoutStyles(mainCol, {
|
|
337
340
|
flex: '1 1 auto',
|
|
338
|
-
|
|
341
|
+
maxWidth: `calc(100% - ${remainingWidth} - ${width})`,
|
|
339
342
|
transition: 'all 0.3s'
|
|
340
343
|
})
|
|
341
344
|
}
|
|
@@ -54,13 +54,14 @@ routerResource.example = {
|
|
|
54
54
|
path: 'example',
|
|
55
55
|
name: '示例主页面',
|
|
56
56
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo2.vue'),
|
|
57
|
+
component: () => import('@vue2-client/base-client/components/common/XFormTable/demo.vue'),
|
|
57
58
|
// component: () => import('@vue2-client/pages/WorkflowDetail/WorkFlowDemo.vue'),
|
|
58
59
|
// component: () => import('@vue2-client/pages/addressSelect/addressDemo.vue'),
|
|
59
60
|
// component: () => import('@vue2-client/base-client/components/common/XDescriptions/demo.vue'),
|
|
60
61
|
// component: () => import('@vue2-client/base-client/components/common/XAddNativeForm/demo.vue'),
|
|
61
62
|
// component: () => import('@vue2-client/base-client/components/common/XFormGroup/demo.vue'),
|
|
62
63
|
// component: () => import('@vue2-client/base-client/components/common/XReport/XReportDemo.vue'),
|
|
63
|
-
component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
|
|
64
|
+
// component: () => import('@vue2-client/base-client/components/common/XReportGrid/XReportDemo.vue'),
|
|
64
65
|
// component: () => import('@vue2-client/base-client/components/common/HIS/demo.vue'),
|
|
65
66
|
// component: () => import('@vue2-client/base-client/components/common/XDatePicker/demo.vue'),
|
|
66
67
|
// component: () => import('@vue2-client/base-client/components/common/XTab/XTabDemo.vue'),
|