vdesign-ui 0.1.16 → 0.1.18

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 (40) hide show
  1. package/dist/components/actions-cell/actions/index.vue +22 -13
  2. package/dist/components/actions-cell/actions/style.less +37 -0
  3. package/dist/components/activityviews/index.vue +74 -42
  4. package/dist/components/activityviews/style.less +11 -7
  5. package/dist/components/checkbox/style.less +6 -4
  6. package/dist/components/data-list/style.less +7 -7
  7. package/dist/components/dialog/index.vue +12 -13
  8. package/dist/components/dialog/style.less +44 -34
  9. package/dist/components/dropdown/index.vue +1 -1
  10. package/dist/components/dropdown/style.less +16 -0
  11. package/dist/components/footer/style.less +1 -1
  12. package/dist/components/footnav/footnav-item/style.less +1 -0
  13. package/dist/components/icon/font/iconfont.css +1041 -817
  14. package/dist/components/icon/font/iconfont.js +1 -1
  15. package/dist/components/input/style.less +9 -8
  16. package/dist/components/list/style.less +8 -6
  17. package/dist/components/mixins/themeMixin.js +29 -0
  18. package/dist/components/noticebar/index.vue +4 -3
  19. package/dist/components/noticebar/style.less +23 -0
  20. package/dist/components/popover/style.less +1 -4
  21. package/dist/components/result/completed-dark.png +0 -0
  22. package/dist/components/result/error-dark.png +0 -0
  23. package/dist/components/result/index.vue +24 -5
  24. package/dist/components/result/wait-dark.png +0 -0
  25. package/dist/components/slider/style.less +1 -0
  26. package/dist/components/step-item/index.vue +40 -12
  27. package/dist/components/step-item/style.less +6 -6
  28. package/dist/components/switch/style.less +2 -0
  29. package/dist/components/tabs/index.vue +4 -1
  30. package/dist/components/tabs/style.less +12 -12
  31. package/dist/img/completed-dark.4183a8a8.png +0 -0
  32. package/dist/img/error-dark.b80857da.png +0 -0
  33. package/dist/img/wait-dark.6aa28731.png +0 -0
  34. package/dist/token.css +184 -176
  35. package/dist/vdesign-ui.common.js +417 -305
  36. package/dist/vdesign-ui.css +1 -1
  37. package/dist/vdesign-ui.umd.js +417 -305
  38. package/dist/vdesign-ui.umd.min.js +3 -3
  39. package/package.json +3 -3
  40. package/dist/components/dialog/index copy.vue +0 -112
@@ -105,7 +105,8 @@
105
105
  padding-inline-end: calc(var(--spacing-input-textarea-padding_y) * 1px);
106
106
  padding-block-start: calc(var(--spacing-input-textarea-padding_x) * 1px);
107
107
  padding-block-end: calc(var(--spacing-input-textarea-padding_x) * 1px);
108
-
108
+ font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
109
+
109
110
  .@{input-prefix-cls}__word-limit {
110
111
  text-align: end;
111
112
  color: var(--color-input-text-default);
@@ -161,7 +162,7 @@
161
162
 
162
163
  .vd-iconfont {
163
164
  vertical-align: middle;
164
- color: rgba(0, 0, 0, 0.3);
165
+ color: var(--text-color-h3);
165
166
  font-size: calc(var(--icon-input-clean) * 1px);
166
167
  }
167
168
  }
@@ -183,13 +184,13 @@
183
184
  margin-inline-start: calc(var(--spacing-input-suffix_icon-margin_y) * 1px);
184
185
 
185
186
  .vd-iconfont {
186
- color: rgba(0, 0, 0, 0.5);
187
+ color: var(--text-color-h2);
187
188
  font-size: calc(var(--icon-input-clean) * 1px);
188
189
  }
189
190
  }
190
191
 
191
192
  &--password {
192
- color: rgba(0, 0, 0, 0.5);
193
+ color: var(--text-color-h2);
193
194
  margin-inline-start: calc(var(--spacing-input-form_suffix_icon-margin_y) * 1px);
194
195
  margin-inline-end: calc(var(--spacing-input-suffix_icon-margin_y) * 1px);
195
196
  font-size: calc(var(--icon-input-form_suffix) * 1px);
@@ -282,7 +283,7 @@
282
283
 
283
284
  .vd-iconfont {
284
285
  vertical-align: middle;
285
- color: rgba(0, 0, 0, 0.3);
286
+ color: var(--text-color-h3);
286
287
  font-size: calc(var(--icon-input-search) * 1px);
287
288
  }
288
289
  }
