@vrojs/element-plus 0.0.6 → 0.0.8

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.
Files changed (190) hide show
  1. package/dist/index.d.ts +5 -0
  2. package/dist/index.js +125 -83
  3. package/dist/locale/index.js +6 -7
  4. package/dist/locale/lang/en.d.ts +8 -0
  5. package/dist/locale/lang/en.js +8 -0
  6. package/dist/locale/lang/zh-cn.d.ts +8 -0
  7. package/dist/locale/lang/zh-cn.js +8 -0
  8. package/dist/locale/useLocale.d.ts +1 -48
  9. package/dist/locale/useLocale.js +16 -17
  10. package/dist/style/deps.js +7 -0
  11. package/dist/style/index.css +1 -1
  12. package/dist/style/index.js +7 -0
  13. package/dist/utils/elTableColumnProps.d.ts +149 -0
  14. package/dist/utils/elTableColumnProps.js +152 -0
  15. package/dist/utils/index.d.ts +1 -0
  16. package/dist/utils/index.js +4 -2
  17. package/dist/vro-el-checkbox-group/index.d.ts +1 -1
  18. package/dist/vro-el-checkbox-group/vro-el-checkbox-group.vue.d.ts +1 -1
  19. package/dist/vro-el-checkbox-group/vro-el-checkbox-group.vue.js +10 -10
  20. package/dist/vro-el-config-provider/config.d.ts +14 -0
  21. package/dist/vro-el-config-provider/config.js +36 -0
  22. package/dist/vro-el-config-provider/index.d.ts +16 -0
  23. package/dist/vro-el-config-provider/index.js +8 -2
  24. package/dist/vro-el-config-provider/types.d.ts +7 -0
  25. package/dist/vro-el-config-provider/types.js +7 -0
  26. package/dist/vro-el-config-provider/vro-el-config-provider.vue.d.ts +9 -0
  27. package/dist/vro-el-config-provider/vro-el-config-provider.vue.js +11 -11
  28. package/dist/vro-el-file-upload/index.d.ts +6 -6
  29. package/dist/vro-el-file-upload/style/index.css +1 -1
  30. package/dist/vro-el-file-upload/types.d.ts +9 -2
  31. package/dist/vro-el-file-upload/vro-el-file-upload.vue.d.ts +7 -6
  32. package/dist/vro-el-file-upload/vro-el-file-upload.vue.js +55 -51
  33. package/dist/vro-el-icon/index.d.ts +28 -40
  34. package/dist/vro-el-icon/style/css.js +1 -0
  35. package/dist/vro-el-icon/style/deps.js +1 -1
  36. package/dist/vro-el-icon/style/index.js +1 -1
  37. package/dist/vro-el-icon/types.d.ts +16 -13
  38. package/dist/vro-el-icon/types.js +8 -1
  39. package/dist/vro-el-icon/vro-el-icon.vue.d.ts +18 -27
  40. package/dist/vro-el-icon/vro-el-icon.vue.js +27 -23
  41. package/dist/vro-el-image/index.d.ts +10 -4
  42. package/dist/vro-el-image/style/css.js +4 -0
  43. package/dist/vro-el-image/style/index.css +1 -0
  44. package/dist/vro-el-image/style/index.js +4 -0
  45. package/dist/vro-el-image/types.d.ts +35 -0
  46. package/dist/vro-el-image/types.js +24 -1
  47. package/dist/vro-el-image/utils.d.ts +1 -1
  48. package/dist/vro-el-image/vro-el-image.vue.d.ts +7 -2
  49. package/dist/vro-el-image/vro-el-image.vue.js +55 -24
  50. package/dist/vro-el-image-upload/index.d.ts +1 -1
  51. package/dist/vro-el-image-upload/style/css.js +4 -0
  52. package/dist/vro-el-image-upload/style/index.css +1 -1
  53. package/dist/vro-el-image-upload/style/index.js +4 -0
  54. package/dist/vro-el-image-upload/types.d.ts +24 -7
  55. package/dist/vro-el-image-upload/types.js +21 -7
  56. package/dist/vro-el-image-upload/vro-el-image-upload.vue.d.ts +1 -1
  57. package/dist/vro-el-image-upload/vro-el-image-upload.vue.js +82 -68
  58. package/dist/vro-el-radio-group/index.d.ts +1 -1
  59. package/dist/vro-el-radio-group/vro-el-radio-group.vue.d.ts +1 -1
  60. package/dist/vro-el-radio-group/vro-el-radio-group.vue.js +12 -12
  61. package/dist/vro-el-schema-filter/index.d.ts +27 -31
  62. package/dist/vro-el-schema-filter/style/css.js +5 -0
  63. package/dist/vro-el-schema-filter/style/index.css +1 -1
  64. package/dist/vro-el-schema-filter/style/index.js +5 -0
  65. package/dist/vro-el-schema-filter/types.d.ts +17 -0
  66. package/dist/vro-el-schema-filter/vro-el-schema-filter.vue.d.ts +38 -43
  67. package/dist/vro-el-schema-filter/vro-el-schema-filter.vue.js +63 -44
  68. package/dist/vro-el-schema-form/index.d.ts +16 -18
  69. package/dist/vro-el-schema-form/style/css.js +5 -0
  70. package/dist/vro-el-schema-form/style/index.css +1 -1
  71. package/dist/vro-el-schema-form/style/index.js +5 -0
  72. package/dist/vro-el-schema-form/types.d.ts +65 -7
  73. package/dist/vro-el-schema-form/useVroElSchemaForm.d.ts +33 -37
  74. package/dist/vro-el-schema-form/useVroElSchemaForm.js +13 -13
  75. package/dist/vro-el-schema-form/vro-el-schema-form.vue.d.ts +11 -13
  76. package/dist/vro-el-schema-form/vro-el-schema-form.vue.js +79 -79
  77. package/dist/vro-el-schema-form-dialog/function-call.js +10 -7
  78. package/dist/vro-el-schema-form-dialog/index.d.ts +111 -142
  79. package/dist/vro-el-schema-form-dialog/style/css.js +5 -0
  80. package/dist/vro-el-schema-form-dialog/style/index.css +1 -1
  81. package/dist/vro-el-schema-form-dialog/style/index.js +5 -0
  82. package/dist/vro-el-schema-form-dialog/types.d.ts +25 -16
  83. package/dist/vro-el-schema-form-dialog/types.js +6 -11
  84. package/dist/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue.d.ts +92 -113
  85. package/dist/vro-el-schema-form-dialog/vro-el-schema-form-dialog.vue.js +83 -87
  86. package/dist/vro-el-schema-form-drawer/function-call.d.ts +4 -0
  87. package/dist/vro-el-schema-form-drawer/function-call.js +20 -0
  88. package/dist/vro-el-schema-form-drawer/index.d.ts +2207 -0
  89. package/dist/vro-el-schema-form-drawer/index.js +16 -0
  90. package/dist/vro-el-schema-form-drawer/injection.d.ts +9 -0
  91. package/dist/vro-el-schema-form-drawer/injection.js +9 -0
  92. package/dist/vro-el-schema-form-drawer/style/css.d.ts +0 -0
  93. package/dist/vro-el-schema-form-drawer/style/css.js +24 -0
  94. package/dist/vro-el-schema-form-drawer/style/deps.d.ts +0 -0
  95. package/dist/vro-el-schema-form-drawer/style/deps.js +24 -0
  96. package/dist/vro-el-schema-form-drawer/style/index.css +1 -0
  97. package/dist/vro-el-schema-form-drawer/style/index.d.ts +0 -0
  98. package/dist/vro-el-schema-form-drawer/style/index.js +48 -0
  99. package/dist/vro-el-schema-form-drawer/types.d.ts +110 -0
  100. package/dist/vro-el-schema-form-drawer/types.js +75 -0
  101. package/dist/vro-el-schema-form-drawer/useVroElSchemaFormDrawer.d.ts +14 -0
  102. package/dist/vro-el-schema-form-drawer/useVroElSchemaFormDrawer.js +18 -0
  103. package/dist/vro-el-schema-form-drawer/vro-el-schema-form-drawer.vue.d.ts +1832 -0
  104. package/dist/vro-el-schema-form-drawer/vro-el-schema-form-drawer.vue.js +134 -0
  105. package/dist/vro-el-schema-form-drawer/vro-el-schema-form-drawer.vue2.js +4 -0
  106. package/dist/vro-el-select/index.d.ts +11 -11
  107. package/dist/vro-el-select/vro-el-select.vue.d.ts +11 -11
  108. package/dist/vro-el-select/vro-el-select.vue.js +11 -11
  109. package/dist/vro-el-skeleton/index.d.ts +9 -73
  110. package/dist/vro-el-skeleton/style/index.css +1 -1
  111. package/dist/vro-el-skeleton/types.d.ts +32 -24
  112. package/dist/vro-el-skeleton/types.js +3 -23
  113. package/dist/vro-el-skeleton/vro-el-skeleton.vue.d.ts +7 -48
  114. package/dist/vro-el-skeleton/vro-el-skeleton.vue.js +48 -46
  115. package/dist/vro-el-table/createUseVroElTable.d.ts +9 -0
  116. package/dist/vro-el-table/createUseVroElTable.js +7 -0
  117. package/dist/vro-el-table/index.js +13 -0
  118. package/dist/vro-el-table/style/css.d.ts +0 -0
  119. package/dist/vro-el-table/style/css.js +29 -0
  120. package/dist/vro-el-table/style/deps.d.ts +0 -0
  121. package/dist/vro-el-table/style/deps.js +28 -0
  122. package/dist/vro-el-table/style/index.css +1 -0
  123. package/dist/vro-el-table/style/index.d.ts +0 -0
  124. package/dist/vro-el-table/style/index.js +57 -0
  125. package/dist/vro-el-table/types.d.ts +97 -0
  126. package/dist/vro-el-table/types.js +66 -0
  127. package/dist/vro-el-table/useVroElTable.d.ts +43 -0
  128. package/dist/vro-el-table/useVroElTable.js +47 -0
  129. package/dist/vro-el-table/vro-el-table.vue.js +94 -0
  130. package/dist/vro-el-table/vro-el-table.vue2.js +4 -0
  131. package/dist/vro-el-table-actions-column/index.d.ts +269 -0
  132. package/dist/vro-el-table-actions-column/index.js +9 -0
  133. package/dist/vro-el-table-actions-column/style/css.d.ts +0 -0
  134. package/dist/vro-el-table-actions-column/style/css.js +4 -0
  135. package/dist/vro-el-table-actions-column/style/deps.d.ts +0 -0
  136. package/dist/vro-el-table-actions-column/style/deps.js +5 -0
  137. package/dist/vro-el-table-actions-column/style/index.css +1 -0
  138. package/dist/vro-el-table-actions-column/style/index.d.ts +0 -0
  139. package/dist/vro-el-table-actions-column/style/index.js +9 -0
  140. package/dist/vro-el-table-actions-column/types.d.ts +139 -0
  141. package/dist/vro-el-table-actions-column/types.js +37 -0
  142. package/dist/vro-el-table-actions-column/vro-el-table-actions-column.vue.d.ts +167 -0
  143. package/dist/vro-el-table-actions-column/vro-el-table-actions-column.vue.js +101 -0
  144. package/dist/vro-el-table-actions-column/vro-el-table-actions-column.vue2.js +4 -0
  145. package/dist/vro-el-table-column/index.d.ts +257 -0
  146. package/dist/vro-el-table-column/index.js +9 -0
  147. package/dist/vro-el-table-column/style/css.d.ts +0 -0
  148. package/dist/vro-el-table-column/style/css.js +6 -0
  149. package/dist/vro-el-table-column/style/deps.d.ts +0 -0
  150. package/dist/vro-el-table-column/style/deps.js +1 -0
  151. package/dist/vro-el-table-column/style/index.css +1 -0
  152. package/dist/vro-el-table-column/style/index.d.ts +0 -0
  153. package/dist/vro-el-table-column/style/index.js +7 -0
  154. package/dist/vro-el-table-column/types.d.ts +141 -0
  155. package/dist/vro-el-table-column/types.js +43 -0
  156. package/dist/vro-el-table-column/vro-el-table-column.vue.d.ts +161 -0
  157. package/dist/vro-el-table-column/vro-el-table-column.vue.js +66 -0
  158. package/dist/vro-el-table-column/vro-el-table-column.vue2.js +4 -0
  159. package/dist/vro-el-table-column-group/index.d.ts +23 -0
  160. package/dist/vro-el-table-column-group/index.js +13 -0
  161. package/dist/vro-el-table-column-group/style/css.d.ts +0 -0
  162. package/dist/vro-el-table-column-group/style/css.js +9 -0
  163. package/dist/vro-el-table-column-group/style/deps.d.ts +0 -0
  164. package/dist/vro-el-table-column-group/style/deps.js +5 -0
  165. package/dist/vro-el-table-column-group/style/index.d.ts +0 -0
  166. package/dist/vro-el-table-column-group/style/index.js +14 -0
  167. package/dist/vro-el-table-column-group/types.d.ts +87 -0
  168. package/dist/vro-el-table-column-group/types.js +12 -0
  169. package/dist/vro-el-table-column-group/useVroElTableColumnGroup.d.ts +2 -0
  170. package/dist/vro-el-table-column-group/useVroElTableColumnGroup.js +10 -0
  171. package/dist/vro-el-table-column-group/vro-el-table-column-group.vue.d.ts +14 -0
  172. package/dist/vro-el-table-column-group/vro-el-table-column-group.vue.js +29 -0
  173. package/dist/vro-el-table-column-group/vro-el-table-column-group.vue2.js +4 -0
  174. package/dist/vro-el-table-column-group/vroElTableColumnGroupColumnManager.d.ts +2 -0
  175. package/dist/vro-el-table-column-group/vroElTableColumnGroupColumnManager.js +9 -0
  176. package/dist/vro-el-tags/index.d.ts +234 -187
  177. package/dist/vro-el-tags/style/css.js +1 -0
  178. package/dist/vro-el-tags/style/index.css +1 -0
  179. package/dist/vro-el-tags/style/index.js +1 -0
  180. package/dist/vro-el-tags/types.d.ts +37 -1
  181. package/dist/vro-el-tags/types.js +17 -1
  182. package/dist/vro-el-tags/vro-el-tags.vue.d.ts +219 -8
  183. package/dist/vro-el-tags/vro-el-tags.vue.js +55 -45
  184. package/dist/vro-el-tree/index.d.ts +3235 -32
  185. package/dist/vro-el-tree/style/index.css +1 -1
  186. package/dist/vro-el-tree/types.d.ts +124 -5
  187. package/dist/vro-el-tree/types.js +12 -6
  188. package/dist/vro-el-tree/vro-el-tree.vue.d.ts +6020 -20
  189. package/dist/vro-el-tree/vro-el-tree.vue.js +54 -36
  190. package/package.json +10 -12
