@minilo/ui 0.0.7 → 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 (212) hide show
  1. package/package.json +2 -2
  2. package/minilo/dist/index.css +0 -1
  3. package/minilo/dist/index.full.js +0 -8393
  4. package/minilo/dist/index.full.min.js +0 -2
  5. package/minilo/dist/index.full.min.js.map +0 -1
  6. package/minilo/dist/index.full.min.mjs +0 -2
  7. package/minilo/dist/index.full.min.mjs.map +0 -1
  8. package/minilo/dist/index.full.mjs +0 -8373
  9. package/minilo/es/components/button/index.d.ts +0 -47
  10. package/minilo/es/components/button/index.mjs +0 -6
  11. package/minilo/es/components/button/index.vue.d.ts +0 -29
  12. package/minilo/es/components/button/index.vue.mjs +0 -5
  13. package/minilo/es/components/button/index.vue2.mjs +0 -67
  14. package/minilo/es/components/button/type.d.ts +0 -10
  15. package/minilo/es/components/chart/index.d.ts +0 -49
  16. package/minilo/es/components/chart/index.mjs +0 -6
  17. package/minilo/es/components/chart/index.vue.d.ts +0 -33
  18. package/minilo/es/components/chart/index.vue.mjs +0 -5
  19. package/minilo/es/components/chart/index.vue2.mjs +0 -124
  20. package/minilo/es/components/chart/type.d.ts +0 -7
  21. package/minilo/es/components/detail/index.d.ts +0 -37
  22. package/minilo/es/components/detail/index.mjs +0 -6
  23. package/minilo/es/components/detail/index.vue.d.ts +0 -23
  24. package/minilo/es/components/detail/index.vue.mjs +0 -5
  25. package/minilo/es/components/detail/index.vue2.mjs +0 -194
  26. package/minilo/es/components/detail/renderLabel.vue.d.ts +0 -8
  27. package/minilo/es/components/detail/renderLabel.vue.mjs +0 -5
  28. package/minilo/es/components/detail/renderLabel.vue2.mjs +0 -23
  29. package/minilo/es/components/detail/renderTooltip.vue.d.ts +0 -8
  30. package/minilo/es/components/detail/renderTooltip.vue.mjs +0 -5
  31. package/minilo/es/components/detail/renderTooltip.vue2.mjs +0 -23
  32. package/minilo/es/components/detail/type.d.ts +0 -27
  33. package/minilo/es/components/image-upload-pro/index.d.ts +0 -544
  34. package/minilo/es/components/image-upload-pro/index.mjs +0 -7
  35. package/minilo/es/components/image-upload-pro/index.vue.d.ts +0 -546
  36. package/minilo/es/components/image-upload-pro/index.vue.mjs +0 -5
  37. package/minilo/es/components/image-upload-pro/index.vue2.mjs +0 -657
  38. package/minilo/es/components/image-upload-pro/type.d.ts +0 -147
  39. package/minilo/es/components/image-upload-pro/type.mjs +0 -81
  40. package/minilo/es/components/index.d.ts +0 -11
  41. package/minilo/es/components/index.mjs +0 -14
  42. package/minilo/es/components/number-range-input/index.d.ts +0 -41
  43. package/minilo/es/components/number-range-input/index.mjs +0 -6
  44. package/minilo/es/components/number-range-input/index.vue.d.ts +0 -33
  45. package/minilo/es/components/number-range-input/index.vue.mjs +0 -5
  46. package/minilo/es/components/number-range-input/index.vue2.mjs +0 -150
  47. package/minilo/es/components/number-range-input/props.d.ts +0 -10
  48. package/minilo/es/components/search/index.d.ts +0 -488
  49. package/minilo/es/components/search/index.mjs +0 -6
  50. package/minilo/es/components/search/index.vue.d.ts +0 -554
  51. package/minilo/es/components/search/index.vue.mjs +0 -5
  52. package/minilo/es/components/search/index.vue2.mjs +0 -297
  53. package/minilo/es/components/search/props.d.ts +0 -107
  54. package/minilo/es/components/search/props.mjs +0 -55
  55. package/minilo/es/components/search-table/index.mjs +0 -6
  56. package/minilo/es/components/search-table/index.vue.d.ts +0 -189
  57. package/minilo/es/components/search-table/index.vue.mjs +0 -5
  58. package/minilo/es/components/search-table/index.vue2.mjs +0 -198
  59. package/minilo/es/components/search-table/props.d.ts +0 -69
  60. package/minilo/es/components/search-table/props.mjs +0 -69
  61. package/minilo/es/components/search-table/render.d.ts +0 -11
  62. package/minilo/es/components/search-table/render.mjs +0 -19
  63. package/minilo/es/components/tree-select/index.d.ts +0 -34
  64. package/minilo/es/components/tree-select/index.mjs +0 -6
  65. package/minilo/es/components/tree-select/index.vue.d.ts +0 -23
  66. package/minilo/es/components/tree-select/index.vue.mjs +0 -5
  67. package/minilo/es/components/tree-select/index.vue2.mjs +0 -229
  68. package/minilo/es/components/tree-select/type.d.ts +0 -34
  69. package/minilo/es/components/tree-select-dialog/index.d.ts +0 -64
  70. package/minilo/es/components/tree-select-dialog/index.mjs +0 -7
  71. package/minilo/es/components/tree-select-dialog/index.vue.d.ts +0 -26
  72. package/minilo/es/components/tree-select-dialog/index.vue.mjs +0 -5
  73. package/minilo/es/components/tree-select-dialog/index.vue2.mjs +0 -145
  74. package/minilo/es/components/tree-select-dialog/type.d.ts +0 -9
  75. package/minilo/es/components/tree-select-dialog/type.mjs +0 -24
  76. package/minilo/es/components/tree-select-drawer/index.d.ts +0 -69
  77. package/minilo/es/components/tree-select-drawer/index.mjs +0 -7
  78. package/minilo/es/components/tree-select-drawer/index.vue.d.ts +0 -26
  79. package/minilo/es/components/tree-select-drawer/index.vue.mjs +0 -5
  80. package/minilo/es/components/tree-select-drawer/index.vue2.mjs +0 -151
  81. package/minilo/es/components/tree-select-drawer/type.d.ts +0 -10
  82. package/minilo/es/components/tree-select-drawer/type.mjs +0 -20
  83. package/minilo/es/components/virtual-list/index.d.ts +0 -59
  84. package/minilo/es/components/virtual-list/index.mjs +0 -6
  85. package/minilo/es/components/virtual-list/index.vue.d.ts +0 -39
  86. package/minilo/es/components/virtual-list/index.vue.mjs +0 -5
  87. package/minilo/es/components/virtual-list/index.vue2.mjs +0 -423
  88. package/minilo/es/components/virtual-list/type.d.ts +0 -20
  89. package/minilo/es/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.26_typescript@5.9.3_/node_modules/@element-plus/icons-vue/dist/index.mjs +0 -41
  90. package/minilo/es/node_modules/.pnpm/@vueuse_core@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/index.mjs +0 -73
  91. package/minilo/es/node_modules/.pnpm/@vueuse_shared@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/index.mjs +0 -76
  92. package/minilo/es/packages/utils/dist/func/common.mjs +0 -14
  93. package/minilo/es/packages/utils/dist/request/index.mjs +0 -105
  94. package/minilo/es/resolver/index.d.ts +0 -8
  95. package/minilo/es/resolver/index.mjs +0 -26
  96. package/minilo/es/utils/index.d.ts +0 -28
  97. package/minilo/es/utils/index.mjs +0 -30
  98. package/minilo/lib/components/button/index.d.ts +0 -47
  99. package/minilo/lib/components/button/index.js +0 -11
  100. package/minilo/lib/components/button/index.vue.d.ts +0 -29
  101. package/minilo/lib/components/button/index.vue.js +0 -9
  102. package/minilo/lib/components/button/index.vue2.js +0 -71
  103. package/minilo/lib/components/button/type.d.ts +0 -10
  104. package/minilo/lib/components/chart/index.d.ts +0 -49
  105. package/minilo/lib/components/chart/index.js +0 -11
  106. package/minilo/lib/components/chart/index.vue.d.ts +0 -33
  107. package/minilo/lib/components/chart/index.vue.js +0 -9
  108. package/minilo/lib/components/chart/index.vue2.js +0 -128
  109. package/minilo/lib/components/chart/type.d.ts +0 -7
  110. package/minilo/lib/components/detail/index.d.ts +0 -37
  111. package/minilo/lib/components/detail/index.js +0 -11
  112. package/minilo/lib/components/detail/index.vue.d.ts +0 -23
  113. package/minilo/lib/components/detail/index.vue.js +0 -9
  114. package/minilo/lib/components/detail/index.vue2.js +0 -198
  115. package/minilo/lib/components/detail/renderLabel.vue.d.ts +0 -8
  116. package/minilo/lib/components/detail/renderLabel.vue.js +0 -9
  117. package/minilo/lib/components/detail/renderLabel.vue2.js +0 -27
  118. package/minilo/lib/components/detail/renderTooltip.vue.d.ts +0 -8
  119. package/minilo/lib/components/detail/renderTooltip.vue.js +0 -9
  120. package/minilo/lib/components/detail/renderTooltip.vue2.js +0 -27
  121. package/minilo/lib/components/detail/type.d.ts +0 -27
  122. package/minilo/lib/components/image-upload-pro/index.d.ts +0 -544
  123. package/minilo/lib/components/image-upload-pro/index.js +0 -13
  124. package/minilo/lib/components/image-upload-pro/index.vue.d.ts +0 -546
  125. package/minilo/lib/components/image-upload-pro/index.vue.js +0 -9
  126. package/minilo/lib/components/image-upload-pro/index.vue2.js +0 -661
  127. package/minilo/lib/components/image-upload-pro/type.d.ts +0 -147
  128. package/minilo/lib/components/image-upload-pro/type.js +0 -83
  129. package/minilo/lib/components/index.d.ts +0 -11
  130. package/minilo/lib/components/index.js +0 -33
  131. package/minilo/lib/components/number-range-input/index.d.ts +0 -41
  132. package/minilo/lib/components/number-range-input/index.js +0 -11
  133. package/minilo/lib/components/number-range-input/index.vue.d.ts +0 -33
  134. package/minilo/lib/components/number-range-input/index.vue.js +0 -9
  135. package/minilo/lib/components/number-range-input/index.vue2.js +0 -154
  136. package/minilo/lib/components/number-range-input/props.d.ts +0 -10
  137. package/minilo/lib/components/search/index.d.ts +0 -488
  138. package/minilo/lib/components/search/index.js +0 -11
  139. package/minilo/lib/components/search/index.vue.d.ts +0 -554
  140. package/minilo/lib/components/search/index.vue.js +0 -9
  141. package/minilo/lib/components/search/index.vue2.js +0 -301
  142. package/minilo/lib/components/search/props.d.ts +0 -107
  143. package/minilo/lib/components/search/props.js +0 -58
  144. package/minilo/lib/components/search-table/index.js +0 -11
  145. package/minilo/lib/components/search-table/index.vue.d.ts +0 -189
  146. package/minilo/lib/components/search-table/index.vue.js +0 -9
  147. package/minilo/lib/components/search-table/index.vue2.js +0 -202
  148. package/minilo/lib/components/search-table/props.d.ts +0 -69
  149. package/minilo/lib/components/search-table/props.js +0 -72
  150. package/minilo/lib/components/search-table/render.d.ts +0 -11
  151. package/minilo/lib/components/search-table/render.js +0 -23
  152. package/minilo/lib/components/tree-select/index.d.ts +0 -34
  153. package/minilo/lib/components/tree-select/index.js +0 -11
  154. package/minilo/lib/components/tree-select/index.vue.d.ts +0 -23
  155. package/minilo/lib/components/tree-select/index.vue.js +0 -9
  156. package/minilo/lib/components/tree-select/index.vue2.js +0 -233
  157. package/minilo/lib/components/tree-select/type.d.ts +0 -34
  158. package/minilo/lib/components/tree-select-dialog/index.d.ts +0 -64
  159. package/minilo/lib/components/tree-select-dialog/index.js +0 -13
  160. package/minilo/lib/components/tree-select-dialog/index.vue.d.ts +0 -26
  161. package/minilo/lib/components/tree-select-dialog/index.vue.js +0 -9
  162. package/minilo/lib/components/tree-select-dialog/index.vue2.js +0 -149
  163. package/minilo/lib/components/tree-select-dialog/type.d.ts +0 -9
  164. package/minilo/lib/components/tree-select-dialog/type.js +0 -26
  165. package/minilo/lib/components/tree-select-drawer/index.d.ts +0 -69
  166. package/minilo/lib/components/tree-select-drawer/index.js +0 -13
  167. package/minilo/lib/components/tree-select-drawer/index.vue.d.ts +0 -26
  168. package/minilo/lib/components/tree-select-drawer/index.vue.js +0 -9
  169. package/minilo/lib/components/tree-select-drawer/index.vue2.js +0 -155
  170. package/minilo/lib/components/tree-select-drawer/type.d.ts +0 -10
  171. package/minilo/lib/components/tree-select-drawer/type.js +0 -22
  172. package/minilo/lib/components/virtual-list/index.d.ts +0 -59
  173. package/minilo/lib/components/virtual-list/index.js +0 -11
  174. package/minilo/lib/components/virtual-list/index.vue.d.ts +0 -39
  175. package/minilo/lib/components/virtual-list/index.vue.js +0 -9
  176. package/minilo/lib/components/virtual-list/index.vue2.js +0 -427
  177. package/minilo/lib/components/virtual-list/type.d.ts +0 -20
  178. package/minilo/lib/node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.5.26_typescript@5.9.3_/node_modules/@element-plus/icons-vue/dist/index.js +0 -44
  179. package/minilo/lib/node_modules/.pnpm/@vueuse_core@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/core/index.js +0 -84
  180. package/minilo/lib/node_modules/.pnpm/@vueuse_shared@13.9.0_vue@3.5.26_typescript@5.9.3_/node_modules/@vueuse/shared/index.js +0 -83
  181. package/minilo/lib/packages/utils/dist/func/common.js +0 -16
  182. package/minilo/lib/packages/utils/dist/request/index.js +0 -115
  183. package/minilo/lib/resolver/index.d.ts +0 -8
  184. package/minilo/lib/resolver/index.js +0 -28
  185. package/minilo/lib/utils/index.d.ts +0 -28
  186. package/minilo/lib/utils/index.js +0 -34
  187. package/minilo/theme-chalk/index.css +0 -1
  188. package/minilo/theme-chalk/ml-button.css +0 -1
  189. package/minilo/theme-chalk/ml-chart.css +0 -1
  190. package/minilo/theme-chalk/ml-detail.css +0 -1
  191. package/minilo/theme-chalk/ml-image-upload-pro.css +0 -1
  192. package/minilo/theme-chalk/ml-number-range-input.css +0 -1
  193. package/minilo/theme-chalk/ml-search-table.css +0 -1
  194. package/minilo/theme-chalk/ml-search.css +0 -1
  195. package/minilo/theme-chalk/ml-tree-select-dialog.css +0 -0
  196. package/minilo/theme-chalk/ml-tree-select-drawer.css +0 -0
  197. package/minilo/theme-chalk/ml-tree-select.css +0 -1
  198. package/minilo/theme-chalk/ml-virtual-list.css +0 -1
  199. package/minilo/theme-chalk/src/button.scss +0 -22
  200. package/minilo/theme-chalk/src/chart.scss +0 -11
  201. package/minilo/theme-chalk/src/default/variable.scss +0 -1
  202. package/minilo/theme-chalk/src/detail.scss +0 -9
  203. package/minilo/theme-chalk/src/image-upload-pro.scss +0 -70
  204. package/minilo/theme-chalk/src/index.scss +0 -14
  205. package/minilo/theme-chalk/src/mixins/mixin.scss +0 -273
  206. package/minilo/theme-chalk/src/number-range-input.scss +0 -9
  207. package/minilo/theme-chalk/src/search-table.scss +0 -47
  208. package/minilo/theme-chalk/src/search.scss +0 -20
  209. package/minilo/theme-chalk/src/tree-select-dialog.scss +0 -0
  210. package/minilo/theme-chalk/src/tree-select-drawer.scss +0 -0
  211. package/minilo/theme-chalk/src/tree-select.scss +0 -47
  212. package/minilo/theme-chalk/src/virtual-list.scss +0 -49
