verce-vue-test 0.0.69 → 0.0.71
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/components/ElTablePro.vue +13 -0
- package/src/components/index.ts +109 -15
- package/src/router/index.ts +5 -0
- package/src/views/ComponentCatalogView.vue +768 -0
- package/src/views/ForecastInfo/RmbPositionSettlement.vue +95 -2
- package/src/views/ForecastInfo/components/FlowInfoPanel.vue +46 -15
- package/src/views/ForecastInfo/components/ForecastInfoPanel.vue +48 -15
- package/src/views/ForecastInfo/forecast-info.css +46 -0
- package/src/views/ForecastInfo/store.ts +23 -2
- package/src/views/HomeView.vue +2 -0
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
ref,
|
|
9
9
|
useAttrs,
|
|
10
10
|
useSlots,
|
|
11
|
+
watch,
|
|
11
12
|
cloneVNode,
|
|
12
13
|
Fragment,
|
|
13
14
|
type VNode,
|
|
@@ -51,6 +52,8 @@ const props = withDefaults(
|
|
|
51
52
|
layout?: string
|
|
52
53
|
// 分页尺寸
|
|
53
54
|
paginationSize?: 'large' | 'default' | 'small'
|
|
55
|
+
// 外部选择重置标识;值变化时清空表格内部及跨页保留的选择
|
|
56
|
+
selectionResetKey?: number
|
|
54
57
|
}>(),
|
|
55
58
|
{
|
|
56
59
|
columnConfig: true,
|
|
@@ -88,6 +91,15 @@ const slots = useSlots()
|
|
|
88
91
|
*/
|
|
89
92
|
// 列配置弹窗可见性
|
|
90
93
|
const dialogVisible = ref(false)
|
|
94
|
+
/** ElTable 选择控制器,仅声明当前组件需要调用的方法。 */
|
|
95
|
+
const tableRef = ref<{ clearSelection: () => void } | null>(null)
|
|
96
|
+
|
|
97
|
+
/** 业务操作完成后,在新数据渲染完毕时清空 reserve-selection 保存的勾选。 */
|
|
98
|
+
watch(
|
|
99
|
+
() => props.selectionResetKey,
|
|
100
|
+
() => tableRef.value?.clearSelection(),
|
|
101
|
+
{ flush: 'post' },
|
|
102
|
+
)
|
|
91
103
|
|
|
92
104
|
// 列选项类型定义
|
|
93
105
|
type ColumnOption = {
|
|
@@ -351,6 +363,7 @@ initColumns()
|
|
|
351
363
|
|
|
352
364
|
<!-- 表格主体 -->
|
|
353
365
|
<el-table
|
|
366
|
+
ref="tableRef"
|
|
354
367
|
v-bind="attrs"
|
|
355
368
|
:data="data"
|
|
356
369
|
:row-key="rowKey"
|
package/src/components/index.ts
CHANGED
|
@@ -14,25 +14,119 @@ import IconEcosystem from './icons/IconEcosystem.vue'
|
|
|
14
14
|
import IconSupport from './icons/IconSupport.vue'
|
|
15
15
|
import IconTooling from './icons/IconTooling.vue'
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
LoginSuccessNotification,
|
|
24
|
-
NumberRange,
|
|
25
|
-
WebsiteNoticeTitle,
|
|
26
|
-
IconCommunity,
|
|
27
|
-
IconDocumentation,
|
|
28
|
-
IconEcosystem,
|
|
29
|
-
IconSupport,
|
|
30
|
-
IconTooling,
|
|
17
|
+
type GlobalComponentDefinition = {
|
|
18
|
+
name: string
|
|
19
|
+
component: Component
|
|
20
|
+
category: '操作组件' | '表单组件' | '数据组件' | '反馈组件' | '展示组件' | '图标组件'
|
|
21
|
+
description: string
|
|
22
|
+
filePath: string
|
|
31
23
|
}
|
|
32
24
|
|
|
25
|
+
const globalComponentDefinitions: GlobalComponentDefinition[] = [
|
|
26
|
+
{
|
|
27
|
+
name: 'ElButtonPro',
|
|
28
|
+
component: ElButtonPro,
|
|
29
|
+
category: '操作组件',
|
|
30
|
+
description: '增强版按钮,提供权限、防抖、节流和操作确认能力。',
|
|
31
|
+
filePath: 'src/components/ElButtonPro.vue',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'ElFormDialog',
|
|
35
|
+
component: ElFormDialog,
|
|
36
|
+
category: '表单组件',
|
|
37
|
+
description: '通过字段配置快速生成新增或编辑表单弹窗。',
|
|
38
|
+
filePath: 'src/components/ElFormDialog.vue',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'ElInputThousandth',
|
|
42
|
+
component: ElInputThousandth,
|
|
43
|
+
category: '表单组件',
|
|
44
|
+
description: '支持千分位展示和数字输入格式化的金额输入框。',
|
|
45
|
+
filePath: 'src/components/ElInputThousandth.vue',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'ElTablePro',
|
|
49
|
+
component: ElTablePro,
|
|
50
|
+
category: '数据组件',
|
|
51
|
+
description: '封装列配置、列持久化和分页能力的增强表格。',
|
|
52
|
+
filePath: 'src/components/ElTablePro.vue',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'ElUploadButton',
|
|
56
|
+
component: ElUploadButton,
|
|
57
|
+
category: '操作组件',
|
|
58
|
+
description: '以按钮形态封装上传流程、校验和上传状态。',
|
|
59
|
+
filePath: 'src/components/ElUploadButton.vue',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'LoginSuccessNotification',
|
|
63
|
+
component: LoginSuccessNotification,
|
|
64
|
+
category: '反馈组件',
|
|
65
|
+
description: '展示当前与上次登录信息的登录成功通知内容。',
|
|
66
|
+
filePath: 'src/components/LoginSuccessNotification.vue',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'NumberRange',
|
|
70
|
+
component: NumberRange,
|
|
71
|
+
category: '表单组件',
|
|
72
|
+
description: '支持数组或双字段绑定、单位换算和区间校验的数字范围输入。',
|
|
73
|
+
filePath: 'src/components/NumberRange.vue',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'WebsiteNoticeTitle',
|
|
77
|
+
component: WebsiteNoticeTitle,
|
|
78
|
+
category: '展示组件',
|
|
79
|
+
description: '用于页面顶部展示网站公告内容和查看更多入口。',
|
|
80
|
+
filePath: 'src/components/WebsiteNoticeTitle.vue',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'IconCommunity',
|
|
84
|
+
component: IconCommunity,
|
|
85
|
+
category: '图标组件',
|
|
86
|
+
description: '社区场景图标。',
|
|
87
|
+
filePath: 'src/components/icons/IconCommunity.vue',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'IconDocumentation',
|
|
91
|
+
component: IconDocumentation,
|
|
92
|
+
category: '图标组件',
|
|
93
|
+
description: '文档场景图标。',
|
|
94
|
+
filePath: 'src/components/icons/IconDocumentation.vue',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: 'IconEcosystem',
|
|
98
|
+
component: IconEcosystem,
|
|
99
|
+
category: '图标组件',
|
|
100
|
+
description: '生态场景图标。',
|
|
101
|
+
filePath: 'src/components/icons/IconEcosystem.vue',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'IconSupport',
|
|
105
|
+
component: IconSupport,
|
|
106
|
+
category: '图标组件',
|
|
107
|
+
description: '支持与服务场景图标。',
|
|
108
|
+
filePath: 'src/components/icons/IconSupport.vue',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'IconTooling',
|
|
112
|
+
component: IconTooling,
|
|
113
|
+
category: '图标组件',
|
|
114
|
+
description: '工具场景图标。',
|
|
115
|
+
filePath: 'src/components/icons/IconTooling.vue',
|
|
116
|
+
},
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
/** 组件清单页与全局注册共用同一份数据,避免展示内容与实际注册状态不一致。 */
|
|
120
|
+
export const globalComponentCatalog = globalComponentDefinitions.map((definition) => ({
|
|
121
|
+
name: definition.name,
|
|
122
|
+
category: definition.category,
|
|
123
|
+
description: definition.description,
|
|
124
|
+
filePath: definition.filePath,
|
|
125
|
+
}))
|
|
126
|
+
|
|
33
127
|
/** 注册 src/components 下的公共组件,页面模板中可直接使用。 */
|
|
34
128
|
export function registerGlobalComponents(app: App) {
|
|
35
|
-
|
|
129
|
+
globalComponentDefinitions.forEach(({ name, component }) => {
|
|
36
130
|
app.component(name, component)
|
|
37
131
|
})
|
|
38
132
|
}
|
package/src/router/index.ts
CHANGED
|
@@ -35,6 +35,11 @@ const router = createRouter({
|
|
|
35
35
|
name: 'form',
|
|
36
36
|
component: () => import('../views/FormView.vue'),
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
path: '/components',
|
|
40
|
+
name: 'componentCatalog',
|
|
41
|
+
component: () => import('../views/ComponentCatalogView.vue'),
|
|
42
|
+
},
|
|
38
43
|
{
|
|
39
44
|
path: '/table-pro',
|
|
40
45
|
name: 'tablePro',
|