vdesign-ui 0.1.17 → 0.1.19

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 (192) hide show
  1. package/dist/css/chunk-1952c402.04c2303e.css +1 -0
  2. package/dist/css/chunk-6a5c6104.38021b56.css +1 -0
  3. package/dist/css/chunk-vendors.4ecfba63.css +1 -0
  4. package/dist/css/sites.395ce21f.css +1 -0
  5. package/dist/img/404-dark.775df5bb.png +0 -0
  6. package/dist/img/bg_mobile.5909f667.png +0 -0
  7. package/dist/img/completed-dark.4183a8a8.png +0 -0
  8. package/dist/img/error-dark.b80857da.png +0 -0
  9. package/dist/img/icon.a67073c3.svg +7 -0
  10. package/dist/img/iphoneX.38c8778e.png +0 -0
  11. package/dist/img/logo-white.fad4f907.png +0 -0
  12. package/dist/img/logo.1eda11d6.png +0 -0
  13. package/dist/img/network-dark.11a147bb.png +0 -0
  14. package/dist/img/nodata-dark.b0ea0e39.png +0 -0
  15. package/dist/img/qrcode2.0a9d9044.png +0 -0
  16. package/dist/img/wait-dark.6aa28731.png +0 -0
  17. package/dist/index.html +1 -0
  18. package/dist/js/chunk-1952c402.c58ecfb5.js +1 -0
  19. package/dist/js/chunk-2d2183be.2a64419d.js +1 -0
  20. package/dist/js/chunk-6a5c6104.c8fa5635.js +1 -0
  21. package/dist/js/chunk-vendors.490b7673.js +37 -0
  22. package/dist/js/sites.5a217467.js +1 -0
  23. package/package.json +3 -3
  24. package/dist/components/actionbar/actionbar-cell/index.vue +0 -34
  25. package/dist/components/actionbar/index.js +0 -8
  26. package/dist/components/actionbar/index.vue +0 -39
  27. package/dist/components/actionbar/style.less +0 -48
  28. package/dist/components/actions-cell/actions/index.js +0 -7
  29. package/dist/components/actions-cell/actions/index.vue +0 -68
  30. package/dist/components/actions-cell/actions/style.less +0 -94
  31. package/dist/components/actions-cell/index.js +0 -7
  32. package/dist/components/actions-cell/index.vue +0 -94
  33. package/dist/components/actions-cell/style.less +0 -39
  34. package/dist/components/activityviews/index.js +0 -8
  35. package/dist/components/activityviews/index.vue +0 -107
  36. package/dist/components/activityviews/style.less +0 -152
  37. package/dist/components/badge/index.js +0 -8
  38. package/dist/components/badge/index.vue +0 -49
  39. package/dist/components/badge/style.less +0 -66
  40. package/dist/components/button/index.js +0 -8
  41. package/dist/components/button/index.vue +0 -89
  42. package/dist/components/button/style.less +0 -563
  43. package/dist/components/calendar/end.png +0 -0
  44. package/dist/components/calendar/index-element.vue +0 -84
  45. package/dist/components/calendar/index.js +0 -8
  46. package/dist/components/calendar/index.vue +0 -52
  47. package/dist/components/calendar/start.png +0 -0
  48. package/dist/components/calendar/style.less +0 -167
  49. package/dist/components/checkbox/assist.js +0 -34
  50. package/dist/components/checkbox/checkbox-group/index.js +0 -8
  51. package/dist/components/checkbox/checkbox-group/index.vue +0 -69
  52. package/dist/components/checkbox/index.js +0 -8
  53. package/dist/components/checkbox/index.vue +0 -184
  54. package/dist/components/checkbox/style.less +0 -289
  55. package/dist/components/common/state/index.vue +0 -80
  56. package/dist/components/data-list/index.js +0 -10
  57. package/dist/components/data-list/index.vue +0 -19
  58. package/dist/components/data-list/style.less +0 -624
  59. package/dist/components/datetime-picker/index.js +0 -8
  60. package/dist/components/datetime-picker/index.vue +0 -37
  61. package/dist/components/datetime-picker/style.less +0 -24
  62. package/dist/components/dialog/index copy.vue +0 -112
  63. package/dist/components/dialog/index.js +0 -8
  64. package/dist/components/dialog/index.vue +0 -112
  65. package/dist/components/dialog/style.less +0 -122
  66. package/dist/components/divider/index.js +0 -8
  67. package/dist/components/divider/index.vue +0 -54
  68. package/dist/components/divider/style.less +0 -92
  69. package/dist/components/dropdown/index.js +0 -8
  70. package/dist/components/dropdown/index.vue +0 -210
  71. package/dist/components/dropdown/style.less +0 -402
  72. package/dist/components/empty/empty-404.png +0 -0
  73. package/dist/components/empty/empty-img.png +0 -0
  74. package/dist/components/empty/empty-network.png +0 -0
  75. package/dist/components/empty/index.js +0 -8
  76. package/dist/components/empty/index.vue +0 -65
  77. package/dist/components/empty/style.less +0 -53
  78. package/dist/components/footer/index.js +0 -7
  79. package/dist/components/footer/index.vue +0 -29
  80. package/dist/components/footer/style.less +0 -22
  81. package/dist/components/footnav/footnav-item/index.js +0 -7
  82. package/dist/components/footnav/footnav-item/index.vue +0 -75
  83. package/dist/components/footnav/footnav-item/style.less +0 -39
  84. package/dist/components/footnav/index.js +0 -7
  85. package/dist/components/footnav/index.vue +0 -82
  86. package/dist/components/footnav/style.less +0 -22
  87. package/dist/components/form/index.js +0 -7
  88. package/dist/components/form/index.vue +0 -12
  89. package/dist/components/headnav/index.js +0 -7
  90. package/dist/components/headnav/index.vue +0 -139
  91. package/dist/components/headnav/style.less +0 -232
  92. package/dist/components/icon/font/iconfont.css +0 -817
  93. package/dist/components/icon/font/iconfont.js +0 -2
  94. package/dist/components/icon/index.js +0 -9
  95. package/dist/components/icon/index.vue +0 -46
  96. package/dist/components/icon/style.less +0 -44
  97. package/dist/components/input/calcTextareaHeight.js +0 -266
  98. package/dist/components/input/index.js +0 -8
  99. package/dist/components/input/index.vue +0 -343
  100. package/dist/components/input/password/index.js +0 -8
  101. package/dist/components/input/password/index.vue +0 -60
  102. package/dist/components/input/search/index.js +0 -8
  103. package/dist/components/input/search/index.vue +0 -66
  104. package/dist/components/input/stepper/index.js +0 -8
  105. package/dist/components/input/stepper/index.vue +0 -136
  106. package/dist/components/input/style.less +0 -496
  107. package/dist/components/list/index.js +0 -8
  108. package/dist/components/list/index.vue +0 -159
  109. package/dist/components/list/style.less +0 -292
  110. package/dist/components/loading/index.js +0 -7
  111. package/dist/components/loading/index.vue +0 -53
  112. package/dist/components/loading/loading.png +0 -0
  113. package/dist/components/loading/refresh.png +0 -0
  114. package/dist/components/loading/style.less +0 -48
  115. package/dist/components/mixins/clickoutside.js +0 -81
  116. package/dist/components/mixins/dom.js +0 -41
  117. package/dist/components/mixins/languageMixin.js +0 -38
  118. package/dist/components/mixins/outlineConfigPlugin.js +0 -40
  119. package/dist/components/mixins/router-link.js +0 -23
  120. package/dist/components/noticebar/index.js +0 -8
  121. package/dist/components/noticebar/index.vue +0 -246
  122. package/dist/components/noticebar/style.less +0 -309
  123. package/dist/components/overlay/index.js +0 -8
  124. package/dist/components/overlay/index.vue +0 -161
  125. package/dist/components/overlay/style.less +0 -23
  126. package/dist/components/pagebreak/index.js +0 -7
  127. package/dist/components/pagebreak/index.vue +0 -60
  128. package/dist/components/pagebreak/style.less +0 -43
  129. package/dist/components/popover/index.js +0 -8
  130. package/dist/components/popover/index.vue +0 -99
  131. package/dist/components/popover/style.less +0 -349
  132. package/dist/components/popover/vue-popover.vue +0 -314
  133. package/dist/components/radio/assist.js +0 -34
  134. package/dist/components/radio/index.js +0 -8
  135. package/dist/components/radio/index.vue +0 -159
  136. package/dist/components/radio/radio-group/index.vue +0 -70
  137. package/dist/components/radio/style.less +0 -297
  138. package/dist/components/result/completed.png +0 -0
  139. package/dist/components/result/error.png +0 -0
  140. package/dist/components/result/index.js +0 -8
  141. package/dist/components/result/index.vue +0 -47
  142. package/dist/components/result/style.less +0 -42
  143. package/dist/components/result/wait.png +0 -0
  144. package/dist/components/selector/index.js +0 -8
  145. package/dist/components/selector/index.vue +0 -124
  146. package/dist/components/selector/style.less +0 -474
  147. package/dist/components/skeleton/index.js +0 -7
  148. package/dist/components/skeleton/index.vue +0 -142
  149. package/dist/components/skeleton/style.less +0 -192
  150. package/dist/components/slider/draggable.js +0 -49
  151. package/dist/components/slider/index.js +0 -7
  152. package/dist/components/slider/index.vue +0 -173
  153. package/dist/components/slider/style.less +0 -95
  154. package/dist/components/slider/utils.js +0 -60
  155. package/dist/components/step/index.js +0 -7
  156. package/dist/components/step/index.vue +0 -48
  157. package/dist/components/step/style.less +0 -59
  158. package/dist/components/step-item/index.js +0 -7
  159. package/dist/components/step-item/index.vue +0 -89
  160. package/dist/components/step-item/style.less +0 -361
  161. package/dist/components/style/index.vue +0 -42
  162. package/dist/components/switch/index.js +0 -8
  163. package/dist/components/switch/index.vue +0 -72
  164. package/dist/components/switch/style.less +0 -54
  165. package/dist/components/tabs/index.js +0 -8
  166. package/dist/components/tabs/index.vue +0 -145
  167. package/dist/components/tabs/style.less +0 -383
  168. package/dist/components/tabs/tab/index.vue +0 -56
  169. package/dist/components/tag/index.js +0 -7
  170. package/dist/components/tag/index.vue +0 -50
  171. package/dist/components/tag/style.less +0 -211
  172. package/dist/components/title/index.js +0 -8
  173. package/dist/components/title/index.vue +0 -92
  174. package/dist/components/title/style.less +0 -188
  175. package/dist/components/toast/index.js +0 -80
  176. package/dist/components/toast/index.vue +0 -44
  177. package/dist/components/toast/style.less +0 -55
  178. package/dist/components/transition/index.js +0 -8
  179. package/dist/components/transition/index.vue +0 -13
  180. package/dist/components/transition/style.less +0 -208
  181. package/dist/components/upload/index.js +0 -7
  182. package/dist/components/upload/index.vue +0 -224
  183. package/dist/components/upload/style.less +0 -156
  184. package/dist/demo.html +0 -10
  185. package/dist/locale/ar.js +0 -98
  186. package/dist/locale/en.js +0 -98
  187. package/dist/locale/zh.js +0 -98
  188. package/dist/token.css +0 -2973
  189. package/dist/vdesign-ui.common.js +0 -26919
  190. package/dist/vdesign-ui.css +0 -1
  191. package/dist/vdesign-ui.umd.js +0 -26929
  192. package/dist/vdesign-ui.umd.min.js +0 -32
