@10yun/cv-mobile-ui 0.5.20 → 0.5.22
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/package.json +1 -1
- package/plugins/jumps.js +57 -12
- package/plugins/lbs.js +17 -8
- package/ui-cv/components/cv-grid-item/cv-grid-item.vue +1 -1
- package/uni-ui/lib/uni-badge/uni-badge.vue +150 -1
- package/uni-ui/lib/uni-breadcrumb/uni-breadcrumb.vue +37 -1
- package/uni-ui/lib/uni-breadcrumb-item/uni-breadcrumb-item.vue +83 -1
- package/uni-ui/lib/uni-calendar/uni-calendar-item.vue +122 -1
- package/uni-ui/lib/uni-calendar/uni-calendar.vue +366 -1
- package/uni-ui/lib/uni-card/uni-card.vue +124 -1
- package/uni-ui/lib/uni-col/uni-col.vue +1 -1
- package/uni-ui/lib/uni-collapse/uni-collapse.vue +135 -1
- package/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +266 -1
- package/uni-ui/lib/uni-combox/uni-combox.vue +1 -1
- package/uni-ui/lib/uni-countdown/uni-countdown.vue +239 -1
- package/uni-ui/lib/uni-data-checkbox/uni-data-checkbox.vue +487 -1
- package/uni-ui/lib/uni-data-picker/uni-data-picker.vue +530 -1
- package/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +157 -150
- package/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +166 -1
- package/uni-ui/lib/uni-data-select/uni-data-select.vue +289 -1
- package/uni-ui/lib/uni-datetime-picker/calendar-item.vue +70 -1
- package/uni-ui/lib/uni-datetime-picker/calendar.vue +629 -1
- package/uni-ui/lib/uni-datetime-picker/time-picker.vue +741 -1
- package/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +847 -1
- package/uni-ui/lib/uni-drawer/uni-drawer.vue +115 -1
- package/uni-ui/lib/uni-easyinput/uni-easyinput.vue +515 -1
- package/uni-ui/lib/uni-fab/uni-fab.vue +257 -1
- package/uni-ui/lib/uni-fav/uni-fav.vue +123 -1
- package/uni-ui/lib/uni-file-picker/uni-file-picker.vue +642 -1
- package/uni-ui/lib/uni-file-picker/upload-file.vue +177 -1
- package/uni-ui/lib/uni-file-picker/upload-image.vue +176 -1
- package/uni-ui/lib/uni-forms/uni-forms.vue +375 -1
- package/uni-ui/lib/uni-forms-item/uni-forms-item.vue +429 -1
- package/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +129 -1
- package/uni-ui/lib/uni-grid/uni-grid.vue +115 -1
- package/uni-ui/lib/uni-grid-item/uni-grid-item.vue +78 -1
- package/uni-ui/lib/uni-group/uni-group.vue +85 -1
- package/uni-ui/lib/uni-icons/uni-icons.vue +85 -1
- package/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +68 -1
- package/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +294 -1
- package/uni-ui/lib/uni-list/uni-list.vue +81 -1
- package/uni-ui/lib/uni-list-ad/uni-list-ad.vue +77 -1
- package/uni-ui/lib/uni-list-chat/uni-list-chat.vue +294 -1
- package/uni-ui/lib/uni-list-item/uni-list-item.vue +346 -1
- package/uni-ui/lib/uni-load-more/uni-load-more.vue +172 -1
- package/uni-ui/lib/uni-nav-bar/uni-nav-bar.vue +205 -1
- package/uni-ui/lib/uni-nav-bar/uni-status-bar.vue +18 -1
- package/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +331 -1
- package/uni-ui/lib/uni-number-box/uni-number-box.vue +166 -1
- package/uni-ui/lib/uni-pagination/uni-pagination.vue +323 -1
- package/uni-ui/lib/uni-popup/uni-popup.vue +1 -1
- package/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +173 -1
- package/uni-ui/lib/uni-popup-message/uni-popup-message.vue +74 -1
- package/uni-ui/lib/uni-popup-share/uni-popup-share.vue +106 -1
- package/uni-ui/lib/uni-rate/uni-rate.vue +322 -1
- package/uni-ui/lib/uni-row/uni-row.vue +1 -1
- package/uni-ui/lib/uni-search-bar/uni-search-bar.vue +236 -1
- package/uni-ui/lib/uni-section/uni-section.vue +109 -1
- package/uni-ui/lib/uni-segmented-control/uni-segmented-control.vue +103 -1
- package/uni-ui/lib/uni-status-bar/uni-status-bar.vue +1 -1
- package/uni-ui/lib/uni-steps/uni-steps.vue +120 -1
- package/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +226 -3
- package/uni-ui/lib/uni-swiper-dot/uni-swiper-dot.vue +167 -1
- package/uni-ui/lib/uni-table/uni-table.vue +297 -1
- package/uni-ui/lib/uni-tag/uni-tag.vue +100 -1
- package/uni-ui/lib/uni-td/uni-td.vue +78 -1
- package/uni-ui/lib/uni-th/filter-dropdown.vue +1 -1
- package/uni-ui/lib/uni-th/uni-th.vue +224 -1
- package/uni-ui/lib/uni-thead/uni-thead.vue +77 -1
- package/uni-ui/lib/uni-tr/table-checkbox.vue +79 -1
- package/uni-ui/lib/uni-tr/uni-tr.vue +135 -1
|
@@ -1 +1,115 @@
|
|
|
1
|
-
<template>
|
|
2
1
|
<view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer" @touchmove.stop.prevent="clear">
|
|
3
2
|
<view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close('mask')" />
|
|
4
3
|
<view
|
|
5
4
|
class="uni-drawer__content"
|
|
6
5
|
:class="{ 'uni-drawer--right': rightMode, 'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer }"
|
|
7
6
|
:style="{ width: drawerWidth + 'px' }"
|
|
8
7
|
>
|
|
9
8
|
<slot />
|
|
10
9
|
</view>
|
|
11
10
|
<!-- #ifdef H5 -->
|
|
12
11
|
<keypress @esc="close('mask')" />
|
|
13
12
|
<!-- #endif -->
|
|
14
13
|
</view>
|
|
15
14
|
* Drawer 抽屉
|
|
16
15
|
* @description 抽屉侧滑菜单
|
|
17
16
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=26
|
|
18
17
|
* @property {Boolean} mask = [true | false] 是否显示遮罩
|
|
19
18
|
* @property {Boolean} maskClick = [true | false] 点击遮罩是否关闭
|
|
20
19
|
* @property {Boolean} mode = [left | right] Drawer 滑出位置
|
|
21
20
|
* @value left 从左侧滑出
|
|
22
21
|
* @value right 从右侧侧滑出
|
|
23
22
|
* @property {Number} width 抽屉的宽度 ,仅 vue 页面生效
|
|
24
23
|
* @event {Function} close 组件关闭时触发事件
|
|
25
24
|
*/
|
|
26
25
|
name: 'UniDrawer',
|
|
27
26
|
components: {
|
|
28
27
|
// #ifdef H5
|
|
29
28
|
keypress
|
|
30
29
|
// #endif
|
|
31
30
|
},
|
|
32
31
|
emits: ['change'],
|
|
33
32
|
props: {
|
|
34
33
|
/**
|
|
35
34
|
* 显示模式(左、右),只在初始化生效
|
|
36
35
|
*/
|
|
37
36
|
mode: {
|
|
38
37
|
type: String,
|
|
39
38
|
default: ''
|
|
40
39
|
},
|
|
41
40
|
/**
|
|
42
41
|
* 蒙层显示状态
|
|
43
42
|
*/
|
|
44
43
|
mask: {
|
|
45
44
|
type: Boolean,
|
|
46
45
|
default: true
|
|
47
46
|
},
|
|
48
47
|
/**
|
|
49
48
|
* 遮罩是否可点击关闭
|
|
50
49
|
*/
|
|
51
50
|
maskClick: {
|
|
52
51
|
type: Boolean,
|
|
53
52
|
default: true
|
|
54
53
|
},
|
|
55
54
|
/**
|
|
56
55
|
* 抽屉宽度
|
|
57
56
|
*/
|
|
58
57
|
width: {
|
|
59
58
|
type: Number,
|
|
60
59
|
default: 220
|
|
61
60
|
}
|
|
62
61
|
},
|
|
63
62
|
data() {
|
|
64
63
|
return {
|
|
65
64
|
visibleSync: false,
|
|
66
65
|
showDrawer: false,
|
|
67
66
|
rightMode: false,
|
|
68
67
|
watchTimer: null,
|
|
69
68
|
drawerWidth: 220
|
|
70
69
|
};
|
|
71
70
|
},
|
|
72
71
|
created() {
|
|
73
72
|
// #ifndef APP-NVUE
|
|
74
73
|
this.drawerWidth = this.width;
|
|
75
74
|
// #endif
|
|
76
75
|
this.rightMode = this.mode === 'right';
|
|
77
76
|
},
|
|
78
77
|
methods: {
|
|
79
78
|
clear() {},
|
|
80
79
|
close(type) {
|
|
81
80
|
// fixed by mehaotian 抽屉尚未完全关闭或遮罩禁止点击时不触发以下逻辑
|
|
82
81
|
if ((type === 'mask' && !this.maskClick) || !this.visibleSync) return;
|
|
83
82
|
this._change('showDrawer', 'visibleSync', false);
|
|
84
83
|
},
|
|
85
84
|
open() {
|
|
86
85
|
// fixed by mehaotian 处理重复点击打开的事件
|
|
87
86
|
if (this.visibleSync) return;
|
|
88
87
|
this._change('visibleSync', 'showDrawer', true);
|
|
89
88
|
},
|
|
90
89
|
_change(param1, param2, status) {
|
|
91
90
|
this[param1] = status;
|
|
92
91
|
if (this.watchTimer) {
|
|
93
92
|
clearTimeout(this.watchTimer);
|
|
94
93
|
}
|
|
95
94
|
this.watchTimer = setTimeout(
|
|
96
95
|
() => {
|
|
97
96
|
this[param2] = status;
|
|
98
97
|
this.$emit('change', status);
|
|
99
98
|
},
|
|
100
99
|
status ? 50 : 300
|
|
101
100
|
);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
103
|
+
<template>
|
|
104
|
+
<view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer" @touchmove.stop.prevent="clear">
|
|
105
|
+
<view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close('mask')" />
|
|
106
|
+
<view
|
|
107
|
+
class="uni-drawer__content"
|
|
108
|
+
:class="{ 'uni-drawer--right': rightMode, 'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer }"
|
|
109
|
+
:style="{ width: drawerWidth + 'px' }"
|
|
110
|
+
>
|
|
111
|
+
<slot />
|
|
112
|
+
</view>
|
|
113
|
+
<!-- #ifdef H5 -->
|
|
114
|
+
<keypress @esc="close('mask')" />
|
|
115
|
+
<!-- #endif -->
|
|
116
|
+
</view>
|
|
117
|
+
</template>
|
|
118
|
+
<script>
|
|
119
|
+
// #ifdef H5
|
|
120
|
+
import keypress from './keypress.js';
|
|
121
|
+
// #endif
|
|
122
|
+
/**
|
|
123
|
+
* Drawer 抽屉
|
|
124
|
+
* @description 抽屉侧滑菜单
|
|
125
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=26
|
|
126
|
+
* @property {Boolean} mask = [true | false] 是否显示遮罩
|
|
127
|
+
* @property {Boolean} maskClick = [true | false] 点击遮罩是否关闭
|
|
128
|
+
* @property {Boolean} mode = [left | right] Drawer 滑出位置
|
|
129
|
+
* @value left 从左侧滑出
|
|
130
|
+
* @value right 从右侧侧滑出
|
|
131
|
+
* @property {Number} width 抽屉的宽度 ,仅 vue 页面生效
|
|
132
|
+
* @event {Function} close 组件关闭时触发事件
|
|
133
|
+
*/
|
|
134
|
+
export default {
|
|
135
|
+
name: 'UniDrawer',
|
|
136
|
+
components: {
|
|
137
|
+
// #ifdef H5
|
|
138
|
+
keypress
|
|
139
|
+
// #endif
|
|
140
|
+
},
|
|
141
|
+
emits: ['change'],
|
|
142
|
+
props: {
|
|
143
|
+
/**
|
|
144
|
+
* 显示模式(左、右),只在初始化生效
|
|
145
|
+
*/
|
|
146
|
+
mode: {
|
|
147
|
+
type: String,
|
|
148
|
+
default: ''
|
|
149
|
+
},
|
|
150
|
+
/**
|
|
151
|
+
* 蒙层显示状态
|
|
152
|
+
*/
|
|
153
|
+
mask: {
|
|
154
|
+
type: Boolean,
|
|
155
|
+
default: true
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* 遮罩是否可点击关闭
|
|
159
|
+
*/
|
|
160
|
+
maskClick: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
default: true
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* 抽屉宽度
|
|
166
|
+
*/
|
|
167
|
+
width: {
|
|
168
|
+
type: Number,
|
|
169
|
+
default: 220
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
data() {
|
|
173
|
+
return {
|
|
174
|
+
visibleSync: false,
|
|
175
|
+
showDrawer: false,
|
|
176
|
+
rightMode: false,
|
|
177
|
+
watchTimer: null,
|
|
178
|
+
drawerWidth: 220
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
created() {
|
|
182
|
+
// #ifndef APP-NVUE
|
|
183
|
+
this.drawerWidth = this.width;
|
|
184
|
+
// #endif
|
|
185
|
+
this.rightMode = this.mode === 'right';
|
|
186
|
+
},
|
|
187
|
+
methods: {
|
|
188
|
+
clear() {},
|
|
189
|
+
close(type) {
|
|
190
|
+
// fixed by mehaotian 抽屉尚未完全关闭或遮罩禁止点击时不触发以下逻辑
|
|
191
|
+
if ((type === 'mask' && !this.maskClick) || !this.visibleSync) return;
|
|
192
|
+
this._change('showDrawer', 'visibleSync', false);
|
|
193
|
+
},
|
|
194
|
+
open() {
|
|
195
|
+
// fixed by mehaotian 处理重复点击打开的事件
|
|
196
|
+
if (this.visibleSync) return;
|
|
197
|
+
this._change('visibleSync', 'showDrawer', true);
|
|
198
|
+
},
|
|
199
|
+
_change(param1, param2, status) {
|
|
200
|
+
this[param1] = status;
|
|
201
|
+
if (this.watchTimer) {
|
|
202
|
+
clearTimeout(this.watchTimer);
|
|
203
|
+
}
|
|
204
|
+
this.watchTimer = setTimeout(
|
|
205
|
+
() => {
|
|
206
|
+
this[param2] = status;
|
|
207
|
+
this.$emit('change', status);
|
|
208
|
+
},
|
|
209
|
+
status ? 50 : 300
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
</script>
|
|
215
|
+
<style>
|
|
216
|
+
@import 'style.css';
|
|
217
|
+
</style>
|