vdesign-ui 0.1.23 → 0.1.24-beta

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 (59) hide show
  1. package/dist/components/activityviews/index.vue +13 -11
  2. package/dist/components/button/index.vue +1 -1
  3. package/dist/components/checkbox/index.vue +0 -26
  4. package/dist/components/dropdown/index.vue +72 -69
  5. package/dist/components/dropdown/style.less +23 -1
  6. package/dist/components/empty/404-dark.png +0 -0
  7. package/dist/components/empty/404.png +0 -0
  8. package/dist/components/empty/index.vue +30 -2
  9. package/dist/components/empty/network-dark.png +0 -0
  10. package/dist/components/empty/network.png +0 -0
  11. package/dist/components/empty/nocoupons-dark.png +0 -0
  12. package/dist/components/empty/nocoupons.png +0 -0
  13. package/dist/components/empty/nodata-dark.png +0 -0
  14. package/dist/components/empty/nodata.png +0 -0
  15. package/dist/components/empty/nomargin-dark.png +0 -0
  16. package/dist/components/empty/nomargin.png +0 -0
  17. package/dist/components/empty/nonotice-dark.png +0 -0
  18. package/dist/components/empty/nonotice.png +0 -0
  19. package/dist/components/empty/noocomments-dark.png +0 -0
  20. package/dist/components/empty/noocomments.png +0 -0
  21. package/dist/components/empty/noorders-dark.png +0 -0
  22. package/dist/components/empty/noorders.png +0 -0
  23. package/dist/components/empty/noposition-dark.png +0 -0
  24. package/dist/components/empty/noposition.png +0 -0
  25. package/dist/components/empty/nosearch-dark.png +0 -0
  26. package/dist/components/empty/nosearch.png +0 -0
  27. package/dist/components/footer/index.vue +1 -1
  28. package/dist/components/footnav/footnav-item/index.vue +2 -6
  29. package/dist/components/icon/font/iconfont.css +59 -949
  30. package/dist/components/icon/font/iconfont.js +1 -1
  31. package/dist/components/input/index.vue +31 -8
  32. package/dist/components/input/style.less +0 -1
  33. package/dist/components/loading/img_status_loading_white_ani.svg +155 -0
  34. package/dist/components/loading/img_status_refresh_ani.svg +158 -0
  35. package/dist/components/loading/index.vue +4 -3
  36. package/dist/components/loading/style.less +1 -1
  37. package/dist/components/mixins/clickoutside.js +81 -81
  38. package/dist/components/pagebreak/index.vue +11 -5
  39. package/dist/components/radio/index.vue +0 -3
  40. package/dist/components/result/index.vue +1 -2
  41. package/dist/components/selector/index.vue +64 -31
  42. package/dist/components/selector/style.less +10 -0
  43. package/dist/components/slider/index.vue +0 -6
  44. package/dist/components/title/index.vue +1 -1
  45. package/dist/components/upload/index.vue +0 -1
  46. package/dist/img/img_status_loading_white_ani.b56fcfae.svg +155 -0
  47. package/dist/img/img_status_refresh_ani.d0e59f12.svg +158 -0
  48. package/dist/token.css +8 -0
  49. package/dist/vdesign-ui.common.js +832 -548
  50. package/dist/vdesign-ui.css +1 -1
  51. package/dist/vdesign-ui.umd.js +832 -548
  52. package/dist/vdesign-ui.umd.min.js +3 -3
  53. package/package.json +1 -1
  54. package/dist/components/loading/loading.png +0 -0
  55. package/dist/components/loading/refresh.png +0 -0
  56. package/dist/components/upload/index1.vue +0 -225
  57. package/dist/img/404-dark.775df5bb.png +0 -0
  58. package/dist/img/network-dark.11a147bb.png +0 -0
  59. package/dist/img/nodata-dark.b0ea0e39.png +0 -0
@@ -2,10 +2,9 @@
2
2
  <div class="vd-result">
3
3
  <div class="vd-result-img" v-if="currentImg"><img :src="currentImg" alt="img"></div>
4
4
  <div class="vd-result-title" v-if="title">{{ title }}</div>
