vue3-components-plus 3.0.14 → 3.0.16

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/README.md CHANGED
@@ -1015,6 +1015,20 @@ autoScaleInit(document.querySelector('body'), {
1015
1015
 
1016
1016
  ## 更新日志
1017
1017
 
1018
+ ```text
1019
+ version: 3.0.16
1020
+ 日期: 2026-03-16
1021
+ 更新内容:
1022
+ 1. 修改NsTableContainer支持自定义分页字段:page-number-key/page-size-key/page-total-key
1023
+ ```
1024
+
1025
+ ```text
1026
+ version: 3.0.15
1027
+ 日期: 2026-03-16
1028
+ 更新内容:
1029
+ 1. NsTableContainer支持多级表头,通过 children 属性配置嵌套列
1030
+ ```
1031
+
1018
1032
  ```text
1019
1033
  version: 3.0.14
1020
1034
  日期: 2026-03-16
@@ -77,6 +77,38 @@ const tableData = ref([])
77
77
  const total = ref(0)
78
78
 
79
79
  const searchItems = ref([
80
+ {
81
+ prop: "mounth",
82
+ label: "归属月",
83
+ span: 6,
84
+ component: ElSelect,
85
+ attrs: {
86
+ placeholder: "请选择归属月",
87
+ clearable: true,
88
+ options: [
89
+ {
90
+ value: "Option1",
91
+ label: "Option1"
92
+ },
93
+ {
94
+ value: "Option2",
95
+ label: "Option2",
96
+ },
97
+ {
98
+ value: "Option3",
99
+ label: "Option3"
100
+ },
101
+ {
102
+ value: "Option4",
103
+ label: "Option4",
104
+ },
105
+ {
106
+ value: "Option5",
107
+ label: "Option5"
108
+ }
109
+ ]
110
+ }
111
+ },
80
112
  {
81
113
  prop: 'username',
82
114
  label: '用户名',
@@ -198,45 +230,63 @@ const columns = ref([
198
230
  'class-name': 'id-column', // 自定义列样式类名
199
231
  resizable: false, // 禁止拖拽调整宽度
200
232
  },
201
- { prop: 'avatar', label: '头像', slot: 'avatar', width: 80 },
233
+ // 多级表头示例:基本信息
202
234
  {
203
- prop: 'username',
204
- label: '用户名',
205
- width: 120,
206
- // 透传属性
207
- 'show-overflow-tooltip': true, // 内容过长时显示 tooltip
208
- formatter: (row, column, cellValue) => {
209
- return cellValue ? `@${cellValue}` : '-'
210
- },
211
- },
212
- {
213
- prop: 'realName',
214
- label: '真实姓名',
215
- width: 120,
216
- 'min-width': 100, // 最小宽度
235
+ label: '基本信息',
236
+ children: [
237
+ { prop: 'avatar', label: '头像', slot: 'avatar', width: 80 },
238
+ {
239
+ prop: 'username',
240
+ label: '用户名',
241
+ width: 120,
242
+ // 透传属性
243
+ 'show-overflow-tooltip': true, // 内容过长时显示 tooltip
244
+ formatter: (row, column, cellValue) => {
245
+ return cellValue ? `@${cellValue}` : '-'
246
+ },
247
+ },
248
+ {
249
+ prop: 'realName',
250
+ label: '真实姓名',
251
+ width: 120,
252
+ 'min-width': 100, // 最小宽度
253
+ },
254
+ { prop: 'gender', label: '性别', slot: 'gender', width: 80 },
255
+ ]
217
256
  },
218
- { prop: 'gender', label: '性别', slot: 'gender', width: 80 },
219
- { prop: 'department', label: '部门', slot: 'department', width: 120 },
220
- { prop: 'status', label: '状态', slot: 'status', width: 100 },
257
+ // 多级表头示例:组织信息
221
258
  {
222
- prop: 'phone',
223
- label: '手机号',
224
- width: 130,
225
- 'show-overflow-tooltip': true,
259
+ label: '组织信息',
260
+ children: [
261
+ { prop: 'department', label: '部门', slot: 'department', width: 120 },
262
+ { prop: 'status', label: '状态', slot: 'status', width: 100 },
263
+ ]
226
264
  },
265
+ // 多级表头示例:联系方式
227
266
  {
228
- prop: 'email',
229
- label: '邮箱',
230
- minWidth: 180,
231
- 'show-overflow-tooltip': true,
232
- filters: [
233
- // 筛选配置
234
- { text: 'Gmail', value: '@gmail.com' },
235
- { text: 'QQ邮箱', value: '@qq.com' },
236
- ],
237
- 'filter-method': (value, row) => {
238
- return row.email.includes(value)
239
- },
267
+ label: '联系方式',
268
+ children: [
269
+ {
270
+ prop: 'phone',
271
+ label: '手机号',
272
+ width: 130,
273
+ 'show-overflow-tooltip': true,
274
+ },
275
+ {
276
+ prop: 'email',
277
+ label: '邮箱',
278
+ minWidth: 180,
279
+ 'show-overflow-tooltip': true,
280
+ filters: [
281
+ // 筛选配置
282
+ { text: 'Gmail', value: '@gmail.com' },
283
+ { text: 'QQ邮箱', value: '@qq.com' },
284
+ ],
285
+ 'filter-method': (value, row) => {
286
+ return row.email.includes(value)
287
+ },
288
+ },
289
+ ]
240
290
  },
241
291
  {
242
292
  prop: 'createTime',