dpzvc3-ui 3.1.5 → 3.1.6

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 (276) hide show
  1. package/README.md +1 -1
  2. package/dist/dpzvc3.esm.js +5 -4
  3. package/dist/dpzvc3.esm.js.map +1 -1
  4. package/dist/dpzvc3.esm.min.js +1 -1
  5. package/dist/dpzvc3.esm.min.js.map +1 -1
  6. package/dist/dpzvc3.js +5 -4
  7. package/dist/dpzvc3.js.map +1 -1
  8. package/dist/dpzvc3.min.js +1 -1
  9. package/dist/dpzvc3.min.js.map +1 -1
  10. package/dist/types/components/actionSheet/index.d.ts +6 -1
  11. package/dist/types/components/actionSheet/index.d.ts.map +1 -1
  12. package/package.json +7 -2
  13. package/build-style.js +0 -58
  14. package/dist-prod/91.05c8ec5277a15f939b0f.js +0 -3
  15. package/dist-prod/91.05c8ec5277a15f939b0f.js.LICENSE.txt +0 -25
  16. package/dist-prod/91.05c8ec5277a15f939b0f.js.map +0 -1
  17. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js +0 -2
  18. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js.map +0 -1
  19. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js +0 -2
  20. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js.map +0 -1
  21. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js +0 -2
  22. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js.map +0 -1
  23. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js +0 -2
  24. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js.map +0 -1
  25. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js +0 -2
  26. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js.map +0 -1
  27. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js +0 -2
  28. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js.map +0 -1
  29. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js +0 -2
  30. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js.map +0 -1
  31. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js +0 -2
  32. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js.map +0 -1
  33. package/dist-prod/header.eb10433dd892738ee95a.chunk.js +0 -2
  34. package/dist-prod/header.eb10433dd892738ee95a.chunk.js.map +0 -1
  35. package/dist-prod/index.html +0 -19
  36. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js +0 -2
  37. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js.map +0 -1
  38. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js +0 -2
  39. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js.map +0 -1
  40. package/dist-prod/main.662ad15361e7f3d20234.js +0 -2
  41. package/dist-prod/main.662ad15361e7f3d20234.js.map +0 -1
  42. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js +0 -2
  43. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js.map +0 -1
  44. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js +0 -2
  45. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js.map +0 -1
  46. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js +0 -2
  47. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js.map +0 -1
  48. package/dist-prod/popup.538422c7e188363a468d.chunk.js +0 -2
  49. package/dist-prod/popup.538422c7e188363a468d.chunk.js.map +0 -1
  50. package/dist-prod/progress.240de4b633002f573030.chunk.js +0 -2
  51. package/dist-prod/progress.240de4b633002f573030.chunk.js.map +0 -1
  52. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js +0 -2
  53. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js.map +0 -1
  54. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js +0 -2
  55. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js.map +0 -1
  56. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js +0 -2
  57. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js.map +0 -1
  58. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js +0 -2
  59. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js.map +0 -1
  60. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js +0 -2
  61. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js.map +0 -1
  62. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js +0 -2
  63. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js.map +0 -1
  64. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js +0 -2
  65. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js.map +0 -1
  66. package/dist-prod/tab.29f19483f699b7811259.chunk.js +0 -2
  67. package/dist-prod/tab.29f19483f699b7811259.chunk.js.map +0 -1
  68. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js +0 -2
  69. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js.map +0 -1
  70. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js +0 -2
  71. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js.map +0 -1
  72. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js +0 -2
  73. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js.map +0 -1
  74. package/postcss.config.js +0 -5
  75. package/src/components/Indicator/Indicator.tsx +0 -67
  76. package/src/components/Indicator/Indicator.vue +0 -82
  77. package/src/components/Indicator/index.ts +0 -111
  78. package/src/components/Indicator/types.ts +0 -15
  79. package/src/components/Text/index.ts +0 -14
  80. package/src/components/Text/textBar.tsx +0 -104
  81. package/src/components/Text/types.ts +0 -13
  82. package/src/components/actionSheet/actionSheet.d.ts +0 -16
  83. package/src/components/actionSheet/actionSheet.tsx +0 -86
  84. package/src/components/actionSheet/index.ts +0 -6
  85. package/src/components/actionSheet/types.ts +0 -10
  86. package/src/components/app.vue +0 -59
  87. package/src/components/badge/badge.tsx +0 -80
  88. package/src/components/badge/index.ts +0 -12
  89. package/src/components/badge/types.ts +0 -8
  90. package/src/components/button/button.tsx +0 -105
  91. package/src/components/button/index.ts +0 -13
  92. package/src/components/button/types.ts +0 -13
  93. package/src/components/card/card.d.ts +0 -16
  94. package/src/components/card/card.tsx +0 -38
  95. package/src/components/card/index.ts +0 -12
  96. package/src/components/card/types.ts +0 -3
  97. package/src/components/cell/cell.tsx +0 -89
  98. package/src/components/cell/index.ts +0 -12
  99. package/src/components/cell/types.ts +0 -8
  100. package/src/components/cellSwipe/cellSwipe.tsx +0 -188
  101. package/src/components/cellSwipe/index.ts +0 -13
  102. package/src/components/cellSwipe/types.ts +0 -17
  103. package/src/components/checkBox/checkbox-group.tsx +0 -75
  104. package/src/components/checkBox/checkbox.tsx +0 -107
  105. package/src/components/checkBox/index.ts +0 -29
  106. package/src/components/checkBox/types.ts +0 -32
  107. package/src/components/header/header.tsx +0 -119
  108. package/src/components/header/index.ts +0 -13
  109. package/src/components/header/types.ts +0 -7
  110. package/src/components/loadMore/index.ts +0 -14
  111. package/src/components/loadMore/loadMore.tsx +0 -265
  112. package/src/components/loadMore/types.ts +0 -26
  113. package/src/components/message/confirm.ts +0 -104
  114. package/src/components/message/index.ts +0 -113
  115. package/src/components/message/message.tsx +0 -100
  116. package/src/components/message/messageGroup.tsx +0 -59
  117. package/src/components/message/types.ts +0 -48
  118. package/src/components/modal/confirm.ts +0 -123
  119. package/src/components/modal/index.ts +0 -68
  120. package/src/components/modal/modal.tsx +0 -248
  121. package/src/components/modal/types.ts +0 -51
  122. package/src/components/number/Number.tsx +0 -143
  123. package/src/components/number/index.ts +0 -10
  124. package/src/components/number/types.ts +0 -13
  125. package/src/components/picker/area-picker/area-picker.vue +0 -230
  126. package/src/components/picker/area-picker/props.js +0 -17
  127. package/src/components/picker/date-picker/date-picker.vue +0 -191
  128. package/src/components/picker/date-picker/props.js +0 -24
  129. package/src/components/picker/index.ts +0 -12
  130. package/src/components/picker/normal-picker/normal-picker.vue +0 -120
  131. package/src/components/picker/normal-picker/props.js +0 -20
  132. package/src/components/picker/picker-slot.vue +0 -217
  133. package/src/components/picker/picker.tsx +0 -112
  134. package/src/components/picker/types.ts +0 -17
  135. package/src/components/popup/index.ts +0 -12
  136. package/src/components/popup/popup.d.ts +0 -16
  137. package/src/components/popup/popup.tsx +0 -68
  138. package/src/components/popup/types.ts +0 -9
  139. package/src/components/progress/index.ts +0 -12
  140. package/src/components/progress/progress.tsx +0 -81
  141. package/src/components/progress/types.ts +0 -9
  142. package/src/components/prompt/confirm.ts +0 -104
  143. package/src/components/prompt/index.ts +0 -50
  144. package/src/components/prompt/prompt.tsx +0 -161
  145. package/src/components/prompt/types.ts +0 -45
  146. package/src/components/radioBox/index.ts +0 -34
  147. package/src/components/radioBox/radiobox-group.tsx +0 -66
  148. package/src/components/radioBox/radiobox.tsx +0 -115
  149. package/src/components/radioBox/types.ts +0 -24
  150. package/src/components/rater/index.ts +0 -12
  151. package/src/components/rater/rater.d.ts +0 -16
  152. package/src/components/rater/raters.tsx +0 -101
  153. package/src/components/rater/types.ts +0 -10
  154. package/src/components/slideBar/index.ts +0 -13
  155. package/src/components/slideBar/slideBar.tsx +0 -288
  156. package/src/components/slideBar/types.ts +0 -20
  157. package/src/components/spinner/behavior/blade.vue +0 -42
  158. package/src/components/spinner/behavior/double-bounce.vue +0 -38
  159. package/src/components/spinner/behavior/fading-circle.vue +0 -55
  160. package/src/components/spinner/behavior/snake.vue +0 -41
  161. package/src/components/spinner/behavior/triple-bounce.vue +0 -52
  162. package/src/components/spinner/index.ts +0 -13
  163. package/src/components/spinner/props.js +0 -28
  164. package/src/components/spinner/spinner.tsx +0 -85
  165. package/src/components/spinner/types.ts +0 -20
  166. package/src/components/swipe/index.ts +0 -13
  167. package/src/components/swipe/swipe.tsx +0 -292
  168. package/src/components/swipe/types.ts +0 -21
  169. package/src/components/switchbar/index.ts +0 -13
  170. package/src/components/switchbar/switchbar.tsx +0 -58
  171. package/src/components/switchbar/types.ts +0 -6
  172. package/src/components/tab/index.ts +0 -12
  173. package/src/components/tab/tab.tsx +0 -71
  174. package/src/components/tab/types.ts +0 -15
  175. package/src/components/toTop/index.ts +0 -13
  176. package/src/components/toTop/toTop.tsx +0 -54
  177. package/src/components/toTop/types.ts +0 -7
  178. package/src/components/upload/index.ts +0 -13
  179. package/src/components/upload/types.ts +0 -9
  180. package/src/components/upload/upload.tsx +0 -180
  181. package/src/config/config.js +0 -16
  182. package/src/directives/clickoutside.js +0 -42
  183. package/src/directives/tranferDom.js +0 -66
  184. package/src/index.d.ts +0 -131
  185. package/src/index.ts +0 -136
  186. package/src/lib/MegaPixImage.js +0 -164
  187. package/src/lib/MegaPixImageOld.js +0 -153
  188. package/src/lib/exif-js.js +0 -235
  189. package/src/lib/exif.js +0 -789
  190. package/src/lib/lib.js +0 -22
  191. package/src/main.ts +0 -33
  192. package/src/mixin/emitter.js +0 -72
  193. package/src/mixin/input.js +0 -41
  194. package/src/router.ts +0 -36
  195. package/src/shims-vue.d.ts +0 -37
  196. package/src/styles/base/font.less +0 -99
  197. package/src/styles/base/reset.less +0 -135
  198. package/src/styles/base/variable.less +0 -108
  199. package/src/styles/components/actionSheet.less +0 -43
  200. package/src/styles/components/badge.less +0 -81
  201. package/src/styles/components/button.less +0 -124
  202. package/src/styles/components/card.less +0 -31
  203. package/src/styles/components/cell-swipe.less +0 -20
  204. package/src/styles/components/cell.less +0 -75
  205. package/src/styles/components/checkBox.less +0 -113
  206. package/src/styles/components/editor.less +0 -3
  207. package/src/styles/components/header.less +0 -72
  208. package/src/styles/components/indicator.less +0 -39
  209. package/src/styles/components/loadmore.less +0 -48
  210. package/src/styles/components/message.less +0 -57
  211. package/src/styles/components/modal.less +0 -84
  212. package/src/styles/components/number.less +0 -60
  213. package/src/styles/components/picker.less +0 -152
  214. package/src/styles/components/popup.less +0 -46
  215. package/src/styles/components/progress.less +0 -52
  216. package/src/styles/components/prompt.less +0 -37
  217. package/src/styles/components/radioBox.less +0 -142
  218. package/src/styles/components/rater.less +0 -16
  219. package/src/styles/components/slide-Bar.less +0 -149
  220. package/src/styles/components/spinner.less +0 -329
  221. package/src/styles/components/swipe.less +0 -125
  222. package/src/styles/components/switchBar.less +0 -88
  223. package/src/styles/components/tab.less +0 -71
  224. package/src/styles/components/text.less +0 -82
  225. package/src/styles/components/toTop.less +0 -28
  226. package/src/styles/components/upload.less +0 -23
  227. package/src/styles/index.less +0 -39
  228. package/src/styles/utils/1px.less +0 -206
  229. package/src/styles/utils/animation.less +0 -165
  230. package/src/styles/utils/nowrap.less +0 -19
  231. package/src/template/index.ejs +0 -40
  232. package/src/types/index.d.ts +0 -127
  233. package/src/types/js-shims.d.ts +0 -36
  234. package/src/utils/test.ts +0 -2
  235. package/src/utils/util.ts +0 -168
  236. package/src/utils/util1.js +0 -202
  237. package/src/vconsole-resources.min.js +0 -6
  238. package/src/vconsole-sources.min.js +0 -6
  239. package/src/vconsole.min.js +0 -7
  240. package/src/views/ActionSheet.vue +0 -46
  241. package/src/views/Badge/Badge.less +0 -12
  242. package/src/views/Badge/Badge.tsx +0 -23
  243. package/src/views/Badge.vue +0 -53
  244. package/src/views/Button.vue +0 -69
  245. package/src/views/Card.vue +0 -89
  246. package/src/views/Cell.vue +0 -31
  247. package/src/views/CellSwipe.vue +0 -80
  248. package/src/views/CheckBox.vue +0 -78
  249. package/src/views/Header.vue +0 -71
  250. package/src/views/Indicator.vue +0 -82
  251. package/src/views/LoadMore.vue +0 -76
  252. package/src/views/Message.vue +0 -61
  253. package/src/views/Modal.vue +0 -69
  254. package/src/views/Picker.vue +0 -142
  255. package/src/views/Popup.vue +0 -103
  256. package/src/views/Progress.vue +0 -49
  257. package/src/views/Prompt.vue +0 -43
  258. package/src/views/RadioBox.vue +0 -70
  259. package/src/views/Rater.vue +0 -53
  260. package/src/views/SlideBar.vue +0 -62
  261. package/src/views/Spinner.vue +0 -27
  262. package/src/views/Swipe.vue +0 -59
  263. package/src/views/SwitchBar.vue +0 -49
  264. package/src/views/Tab.vue +0 -55
  265. package/src/views/Text.vue +0 -97
  266. package/src/views/ToTop.vue +0 -31
  267. package/src/views/Upload.vue +0 -65
  268. package/src/views/guide.vue +0 -164
  269. package/src/views/index.vue +0 -554
  270. package/tsconfig.build.json +0 -31
  271. package/tsconfig.json +0 -41
  272. package/webpack.base.config.js +0 -85
  273. package/webpack.dev.config.js +0 -43
  274. package/webpack.dist.dev.config.js +0 -76
  275. package/webpack.dist.prod.config.js +0 -90
  276. package/webpack.prod.config.js +0 -52
