vdesign-ui 0.2.6 → 0.2.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 (195) hide show
  1. package/dist/components/actionbar/index.js +8 -0
  2. package/dist/components/actionbar/index.vue +39 -0
  3. package/dist/components/actionbar/style.less +44 -0
  4. package/dist/components/actionbar-cell/index.js +7 -0
  5. package/dist/components/actionbar-cell/index.vue +38 -0
  6. package/dist/components/actions/index.js +7 -0
  7. package/dist/components/actions/index.vue +76 -0
  8. package/dist/components/actions/style.less +109 -0
  9. package/dist/components/actions-cell/index.js +7 -0
  10. package/dist/components/actions-cell/index.vue +94 -0
  11. package/dist/components/actions-cell/style.less +39 -0
  12. package/dist/components/activityviews/index.js +8 -0
  13. package/dist/components/activityviews/index.vue +192 -0
  14. package/dist/components/activityviews/style.less +152 -0
  15. package/dist/components/badge/index.js +8 -0
  16. package/dist/components/badge/index.vue +49 -0
  17. package/dist/components/badge/style.less +54 -0
  18. package/dist/components/button/index.js +8 -0
  19. package/dist/components/button/index.vue +93 -0
  20. package/dist/components/button/style.less +558 -0
  21. package/dist/components/calendar/end.png +0 -0
  22. package/dist/components/calendar/index-element.vue +84 -0
  23. package/dist/components/calendar/index.js +8 -0
  24. package/dist/components/calendar/index.vue +52 -0
  25. package/dist/components/calendar/start.png +0 -0
  26. package/dist/components/calendar/style.less +138 -0
  27. package/dist/components/checkbox/index.js +8 -0
  28. package/dist/components/checkbox/index.vue +161 -0
  29. package/dist/components/checkbox/style.less +289 -0
  30. package/dist/components/checkbox-group/index.js +7 -0
  31. package/dist/components/checkbox-group/index.vue +69 -0
  32. package/dist/components/common/state/index.vue +33 -0
  33. package/dist/components/common/state/style.less +48 -0
  34. package/dist/components/data-list/index.js +10 -0
  35. package/dist/components/data-list/index.vue +19 -0
  36. package/dist/components/data-list/style.less +623 -0
  37. package/dist/components/datetime-picker/index.js +8 -0
  38. package/dist/components/datetime-picker/index.vue +37 -0
  39. package/dist/components/datetime-picker/style.less +24 -0
  40. package/dist/components/dialog/index.js +8 -0
  41. package/dist/components/dialog/index.vue +164 -0
  42. package/dist/components/dialog/overlay-manager.js +18 -0
  43. package/dist/components/dialog/style.less +139 -0
  44. package/dist/components/divider/index.js +8 -0
  45. package/dist/components/divider/index.vue +54 -0
  46. package/dist/components/divider/style.less +92 -0
  47. package/dist/components/dropdown/index.js +8 -0
  48. package/dist/components/dropdown/index.vue +218 -0
  49. package/dist/components/dropdown/style.less +432 -0
  50. package/dist/components/empty/404-dark.png +0 -0
  51. package/dist/components/empty/404.png +0 -0
  52. package/dist/components/empty/index.js +8 -0
  53. package/dist/components/empty/index.vue +138 -0
  54. package/dist/components/empty/network-dark.png +0 -0
  55. package/dist/components/empty/network.png +0 -0
  56. package/dist/components/empty/nocoupons-dark.png +0 -0
  57. package/dist/components/empty/nocoupons.png +0 -0
  58. package/dist/components/empty/nodata-dark.png +0 -0
  59. package/dist/components/empty/nodata.png +0 -0
  60. package/dist/components/empty/nomargin-dark.png +0 -0
  61. package/dist/components/empty/nomargin.png +0 -0
  62. package/dist/components/empty/nonotice-dark.png +0 -0
  63. package/dist/components/empty/nonotice.png +0 -0
  64. package/dist/components/empty/noocomments-dark.png +0 -0
  65. package/dist/components/empty/noocomments.png +0 -0
  66. package/dist/components/empty/noorders-dark.png +0 -0
  67. package/dist/components/empty/noorders.png +0 -0
  68. package/dist/components/empty/noposition-dark.png +0 -0
  69. package/dist/components/empty/noposition.png +0 -0
  70. package/dist/components/empty/nosearch-dark.png +0 -0
  71. package/dist/components/empty/nosearch.png +0 -0
  72. package/dist/components/empty/style.less +61 -0
  73. package/dist/components/footer/index.js +7 -0
  74. package/dist/components/footer/index.vue +33 -0
  75. package/dist/components/footer/style.less +21 -0
  76. package/dist/components/footnav/index.js +7 -0
  77. package/dist/components/footnav/index.vue +93 -0
  78. package/dist/components/footnav/style.less +23 -0
  79. package/dist/components/footnav-item/index.js +7 -0
  80. package/dist/components/footnav-item/index.vue +50 -0
  81. package/dist/components/footnav-item/style.less +39 -0
  82. package/dist/components/form/index.js +7 -0
  83. package/dist/components/form/index.vue +12 -0
  84. package/dist/components/headnav/index.js +7 -0
  85. package/dist/components/headnav/index.vue +185 -0
  86. package/dist/components/headnav/style.less +232 -0
  87. package/dist/components/icon/font/iconfont.css +163 -0
  88. package/dist/components/icon/font/iconfont.js +6 -0
  89. package/dist/components/icon/index.js +9 -0
  90. package/dist/components/icon/index.vue +96 -0
  91. package/dist/components/icon/style.less +44 -0
  92. package/dist/components/input/calcTextareaHeight.js +162 -0
  93. package/dist/components/input/index.js +8 -0
  94. package/dist/components/input/index.vue +345 -0
  95. package/dist/components/input/style.less +471 -0
  96. package/dist/components/list/index.js +8 -0
  97. package/dist/components/list/index.vue +152 -0
  98. package/dist/components/list/style.less +213 -0
  99. package/dist/components/loading/index.js +7 -0
  100. package/dist/components/loading/index.vue +68 -0
  101. package/dist/components/loading/style.less +54 -0
  102. package/dist/components/mixins/clickoutside.js +81 -0
  103. package/dist/components/mixins/dom.js +41 -0
  104. package/dist/components/mixins/languageMixin.js +41 -0
  105. package/dist/components/mixins/outlineConfigPlugin.js +45 -0
  106. package/dist/components/mixins/router-link.js +23 -0
  107. package/dist/components/mixins/themeMixin.js +43 -0
  108. package/dist/components/noticebar/index.js +8 -0
  109. package/dist/components/noticebar/index.vue +258 -0
  110. package/dist/components/noticebar/style.less +328 -0
  111. package/dist/components/overlay/index.js +8 -0
  112. package/dist/components/overlay/index.vue +184 -0
  113. package/dist/components/overlay/style.less +23 -0
  114. package/dist/components/pagebreak/index.js +7 -0
  115. package/dist/components/pagebreak/index.vue +67 -0
  116. package/dist/components/pagebreak/style.less +42 -0
  117. package/dist/components/password/index.js +8 -0
  118. package/dist/components/password/index.vue +60 -0
  119. package/dist/components/popover/index.js +8 -0
  120. package/dist/components/popover/index.vue +100 -0
  121. package/dist/components/popover/style.less +346 -0
  122. package/dist/components/popover/vue-popover.vue +314 -0
  123. package/dist/components/popup/index.js +7 -0
  124. package/dist/components/popup/index.vue +243 -0
  125. package/dist/components/radio/index.js +8 -0
  126. package/dist/components/radio/index.vue +184 -0
  127. package/dist/components/radio/style.less +294 -0
  128. package/dist/components/radio-group/index.js +6 -0
  129. package/dist/components/radio-group/index.vue +58 -0
  130. package/dist/components/result/completed-dark.png +0 -0
  131. package/dist/components/result/completed.png +0 -0
  132. package/dist/components/result/error-dark.png +0 -0
  133. package/dist/components/result/error.png +0 -0
  134. package/dist/components/result/index.js +8 -0
  135. package/dist/components/result/index.vue +73 -0
  136. package/dist/components/result/style.less +44 -0
  137. package/dist/components/result/wait-dark.png +0 -0
  138. package/dist/components/result/wait.png +0 -0
  139. package/dist/components/search/index.js +8 -0
  140. package/dist/components/search/index.vue +66 -0
  141. package/dist/components/selector/index.js +8 -0
  142. package/dist/components/selector/index.vue +161 -0
  143. package/dist/components/selector/style.less +484 -0
  144. package/dist/components/skeleton/index.js +7 -0
  145. package/dist/components/skeleton/index.vue +206 -0
  146. package/dist/components/skeleton/style.less +197 -0
  147. package/dist/components/slider/draggable.js +49 -0
  148. package/dist/components/slider/index.js +7 -0
  149. package/dist/components/slider/index.vue +167 -0
  150. package/dist/components/slider/style.less +100 -0
  151. package/dist/components/slider/utils.js +60 -0
  152. package/dist/components/step/index.js +7 -0
  153. package/dist/components/step/index.vue +48 -0
  154. package/dist/components/step/style.less +58 -0
  155. package/dist/components/step-item/index.js +7 -0
  156. package/dist/components/step-item/index.vue +126 -0
  157. package/dist/components/step-item/style.less +362 -0
  158. package/dist/components/stepper/index.js +8 -0
  159. package/dist/components/stepper/index.vue +146 -0
  160. package/dist/components/style/index.vue +42 -0
  161. package/dist/components/switch/index.js +8 -0
  162. package/dist/components/switch/index.vue +72 -0
  163. package/dist/components/switch/style.less +56 -0
  164. package/dist/components/tab/index.js +7 -0
  165. package/dist/components/tab/index.vue +68 -0
  166. package/dist/components/tabs/index.js +8 -0
  167. package/dist/components/tabs/index.vue +180 -0
  168. package/dist/components/tabs/style.less +383 -0
  169. package/dist/components/tag/index.js +7 -0
  170. package/dist/components/tag/index.vue +64 -0
  171. package/dist/components/tag/style.less +211 -0
  172. package/dist/components/title/index.js +8 -0
  173. package/dist/components/title/index.vue +99 -0
  174. package/dist/components/title/style.less +188 -0
  175. package/dist/components/toast/index.js +76 -0
  176. package/dist/components/toast/index.vue +49 -0
  177. package/dist/components/toast/style.less +57 -0
  178. package/dist/components/transition/index.js +8 -0
  179. package/dist/components/transition/index.vue +13 -0
  180. package/dist/components/transition/style.less +208 -0
  181. package/dist/components/upload/index.js +7 -0
  182. package/dist/components/upload/index.vue +106 -0
  183. package/dist/components/upload/style.less +147 -0
  184. package/dist/components/utils/assist.js +34 -0
  185. package/dist/components/utils/env.js +21 -0
  186. package/dist/demo.html +10 -0
  187. package/dist/locale/ar.js +98 -0
  188. package/dist/locale/en.js +98 -0
  189. package/dist/locale/zh.js +98 -0
  190. package/dist/token.css +2990 -0
  191. package/dist/vdesign-ui.common.js +27108 -0
  192. package/dist/vdesign-ui.css +1 -0
  193. package/dist/vdesign-ui.umd.js +27118 -0
  194. package/dist/vdesign-ui.umd.min.js +32 -0
  195. package/package.json +1 -1
