v-uni-app-ui 1.0.4 → 1.0.7

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 (89) hide show
  1. package/README.md +62 -82
  2. package/dist/v-uni-app-ui.css +1 -0
  3. package/dist/v-uni-app-ui.es.js +6569 -0
  4. package/dist/v-uni-app-ui.umd.js +7 -0
  5. package/package.json +17 -5
  6. package/components/config/css/basic.scss +0 -19
  7. package/components/config/interface/basic-type.js +0 -16
  8. package/components/config/interface/components-interface.ts +0 -0
  9. package/components/config/interface/monitor/components/input-monitor.js +0 -0
  10. package/components/config/interface/monitor/property-monitor.ts +0 -136
  11. package/components/config/interface/props/basic-props.ts +0 -88
  12. package/components/config/interface/props/components/button-props.ts +0 -85
  13. package/components/config/interface/props/components/input-props.ts +0 -69
  14. package/components/config/interface/props/props-tools.ts +0 -64
  15. package/components/config/style/basic.js +0 -346
  16. package/components/config/style/component-registry.js +0 -142
  17. package/components/config/style/components/button-style.js +0 -160
  18. package/components/config/style/components/input-style.js +0 -98
  19. package/components/config/style/components-style.js +0 -622
  20. package/components/config/style/property-mapper.js +0 -377
  21. package/components/config/style/pseudo-processor.js +0 -213
  22. package/components/config.js +0 -123
  23. package/components/icon/iconfont.css +0 -87
  24. package/components/icon/iconfont.js +0 -1
  25. package/components/icon/iconfont.json +0 -135
  26. package/components/icon/iconfont.ttf +0 -0
  27. package/components/icon/iconfont.woff +0 -0
  28. package/components/icon/iconfont.woff2 +0 -0
  29. package/components/layout/v-card/v-card.vue +0 -108
  30. package/components/layout/v-grid/v-grid.vue +0 -162
  31. package/components/layout/v-icon-grid/v-icon-grid.vue +0 -195
  32. package/components/layout/v-infinite-scroll/v-infinite-scroll.vue +0 -172
  33. package/components/layout/v-list/v-list.vue +0 -43
  34. package/components/layout/v-row/v-row.vue +0 -142
  35. package/components/layout/v-waterfall/v-waterfall.vue +0 -79
  36. package/components/model/compound/v-checkbox-group/v-checkbox-group.vue +0 -96
  37. package/components/model/compound/v-console/v-console.js +0 -20
  38. package/components/model/compound/v-console/v-console.vue +0 -299
  39. package/components/model/compound/v-date-time/v-date-time.vue +0 -261
  40. package/components/model/compound/v-dialog/v-dialog.vue +0 -178
  41. package/components/model/compound/v-drum-select-picker/v-drum-select-picker.vue +0 -83
  42. package/components/model/compound/v-form/v-form.vue +0 -226
  43. package/components/model/compound/v-form-item/v-form-item.vue +0 -255
  44. package/components/model/compound/v-image/v-image.vue +0 -357
  45. package/components/model/compound/v-input-desensitize/v-input-desensitize.vue +0 -101
  46. package/components/model/compound/v-page/v-page.vue +0 -11
  47. package/components/model/compound/v-pages/v-pages.vue +0 -141
  48. package/components/model/compound/v-picker-list/v-picker-list.vue +0 -109
  49. package/components/model/compound/v-popup/v-popup.vue +0 -151
  50. package/components/model/compound/v-radio-group/v-radio-group.vue +0 -86
  51. package/components/model/compound/v-select-picker/v-select-picker.vue +0 -202
  52. package/components/model/compound/v-series-picker-list/v-series-picker-list.vue +0 -221
  53. package/components/model/compound/v-series-select-picker/v-series-select-picker.vue +0 -203
  54. package/components/model/compound/v-switch/v-switch.vue +0 -136
  55. package/components/model/compound/v-tabs-page/v-tabs-page.vue +0 -138
  56. package/components/model/native/v-badge/v-badge.vue +0 -143
  57. package/components/model/native/v-button/v-button.vue +0 -81
  58. package/components/model/native/v-carousel/v-carousel.vue +0 -138
  59. package/components/model/native/v-checkbox/v-checkbox.vue +0 -215
  60. package/components/model/native/v-collapse/v-collapse.vue +0 -190
  61. package/components/model/native/v-header-navigation-bar/v-header-navigation-bar.vue +0 -92
  62. package/components/model/native/v-input/v-input.vue +0 -163
  63. package/components/model/native/v-input-code/v-input-code.vue +0 -146
  64. package/components/model/native/v-loading/v-loading.vue +0 -206
  65. package/components/model/native/v-menu/v-menu.vue +0 -222
  66. package/components/model/native/v-menu-slide/v-menu-slide.vue +0 -364
  67. package/components/model/native/v-min-loading/v-min-loading.vue +0 -80
  68. package/components/model/native/v-null/v-null.vue +0 -97
  69. package/components/model/native/v-overlay/v-overlay.vue +0 -96
  70. package/components/model/native/v-pull-up-refresh/v-pull-up-refresh.vue +0 -157
  71. package/components/model/native/v-radio/v-radio.vue +0 -138
  72. package/components/model/native/v-scroll-list/v-scroll-list.vue +0 -169
  73. package/components/model/native/v-steps/v-steps.vue +0 -253
  74. package/components/model/native/v-table/v-table.vue +0 -203
  75. package/components/model/native/v-tabs/v-tabs.vue +0 -235
  76. package/components/model/native/v-tag/v-tag.vue +0 -206
  77. package/components/model/native/v-text/v-text.vue +0 -187
  78. package/components/model/native/v-textarea/v-textarea.vue +0 -178
  79. package/components/model/native/v-title/v-title.vue +0 -91
  80. package/components/model/native/v-toast/info.png +0 -0
  81. package/components/model/native/v-toast/success.png +0 -0
  82. package/components/model/native/v-toast/v-toast.vue +0 -198
  83. package/components/model/native/v-toast/warn.png +0 -0
  84. package/components/model/native/v-upload-file-button/v-upload-file-button.vue +0 -296
  85. package/components/model/native/v-video/v-video.vue +0 -175
  86. package/components/model/native/v-window/v-window.vue +0 -158
  87. package/components/utils/event-modifiers.ts +0 -139
  88. package/components/utils/validator.ts +0 -451
  89. package/index.js +0 -372
