dpzvc3-ui 3.1.4 → 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 (279) 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/dist/types/index.d.ts +2 -2
  13. package/package.json +7 -2
  14. package/build-style.js +0 -58
  15. package/dist-prod/91.05c8ec5277a15f939b0f.js +0 -3
  16. package/dist-prod/91.05c8ec5277a15f939b0f.js.LICENSE.txt +0 -25
  17. package/dist-prod/91.05c8ec5277a15f939b0f.js.map +0 -1
  18. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js +0 -2
  19. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js.map +0 -1
  20. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js +0 -2
  21. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js.map +0 -1
  22. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js +0 -2
  23. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js.map +0 -1
  24. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js +0 -2
  25. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js.map +0 -1
  26. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js +0 -2
  27. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js.map +0 -1
  28. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js +0 -2
  29. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js.map +0 -1
  30. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js +0 -2
  31. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js.map +0 -1
  32. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js +0 -2
  33. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js.map +0 -1
  34. package/dist-prod/header.eb10433dd892738ee95a.chunk.js +0 -2
  35. package/dist-prod/header.eb10433dd892738ee95a.chunk.js.map +0 -1
  36. package/dist-prod/index.html +0 -19
  37. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js +0 -2
  38. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js.map +0 -1
  39. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js +0 -2
  40. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js.map +0 -1
  41. package/dist-prod/main.662ad15361e7f3d20234.js +0 -2
  42. package/dist-prod/main.662ad15361e7f3d20234.js.map +0 -1
  43. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js +0 -2
  44. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js.map +0 -1
  45. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js +0 -2
  46. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js.map +0 -1
  47. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js +0 -2
  48. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js.map +0 -1
  49. package/dist-prod/popup.538422c7e188363a468d.chunk.js +0 -2
  50. package/dist-prod/popup.538422c7e188363a468d.chunk.js.map +0 -1
  51. package/dist-prod/progress.240de4b633002f573030.chunk.js +0 -2
  52. package/dist-prod/progress.240de4b633002f573030.chunk.js.map +0 -1
  53. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js +0 -2
  54. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js.map +0 -1
  55. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js +0 -2
  56. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js.map +0 -1
  57. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js +0 -2
  58. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js.map +0 -1
  59. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js +0 -2
  60. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js.map +0 -1
  61. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js +0 -2
  62. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js.map +0 -1
  63. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js +0 -2
  64. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js.map +0 -1
  65. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js +0 -2
  66. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js.map +0 -1
  67. package/dist-prod/tab.29f19483f699b7811259.chunk.js +0 -2
  68. package/dist-prod/tab.29f19483f699b7811259.chunk.js.map +0 -1
  69. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js +0 -2
  70. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js.map +0 -1
  71. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js +0 -2
  72. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js.map +0 -1
  73. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js +0 -2
  74. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js.map +0 -1
  75. package/postcss.config.js +0 -5
  76. package/src/components/Indicator/Indicator.tsx +0 -67
  77. package/src/components/Indicator/Indicator.vue +0 -82
  78. package/src/components/Indicator/index.ts +0 -111
  79. package/src/components/Indicator/types.ts +0 -15
  80. package/src/components/Text/index.ts +0 -14
  81. package/src/components/Text/textBar.tsx +0 -104
  82. package/src/components/Text/types.ts +0 -13
  83. package/src/components/actionSheet/actionSheet.d.ts +0 -16
  84. package/src/components/actionSheet/actionSheet.tsx +0 -86
  85. package/src/components/actionSheet/index.ts +0 -6
  86. package/src/components/actionSheet/types.ts +0 -10
  87. package/src/components/app.vue +0 -59
  88. package/src/components/badge/badge.tsx +0 -80
  89. package/src/components/badge/index.ts +0 -12
  90. package/src/components/badge/types.ts +0 -8
  91. package/src/components/button/button.tsx +0 -105
  92. package/src/components/button/index.ts +0 -13
  93. package/src/components/button/types.ts +0 -13
  94. package/src/components/card/card.d.ts +0 -16
  95. package/src/components/card/card.tsx +0 -38
  96. package/src/components/card/index.ts +0 -12
  97. package/src/components/card/types.ts +0 -3
  98. package/src/components/cell/cell.tsx +0 -89
  99. package/src/components/cell/index.ts +0 -12
  100. package/src/components/cell/types.ts +0 -8
  101. package/src/components/cellSwipe/cellSwipe.tsx +0 -188
  102. package/src/components/cellSwipe/index.ts +0 -13
  103. package/src/components/cellSwipe/types.ts +0 -17
  104. package/src/components/checkBox/checkbox-group.tsx +0 -75
  105. package/src/components/checkBox/checkbox.tsx +0 -107
  106. package/src/components/checkBox/index.ts +0 -29
  107. package/src/components/checkBox/types.ts +0 -32
  108. package/src/components/header/header.tsx +0 -119
  109. package/src/components/header/index.ts +0 -13
  110. package/src/components/header/types.ts +0 -7
  111. package/src/components/loadMore/index.ts +0 -14
  112. package/src/components/loadMore/loadMore.tsx +0 -265
  113. package/src/components/loadMore/types.ts +0 -26
  114. package/src/components/message/confirm.ts +0 -104
  115. package/src/components/message/index.ts +0 -113
  116. package/src/components/message/message.tsx +0 -100
  117. package/src/components/message/messageGroup.tsx +0 -59
  118. package/src/components/message/types.ts +0 -48
  119. package/src/components/modal/confirm.ts +0 -123
  120. package/src/components/modal/index.ts +0 -68
  121. package/src/components/modal/modal.tsx +0 -248
  122. package/src/components/modal/types.ts +0 -51
  123. package/src/components/number/Number.tsx +0 -143
  124. package/src/components/number/index.ts +0 -10
  125. package/src/components/number/types.ts +0 -13
  126. package/src/components/picker/area-picker/area-picker.vue +0 -230
  127. package/src/components/picker/area-picker/props.js +0 -17
  128. package/src/components/picker/date-picker/date-picker.vue +0 -191
  129. package/src/components/picker/date-picker/props.js +0 -24
  130. package/src/components/picker/index.ts +0 -12
  131. package/src/components/picker/normal-picker/normal-picker.vue +0 -120
  132. package/src/components/picker/normal-picker/props.js +0 -20
  133. package/src/components/picker/picker-slot.vue +0 -217
  134. package/src/components/picker/picker.tsx +0 -112
  135. package/src/components/picker/types.ts +0 -17
  136. package/src/components/popup/index.ts +0 -12
  137. package/src/components/popup/popup.d.ts +0 -16
  138. package/src/components/popup/popup.tsx +0 -68
  139. package/src/components/popup/types.ts +0 -9
  140. package/src/components/progress/index.ts +0 -12
  141. package/src/components/progress/progress.tsx +0 -81
  142. package/src/components/progress/types.ts +0 -9
  143. package/src/components/prompt/confirm.ts +0 -104
  144. package/src/components/prompt/index.ts +0 -50
  145. package/src/components/prompt/prompt.tsx +0 -161
  146. package/src/components/prompt/types.ts +0 -45
  147. package/src/components/radioBox/index.ts +0 -34
  148. package/src/components/radioBox/radiobox-group.tsx +0 -66
  149. package/src/components/radioBox/radiobox-group1.vue +0 -66
  150. package/src/components/radioBox/radiobox.tsx +0 -115
  151. package/src/components/radioBox/radiobox1.vue +0 -89
  152. package/src/components/radioBox/types.ts +0 -24
  153. package/src/components/rater/index.ts +0 -12
  154. package/src/components/rater/rater.d.ts +0 -16
  155. package/src/components/rater/raters.tsx +0 -101
  156. package/src/components/rater/types.ts +0 -10
  157. package/src/components/slideBar/index.ts +0 -13
  158. package/src/components/slideBar/slideBar.tsx +0 -288
  159. package/src/components/slideBar/types.ts +0 -20
  160. package/src/components/spinner/behavior/blade.vue +0 -42
  161. package/src/components/spinner/behavior/double-bounce.vue +0 -38
  162. package/src/components/spinner/behavior/fading-circle.vue +0 -55
  163. package/src/components/spinner/behavior/snake.vue +0 -41
  164. package/src/components/spinner/behavior/triple-bounce.vue +0 -52
  165. package/src/components/spinner/index.ts +0 -13
  166. package/src/components/spinner/props.js +0 -28
  167. package/src/components/spinner/spinner.tsx +0 -85
  168. package/src/components/spinner/types.ts +0 -20
  169. package/src/components/swipe/index.ts +0 -13
  170. package/src/components/swipe/swipe.tsx +0 -292
  171. package/src/components/swipe/types.ts +0 -21
  172. package/src/components/switchbar/index.ts +0 -13
  173. package/src/components/switchbar/switchbar.tsx +0 -58
  174. package/src/components/switchbar/types.ts +0 -6
  175. package/src/components/tab/index.ts +0 -12
  176. package/src/components/tab/tab.tsx +0 -71
  177. package/src/components/tab/types.ts +0 -15
  178. package/src/components/toTop/index.ts +0 -13
  179. package/src/components/toTop/toTop.tsx +0 -54
  180. package/src/components/toTop/types.ts +0 -7
  181. package/src/components/upload/index.ts +0 -13
  182. package/src/components/upload/types.ts +0 -9
  183. package/src/components/upload/upload.tsx +0 -180
  184. package/src/config/config.js +0 -16
  185. package/src/directives/clickoutside.js +0 -42
  186. package/src/directives/tranferDom.js +0 -66
  187. package/src/index.d.ts +0 -131
  188. package/src/index.ts +0 -136
  189. package/src/lib/MegaPixImage.js +0 -164
  190. package/src/lib/MegaPixImageOld.js +0 -153
  191. package/src/lib/exif-js.js +0 -235
  192. package/src/lib/exif.js +0 -789
  193. package/src/lib/lib.js +0 -22
  194. package/src/main.ts +0 -33
  195. package/src/mixin/emitter.js +0 -72
  196. package/src/mixin/input.js +0 -41
  197. package/src/router.ts +0 -36
  198. package/src/shims-vue.d.ts +0 -37
  199. package/src/styles/base/font.less +0 -99
  200. package/src/styles/base/reset.less +0 -135
  201. package/src/styles/base/variable.less +0 -108
  202. package/src/styles/components/actionSheet.less +0 -43
  203. package/src/styles/components/badge.less +0 -81
  204. package/src/styles/components/button.less +0 -124
  205. package/src/styles/components/card.less +0 -31
  206. package/src/styles/components/cell-swipe.less +0 -20
  207. package/src/styles/components/cell.less +0 -75
  208. package/src/styles/components/checkBox.less +0 -113
  209. package/src/styles/components/editor.less +0 -3
  210. package/src/styles/components/header.less +0 -72
  211. package/src/styles/components/indicator.less +0 -39
  212. package/src/styles/components/loadmore.less +0 -48
  213. package/src/styles/components/message.less +0 -57
  214. package/src/styles/components/modal.less +0 -84
  215. package/src/styles/components/number.less +0 -60
  216. package/src/styles/components/picker.less +0 -152
  217. package/src/styles/components/popup.less +0 -46
  218. package/src/styles/components/progress.less +0 -52
  219. package/src/styles/components/prompt.less +0 -37
  220. package/src/styles/components/radioBox.less +0 -142
  221. package/src/styles/components/rater.less +0 -16
  222. package/src/styles/components/slide-Bar.less +0 -149
  223. package/src/styles/components/spinner.less +0 -329
  224. package/src/styles/components/swipe.less +0 -125
  225. package/src/styles/components/switchBar.less +0 -88
  226. package/src/styles/components/tab.less +0 -71
  227. package/src/styles/components/text.less +0 -82
  228. package/src/styles/components/toTop.less +0 -28
  229. package/src/styles/components/upload.less +0 -23
  230. package/src/styles/index.less +0 -39
  231. package/src/styles/utils/1px.less +0 -206
  232. package/src/styles/utils/animation.less +0 -165
  233. package/src/styles/utils/nowrap.less +0 -19
  234. package/src/template/index.ejs +0 -40
  235. package/src/types/index.d.ts +0 -127
  236. package/src/types/js-shims.d.ts +0 -36
  237. package/src/utils/test.ts +0 -2
  238. package/src/utils/util.ts +0 -168
  239. package/src/utils/util1.js +0 -202
  240. package/src/vconsole-resources.min.js +0 -6
  241. package/src/vconsole-sources.min.js +0 -6
  242. package/src/vconsole.min.js +0 -7
  243. package/src/views/ActionSheet.vue +0 -46
  244. package/src/views/Badge/Badge.less +0 -12
  245. package/src/views/Badge/Badge.tsx +0 -23
  246. package/src/views/Badge.vue +0 -53
  247. package/src/views/Button.vue +0 -69
  248. package/src/views/Card.vue +0 -89
  249. package/src/views/Cell.vue +0 -31
  250. package/src/views/CellSwipe.vue +0 -80
  251. package/src/views/CheckBox.vue +0 -78
  252. package/src/views/Header.vue +0 -71
  253. package/src/views/Indicator.vue +0 -82
  254. package/src/views/LoadMore.vue +0 -76
  255. package/src/views/Message.vue +0 -61
  256. package/src/views/Modal.vue +0 -69
  257. package/src/views/Picker.vue +0 -142
  258. package/src/views/Popup.vue +0 -103
  259. package/src/views/Progress.vue +0 -49
  260. package/src/views/Prompt.vue +0 -43
  261. package/src/views/RadioBox.vue +0 -70
  262. package/src/views/Rater.vue +0 -53
  263. package/src/views/SlideBar.vue +0 -62
  264. package/src/views/Spinner.vue +0 -27
  265. package/src/views/Swipe.vue +0 -59
  266. package/src/views/SwitchBar.vue +0 -49
  267. package/src/views/Tab.vue +0 -55
  268. package/src/views/Text.vue +0 -97
  269. package/src/views/ToTop.vue +0 -31
  270. package/src/views/Upload.vue +0 -65
  271. package/src/views/guide.vue +0 -164
  272. package/src/views/index.vue +0 -554
  273. package/tsconfig.build.json +0 -31
  274. package/tsconfig.json +0 -41
  275. package/webpack.base.config.js +0 -85
  276. package/webpack.dev.config.js +0 -43
  277. package/webpack.dist.dev.config.js +0 -76
  278. package/webpack.dist.prod.config.js +0 -90
  279. package/webpack.prod.config.js +0 -52
