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,60 @@
1
+ import Vue from 'vue';
2
+ const isServer = Vue.prototype.$isServer;
3
+
4
+ /* istanbul ignore next */
5
+ export const on = (function() {
6
+ if (!isServer && document.addEventListener) {
7
+ return function(element, event, handler, useCapture = false) {
8
+ if (element && event && handler) {
9
+ element.addEventListener(event, handler, useCapture);
10
+ }
11
+ };
12
+ } else {
13
+ return function(element, event, handler) {
14
+ if (element && event && handler) {
15
+ element.attachEvent('on' + event, handler);
16
+ }
17
+ };
18
+ }
19
+ })();
20
+
21
+ /* istanbul ignore next */
22
+ export const off = (function() {
23
+ if (!isServer && document.removeEventListener) {
24
+ return function(element, event, handler, useCapture = false) {
25
+ if (element && event) {
26
+ element.removeEventListener(event, handler, useCapture);
27
+ }
28
+ };
29
+ } else {
30
+ return function(element, event, handler) {
31
+ if (element && event) {
32
+ element.detachEvent('on' + event, handler);
33
+ }
34
+ };
35
+ }
36
+ })();
37
+
38
+ const SPECIAL_CHARS_REGEXP = /[:-_]+./g;
39
+ const MOZ_HACK_REGEXP = /^moz([A-Z])/;
40
+
41
+ function camelCase(name) {
42
+ return name.replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
43
+ return offset ? letter.toUpperCase() : letter;
44
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
45
+ }
46
+
47
+ // getStyle
48
+ export function getStyle (element, styleName) {
49
+ if (!element || !styleName) return null;
50
+ styleName = camelCase(styleName);
51
+ if (styleName === 'float') {
52
+ styleName = 'cssFloat';
53
+ }
54
+ try {
55
+ const computed = document.defaultView.getComputedStyle(element, '');
56
+ return element.style[styleName] || computed ? computed[styleName] : null;
57
+ } catch(e) {
58
+ return element.style[styleName];
59
+ }
60
+ }
@@ -0,0 +1,7 @@
1
+ import Step from './index.vue';
2
+ import './style.less';
3
+ Step.install = function (Vue) {
4
+ Vue.component(Step.name, Step)
5
+ }
6
+
7
+ export default Step;
@@ -0,0 +1,48 @@
1
+ <template>
2
+ <div class="vd-step" :class="'vd-step-' + direction">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+ <script>
7
+ export default {
8
+ name: 'vd-step',
9
+ props: {
10
+ // 激活状态
11
+ active: {
12
+ type: Array,
13
+ required: true
14
+ },
15
+ // 显示方向
16
+ direction: {
17
+ type: String,
18
+ default: 'horizontal' // horizontal|vertical|basic
19
+ },
20
+ // 置灰颜色
21
+ color: {
22
+ type: String,
23
+ default: ''
24
+ },
25
+ // 激活颜色
26
+ activeColor: {
27
+ type: String,
28
+ default: ''
29
+ },
30
+ // 置灰图标
31
+ icon: {
32
+ type: String,
33
+ default: ''
34
+ },
35
+ // 激活图标
36
+ activeIcon: {
37
+ type: String,
38
+ default: ''
39
+ }
40
+ },
41
+ data() {
42
+ return {}
43
+ }
44
+ }
45
+ </script>
46
+ <style lang="less">
47
+ @import './style.less';
48
+ </style>
@@ -0,0 +1,59 @@
1
+ @prefix: ~"vd-step";
2
+
3
+ .@{prefix} {
4
+ transform: translateX(0);
5
+ width: 100%;
6
+ overflow: hidden;
7
+
8
+ &.vd-step-horizontal {
9
+ display: flex;
10
+ justify-content: space-between;
11
+
12
+ .vd-step-item {
13
+
14
+ &:first-child {
15
+ .vd-step-u-line {
16
+ width: 50%;
17
+
18
+ &::after {
19
+ width: 0%;
20
+ }
21
+ }
22
+ }
23
+
24
+ &:last-child {
25
+ .vd-step-u-line {
26
+ width: 50%;
27
+ inset-inline-end: 50%;
28
+
29
+ &::after {
30
+ width: 100%;
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+
37
+ &.vd-step-vertical {
38
+ display: flex;
39
+ flex-direction: column;
40
+ flex-wrap: nowrap;
41
+ padding-block-start: calc(var(--spacing-steps-vertical-padding_x) * 1px);
42
+ padding-block-end: calc(var(--spacing-steps-vertical-padding_x) * 1px);
43
+
44
+ .vd-step-item {
45
+
46
+ &:last-child {
47
+
48
+ .vd-step-u-line {
49
+ display: none;
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ &.vd-step-basic {
56
+ display: flex;
57
+ justify-content: space-between;
58
+ }
59
+ }
@@ -0,0 +1,7 @@
1
+ import StepItem from './index.vue';
2
+ import './style.less';
3
+ StepItem.install = function (Vue) {
4
+ Vue.component(StepItem.name, StepItem)
5
+ }
6
+
7
+ export default StepItem;
@@ -0,0 +1,117 @@
1
+ <template>
2
+ <!-- 标签选项 -->
3
+ <div class="vd-step-item" :class="[
4
+ 'vd-step-' + parentProps.direction,
5
+ state ? 'vd-step-' + state : '',
6
+ isActive ? 'vd-step-active' : ''
7
+ ]" :style="`color:${isActive ? parentProps.activeColor : parentProps.color};`">
8
+ <!-- 点 -->
9
+ <div v-if="parentProps.direction !== 'basic'" class="vd-step-u-dot"
10
+ :style="`color:${isActive ? parentProps.activeColor : parentProps.color};`">
11
+ <vd-icon v-if="state" :svg="true" :name="iconName"></vd-icon>
12
+ </div>
13
+ <!-- 线 -->
14
+ <div class="vd-step-u-line" :style="`background:${isActive ? parentProps.activeColor : parentProps.color};`"></div>
15
+ <!-- 文本 -->
16
+ <div v-if="parentProps.direction !== 'basic'" class="vd-step-u-text"
17
+ :style="`color:${isActive ? parentProps.activeColor : parentProps.color};`">
18
+ <div class="vd-step-u-text__title" v-if="customTitle">
19
+ <slot name="title"></slot>
20
+ </div>
21
+ <div class="vd-step-u-text__title" v-else>{{ title }}</div>
22
+ <div class="vd-step-u-text__description" v-if="customDescription">
23
+ <slot name="description"></slot>
24
+ </div>
25
+ <div class="vd-step-u-text__description" v-else>{{ description }}</div>
26
+ <slot></slot>
27
+ </div>
28
+ </div>
29
+ </template>
30
+
31
+ <script>
32
+ export default {
33
+ name: 'vd-step-item',
34
+ props: {
35
+ // 索引名称
36
+ name: {
37
+ type: [String, Number],
38
+ required: true
39
+ },
40
+ title: {
41
+ type: String,
42
+ default: '',
43
+ },
44
+ description: {
45
+ type: String,
46
+ default: '',
47
+ },
48
+ state: {
49
+ type: String,
50
+ default: '',
51
+ }
52
+ },
53
+ data() {
54
+ return {
55
+ isActive: false, // 激活状态
56
+ currentTheme: 'light', // 默认值
57
+ }
58
+ },
59
+ computed: {
60
+ // 父组件参数
61
+ parentProps() {
62
+ const { $options, _props } = this.$parent
63
+ return $options._componentTag === 'vd-step' ? _props : {}
64
+ },
65
+ customTitle() {
66
+ return !!this.$slots.title
67
+ },
68
+ customDescription() {
69
+ return !!this.$slots.description
70
+ },
71
+ iconName() {
72
+ if (this.state === 'afoot') {
73
+ return this.currentTheme === 'dark' ? 'icon_show_steping1' : 'icon_show_steping'
74
+ } else if (this.state === 'warning') {
75
+ return this.currentTheme === 'dark' ? 'icon_show_stepwrong1' : 'icon_show_stepwrong'
76
+ }
77
+ return ''
78
+ }
79
+ },
80
+ mounted() {
81
+ const theme = document.querySelector('html').getAttribute('theme')
82
+ this.currentTheme = theme ? theme : this.currentTheme
83
+ this.observeThemeChange()
84
+ },
85
+ watch: {
86
+ // 监听父组件参数
87
+ parentProps: {
88
+ handler() {
89
+ this.isActive = this.parentProps.active.includes(this.name)
90
+ },
91
+ deep: true,
92
+ immediate: true
93
+ }
94
+ },
95
+ methods: {
96
+ observeThemeChange() {
97
+ const observer = new MutationObserver(mutations => {
98
+ mutations.forEach(mutation => {
99
+ if (mutation.type === 'attributes' && mutation.attributeName === 'theme') {
100
+ const theme = document.querySelector('html').getAttribute('theme')
101
+ this.currentTheme = theme ? theme : this.currentTheme
102
+ }
103
+ })
104
+ })
105
+ observer.observe(document.querySelector('html'), { attributes: true })
106
+
107
+ this.$once('hook:beforeDestroy', () => {
108
+ observer.disconnect()
109
+ })
110
+ }
111
+ }
112
+ }
113
+ </script>
114
+
115
+ <style lang="less">
116
+ @import './style.less';
117
+ </style>
@@ -0,0 +1,361 @@
1
+ @prefix: ~"vd-step-item";
2
+
3
+ .@{prefix} {
4
+ position: relative;
5
+
6
+ &.vd-step-horizontal {
7
+ flex: 1;
8
+ width: 100%;
9
+ display: flex;
10
+ justify-content: center;
11
+ padding-block-start: calc((var(--spacing-steps-horizontal-padding_x) + var(--icon-steps-size) + var(--spacing-steps-horizontal_icon-margin_bottom)) * 1px);
12
+
13
+ .vd-step-u-dot {
14
+ position: absolute;
15
+ inset-inline-end: 50%;
16
+ transform: translateX(50%);
17
+ z-index: 2;
18
+ display: flex;
19
+ justify-content: center;
20
+ align-items: center;
21
+ color: inherit;
22
+ width: calc(var(--icon-steps-size) * 1px);
23
+ height: calc(var(--icon-steps-size) * 1px);
24
+ inset-block-start: calc(var(--spacing-steps-horizontal-padding_x) * 1px);
25
+
26
+ .vd-iconfont {
27
+ color: inherit;
28
+ font-size: calc(var(--icon-steps-size) * 1px);
29
+ }
30
+
31
+ &::before {
32
+ content: "";
33
+ width: calc(var(--icon-steps-size) * 0.5px);
34
+ height: calc(var(--icon-steps-size) * 0.5px);
35
+ border-radius: 999em;
36
+ overflow: hidden;
37
+ background-color: var(--bg-color-1);
38
+ border: 2px solid var(--text-color-h3);
39
+ box-sizing: border-box;
40
+ }
41
+ }
42
+
43
+ .vd-step-u-line {
44
+ position: absolute;
45
+ inset-block-start: calc((var(--spacing-steps-horizontal-padding_x) + var(--icon-steps-size)/2) * 1px);
46
+ inset-inline-end: 0;
47
+ z-index: 1;
48
+ width: 100%;
49
+ height: calc(var(--height-steps-border-default) * 1px);
50
+ background: linear-gradient(to left,
51
+ transparent 0%,
52
+ transparent 50%,
53
+ var(--color-steps-border-default) 50%,
54
+ var(--color-steps-border-default) 100%);
55
+ background-size: 5px calc(var(--height-steps-border-default) * 1px);
56
+ background-repeat: repeat-x;
57
+ }
58
+
59
+ .vd-step-u-text {
60
+ min-width: 0;
61
+ word-break: break-word;
62
+ text-align: center;
63
+ // not_started
64
+ color: var(--color-steps-text-not_started);
65
+ font-size: calc(var(--en-multi-f-c-r-fontSize) * 1px);
66
+ font-weight: var(--en-multi-f-c-r-fontWeight);
67
+ line-height: calc(var(--en-multi-f-c-r-lineHeight) * 1px);
68
+
69
+ &__title {
70
+ overflow: hidden;
71
+ display: -webkit-box;
72
+ -webkit-box-orient: vertical;
73
+ -webkit-line-clamp: 2;
74
+ }
75
+
76
+ &__description {
77
+ overflow: hidden;
78
+ display: -webkit-box;
79
+ -webkit-box-orient: vertical;
80
+ -webkit-line-clamp: 3;
81
+ // description_text
82
+ color: var(--color-steps-description_text);
83
+ font-size: calc(var(--en-multi-f-b-r-fontSize) * 1px);
84
+ font-weight: var(--en-multi-f-b-r-fontWeight);
85
+ line-height: calc(var(--en-multi-f-b-r-lineHeight) * 1px);
86
+ }
87
+ }
88
+
89
+ &.vd-step-active {
90
+
91
+ .vd-step-u-text {
92
+ color: var(--color-steps-text-complete);
93
+ font-size: calc(var(--en-multi-f-c-r-fontSize) * 1px);
94
+ font-weight: var(--en-multi-f-c-r-fontWeight);
95
+ line-height: calc(var(--en-multi-f-c-r-lineHeight) * 1px);
96
+ }
97
+
98
+ .vd-step-u-dot {
99
+ &::before {
100
+ border: 2px solid var(--primary-color);
101
+ }
102
+ }
103
+
104
+ .vd-step-u-line {
105
+ height: calc(var(--height-steps-border-hover) * 1px);
106
+ background: var(--color-steps-border-hover);
107
+ }
108
+ }
109
+
110
+ &.vd-step-afoot {
111
+
112
+ .vd-step-u-dot::before {
113
+ content: none;
114
+ }
115
+
116
+ .vd-step-u-text {
117
+ color: var(--color-steps-text-afoot);
118
+ font-size: calc(var(--en-multi-f-c-s-fontSize) * 1px);
119
+ font-weight: var(--en-multi-f-c-s-fontWeight);
120
+ line-height: calc(var(--en-multi-f-c-s-lineHeight) * 1px);
121
+ }
122
+
123
+ .vd-step-u-line::after {
124
+ content: "";
125
+ position: absolute;
126
+ inset-block-start: 0;
127
+ inset-inline-start: 0;
128
+ width: 50%;
129
+ height: calc(var(--height-steps-border-hover) * 1px);
130
+ background: var(--color-steps-border-hover);
131
+ }
132
+ }
133
+
134
+ &.vd-step-warning {
135
+
136
+ .vd-step-u-dot::before {
137
+ content: none;
138
+ }
139
+
140
+ .vd-step-u-text {
141
+ color: var(--color-steps-text-warning);
142
+ font-size: calc(var(--en-multi-f-c-s-fontSize) * 1px);
143
+ font-weight: var(--en-multi-f-c-s-fontWeight);
144
+ line-height: calc(var(--en-multi-f-c-s-lineHeight) * 1px);
145
+ }
146
+
147
+ .vd-step-u-line::after {
148
+ content: "";
149
+ position: absolute;
150
+ inset-block-start: 0;
151
+ inset-inline-start: 0;
152
+ width: 50%;
153
+ height: calc(var(--height-steps-border-hover) * 1px);
154
+ background: var(--color-steps-border-hover);
155
+ }
156
+ }
157
+ }
158
+
159
+ // vertical
160
+ &.vd-step-vertical {
161
+ width: 100%;
162
+ padding-inline-start: calc((var(--spacing-steps-vertical-padding_y) + var(--icon-steps-size) + var(--spacing-steps-vertical_icon-margin_right)) * 1px);
163
+
164
+ &:not(:last-child) {
165
+ padding-block-end: calc(var(--spacing-steps-vertical_description_text-margin_bottom) * 1px);
166
+ }
167
+
168
+ .vd-step-u-dot {
169
+ position: absolute;
170
+ inset-block-start: 0;
171
+ inset-inline-start: calc(var(--spacing-steps-vertical-padding_y) * 1px);
172
+ z-index: 2;
173
+ display: flex;
174
+ justify-content: center;
175
+ align-items: center;
176
+ color: inherit;
177
+ width: calc(var(--icon-steps-size) * 1px);
178
+ height: calc(var(--icon-steps-size) * 1px);
179
+
180
+ .vd-iconfont {
181
+ color: inherit;
182
+ font-size: calc(var(--icon-steps-size) * 1px);
183
+ }
184
+
185
+ &::before {
186
+ content: "";
187
+ width: calc(var(--icon-steps-size) * 0.5px);
188
+ height: calc(var(--icon-steps-size) * 0.5px);
189
+ border-radius: 999em;
190
+ overflow: hidden;
191
+ background-color: var(--bg-color-1);
192
+ border: 2px solid var(--text-color-h3);
193
+ box-sizing: border-box;
194
+ }
195
+ }
196
+
197
+ .vd-step-u-line {
198
+ position: absolute;
199
+ z-index: 1;
200
+ inset-block-start: calc((var(--icon-steps-size)/2) * 1px);
201
+ inset-inline-start: calc((var(--spacing-steps-vertical-padding_y) + var(--icon-steps-size)/2) * 1px);
202
+ width: calc(var(--height-steps-border-default) * 1px);
203
+ height: 100%;
204
+ background: linear-gradient(to bottom,
205
+ transparent 0%,
206
+ transparent 50%,
207
+ var(--color-steps-border-default) 50%,
208
+ var(--color-steps-border-default) 100%);
209
+ background-size: 1px 5px;
210
+ background-repeat: repeat-y;
211
+ }
212
+
213
+ .vd-step-u-text {
214
+ min-width: 0;
215
+ word-break: break-word;
216
+ text-align: start;
217
+ // not_started
218
+ color: var(--color-steps-text-not_started);
219
+ font-size: calc(var(--en-multi-f-c-r-fontSize) * 1px);
220
+ font-weight: var(--en-multi-f-c-r-fontWeight);
221
+ line-height: calc(var(--en-multi-f-c-r-lineHeight) * 1px);
222
+
223
+ &__title {
224
+ overflow: hidden;
225
+ display: -webkit-box;
226
+ -webkit-box-orient: vertical;
227
+ -webkit-line-clamp: 2;
228
+ }
229
+
230
+ &__description {
231
+ overflow: hidden;
232
+ display: -webkit-box;
233
+ -webkit-box-orient: vertical;
234
+ -webkit-line-clamp: 3;
235
+ // description_text
236
+ color: var(--color-steps-description_text);
237
+ font-size: calc(var(--en-multi-f-b-r-fontSize) * 1px);
238
+ font-weight: var(--en-multi-f-b-r-fontWeight);
239
+ line-height: calc(var(--en-multi-f-b-r-lineHeight) * 1px);
240
+ }
241
+ }
242
+
243
+ &.vd-step-active {
244
+
245
+ .vd-step-u-text {
246
+ color: var(--color-steps-text-complete);
247
+ font-size: calc(var(--en-multi-f-c-r-fontSize) * 1px);
248
+ font-weight: var(--en-multi-f-c-r-fontWeight);
249
+ line-height: calc(var(--en-multi-f-c-r-lineHeight) * 1px);
250
+ }
251
+
252
+ .vd-step-u-dot {
253
+ &::before {
254
+ border: 2px solid var(--primary-color);
255
+ }
256
+ }
257
+
258
+ .vd-step-u-line::after {
259
+ content: "";
260
+ position: absolute;
261
+ z-index: 1;
262
+ inset-block-start: 0;
263
+ inset-inline-start: 0;
264
+ height: 100%;
265
+ width: calc(var(--height-steps-border-default) * 1px);
266
+ background: var(--color-steps-border-hover);
267
+ }
268
+
269
+ // 复杂 css 条件,但:has兼容性不够
270
+ &:not(:has(+ :is(.vd-step-active, .vd-step-afoot, .vd-step-warning))) {
271
+ .vd-step-u-line::after {
272
+ height: 50%;
273
+ }
274
+ }
275
+ }
276
+
277
+
278
+ &.vd-step-afoot {
279
+ .u-line::after {
280
+ height: 100%;
281
+ }
282
+
283
+ .vd-step-u-text {
284
+ color: var(--color-steps-text-afoot);
285
+ font-size: calc(var(--en-multi-f-c-s-fontSize) * 1px);
286
+ font-weight: var(--en-multi-f-c-s-fontWeight);
287
+ line-height: calc(var(--en-multi-f-c-s-lineHeight) * 1px);
288
+ }
289
+
290
+ .vd-step-u-dot::before {
291
+ content: none;
292
+ }
293
+
294
+ &+.vd-step-active {
295
+ .vd-step-u-line::after {
296
+ height: 100%;
297
+ }
298
+ }
299
+ }
300
+
301
+ &.vd-step-warning {
302
+ .vd-step-u-line::after {
303
+ height: 100%;
304
+ }
305
+
306
+ .vd-step-u-text {
307
+ color: var(--color-steps-text-warning);
308
+ font-size: calc(var(--en-multi-f-c-s-fontSize) * 1px);
309
+ font-weight: var(--en-multi-f-c-s-fontWeight);
310
+ line-height: calc(var(--en-multi-f-c-s-lineHeight) * 1px);
311
+ }
312
+
313
+ .vd-step-u-dot::before {
314
+ content: none;
315
+ }
316
+
317
+ &+.vd-step-active {
318
+ .vd-step-u-line::after {
319
+ height: 100%;
320
+ }
321
+ }
322
+ }
323
+ }
324
+
325
+ // basic
326
+ &.vd-step-basic {
327
+ flex: 1;
328
+ width: 100%;
329
+ display: flex;
330
+ justify-content: center;
331
+ padding-top: calc(var(--spacing-steps-basic-padding_top) * 1px);
332
+ padding-bottom: calc(var(--spacing-steps-basic-padding_bottom) * 1px);
333
+ margin-inline-start: calc(var(--spacing-steps-basic-padding_y) * 1px);
334
+
335
+ &:last-child {
336
+ margin-inline-end: calc(var(--spacing-steps-basic-padding_y) * 1px);
337
+ }
338
+
339
+ .vd-step-u-line {
340
+ width: 100%;
341
+ height: calc(var(--height-steps-basic-default) * 1px);
342
+ border-radius: calc(var(--radius-steps-basic) * 1px);
343
+ background: var(--color-steps-basic-default);
344
+ }
345
+
346
+ &.vd-step-active {
347
+
348
+ .vd-step-u-line {
349
+ height: calc(var(--height-steps-basic-hover) * 1px);
350
+ background: var(--color-steps-basic-hover);
351
+ }
352
+ }
353
+ }
354
+ }
355
+
356
+
357
+ [lang='ar'] {
358
+ .vd-step-horizontal .vd-step-u-dot {
359
+ transform: translateX(-50%);
360
+ }
361
+ }
@@ -0,0 +1,42 @@
1
+ <template>
2
+ <div>
3
+ <h2>默认包含了一些常用样式,可以直接通过 className 的方式使用,样式文件在packages/tokens/style.less里面</h2>
4
+
5
+
6
+ <h3>文字省略</h3>
7
+
8
+ <!-- 最多显示一行 -->
9
+ <div class="vd-ellipsis">这是一段最多显示一行的文字,多余的内容会被省略</div>
10
+
11
+ <!-- 最多显示两行 -->
12
+ <div class="vd-multi-ellipsis--l2">
13
+ 这是一段最多显示两行的文字,多余的内容会被省略
14
+ </div>
15
+
16
+ <!-- 最多显示三行 -->
17
+ <div class="vd-multi-ellipsis--l3">
18
+ 这是一段最多显示三行的文字,多余的内容会被省略
19
+ </div>
20
+
21
+ <h3>1px 边框</h3>
22
+
23
+ <!-- 上边框 -->
24
+ <div class="vd-hairline--top"></div>
25
+
26
+ <!-- 下边框 -->
27
+ <div class="vd-hairline--bottom"></div>
28
+
29
+ <!-- 左边框 -->
30
+ <div class="vd-hairline--left"></div>
31
+
32
+ <!-- 右边框 -->
33
+ <div class="vd-hairline--right"></div>
34
+
35
+ <!-- 上下边框 -->
36
+ <div class="vd-hairline--top-bottom"></div>
37
+
38
+ <!-- 全边框 -->
39
+ <div class="vd-hairline--surround"></div>
40
+ </div>
41
+ </template>
42
+