5
- <p class="vd-result-txt" v-if="text">{{ text }}</p>
5
+ <div class="vd-result-txt" v-if="text">{{ text }}</div>
6
6
  <div class="vd-result-footer">
7
7
  <slot name="btnp"></slot>
8
-
9
8
  <div class="vd-result-footer-btnx" v-if="$slots.btnt">
10
9
  <slot name="btnt"></slot>
11
10
  </div>
@@ -1,37 +1,44 @@
1
1
  <template>
2
- <div class="vd-selector" :class="wrapClasses" :tabindex="disabled ? -1 : 0" @keyup.enter="handlerClick"
3
- @click.stop="handlerClick">
4
- <div class="vd-selector__inner">
2
+ <div v-clickoutside="close" class="vd-selector" :class="wrapClasses" :tabindex="disabled ? -1 : 0">
3
+ <div class="vd-selector__inner" @click.stop="handlerClick">
5
4
  <div :contenteditable="contenteditable" class="vd-selector__left">
6
5
  <vd-icon v-if="icon" :name="icon" svg :class="iconClasses"></vd-icon>
7
6
  <div :class="titleClasses">
8
- <slot v-if="!isSlotEmpty" name="content"></slot>
9
- <template v-else>{{ content }} </template>
7
+ <slot name="content">
8
+ {{ content }}
9
+ </slot>
10
10
  </div>
11
11
  </div>
12
12
  <vd-icon v-if="arrow" :name="arrow" :class="arrowClasses"></vd-icon>
13
13
  </div>
14
- <slot v-if="showMenu"></slot>
14
+ <div class="vd-selector--slot">
15
+ <slot name="dropdown"></slot>
16
+ </div>
15
17
  </div>
16
18
  </template>
17
19
 
18
20
  <script>
21
+ import clickoutside from "../mixins/clickoutside.js";
19
22
  const prefixCls = 'vd-selector';
23
+
20
24
  export default {
21
- name: "vd-selector",
22
- componentName: "vd-selector",
25
+ name: 'vd-selector',
26
+ directives: {
27
+ clickoutside
28
+ },
23
29
  props: {
24
30
  icon: {
25
31
  type: String,
26
32
  default: ''
27
33
  },
28
34
  arrow: {
29
- type: [String, Boolean],
35
+ type: String,
30
36
  default: 'icon_btn_moredown'
31
37
  },
32
38
  type: {
33
39
  type: String,
34
- default: ''// form
40
+ default: '',
41
+ validator: value => ['', 'form'].includes(value)
35
42
  },
36
43
  size: {
37
44
  type: String,
@@ -39,7 +46,7 @@ export default {
39
46
  validator: value => ['s', 'm', 'l', 'xl'].includes(value)
40
47
  },
41
48
  content: {
42
- type: [String, Array],
49
+ type: String,
43
50
  default: ''
44
51
  },
45
52
  disabled: {
@@ -57,64 +64,90 @@ export default {
57
64
  value: {
58
65
  type: Boolean,
59
66
  default: false
67
+ },
68
+ name: {
69
+ type: String,
70
+ default: ''
71
+ },
72
+ },
73
+ watch: {
74
+ value(val) {
75
+ this.showMenu = val;
60
76
  }
61
77
  },
62
78
  data() {
63
79
  return {
64
- showMenu: this.value,
65
- };
80
+ showMenu: this.value
81
+ }
66
82
  },
67
83
  computed: {
68
- isSlotEmpty() {
69
- return !this.$slots.content;
70
- },
84
+ // 计算外层容器的样式类
71
85
  wrapClasses() {
72
86
  return {
73
87
  [`${prefixCls}-${this.type}`]: this.type,
74
88
  [`${prefixCls}-${this.size}`]: this.size,
75
89
  [`${prefixCls}--disabled`]: this.disabled,
76
90
  [`${prefixCls}--active`]: this.showMenu || this.active,
77
- }
91
+ };
78
92
  },
93
+ // 计算标题的样式类
79
94
  titleClasses() {
80
95
  return {
81
96
  [`${prefixCls}-${this.type}__title`]: this.type,
82
97
  [`${prefixCls}-${this.size}__title`]: this.size,
83
- }
98
+ };
84
99
  },
100
+ // 计算图标的样式类
85
101
  iconClasses() {
86
102
  return {
87
103
  [`${prefixCls}-iconfont`]: true,
88
104
  [`${prefixCls}-${this.type}__icon`]: this.type,
89
105
  [`${prefixCls}-${this.size}__icon`]: this.size,
90
- }
106
+ };
91
107
  },
108
+ // 计算箭头的样式类
92
109
  arrowClasses() {
93
110
  return {
94
111
  [`${prefixCls}-iconfont`]: true,
95
112
  [`${prefixCls}-${this.type}__arrow`]: this.type,
96
113
  [`${prefixCls}-${this.size}__arrow`]: this.size,
97
114
  [`${prefixCls}__arrow--active`]: this.showMenu && this.arrow === 'icon_btn_moredown',
98
- }
115
+ };
99
116
  },