@@ -1,71 +0,0 @@
1
- <template>
2
- <div class="Header">
3
- <!-- 默认 Header -->
4
- <div class="item">
5
- <DpHeader
6
- title="Header"
7
- :fixed="fixed"
8
- />
9
- </div>
10
-
11
- <!-- Header 右侧自定义 -->
12
- <div class="item">
13
- <DpHeader
14
- title="Header"
15
- :fixed="fixed"
16
- >
17
- <template #right>
18
- <span @click="share">分享</span>
19
- </template>
20
- </DpHeader>
21
- </div>
22
-
23
- <!-- Header 左右自定义 -->
24
- <div class="item">
25
- <DpHeader
26
- title="Header"
27
- :fixed="fixed"
28
- >
29
- <template #left>
30
- <span>返回</span>
31
- </template>
32
- <template #right>
33
- <span @click="share">分享</span>
34
- </template>
35
- </DpHeader>
36
- </div>
37
- </div>
38
- </template>
39
-
40
- <script lang="ts">
41
- import { ref, getCurrentInstance, defineComponent } from 'vue'
42
- // import DpHeader from '../components/header'
43
- export default defineComponent({
44
- name: 'ViewHeader',
45
- // components: { DpHeader },
46
- setup () {
47
- const { proxy } = getCurrentInstance()!
48
- const fixed = ref(false)
49
-
50
- const share = () => {
51
- // 假设 $Modal 已经在全局挂载
52
- if (proxy) {
53
- (proxy as any).$Modal.confirm({
54
- showHead: false,
55
- body: '点击了分享'
56
- })
57
- }
58
- }
59
-
60
- return { fixed, share }
61
- }
62
- })
63
- </script>
64
-
65
- <style scoped>
66
- .item {
67
- position: relative;
68
- margin-bottom: 20px;
69
- height: 50px;
70
- }
71
- </style>
@@ -1,82 +0,0 @@
1
- <template>
2
- <div class="Indicator">
3
- <div class="item">
4
- <DpButton @click="blade">
5
- blade
6
- </DpButton>
7
- </div>
8
- <div class="item">
9
- <DpButton @click="snake">
10
- snake
11
- </DpButton>
12
- </div>
13
- <div class="item">
14
- <DpButton @click="circle">
15
- circle
16
- </DpButton>
17
- </div>
18
- <div class="item">
19
- <DpButton @click="bounce">
20
- bounce
21
- </DpButton>
22
- </div>
23
- </div>
24
- </template>
25
-
26
- <script lang="ts">
27
- import { defineComponent, getCurrentInstance } from 'vue'
28
-
29
- export default defineComponent({
30
- name: 'ViewIndicator',
31
- setup () {
32
- const { proxy } = getCurrentInstance()!
33
- const removeAfterDelay = (duration = 3000) => {
34
- setTimeout(() => {
35
- proxy!.$Indicator.remove()
36
- }, duration)
37
- }
38
-
39
- const blade = () => {
40
- proxy!.$Indicator.blade({})
41
- removeAfterDelay()
42
- }
43
-
44
- const snake = () => {
45
- proxy!.$Indicator.snake({})
46
- removeAfterDelay()
47
- }
48
-
49
- const circle = () => {
50
- proxy!.$Indicator.circle({})
51
- removeAfterDelay()
52
- }
53
-
54
- const bounce = () => {
55
- proxy!.$Indicator.bounce({})
56
- removeAfterDelay()
57
- }
58
-
59
- return {
60
- blade,
61
- snake,
62
- circle,
63
- bounce
64
- }
65
- }
66
- })
67
- </script>
68
-
69
- <style lang="less" scoped>
70
- .Indicator {
71
- height: 100%;
72
- display: flex;
73
- justify-content: space-around;
74
- flex-direction: column;
75
- align-items: center;
76
-
77
- .item {
78
- margin: 0 auto;
79
- width: 50%;
80
- }
81
- }
82
- </style>
@@ -1,76 +0,0 @@
1
- <template>
2
- <div class="LoadMore">
3
- <DpLoadMore
4
- ref="moreRef"
5
- :refresh="topMethod"
6
- height="100%"
7
- :load-more="bottomMethod"
8
- :has-more="hasMore"
9
- @on-change-up-status="getStatus"
10
- >
11
- <div
12
- v-for="(item, index) in loadmore"
13
- :key="index"
14
- style="width: 100%; height: 50px;"
15
- >
16
- {{ item }}
17
- </div>
18
- </DpLoadMore>
19
- </div>
20
- </template>
21
-
22
- <script lang="ts">
23
- import { defineComponent, ref } from 'vue'
24
- // import DpLoadMore from '../components/loadMore'
25
- import type { LoadmoreProps } from '../components/loadMore/types'
26
- export default defineComponent({
27
- name: 'ViewLoadMore',
28
- // components: { DpLoadMore },
29
- setup () {
30
- const moreRef = ref(null)
31
- const hasMore = ref<LoadmoreProps['hasMore']>(true)
32
- const loadmore = ref(Array(16).fill('LoadMore'))
33
-
34
- const topMethod = () => {
35
- hasMore.value = true
36
-
37
- setTimeout(() => {
38
- // console.log(moreRef.value, '----moreRef----')
39
- if (moreRef.value && (moreRef.value as any).onLoadOff) {
40
- (moreRef.value as any).onLoadOff()
41
- }
42
- }, 2000)
43
- }
44
-
45
- const bottomMethod = () => {
46
- setTimeout(() => {
47
- if (moreRef.value && (moreRef.value as any).onLoadOff) {
48
- (moreRef.value as any).onLoadOff()
49
- }
50
- loadmore.value.push(...['LoadMore', 'LoadMore'])
51
- }, 2000)
52
- }
53
-
54
- const getStatus = (val: any) => {
55
- console.log(val)
56
- }
57
-
58
- return {
59
- moreRef,
60
- hasMore,
61
- loadmore,
62
- topMethod,
63
- bottomMethod,
64
- getStatus
65
- }
66
- }
67
- })
68
- </script>
69
-
70
- <style lang="less" scoped>
71
- .LoadMore {
72
- width: 100%;
73
- height: 100%;
74
- overflow: auto;
75
- }
76
- </style>
@@ -1,61 +0,0 @@
1
- <template>
2
- <div class="Message">
3
- <DpButton
4
- width="50%"
5
- @click="showMessageTop"
6
- >
7
- Top
8
- </DpButton>
9
- <DpButton
10
- width="50%"
11
- @click="showMessage"
12
- >
13
- Center
14
- </DpButton>
15
- <DpButton
16
- width="50%"
17
- @click="showMessageBottom"
18
- >
19
- Bottom
20
- </DpButton>
21
- </div>
22
- </template>
23
-
24
- <script lang="ts">
25
- import { getCurrentInstance, defineComponent } from 'vue'
26
-
27
- export default defineComponent({
28
- name: 'ViewMessage',
29
- setup () {
30
- // 获取全局实例
31
- const { proxy } = getCurrentInstance()!
32
- const showMessage = () => {
33
- proxy!.$Message.show({ text: '显示消息' })
34
- }
35
-
36
- const showMessageTop = () => {
37
- proxy!.$Message.show({ text: '显示消息', position: 'top' })
38
- }
39
-
40
- const showMessageBottom = () => {
41
- proxy!.$Message.show({ text: '显示消息', position: 'bottom' })
42
- }
43
-
44
- return {
45
- showMessage,
46
- showMessageTop,
47
- showMessageBottom
48
- }
49
- }
50
- })
51
- </script>
52
-
53
- <style scoped>
54
- .Message {
55
- height: 100%;
56
- display: flex;
57
- justify-content: space-around;
58
- flex-direction: column;
59
- align-items: center;
60
- }
61
- </style>
@@ -1,69 +0,0 @@
1
- <template>
2
- <div class="Modal">
3
- <VButton
4
- width="50%"
5
- @click="showInfo"
6
- >
7
- info
8
- </VButton>
9
- <VButton
10
- width="50%"
11
- @click="showConfirm"
12
- >
13
- confirm
14
- </VButton>
15
- </div>
16
- </template>
17
-
18
- <script lang="ts">
19
- import { getCurrentInstance, defineComponent } from 'vue'
20
- import VButton from '../components/button'
21
-
22
- export default defineComponent({
23
- name: 'ViewModal',
24
- components: { VButton },
25
- setup () {
26
- // 获取实例,用来访问全局属性 $Modal / $Message
27
- const { proxy } = getCurrentInstance()!
28
-
29
- const showInfo = () => {
30
- proxy!.$Modal.info({
31
- body: '这是内容',
32
- onOk: function () {
33
- proxy!.$Message.show({ text: '点击了确定' })
34
- // console.log('点击了确定')
35
- },
36
- onCancle: function () {
37
- proxy!.$Message.show({ text: '点击了取消' })
38
- // console.log('点击了取消')
39
- }
40
- })
41
- }
42
-
43
- const showConfirm = () => {
44
- proxy!.$Modal.confirm({
45
- body: '这是内容',
46
- onOk: function () {
47
- proxy!.$Message.show({ text: '点击了确定' })
48
- // console.log('点击了确定')
49
- }
50
- })
51
- }
52
-
53
- return {
54
- showInfo,
55
- showConfirm
56
- }
57
- }
58
- })
59
- </script>
60
-
61
- <style lang="less" scoped>
62
- .Modal {
63
- height: 100%;
64
- display: flex;
65
- justify-content: space-around;
66
- flex-direction: column;
67
- align-items: center;
68
- }
69
- </style>
@@ -1,142 +0,0 @@
1
- <template>
2
- <div class="Picker">
3
- <!-- AreaPicker -->
4
- <Picker
5
- v-model="AreaVisible"
6
- type="AreaPicker"
7
- @sure="pickerSure"
8
- @cancle="pickerCancle"
9
- />
10
-
11
- <!-- DatePicker -->
12
- <Picker
13
- v-model="DateVisible"
14
- type="DatePicker"
15
- :date-value="'2025/12/25'"
16
- @sure="pickerSure"
17
- @cancle="pickerCancle"
18
- />
19
- <!-- NormalPicker -->
20
- <Picker
21
- v-model="NormalVisible"
22
- type="NormalPicker"
23
- :list="listRef"
24
- :init-arr="initArrRef"
25
- @sure="pickerSure"
26
- @cancle="pickerCancle"
27
- />
28
- <div class="item">
29
- <DpButton
30
- width="30%"
31
- @click="DateVisible = true"
32
- >
33
- 日期选择器
34
- </DpButton>
35
- <DpButton
36
- width="30%"
37
- @click="AreaVisible = true"
38
- >
39
- 地区选择器
40
- </DpButton>
41
- <DpButton
42
- width="30%"
43
- @click="NormalVisible = true"
44
- >
45
- 通用选择器
46
- </DpButton>
47
- </div>
48
- </div>
49
- </template>
50
-
51
- <script lang="ts">
52
- import { ref, getCurrentInstance } from 'vue'
53
- // import Picker from '../components/picker'
54
- import type { PickerProps } from '../components/picker/types'
55
- export default {
56
- name: 'ViewPicker',
57
- // components: { Picker },
58
- setup () {
59
- const AreaVisible = ref<PickerProps['modelValue']>(false)
60
- const DateVisible = ref<PickerProps['modelValue']>(false)
61
- const NormalVisible = ref<PickerProps['modelValue']>(false)
62
- const initArrRef = ref<PickerProps['initArr']>([1, 3, 3])
63
- const listRef = ref<PickerProps['list']>([
64
- {
65
- target: 'targetA',
66
- list: [{ value: 'a', code: 1 }, { value: 2, code: 2 }, { value: 3, code: 3 }, {
67
- value: 4,
68
- code: 4
69
- }, { value: 5, code: 5 }, { value: 6, code: 6 }, { value: 7, code: 7 }, {
70
- value: 8,
71
- code: 8
72
- }, { value: 'c', code: 9 }, { value: 0, code: 0 }]
73
- },
74
- {
75
- target: 'targetB',
76
- list: [{ value: 'b', code: 1 }, { value: 2, code: 2 }, { value: 3, code: 3 }, {
77
- value: 4,
78
- code: 4
79
- }, { value: 5, code: 5 }, { value: 6, code: 6 }, { value: 7, code: 7 }, {
80
- value: 8,
81
- code: 8
82
- }, { value: 9, code: 9 }, { value: 0, code: 0 }]
83
- },
84
- {
85
- target: 'targetC',
86
- list: [{ value: 'c', code: 1 }, { value: 2, code: 2 }, { value: 3, code: 3 }, {
87
- value: 4,
88
- code: 4
89
- }, { value: 5, code: 5 }, { value: 6, code: 6 }, { value: 7, code: 7 }, {
90
- value: 8,
91
- code: 8
92
- }, { value: 9, code: 9 }, { value: 0, code: 0 }]
93
- }
94
- ]) // code为唯一值,value为显示出的具体文本
95
- const { proxy } = getCurrentInstance()!
96
- // 选择确定回调
97
- function pickerSure (value: any) {
98
- // console.log(value)
99
- // 如果全局 $Modal 可用
100
- if (proxy) {
101
- (proxy as any).$Modal.confirm({ body: value.formArea || value.formatDate || JSON.stringify(value) })
102
- }
103
- if (!value.formArea && !value.formatDate) {
104
- // console.log(value, 'value')
105
- initArrRef.value = [value.targetA.code, value.targetB.code, value.targetC.code]
106
- }
107
- }
108
-
109
- // 选择取消回调
110
- function pickerCancle () {
111
- if (proxy) {
112
- (proxy as any).$Message.show({ text: '您选择了取消' })
113
- }
114
- }
115
-
116
- return {
117
- AreaVisible,
118
- DateVisible,
119
- NormalVisible,
120
- pickerSure,
121
- pickerCancle,
122
- listRef,
123
- initArrRef
124
- }
125
- }
126
- }
127
- </script>
128
-
129
- <style lang="less" scoped>
130
- .Picker {
131
- position: relative;
132
- height: 100%;
133
-
134
- .item {
135
- box-sizing: border-box;
136
- display: flex;
137
- justify-content: space-around;
138
- align-items: center;
139
- padding: 50px 0;
140
- }
141
- }
142
- </style>
@@ -1,103 +0,0 @@
1
- <template>
2
- <div class="Popup">
3
- <VButton
4
- width="50%"
5
- @click="() => showPop('top')"
6
- >
7
- Top
8
- </VButton>
9
- <VButton
10
- width="50%"
11
- @click="() => showPop('right')"
12
- >
13
- Right
14
- </VButton>
15
- <VButton
16
- width="50%"
17
- @click="() => showPop('bottom')"
18
- >
19
- Bottom
20
- </VButton>
21
- <VButton
22
- width="50%"
23
- @click="() => showPop('left')"
24
- >
25
- Left
26
- </VButton>
27
-
28
- <Popup
29
- v-model="show"
30
- :position="side"
31
- :width="width"
32
- :height="height"
33
- :show-mask="true"
34
- />
35
- </div>
36
- </template>
37
-
38
- <script lang="ts">
39
- import { defineComponent, ref, nextTick } from 'vue'
40
- // import type { Side } from './dist/types/components/popup/types'
41
- type Side = 'top' | 'right' | 'bottom' | 'left'
42
-
43
- export default defineComponent({
44
- name: 'ViewPopup',
45
- setup () {
46
- const side = ref<Side>('top')
47
- const show = ref(false)
48
- const width = ref('100%')
49
- const height = ref<string | number>('100%')
50
- const sideList: Side[] = ['top', 'right', 'bottom', 'left']
51
-
52
- const showPop = (s: Side) => {
53
- show.value = false
54
- nextTick(() => {
55
- if (!sideList.includes(s)) s = 'top'
56
-
57
- switch (s) {
58
- case 'top':
59
- width.value = '100%'
60
- height.value = 0
61
- break
62
- case 'right':
63
- width.value = '70%'
64
- height.value = '100%'
65
- break
66
- case 'bottom':
67
- width.value = '100%'
68
- height.value = '70%'
69
- break
70
- case 'left':
71
- width.value = '70%'
72
- height.value = '100%'
73
- break
74
- }
75
-
76
- side.value = s
77
-
78
- setTimeout(() => {
79
- show.value = true
80
- }, 350)
81
- })
82
- }
83
-
84
- return {
85
- side,
86
- show,
87
- width,
88
- height,
89
- showPop
90
- }
91
- }
92
- })
93
- </script>
94
-
95
- <style scoped>
96
- .Popup {
97
- height: 100%;
98
- display: flex;
99
- flex-direction: column;
100
- justify-content: space-around;
101
- align-items: center;
102
- }
103
- </style>
@@ -1,49 +0,0 @@
1
- <template>
2
- <div class="Progress">
3
- <DpProgress
4
- v-model="progress"
5
- :bar-height="barHeight"
6
- />
7
- </div>
8
- </template>
9
-
10
- <script lang="ts">
11
- import { defineComponent, ref, onMounted, onBeforeUnmount } from 'vue'
12
- // import DpProgress from '../components/progress'
13
- import type { ProgressProps } from '../components/progress'
14
- export default defineComponent({
15
- name: 'ViewDpProgress',
16
- // components: { DpProgress },
17
- setup () {
18
- const progress = ref<ProgressProps['modelValue']>('0')
19
- const barHeight = ref(5)
20
- let timer:any = null
21
-
22
- onMounted(() => {
23
- timer = setInterval(() => {
24
- progress.value = Number(progress.value) + 1
25
- if (progress.value >= 100) {
26
- clearInterval(timer)
27
- timer = null
28
- }
29
- }, 100)
30
- })
31
-
32
- onBeforeUnmount(() => {
33
- // eslint-disable-next-line @typescript-eslint/no-unused-expressions
34
- timer && clearInterval(timer)
35
- })
36
-
37
- return {
38
- progress,
39
- barHeight
40
- }
41
- }
42
- })
43
- </script>
44
-
45
- <style lang="less" scoped>
46
- .Progress {
47
- padding-top: 50px;
48
- }
49
- </style>
@@ -1,43 +0,0 @@
1
- <template>
2
- <div class="Prompt">
3
- <DpButton
4
- width="50%"
5
- @click="showPrompt"
6
- >
7
- 弹出Prompt
8
- </DpButton>
9
- </div>
10
- </template>
11
-
12
- <script lang="ts">
13
- import { defineComponent, getCurrentInstance } from 'vue'
14
-
15
- export default defineComponent({
16
- name: 'ViewPrompt',
17
- setup () {
18
- // 获取当前组件实例
19
- const { proxy } = getCurrentInstance()!
20
-
21
- function showPrompt () {
22
- proxy?.$Prompt.info({
23
- title: 'Prompt',
24
- spec: 'ccc',
25
- text: 'vvvv'
26
- })
27
- }
28
-
29
- return {
30
- showPrompt
31
- }
32
- }
33
- })
34
- </script>
35
-
36
- <style lang="less" scoped>
37
- .Prompt {
38
- display: flex;
39
- justify-content: center;
40
- align-items: center;
41
- height: 100%;
42
- }
43
- </style>