@@ -295,7 +296,7 @@
295
296
 
296
297
  .vd-iconfont {
297
298
  vertical-align: middle;
298
- color: rgba(0, 0, 0, 0.3);
299
+ color: var(--text-color-h3);
299
300
  font-size: calc(var(--icon-input-clean) * 1px);
300
301
  }
301
302
  }
@@ -347,7 +348,7 @@
347
348
  background-color: transparent;
348
349
 
349
350
  .vd-iconfont {
350
- color: rgba(0, 0, 0, 0.5);
351
+ color: var(--text-color-h2);
351
352
  font-size: calc(var(--icon-input-trade_number_input_icon) * 1px);
352
353
  }
353
354
  }
@@ -359,7 +360,7 @@
359
360
  background-color: transparent;
360
361
 
361
362
  .vd-iconfont {
362
- color: rgba(0, 0, 0, 0.5);
363
+ color: var(--text-color-h2);
363
364
  font-size: calc(var(--icon-input-trade_number_input_icon) * 1px);
364
365
  }
365
366
  }
@@ -39,7 +39,7 @@
39
39
 
40
40
  .vd-iconfont {
41
41
  font-size: calc(var(--icon-small) * 1px);
42
- color: rgba(0, 0, 0, 0.3);
42
+ color: var(--text-color-h2);
43
43
  }
44
44
  }
45
45
 
@@ -59,7 +59,7 @@
59
59
 
60
60
  &__icon--right {
61
61
  font-size: 16px;
62
- color: rgba(0, 0, 0, 0.5);
62
+ color: var(--text-color-h2);
63
63
  }
64
64
 