100
117
  },
101
- watch: {
102
- value(val) {
103
- this.showMenu = val;
104
- }
105
- },
106
118
  methods: {
119
+ generateClasses(suffix = '', extra = '') {
120
+ return {
121
+ [`${prefixCls}-${this.type}${suffix}`]: this.type,
122
+ [`${prefixCls}-${this.size}${suffix}`]: this.size,
123
+ [`${prefixCls}${extra}`]: extra,
124
+ [`${prefixCls}--disabled`]: this.disabled,
125
+ [`${prefixCls}--active`]: this.showMenu || this.active,
126
+ [`${prefixCls}-${this.size}${suffix}--active`]: this.showMenu && this.arrow,
127
+ };
128
+ },
107
129
  close() {
108
- this.showMenu = false
109
- this.$emit('close', false)
110
- this.$emit('input', false)
130
+ if (this.showMenu) {
131
+ // this.showMenu = false;
132
+ // this.$emit('close');
133
+ // 传了下拉菜单才执行
134
+ if (this.$scopedSlots.dropdown) {
135
+ console.log('has dropdown')
136
+ this.$emit('input', false);
137
+ }
138
+ }
111
139
  },
112
140
  handlerClick() {
113
141
  if (this.disabled) return;
114
- this.showMenu = !this.showMenu
115
- this.$emit('click', this.showMenu)
116
- this.$emit('input', this.showMenu)
142
+ console.log('showMenu:1:', this.showMenu);
143
+ // 更新showMenu的值
144
+ this.showMenu = !this.showMenu;
145
+ console.log('showMenu:2:', this.showMenu);
146
+ // 使用$emit来更新v-model绑定的值
147
+ this.$emit('input', this.showMenu);
148
+ this.$emit('click');
117
149
  }
150
+
118
151
  }
119
152
  };
120
153
  </script>
@@ -298,6 +298,12 @@
298
298
  }
299
299
  }
300
300
 
301
+ &--slot {
302
+ position: absolute;
303
+ top: 100%;
304
+ display: none;
305
+ }
306
+
301
307
  &--active {
302
308
  .@{selector-prefix-cls}-xl {
303
309
 
@@ -372,6 +378,10 @@
372
378
  transition: transform .3s;
373
379
  }
374
380
  }
381
+
382
+ .@{selector-prefix-cls}--slot {
383
+ display: block;
384
+ }
375
385
  }
376
386
 
377
387
  &--disabled {
@@ -59,15 +59,9 @@ export default {
59
59
  type: Number,
60
60
  default: 1
61
61
  },
62
- // disabled: {
63
- // type: Boolean,
64
- // default: false
65
- // },
66
62
  value: {
67
63
  type: Number
68
64
  },
69
- markLeft:Number,
70
- markRight:Number,
71
65
 
72
66
  },