@@ -0,0 +1,149 @@
1
+ import { TableColumnCtx } from 'element-plus';
2
+ import { PropType } from 'vue';
3
+ export declare const elTableColumnProps: {
4
+ /**
5
+ * 列类型。
6
+ */
7
+ type: {
8
+ type: PropType<"default" | "selection" | "index" | "expand">;
9
+ default: string;
10
+ };
11
+ /**
12
+ * 列标题。
13
+ */
14
+ label: StringConstructor;
15
+ /**
16
+ * 单元格类名。
17
+ */
18
+ className: StringConstructor;
19
+ /**
20
+ * 表头类名。
21
+ */
22
+ labelClassName: StringConstructor;
23
+ /**
24
+ * 字段名。
25
+ */
26
+ property: StringConstructor;
27
+ /**
28
+ * 字段名,property 的别名。
29
+ */
30
+ prop: StringConstructor;
31
+ /**
32
+ * 列宽度。
33
+ */
34
+ width: {
35
+ type: (NumberConstructor | StringConstructor)[];
36
+ default: string;
37
+ };
38
+ /**
39
+ * 列最小宽度。
40
+ */
41
+ minWidth: {
42
+ type: (NumberConstructor | StringConstructor)[];
43
+ default: string;
44
+ };
45
+ /**
46
+ * 自定义表头渲染函数。
47
+ */
48
+ renderHeader: PropType<TableColumnCtx<any>["renderHeader"]>;
49
+ /**
50
+ * 是否可排序。
51
+ */
52
+ sortable: {
53
+ type: (BooleanConstructor | StringConstructor)[];
54
+ default: boolean;
55
+ };
56
+ /**
57
+ * 自定义排序方法。
58
+ */
59
+ sortMethod: PropType<TableColumnCtx<any>["sortMethod"]>;
60
+ /**
61
+ * 指定排序字段或排序函数。
62
+ */
63
+ sortBy: PropType<TableColumnCtx<any>["sortBy"]>;
64
+ /**
65
+ * 是否允许拖拽调整列宽。
66
+ */
67
+ resizable: {
68
+ type: BooleanConstructor;
69
+ default: boolean;
70
+ };
71
+ /**
72
+ * 列 key。
73
+ */
74
+ columnKey: StringConstructor;
75
+ /**
76
+ * 单元格对齐方式。
77
+ */
78
+ align: StringConstructor;
79
+ /**
80
+ * 表头对齐方式。
81
+ */
82
+ headerAlign: StringConstructor;
83
+ /**
84
+ * 内容溢出时是否显示 tooltip。
85
+ */
86
+ showOverflowTooltip: {
87
+ type: PropType<TableColumnCtx<any>["showOverflowTooltip"]>;
88
+ default: undefined;
89
+ };
90
+ /**
91
+ * tooltip 内容格式化函数。
92
+ */
93
+ tooltipFormatter: PropType<TableColumnCtx<any>["tooltipFormatter"]>;
94
+ /**
95
+ * 是否固定列。
96
+ */
97
+ fixed: (BooleanConstructor | StringConstructor)[];
98
+ /**
99
+ * 单元格格式化函数。
100
+ */
101
+ formatter: PropType<TableColumnCtx<any>["formatter"]>;
102
+ /**
103
+ * selection 列是否可选择。
104
+ */
105
+ selectable: PropType<TableColumnCtx<any>["selectable"]>;
106
+ /**
107
+ * 数据刷新后是否保留选中项。
108
+ */
109
+ reserveSelection: BooleanConstructor;
110
+ /**
111
+ * 筛选方法。
112
+ */
113
+ filterMethod: PropType<TableColumnCtx<any>["filterMethod"]>;
114
+ /**
115
+ * 已筛选值。
116
+ */
117
+ filteredValue: PropType<TableColumnCtx<any>["filteredValue"]>;
118
+ /**
119
+ * 筛选项。
120
+ */
121
+ filters: PropType<TableColumnCtx<any>["filters"]>;
122
+ /**
123
+ * 筛选弹层位置。
124
+ */
125
+ filterPlacement: StringConstructor;
126
+ /**
127
+ * 是否支持多选筛选。
128
+ */
129
+ filterMultiple: {
130
+ type: BooleanConstructor;
131
+ default: boolean;
132
+ };
133
+ /**
134
+ * 筛选弹层类名。
135
+ */
136
+ filterClassName: StringConstructor;
137
+ /**
138
+ * 自定义 index 列序号。
139
+ */
140
+ index: PropType<TableColumnCtx<any>["index"]>;
141
+ /**
142
+ * 排序策略轮转顺序。
143
+ */
144
+ sortOrders: {
145
+ type: PropType<TableColumnCtx<any>["sortOrders"]>;
146
+ default: () => (string | null)[];
147
+ validator: (val: TableColumnCtx<any>["sortOrders"]) => boolean;
148
+ };
149
+ };
@@ -0,0 +1,152 @@
1
+ const r = {
2
+ /**
3
+ * 列类型。
4
+ */
5
+ type: {
6
+ type: String,
7
+ default: "default"
8
+ },
9
+ /**
10
+ * 列标题。
11
+ */
12
+ label: String,
13
+ /**
14
+ * 单元格类名。
15
+ */
16
+ className: String,
17
+ /**
18
+ * 表头类名。
19
+ */
20
+ labelClassName: String,
21
+ /**
22
+ * 字段名。
23
+ */
24
+ property: String,
25
+ /**
26
+ * 字段名,property 的别名。
27
+ */
28
+ prop: String,
29
+ /**
30
+ * 列宽度。
31
+ */
32
+ width: {
33
+ type: [String, Number],
34
+ default: ""
35
+ },
36
+ /**
37
+ * 列最小宽度。
38
+ */
39
+ minWidth: {
40
+ type: [String, Number],
41
+ default: ""
42
+ },
43
+ /**
44
+ * 自定义表头渲染函数。
45
+ */
46
+ renderHeader: Function,
47
+ /**
48
+ * 是否可排序。
49
+ */
50
+ sortable: {
51
+ type: [Boolean, String],
52
+ default: !1
53
+ },
54
+ /**
55
+ * 自定义排序方法。
56
+ */
57
+ sortMethod: Function,
58
+ /**
59
+ * 指定排序字段或排序函数。
60
+ */
61
+ sortBy: [String, Function, Array],
62
+ /**
63
+ * 是否允许拖拽调整列宽。
64
+ */
65
+ resizable: {
66
+ type: Boolean,
67
+ default: !0
68
+ },
69
+ /**
70
+ * 列 key。
71
+ */
72
+ columnKey: String,
73
+ /**
74
+ * 单元格对齐方式。
75
+ */
76
+ align: String,
77
+ /**
78
+ * 表头对齐方式。
79
+ */
80
+ headerAlign: String,
81
+ /**
82
+ * 内容溢出时是否显示 tooltip。
83
+ */
84
+ showOverflowTooltip: {
85
+ type: [Boolean, Object],
86
+ default: void 0
87
+ },
88
+ /**
89
+ * tooltip 内容格式化函数。
90
+ */
91
+ tooltipFormatter: Function,
92
+ /**
93
+ * 是否固定列。
94
+ */
95
+ fixed: [Boolean, String],
96
+ /**
97
+ * 单元格格式化函数。
98
+ */
99
+ formatter: Function,
100
+ /**
101
+ * selection 列是否可选择。
102
+ */
103
+ selectable: Function,
104
+ /**
105
+ * 数据刷新后是否保留选中项。
106
+ */
107
+ reserveSelection: Boolean,
108
+ /**
109
+ * 筛选方法。
110
+ */
111
+ filterMethod: Function,
112
+ /**
113
+ * 已筛选值。
114
+ */
115
+ filteredValue: Array,
116
+ /**
117
+ * 筛选项。
118
+ */
119
+ filters: Array,
120
+ /**
121
+ * 筛选弹层位置。
122
+ */
123
+ filterPlacement: String,
124
+ /**
125
+ * 是否支持多选筛选。
126
+ */
127
+ filterMultiple: {
128
+ type: Boolean,
129
+ default: !0
130
+ },
131
+ /**
132
+ * 筛选弹层类名。
133
+ */
134
+ filterClassName: String,
135
+ /**
136
+ * 自定义 index 列序号。
137
+ */
138
+ index: [Number, Function],
139
+ /**
140
+ * 排序策略轮转顺序。
141
+ */
142
+ sortOrders: {
143
+ type: Array,
144
+ default: () => ["ascending", "descending", null],
145
+ validator: (e) => e.every(
146
+ (t) => ["ascending", "descending", null].includes(t)
147
+ )
148
+ }
149
+ };
150
+ export {
151
+ r as elTableColumnProps
152
+ };
@@ -1,2 +1,3 @@
1
1
  export * from './datePickerValueFormat';
