@wyfex/ivue 0.16.0 → 0.18.0

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.
@@ -0,0 +1,9 @@
1
+ import { Emits, Props } from './types';
2
+ export declare const useElCheckbox: (props: Props, emits: Emits) => {
3
+ dataComputed: import('vue').ComputedRef<any>;
4
+ checkedItems: import('vue').WritableComputedRef<unknown[], any>;
5
+ isIndeterminate: import('vue').Ref<boolean, boolean>;
6
+ checkAll: import('vue').Ref<boolean, boolean>;
7
+ handleCheckAllChange: (bool: boolean) => void;
8
+ handleCheckedItemsChange: (list: any[]) => void;
9
+ };
@@ -0,0 +1,64 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ modelValue: {
3
+ type: (ArrayConstructor | StringConstructor)[];
4
+ default: () => never[];
5
+ };
6
+ data: any;
7
+ defaultProps: {
8
+ type: ObjectConstructor;
9
+ default: () => {
10
+ label: string;
11
+ value: string;
12
+ };
13
+ };
14
+ showCheckAll: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ vertical: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ toJoin: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
27
+ "update:modelValue": (value: string | number | (string | number)[]) => any;
28
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
29
+ modelValue: {
30
+ type: (ArrayConstructor | StringConstructor)[];
31
+ default: () => never[];
32
+ };
33
+ data: any;
34
+ defaultProps: {
35
+ type: ObjectConstructor;
36
+ default: () => {
37
+ label: string;
38
+ value: string;
39
+ };
40
+ };
41
+ showCheckAll: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ vertical: {
46
+ type: BooleanConstructor;
47
+ default: boolean;
48
+ };
49
+ toJoin: {
50
+ type: BooleanConstructor;
51
+ default: boolean;
52
+ };
53
+ }>> & Readonly<{
54
+ "onUpdate:modelValue"?: ((value: string | number | (string | number)[]) => any) | undefined;
55
+ }>, {
56
+ data: any;
57
+ toJoin: boolean;
58
+ modelValue: string | unknown[];
59
+ defaultProps: Record<string, any>;
60
+ showCheckAll: boolean;
61
+ vertical: boolean;
62
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
63
+ declare const _default: typeof __VLS_export;
64
+ export default _default;
@@ -0,0 +1,27 @@
1
+ declare const _default: {
2
+ modelValue: {
3
+ type: (ArrayConstructor | StringConstructor)[];
4
+ default: () => never[];
5
+ };
6
+ data: any;
7
+ defaultProps: {
8
+ type: ObjectConstructor;
9
+ default: () => {
10
+ label: string;
11
+ value: string;
12
+ };
13
+ };
14
+ showCheckAll: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ vertical: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ toJoin: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ };
27
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ import { default as componentProps } from './props';
3
+ export type Props = ExtractPropTypes<typeof componentProps>;
4
+ export interface Emits {
5
+ (e: 'update:modelValue', value: string | number | (string | number)[]): void;
6
+ }
@@ -1,6 +1,6 @@
1
1
  declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
2
  formColumns: {
3
- type: import('vue').PropType<import('../types.js').FormColumn[]>;
3
+ type: import('vue').PropType<import('../types').FormColumn[]>;
4
4
  required: boolean;
5
5
  };
6
6
  formModel: {
@@ -8,15 +8,15 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
8
8
  required: boolean;
9
9
  };
10
10
  useRender: {
11
- type: import('vue').PropType<boolean | import('../../../types/index.js').RenderConfig>;
11
+ type: import('vue').PropType<boolean | import('../../../types').RenderConfig>;
12
12
  default: boolean;
13
13
  };
14
14
  dictMap: {
15
- type: import('vue').PropType<import('../../../types/index.js').DictMap>;
15
+ type: import('vue').PropType<import('../../../types').DictMap>;
16
16
  default: () => {};
17
17
  };
18
18
  dictProps: {
19
- type: import('vue').PropType<import('../../../types/index.js').DictProps>;
19
+ type: import('vue').PropType<import('../../../types').DictProps>;
20
20
  default: () => {};
21
21
  };
22
22
  formItemWidth: {
@@ -50,18 +50,17 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
50
50
  default: boolean;
51
51
  };
52
52
  queryConfig: {
53
- type: import('vue').PropType<import('../types.js').QueryConfig>;
53
+ type: import('vue').PropType<import('../types').QueryConfig>;
54
54
  default: () => {};
55
55
  };
56
56
  }>, {
57
57
  efRef: import('vue').Ref<null, null>;
58
- cascaderRef: import('vue').Ref<null, null>;
59
58
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
60
59
  onDictKeys: (value?: string[] | undefined) => any;
61
60
  "update:formModel": (value: Record<string, any>) => any;
62
61
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
63
62
  formColumns: {
64
- type: import('vue').PropType<import('../types.js').FormColumn[]>;
63
+ type: import('vue').PropType<import('../types').FormColumn[]>;
65
64
  required: boolean;
66
65
  };
67
66
  formModel: {
@@ -69,15 +68,15 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
69
68
  required: boolean;
70
69
  };
71
70
  useRender: {
72
- type: import('vue').PropType<boolean | import('../../../types/index.js').RenderConfig>;
71
+ type: import('vue').PropType<boolean | import('../../../types').RenderConfig>;
73
72
  default: boolean;
74
73
  };
75
74
  dictMap: {
76
- type: import('vue').PropType<import('../../../types/index.js').DictMap>;
75
+ type: import('vue').PropType<import('../../../types').DictMap>;
77
76
  default: () => {};
78
77
  };
79
78
  dictProps: {
80
- type: import('vue').PropType<import('../../../types/index.js').DictProps>;
79
+ type: import('vue').PropType<import('../../../types').DictProps>;
81
80
  default: () => {};
82
81
  };
83
82
  formItemWidth: {
@@ -111,16 +110,16 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
111
110
  default: boolean;
112
111
  };
113
112
  queryConfig: {
114
- type: import('vue').PropType<import('../types.js').QueryConfig>;
113
+ type: import('vue').PropType<import('../types').QueryConfig>;
115
114
  default: () => {};
116
115
  };
117
116
  }>> & Readonly<{
118
117
  onOnDictKeys?: ((value?: string[] | undefined) => any) | undefined;
119
118
  "onUpdate:formModel"?: ((value: Record<string, any>) => any) | undefined;
120
119
  }>, {
121
- dictMap: import('../../../types/index.js').DictMap;
122
- dictProps: import('../../../types/index.js').DictProps;
123
- useRender: boolean | import('../../../types/index.js').RenderConfig;
120
+ dictMap: import('../../../types').DictMap;
121
+ dictProps: import('../../../types').DictProps;
122
+ useRender: boolean | import('../../../types').RenderConfig;
124
123
  formItemWidth: string;
125
124
  labelSuffix: string;
126
125
  labelWidth: string;
@@ -128,7 +127,7 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
128
127
  rowGutter: number;
129
128
  colSpan: number;
130
129
  disabled: boolean;
131
- queryConfig: import('../types.js').QueryConfig;
130
+ queryConfig: import('../types').QueryConfig;
132
131
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
133
132
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
134
133
  declare const _default: typeof __VLS_export;
@@ -1,6 +1,6 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { Emits, FormColumn, Props } from './types';
3
- import { GlobalConfig } from '../../types';
2
+ import { Emits, FormColumn, Props } from '../types';
3
+ import { GlobalConfig } from '../../../types';
4
4
  export declare const useElForm: ({ props, emits, globalConfig }: {
5
5
  props: Props;
6
6
  emits: Emits;
@@ -21,11 +21,11 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
21
21
  validator: (val: string) => boolean;
22
22
  };
23
23
  dictMap: {
24
- type: import('vue').PropType<import('../../types/index.ts').DictMap>;
24
+ type: import('vue').PropType<import('../../types').DictMap>;
25
25
  default: () => {};
26
26
  };
27
27
  dictProps: {
28
- type: import('vue').PropType<import('../../types/index.ts').DictProps>;
28
+ type: import('vue').PropType<import('../../types').DictProps>;
29
29
  default: () => {};
30
30
  };
31
31
  showOverflowTooltip: {
@@ -74,11 +74,11 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
74
74
  validator: (val: string) => boolean;
75
75
  };
76
76
  dictMap: {
77
- type: import('vue').PropType<import('../../types/index.ts').DictMap>;
77
+ type: import('vue').PropType<import('../../types').DictMap>;
78
78
  default: () => {};
79
79
  };
80
80
  dictProps: {
81
- type: import('vue').PropType<import('../../types/index.ts').DictProps>;
81
+ type: import('vue').PropType<import('../../types').DictProps>;
82
82
  default: () => {};
83
83
  };
84
84
  showOverflowTooltip: {
@@ -106,8 +106,8 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
106
106
  tableHeight: string;
107
107
  tableLoading: boolean;
108
108
  tableColumnAlign: string;
109
- dictMap: import('../../types/index.ts').DictMap;
110
- dictProps: import('../../types/index.ts').DictProps;
109
+ dictMap: import('../../types').DictMap;
110
+ dictProps: import('../../types').DictProps;
111
111
  showOverflowTooltip: boolean;
112
112
  headerCellStyle: Record<string, string>;
113
113
  extConfig: import('./types').ExtConfig;
@@ -30,12 +30,12 @@ export interface TableColumnExtConfig {
30
30
  formatter?: Function;
31
31
  class?: string | string[];
32
32
  style?: string | Record<string, unknown>;
33
+ slot?: boolean | string;
33
34
  }
34
35
  export interface TableColumn {
35
36
  label?: string;
36
37
  prop?: string;
37
38
  useDict?: boolean | string | UseDict;
38
- slot?: boolean | string;
39
39
  width?: string | number;
40
40
  minWidth?: string | number;
41
41
  show?: boolean;
@@ -0,0 +1,41 @@
1
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ content: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ placement: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ validator: (value: string) => boolean;
10
+ };
11
+ spanClass: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
+ content: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ placement: {
21
+ type: StringConstructor;
22
+ default: string;
23
+ validator: (value: string) => boolean;
24
+ };
25
+ spanClass: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ }>> & Readonly<{}>, {
30
+ content: string;
31
+ placement: string;
32
+ spanClass: string;
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
34
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
35
+ declare const _default: typeof __VLS_export;
36
+ export default _default;
37
+ type __VLS_WithSlots<T, S> = T & {
38
+ new (): {
39
+ $slots: S;
40
+ };
41
+ };
@@ -0,0 +1,16 @@
1
+ declare const _default: {
2
+ content: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ placement: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ validator: (value: string) => boolean;
10
+ };
11
+ spanClass: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ };
16
+ export default _default;
@@ -1,5 +1,6 @@
1
1
  export { default as UseCrudTable } from './UseCrudTable/index.vue';
2
2
  export { default as UseElButton } from './UseElButton/index.vue';
3
+ export { default as UseElCheckbox } from './UseElCheckbox/index.vue';
3
4
  export { default as UseElConfigProvider } from './UseElConfigProvider/index.vue';
4
5
  export { default as UseElDatePicker } from './UseElDatePicker/index.vue';
5
6
  export { default as UseElDescriptions } from './UseElDescriptions/index.vue';
@@ -10,6 +11,7 @@ export { default as UseElInput } from './UseElInput/index.vue';
10
11
  export { default as UseElSelect } from './UseElSelect/index.vue';
11
12
  export { default as UseElSwitch } from './UseElSwitch/index.vue';
12
13
  export { default as UseElTable } from './UseElTable/index.vue';
14
+ export { default as UseElTooltip } from './UseElTooltip/index.vue';
13
15
  export { default as UseIconfont } from './UseIconfont/index.vue';
14
16
  export { default as UseLineTitle } from './UseLineTitle/index.vue';
15
17
  export { default as UseRender } from './UseRender/index.vue';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyfex/ivue",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "万有前端 X 体系下基于 Vite8 + Vue3 + Typescript6 + ElementPlus2 构建的 iVue 组件库",
5
5
  "homepage": "https://wyfe.top/idocs/ivue",
6
6
  "type": "module",
@@ -53,16 +53,17 @@
53
53
  "@types/node": "^26.0.1",
54
54
  "@vitejs/plugin-vue": "^6.0.7",
55
55
  "@vue/tsconfig": "^0.9.1",
56
- "@wyfex/iutils": "file:D:/20260516/wyfex/wyfex-iutils/wyfex-iutils-0.35.0.tgz",
56
+ "@wyfex/iutils": "^0.40.0",
57
+ "dayjs": "^1.11.21",
57
58
  "element-plus": "^2.14.2",
58
59
  "sass-embedded": "^1.100.0",
59
60
  "typescript": "~6.0.3",
60
61
  "unplugin-auto-import": "^21.0.0",
61
62
  "unplugin-dts": "^1.0.3",
62
63
  "unplugin-vue-components": "^32.1.0",
63
- "vite": "^8.1.0",
64
+ "vite": "^8.1.2",
64
65
  "vite-svg-loader": "^5.1.1",
65
66
  "vue": "^3.5.39",
66
- "vue-tsc": "^3.3.5"
67
+ "vue-tsc": "^3.3.6"
67
68
  }
68
69
  }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * 组件props