65
65
  &__title {
@@ -92,7 +92,7 @@
92
92
 
93
93
  &__icon--right {
94
94
  font-size: 16px;
95
- color: rgba(0, 0, 0, 0.5);
95
+ color: var(--text-color-h2);
96
96
  }
97
97
 
98
98
  &__title {
@@ -126,7 +126,7 @@
126
126
  &__icon--right {
127
127
  // margin-inline-start: calc(var(--spacing-title-tertiary_icon-margin_y) * 1px);
128
128
  font-size: 16px;
129
- color: rgba(0, 0, 0, 0.5);
129
+ color: var(--text-color-h2);
130
130
  }
131
131
 
132
132
  &__title {
@@ -158,7 +158,7 @@
158
158
 
159
159
  &__icon--right {
160
160
  font-size: 16px;
161
- color: rgba(0, 0, 0, 0.5);
161
+ color: var(--text-color-h2);
162
162
  }
163
163
 
164
164
  &__title {
@@ -197,6 +197,7 @@
197
197
  &__icon--leftcus {
198
198
  margin-inline-end: calc(var(--spacing-list-common_icon-margin_right) * 1px);
199
199
  font-size: calc(var(--icon-large) * 1px);
200
+ color: var(--text-color-h2);
200
201
  }
201
202
 
202
203
  // &__icon--left{
@@ -274,13 +275,14 @@
274
275
  &__icon--leftcus {
275
276
  margin-inline-end: calc(var(--spacing-list-check_icon-margin_right) * 1px);
276
277
  font-size: calc(var(--icon-large) * 1px);
278
+ color: var(--text-color-h2);
277
279
  }
278
280
  }
279
281
 
280
282
  &__icon--extra {
281
283
  font-size: 16px;
282
284
  margin-inline-end: calc(var(--spacing-list-info_icon-margin_y) * 1px);
283
- color: rgba(0, 0, 0, 0.5);
285
+ color: var(--text-color-h2);
284
286
  }
285
287
 
286
288
  &__switch {
@@ -0,0 +1,29 @@
1
+ export const themeMixin = {
2
+ data() {
3
+ return {
4
+ theme: document.documentElement.getAttribute('theme') || 'light' // 初始化主题
5
+ };
6
+ },
7
+ mounted() {
8
+ this.observeThemeChanges(); // 组件挂载时开始监视主题变化
9
+ },
10
+ methods: {
11
+ observeThemeChanges() {
12
+ // 创建一个 MutationObserver 实例
13
+ const observer = new MutationObserver((mutations) => {
14
+ mutations.forEach((mutation) => {
15
+ // 检查变化的属性是否为 'theme'
16
+ if (mutation.attributeName === 'theme') {
17
+ // 更新组件的主题
18
+ this.theme = document.documentElement.getAttribute('theme') || 'light';
19
+ }
20
+ });
21
+ });
22
+
23
+ // 配置观察器,监视 html 元素的属性变化
24
+ observer.observe(document.documentElement, {
25
+ attributes: true // 仅监视属性变化
26
+ });
27
+ }
28
+ }
29
+ };
@@ -24,8 +24,9 @@
24
24
  </template>
25
25
  <template v-else>{{ title }}</template>
26
26
  </div>
27
- <div v-if="tag" :class="[tag && `${prefixCls}-${mode}__message--tag`, state ? 'vd-noticebar-' + state : '']">{{
28
- tag
27
+ <div v-if="tag" :class="[tag && `${prefixCls}-${mode}__message--tag`, state ? 'vd-noticebar-' + state : '']">
28
+ {{
29
+ tag
29
30
  }}</div>
30
31
  </div>
31
32
  <slot></slot>
@@ -78,7 +79,7 @@ export default {
78
79
  },
79
80
  type: {
80
81
  type: String,
81
- default: '', // info/warning
82
+ default: 'info', // info/warning/tips
82
83
  },
83
84
  scrollable: {
84
85
  type: Boolean,
@@ -52,6 +52,25 @@
52
52
  }
53
53
  }
54
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
+
55
74
  &__left,
56
75
  &__right {
57
76
  display: flex;
@@ -140,6 +159,10 @@
140
159
  &.@{prefix}-warning {
141
160
  background-color: var(--color-noticebar-snackbar_warning-bg);
142
161
  color: var(--color-noticebar-snackbar_warning-text);
162
+
163
+ .vd-iconfont {
164
+ color: var(--color-noticebar-toast_warning-icon);
165
+ }
143
166
  }
144
167
 
145
168
  &__left,
@@ -80,9 +80,6 @@
80
80
  // ===
81
81
 
82
82
  .@{prefix} {
83
- // 因为透明度会重叠
84
- --color-popover-primary-bg: #242424;
85
- --color-popover-secondary-bg: #777;
86
83
 
87
84
  // 覆盖部分默认的样式
88
85
  .vd-popper {
@@ -141,7 +138,7 @@
141
138
  background-color: var(--color-popover-primary-bg);
142
139
  width: 12px;
143
140
  height: 12px;
144
- border-radius: 4px;
141
+ // border-radius: 4px;
145
142
  transform: rotate(45deg);
146
143
  z-index: -1;
147
144
  }
@@ -14,8 +14,13 @@
14
14
  </template>
15
15
 
16
16
  <script>
17
+
18
+ import { themeMixin } from '@p/components/mixins/themeMixin';
19
+
20
+
17
21
  export default {
18
22
  name: 'vd-result',
23
+ mixins: [themeMixin], // 引入混入
19
24
  props: {
20
25
  imgs: String,
21
26
  text: String,
@@ -28,17 +33,31 @@ export default {
28
33
  data() {
29
34
  return {
30
35
  defaultImgs: {
31
- completed: require('./completed.png'),
32
- waiting: require('./wait.png'),
33
- error: require('./error.png'),
36
+ completed: {
37
+ light: require('./completed.png'),
38
+ dark: require('./completed-dark.png')
39
+ },
40
+ waiting: {
41
+ light: require('./wait.png'),
42
+ dark: require('./wait-dark.png')
43
+ },
44
+ error: {
45
+ light: require('./error.png'),
46
+ dark: require('./error-dark.png')
47
+ }
34
48
  }
35
49
  }
36
50
  },
37
51
  computed:{
38
52
  currentImg() {
39
- return this.imgs || this.defaultImgs[this.state];
53
+ if (this.imgs) return this.imgs;
54
+ return this.defaultImgs[this.state][this.theme];
40
55
  },
41
- }
56
+ },
57
+ methods: {
58
+ },
59
+ mounted() {
60
+ },
42
61
  }
43
62
  </script>
44
63
 
@@ -91,5 +91,6 @@
91
91
  transform: translateX(-50%);
92
92
  font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
93
93
  font-weight: var(--en-single-f-d-s-fontWeight);
94
+ color: var(--color-slider-mark-text-focus);
94
95
  }
95
96
  }
@@ -1,15 +1,14 @@
1
1
  <template>
2
2
  <!-- 标签选项 -->
3
- <div class="vd-step-item"
4
- :class="['vd-step-' + parentProps.direction, state ? 'vd-step-' + state : '', isActive ? 'vd-step-active' : '']"
5
- :style="`color:${isActive ? parentProps.activeColor : parentProps.color};`">
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};`">
6
8
  <!-- 点 -->
7
9
  <div v-if="parentProps.direction !== 'basic'" class="vd-step-u-dot"
8
10
  :style="`color:${isActive ? parentProps.activeColor : parentProps.color};`">
9
- <!-- <vd-icon :name="`${parentProps[isActive ? 'activeIcon' : 'icon']}`"></vd-icon> -->
10
- <!-- {{ state }} -->
11
- <vd-icon v-if="state" svg
12
- :name="state === 'afoot' ? 'icon_show_steping' : state === 'warning' ? 'icon_show_stepwrong' : ''"></vd-icon>
11
+ <vd-icon v-if="state" :svg="true" :name="iconName"></vd-icon>
13
12
  </div>
14
13
  <!-- 线 -->
15
14
  <div class="vd-step-u-line" :style="`background:${isActive ? parentProps.activeColor : parentProps.color};`"></div>
@@ -28,6 +27,7 @@
28
27
  </div>
29
28
  </div>
30
29
  </template>
30
+
31
31
  <script>
32
32
  export default {
33
33
  name: 'vd-step-item',
@@ -45,10 +45,6 @@ export default {
45
45
  type: String,
46
46
  default: '',
47
47
  },
48
- icon: {
49
- type: String,
50
- default: '',
51
- },
52
48
  state: {
53
49
  type: String,
54
50
  default: '',
@@ -56,7 +52,8 @@ export default {
56
52
  },
57
53
  data() {
58
54
  return {
59
- isActive: false // 激活状态
55
+ isActive: false, // 激活状态
56
+ currentTheme: 'light', // 默认值
60
57
  }
61
58
  },
62
59
  computed: {
@@ -70,8 +67,21 @@ export default {
70
67
  },
71
68
  customDescription() {
72
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 ''
73
78
  }
74
79
  },
80
+ mounted() {
81
+ const theme = document.querySelector('html').getAttribute('theme')
82
+ this.currentTheme = theme ? theme : this.currentTheme
83
+ this.observeThemeChange()
84
+ },
75
85
  watch: {
76
86
  // 监听父组件参数
77
87
  parentProps: {
@@ -81,9 +91,27 @@ export default {
81
91
  deep: true,
82
92
  immediate: true
83
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
+ }
84
111
  }
85
112
  }
86
113
  </script>
114
+
87
115
  <style lang="less">
88
116
  @import './style.less';
89
117
  </style>
@@ -34,8 +34,8 @@
34
34
  height: calc(var(--icon-steps-size) * 0.5px);
35
35
  border-radius: 999em;
36
36
  overflow: hidden;
37
- background-color: #fff;
38
- border: 2px solid #ccc;
37
+ background-color: var(--bg-color-1);
38
+ border: 2px solid var(--text-color-h3);
39
39
  box-sizing: border-box;
40
40
  }
41
41
  }
@@ -97,7 +97,7 @@
97
97
 
98
98
  .vd-step-u-dot {
99
99
  &::before {
100
- border: 2px solid #1BC47D;
100
+ border: 2px solid var(--primary-color);
101
101
  }
102
102
  }
103
103
 
@@ -188,8 +188,8 @@
188
188
  height: calc(var(--icon-steps-size) * 0.5px);
189
189
  border-radius: 999em;
190
190
  overflow: hidden;
191
- background-color: #fff;
192
- border: 2px solid #ccc;
191
+ background-color: var(--bg-color-1);
192
+ border: 2px solid var(--text-color-h3);
193
193
  box-sizing: border-box;
194
194
  }
195
195
  }
@@ -251,7 +251,7 @@
251
251
 
252
252
  .vd-step-u-dot {
253
253
  &::before {
254
- border: 2px solid #1BC47D;
254
+ border: 2px solid var(--primary-color);
255
255
  }
256
256
  }
257
257
 
@@ -39,6 +39,7 @@
39
39
 
40
40
  .@{prefix}-round {
41
41
  background: var(--color-switch-off_button_bg-disable);
42
+ border-color: var(--color-switch-off_button_border-disable);
42
43
  }
43
44
  }
44
45
 
@@ -49,6 +50,7 @@
49
50
 
50
51
  .@{prefix}-round {
51
52
  background: var(--color-switch-on_button_bg-disable);
53
+ border-color: var(--color-switch-on_button_border-disable);
52
54
  }
53
55
  }
54
56
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="vd-tabs">
3
3
  <div class="vd-tabs__wrap" :class="menuClasses" ref="tabsWrap">
4
- <div :class="barType" ref="tabsContainer">
4
+ <div :class="[barType,scrollspy]" ref="tabsContainer">
5
5
  <div v-for="(item, index) in navList" :key="index" :class="tabClasses(item)" @click="handleChange(index)">
6
6
  <span class="vd-tabs-text-cell" :class="ellipsisClasses">{{ item.title }}
7
7
  <vd-icon class="vd-tabs-arrow" v-if="item.arrow" name="icon_btn_moredown"></vd-icon>
@@ -53,6 +53,9 @@ export default {
53
53
  },
54
54
  },
55
55
  computed: {
56
+ scrollspy() {
57
+ return `${prefixCls}--complete`
58
+ },
56
59
  ellipsisClasses() {
57
60
  return {
58
61
  [`${prefixCls}-text--ellipsis`]: this.ellipsis,
@@ -1,8 +1,8 @@
1
1
  @tabs-prefix-cls: vd-tabs;
2
2
 
3
- .@{tabs-prefix-cls}{
3
+ .@{tabs-prefix-cls} {
4
4
 
5
- &__wrap{
5
+ &__wrap {
6
6
  position: relative;
7
7
  width: 100%;
8
8
  // background-color: #fff;
@@ -161,6 +161,7 @@
161
161
  font-size: calc(var(--en-single-f-c-s-fontSize) * 1px);
162
162
  font-weight: var(--en-single-f-c-s-fontWeight);
163
163
  background-color: var(--color-tab-capsule_btn-bg-active);
164
+
164
165
  .@{tabs-prefix-cls}-arrow {
165
166
  color: var(--color-tab-filter_down-active);
166
167
  transform: rotate(180deg);
@@ -184,7 +185,7 @@
184
185
  &-bar {
185
186
  position: relative;
186
187
  display: flex;
187
- background-color: #F7F8F9;
188
+ // background-color: #F7F8F9;
188
189
  border-radius: calc(var(--radius-tab-selector_card) * 1px);
189
190
  padding-inline-start: calc(var(--spacing-tab-selector-margin_left) * 1px);
190
191
  padding-inline-end: calc(var(--spacing-tab-selector-margin_right) * 1px);
@@ -217,7 +218,7 @@
217
218
  &-bar {
218
219
  position: relative;
219
220
  display: flex;
220
- background-color: #F7F8F9;
221
+ // background-color: #F7F8F9;
221
222
  border-radius: calc(var(--radius-tab-selector_card) * 1px);
222
223
  padding-inline-start: calc(var(--spacing-tab-selector-margin_left) * 1px);
223
224
  padding-inline-end: calc(var(--spacing-tab-selector-margin_right) * 1px);
@@ -257,7 +258,7 @@
257
258
  color: var(--color-tab-filter-text-active);
258
259
  font-size: calc(var(--en-single-f-c-s-fontSize)* 1px);
259
260
  font-weight: var(--en-single-f-c-s-fontWeight);
260
-
261
+
261
262
  .@{tabs-prefix-cls}-arrow {
262
263
  color: var(--color-tab-filter_down);
263
264
  transform: rotate(180deg);
@@ -306,7 +307,7 @@
306
307
  &-arrow {
307
308
  display: inline-block;
308
309
  vertical-align: -1px;
309
- font-size: calc(var(--icon-small) * 1px) !important;
310
+ font-size: calc(var(--icon-small) * 1px) !important;
310
311
  color: var(--color-tab-filter_down);
311
312
  }
312
313
 
@@ -327,14 +328,15 @@
327
328
  display: flex;
328
329
  height: calc(var(--icon-large) * 1px);
329
330
  padding-inline-end: calc(var(--spacing-tab-primary_icon-margin_right) * 1px);
330
-
331
+ color: var(--text-color-h1);
332
+
331
333
  &::before {
332
334
  content: '';
333
335
  position: absolute;
334
336
  margin-inline-start: -16px;
335
337
  width: 16px;
336
338
  height: 100%;
337
- background-image: linear-gradient(to left, var(--bg-color-1) 0%,rgba(255, 255, 255, 0) 100%);
339
+ background-image: linear-gradient(to left, var(--bg-color-1) 0%, rgba(255, 255, 255, 0) 100%);
338
340
  }
339
341
 
340
342
 
@@ -343,7 +345,7 @@
343
345
  }
344
346
 
345
347
 
346
- &__wrap--bg{
348
+ &__wrap--bg {
347
349
  background-color: transparent;
348
350
  }
349
351
 
@@ -366,7 +368,7 @@
366
368
  }
367
369
  }
368
370
 
369
- [lang='ar'] .vd-tabs-menu--right::before{
371
+ [lang='ar'] .vd-tabs-menu--right::before {
370
372
  transform: scaleX(-1);
371
373
  }
372
374
 
@@ -379,5 +381,3 @@
379
381
  .vd-tab-active {
380
382
  display: block;
381
383
  }
382
-
383
-
Binary file
Binary file