vdesign-ui 0.1.24-beta → 0.1.25
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.
- package/dist/components/activityviews/index.vue +11 -13
- package/dist/components/button/index.vue +1 -1
- package/dist/components/dropdown/index.vue +31 -43
- package/dist/components/empty/index.vue +2 -30
- package/dist/components/empty/style.less +4 -0
- package/dist/components/footer/index.vue +1 -1
- package/dist/components/footnav/footnav-item/index.vue +6 -2
- package/dist/components/icon/font/iconfont.css +949 -59
- package/dist/components/icon/font/iconfont.js +1 -1
- package/dist/components/input/index.vue +8 -31
- package/dist/components/input/style.less +1 -0
- package/dist/components/loading/index.vue +3 -4
- package/dist/components/loading/loading.png +0 -0
- package/dist/components/loading/refresh.png +0 -0
- package/dist/components/loading/style.less +1 -1
- package/dist/components/mixins/clickoutside.js +1 -1
- package/dist/components/mixins/dom.js +41 -41
- package/dist/components/mixins/outlineConfigPlugin.js +40 -40
- package/dist/components/mixins/router-link.js +22 -22
- package/dist/components/pagebreak/index.vue +5 -11
- package/dist/components/radio/style.css +213 -213
- package/dist/components/result/completed-dark.png +0 -0
- package/dist/components/result/completed.png +0 -0
- package/dist/components/result/error-dark.png +0 -0
- package/dist/components/result/error.png +0 -0
- package/dist/components/result/index.vue +2 -1
- package/dist/components/result/style.less +2 -1
- package/dist/components/result/wait-dark.png +0 -0
- package/dist/components/result/wait.png +0 -0
- package/dist/components/selector/index.vue +31 -49
- package/dist/components/selector/style.less +0 -10
- package/dist/token.css +2940 -2948
- package/dist/vdesign-ui.common.js +444 -621
- package/dist/vdesign-ui.css +1 -1
- package/dist/vdesign-ui.umd.js +444 -621
- package/dist/vdesign-ui.umd.min.js +3 -3
- package/package.json +1 -1
- package/dist/components/empty/nocoupons-dark.png +0 -0
- package/dist/components/empty/nocoupons.png +0 -0
- package/dist/components/empty/nomargin-dark.png +0 -0
- package/dist/components/empty/nomargin.png +0 -0
- package/dist/components/empty/nonotice-dark.png +0 -0
- package/dist/components/empty/nonotice.png +0 -0
- package/dist/components/empty/noocomments-dark.png +0 -0
- package/dist/components/empty/noocomments.png +0 -0
- package/dist/components/empty/noorders-dark.png +0 -0
- package/dist/components/empty/noorders.png +0 -0
- package/dist/components/empty/noposition-dark.png +0 -0
- package/dist/components/empty/noposition.png +0 -0
- package/dist/components/empty/nosearch-dark.png +0 -0
- package/dist/components/empty/nosearch.png +0 -0
- package/dist/components/loading/img_status_loading_white_ani.svg +0 -155
- package/dist/components/loading/img_status_refresh_ani.svg +0 -158
- package/dist/img/completed-dark.4183a8a8.png +0 -0
- package/dist/img/error-dark.b80857da.png +0 -0
- package/dist/img/img_status_loading_white_ani.b56fcfae.svg +0 -155
- package/dist/img/img_status_refresh_ani.d0e59f12.svg +0 -158
- package/dist/img/wait-dark.6aa28731.png +0 -0
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<vd-icon v-if="closeIcon" class="vd-activityviews__close" :name="currentCloseIcon" svg
|
|
14
14
|
@click="onCancel"></vd-icon>
|
|
15
15
|
<vd-button v-if="closeBtn" class="vd-activityviews__done" type="primary_text" size="large"
|
|
16
|
-
|
|
16
|
+
@click="onCancel">{{ closeBtn }}</vd-button>
|
|
17
17
|
</slot>
|
|
18
18
|
</div>
|
|
19
19
|
<p v-if="description" class="vd-activityviews__description">{{ description }}</p>
|
|
@@ -23,9 +23,8 @@
|
|
|
23
23
|
<div v-if="actionSheet" class="vd-activityviews__action">
|
|
24
24
|
<p v-if="title" class="vd-activityviews__action-title vd-hairline--bottom">{{ title }}</p>
|
|
25
25
|
<div class="vd-activityviews__actions">
|
|
26
|
-
<vd-button v-for="(item, index) in actions" block size="large" :type="item.type"
|
|
27
|
-
:
|
|
28
|
-
:disabled="item.disabled" @click.stop="onSelect(item)">{{ item.name }}</vd-button>
|
|
26
|
+
<vd-button v-for="(item, index) in actions" block size="large" :type="item.type" :key="index" :class="{ 'vd-hairline--bottom': index !== actions.length - 1 }"
|
|
27
|
+
:disabled="item.disabled" @click.stop="onSelect(item)" >{{ item.name }}</vd-button>
|
|
29
28
|
</div>
|
|
30
29
|
<div v-if="cancelText" class="vd-activityviews__gap"></div>
|
|
31
30
|
<div v-if="cancelText" class="vd-activityviews__cancel" @click="onCancel">
|
|
@@ -48,7 +47,7 @@ export default {
|
|
|
48
47
|
props: {
|
|
49
48
|
value: Boolean,
|
|
50
49
|
title: String,
|
|
51
|
-
backDefault:
|
|
50
|
+
backDefault:Boolean,
|
|
52
51
|
closeIcon: Boolean,
|
|
53
52
|
closeBtn: String,
|
|
54
53
|
description: String,
|
|
@@ -70,7 +69,7 @@ export default {
|
|
|
70
69
|
default: true
|
|
71
70
|
},
|
|
72
71
|
disabled: Boolean,
|
|
73
|
-
closeOnOverlay:
|
|
72
|
+
closeOnOverlay:{
|
|
74
73
|
type: Boolean,
|
|
75
74
|
default: true
|
|
76
75
|
},
|
|
@@ -80,7 +79,7 @@ export default {
|
|
|
80
79
|
}
|
|
81
80
|
},
|
|
82
81
|
computed: {
|
|
83
|
-
visible()
|
|
82
|
+
visible(){
|
|
84
83
|
return this.value
|
|
85
84
|
},
|
|
86
85
|
currentCloseIcon() {
|
|
@@ -122,21 +121,20 @@ export default {
|
|
|
122
121
|
|
|
123
122
|
.vd-activityviews-fade-enter-active,
|
|
124
123
|
.vd-activityviews-fade-leave-active {
|
|
125
|
-
|
|
124
|
+
transition: opacity 0.3s;
|
|
126
125
|
}
|
|
127
|
-
|
|
128
126
|
.vd-activityviews-fade-enter,
|
|
129
127
|
.vd-activityviews-fade-leave-to {
|
|
130
|
-
|
|
128
|
+
opacity: 0;
|
|
131
129
|
}
|
|
132
130
|
|
|
133
131
|
.vd-activityviews-slide-up-enter-active,
|
|
134
132
|
.vd-activityviews-slide-up-leave-active {
|
|
135
|
-
|
|
133
|
+
transition: transform 0.3s;
|
|
136
134
|
}
|
|
137
|
-
|
|
138
135
|
.vd-activityviews-slide-up-enter,
|
|
139
136
|
.vd-activityviews-slide-up-leave-to {
|
|
140
|
-
|
|
137
|
+
transform: translateY(100%);
|
|
141
138
|
}
|
|
139
|
+
|
|
142
140
|
</style>
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<div class="vd-menu-mask" @click.stop="clickMenuMask"></div>
|
|
5
5
|
</transition> -->
|
|
6
6
|
<transition :name="isAnimation ? 'vd-dropdown-slide-down' : ''">
|
|
7
|
-
<div v-clickoutside="clickMenuMask" class="vd-dropdown-menu" v-show="
|
|
7
|
+
<div v-clickoutside="clickMenuMask" class="vd-dropdown-menu" v-show="value">
|
|
8
8
|
<template v-if="!isMultiple && !$slots.custom">
|
|
9
|
-
<div class="vd-dropdown-item" :class="itemClass(item)" v-for="(item, index)
|
|
9
|
+
<div class="vd-dropdown-item" :class="itemClass(item)" v-for="(item, index) of datalist" :key="item.name"
|
|
10
10
|
@click.stop="selectedItem(item, index)">
|
|
11
11
|
<span class="vd-dropdown-left">
|
|
12
12
|
<vd-icon v-if="item.icon" :name="item.icon" svg class="vd-dropdown-icon"></vd-icon>
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<template v-if="isMultiple">
|
|
29
|
-
<div class="vd-dropdown-item" :class="itemClass(item)" v-for="item
|
|
29
|
+
<div class="vd-dropdown-item" :class="itemClass(item)" v-for="item of datalist" :key="item.name">
|
|
30
30
|
<vd-checkbox v-model="item.selected" :disabled="!item.selected && max <= selectedCount">
|
|
31
31
|
{{ item.text }}
|
|
32
32
|
</vd-checkbox>
|
|
@@ -99,33 +99,36 @@ export default {
|
|
|
99
99
|
type: Array,
|
|
100
100
|
default: () => []
|
|
101
101
|
},
|
|
102
|
-
|
|
102
|
+
state: {
|
|
103
|
+
type: String,
|
|
104
|
+
default: 'close',
|
|
105
|
+
validator: value => ['open', 'preopen', 'close', 'fusing', 'pre', 'last'].includes(value)
|
|
106
|
+
},
|
|
107
|
+
stateText: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: ''
|
|
110
|
+
},
|
|
111
|
+
subText: {
|
|
103
112
|
type: String,
|
|
104
113
|
default: ''
|
|
105
114
|
},
|
|
115
|
+
subIcon: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: ''
|
|
118
|
+
}
|
|
106
119
|
},
|
|
107
120
|
data() {
|
|
108
121
|
return {
|
|
109
|
-
datalist: []
|
|
122
|
+
datalist: [],
|
|
123
|
+
isMask: this.value
|
|
110
124
|
};
|
|
111
125
|
},
|
|
112
126
|
watch: {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
handler(val) {
|
|
116
|
-
this.datalist = [...val];
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
value(val){
|
|
120
|
-
if(!val){
|
|
121
|
-
this.$emit('close')
|
|
122
|
-
}
|
|
127
|
+
value(val) {
|
|
128
|
+
this.isMask = val;
|
|
123
129
|
}
|
|
124
130
|
},
|
|
125
131
|
computed: {
|
|
126
|
-
isMask() {
|
|
127
|
-
return this.value;
|
|
128
|
-
},
|
|
129
132
|
wrapClasses() {
|
|
130
133
|
return {
|
|
131
134
|
[`${prefixCls}-${this.types}`]: this.types,
|
|
@@ -143,6 +146,9 @@ export default {
|
|
|
143
146
|
return this.datalist.filter(item => item.selected).length;
|
|
144
147
|
}
|
|
145
148
|
},
|
|
149
|
+
mounted() {
|
|
150
|
+
this.datalist = [...this.list];
|
|
151
|
+
},
|
|
146
152
|
methods: {
|
|
147
153
|
itemClass(item) {
|
|
148
154
|
return {
|
|
@@ -150,44 +156,26 @@ export default {
|
|
|
150
156
|
[`${prefixCls}--active`]: item.selected
|
|
151
157
|
};
|
|
152
158
|
},
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return element;
|
|
157
|
-
}
|
|
158
|
-
// 如果已经到达根元素 (document 或 null),停止查找
|
|
159
|
-
if (element.parentElement) {
|
|
160
|
-
return this.findParentWithNameAttr(element.parentElement, nameValue); // 递归查找父元素
|
|
161
|
-
}
|
|
162
|
-
return null; // 没有找到带 name 属性的匹配元素
|
|
163
|
-
},
|
|
164
|
-
clickMenuMask(e) {
|
|
165
|
-
if (this.value) {
|
|
166
|
-
if(this.for){
|
|
167
|
-
const nameElement = this.findParentWithNameAttr(e, this.for)
|
|
168
|
-
// 如果没找到就说明点外面了
|
|
169
|
-
if (!nameElement) {
|
|
170
|
-
this.$emit('input', false);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
159
|
+
clickMenuMask() {
|
|
160
|
+
this.isMask = false;
|
|
161
|
+
this.$emit('close');
|
|
174
162
|
},
|
|
175
163
|
selectedItem(item, index) {
|
|
176
|
-
this.$emit('change', item, index);
|
|
164
|
+
this.$emit('change', item, index);
|
|
177
165
|
},
|
|
178
166
|
resetMenu() {
|
|
179
167
|
this.datalist.forEach(item => (item.selected = false));
|
|
180
168
|
this.$emit('reset', this.datalist);
|
|
181
169
|
},
|
|
182
170
|
sureMenu() {
|
|
183
|
-
this
|
|
184
|
-
this.$emit('
|
|
171
|
+
this.isMask = false;
|
|
172
|
+
this.$emit('close');
|
|
173
|
+
this.$emit('ok', this.datalist);
|
|
185
174
|
}
|
|
186
175
|
}
|
|
187
176
|
};
|
|
188
177
|
</script>
|
|
189
178
|
|
|
190
|
-
|
|
191
179
|
<style lang="less">
|
|
192
180
|
@import './style.less';
|
|
193
181
|
|
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
default: 'nodata', // 默认类型
|
|
26
26
|
validator(value) {
|
|
27
27
|
// 只接受以下类型值
|
|
28
|
-
return ['nodata', 'network', 'not-found'
|
|
28
|
+
return ['nodata', 'network', 'not-found'].includes(value);
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
},
|
|
@@ -43,35 +43,7 @@ export default {
|
|
|
43
43
|
'not-found': {
|
|
44
44
|
light: require('./404.png'),
|
|
45
45
|
dark: require('./404-dark.png')
|
|
46
|
-
}
|
|
47
|
-
noposition: {
|
|
48
|
-
light: require('./noposition.png'),
|
|
49
|
-
dark: require('./noposition-dark.png')
|
|
50
|
-
},
|
|
51
|
-
nomargin: {
|
|
52
|
-
light: require('./nomargin.png'),
|
|
53
|
-
dark: require('./nomargin-dark.png')
|
|
54
|
-
},
|
|
55
|
-
nocoupons: {
|
|
56
|
-
light: require('./nocoupons.png'),
|
|
57
|
-
dark: require('./nocoupons-dark.png')
|
|
58
|
-
},
|
|
59
|
-
nosearch: {
|
|
60
|
-
light: require('./nosearch.png'),
|
|
61
|
-
dark: require('./nosearch-dark.png')
|
|
62
|
-
},
|
|
63
|
-
nonotice: {
|
|
64
|
-
light: require('./nonotice.png'),
|
|
65
|
-
dark: require('./nonotice-dark.png')
|
|
66
|
-
},
|
|
67
|
-
noorders: {
|
|
68
|
-
light: require('./noorders.png'),
|
|
69
|
-
dark: require('./noorders-dark.png')
|
|
70
|
-
},
|
|
71
|
-
noocomments: {
|
|
72
|
-
light: require('./noocomments.png'),
|
|
73
|
-
dark: require('./noocomments-dark.png')
|
|
74
|
-
},
|
|
46
|
+
}
|
|
75
47
|
}
|
|
76
48
|
}
|
|
77
49
|
},
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="vd-foot-nav-item" :class="{ 'vd-foot-nav-item--active': active }" @click="onClick">
|
|
3
|
-
<vd-
|
|
4
|
-
|
|
3
|
+
<vd-icon v-if="icon" :name="icon" :svg="isSvg"></vd-icon>
|
|
4
|
+
<vd-badge v-if="dot || badge" :is-dot="dot" :value="badge" :max="99">
|
|
5
|
+
<vd-icon :name="iconName" size="large" :svg="isSvg"></vd-icon>
|
|
5
6
|
</vd-badge>
|
|
6
7
|
<slot></slot>
|
|
7
8
|
</div>
|
|
@@ -24,6 +25,9 @@ export default {
|
|
|
24
25
|
name: {
|
|
25
26
|
type: String,
|
|
26
27
|
},
|
|
28
|
+
text: {
|
|
29
|
+
type: String,
|
|
30
|
+
},
|
|
27
31
|
dot: {
|
|
28
32
|
type: Boolean,
|
|
29
33
|
},
|