@wyfex/ivue 0.16.0 → 0.17.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
+ }
@@ -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;
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wyfex/ivue",
3
- "version": "0.16.0",
3
+ "version": "0.17.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,16 @@
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
57
  "element-plus": "^2.14.2",
58
58
  "sass-embedded": "^1.100.0",
59
59
  "typescript": "~6.0.3",
60
60
  "unplugin-auto-import": "^21.0.0",
61
61
  "unplugin-dts": "^1.0.3",
62
62
  "unplugin-vue-components": "^32.1.0",
63
- "vite": "^8.1.0",
63
+ "vite": "^8.1.2",
64
64
  "vite-svg-loader": "^5.1.1",
65
65
  "vue": "^3.5.39",
66
- "vue-tsc": "^3.3.5"
66
+ "vue-tsc": "^3.3.6"
67
67
  }
68
68
  }
@@ -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
+ }
@@ -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