2
+ export * from './elTableColumnProps';
2
3
  export { parseType } from '@vrojs/base';
@@ -1,6 +1,8 @@
1
1
  import { datePickerValueFormat as o } from "./datePickerValueFormat.js";
2
- import { parseType as p } from "@vrojs/base";
2
+ import { elTableColumnProps as a } from "./elTableColumnProps.js";
3
+ import { parseType as t } from "@vrojs/base";
3
4
  export {
4
5
  o as datePickerValueFormat,
5
- p as parseType
6
+ a as elTableColumnProps,
7
+ t as parseType
6
8
  };
@@ -106,8 +106,8 @@ export declare const VroElCheckboxGroup: import('@vrojs/base').WithInstall<impor
106
106
  label?: string;
107
107
  disabled?: string;
108
108
  };
109
- disabled: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
110
109
  modelValue: import('element-plus').CheckboxGroupValueType;
110
+ disabled: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
111
111
  labelKey: string;
112
112
  valueKey: string;
113
113
  tag: string;
@@ -105,8 +105,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
105
105
  label?: string;
106
106
  disabled?: string;
107
107
  };
108
- disabled: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
109
108
  modelValue: import('element-plus').CheckboxGroupValueType;
109
+ disabled: import('element-plus/es/utils/vue/props/types.mjs').EpPropMergeType<BooleanConstructor, unknown, unknown>;
110
110
  labelKey: string;
