@qin-ui/antd-vue-pro 2.0.9 → 2.0.10

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  > 二次封装 ant-design-vue 组件,提供 ProForm 和 ProTable 高级组件。
4
4
 
5
+ ## [使用示例和文档详细内容](https://dufan3715.github.io/pro-components/)
6
+
5
7
  ---
6
8
 
7
9
  ## ✨ 特性
@@ -109,5 +111,3 @@ antd-vue-pro 导出了一个名为 `useTable` 的自定义 Hook,用于处理
109
111
  | button-bar | 自定义按钮组 |
110
112
  | toolbar | 自定义工具栏 |
111
113
  | table | 自定义表格 |
112
-
113
- ## [更多使用示例和文档详细内容](https://dufan3715.github.io/pro-components/)
@@ -28,12 +28,12 @@
28
28
  .control-icon[data-v-d8e78b5b] :hover {
29
29
  color: #1677ff;
30
30
  }
31
- .control-icon[data-v-88c80679] {
31
+ .control-icon[data-v-f75da747] {
32
32
  display: flex;
33
33
  align-items: center;
34
34
  cursor: pointer;
35
35
  }
36
- .control-icon[data-v-88c80679] :hover {
36
+ .control-icon[data-v-f75da747] :hover {
37
37
  color: #1677ff;
38
38
  }
39
39
  .pro-table .pro-table-header[data-v-eb2f3860] {
package/es/index.d.ts CHANGED
@@ -253,95 +253,6 @@ export declare type ComponentVars = Partial<RequiredComponentVars>;
253
253
  */
254
254
  declare type CompSlot<T extends string> = Partial<Record<KeyExpandString<T>, SlotComponentType>>;
255
255
 
256
- /**
257
- * @type {CompType} 字段类型集合
258
- */
259
- export declare type CompType = {
260
- /** 文本框 */
261
- 'input': {
262
- component: 'input';
263
- slots?: InputSlots;
264
- } & InputProps;
265
- /** 文本域 */
266
- 'textarea': {
267
- component: 'textarea';
268
- slots?: InputSlots;
269
- } & TextAreaProps;
270
- /** 文本框-密码 */
271
- 'input-password': {
272
- component: 'input-password';
273
- slots?: InputSlots;
274
- } & InputProps;
275
- /** 文本框-搜索 */
276
- 'input-search': {
277
- component: 'input-search';
278
- slots?: InputSlots;
279
- } & InputProps;
280
- /** 数字文本框 */
281
- 'input-number': {
282
- component: 'input-number';
283
- slots?: InputNumberSlots;
284
- } & InputNumberProps;
285
- /** 下拉选择器 */
286
- 'select': {
287
- component: 'select';
288
- slots?: SelectSlots;
289
- } & SelectProps;
290
- /** 级联选择器 */
291
- 'cascader': {
292
- component: 'cascader';
293
- slots?: CascaderSlots;
294
- } & CascaderProps;
295
- /** 日期选择器 */
296
- 'date-picker': {
297
- component: 'date-picker';
298
- slots?: DatePickerSlots;
299
- } & DatePickerProps;
300
- /** 日期选择器-范围 */
301
- 'range-picker': {
302
- component: 'range-picker';
303
- slots?: RangePickerSlots;
304
- } & RangePickerProps;
305
- /** 时间选择器 */
306
- 'time-picker': {
307
- component: 'time-picker';
308
- slots?: TimePickerSlots;
309
- } & TimePickerProps;
310
- /** 复选框组 */
311
- 'checkbox-group': {
312
- component: 'checkbox-group';
313
- } & CheckboxGroupProps;
314
- /** 单选框组 */
315
- 'radio-group': {
316
- component: 'radio-group';
317
- } & RadioGroupProps;
318
- /** 开关 */
319
- 'switch': {
320
- component: 'switch';
321
- slots?: SwitchSlots;
322
- } & SwitchProps;
323
- /** 滑块 */
324
- 'slider': {
325
- component: 'slider';
326
- slots?: SliderSlots;
327
- } & SliderProps;
328
- /** 树形选择器 */
329
- 'tree-select': {
330
- component: 'tree-select';
331
- slots?: TreeSelectSlots;
332
- } & TreeSelectProps;
333
- /** 穿梭框 */
334
- 'transfer': {
335
- component: 'transfer';
336
- slots?: TransferSlots;
337
- } & TransferProps;
338
- /** 自定义组件 */
339
- 'custom': {
340
- component?: RenderComponentType | Raw<RenderComponentType>;
341
- slots?: Slots;
342
- } & Record<string, any>;
343
- };
344
-
345
256
  /**
346
257
  * @description 容器组件类型
347
258
  */
@@ -443,7 +354,11 @@ declare type ExtendWithAny<D> = {
443
354
  * @description 字段配置类型,包含所有字段属性和响应式支持
444
355
  * @template D - 数据对象类型
445
356
  */
446
- export declare type Field<D extends Data = Data> = WithRef<CompType[keyof CompType] & Omit<FormItemProps, 'label'> & ColProps & Base<D>>;
357
+ export declare type Field<D extends Data = Data> = {
358
+ [K in keyof FieldTypeMap]: {
359
+ component: K extends 'custom' ? FieldTypeMap<D>[K]['component'] : K;
360
+ } & FieldTypeMap<D>[K];
361
+ }[keyof FieldTypeMap];
447
362
 
448
363
  /**
449
364
  * @description 字段数组类型
@@ -451,6 +366,78 @@ export declare type Field<D extends Data = Data> = WithRef<CompType[keyof CompTy
451
366
  */
452
367
  export declare type Fields<D extends Data = Data> = Array<Field<D>>;
453
368
 
369
+ /**
370
+ * @type {FieldTypeMap} 字段类型集合
371
+ */
372
+ export declare type FieldTypeMap<D extends Data = Data> = {
373
+ /** 文本框 */
374
+ 'input': WithCommon<{
375
+ slots?: InputSlots;
376
+ } & InputProps, D>;
377
+ /** 文本域 */
378
+ 'textarea': WithCommon<{
379
+ slots?: InputSlots;
380
+ } & TextAreaProps, D>;
381
+ /** 文本框-密码 */
382
+ 'input-password': WithCommon<{
383
+ slots?: InputSlots;
384
+ } & InputProps, D>;
385
+ /** 文本框-搜索 */
386
+ 'input-search': WithCommon<{
387
+ slots?: InputSlots;
388
+ } & InputProps, D>;
389
+ /** 数字文本框 */
390
+ 'input-number': WithCommon<{
391
+ slots?: InputNumberSlots;
392
+ } & InputNumberProps, D>;
393
+ /** 下拉选择器 */
394
+ 'select': WithCommon<{
395
+ slots?: SelectSlots;
396
+ } & SelectProps, D>;
397
+ /** 级联选择器 */
398
+ 'cascader': WithCommon<{
399
+ slots?: CascaderSlots;
400
+ } & CascaderProps, D>;
401
+ /** 日期选择器 */
402
+ 'date-picker': WithCommon<{
403
+ slots?: DatePickerSlots;
404
+ } & DatePickerProps, D>;
405
+ /** 日期选择器-范围 */
406
+ 'range-picker': WithCommon<{
407
+ slots?: RangePickerSlots;
408
+ } & RangePickerProps, D>;
409
+ /** 时间选择器 */
410
+ 'time-picker': WithCommon<{
411
+ slots?: TimePickerSlots;
412
+ } & TimePickerProps, D>;
413
+ /** 复选框组 */
414
+ 'checkbox-group': WithCommon<CheckboxGroupProps, D>;
415
+ /** 单选框组 */
416
+ 'radio-group': WithCommon<RadioGroupProps, D>;
417
+ /** 开关 */
418
+ 'switch': WithCommon<{
419
+ slots?: SwitchSlots;
420
+ } & SwitchProps, D>;
421
+ /** 滑块 */
422
+ 'slider': WithCommon<{
423
+ slots?: SliderSlots;
424
+ } & SliderProps, D>;
425
+ /** 树形选择器 */
426
+ 'tree-select': WithCommon<{
427
+ slots?: TreeSelectSlots;
428
+ } & TreeSelectProps, D>;
429
+ /** 穿梭框 */
430
+ 'transfer': WithCommon<{
431
+ slots?: TransferSlots;
432
+ } & TransferProps, D>;
433
+ /** 自定义组件 */
434
+ 'custom': {
435
+ component?: RenderComponentType | Raw<RenderComponentType>;
436
+ } & WithCommon<{
437
+ slots?: Slots;
438
+ } & Record<string, any>, D>;
439
+ };
440
+
454
441
  declare type FindBy<D extends Data> = (field: Readonly<Field<D>>) => boolean;
455
442
 
456
443
  declare type FindBy_2<D extends Data> = (column: Readonly<Column<D>>) => boolean;
@@ -502,7 +489,7 @@ declare type MaybeRefOrComputedRef<T = any> = MaybeRef<T> | ComputedRef<T>;
502
489
  /**
503
490
  * @description 不支持响应式的属性名
504
491
  */
505
- declare type NotSupportedRefOrGetterProps = 'container' | 'componentContainer' | 'valueFormatter' | 'fields' | 'slots' | 'modelName';
492
+ declare type NotSupportedRefOrGetterProps = 'component' | 'container' | 'componentContainer' | 'valueFormatter' | 'fields' | 'slots' | 'modelName';
506
493
 
507
494
  declare type Option_2 = {
508
495
  label: string;
@@ -969,6 +956,8 @@ export declare type WithAdditionalMethodsGetter<T> = T & {
969
956
  }>;
970
957
  };
971
958
 
959
+ declare type WithCommon<T, D extends Data = Data> = WithRef<T & Omit<FormItemProps, 'label'> & ColProps & Base<D>>;
960
+
972
961
  /**
973
962
  * @description 为对象属性添加响应式支持的类型
974
963
  * @template T - 原始类型
package/es/table/index.js CHANGED
@@ -299,6 +299,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
299
299
  },
300
300
  setup(__props) {
301
301
  const props = __props;
302
+ const open = ref(false);
302
303
  const checkAll = ref(false);
303
304
  const indeterminate = ref(false);
304
305
  const checkedColumnsOptions = computed(
@@ -349,6 +350,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
349
350
  );
350
351
  return (_ctx, _cache) => {
351
352
  return openBlock(), createBlock(unref(Dropdown), {
353
+ open: open.value,
354
+ "onUpdate:open": _cache[1] || (_cache[1] = ($event) => open.value = $event),
352
355
  arrow: "",
353
356
  placement: "bottomRight"
354
357
  }, {
@@ -367,11 +370,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
367
370
  indeterminate: indeterminate.value,
368
371
  onChange: onCheckAllChange
369
372
  }, {
370
- default: withCtx(() => _cache[1] || (_cache[1] = [
373
+ default: withCtx(() => _cache[2] || (_cache[2] = [
371
374
  createTextVNode(" 全选 ", -1)
372
375
  ])),
373
376
  _: 1,
374
- __: [1]
377
+ __: [2]
375
378
  }, 8, ["checked", "indeterminate"])
376
379
  ])
377
380
  ]),
@@ -410,11 +413,11 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
410
413
  ])
411
414
  ]),
412
415
  _: 1
413
- });
416
+ }, 8, ["open"]);
414
417
  };
415
418
  }
416
419
  });
417
- const ColumnControl = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-88c80679"]]);
420
+ const ColumnControl = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f75da747"]]);
418
421
  const _hoisted_1 = { class: "pro-table-header" };
419
422
  const _hoisted_2 = {
420
423
  key: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/antd-vue-pro",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "module": "es/index.js",