vdesign-ui 0.1.19 → 0.1.20

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 (193) 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 +1050 -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 +159 -0
  117. package/dist/components/radio/radio-group/index.vue +70 -0
  118. package/dist/components/radio/style.less +297 -0
  119. package/dist/components/result/completed-dark.png +0 -0
  120. package/dist/components/result/completed.png +0 -0
  121. package/dist/components/result/error-dark.png +0 -0
  122. package/dist/components/result/error.png +0 -0
  123. package/dist/components/result/index.js +8 -0
  124. package/dist/components/result/index.vue +75 -0
  125. package/dist/components/result/style.less +42 -0
  126. package/dist/components/result/wait-dark.png +0 -0
  127. package/dist/components/result/wait.png +0 -0
  128. package/dist/components/selector/index.js +8 -0
  129. package/dist/components/selector/index.vue +124 -0
  130. package/dist/components/selector/style.less +474 -0
  131. package/dist/components/skeleton/index.js +7 -0
  132. package/dist/components/skeleton/index.vue +142 -0
  133. package/dist/components/skeleton/style.less +192 -0
  134. package/dist/components/slider/draggable.js +49 -0
  135. package/dist/components/slider/index.js +7 -0
  136. package/dist/components/slider/index.vue +173 -0
  137. package/dist/components/slider/style.less +96 -0
  138. package/dist/components/slider/utils.js +60 -0
  139. package/dist/components/step/index.js +7 -0
  140. package/dist/components/step/index.vue +48 -0
  141. package/dist/components/step/style.less +59 -0
  142. package/dist/components/step-item/index.js +7 -0
  143. package/dist/components/step-item/index.vue +117 -0
  144. package/dist/components/step-item/style.less +361 -0
  145. package/dist/components/style/index.vue +42 -0
  146. package/dist/components/switch/index.js +8 -0
  147. package/dist/components/switch/index.vue +72 -0
  148. package/dist/components/switch/style.less +56 -0
  149. package/dist/components/tabs/index.js +8 -0
  150. package/dist/components/tabs/index.vue +145 -0
  151. package/dist/components/tabs/style.less +385 -0
  152. package/dist/components/tabs/tab/index.vue +56 -0
  153. package/dist/components/tag/index.js +7 -0
  154. package/dist/components/tag/index.vue +50 -0
  155. package/dist/components/tag/style.less +211 -0
  156. package/dist/components/title/index.js +8 -0
  157. package/dist/components/title/index.vue +92 -0
  158. package/dist/components/title/style.less +188 -0
  159. package/dist/components/toast/index.js +80 -0
  160. package/dist/components/toast/index.vue +44 -0
  161. package/dist/components/toast/style.less +55 -0
  162. package/dist/components/transition/index.js +8 -0
  163. package/dist/components/transition/index.vue +13 -0
  164. package/dist/components/transition/style.less +208 -0
  165. package/dist/components/upload/index.js +7 -0
  166. package/dist/components/upload/index.vue +224 -0
  167. package/dist/components/upload/style.less +156 -0
  168. package/dist/demo.html +10 -0
  169. package/dist/locale/ar.js +98 -0
  170. package/dist/locale/en.js +98 -0
  171. package/dist/locale/zh.js +98 -0
  172. package/dist/token.css +2982 -0
  173. package/dist/vdesign-ui.common.js +27204 -0
  174. package/dist/vdesign-ui.css +1 -0
  175. package/dist/vdesign-ui.umd.js +27214 -0
  176. package/dist/vdesign-ui.umd.min.js +32 -0
  177. package/package.json +1 -1
  178. package/dist/css/chunk-1952c402.04c2303e.css +0 -1
  179. package/dist/css/chunk-6a5c6104.38021b56.css +0 -1
  180. package/dist/css/chunk-vendors.4ecfba63.css +0 -1
  181. package/dist/css/sites.395ce21f.css +0 -1
  182. package/dist/img/bg_mobile.5909f667.png +0 -0
  183. package/dist/img/icon.a67073c3.svg +0 -7
  184. package/dist/img/iphoneX.38c8778e.png +0 -0
  185. package/dist/img/logo-white.fad4f907.png +0 -0
  186. package/dist/img/logo.1eda11d6.png +0 -0
  187. package/dist/img/qrcode2.0a9d9044.png +0 -0
  188. package/dist/index.html +0 -1
  189. package/dist/js/chunk-1952c402.c58ecfb5.js +0 -1
  190. package/dist/js/chunk-2d2183be.2a64419d.js +0 -1
  191. package/dist/js/chunk-6a5c6104.c8fa5635.js +0 -1
  192. package/dist/js/chunk-vendors.490b7673.js +0 -37
  193. package/dist/js/sites.5a217467.js +0 -1
