vdesign-ui 0.1.21 → 0.1.23

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