@@ -1,45 +0,0 @@
1
- // src/components/Prompt/types.ts
2
- import type { CSSProperties } from 'vue'
3
- type PromptValidator =
4
- | RegExp
5
- | ((val: string) => boolean | string)
6
-
7
- export interface PromptProps {
8
- value?: boolean
9
- text?: string
10
- closable?: boolean
11
- maskClosable?: boolean
12
- title?: string
13
- width?: string
14
- okText?: string
15
- cancleText?: string
16
- loading?: boolean
17
- styles?: CSSProperties
18
- spec?: string
19
- validator?: PromptValidator | null
20
- msg?: string
21
- placeholderText?: string
22
- onOk?: (val: string) => void
23
- onCancle?: () => void
24
- }
25
-
26
- export type MergePromptOptions<T = PromptProps> = {
27
- [K in keyof T]: T[K]
28
- } & {
29
- onRemove?: () => void
30
- showCancle?: boolean,
31
- message?: string
32
- }
33
-
34
-
35
- // Prompt实例
36
- export type PromptInstance = {
37
- remove: () => void,
38
- info: (props: MergePromptOptions) => any
39
- }
40
- //开启
41
- export type DefaultPromptProps = {
42
- show: (options: MergePromptOptions) => any,
43
- remove: () => void,
44
- // component: ComponentPublicInstance
45
- } | null
@@ -1,34 +0,0 @@
1
- /**
2
- * Created by admin on 2017/4/19.
3
- */
4
- // import RadioBox from './radiobox.vue'
5
- // import RadioBoxGroup from './radiobox-group.vue'
6
-
7
- // RadioBox.group = RadioBoxGroup
8
- // export default RadioBox
9
- import type { App } from 'vue'
10
- import RadioBox from './radiobox'
11
- import RadioBoxGroup from './radiobox-group'
12
-
13
- RadioBox.install = (app: App): void => {
14
- app.component('RadioBox', RadioBox); // 注册全局组件
15
- }
16
- type IWithInstall<T> = T & { install(app: App): void };
17
- const _RadioBox = RadioBox as IWithInstall<typeof RadioBox>;
18
-
19
-
20
-
21
- RadioBoxGroup.install = (app: App): void => {
22
- app.component('RadioBoxGroup', RadioBoxGroup); // 注册全局组件
23
- }
24
- const _RadioBoxGroup = RadioBoxGroup as IWithInstall<typeof RadioBoxGroup>;
25
-
26
- export {
27
- _RadioBox as RadioBox,
28
- _RadioBoxGroup as RadioBoxGroup
29
- }
30
- // export {
31
- // RadioBox,
32
- // RadioBoxGroup
33
- // }
34
- export type { RadioBoxProps, RadioGroupProps } from './types'
@@ -1,66 +0,0 @@
1
- // src/components/radio-group/RadioGroup.tsx
2
- import {
3
- defineComponent,
4
- computed,
5
- watch,
6
- provide,
7
- ref,
8
- PropType
9
- } from 'vue'
10
- import type { RadioGroupProps, RadioGroupProvide } from './types'
11
- export type { RadioGroupProps }
12
-
13
- const prefixCls = 'dpzvc3-radioBoxGroup'
14
-
15
- export default defineComponent({
16
- name: 'DpzVcRadioGroup',
17
-
18
- props: {
19
- modelValue: {
20
- type: [String, Number, Boolean] as PropType<RadioGroupProps['modelValue']>,
21
- default: ''
22
- },
23
- vertical: {
24
- type: Boolean,
25
- default: false
26
- }
27
- },
28
-
29
- emits: ['update:modelValue', 'on-change', 'on-form-change'],
30
-
31
- setup(props, { emit, slots }) {
32
- const currentValue = ref<RadioGroupProps['modelValue']>(props.modelValue) as RadioGroupProvide['currentValue']
33
-
34
- /** 提供给 Radio 子组件 */
35
- const change = (val: RadioGroupProps['modelValue']) => {
36
- currentValue.value = val!
37
- emit('update:modelValue', val)
38
- emit('on-change', val)
39
- emit('on-form-change', val)
40
- }
41
-
42
- provide<RadioGroupProvide>('radioBoxGroup', {
43
- currentValue,
44
- change
45
- })
46
-
47
- /** 监听外部 v-model */
48
- watch(
49
- () => props.modelValue,
50
- val => {
51
- currentValue.value = val
52
- }
53
- )
54
-
55
- const classes = computed(() => [
56
- prefixCls,
57
- { [`${prefixCls}-vertical`]: props.vertical }
58
- ])
59
-
60
- return () => (
61
- <div class={classes.value}>
62
- {slots.default?.()}
63
- </div>
64
- )
65
- }
66
- })
@@ -1,115 +0,0 @@
1
- // src/components/RadioBox/RadioBox.tsx
2
- import {
3
- defineComponent,
4
- inject,
5
- computed,
6
- ref,
7
- onMounted
8
- } from 'vue'
9
- import type { PropType } from 'vue'
10
- import type {
11
- RadioBoxProps,
12
- RadioGroupProvide,
13
- } from './types'
14
- export type { RadioBoxProps }
15
- const prefixCls = 'dpzvc3-radiobox'
16
- const radioGroupKey = 'radioBoxGroup'
17
-
18
- export default defineComponent({
19
- name: 'RadioBox',
20
-
21
- props: {
22
- label: {
23
- type: [String, Number] as PropType<RadioBoxProps['label']>,
24
- required: true
25
- },
26
- modelValue: {
27
- type: Boolean,
28
- default: false
29
- },
30
- disable: {
31
- type: Boolean,
32
- default: false
33
- }
34
- },
35
-
36
- emits: ['update:modelValue', 'on-change'],
37
-
38
- setup (props, { emit, slots }) {
39
- const slotEl = ref<HTMLElement | null>(null)
40
- const show = ref(true)
41
-
42
- /** 注入 RadioGroup(可选) */
43
- const group = inject<RadioGroupProvide | null>(
44
- radioGroupKey,
45
- null
46
- )
47
-
48
- /** 是否选中 */
49
- const isChecked = computed<boolean>(() => {
50
- if (group) {
51
- return group.currentValue.value === props.label
52
- }
53
- return !!props.modelValue
54
- })
55
-
56
- /** classes */
57
- const classes = computed(() => [prefixCls])
58
-
59
- const wrapperClasses = computed(() => [
60
- `${prefixCls}-wrapper`,
61
- {
62
- [`${prefixCls}-checked`]: isChecked.value,
63
- [`${prefixCls}-disable`]: props.disable
64
- }
65
- ])
66
-
67
- const innerClasses = computed(() => [`${prefixCls}-inner`])
68
- const inputClass = computed(() => [`${prefixCls}-input`])
69
-
70
- /** change */
71
- const handleChange = (e: Event) => {
72
- if (props.disable) return
73
-
74
- const checked = (e.target as HTMLInputElement).checked
75
-
76
- if (group) {
77
- group.change(props.label)
78
- } else {
79
- emit('update:modelValue', checked)
80
- emit('on-change', checked)
81
- }
82
- }
83
-
84
- /** 判断 slot 是否为空 */
85
- onMounted(() => {
86
- if (!group) {
87
- if (slotEl.value && !slotEl.value.innerHTML) {
88
- show.value = false
89
- }
90
- }
91
- })
92
-
93
- return () => (
94
- <label class={classes.value}>
95
- <span class={wrapperClasses.value}>
96
- <span class={innerClasses.value}>
97
- <input
98
- type="radio"
99
- disabled={props.disable}
100
- checked={isChecked.value}
101
- class={inputClass.value}
102
- onChange={handleChange}
103
- />
104
- </span>
105
- </span>
106
-
107
- {show.value && (
108
- slots.default
109
- ? slots.default()
110
- : <span ref={slotEl}>{props.label}</span>
111
- )}
112
- </label>
113
- )
114
- }
115
- })
@@ -1,24 +0,0 @@
1
- // src/components/radio-group/types.ts
2
- import type { Ref } from 'vue'
3
-
4
- type RadioValue = string | number | boolean
5
-
6
- export interface RadioGroupProps {
7
- modelValue?: RadioValue
8
- vertical?: boolean
9
- }
10
-
11
- export interface RadioGroupProvide {
12
- currentValue: Ref<RadioValue>
13
- change: (val: RadioValue) => void
14
- }
15
-
16
-
17
- type RadioBoxValue = string | number
18
-
19
-
20
- export interface RadioBoxProps {
21
- label: RadioBoxValue
22
- modelValue?: boolean
23
- disable?: boolean
24
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * Created by admin on 2025/10/31.
3
- */
4
- import type { App } from 'vue'
5
- import Rater from './raters'
6
- Rater.install = (app: App): void => {
7
- app.component('Rater', Rater); // 注册全局组件
8
- }
9
- type IWithInstall<T> = T & { install(app: App): void };
10
- const _Rater=Rater as IWithInstall<typeof Rater>;
11
- export default _Rater
12
- export type { RaterProps } from './types'
@@ -1,16 +0,0 @@
1
- // src/components/badge/badge.d.ts
2
-
3
- import type { App } from 'vue'
4
- import type { RaterProps } from './types' // 引入同级 types.ts 中的 BadgeProps
5
-
6
- /** Badge 组件实例类型,带 install 方法 */
7
- declare const Rater: {
8
- /** Vue 组件本身 */
9
- new (): any
10
- /** props 类型引用 */
11
- __props?: RaterProps
12
- /** install 方法,用于全量注册 */
13
- install(app: App): void
14
- }
15
-
16
- export default ActionSheet
@@ -1,101 +0,0 @@
1
- // src/components/rater/rater.tsx
2
- // src/components/rater/rater.tsx
3
-
4
-
5
- import { defineComponent, ref, watch, computed, PropType } from 'vue'
6
- import type { RaterProps } from './types'
7
- export type { RaterProps }
8
- const prefixCls = 'dpzvc3-rater'
9
-
10
- export default defineComponent({
11
- name: 'Dpzvc3Rater',
12
-
13
- props: {
14
- modelValue: { type: Number as PropType<number>, default: -1 },
15
- distance: { type: Number as PropType<number>, default: 10 },
16
- max: { type: Number as PropType<number>, default: 5 },
17
- size: { type: Number as PropType<number>, default: 18 },
18
- star: { type: String as PropType<string>, default: '★' },
19
- defaultColor: { type: String as PropType<string>, default: '#ccc' },
20
- activeColor: { type: String as PropType<string>, default: '#f5a623' },
21
- disabled: { type: Boolean as PropType<boolean>, default: false }
22
- },
23
-
24
- emits: ['update:modelValue'],
25
-
26
- setup(props, { emit }) {
27
- const currentValue = ref(props.modelValue)
28
-
29
- watch(() => props.modelValue, v => {
30
- currentValue.value = v
31
- })
32
-
33
- const classes = computed(() => [prefixCls])
34
- const starClass = `${prefixCls}-star`
35
-
36
- /** ⭐️ 关键:提前算好 stars 数组 */
37
- const stars = computed(() => {
38
- return Array.from({ length: props.max }).map((_, index) => {
39
- const baseStyle: Record<string, string> = {
40
- fontSize: `${props.size}px`,
41
- marginRight: index + 1 < props.max ? `${props.distance}px` : '0px',
42
- color: props.defaultColor
43
- }
44
-
45
- const activeStyle: Record<string, string> = {
46
- fontSize: `${props.size}px`,
47
- marginRight: baseStyle.marginRight
48
- }
49
-
50
- const [int, decimal] = String(currentValue.value).split('.')
51
-
52
- if (index + 1 <= Number(int)) {
53
- activeStyle.color = props.activeColor
54
- }
55
-
56
- if (
57
- decimal &&
58
- Number(decimal) >= 5 &&
59
- index + 1 === Number(int) + 1
60
- ) {
61
- activeStyle.width = '50%'
62
- activeStyle.color = props.activeColor
63
- }
64
-
65
- return {
66
- index,
67
- baseStyle,
68
- activeStyle
69
- }
70
- })
71
- })
72
-
73
- const onClickStar = (index: number) => {
74
- if (props.disabled) return
75
- const value = index + 1
76
- currentValue.value = value
77
- emit('update:modelValue', value)
78
- }
79
-
80
- /** ✅ render 里只“消费数据”,不计算 */
81
- return () => (
82
- <div class={classes.value}>
83
- {stars.value.map(item => (
84
- <span
85
- key={item.index}
86
- class={starClass}
87
- style={item.baseStyle}
88
- >
89
- {props.star}
90
- <span
91
- style={item.activeStyle}
92
- onClick={() => onClickStar(item.index)}
93
- >
94
- {props.star}
95
- </span>
96
- </span>
97
- ))}
98
- </div>
99
- )
100
- }
101
- })
@@ -1,10 +0,0 @@
1
- export type RaterProps = {
2
- modelValue?: number
3
- distance?: number
4
- max?: number
5
- size?: number
6
- star?: string
7
- defaultColor?: string
8
- activeColor?: string
9
- disabled?: boolean
10
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Created by admin on 2017/4/21.
3
- */
4
- import type { App } from 'vue'
5
- import SlideBar from './slideBar'
6
- SlideBar.install = (app: App): void => {
7
- app.component('SlideBar', SlideBar); // 注册全局组件
8
- }
9
- type IWithInstall<T> = T & { install(app: App): void };
10
- const _SlideBar=SlideBar as IWithInstall<typeof SlideBar>;
11
- export default _SlideBar
12
- // export default SlideBar
13
- export type { SlideBarProps } from './types'