73
67
  data() {
@@ -11,7 +11,7 @@
11
11
  <div class="vd-title--right" v-if="guideText || arrow || $slots.right">
12
12
  <slot name="right">
13
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>
14
+ <vd-icon v-if="arrow" class="vd-title-arrow" name="icon_btn_next"></vd-icon>
15
15
  </slot>
16
16
  </div>
17
17
  </div>
@@ -15,7 +15,6 @@
15
15
  export default {
16
16
  name: 'vd-upload',
17
17
  inheritAttrs: false,
18
-
19
18
  props: {
20
19
  photo: {
21
20
  type: String,
@@ -0,0 +1,155 @@
1
+ <svg
2
+ fill="none"
3
+ width='100%'
4
+ height='100%'
5
+ viewBox="0 0 32 32"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ xmlns:xlink="http://www.w3.org/1999/xlink"
8
+ >
9
+ <defs>
10
+ <style type="text/css">
11
+ <![CDATA[
12
+ @keyframes loading-animate1 {
13
+ 0% {
14
+ fill-opacity: 0.16;
15
+ }
16
+ 20% {
17
+ fill-opacity: 1;
18
+ }
19
+ 26% {
20
+ fill-opacity: 0.32;
21
+ }
22
+ 32% {
23
+ fill-opacity: 0.16;
24
+ }
25
+ 100% {
26
+ fill-opacity: 0.16;
27
+ }
28
+ }
29
+
30
+ @keyframes loading-animate2 {
31
+ 0% {
32
+ fill-opacity: 0.16;
33
+ }
34
+ 12% {
35
+ fill-opacity: 0.16;
36
+ }
37
+ 22% {
38
+ fill-opacity: 1;
39
+ }
40
+ 31% {
41
+ fill-opacity: 0.32;
42
+ }
43
+ 37% {
44
+ fill-opacity: 0.16;
45
+ }
46
+ 100% {
47
+ fill-opacity: 0.16;
48
+ }
49
+ }
50
+
51
+ @keyframes loading-animate3 {
52
+ 0% {
53
+ fill-opacity: 0.16;
54
+ }
55
+ 20% {
56
+ fill-opacity: 0.16;
57
+ }
58
+ 30% {
59
+ fill-opacity: 1;
60
+ }
61
+ 36% {
62
+ fill-opacity: 0.32;
63
+ }
64
+ 42% {
65
+ fill-opacity: 0.16;
66
+ }
67
+ 100% {
68
+ fill-opacity: 0.16;
69
+ }
70
+ }
71
+
72
+ @keyframes loading-animate4 {
73
+ 0% {
74
+ fill-opacity: 0.16;
75
+ }
76
+ 25% {
77
+ fill-opacity: 0.16;
78
+ }
79
+ 35% {
80
+ fill-opacity: 1;
81
+ }
82
+ 41% {
83
+ fill-opacity: 0.32;
84
+ }
85
+ 47% {
86
+ fill-opacity: 0.16;
87
+ }
88
+ 100% {
89
+ fill-opacity: 0.16;
90
+ }
91
+ }
92
+
93
+ .loading-part-1,
94
+ .loading-part-2,
95
+ .loading-part-3,
96
+ .loading-part-4 {
97
+ animation-duration: 1s;
98
+ animation-delay: 0s;
99
+ animation-timing-function: cubic-bezier(0.5, 0, 1, 1);
100
+ animation-iteration-count: infinite;
101
+ }
102
+
103
+ .loading-part-1 {
104
+ animation-name: loading-animate1;
105
+ }
106
+
107
+ .loading-part-2 {
108
+ animation-name: loading-animate2;
109
+ }
110
+
111
+ .loading-part-3 {
112
+ animation-name: loading-animate3;
113
+ }
114
+
115
+ .loading-part-4 {
116
+ animation-name: loading-animate4;
117
+ }
118
+ ]]>
119
+ </style>
120
+ </defs>
121
+ <g>
122
+ <path
123
+ class="loading-part-1"
124
+ fill-rule="evenodd"
125
+ clip-rule="evenodd"
126
+ d="M6 32.0001L9.72003 28.209C9.95076 27.9739 10.0803 27.655 10.0803 27.3225V16.2236L6.36035 20.0147C6.12963 20.2498 6 20.5687 6 20.9012V32.0001Z"
127
+ fill-opacity="0.16"
128
+ fill="#FFFFFF"
129
+ />
130
+ <path
131
+ class="loading-part-2"
132
+ fill-rule="evenodd"
133
+ clip-rule="evenodd"
134
+ d="M11.3068 26.559L15.0269 22.768C15.2576 22.5329 15.3872 22.214 15.3872 21.8815V2.71126L11.6672 6.50233C11.4364 6.73746 11.3068 7.05636 11.3068 7.38889V26.559Z"
135
+ fill-opacity="0.16"
136
+ fill="#FFFFFF"
137
+ />
138
+ <path
139
+ class="loading-part-3"
140
+ fill-rule="evenodd"
141
+ clip-rule="evenodd"
142
+ d="M16.6255 29.2742L20.3455 25.4832C20.5762 25.248 20.7059 24.9292 20.7059 24.5966V5.42644L16.9858 9.21751C16.7552 9.4526 16.6255 9.77154 16.6255 10.104V29.2742Z"
143
+ fill="#FFFFFF"
144
+ fill-opacity="0.16"
145
+ />
146
+ <path
147
+ class="loading-part-4"
148
+ fill-rule="evenodd"
149
+ clip-rule="evenodd"
150
+ d="M21.9196 15.7765L25.6396 11.9854C25.8703 11.7503 26 11.4314 26 11.0989V0L22.2799 3.79107C22.0492 4.02617 21.9196 4.3451 21.9196 4.67759V15.7765Z"
151
+ fill="#FFFFFF"
152
+ fill-opacity="0.16"
153
+ />
154
+ </g>
155
+ </svg>
@@ -0,0 +1,158 @@
1
+ <svg
2
+ fill="none"
3
+ width='100%'
4
+ height='100%'
5
+ viewBox="0 0 32 32"
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ xmlns:xlink="http://www.w3.org/1999/xlink"
8
+ >
9
+ <defs>
10
+ <style type="text/css">
11
+ <![CDATA[
12
+ @keyframes refresh-animate1 {
13
+ 0% {
14
+ fill-opacity: 1;
15
+ }
16
+ 16.67% {
17
+ fill-opacity: 0.16;
18
+ }
19
+ 50% {
20
+ fill-opacity: 0.16;
21
+ }
22
+ 83.33% {
23
+ fill-opacity: 0.16;
24
+ }
25
+ 100% {
26
+ fill-opacity: 1;
27
+ }
28
+ }
29
+
30
+ @keyframes refresh-animate2 {
31
+ 0% {
32
+ fill-opacity: 0.16;
33
+ }
34
+ 16.67% {
35
+ fill-opacity: 1;
36
+ }
37
+ 33.33% {
38
+ fill-opacity: 0.16;
39
+ }
40
+ 50% {
41
+ fill-opacity: 0.16;
42
+ }
43
+ 66.67% {
44
+ fill-opacity: 0.16;
45
+ }
46
+ 83.33% {
47
+ fill-opacity: 1;
48
+ }
49
+ 100% {
50
+ fill-opacity: 0.16;
51
+ }
52
+ }
53
+
54
+ @keyframes refresh-animate3 {
55
+ 0% {
56
+ fill-opacity: 0.16;
57
+ }
58
+ 16.67% {
59
+ fill-opacity: 0.16;
60
+ }
61
+ 33.33% {
62
+ fill-opacity: 1;
63
+ }
64
+ 50% {
65
+ fill-opacity: 0.16;
66
+ }
67
+ 66.67% {
68
+ fill-opacity: 1;
69
+ }
70
+ 83.33% {
71
+ fill-opacity: 0.16;
72
+ }
73
+ 100% {
74
+ fill-opacity: 0.16;
75
+ }
76
+ }
77
+
78
+ @keyframes refresh-animate4 {
79
+ 0% {
80
+ fill-opacity: 0.16;
81
+ }
82
+ 33.33% {
83
+ fill-opacity: 0.16;
84
+ }
85
+ 50% {
86
+ fill-opacity: 1;
87
+ }
88
+ 66.67% {
89
+ fill-opacity: 0.16;
90
+ }
91
+ 100% {
92
+ fill-opacity: 0.16;
93
+ }
94
+ }
95
+
96
+ .loading-part-1,
97
+ .loading-part-2,
98
+ .loading-part-3,
99
+ .loading-part-4 {
100
+ animation-duration: 1000ms;
101
+ animation-delay: 0s;
102
+ animation-timing-function: ease-out;
103
+ animation-iteration-count: infinite;
104
+ }
105
+
106
+ .loading-part-1 {
107
+ animation-name: refresh-animate1;
108
+ }
109
+
110
+ .loading-part-2 {
111
+ animation-name: refresh-animate2;
112
+ }
113
+
114
+ .loading-part-3 {
115
+ animation-name: refresh-animate3;
116
+ }
117
+
118
+ .loading-part-4 {
119
+ animation-name: refresh-animate4;
120
+ }
121
+ ]]>
122
+ </style>
123
+ </defs>
124
+ <g>
125
+ <path
126
+ class="loading-part-1"
127
+ fill-rule="evenodd"
128
+ clip-rule="evenodd"
129
+ d="M6 32.0001L9.72003 28.209C9.95076 27.9739 10.0803 27.655 10.0803 27.3225V16.2236L6.36035 20.0147C6.12963 20.2498 6 20.5687 6 20.9012V32.0001Z"
130
+ fill-opacity="0.16"
131
+ fill="#1BC47D"
132
+ />
133
+ <path
134
+ class="loading-part-2"
135
+ fill-rule="evenodd"
136
+ clip-rule="evenodd"
137
+ d="M11.3068 26.559L15.0269 22.768C15.2576 22.5329 15.3872 22.214 15.3872 21.8815V2.71126L11.6672 6.50233C11.4364 6.73746 11.3068 7.05636 11.3068 7.38889V26.559Z"
138
+ fill-opacity="0.16"
139
+ fill="#1BC47D"
140
+ />
141
+ <path
142
+ class="loading-part-3"
143
+ fill-rule="evenodd"
144
+ clip-rule="evenodd"
145
+ d="M16.6255 29.2742L20.3455 25.4832C20.5762 25.248 20.7059 24.9292 20.7059 24.5966V5.42644L16.9858 9.21751C16.7552 9.4526 16.6255 9.77154 16.6255 10.104V29.2742Z"
146
+ fill="#1BC47D"
147
+ fill-opacity="0.16"
148
+ />
149
+ <path
150
+ class="loading-part-4"
151
+ fill-rule="evenodd"
152
+ clip-rule="evenodd"
153
+ d="M21.9196 15.7765L25.6396 11.9854C25.8703 11.7503 26 11.4314 26 11.0989V0L22.2799 3.79107C22.0492 4.02617 21.9196 4.3451 21.9196 4.67759V15.7765Z"
154
+ fill="#1BC47D"
155
+ fill-opacity="0.16"
156
+ />
157
+ </g>
158
+ </svg>
package/dist/token.css CHANGED
@@ -2211,9 +2211,13 @@ html[theme="dark"]{
2211
2211
  --spacing-popover-primary-padding_left:12;
2212
2212
  --spacing-popover-primary-padding_right:12;
2213
2213
  --spacing-popover-primary-margin_y:4;
2214
+ --spacing-popover-primary-padding_top:8;
2215
+ --spacing-popover-primary-padding_bottom:8;
2214
2216
  --spacing-popover-secondary-padding_left:8;
2215
2217
  --spacing-popover-secondary-padding_right:8;
2216
2218
  --spacing-popover-secondary-margin_y:4;
2219
+ --spacing-popover-secondary-padding_top:4;
2220
+ --spacing-popover-secondary-padding_bottom:4;
2217
2221
  --spacing-popover-custom-padding_left:12;
2218
2222
  --spacing-popover-custom-padding_right:12;
2219
2223
  --spacing-popover-custom-margin_y:4;
@@ -2237,9 +2241,13 @@ html{
2237
2241
  --spacing-popover-primary-padding_left:12;
2238
2242
  --spacing-popover-primary-padding_right:12;
2239
2243
  --spacing-popover-primary-margin_y:4;
2244
+ --spacing-popover-primary-padding_top:8;
2245
+ --spacing-popover-primary-padding_bottom:8;
2240
2246
  --spacing-popover-secondary-padding_left:8;
2241
2247
  --spacing-popover-secondary-padding_right:8;
2242
2248
  --spacing-popover-secondary-margin_y:4;
2249
+ --spacing-popover-secondary-padding_top:4;
2250
+ --spacing-popover-secondary-padding_bottom:4;
2243
2251
  --spacing-popover-custom-padding_left:12;
2244
2252
  --spacing-popover-custom-padding_right:12;
2245
2253
  --spacing-popover-custom-margin_y:4;