@@ -1,147 +0,0 @@
1
- import { PropType } from 'vue';
2
- import { UploadFile } from 'element-plus';
3
- /**
4
- * 上传 API 配置(参考 search-table 的配置方式)
5
- */
6
- export interface UploadApiConfig {
7
- url: string;
8
- method?: 'post' | 'put';
9
- headers?: Record<string, string>;
10
- fieldName?: string;
11
- data?: Record<string, any>;
12
- responseUrlField?: string;
13
- }
14
- /**
15
- * 尺寸限制配置
16
- */
17
- export interface SizeLimit {
18
- width: number;
19
- height: number;
20
- size: number;
21
- }
22
- /**
23
- * 裁剪比例配置
24
- */
25
- export interface AspectRatio {
26
- fixed: boolean;
27
- value: [number, number];
28
- }
29
- /**
30
- * 预览项(增强版UploadFile)
31
- */
32
- export interface PreviewItem extends UploadFile {
33
- url: string;
34
- isCover?: boolean;
35
- rawFile?: File;
36
- blobUrl?: string;
37
- serverUrl?: string;
38
- }
39
- /**
40
- * 图片上传组件 Props
41
- */
42
- export declare const imageUploadProProps: {
43
- /**
44
- * 已上传图片列表(用于回显)
45
- * v-model 绑定的值
46
- */
47
- modelValue: {
48
- type: PropType<PreviewItem[]>;
49
- default: () => any[];
50
- };
51
- /**
52
- * 允许上传的图片格式
53
- * 默认支持 jpg、png、webp
54
- */
55
- acceptType: {
56
- type: StringConstructor;
57
- default: string;
58
- };
59
- /**
60
- * 尺寸限制配置
61
- * width/height 为 0 表示不限制
62
- * size 为最大文件大小(MB)
63
- */
64
- sizeLimit: {
65
- type: PropType<SizeLimit>;
66
- default: () => {
67
- width: number;
68
- height: number;
69
- size: number;
70
- };
71
- };
72
- /**
73
- * 最大上传数量
74
- * 默认 9 张
75
- */
76
- maxCount: {
77
- type: NumberConstructor;
78
- default: number;
79
- };
80
- /**
81
- * 是否允许裁剪图片
82
- * 启用后会在上传时弹出裁剪对话框
83
- */
84
- allowCrop: {
85
- type: BooleanConstructor;
86
- default: boolean;
87
- };
88
- /**
89
- * 是否支持封面标记
90
- * 允许用户标记某张图片为封面
91
- */
92
- allowCover: {
93
- type: BooleanConstructor;
94
- default: boolean;
95
- };
96
- /**
97
- * 是否支持拖拽排序
98
- * 启用后可以通过拖拽调整图片顺序
99
- */
100
- allowSort: {
101
- type: BooleanConstructor;
102
- default: boolean;
103
- };
104
- /**
105
- * 上传 API 配置
106
- * 配置后,每次选择或裁剪图片时会自动上传到服务器
107
- */
108
- uploadApi: {
109
- type: PropType<UploadApiConfig>;
110
- default: any;
111
- };
112
- /**
113
- * 是否自动上传
114
- * 启用后,选择或裁剪图片时自动调用上传接口
115
- */
116
- autoUpload: {
117
- type: BooleanConstructor;
118
- default: boolean;
119
- };
120
- };
121
- /**
122
- * 组件 Props 类型(从 props 定义中推导)
123
- */
124
- export type ImageUploadProProps = {
125
- modelValue?: PreviewItem[];
126
- accept?: string;
127
- sizeLimit?: SizeLimit;
128
- maxCount?: number;
129
- allowCrop?: boolean;
130
- allowCover?: boolean;
131
- allowSort?: boolean;
132
- };
133
- /**
134
- * 组件暴露的方法
135
- */
136
- export interface ImageUploadProExpose {
137
- /**
138
- * 上传到服务器
139
- * @param uploadApi 上传接口函数,接收 File 对象,返回图片 URL
140
- * @returns 上传后的图片列表
141
- */
142
- uploadToServer: (uploadApi: (file: File) => Promise<string>) => Promise<PreviewItem[]>;
143
- /**
144
- * 清空所有已上传的图片
145
- */
146
- clear: () => void;
147
- }
@@ -1,81 +0,0 @@
1
- const imageUploadProProps = {
2
- /**
3
- * 已上传图片列表(用于回显)
4
- * v-model 绑定的值
5
- */
6
- modelValue: {
7
- type: Array,
8
- default: () => []
9
- },
10
- /**
11
- * 允许上传的图片格式
12
- * 默认支持 jpg、png、webp
13
- */
14
- acceptType: {
15
- type: String,
16
- default: "image/jpeg,image/jpg,image/png,image/webp"
17
- },
18
- /**
19
- * 尺寸限制配置
20
- * width/height 为 0 表示不限制
21
- * size 为最大文件大小(MB)
22
- */
23
- sizeLimit: {
24
- type: Object,
25
- default: () => ({
26
- width: 0,
27
- height: 0,
28
- size: 2
29
- })
30
- },
31
- /**
32
- * 最大上传数量
33
- * 默认 9 张
34
- */
35
- maxCount: {
36
- type: Number,
37
- default: 9
38
- },
39
- /**
40
- * 是否允许裁剪图片
41
- * 启用后会在上传时弹出裁剪对话框
42
- */
43
- allowCrop: {
44
- type: Boolean,
45
- default: true
46
- },
47
- /**
48
- * 是否支持封面标记
49
- * 允许用户标记某张图片为封面
50
- */
51
- allowCover: {
52
- type: Boolean,
53
- default: true
54
- },
55
- /**
56
- * 是否支持拖拽排序
57
- * 启用后可以通过拖拽调整图片顺序
58
- */
59
- allowSort: {
60
- type: Boolean,
61
- default: true
62
- },
63
- /**
64
- * 上传 API 配置
65
- * 配置后,每次选择或裁剪图片时会自动上传到服务器
66
- */
67
- uploadApi: {
68
- type: Object,
69
- default: null
70
- },
71
- /**
72
- * 是否自动上传
73
- * 启用后,选择或裁剪图片时自动调用上传接口
74
- */
75
- autoUpload: {
76
- type: Boolean,
77
- default: false
78
- }
79
- };
80
-
81
- export { imageUploadProProps };
@@ -1,11 +0,0 @@
1
- export * from './chart';
2
- export * from './search-table';
3
- export * from './search';
4
- export * from './detail';
5
- export * from './button';
6
- export * from './virtual-list';
7
- export * from './number-range-input';
8
- export * from './tree-select';
9
- export * from './tree-select-dialog';
10
- export * from './tree-select-drawer';
11
- export * from './image-upload-pro';
@@ -1,14 +0,0 @@
1
- export { MlChart } from './chart/index.mjs';
2
- export { MlSearchTable } from './search-table/index.mjs';
3
- export { MlSearch } from './search/index.mjs';
4
- export { MlDetail } from './detail/index.mjs';
5
- export { MlButton } from './button/index.mjs';
6
- export { MlVirtualList } from './virtual-list/index.mjs';
7
- export { MlNumberRangeInput } from './number-range-input/index.mjs';
8
- export { MlTreeSelect } from './tree-select/index.mjs';
9
- export { MlTreeSelectDialog } from './tree-select-dialog/index.mjs';
10
- export { MlTreeSelectDrawer } from './tree-select-drawer/index.mjs';
11
- export { MlImageUploadPro } from './image-upload-pro/index.mjs';
12
- export { dialogPropKeys } from './tree-select-dialog/type.mjs';
13
- export { drawerPropKeys } from './tree-select-drawer/type.mjs';
14
- export { imageUploadProProps } from './image-upload-pro/type.mjs';
@@ -1,41 +0,0 @@
1
- export declare const MlNumberRangeInput: {
2
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
3
- modelValue?: import('./props').NumberRangeValue;
4
- } & import('./props').NumberRangeInputProps> & Readonly<{
5
- "onUpdate:modelValue"?: (value: import('./props').NumberRangeValue) => any;
6
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
- "update:modelValue": (value: import('./props').NumberRangeValue) => any;
8
- }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
9
- P: {};
10
- B: {};
11
- D: {};
12
- C: {};
13
- M: {};
14
- Defaults: {};
15
- }, Readonly<{
16
- modelValue?: import('./props').NumberRangeValue;
17
- } & import('./props').NumberRangeInputProps> & Readonly<{
18
- "onUpdate:modelValue"?: (value: import('./props').NumberRangeValue) => any;
19
- }>, {}, {}, {}, {}, {}>;
20
- __isFragment?: never;
21
- __isTeleport?: never;
22
- __isSuspense?: never;
23
- } & import('vue').ComponentOptionsBase<Readonly<{
24
- modelValue?: import('./props').NumberRangeValue;
25
- } & import('./props').NumberRangeInputProps> & Readonly<{
26
- "onUpdate:modelValue"?: (value: import('./props').NumberRangeValue) => any;
27
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
- "update:modelValue": (value: import('./props').NumberRangeValue) => any;
29
- }, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
30
- $slots: {
31
- 'min-prefix'?(_: {}): any;
32
- 'min-suffix'?(_: {}): any;
33
- 'min-prepend'?(_: {}): any;
34
- 'min-append'?(_: {}): any;
35
- 'max-prefix'?(_: {}): any;
36
- 'max-suffix'?(_: {}): any;
37
- 'max-prepend'?(_: {}): any;
38
- 'max-append'?(_: {}): any;
39
- };
40
- });
41
- export default MlNumberRangeInput;
@@ -1,6 +0,0 @@
1
- import { withInstall } from '../../utils/index.mjs';
2
- import _sfc_main from './index.vue2.mjs';
3
-
4
- const MlNumberRangeInput = withInstall(_sfc_main);
5
-
6
- export { MlNumberRangeInput, MlNumberRangeInput as default };
@@ -1,33 +0,0 @@
1
- import { NumberRangeInputProps, NumberRangeValue } from './props';
2
- type __VLS_Props = NumberRangeInputProps;
3
- type __VLS_PublicProps = {
4
- modelValue?: NumberRangeValue;
5
- } & __VLS_Props;
6
- declare function __VLS_template(): {
7
- attrs: Partial<{}>;
8
- slots: {
9
- 'min-prefix'?(_: {}): any;
10
- 'min-suffix'?(_: {}): any;
11
- 'min-prepend'?(_: {}): any;
12
- 'min-append'?(_: {}): any;
13
- 'max-prefix'?(_: {}): any;
14
- 'max-suffix'?(_: {}): any;
15
- 'max-prepend'?(_: {}): any;
16
- 'max-append'?(_: {}): any;
17
- };
18
- refs: {};
19
- rootEl: HTMLDivElement;
20
- };
21
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
- declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
23
- "update:modelValue": (value: NumberRangeValue) => any;
24
- }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
25
- "onUpdate:modelValue"?: (value: NumberRangeValue) => any;
26
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
27
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
28
- export default _default;
29
- type __VLS_WithTemplateSlots<T, S> = T & {
30
- new (): {
31
- $slots: S;
32
- };
33
- };
@@ -1,5 +0,0 @@
1
- import _sfc_main from './index.vue2.mjs';
2
-
3
-
4
-
5
- export { _sfc_main as default };
@@ -1,150 +0,0 @@
1
- import { defineComponent, mergeModels, useSlots, useModel, computed, createElementBlock, openBlock, normalizeClass, unref, createVNode, createElementVNode, mergeProps, createSlots, withCtx, renderSlot, toDisplayString } from 'vue';
2
- import { ElInput } from 'element-plus';
3
- import { bem } from '../../utils/index.mjs';
4
-
5
- var _sfc_main = /* @__PURE__ */ defineComponent({
6
- ...{
7
- name: "MlNumberRangeInput"
8
- },
9
- __name: "index",
10
- props: /* @__PURE__ */ mergeModels({
11
- label: { type: String, required: true },
12
- disabled: { type: Boolean, required: false },
13
- separator: { type: String, required: false },
14
- inputProps: { type: Object, required: false },
15
- minInputProps: { type: Object, required: false },
16
- maxInputProps: { type: Object, required: false }
17
- }, {
18
- "modelValue": { type: Array, ...{ default: () => [null, null] } },
19
- "modelModifiers": {}
20
- }),
21
- emits: ["update:modelValue"],
22
- setup(__props) {
23
- const props = __props;
24
- const slots = useSlots();
25
- const modelValue = useModel(__props, "modelValue");
26
- const minValue = computed({
27
- get: () => modelValue.value?.[0] ?? null,
28
- set: (val) => {
29
- modelValue.value = [val, modelValue.value?.[1] ?? null];
30
- }
31
- });
32
- const maxValue = computed({
33
- get: () => modelValue.value?.[1] ?? null,
34
- set: (val) => {
35
- modelValue.value = [modelValue.value?.[0] ?? null, val];
36
- }
37
- });
38
- const mergedMinInputProps = computed(() => ({
39
- type: "number",
40
- placeholder: `\u8BF7\u8F93\u5165${props.label}\u6700\u5C0F\u503C`,
41
- disabled: props.disabled,
42
- ...props.inputProps,
43
- ...props.minInputProps
44
- }));
45
- const mergedMaxInputProps = computed(() => ({
46
- type: "number",
47
- placeholder: `\u8BF7\u8F93\u5165${props.label}\u6700\u5927\u503C`,
48
- disabled: props.disabled,
49
- ...props.inputProps,
50
- ...props.maxInputProps
51
- }));
52
- return (_ctx, _cache) => {
53
- return openBlock(), createElementBlock(
54
- "div",
55
- {
56
- class: normalizeClass(unref(bem)("number-range-input"))
57
- },
58
- [
59
- createVNode(unref(ElInput), mergeProps({
60
- modelValue: minValue.value,
61
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => minValue.value = $event),
62
- modelModifiers: { number: true }
63
- }, mergedMinInputProps.value), createSlots({
64
- _: 2
65
- /* DYNAMIC */
66
- }, [
67
- unref(slots)["min-prefix"] ? {
68
- name: "prefix",
69
- fn: withCtx(() => [
70
- renderSlot(_ctx.$slots, "min-prefix")
71
- ]),
72
- key: "0"
73
- } : void 0,
74
- unref(slots)["min-suffix"] ? {
75
- name: "suffix",
76
- fn: withCtx(() => [
77
- renderSlot(_ctx.$slots, "min-suffix")
78
- ]),
79
- key: "1"
80
- } : void 0,
81
- unref(slots)["min-prepend"] ? {
82
- name: "prepend",
83
- fn: withCtx(() => [
84
- renderSlot(_ctx.$slots, "min-prepend")
85
- ]),
86
- key: "2"
87
- } : void 0,
88
- unref(slots)["min-append"] ? {
89
- name: "append",
90
- fn: withCtx(() => [
91
- renderSlot(_ctx.$slots, "min-append")
92
- ]),
93
- key: "3"
94
- } : void 0
95
- ]), 1040, ["modelValue"]),
96
- createElementVNode(
97
- "span",
98
- {
99
- class: normalizeClass(unref(bem)("number-range-input", "separator"))
100
- },
101
- toDisplayString(props.separator || "\u81F3"),
102
- 3
103
- /* TEXT, CLASS */
104
- ),
105
- createVNode(unref(ElInput), mergeProps({
106
- modelValue: maxValue.value,
107
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => maxValue.value = $event),
108
- modelModifiers: { number: true }
109
- }, mergedMaxInputProps.value), createSlots({
110
- _: 2
111
- /* DYNAMIC */
112
- }, [
113
- unref(slots)["max-prefix"] ? {
114
- name: "prefix",
115
- fn: withCtx(() => [
116
- renderSlot(_ctx.$slots, "max-prefix")
117
- ]),
118
- key: "0"
119
- } : void 0,
120
- unref(slots)["max-suffix"] ? {
121
- name: "suffix",
122
- fn: withCtx(() => [
123
- renderSlot(_ctx.$slots, "max-suffix")
124
- ]),
125
- key: "1"
126
- } : void 0,
127
- unref(slots)["max-prepend"] ? {
128
- name: "prepend",
129
- fn: withCtx(() => [
130
- renderSlot(_ctx.$slots, "max-prepend")
131
- ]),
132
- key: "2"
133
- } : void 0,
134
- unref(slots)["max-append"] ? {
135
- name: "append",
136
- fn: withCtx(() => [
137
- renderSlot(_ctx.$slots, "max-append")
138
- ]),
139
- key: "3"
140
- } : void 0
141
- ]), 1040, ["modelValue"])
142
- ],
143
- 2
144
- /* CLASS */
145
- );
146
- };
147
- }
148
- });
149
-
150
- export { _sfc_main as default };
@@ -1,10 +0,0 @@
1
- import { InputProps } from 'element-plus';
2
- export type NumberRangeValue = [number | null, number | null];
3
- export interface NumberRangeInputProps {
4
- label: string;
5
- disabled?: boolean;
6
- separator?: string;
7
- inputProps?: Partial<InputProps>;
8
- minInputProps?: Partial<InputProps>;
9
- maxInputProps?: Partial<InputProps>;
10
- }