@@ -1,7 +0,0 @@
1
- import Tag from './index.vue';
2
- import './style.less';
3
- Tag.install = function(Vue) {
4
- Vue.component(Tag.name, Tag)
5
- }
6
-
7
- export default Tag;
@@ -1,50 +0,0 @@
1
- <template>
2
- <!-- {{text}} 改成v-html -->
3
- <div class="vd-tag" :class="classes">
4
- <slot>{{ text }}</slot>
5
- </div>
6
- </template>
7
-
8
- <script>
9
- const prefixCls = 'vd-tag'
10
- export default {
11
- name: 'vd-tag',
12
- props: {
13
- text: String,
14
- type: {
15
- type: String,
16
- // white、dark、blue、cyan、green、olive、yellow、orange、red、pink、purple
17
- default: ''
18
- },
19
- size: {
20
- type: String,
21
- },
22
- borders: {
23
- type: Boolean,
24
- },
25
- plain: {
26
- type: Boolean,
27
- }
28
-
29
- },
30
- computed: {
31
- classes() {
32
- const classes = {
33
- [`${prefixCls}--${this.size}`]: this.size,
34
- [`${prefixCls}--${this.type}`]: this.type,
35
- [`${prefixCls}--${this.type}__border`]: this.borders,
36
- [`${prefixCls}--plain`]: this.plain
37
- };
38
- if (this.borders) {
39
- classes['vd-hairline--surround'] = true;
40
- }
41
- return classes
42
-
43
- },
44
- }
45
- }
46
- </script>
47
-
48
- <style lang="less">
49
- @import './style.less';
50
- </style>
@@ -1,211 +0,0 @@
1
- @tag-prefix-cls: vd-tag;
2
-
3
- .@{tag-prefix-cls}{
4
- display: inline-flex;
5
- align-items: center;
6
- border-radius: calc(var(--radius-tag-bg) * 1px);
7
- padding: 0 calc(var(--spacing-tag-padding_y) * 1px);
8
-
9
- &--small{
10
- font-size: calc(var(--en-single-f-b-s-fontSize) * 1px);
11
- font-weight: var(--en-single-f-b-s-fontWeight);
12
- height: calc(var(--height-tag-s) * 1px);
13
- }
14
-
15
- &--large{
16
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
17
- font-weight: var(--en-single-f-b-r-fontWeight);
18
- height: calc(var(--height-tag-m) * 1px);
19
- }
20
-
21
-
22
-
23
- &--white{
24
- color: var(--color-tag-default-text);
25
- background-color: var(--color-tag-default-bg);
26
-
27
- &__border{
28
- background-color:transparent;
29
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
30
- font-weight: var(--en-single-f-b-r-fontWeight);
31
- color: var(--color-tag-default_border-text);
32
- &::after{
33
- border-color: var(--color-tag-default-border);
34
- border-radius: calc(var(--radius-tag-bg) * 2px);
35
- }
36
- }
37
- }
38
-
39
- &--dark{
40
- color: var(--color-tag-dark-text);
41
- background-color: var(--color-tag-dark-bg);
42
-
43
- &__border{
44
- background-color:transparent;
45
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
46
- font-weight: var(--en-single-f-b-r-fontWeight);
47
- color: var(--color-tag-dark_border-text);
48
- &::after{
49
- border-color: var(--color-tag-dark-border);
50
- border-radius: calc(var(--radius-tag-bg) * 2px);
51
-
52
- }
53
- }
54
- }
55
-
56
- &--blue{
57
- color: var(--color-tag-blue-text);
58
- background-color: var(--color-tag-blue-bg);
59
-
60
- &__border{
61
- background-color:transparent;
62
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
63
- font-weight: var(--en-single-f-b-r-fontWeight);
64
- &::after{
65
- border-color: var(--color-tag-blue-border);
66
- border-radius: calc(var(--radius-tag-bg) * 2px);
67
-
68
- }
69
- }
70
- }
71
-
72
- &--cyan{
73
- color: var(--color-tag-cyan-text);
74
- background-color: var(--color-tag-cyan-bg);
75
-
76
- &__border{
77
- background-color:transparent;
78
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
79
- font-weight: var(--en-single-f-b-r-fontWeight);
80
- &::after{
81
- border-color: var(--color-tag-cyan-border);
82
- border-radius: calc(var(--radius-tag-bg) * 2px);
83
-
84
- }
85
- }
86
-
87
- }
88
-
89
-
90
- &--green{
91
- color: var(--color-tag-green-text);
92
- background-color: var(--color-tag-green-bg);
93
-
94
- &__border{
95
- background-color:transparent;
96
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
97
- font-weight: var(--en-single-f-b-r-fontWeight);
98
- &::after{
99
- border-color: var(--color-tag-green-border);
100
- border-radius: calc(var(--radius-tag-bg) * 2px);
101
-
102
- }
103
- }
104
-
105
- }
106
-
107
- &--olive{
108
- color: var(--color-tag-olive-text);
109
- background-color: var(--color-tag-olive-bg);
110
-
111
- &__border{
112
- background-color:transparent;
113
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
114
- font-weight: var(--en-single-f-b-r-fontWeight);
115
- &::after{
116
- border-color: var(--color-tag-olive-border);
117
- border-radius: calc(var(--radius-tag-bg) * 2px);
118
-
119
- }
120
- }
121
-
122
- }
123
-
124
-
125
- &--yellow{
126
- color: var(--color-tag-yellow-text);
127
- background-color: var(--color-tag-yellow-bg);
128
-
129
- &__border{
130
- background-color:transparent;
131
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
132
- font-weight: var(--en-single-f-b-r-fontWeight);
133
- &::after{
134
- border-color: var(--color-tag-yellow-border);
135
- border-radius: calc(var(--radius-tag-bg) * 2px);
136
-
137
- }
138
- }
139
-
140
- }
141
-
142
- &--orange{
143
- color: var(--color-tag-orange-text);
144
- background-color: var(--color-tag-orange-bg);
145
-
146
- &__border{
147
- background-color:transparent;
148
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
149
- font-weight: var(--en-single-f-b-r-fontWeight);
150
- &::after{
151
- border-color: var(--color-tag-orange-border);
152
- border-radius: calc(var(--radius-tag-bg) * 2px);
153
-
154
- }
155
- }
156
- }
157
-
158
- &--red{
159
- color: var(--color-tag-red-text);
160
- background-color: var(--color-tag-red-bg);
161
-
162
- &__border{
163
- background-color:transparent;
164
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
165
- font-weight: var(--en-single-f-b-r-fontWeight);
166
- &::after{
167
- border-color: var(--color-tag-red-border);
168
- border-radius: calc(var(--radius-tag-bg) * 2px);
169
-
170
- }
171
- }
172
- }
173
-
174
- &--pink{
175
- color: var(--color-tag-pink-text);
176
- background-color: var(--color-tag-pink-bg);
177
-
178
- &__border{
179
- background-color:transparent;
180
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
181
- font-weight: var(--en-single-f-b-r-fontWeight);
182
- &::after{
183
- border-color: var(--color-tag-pink-border);
184
- border-radius: calc(var(--radius-tag-bg) * 2px);
185
-
186
- }
187
- }
188
- }
189
-
190
-
191
- &--purple{
192
- color: var(--color-tag-purple-text);
193
- background-color: var(--color-tag-purple-bg);
194
-
195
- &__border{
196
- background-color:transparent;
197
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
198
- font-weight: var(--en-single-f-b-r-fontWeight);
199
- &::after{
200
- border-color: var(--color-tag-purple-border);
201
- border-radius: calc(var(--radius-tag-bg) * 2px);
202
-
203
- }
204
- }
205
- }
206
-
207
- &--plain {
208
- background-color:transparent;
209
- padding: 0;
210
- }
211
- }
@@ -1,8 +0,0 @@
1
- import Titles from './index.vue';
2
- import './style.less';
3
-
4
- Titles.install = function (Vue) {
5
- Vue.component(Titles.name, Titles);
6
- };
7
-
8
- export default Titles;
@@ -1,92 +0,0 @@
1
- <template>
2
- <div :class="['vd-title', wrapClasses]" @click="handleClick">
3
- <div class="vd-title--left">
4
- <div class="vd-title-content">
5
- <vd-icon v-if="leftIcon" :name="leftIcon" :svg="leftSvg" :class="leftIconClasses"></vd-icon>
6
- <span :class="['vd-title-inner__title', innerTitleClasses]">{{ title }}</span>
7
- <vd-icon v-if="rightIcon" :name="rightIcon" :svg="rightSvg" :class="rightIconClasses"></vd-icon>
8
- </div>
9
- <p v-if="subText" :class="['vd-title__subtext', subTextClasses]">{{ subText }}</p>
10
- </div>
11
- <div class="vd-title--right" v-if="guideText || arrow || $slots.right">
12
- <slot name="right">
13
- <span v-if="guideText" :class="textRightClasses">{{ guideText }}</span>
14
- <vd-icon v-if="arrow" class="vd-title-arrow" name="ar_icon_nav_back"></vd-icon>
15
- </slot>
16
- </div>
17
- </div>
18
- </template>
19
- <script>
20
- const prefixCls = 'vd-title';
21
-
22
- export default {
23
- name: 'vd-title',
24
- props: {
25
- title: String,
26
- leftIcon: String,
27
- rightIcon: String,
28
- arrow: Boolean,
29
- subText: String,
30
- guideText: String,
31
- type: {
32
- type: String,
33
- default: 'primary'
34
- },
35
- leftSvg: Boolean,
36
- rightSvg: Boolean,
37
-
38
- },
39
- data() {
40
- return {
41
-
42
- };
43
- },
44
- computed: {
45
- wrapClasses() {
46
- return {
47
- [`${prefixCls}-${this.type}`]: this.type,
48
- [`${prefixCls}-${this.type}-double`]: this.subText,
49
- }
50
-
51
- },
52
- leftIconClasses() {
53
- return {
54
- [`${prefixCls}-${this.type}__icon--left`]: this.type
55
- }
56
-
57
- },
58
- innerTitleClasses() {
59
- return {
60
- [`${prefixCls}-${this.type}__title`]: this.type
61
- }
62
-
63
- },
64
- subTextClasses() {
65
- return {
66
- [`${prefixCls}-${this.type}__subtext`]: this.type
67
- }
68
- },
69
- rightIconClasses() {
70
- return {
71
- [`${prefixCls}-${this.type}__icon--right`]: this.type
72
- }
73
- },
74
- textRightClasses() {
75
- return {
76
- [`${prefixCls}-${this.type}__text--right`]: this.type
77
- }
78
- }
79
- },
80
- methods: {
81
- handleClick() {
82
- if (this.arrow) {
83
- this.$emit('next');
84
- }
85
- },
86
- }
87
- };
88
- </script>
89
-
90
- <style lang="less">
91
- @import './style.less';
92
- </style>
@@ -1,188 +0,0 @@
1
-
2
- @title-prefix-cls: vd-title;
3
-
4
- .@{title-prefix-cls} {
5
-
6
- display: flex;
7
- align-items: center;
8
- justify-content: space-between;
9
- padding-inline-start: calc(var(--spacing-title-padding_left) * 1px);
10
- padding-inline-end: calc(var(--spacing-title-padding_right) * 1px);
11
- background-color: var(--bg-color-1);
12
-
13
- // &--left{
14
- // display: flex;
15
- // flex-direction: column;
16
- // }
17
-
18
- &--right{
19
- display: flex;
20
- align-items: center;
21
- }
22
-
23
- &-content{
24
- display: flex;
25
- align-items: center;
26
- }
27
-
28
- &-inner__title{
29
- color: var(--color-title-head);
30
- }
31
-
32
- &__subtext{
33
- margin-block-start: calc(var(--spacing-title-subtitle-margin_top) * 1px);
34
- color: var(--color-title-text);
35
- }
36
-
37
- &-arrow{
38
- color:var(--color-title-icon_arrow);
39
- font-size: calc(var(--icon-title-arrow) * 1px);
40
- }
41
-
42
- &-primary{
43
-
44
- height: calc(var(--height-title-primary) * 1px);
45
-
46
- &__icon--left{
47
- margin-inline-end: calc(var(--spacing-title-primary_icon-margin_y) * 1px);
48
- font-size: calc(var(--icon-title-primary) * 1px);
49
- }
50
-
51
- &__icon--right{
52
- margin-inline-start: calc(var(--spacing-title-primary_icon-margin_y) * 1px);
53
- font-size: calc(var(--icon-title-primary) * 1px);
54
- }
55
-
56
- &__title{
57
- font-size: calc(var(--en-single-f-f-b-fontSize) * 1px);
58
- font-weight: var(--en-single-f-f-b-fontWeight);
59
- }
60
-
61
- &__text--right{
62
- margin-inline-end: calc(var(--spacing-title-text-margin_right) * 1px);
63
- font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
64
- font-weight: var(--en-single-f-c-r-fontWeight);
65
- color: var(--color-title-text);
66
- }
67
- &__subtext{
68
- font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
69
- font-weight: var(--en-single-f-c-r-fontWeight);
70
- }
71
- }
72
-
73
- &-secondary {
74
-
75
- height: calc(var(--height-title-secondary) * 1px);
76
-
77
- &__icon--left{
78
- margin-inline-end: calc(var(--spacing-title-secondary_icon-margin_y) * 1px);
79
- font-size: calc(var(--icon-title-secondary) * 1px);
80
- }
81
-
82
- &__icon--right{
83
- margin-inline-start: calc(var(--spacing-title-secondary_icon-margin_y) * 1px);
84
- font-size: calc(var(--icon-title-secondary) * 1px);
85
-
86
- }
87
-
88
- &__title{
89
- font-size: calc(var(--en-single-f-e-s-fontSize) * 1px);
90
- font-weight: var(--en-single-f-e-s-fontWeight);
91
- }
92
-
93
- &__text--right{
94
- margin-inline-end: calc(var(--spacing-title-text-margin_right) * 1px);
95
- font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
96
- font-weight: var(--en-single-f-c-r-fontWeight);
97
- color: var(--color-title-text);
98
- }
99
- &__subtext{
100
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
101
- font-weight: var(--en-single-f-b-r-fontWeight);
102
- }
103
- }
104
-
105
- &-tertiary {
106
- height: calc(var(--height-title-tertiary) * 1px);
107
-
108
- &__icon--left{
109
- margin-inline-end: calc(var(--spacing-title-tertiary_icon-margin_y) * 1px);
110
- font-size: calc(var(--icon-title-tertiary) * 1px);
111
- }
112
-
113
- &__icon--right{
114
- margin-inline-start: calc(var(--spacing-title-tertiary_icon-margin_y) * 1px);
115
- font-size: calc(var(--icon-title-tertiary) * 1px);
116
- }
117
-
118
- &__title{
119
- font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
120
- font-weight: var(--en-single-f-d-s-fontWeight);
121
- }
122
-
123
- &__text--right{
124
- margin-inline-end: calc(var(--spacing-title-text-margin_right) * 1px);
125
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
126
- font-weight: var(--en-single-f-b-r-fontWeight);
127
- color: var(--color-title-text);
128
- }
129
-
130
- &__subtext{
131
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
132
- font-weight: var(--en-single-f-b-r-fontSize);
133
- }
134
- }
135
-
136
- &-quaternary {
137
- height: calc(var(--height-title-quaternary) * 1px);
138
-
139
- &__icon--left{
140
- margin-inline-end: calc(var(--spacing-title-quaternary_icon-margin_y) * 1px);
141
- font-size: calc(var(--icon-title-quaternary) * 1px);
142
- }
143
-
144
- &__icon--right{
145
- margin-inline-start: calc(var(--spacing-title-quaternary_icon-margin_y) * 1px);
146
- font-size: calc(var(--icon-title-quaternary) * 1px);
147
- }
148
-
149
- &__title{
150
- font-size: calc(var(--en-single-f-c-s-fontSize) * 1px);
151
- font-weight: var(--en-single-f-c-s-fontWeight);
152
- }
153
-
154
- &__text--right{
155
- margin-inline-end: calc(var(--spacing-title-text-margin_right) * 1px);
156
- font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
157
- font-weight: var(--en-single-f-b-r-fontWeight);
158
- color: var(--color-title-text);
159
- }
160
- &__subtext{
161
- font-size: calc(var(--en-single-f-a-r-fontSize) * 1px);
162
- font-weight: var(--en-single-f-a-r-fontSize);
163
- }
164
- }
165
-
166
- &-label{
167
- padding-inline-start: 0;
168
- padding-inline-end: 0;
169
- font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
170
- font-weight: var(--en-single-f-c-r-fontWeight);
171
- }
172
-
173
- &-primary-double {
174
- height: calc(var(--height-title-primary_double) * 1px);
175
- }
176
- &-secondary-double {
177
- height: calc(var(--height-title-secondary_double) * 1px);
178
- }
179
- &-tertiary-double {
180
- height: calc(var(--height-title-tertiary_double) * 1px);
181
- }
182
- &-quaternary-double {
183
- height: calc(var(--height-title-quaternary_double) * 1px);
184
- }
185
- }
186
-
187
-
188
-
@@ -1,80 +0,0 @@
1
- import Vue from 'vue'
2
- import VdToast from './index.vue'
3
- let timer = null
4
-
5
- /**
6
- * 使用新类继承 VUE 扩展组件
7
- */
8
- class Toast extends Vue.extend(VdToast) {
9
- constructor(options) {
10
- super()
11
- const type = Object.prototype.toString.call(options)
12
- /**
13
- * 赋值虚拟节点
14
- */
15
- this.vm = this.$mount()
16
- /**
17
- * 判断 options 类型
18
- */
19
- if (type === '[object String]' || type === '[object Number]') {
20
- this.message = options
21
- } else if (type === '[object Object]') {
22
- /**
23
- * 循环遍历,设置该类属性
24
- */
25
- Object.keys(options).forEach(elem => {
26
- this[elem] = options[elem]
27
- })
28
- } else {
29
- /**
30
- * 抛出错误
31
- */
32
- throw new Error(`${JSON.stringify(options)} is not Number, String or Object`)
33
- }
34
- this.init()
35
- }
36
-
37
- /**
38
- * 初始化方法
39
- */
40
- init() {
41
- /**
42
- * 把虚拟 DOM 插入到真实 DOM 树中
43
- */
44
- document.body.appendChild(this.vm.$el)
45
- this.start()
46
- }
47
-
48
- /**
49
- * 开始此组件
50
- */
51
- start() {
52
- clearTimeout(timer)
53
- /**
54
- * 在挂载真实 DOM 树后显示过渡效果
55
- */
56
- timer = setTimeout(() => {
57
- this.isShow = true
58
- this.end()
59
- }, 100)
60
- }
61
-
62
- /**
63
- * 结束此组件
64
- */
65
- end() {
66
- /**
67
- * 关闭过渡效果之后移除真实 DOM 树节点
68
- */
69
- setTimeout(() => {
70
- this.isShow = false
71
- setTimeout(() => {
72
- document.body.removeChild(this.vm.$el)
73
- }, 500)
74
- }, this.duration)
75
- }
76
- }
77
-
78
- const GetToast = options => new Toast(options)
79
-
80
- export default GetToast
@@ -1,44 +0,0 @@
1
- <template>
2
- <!-- 消息提示 -->
3
- <div :class="['vd-toast', { 'vd-toast-show': isShow }, { 'vd-toast-icon': !!icon }, customClass]"
4
- :style="`background:${bgColor};`">
5
- <i v-if="!!icon" class="vd-iconfont" :class="`vd-icon-${icon}`"></i>
6
- <div>{{ message }}</div>
7
- </div>
8
- </template>
9
- <script>
10
- export default {
11
- name: 'vd-toast',
12
- data() {
13
- return {
14
- message: '', // 提示语
15
- isShow: false, // 是否显示
16
- bgColor: '', // 背景颜色
17
- icon: '', // 图标
18
- duration: 1500, // 延迟时间
19
- position: 'middle' // default:middle, value: top, bottom
20
- }
21
- },
22
- computed: {
23
- customClass() {
24
- var classes = [];
25
- switch (this.position) {
26
- case 'top':
27
- classes.push('vd-toast__top');
28
- break;
29
- case 'bottom':
30
- classes.push('vd-toast__bottom');
31
- break;
32
- default:
33
- classes.push('vd-toast__middle');
34
- }
35
- classes.push(this.className);
36
-
37
- return classes.join(' ');
38
- }
39
- }
40
- }
41
- </script>
42
- <style lang="less">
43
- @import './style.less';
44
- </style>