package/index.js DELETED
@@ -1,372 +0,0 @@
1
- // index.js - v-uni-app-ui 组件库主入口文件
2
-
3
- // 导入所有组件
4
- import VButton from './components/model/native/v-button/v-button.vue'
5
- import VTextButton from './components/model/native/v-text-button/v-text-button.vue'
6
- import VInput from './components/model/native/v-input/v-input.vue'
7
- import VPickerList from './components/model/compound/v-picker-list/v-picker-list.vue'
8
- import VSeriesPickerList from './components/model/compound/v-series-picker-list/v-series-picker-list.vue'
9
- import VRadio from './components/model/native/v-radio/v-radio.vue'
10
- import VCheckbox from './components/model/native/v-checkbox/v-checkbox.vue'
11
- import VTextarea from './components/model/native/v-textarea/v-textarea.vue'
12
- import VTag from './components/model/native/v-tag/v-tag.vue'
13
- import VBadge from './components/model/native/v-badge/v-badge.vue'
14
- import VText from './components/model/native/v-text/v-text.vue'
15
- import VLoading from './components/model/native/v-loading/v-loading.vue'
16
- import VRow from './components/layout/v-row/v-row.vue'
17
- import VList from './components/layout/v-list/v-list.vue'
18
- import VWindow from './components/model/native/v-window/v-window.vue'
19
- import VDialog from './components/model/compound/v-dialog/v-dialog.vue'
20
- import VSelectPicker from './components/model/compound/v-select-picker/v-select-picker.vue'
21
- import VSeriesSelectPicker from './components/model/compound/v-series-select-picker/v-series-select-picker.vue'
22
- import VTabs from './components/model/native/v-tabs/v-tabs.vue'
23
- import VCarousel from './components/model/native/v-carousel/v-carousel.vue'
24
- import VTabsPage from './components/model/compound/v-tabs-page/v-tabs-page.vue'
25
- import VPages from './components/model/compound/v-pages/v-pages.vue'
26
- import VInfiniteScroll from './components/layout/v-infinite-scroll/v-infinite-scroll.vue'
27
- import VRadioGroup from './components/model/compound/v-radio-group/v-radio-group.vue'
28
- import VCheckboxGroup from './components/model/compound/v-checkbox-group/v-checkbox-group.vue'
29
- import VUploadFileButton from './components/model/native/v-upload-file-button/v-upload-file-button.vue'
30
- import VForm from './components/model/compound/v-form/v-form.vue'
31
- import VFormItem from './components/model/compound/v-form-item/v-form-item.vue'
32
- import VMenu from './components/model/native/v-menu/v-menu.vue'
33
- import VMenuSlide from './components/model/native/v-menu-slide/v-menu-slide.vue'
34
- import VPopup from './components/model/compound/v-popup/v-popup.vue'
35
- import VGrid from './components/layout/v-grid/v-grid.vue'
36
- import VIconGrid from './components/layout/v-icon-grid/v-icon-grid.vue'
37
- import VWaterfall from './components/layout/v-waterfall/v-waterfall.vue'
38
- import VCard from './components/layout/v-card/v-card.vue'
39
- import VTable from './components/model/native/v-table/v-table.vue'
40
- import VOverlay from './components/model/native/v-overlay/v-overlay.vue'
41
- import VSwitch from './components/model/compound/v-switch/v-switch.vue'
42
- import VHeaderNavigationBar from './components/model/native/v-header-navigation-bar/v-header-navigation-bar.vue'
43
- import VMinLoading from './components/model/native/v-min-loading/v-min-loading.vue'
44
- import VPullUpRefresh from './components/model/native/v-pull-up-refresh/v-pull-up-refresh.vue'
45
- import VNull from './components/model/native/v-null/v-null.vue'
46
- import VDateTime from './components/model/compound/v-date-time/v-date-time.vue'
47
- import VDrumSelectPicker from './components/model/compound/v-drum-select-picker/v-drum-select-picker.vue'
48
- import VScrollList from './components/model/native/v-scroll-list/v-scroll-list.vue'
49
- import VInputCode from './components/model/native/v-input-code/v-input-code.vue'
50
- import VCollapse from './components/model/native/v-collapse/v-collapse.vue'
51
- import VSteps from './components/model/native/v-steps/v-steps.vue'
52
- import VTitle from './components/model/native/v-title/v-title.vue'
53
- import VImage from './components/model/compound/v-image/v-image.vue'
54
- import VToast from './components/model/native/v-toast/v-toast.vue'
55
- import VInputDesensitize from './components/model/compound/v-input-desensitize/v-input-desensitize.vue'
56
- import VConsole from './components/model/compound/v-console/v-console.vue'
57
-
58
- // 导入配置和 VConsole 初始化函数
59
- import {
60
- config
61
- } from './components/config'
62
- import {
63
- initVConsole
64
- } from './components/model/compound/v-console/v-console.js'
65
-
66
- // 初始化 VConsole(可选)
67
- // 注意:在实际项目中,用户可能需要根据环境决定是否初始化
68
- if (typeof window !== 'undefined') {
69
- // 可以根据环境变量或配置决定是否初始化
70
- // initVConsole();
71
- }
72
-
73
- // Toast 实例(如果需要全局 Toast)
74
- let toastInstance = null
75
-
76
- // 所有组件的集合
77
- const components = {
78
- VButton,
79
- VTextButton,
80
- VInput,
81
- VPickerList,
82
- VSeriesPickerList,
83
- VRadio,
84
- VCheckbox,
85
- VTextarea,
86
- VTag,
87
- VBadge,
88
- VText,
89
- VLoading,
90
- VRow,
91
- VList,
92
- VWindow,
93
- VDialog,
94
- VSelectPicker,
95
- VSeriesSelectPicker,
96
- VTabs,
97
- VCarousel,
98
- VTabsPage,
99
- VPages,
100
- VInfiniteScroll,
101
- VRadioGroup,
102
- VCheckboxGroup,
103
- VUploadFileButton,
104
- VForm,
105
- VFormItem,
106
- VMenu,
107
- VMenuSlide,
108
- VPopup,
109
- VGrid,
110
- VIconGrid,
111
- VWaterfall,
112
- VCard,
113
- VTable,
114
- VOverlay,
115
- VSwitch,
116
- VHeaderNavigationBar,
117
- VMinLoading,
118
- VPullUpRefresh,
119
- VNull,
120
- VDateTime,
121
- VDrumSelectPicker,
122
- VScrollList,
123
- VInputCode,
124
- VCollapse,
125
- VSteps,
126
- VTitle,
127
- VImage,
128
- VToast,
129
- VInputDesensitize,
130
- VConsole
131
- }
132
-
133
- // Vue 3 插件安装函数
134
- const install = (app, options = {}) => {
135
- // 批量注册所有组件
136
- app.component('VButton', VButton)
137
- app.component('VTextButton', VTextButton)
138
- app.component('VInput', VInput)
139
- app.component('VPickerList', VPickerList)
140
- app.component('VSeriesPickerList', VSeriesPickerList)
141
- app.component('VRadio', VRadio)
142
- app.component('VCheckbox', VCheckbox)
143
- app.component('VTextarea', VTextarea)
144
- app.component('VTag', VTag)
145
- app.component('VBadge', VBadge)
146
- app.component('VText', VText)
147
- app.component('VLoading', VLoading)
148
- app.component('VRow', VRow)
149
- app.component('VList', VList)
150
- app.component('VWindow', VWindow)
151
- app.component('VDialog', VDialog)
152
- app.component('VSelectPicker', VSelectPicker)
153
- app.component('VSeriesSelectPicker', VSeriesSelectPicker)
154
- app.component('VTabs', VTabs)
155
- app.component('VCarousel', VCarousel)
156
- app.component('VTabsPage', VTabsPage)
157
- app.component('VPages', VPages)
158
- app.component('VInfiniteScroll', VInfiniteScroll)
159
- app.component('VRadioGroup', VRadioGroup)
160
- app.component('VCheckboxGroup', VCheckboxGroup)
161
- app.component('VUploadFileButton', VUploadFileButton)
162
- app.component('VForm', VForm)
163
- app.component('VFormItem', VFormItem)
164
- app.component('VMenu', VMenu)
165
- app.component('VMenuSlide', VMenuSlide)
166
- app.component('VPopup', VPopup)
167
- app.component('VGrid', VGrid)
168
- app.component('VIconGrid', VIconGrid)
169
- app.component('VWaterfall', VWaterfall)
170
- app.component('VCard', VCard)
171
- app.component('VTable', VTable)
172
- app.component('VOverlay', VOverlay)
173
- app.component('VSwitch', VSwitch)
174
- app.component('VHeaderNavigationBar', VHeaderNavigationBar)
175
- app.component('VMinLoading', VMinLoading)
176
- app.component('VPullUpRefresh', VPullUpRefresh)
177
- app.component('VNull', VNull)
178
- app.component('VDateTime', VDateTime)
179
- app.component('VDrumSelectPicker', VDrumSelectPicker)
180
- app.component('VScrollList', VScrollList)
181
- app.component('VInputCode', VInputCode)
182
- app.component('VCollapse', VCollapse)
183
- app.component('VSteps', VSteps)
184
- app.component('VTitle', VTitle)
185
- app.component('VImage', VImage)
186
- app.component('VToast', VToast)
187
- app.component('VInputDesensitize', VInputDesensitize)
188
- app.component('VConsole', VConsole)
189
-
190
- // 提供配置文件
191
- app.provide('vUniAppUiConfig', config)
192
-
193
- // 合并用户配置
194
- if (options.config) {
195
- const mergedConfig = {
196
- ...config,
197
- ...options.config
198
- }
199
- app.provide('vUniAppUiConfig', mergedConfig)
200
- }
201
-
202
- // 注册全局方法
203
- // Toast 方法
204
- app.config.globalProperties.$toast = {
205
- show: (message, options = {}) => {
206
- // 这里实现 toast 显示逻辑
207
- // 实际使用时可能需要通过组件实例调用
208
- console.log('[v-uni-app-ui] Toast:', message, options)
209
- // 可以在实际项目中通过 VToast 组件的方法来实现
210
- return Promise.resolve()
211
- },
212
- success: (message, duration = 2000) => {
213
- return app.config.globalProperties.$toast.show(message, {
214
- type: 'success',
215
- duration
216
- })
217
- },
218
- error: (message, duration = 2000) => {
219
- return app.config.globalProperties.$toast.show(message, {
220
- type: 'error',
221
- duration
222
- })
223
- },
224
- info: (message, duration = 2000) => {
225
- return app.config.globalProperties.$toast.show(message, {
226
- type: 'info',
227
- duration
228
- })
229
- },
230
- warning: (message, duration = 2000) => {
231
- return app.config.globalProperties.$toast.show(message, {
232
- type: 'warning',
233
- duration
234
- })
235
- }
236
- }
237
-
238
- // Dialog 方法
239
- app.config.globalProperties.$dialog = {
240
- show: (options = {}) => {
241
- console.log('[v-uni-app-ui] Dialog:', options)
242
- // 实际使用时可能需要通过 VDialog 组件的方法来实现
243
- return Promise.resolve()
244
- },
245
- confirm: (title, content, options = {}) => {
246
- return app.config.globalProperties.$dialog.show({
247
- title,
248
- content,
249
- showCancelButton: true,
250
- ...options
251
- })
252
- },
253
- alert: (title, content, options = {}) => {
254
- return app.config.globalProperties.$dialog.show({
255
- title,
256
- content,
257
- showCancelButton: false,
258
- ...options
259
- })
260
- }
261
- }
262
-
263
- // Loading 方法
264
- app.config.globalProperties.$loading = {
265
- show: (options = {}) => {
266
- console.log('[v-uni-app-ui] Loading:', options)
267
- // 返回一个可以关闭 loading 的对象
268
- return {
269
- hide: () => {
270
- console.log('[v-uni-app-ui] Loading hidden')
271
- }
272
- }
273
- },
274
- hide: () => {
275
- console.log('[v-uni-app-ui] All loading hidden')
276
- }
277
- }
278
-
279
- // 初始化 VConsole(如果用户传入配置)
280
- if (options.enableVConsole && typeof window !== 'undefined') {
281
- try {
282
- initVConsole()
283
- console.log('[v-uni-app-ui] VConsole initialized')
284
- } catch (e) {
285
- console.warn('[v-uni-app-ui] Failed to init VConsole:', e.message)
286
- }
287
- }
288
-
289
- console.log('[v-uni-app-ui] 组件库已安装,版本:', VERSION)
290
- }
291
-
292
- // 自动安装(当通过 script 标签引入时)
293
- if (typeof window !== 'undefined' && window.Vue) {
294
- install(window.Vue)
295
- }
296
-
297
-
298
- // 导出所有组件(用于按需引入)
299
- export {
300
- VButton,
301
- VTextButton,
302
- VInput,
303
- VPickerList,
304
- VSeriesPickerList,
305
- VRadio,
306
- VCheckbox,
307
- VTextarea,
308
- VTag,
309
- VBadge,
310
- VText,
311
- VLoading,
312
- VRow,
313
- VList,
314
- VWindow,
315
- VDialog,
316
- VSelectPicker,
317
- VSeriesSelectPicker,
318
- VTabs,
319
- VCarousel,
320
- VTabsPage,
321
- VPages,
322
- VInfiniteScroll,
323
- VRadioGroup,
324
- VCheckboxGroup,
325
- VUploadFileButton,
326
- VForm,
327
- VFormItem,
328
- VMenu,
329
- VMenuSlide,
330
- VPopup,
331
- VGrid,
332
- VIconGrid,
333
- VWaterfall,
334
- VCard,
335
- VTable,
336
- VOverlay,
337
- VSwitch,
338
- VHeaderNavigationBar,
339
- VMinLoading,
340
- VPullUpRefresh,
341
- VNull,
342
- VDateTime,
343
- VDrumSelectPicker,
344
- VScrollList,
345
- VInputCode,
346
- VCollapse,
347
- VSteps,
348
- VTitle,
349
- VImage,
350
- VToast,
351
- VInputDesensitize,
352
- VConsole,
353
- config
354
- }
355
-
356
- // 导出安装函数
357
- export {
358
- install
359
- }
360
-
361
- // 导出组件集合
362
- export {
363
- components
364
- }
365
-
366
- // 默认导出(用于全量引入)
367
- export default {
368
- version: '1.0.3',
369
- install,
370
- ...components,
371
- config
372
- }