@@ -0,0 +1,247 @@
1
+ <template>
2
+ <div
3
+ :class="[mode ? `${prefixCls}-${mode}` : '', type ? 'vd-noticebar-' + type : '', { 'vd-noticebar-action': action }]"
4
+ v-if="isShow">
5
+ <!-- 左侧图标 -->
6
+ <div v-if="customLeft || customIcon" :class="`${prefixCls}-${mode}__left`">
7
+ <template v-if="customLeft">
8
+ <slot name="left"></slot>
9
+ </template>
10
+
11
+ <template v-else-if="customIcon">
12
+ <vd-icon :name="customIcon" :svg="iconSvg"></vd-icon>
13
+ </template>
14
+ </div>
15
+ <!-- 内容区 -->
16
+ <div :class="[`${prefixCls}-${mode}__content`, multiRows && `${prefixCls}-${mode}__multi`]" ref="wrap">
17
+ <!-- scrollable -->
18
+ <div v-if="scrollable" :style="contentStyle"
19
+ :class="[(overflow && scrollable) && `${prefixCls}-${mode}__content--animate`]" ref="content">
20
+ <div v-if="customTitle || title" :class="`${prefixCls}-${mode}__message`">
21
+ <div :class="[`${prefixCls}-${mode}__message--title`]">
22
+ <template v-if="customTitle">
23
+ <slot name="title"></slot>
24
+ </template>
25
+ <template v-else>{{ title }}</template>
26
+ </div>
27
+ <div v-if="tag" :class="[tag && `${prefixCls}-${mode}__message--tag`, state ? 'vd-noticebar-' + state : '']">
28
+ {{
29
+ tag
30
+ }}</div>
31
+ </div>
32
+ <slot></slot>
33
+ </div>
34
+ <template v-else>
35
+ <div v-if="customTitle || title" :class="`${prefixCls}-${mode}__message`">
36
+ <div :class="[`${prefixCls}-${mode}__message--title`]">
37
+ <template v-if="customTitle">
38
+ <slot name="title"></slot>
39
+ </template>
40
+ <template v-else>{{ title }}</template>
41
+ </div>
42
+ <div v-if="tag" :class="[tag && `${prefixCls}-${mode}__message--tag`, state ? 'vd-noticebar-' + state : '']">
43
+ <vd-icon
44
+ :name="state === 'success' ? 'icon_show_finished' : state === 'tips' ? 'icon_show_doing' : state === 'warning' ? 'icon_show_failed' : 'icon_show_cancel'"></vd-icon>
45
+ {{ tag }}
46
+ </div>
47
+ </div>
48
+ <slot></slot>
49
+ </template>
50
+ </div>
51
+ <!-- 右侧操作区 -->
52
+ <div :class="`${prefixCls}-${mode}__right`">
53
+ <template v-if="customRight">
54
+ <slot name="right"></slot>
55
+ </template>
56
+ <!-- 操作区 -->
57
+ <div v-if="action" :class="`${prefixCls}-${mode}__button`">
58
+ <vd-button type="primary_text">{{ action }}</vd-button>
59
+ </div>
60
+ <!-- 可关闭 -->
61
+ <vd-icon v-if="closable" name="icon_btn_close" @click.native.stop="$_close"></vd-icon>
62
+ <!-- 可链接 -->
63
+ <vd-icon v-if="islink" name="icon_btn_next"></vd-icon>
64
+ </div>
65
+ </div>
66
+ </template>
67
+
68
+ <script>
69
+ export default {
70
+ name: 'vd-noticebar',
71
+ props: {
72
+ prefixCls: {
73
+ type: String,
74
+ default: 'vd-noticebar'
75
+ },
76
+ mode: {
77
+ type: String,
78
+ default: 'snackbar', // snackbar toast notify
79
+ },
80
+ type: {
81
+ type: String,
82
+ default: 'info', // info/warning/tips
83
+ },
84
+ scrollable: {
85
+ type: Boolean,
86
+ default: false,
87
+ },
88
+ closable: {
89
+ type: Boolean,
90
+ default: false,
91
+ },
92
+ islink: {
93
+ type: Boolean,
94
+ default: false
95
+ },
96
+ // notify
97
+ title: {
98
+ type: String,
99
+ default: '',
100
+ },
101
+ action: {
102
+ type: String,
103
+ default: '',
104
+ },
105
+ tag: {
106
+ type: String,
107
+ default: '',
108
+ },
109
+ state: {
110
+ type: String,
111
+ default: 'tips'
112
+ },
113
+ // 画蛇添足部分
114
+ icon: {
115
+ type: String,
116
+ default: '',
117
+ },
118
+ iconSvg: {
119
+ type: Boolean,
120
+ default: false,
121
+ },
122
+ multiRows: {
123
+ type: Boolean,
124
+ default: false,
125
+ },
126
+ speed: {
127
+ type: Number,
128
+ default: 50
129
+ },
130
+ defaultWidth: {
131
+ type: Number,
132
+ default: 375
133
+ }
134
+ },
135
+
136
+ data() {
137
+ return {
138
+ isShow: true,
139
+ overflow: false,
140
+ contentStyle: {
141
+ transitionDuration: '0s',
142
+ transform: 'translateX(0px)'
143
+ },
144
+ wrapWidth: 0,
145
+ contentWidth: 0,
146
+ time: 0,
147
+ timer: null,
148
+ convertSpeed: 1
149
+ }
150
+ },
151
+
152
+ computed: {
153
+ customIcon() {
154
+ let result
155
+ if (this.mode === 'toast') {
156
+ result = this.type === 'warning' ? 'icon_btn_clean' : 'icon_show_finished'
157
+ } else {
158
+ result = this.icon
159
+ }
160
+ return result
161
+ },
162
+ customLeft() {
163
+ return !!this.$slots.left
164
+ },
165
+
166
+ customRight() {
167
+ return !!this.$slots.right
168
+ },
169
+
170
+ customTitle() {
171
+ return !!this.$slots.title
172
+ }
173
+ },
174
+
175
+ updated() {
176
+ this.$_checkOverflow()
177
+ },
178
+
179
+ mounted() {
180
+ this.$_checkOverflow()
181
+ this.init()
182
+ },
183
+
184
+ methods: {
185
+ $_close() {
186
+ if (this.closable) {
187
+ this.isShow = false
188
+ }
189
+ this.$emit('close')
190
+ },
191
+ $_checkOverflow() {
192
+ if (!this.scrollable) {
193
+ return
194
+ }
195
+ const { wrap, content } = this.$refs
196
+
197
+ /* istanbul ignore if */
198
+ if (!wrap || !content) {
199
+ return
200
+ }
201
+
202
+ const paddingLeft =
203
+ window
204
+ .getComputedStyle(content, null)
205
+ .getPropertyValue('padding')
206
+ .split(' ')[3] || '0px'
207
+ const left = +paddingLeft.match(/\d+/g)[0]
208
+ this.overflow = content.scrollWidth - left > Math.ceil(wrap.getBoundingClientRect().width)
209
+
210
+ },
211
+ init() {
212
+
213
+ const { wrap, content } = this.$refs
214
+ if (wrap && content) {
215
+ // const _width = window.innerWidth
216
+ // this.convertSpeed = _width / this.defaultWidth * this.speed // 根据分辨率转化成不同的速度
217
+ this.convertSpeed = 375 / this.defaultWidth * this.speed //_width / this.defaultWidth * this.speed // 根据分辨率转化成不同的速度
218
+ this.wrapWidth = wrap.offsetWidth
219
+ this.contentWidth = content.scrollWidth
220
+ console.log(content.scrollWidth);
221
+ this.startAnimate()
222
+ this.timer = setInterval(() => {
223
+ this.startAnimate()
224
+ }, this.time * 1000)
225
+ this.$once('hook:beforeDestroy', () => {
226
+ clearInterval(this.timer)
227
+ this.timer = null
228
+ })
229
+ }
230
+ },
231
+ startAnimate() {
232
+ this.contentStyle.transitionDuration = '0s'
233
+ this.contentStyle.transform = 'translateX(' + this.wrapWidth + 'px)'
234
+ this.time = (this.wrapWidth + this.contentWidth) / this.convertSpeed
235
+ setTimeout(() => {
236
+ this.contentStyle.transitionDuration = this.time + 's'
237
+ this.contentStyle.transform = 'translateX(-' + this.contentWidth + 'px)'
238
+ }, 200)
239
+ },
240
+ },
241
+ }
242
+
243
+ </script>
244
+
245
+ <style lang="less">
246
+ @import './style.less';
247
+ </style>
@@ -0,0 +1,332 @@
1
+ @prefix: ~"vd-noticebar";
2
+
3
+ .@{prefix}-snackbar {
4
+ box-sizing: border-box;
5
+ position: relative;
6
+ width: 100%;
7
+ display: flex;
8
+ min-height: calc(var(--height-noticebar-snackbar) * 1px);
9
+ padding-inline-start: calc(var(--spacing-noticebar-snackbar-padding_left) * 1px);
10
+ padding-inline-end: calc(var(--spacing-noticebar-snackbar-padding_right) * 1px);
11
+ border-radius: calc(var(--radius-noticebar-snackbar) * 1px);
12
+ background-color: var(--color-noticebar-snackbar_info-bg);
13
+ color: var(--color-noticebar-snackbar_info-text);
14
+ font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
15
+ font-weight: var(--en-single-f-c-r-fontWeight);
16
+ line-height: 1.25;
17
+ z-index: 99;
18
+
19
+ .vd-iconfont {
20
+ font-size: calc(var(--icon-noticebar-snackbar) * 1px);
21
+
22
+ &+.vd-iconfont {
23
+ margin-inline-start: calc(var(--spacing-noticebar-snackbar_icon-margin_right) * 1px);
24
+ }
25
+ }
26
+
27
+ &.@{prefix}-info {
28
+ background-color: var(--color-noticebar-snackbar_info-bg);
29
+ color: var(--color-noticebar-snackbar_info-text);
30
+
31
+ .vd-iconfont {
32
+ color: var(--color-noticebar-snackbar_info-icon);
33
+ }
34
+ }
35
+
36
+ &.@{prefix}-warning {
37
+ background-color: var(--color-noticebar-snackbar_warning-bg);
38
+ color: var(--color-noticebar-snackbar_warning-text);
39
+
40
+ .vd-noticebar-snackbar__content {
41
+ &::after {
42
+ background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_warning-bg) 90%);
43
+ }
44
+
45
+ &::before {
46
+ background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_warning-bg) 90%);
47
+ }
48
+ }
49
+
50
+ .vd-iconfont {
51
+ color: var(--color-noticebar-snackbar_warning-icon);
52
+ }
53
+ }
54
+
55
+ &.@{prefix}-tips {
56
+ background-color: var(--color-noticebar-snackbar_tips-bg);
57
+ color: var(--color-noticebar-snackbar_tips-text);
58
+
59
+ .vd-noticebar-snackbar__content {
60
+ &::after {
61
+ background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_tips-bg) 90%);
62
+ }
63
+
64
+ &::before {
65
+ background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_tips-bg) 90%);
66
+ }
67
+ }
68
+
69
+ .vd-iconfont {
70
+ color: var(--color-noticebar-snackbar_tips-icon);
71
+ }
72
+ }
73
+
74
+ &__left,
75
+ &__right {
76
+ display: flex;
77
+ align-items: center;
78
+ }
79
+
80
+ &__content {
81
+ position: relative;
82
+ flex: 1;
83
+ margin: auto;
84
+ width: auto;
85
+ // padding-inline-start: calc(var(--spacing-noticebar-snackbar-padding_left) * 1px);
86
+ // padding-inline-end: calc(var(--spacing-noticebar-snackbar-padding_right) * 1px);
87
+ white-space: nowrap;
88
+ overflow: hidden;
89
+ margin-inline-end: calc(var(--spacing-noticebar-snackbar_text-margin_right) * 1px);
90
+
91
+ &::after {
92
+ content: "";
93
+ width: calc(var(--spacing-noticebar-snackbar-padding_left) * 1px);
94
+ position: absolute;
95
+ inset-block: 0;
96
+ inset-inline-start: 0;
97
+ background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_info-bg) 90%);
98
+ z-index: 1;
99
+ }
100
+
101
+ &::before {
102
+ content: "";
103
+ width: calc(var(--spacing-noticebar-snackbar-padding_right) * 1px);
104
+ position: absolute;
105
+ inset-block: 0;
106
+ inset-inline-end: 0;
107
+ z-index: 1;
108
+ background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_info-bg) 90%);
109
+ }
110
+
111
+ &--animate {
112
+ display: inline-block;
113
+ transition-timing-function: linear;
114
+ }
115
+ }
116
+
117
+ &__multi {
118
+ white-space: normal;
119
+ padding-top: calc(var(--spacing-noticebar-snackbar_text-margin_right) * 1px);
120
+ padding-bottom: calc(var(--spacing-noticebar-snackbar_text-margin_right) * 1px);
121
+ overflow: hidden;
122
+ display: -webkit-box;
123
+ -webkit-box-orient: vertical;
124
+ -webkit-line-clamp: 3;
125
+ }
126
+
127
+ }
128
+
129
+ .@{prefix}-toast {
130
+ box-sizing: border-box;
131
+ position: relative;
132
+ display: inline-flex;
133
+ max-width: 100%;
134
+ min-height: calc(var(--height-noticebar-snackbar) * 1px);
135
+ padding-inline-start: calc(var(--spacing-noticebar-toast-padding_left) * 1px);
136
+ padding-inline-end: calc(var(--spacing-noticebar-toast-padding_right) * 1px);
137
+ border-radius: calc(var(--radius-noticebar-toast) * 1px);
138
+ background-color: var(--color-noticebar-toast_info-bg);
139
+ color: var(--color-noticebar-toast_info-text);
140
+ font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
141
+ font-weight: var(--en-single-f-c-r-fontWeight);
142
+ line-height: 1.25;
143
+ z-index: 99;
144
+
145
+ .vd-iconfont {
146
+ font-size: calc(var(--icon-noticebar-toast) * 1px);
147
+ margin-inline-end: calc(var(--spacing-noticebar-toast_icon-margin_right) * 1px);
148
+ }
149
+
150
+ [lang='ar'] & .vd-iconfont {
151
+ transform: scaleX(1);
152
+ }
153
+
154
+ &.@{prefix}-info {
155
+ background-color: var(--color-noticebar-toast_info-bg);
156
+ color: var(--color-noticebar-toast_info-text);
157
+ }
158
+
159
+ &.@{prefix}-warning {
160
+ background-color: var(--color-noticebar-snackbar_warning-bg);
161
+ color: var(--color-noticebar-snackbar_warning-text);
162
+
163
+ .vd-iconfont {
164
+ color: var(--color-noticebar-toast_warning-icon);
165
+ }
166
+ }
167
+
168
+ &__left,
169
+ &__right {
170
+ display: flex;
171
+ align-items: center;
172
+ }
173
+
174
+ &__content {
175
+ flex: 1;
176
+ margin: auto;
177
+ width: auto;
178
+ white-space: nowrap;
179
+ overflow: hidden;
180
+ text-overflow: ellipsis;
181
+ margin-inline-end: calc(var(--spacing-noticebar-snackbar_text-margin_right) * 1px);
182
+
183
+ &--animate {
184
+ // padding-inline-start: 100%;
185
+ display: inline-block;
186
+ transition-timing-function: linear;
187
+ }
188
+ }
189
+
190
+ &__multi {
191
+ white-space: normal;
192
+ padding-top: calc(var(--spacing-noticebar-snackbar_text-margin_right) * 1px);
193
+ padding-bottom: calc(var(--spacing-noticebar-snackbar_text-margin_right) * 1px);
194
+ }
195
+ }
196
+
197
+ .@{prefix}-notify {
198
+ box-sizing: border-box;
199
+ position: relative;
200
+ width: 100%;
201
+ display: flex;
202
+ font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
203
+ font-weight: var(--en-single-f-c-r-fontWeight);
204
+ line-height: 1.25;
205
+ z-index: 99;
206
+
207
+ border-radius: calc(var(--radius-noticebar-notification) * 1px);
208
+ background-color: var(--color-noticebar-notification-bg);
209
+ color: var(--color-noticebar-notification-text);
210
+ padding-inline-start: calc(var(--spacing-noticebar-notification-padding_left) * 1px);
211
+ padding-inline-end: calc(var(--spacing-noticebar-notification-padding_right) * 1px);
212
+ padding-top: calc(var(--spacing-noticebar-notification-padding_top) * 1px);
213
+ padding-bottom: calc(var(--spacing-noticebar-notification-padding_bottom) * 1px);
214
+ box-shadow: var(--shadow-s3);
215
+
216
+ &.@{prefix}-action {
217
+ padding-inline-end: calc(var(--spacing-noticebar-notification_button-padding_right) * 1px);
218
+ }
219
+
220
+ &__content {
221
+ flex: 1;
222
+ overflow: hidden;
223
+ display: -webkit-box;
224
+ -webkit-box-orient: vertical;
225
+ -webkit-line-clamp: 3;
226
+ }
227
+
228
+ &__left,
229
+ &__right {
230
+ display: flex;
231
+ align-items: center;
232
+ }
233
+
234
+ &__message {
235
+ display: flex;
236
+ justify-content: space-between;
237
+ font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
238
+ font-weight: var(--en-single-f-d-s-fontWeight);
239
+ margin-bottom: calc(var(--spacing-noticebar-notification_title-margin_bottom) * 1px);
240
+
241
+ &--title {
242
+ flex: 1;
243
+ white-space: nowrap;
244
+ overflow: hidden;
245
+ text-overflow: ellipsis;
246
+ }
247
+
248
+ &--tag {
249
+ display: flex;
250
+ align-items: center;
251
+ margin-inline-start: calc(var(--spacing-extra-tight) * 1px);
252
+ border-radius: calc(var(--radius-noticebar-notification_tag) * 1px);
253
+ font-size: calc(var(--en-single-f-a-r-fontSize) * 1px);
254
+ font-weight: var(--en-single-f-a-r-fontWeight);
255
+ // 添加间距
256
+ padding: calc(var(--spacing-extra-tight) * 1px);
257
+ line-height: calc(var(--en-single-f-a-r-fontSize) * 1px);
258
+
259
+ .vd-iconfont {
260
+ margin-inline-end: calc(var(--spacing-extra-tight) * 1px);
261
+ }
262
+
263
+ [lang='ar'] & .vd-iconfont {
264
+ transform: scaleX(1);
265
+ }
266
+
267
+ &.@{prefix}-success {
268
+ background-color: var(--color-noticebar-notification_tag_success-bg);
269
+
270
+ .vd-iconfont {
271
+ color: var(--tips-color-success);
272
+ }
273
+ }
274
+
275
+ &.@{prefix}-tips {
276
+ background-color: var(--color-noticebar-notification_tag_tips-bg);
277
+
278
+ .vd-iconfont {
279
+ color: var(--tips-color-tips);
280
+ }
281
+ }
282
+
283
+ &.@{prefix}-warning {
284
+ background-color: var(--color-noticebar-notification_tag_warning-bg);
285
+
286
+ .vd-iconfont {
287
+ color: var(--tips-color-warning);
288
+ }
289
+ }
290
+
291
+ &.@{prefix}-disable {
292
+ background-color: var(--color-noticebar-notification_tag_disable-bg);
293
+
294
+ .vd-iconfont {
295
+ color: var(--text-color-h3);
296
+ }
297
+ }
298
+ }
299
+ }
300
+
301
+ &__button {
302
+ margin-inline-start: calc(var(--spacing-noticebar-notification-button-margin_left) * 1px);
303
+ }
304
+
305
+ .vd-iconfont {
306
+ font-size: calc(var(--icon-noticebar-notification) * 1px);
307
+ }
308
+ }
309
+
310
+ [dir="rtl"] {
311
+ .vd-noticebar-snackbar__content {
312
+ &::after {
313
+ background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_info-bg) 90%);
314
+ }
315
+
316
+ &::before {
317
+ background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_info-bg) 90%);
318
+ }
319
+ }
320
+
321
+ .@{prefix}-warning {
322
+ .vd-noticebar-snackbar__content {
323
+ &::after {
324
+ background-image: linear-gradient(90deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_warning-bg) 90%);
325
+ }
326
+
327
+ &::before {
328
+ background-image: linear-gradient(270deg, rgba(0, 0, 0, 0), var(--color-noticebar-snackbar_warning-bg) 90%);
329
+ }
330
+ }
331
+ }
332
+ }
@@ -0,0 +1,8 @@
1
+ import VOverlay from './index.vue';
2
+ import './style.less';
3
+
4
+ VOverlay.install = function (Vue) {
5
+ Vue.component(VOverlay.name, VOverlay);
6
+ };
7
+
8
+ export default VOverlay;