111
111
  valueKey: string;
112
112
  tag: string;
@@ -1,21 +1,21 @@
1
- import { defineComponent as d, computed as k, createBlock as t, openBlock as l, unref as u, mergeProps as p, withCtx as a, createElementBlock as f, Fragment as i, renderList as b, createTextVNode as g, toDisplayString as h } from "vue";
2
- import { pick as v } from "@daysnap/utils";
3
- import { checkboxGroupProps as C, ElCheckboxGroup as x, ElCheckbox as y } from "element-plus";
4
- import { vroElCheckboxGroupProps as E } from "./types.js";
5
- const K = /* @__PURE__ */ d({
1
+ import { defineComponent as d, computed as f, createBlock as t, openBlock as l, unref as u, mergeProps as p, withCtx as a, createElementBlock as k, Fragment as i, renderList as b, createTextVNode as g, toDisplayString as h } from "vue";
2
+ import { pick as v, typedKeys as C } from "@daysnap/utils";
3
+ import { checkboxGroupProps as x, ElCheckboxGroup as y, ElCheckbox as E } from "element-plus";
4
+ import { vroElCheckboxGroupProps as V } from "./types.js";
5
+ const $ = /* @__PURE__ */ d({
6
6
  name: "VroElCheckboxGroup",
7
7
  __name: "vro-el-checkbox-group",
8
- props: E,
8
+ props: V,
9
9
  emits: ["update:modelValue", "change"],
10
10
  setup(m) {
11
- const n = m, s = k(() => v(n, Object.keys(C)));
12
- return (r, o) => (l(), t(u(x), p(s.value, {
11
+ const n = m, s = f(() => v(n, C(x)));
12
+ return (r, o) => (l(), t(u(y), p(s.value, {
13
13
  class: "vro-el-checkbox-group",
14
14
  "onUpdate:modelValue": o[0] || (o[0] = (e) => r.$emit("update:modelValue", e)),
15
15
  onChange: o[1] || (o[1] = (e) => r.$emit("change", e))
16
16
  }), {
17
17
  default: a(() => [
18
- (l(!0), f(i, null, b(r.options, (e, c) => (l(), t(u(y), p({ ref_for: !0 }, e.props, {
18
+ (l(!0), k(i, null, b(r.options, (e, c) => (l(), t(u(E), p({ ref_for: !0 }, e.props, {
19
19
  key: c,
20
20
  value: e[r.valueKey || "value"] ?? e
21
21
  }), {
@@ -30,5 +30,5 @@ const K = /* @__PURE__ */ d({
30
30
  }
31
31
  });
32
32
  export {
33
- K as default
33
+ $ as default
34
34
  };
@@ -0,0 +1,14 @@
1
+ import { ComputedRef, InjectionKey, MaybeRef } from 'vue';
2
+ import { Locale } from '../locale/types';
3
+ import { VroElConfigProviderProps, VroElLocale } from './types';
4
+ export interface VroElConfig {
5
+ locale?: VroElLocale | Locale;
6
+ }
7
+ export interface VroElResolvedConfig {
8
+ locale: Locale;
9
+ }
10
+ export declare const vroElConfigContextKey: InjectionKey<ComputedRef<VroElResolvedConfig>>;
11
+ export declare function setVroElGlobalConfig(config?: VroElConfig): void;
12
+ export declare function useVroElGlobalConfig(): ComputedRef<VroElResolvedConfig>;
13
+ export declare function useVroElConfig(): ComputedRef<VroElResolvedConfig>;
14
+ export declare function provideVroElConfig(config: MaybeRef<VroElConfig>, options?: MaybeRef<Partial<Pick<VroElConfigProviderProps, 'global'>>>): ComputedRef<VroElResolvedConfig>;
@@ -0,0 +1,36 @@
1
+ import { merge as i } from "@daysnap/utils";
2
+ import { reactive as a, inject as f, computed as r, unref as e, provide as v, watchEffect as m } from "vue";
3
+ import s from "../locale/lang/zh-cn.js";
4
+ const t = Symbol("vroElConfigContextKey"), c = a({});
5
+ function p(o = {}) {
6
+ i(c, o);
7
+ }
8
+ function g() {
9
+ return r(
10
+ () => i({}, { locale: s }, c)
11
+ );
12
+ }
13
+ function V() {
14
+ const o = f(t, void 0), n = g();
15
+ return r(() => o?.value ?? n.value);
16
+ }
17
+ function x(o, n = {}) {
18
+ const u = f(t, void 0), C = g(), l = r(
19
+ () => i(
20
+ {},
21
+ C.value,
22
+ u?.value ?? {},
23
+ e(o)
24
+ )
25
+ );
26
+ return v(t, l), m(() => {
27
+ e(n).global && p(e(o));
28
+ }), l;
29
+ }
30
+ export {
31
+ x as provideVroElConfig,
32
+ p as setVroElGlobalConfig,
33
+ V as useVroElConfig,
34
+ g as useVroElGlobalConfig,
35
+ t as vroElConfigContextKey
36
+ };
@@ -1,11 +1,17 @@
1
+ export * from './config';
1
2
  export * from './types';
2
3
  export declare const VroElConfigProvider: import('@vrojs/base').WithInstall<{
3
4
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
5
+ global: {
6
+ type: BooleanConstructor;
7
+ default: boolean;
8
+ };
4
9
  locale: {
5
10
  type: import('vue').PropType<import('./types').VroElLocale>;
6
11
  default: () => {};
7
12
  };
8
13
  }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
14
+ global: boolean;
9
15
  locale: import('@vrojs/base').DeepPartial<import('..').Locale>;
10
16
  }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
11
17
  P: {};
@@ -15,22 +21,32 @@ export declare const VroElConfigProvider: import('@vrojs/base').WithInstall<{
15
21
  M: {};
16
22
  Defaults: {};
17
23
  }, Readonly<import('vue').ExtractPropTypes<{
24
+ global: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
18
28
  locale: {
19
29
  type: import('vue').PropType<import('./types').VroElLocale>;
20
30
  default: () => {};
21
31
  };
22
32
  }>> & Readonly<{}>, {}, {}, {}, {}, {
33
+ global: boolean;
23
34
  locale: import('@vrojs/base').DeepPartial<import('..').Locale>;
24
35
  }>;
25
36
  __isFragment?: never;
26
37
  __isTeleport?: never;
27
38
  __isSuspense?: never;
28
39
  } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
40
+ global: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
29
44
  locale: {
30
45
  type: import('vue').PropType<import('./types').VroElLocale>;
31
46
  default: () => {};
32
47
  };
33
48
  }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
49
+ global: boolean;
34
50
  locale: import('@vrojs/base').DeepPartial<import('..').Locale>;
35
51
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
36
52
  $slots: {
@@ -1,9 +1,15 @@
1
1
  import { withInstall as o } from "@vrojs/base";
2
2
  import r from "./vro-el-config-provider.vue.js";
3
- import { vroElConfigProviderProps as l } from "./types.js";
3
+ import { provideVroElConfig as n, setVroElGlobalConfig as s, useVroElConfig as C, useVroElGlobalConfig as g, vroElConfigContextKey as m } from "./config.js";
4
+ import { vroElConfigProviderProps as E } from "./types.js";
4
5
  const f = o(r);
5
6
  export {
6
7
  f as VroElConfigProvider,
7
8
  f as default,
8
- l as vroElConfigProviderProps
9
+ n as provideVroElConfig,
10
+ s as setVroElGlobalConfig,
11
+ C as useVroElConfig,
12
+ g as useVroElGlobalConfig,
13
+ m as vroElConfigContextKey,
14
+ E as vroElConfigProviderProps
9
15
  };
@@ -3,6 +3,13 @@ import { ExtractPropTypes, PropType } from 'vue';
3
3
  import { Locale } from '../locale';
4
4
  export type VroElLocale = DeepPartial<Locale>;
5
5
  export declare const vroElConfigProviderProps: {
6
+ /**
7
+ * 是否同步为全局配置,用于函数式组件等脱离当前组件树的场景。
8
+ */
9
+ global: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
6
13
  /**
7
14
  * 组件内部文案配置,支持局部覆盖。
8
15
  */
@@ -1,5 +1,12 @@
1
1
  import "@vrojs/base";
2
2
  const e = {
3
+ /**
4
+ * 是否同步为全局配置,用于函数式组件等脱离当前组件树的场景。
5
+ */
6
+ global: {
7
+ type: Boolean,
8
+ default: !0
9
+ },
3
10
  /**
4
11
  * 组件内部文案配置,支持局部覆盖。
5
12
  */
@@ -8,16 +8,25 @@ declare function __VLS_template(): {
8
8
  };
9
9
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
10
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
11
+ global: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
11
15
  locale: {
12
16
  type: import('vue').PropType<import('./types').VroElLocale>;
13
17
  default: () => {};
14
18
  };
15
19
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
20
+ global: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
16
24
  locale: {
17
25
  type: import('vue').PropType<import('./types').VroElLocale>;
18
26
  default: () => {};
19
27
  };
20
28
  }>> & Readonly<{}>, {
29
+ global: boolean;
21
30
  locale: import('@vrojs/base').DeepPartial<import('..').Locale>;
22
31
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
23
32
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,17 +1,17 @@
1
- import { defineComponent as m, computed as n, provide as p, renderSlot as i } from "vue";
2
- import { merge as l } from "@daysnap/utils";
3
- import f from "../locale/lang/zh-cn.js";
4
- import { localeContextKey as c } from "../locale/useLocale.js";
5
- import { vroElConfigProviderProps as s } from "./types.js";
6
- const g = /* @__PURE__ */ m({
1
+ import { defineComponent as t, computed as i, renderSlot as p } from "vue";
2
+ import { provideVroElConfig as f } from "./config.js";
3
+ import { vroElConfigProviderProps as l } from "./types.js";
4
+ const d = /* @__PURE__ */ t({
7
5
  name: "VroElConfigProvider",
8
6
  __name: "vro-el-config-provider",
9
- props: s,
10
- setup(o) {
11
- const r = o, e = n(() => l({}, f, r.locale));
12
- return p(c, e), (t, a) => i(t.$slots, "default");
7
+ props: l,
8
+ setup(r) {
9
+ const o = r, e = i(() => ({
10
+ locale: o.locale
11
+ }));
12
+ return f(e, o), (n, c) => p(n.$slots, "default");
13
13
  }
14
14
  });
15
15
  export {
16
- g as default
16
+ d as default
17
17
  };
@@ -2,7 +2,7 @@ export * from './types';
2
2
  export * from './utils';
3
3
  export declare const VroElFileUpload: import('@vrojs/base').WithInstall<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
4
  modelValue: {
5
- type: import('vue').PropType<string | string[]>;
5
+ type: import('vue').PropType<import('./types').VroElFileUploadModelValue>;
6
6
  default: string;
7
7
  };
8
8
  accept: StringConstructor;
@@ -13,11 +13,11 @@ export declare const VroElFileUpload: import('@vrojs/base').WithInstall<import('
13
13
  disabled: BooleanConstructor;
14
14
  params: import('vue').PropType<Record<string, any>>;
15
15
  upload: import('vue').PropType<import('./types').VroElFileUploadCallback>;
16
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
- "update:modelValue": (value: string | string[]) => any;
16
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ "update:modelValue": (value: import('./types').VroElFileUploadModelValue) => any;
18
18
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
19
19
  modelValue: {
20
- type: import('vue').PropType<string | string[]>;
20
+ type: import('vue').PropType<import('./types').VroElFileUploadModelValue>;
21
21
  default: string;
22
22
  };
23
23
  accept: StringConstructor;
@@ -29,10 +29,10 @@ export declare const VroElFileUpload: import('@vrojs/base').WithInstall<import('
29
29
  params: import('vue').PropType<Record<string, any>>;
30
30
  upload: import('vue').PropType<import('./types').VroElFileUploadCallback>;
31
31
  }>> & Readonly<{
32
- "onUpdate:modelValue"?: ((value: string | string[]) => any) | undefined;
32
+ "onUpdate:modelValue"?: ((value: import('./types').VroElFileUploadModelValue) => any) | undefined;
33
33
  }>, {
34
+ modelValue: import('./types').VroElFileUploadModelValue;
34
35
  disabled: boolean;
35
- modelValue: string | string[];
36
36
  max: number;
37
37
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>>;
38
38
  export default VroElFileUpload;
@@ -1 +1 @@
1
- .vro-el-file-upload-btn{position:relative}.vro-el-file-upload-btn input{position:absolute;width:100%;height:100%;top:0;left:0;cursor:pointer;opacity:0}.vro-el-file-upload-item{position:relative;box-sizing:border-box;display:flex;align-items:center;margin-top:4px}.vro-el-file-upload-item a{text-decoration:underline;color:#007bee;margin-right:10px}.vro-el-file-upload-item i{cursor:pointer;margin-right:10px;color:#e00;background-color:#f2f2f2}
1
+ :root,:host{--vro-el-file-upload-gap: 8px;--vro-el-file-upload-item-font-size: 14px;--vro-el-file-upload-item-line-height: 1.5;--vro-el-file-upload-link-color: var(--el-color-primary);--vro-el-file-upload-clear-gap: 10px;--vro-el-file-upload-clear-color: var(--el-color-danger);--vro-el-file-upload-clear-background: var(--el-fill-color-light)}.vro-el-file-upload-btn{position:relative}.vro-el-file-upload-btn input{cursor:pointer;position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.vro-el-file-upload-content{padding:0;margin:var(--vro-el-file-upload-gap) 0 0;list-style:none}.vro-el-file-upload-item{position:relative;box-sizing:border-box;display:flex;align-items:center;margin-top:var(--vro-el-file-upload-gap);font-size:var(--vro-el-file-upload-item-font-size);line-height:var(--vro-el-file-upload-item-line-height)}.vro-el-file-upload-item a{min-width:0;margin-right:var(--vro-el-file-upload-clear-gap);color:var(--vro-el-file-upload-link-color);text-decoration:underline;word-break:break-all}.vro-el-file-upload-clear{flex:none;color:var(--vro-el-file-upload-clear-color);background-color:var(--vro-el-file-upload-clear-background);cursor:pointer}
@@ -1,15 +1,22 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
+ export type VroElFileUploadModelValue = string | string[];
2
3
  export interface VroElFileUploadCallback<T = any> {
3
- (files: File[], options: {
4
+ (
5
+ /** 当前待上传的文件列表。 */
6
+ files: File[], options: {
7
+ /** 上传时透传的自定义参数。 */
4
8
  params: T;
5
9
  }): Promise<string[]>;
6
10
  }
11
+ export interface VroElFileUploadEmits {
12
+ 'update:modelValue': [value: VroElFileUploadModelValue];
13
+ }
7
14
  export declare const vroElFileUploadProps: {
8
15
  /**
9
16
  * 绑定值。单文件时可传字符串,多文件时传字符串数组。
10
17
  */
11
18
  modelValue: {
12
- type: PropType<string | string[]>;
19
+ type: PropType<VroElFileUploadModelValue>;
13
20
  default: string;
14
21
  };
15
22
  /**