@@ -0,0 +1,558 @@
1
+ @prefix: ~"vd-btn";
2
+
3
+ .@{prefix} {
4
+ // 抽离 css valuable 适应 1px 边框,如:wireframe
5
+ --btn-border-radius: var(--radius-button-m);
6
+ --btn-border-color: transparent;
7
+ --btn-line-height: var(--height-button-m);
8
+ height: var(--height-button-m);
9
+ padding-inline-start: var(--spacing-button-m-padding_left);
10
+ padding-inline-end: var(--spacing-button-m-padding_right);
11
+ border-radius: var(--btn-border-radius);
12
+ border: 0 solid var(--btn-border-color);
13
+ /* font-family: var(--en-single-f-c-s-fontFamily); */
14
+ font-size: var(--en-single-f-c-s-fontSize);
15
+ font-weight: var(--en-single-f-c-s-fontWeight);
16
+ line-height: var(--btn-line-height);
17
+ background-color: var(--color-button-primary-bg-default);
18
+ color: var(--color-button-primary-text-default);
19
+ // end-btn-css-vars
20
+ box-sizing: border-box;
21
+ position: relative;
22
+ display: inline-block;
23
+ margin: 0;
24
+ text-align: center;
25
+ white-space: nowrap;
26
+ cursor: pointer;
27
+ appearance: none;
28
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
29
+ -webkit-font-smoothing: auto;
30
+
31
+ .@{prefix}-icon-small {
32
+ --icon-small: var(--icon-button-s);
33
+ }
34
+
35
+ .@{prefix}-icon-medium {
36
+ --icon-medium: var(--icon-button-m);
37
+ }
38
+
39
+ .@{prefix}-icon-large {
40
+ --icon-large: var(--icon-button-l);
41
+ }
42
+
43
+ &-inner {
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ gap: var(--spacing-button-m_icon-margin_y);
48
+ // gap: 4px;
49
+ // --spacing-button-l_icon-margin_y
50
+ // --spacing-button-m_icon-margin_y
51
+ // --spacing-button-s_icon-margin_y
52
+ }
53
+
54
+ // 1px border 目前解决方案会与伪类冲突的情况如:before/after
55
+ // &::before {
56
+ // content: "";
57
+ // pointer-events: none;
58
+ // display: block;
59
+ // position: absolute;
60
+ // left: 0;
61
+ // top: 0;
62
+ // transform-origin: 0 0;
63
+ // border: 1PX solid var(--btn-border-color);
64
+ // border-radius: var(--btn-border-radius);
65
+ // box-sizing: border-box;
66
+ // width: 100%;
67
+ // height: 100%;
68
+
69
+ // @media (min-resolution: 2dppx) {
70
+ // width: 200%;
71
+ // height: 200%;
72
+ // border-radius: calc(var(--btn-border-radius) * 2);
73
+ // transform: scale(.5);
74
+ // }
75
+
76
+ // @media (min-resolution: 3dppx) {
77
+ // width: 300%;
78
+ // height: 300%;
79
+ // border-radius: calc(var(--btn-border-radius) * 3);
80
+ // transform: scale(.333);
81
+ // }
82
+ // }
83
+
84
+ &:active {
85
+ background-color: var(--color-button-primary-bg-press);
86
+ color: var(--color-button-primary-text-press);
87
+ }
88
+
89
+ &:disabled {
90
+ background-color: var(--color-button-primary-bg-disable);
91
+ color: var(--color-button-primary-text-disable);
92
+ pointer-events: none;
93
+ cursor: not-allowed;
94
+ }
95
+
96
+ &-icon {
97
+ --btn-border-radius: 0;
98
+ border-color: transparent;
99
+ background-color: transparent;
100
+ color: var(--color-button-border-text-default);
101
+ font-size: var(--en-single-f-b-r-fontSize);
102
+ font-weight: var(--en-single-f-c-r-fontWeight);
103
+ line-height: 1;
104
+ padding: 0;
105
+ min-width: var(--height-button-m);
106
+ height: var(--height-button-m);
107
+
108
+ &:active {
109
+ border-color: transparent;
110
+ background-color: transparent;
111
+ color: var(--color-button-border-text-press);
112
+ }
113
+
114
+ &:disabled {
115
+ border-color: transparent;
116
+ background-color: transparent;
117
+ color: var(--color-button-border-text-disable);
118
+ }
119
+
120
+ .@{prefix}-inner {
121
+ flex-direction: column;
122
+ gap: var(--spacing-button-icon_m_text-margin_top);
123
+ }
124
+
125
+ &.@{prefix}-small {
126
+ font-size: var(--en-single-f-a-r-fontSize);
127
+ font-weight: var(--en-single-f-c-r-fontWeight);
128
+ padding: 0;
129
+ min-width: var(--height-button-s);
130
+ height: var(--height-button-s);
131
+
132
+ .@{prefix}-inner {
133
+ gap: var(--spacing-button-icon_s_text-margin_top);
134
+ }
135
+ }
136
+
137
+ &.@{prefix}-medium {
138
+ font-size: var(--en-single-f-b-r-fontSize);
139
+ font-weight: var(--en-single-f-c-r-fontWeight);
140
+ padding: 0;
141
+ min-width: var(--height-button-m);
142
+ height: var(--height-button-m);
143
+
144
+ .@{prefix}-inner {
145
+ gap: var(--spacing-button-icon_m_text-margin_top);
146
+ }
147
+ }
148
+
149
+ &.@{prefix}-large {
150
+ font-size: var(--en-single-f-c-r-fontSize);
151
+ font-weight: var(--en-single-f-c-r-fontWeight);
152
+ padding: 0;
153
+ min-width: var(--height-button-l);
154
+ height: var(--height-button-l);
155
+
156
+ .@{prefix}-inner {
157
+ gap: var(--spacing-button-icon_l_text-margin_top);
158
+ }
159
+ }
160
+ }
161
+
162
+ &-primary {
163
+ background-color: var(--color-button-primary-bg-default);
164
+ color: var(--color-button-primary-text-default);
165
+
166
+ &:active {
167
+ background-color: var(--color-button-primary-bg-press);
168
+ color: var(--color-button-primary-text-press);
169
+ }
170
+
171
+ &:disabled {
172
+ background-color: var(--color-button-primary-bg-disable);
173
+ color: var(--color-button-primary-text-disable);
174
+ }
175
+ }
176
+
177
+ &-secondary {
178
+ background-color: var(--color-button-secondary-bg-default);
179
+ color: var(--color-button-secondary-text-default);
180
+
181
+ &:active {
182
+ background-color: var(--color-button-secondary-bg-press);
183
+ color: var(--color-button-secondary-text-press);
184
+ }
185
+
186
+ &:disabled {
187
+ background-color: var(--color-button-secondary-bg-disable);
188
+ color: var(--color-button-secondary-text-disable);
189
+ }
190
+ }
191
+
192
+ &-tertiary {
193
+ background-color: var(--color-button-tertiary-bg-default);
194
+ color: var(--color-button-tertiary-text-default);
195
+
196
+ &:active {
197
+ background-color: var(--color-button-tertiary-bg-press);
198
+ color: var(--color-button-tertiary-text-press);
199
+ }
200
+
201
+ &:disabled {
202
+ background-color: var(--color-button-tertiary-bg-disable);
203
+ color: var(--color-button-tertiary-text-disable);
204
+ }
205
+ }
206
+
207
+ &-warning {
208
+ background-color: var(--color-button-warning-bg-default);
209
+ color: var(--color-button-warning-text-default);
210
+
211
+ &:active {
212
+ background-color: var(--color-button-warning-bg-press);
213
+ color: var(--color-button-warning-text-press);
214
+ }
215
+
216
+ &:disabled {
217
+ background-color: var(--color-button-warning-bg-disable);
218
+ color: var(--color-button-warning-text-disable);
219
+ }
220
+ }
221
+
222
+ &-warning_grey {
223
+ background-color: var(--color-button-warning_grey-bg-default);
224
+ color: var(--color-button-warning_grey-text-default);
225
+
226
+ &:active {
227
+ background-color: var(--color-button-warning_grey-bg-press);
228
+ color: var(--color-button-warning_grey-text-press);
229
+ }
230
+
231
+ &:disabled {
232
+ background-color: var(--color-button-warning_grey-bg-disable);
233
+ color: var(--color-button-warning_grey-text-disable);
234
+ }
235
+ }
236
+
237
+ &-tertiary_grey {
238
+ border-color: transparent;
239
+ background-color: var(--color-button-tertiary_grey-bg-default);
240
+ color: var(--color-button-tertiary_grey-text-default);
241
+
242
+ &:active {
243
+ border-color: transparent;
244
+ background-color: var(--color-button-tertiary_grey-bg-press);
245
+ color: var(--color-button-tertiary_grey-text-press);
246
+ }
247
+
248
+ &:disabled {
249
+ border-color: transparent;
250
+ background-color: var(--color-button-tertiary_grey-bg-disable);
251
+ color: var(--color-button-tertiary_grey-text-disable);
252
+ }
253
+ }
254
+
255
+ &-link_text {
256
+ background-color: transparent;
257
+ border-color: transparent;
258
+ color: var(--color-button-link_text-default);
259
+
260
+ &:active {
261
+ background-color: transparent;
262
+ border-color: transparent;
263
+ color: var(--color-button-link_text-press);
264
+ }
265
+
266
+ &:disabled {
267
+ background-color: transparent;
268
+ border-color: transparent;
269
+ color: var(--color-button-link_text-disable);
270
+ }
271
+ }
272
+
273
+ &-primary_text {
274
+ background-color: transparent;
275
+ border-color: transparent;
276
+ color: var(--color-button-primary_borderless_text-default);
277
+
278
+ &:active {
279
+ background-color: transparent;
280
+ border-color: transparent;
281
+ color: var(--color-button-primary_borderless_text-press);
282
+ }
283
+
284
+ &:disabled {
285
+ background-color: transparent;
286
+ border-color: transparent;
287
+ color: var(--color-button-primary_borderless_text-disable);
288
+ }
289
+ }
290
+
291
+ &-warning_text {
292
+ background-color: transparent;
293
+ border-color: transparent;
294
+ color: var(--color-button-warning_borderless_text-default);
295
+
296
+ &:active {
297
+ background-color: transparent;
298
+ border-color: transparent;
299
+ color: var(--color-button-warning_borderless_text-press);
300
+ }
301
+
302
+ &:disabled {
303
+ background-color: transparent;
304
+ border-color: transparent;
305
+ color: var(--color-button-warning_borderless_text-disable);
306
+ }
307
+
308
+ }
309
+
310
+ &-tertiary_text {
311
+ background-color: transparent;
312
+ border-color: transparent;
313
+ color: var(--color-button-tertiary_borderless_text-default);
314
+
315
+ &:active {
316
+ background-color: transparent;
317
+ border-color: transparent;
318
+ color: var(--color-button-tertiary_borderless_text-press);
319
+ }
320
+
321
+ &:disabled {
322
+ background-color: transparent;
323
+ border-color: transparent;
324
+ color: var(--color-button-tertiary_borderless_text-disable);
325
+ }
326
+
327
+ }
328
+
329
+ &-wireframe {
330
+ --btn-border-color: var(--color-button-border-default);
331
+ border: 1px solid var(--btn-border-color);
332
+ background-color: transparent;
333
+ color: var(--color-button-border-text-default);
334
+ line-height: 100%;
335
+
336
+ &:active {
337
+ --btn-border-color: var(--color-button-border-press);
338
+ background-color: transparent;
339
+ color: var(--color-button-border-text-press);
340
+ }
341
+
342
+ &:disabled {
343
+ --btn-border-color: var(--color-button-border-disable);
344
+ background-color: transparent;
345
+ color: var(--color-button-border-text-disable);
346
+ }
347
+
348
+ .@{prefix}-inner {
349
+ gap: calc(var(--spacing-button-m_icon-margin_y) * 0.5);
350
+ }
351
+
352
+ .@{prefix}-small {
353
+ .@{prefix}-inner {
354
+ gap: calc(var(--spacing-button-s_icon-margin_y) * 0.5);
355
+ }
356
+ }
357
+
358
+ .@{prefix}-medium {
359
+ .@{prefix}-inner {
360
+ gap: calc(var(--spacing-button-m_icon-margin_y) * 0.5);
361
+ }
362
+ }
363
+
364
+ .@{prefix}-large {
365
+ .@{prefix}-inner {
366
+ gap: calc(var(--spacing-button-l_icon-margin_y) * 0.5);
367
+ }
368
+ }
369
+ }
370
+
371
+ &-block {
372
+ display: block;
373
+ width: 100%;
374
+ }
375
+
376
+ //
377
+ // Button Sizes
378
+ //
379
+ &-small {
380
+ --btn-border-radius: var(--radius-button-s);
381
+ --btn-line-height: var(--height-button-s);
382
+ height: var(--height-button-s);
383
+ padding-inline-start: var(--spacing-button-s-padding_left);
384
+ padding-inline-end: var(--spacing-button-s-padding_right);
385
+ font-size: var(--en-single-f-c-r-fontSize);
386
+ font-weight: var(--en-single-f-c-r-fontWeight);
387
+
388
+ .@{prefix}-inner {
389
+ gap: var(--spacing-button-s_icon-margin_y);
390
+ }
391
+ }
392
+
393
+ &-medium {
394
+ --btn-border-radius: var(--radius-button-m);
395
+ --btn-line-height: var(--height-button-m);
396
+ height: var(--height-button-m);
397
+ padding-inline-start: var(--spacing-button-m-padding_left);
398
+ padding-inline-end: var(--spacing-button-m-padding_right);
399
+ font-size: var(--en-single-f-c-s-fontSize);
400
+
401
+ .@{prefix}-inner {
402
+ gap: var(--spacing-button-m_icon-margin_y);
403
+ }
404
+ }
405
+
406
+ &-large {
407
+ --btn-border-radius: var(--radius-button-l);
408
+ --btn-line-height: var(--height-button-l);
409
+ height: var(--height-button-l);
410
+ padding-inline-start: var(--spacing-button-l-padding_left);
411
+ padding-inline-end: var(--spacing-button-l-padding_right);
412
+ font-size: var(--en-single-f-d-s-fontSize);
413
+
414
+ .@{prefix}-inner {
415
+ gap: var(--spacing-button-l_icon-margin_y);
416
+ }
417
+ }
418
+
419
+
420
+ //
421
+ // Button Business
422
+ //
423
+ &-sell {
424
+ display: flex;
425
+ align-items: center;
426
+ justify-content: center;
427
+ width: calc(var(--height-button-l) * 3);
428
+ height:var(--height-button-l);
429
+ background-color: var(--color-button-sell-bg-default);
430
+ border-radius: var(--radius-button-m);
431
+ color: var(--color-button-sell-text-default);
432
+ font-size: var(--en-single-f-d-s-fontSize);
433
+
434
+ &::after {
435
+ content: '';
436
+ position: absolute;
437
+ inset-inline-end: -9px;
438
+ width: var(--height-button-l);
439
+ height: var(--height-button-l);
440
+ border-radius: var(--radius-button-m);
441
+ background-color: var(--color-button-sell-bg-default);
442
+ transform: skewX(-21deg);
443
+ z-index: 0;
444
+ }
445
+
446
+ &:active {
447
+ background-color: var(--color-button-sell-bg-press);
448
+ color: var(--color-button-sell-text-press);
449
+
450
+ &::after {
451
+ background-color: var(--color-button-sell-bg-press);
452
+ }
453
+ }
454
+
455
+ &:disabled {
456
+ background-color: var(--color-button-sell-bg-disable);
457
+ color: var(--color-button-border-text-disable);
458
+
459
+ &::after {
460
+ background-color: var(--color-button-sell-bg-disable);
461
+ }
462
+ }
463
+ }
464
+
465
+ &-buy {
466
+ display: flex;
467
+ align-items: center;
468
+ justify-content: center;
469
+ width: calc(var(--height-button-l) * 3);
470
+ height: var(--height-button-l);
471
+ background-color: var(--color-button-buy-bg-default);
472
+ border-radius: var(--radius-button-m);
473
+ color: var(--color-button-buy-text-default);
474
+ font-size: var(--en-single-f-d-s-fontSize);
475
+
476
+ &::after {
477
+ content: '';
478
+ position: absolute;
479
+ inset-inline-start: -9px;
480
+ width: var(--height-button-l);
481
+ height: var(--height-button-l);
482
+ border-radius: var(--radius-button-m);
483
+ background-color: var(--color-button-buy-bg-default);
484
+ transform: skewX(-21deg);
485
+ z-index: 0;
486
+ }
487
+
488
+ &:active {
489
+ background-color: var(--color-button-buy-bg-press);
490
+ color: var(--color-button-buy-text-press);
491
+
492
+ &::after {
493
+ background-color: var(--color-button-buy-bg-press);
494
+ }
495
+ }
496
+
497
+ &:disabled {
498
+ background-color: var(--color-button-buy-bg-disable);
499
+ color: var(--color-button-buy-text-disable);
500
+
501
+ &::after {
502
+ background-color: var(--color-button-buy-bg-disable);
503
+ }
504
+ }
505
+ }
506
+
507
+ &-group {
508
+ display: flex;
509
+ align-items: center;
510
+ justify-content: center;
511
+ width: 100%;
512
+ gap: 27px;
513
+ // background: #fff;
514
+ }
515
+
516
+ //
517
+ // loading
518
+ //
519
+ &-loading {
520
+ cursor: default;
521
+ pointer-events: none;
522
+
523
+ .vd-iconfont {
524
+ animation: vd-ani-spin 1s linear infinite;
525
+ }
526
+ }
527
+
528
+ &-round {
529
+ --btn-border-radius: 999em;
530
+ padding-inline: 0;
531
+ width: var(--height-button-m);
532
+
533
+ &.@{prefix}-small {
534
+ width: var(--height-button-s);
535
+ padding-inline: 0;
536
+ }
537
+
538
+ &.@{prefix}-medium {
539
+ width: var(--height-button-m);
540
+ padding-inline: 0;
541
+ }
542
+
543
+ &.@{prefix}-large {
544
+ width: var(--height-button-l);
545
+ padding-inline: 0;
546
+ }
547
+ }
548
+ }
549
+
550
+ @keyframes vd-ani-spin {
551
+ from {
552
+ transform: rotate(0);
553
+ }
554
+
555
+ to {
556
+ transform: rotate(360deg);
557
+ }
558
+ }
Binary file
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <div>
3
+ <!-- <div class="vd-calendar-input">
4
+ <div class="vd-calendar-input-inner">
5
+ <input type="text" class="vd-calendar-input__inputs" disabled placeholder="Start date">
6
+ <i class="vd-calendar-input__line"></i>
7
+ <input type="text" class="vd-calendar-input__inputs" disabled placeholder="End date">
8
+ </div>
9
+ </div> -->
10
+ <el-date-picker class="vd-calendar-input" v-on="$listeners" v-bind="$attrs"></el-date-picker>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
16
+ zhLocale.el.datepicker.weeks = {
17
+ "sun": "S",
18
+ "mon": "M",
19
+ "tue": "T",
20
+ "wed": "W",
21
+ "thu": "T",
22
+ "fri": "F",
23
+ "sat": "S"
24
+ }
25
+ zhLocale.el.datepicker.year = ''
26
+ zhLocale.el.datepicker.month8 = '8'
27
+
28
+ export default {
29
+ name: 'vd-calendar',
30
+ data() {
31
+ return {
32
+ };
33
+ },
34
+ inheritAttrs: false, // 确保 $attrs 不绑定到根元素
35
+
36
+ mounted() {
37
+ }
38
+ };
39
+ </script>
40
+
41
+ <style lang="less">
42
+ .el-date-range-picker {
43
+ position: absolute !important;
44
+ left: 0 !important;
45
+ ;
46
+ right: 0 !important;
47
+ width: 100%;
48
+
49
+ .el-date-range-picker__content {
50
+ width: 100%;
51
+ border: 0
52
+ }
53
+
54
+ .el-picker-panel__body {
55
+ min-width: 300px;
56
+ }
57
+ }
58
+
59
+ .el-date-range-picker__content.is-right {
60
+ height: 0;
61
+ display: none;
62
+
63
+ .el-date-range-picker__header {
64
+ top: -330px;
65
+ left: 210px;
66
+ width: 50px;
67
+ }
68
+
69
+ .el-date-range-picker__header div {
70
+ display: none;
71
+ }
72
+
73
+ table {
74
+ display: none;
75
+ }
76
+ }
77
+
78
+ .el-icon-d-arrow-left,
79
+ .el-icon-d-arrow-right {
80
+ display: none;
81
+ }
82
+
83
+ @import './style.less';
84
+ </style>
@@ -0,0 +1,8 @@
1
+ import HdCalendar from './index.vue';
2
+ import './style.less';
3
+
4
+ HdCalendar.install = function (Vue) {
5
+ Vue.component(HdCalendar.name, HdCalendar);
6
+ };
7
+
8
+ export default HdCalendar;
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <div>
3
+ <!-- <div class="vd-calendar-input">
4
+ <div class="vd-calendar-input-inner">
5
+ <input type="text" class="vd-calendar-input__inputs" disabled placeholder="Start date">
6
+ <i class="vd-calendar-input__line"></i>
7
+ <input type="text" class="vd-calendar-input__inputs" disabled placeholder="End date">
8
+ </div>
9
+ </div> -->
10
+ <van-calendar class="vd-calendar" v-on="$listeners" v-bind="$attrs" />
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ // import Vue from 'vue'
16
+ import { Calendar } from 'vant';
17
+
18
+ // Vue.use(Calendar);
19
+ import { Locale } from 'vant';
20
+
21
+ const messages = {
22
+ 'zh-CN': {
23
+ vanCalendar: {
24
+ weekdays: ['S', 'M', 'T ', 'W', 'T', 'F', 'S'],
25
+ start: 'Start',
26
+ end: "End"
27
+ },
28
+ },
29
+ };
30
+
31
+ Locale.add(messages);
32
+
33
+ export default {
34
+ name: 'vd-calendar',
35
+ components: {
36
+ 'van-calendar': Calendar
37
+ },
38
+ data() {
39
+ return {
40
+ };
41
+ },
42
+ inheritAttrs: false, // 确保 $attrs 不绑定到根元素
43
+
44
+ mounted() {
45
+ // console.log(Locale);
46
+ }
47
+ };
48
+ </script>
49
+
50
+ <style lang="less">
51
+ @import './style.less';
52
+ </style>