3
+ */
4
+ export default {
5
+ /**
6
+ * 双向绑定数据源
7
+ */
8
+ modelValue: {
9
+ type: [Array, String],
10
+ default: () => []
11
+ },
12
+ /**
13
+ * 选项数据源
14
+ */
15
+ data: {
16
+ type: Array,
17
+ required: true
18
+ } as any,
19
+ /**
20
+ * 选项默认配置
21
+ */
22
+ defaultProps: {
23
+ type: Object,
24
+ default: () => ({ label: 'label', value: 'value' })
25
+ },
26
+ // 是否显示全选按钮
27
+ showCheckAll: {
28
+ type: Boolean,
29
+ default: false
30
+ },
31
+ /**
32
+ * 是否垂直布局
33
+ */
34
+ vertical: {
35
+ type: Boolean,
36
+ default: false
37
+ },
38
+ /**
39
+ * 是否字符串拼接
40
+ */
41
+ toJoin: {
42
+ type: Boolean,
43
+ default: false
44
+ }
45
+ }
@@ -0,0 +1,15 @@
1
+ import type { ExtractPropTypes } from 'vue'
2
+ import componentProps from './props'
3
+
4
+ /**
5
+ * props类型
6
+ */
7
+ export type Props = ExtractPropTypes<typeof componentProps>
8
+
9
+ /**
10
+ * emits接口
11
+ */
12
+ export interface Emits {
13
+ // 更新value值
14
+ (e: 'update:modelValue', value: string | number | (string | number)[]): void
15
+ }
@@ -35,7 +35,7 @@ export interface ExtConfig {
35
35
  */
36
36
  dictProps?: DictProps
37
37
  /**
38
- * 表格配置
38
+ * 表格配置项
39
39
  */
40
40
  table?: { bottomOffset: number; modalFooterHeight?: number }
41
41
  /**
@@ -67,6 +67,8 @@ export interface TableColumnExtConfig {
67
67
  class?: string | string[]
68
68
  // 样式
69
69
  style?: string | Record<string, unknown>
70
+ // 插槽 为true则在模板代码中添加`<template #prop="{ row }"></template>`即可,可传入string自定义具名插槽名称
71
+ slot?: boolean | string
70
72
  }
71
73
 
72
74
  /**
@@ -81,12 +83,6 @@ export interface TableColumn {
81
83
  * 如为string或dict.data为string则将dict或dict.data作为dictMap的key
82
84
  */
83
85
  useDict?: boolean | string | UseDict
84
- /**
85
- * 插槽
86
- * 为true则在模板代码中添加`<template #prop="{ row }"></template>`即可
87
- * 可传入string自定义具名插槽名称
88
- */
89
- slot?: boolean | string
90
86
  width?: string | number
91
87
  minWidth?: string | number
92
88
  show?: boolean
@@ -0,0 +1,41 @@
1
+ /**
2
+ * 组件props
3
+ */
4
+ export default {
5
+ /**
6
+ * 显示的内容 也可被 slot#content 覆盖
7
+ */
8
+ content: {
9
+ type: String,
10
+ default: ''
11
+ },
12
+ /**
13
+ * Tooltip组件出现的位置 默认top
14
+ */
15
+ placement: {
16
+ type: String,
17
+ default: 'top',
18
+ validator: (value: string) =>
19
+ [
20
+ 'top',
21
+ 'top-start',
22
+ 'top-end',
23
+ 'bottom',
24
+ 'bottom-start',
25
+ 'bottom-end',
26
+ 'left',
27
+ 'left-start',
28
+ 'left-end',
29
+ 'right',
30
+ 'right-start',
31
+ 'right-end'
32
+ ].includes(value)
33
+ },
34
+ /**
35
+ * span元素的类名
36
+ */
37
+ spanClass: {
38
+ type: String,
39
+ default: ''
40
+ }
41
+ }