@vtj/materials 0.13.15 → 0.13.17
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/assets/antdv/index.umd.js +2 -2
- package/dist/assets/charts/index.umd.js +2 -2
- package/dist/assets/element/index.umd.js +3 -3
- package/dist/assets/icons/index.umd.js +2 -2
- package/dist/assets/ui/index.umd.js +2 -2
- package/dist/assets/uni-h5/index.umd.js +2 -2
- package/dist/assets/uni-ui/index.umd.js +2 -2
- package/dist/assets/vant/index.umd.js +2 -2
- package/dist/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/deps/@vtj/ui/index.umd.js +4 -4
- package/dist/deps/@vtj/ui/style.css +1 -1
- package/dist/deps/@vtj/utils/index.umd.js +28 -33
- package/dist/deps/@vueuse/core/index.iife.min.js +1 -1
- package/dist/deps/element-plus/index.css +1 -1
- package/dist/deps/element-plus/index.full.min.js +14 -14
- package/dist/deps/element-plus/zh-cn.js +1 -1
- package/dist/deps/uni-app/index.umd.js +1 -1
- package/dist/deps/uni-h5/index.umd.js +8 -8
- package/dist/deps/uni-h5/style.css +1 -1
- package/dist/deps/uni-h5-vue/index.umd.js +1 -1
- package/dist/deps/uni-ui/index.umd.js +6 -1
- package/dist/deps/uni-ui/style.css +1 -1
- package/dist/deps/vue/vue.global.js +88 -53
- package/dist/deps/vue/vue.global.prod.js +9 -9
- package/package.json +12 -12
- package/src/antdv/image.ts +1 -1
- package/src/element/image.ts +1 -1
- package/src/element/virtualizedTable.ts +6 -6
- package/src/manifest.json +69 -0
- package/src/pages/index.vue +2 -0
- package/src/pages.json +19 -0
- package/src/uni-ui/index.ts +88 -58
- package/src/{uni-ui/lib/uni.scss → uni.scss} +4 -0
- package/src/version.ts +2 -2
- package/src/uni-ui/lib/uni-col/uni-col.vue +0 -324
- package/src/uni-ui/lib/uni-collapse/uni-collapse.vue +0 -153
- package/src/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +0 -425
- package/src/uni-ui/lib/uni-data-picker/keypress.js +0 -45
- package/src/uni-ui/lib/uni-data-picker/uni-data-picker.vue +0 -604
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +0 -622
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.css +0 -76
- package/src/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +0 -335
- package/src/uni-ui/lib/uni-data-select/uni-data-select.vue +0 -590
- package/src/uni-ui/lib/uni-datetime-picker/calendar-item.vue +0 -188
- package/src/uni-ui/lib/uni-datetime-picker/calendar.vue +0 -985
- package/src/uni-ui/lib/uni-datetime-picker/i18n/en.json +0 -22
- package/src/uni-ui/lib/uni-datetime-picker/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-datetime-picker/i18n/zh-Hans.json +0 -22
- package/src/uni-ui/lib/uni-datetime-picker/i18n/zh-Hant.json +0 -22
- package/src/uni-ui/lib/uni-datetime-picker/time-picker.vue +0 -1032
- package/src/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +0 -1230
- package/src/uni-ui/lib/uni-datetime-picker/util.js +0 -448
- package/src/uni-ui/lib/uni-easyinput/common.js +0 -54
- package/src/uni-ui/lib/uni-easyinput/uni-easyinput.vue +0 -790
- package/src/uni-ui/lib/uni-fav/i18n/en.json +0 -4
- package/src/uni-ui/lib/uni-fav/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-fav/i18n/zh-Hans.json +0 -4
- package/src/uni-ui/lib/uni-fav/i18n/zh-Hant.json +0 -4
- package/src/uni-ui/lib/uni-fav/uni-fav.vue +0 -170
- package/src/uni-ui/lib/uni-file-picker/choose-and-upload-file.js +0 -280
- package/src/uni-ui/lib/uni-file-picker/uni-file-picker.vue +0 -668
- package/src/uni-ui/lib/uni-file-picker/upload-file.vue +0 -325
- package/src/uni-ui/lib/uni-file-picker/upload-image.vue +0 -292
- package/src/uni-ui/lib/uni-file-picker/utils.js +0 -110
- package/src/uni-ui/lib/uni-forms/uni-forms.vue +0 -416
- package/src/uni-ui/lib/uni-forms/utils.js +0 -293
- package/src/uni-ui/lib/uni-forms/validate.js +0 -486
- package/src/uni-ui/lib/uni-forms-item/uni-forms-item.vue +0 -630
- package/src/uni-ui/lib/uni-goods-nav/i18n/en.json +0 -6
- package/src/uni-ui/lib/uni-goods-nav/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-goods-nav/i18n/zh-Hans.json +0 -6
- package/src/uni-ui/lib/uni-goods-nav/i18n/zh-Hant.json +0 -6
- package/src/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +0 -231
- package/src/uni-ui/lib/uni-grid/uni-grid.vue +0 -148
- package/src/uni-ui/lib/uni-icons/uni-icons.uvue +0 -91
- package/src/uni-ui/lib/uni-icons/uni-icons.vue +0 -114
- package/src/uni-ui/lib/uni-icons/uniicons.css +0 -664
- package/src/uni-ui/lib/uni-icons/uniicons.ttf +0 -0
- package/src/uni-ui/lib/uni-icons/uniicons_file.ts +0 -664
- package/src/uni-ui/lib/uni-icons/uniicons_file_vue.js +0 -649
- package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +0 -168
- package/src/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +0 -404
- package/src/uni-ui/lib/uni-list/uni-list.vue +0 -123
- package/src/uni-ui/lib/uni-list/uni-refresh.vue +0 -65
- package/src/uni-ui/lib/uni-list/uni-refresh.wxs +0 -87
- package/src/uni-ui/lib/uni-load-more/i18n/en.json +0 -5
- package/src/uni-ui/lib/uni-load-more/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-load-more/i18n/zh-Hans.json +0 -5
- package/src/uni-ui/lib/uni-load-more/i18n/zh-Hant.json +0 -5
- package/src/uni-ui/lib/uni-load-more/uni-load-more.vue +0 -456
- package/src/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +0 -484
- package/src/uni-ui/lib/uni-popup/i18n/en.json +0 -7
- package/src/uni-ui/lib/uni-popup/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-popup/i18n/zh-Hans.json +0 -7
- package/src/uni-ui/lib/uni-popup/i18n/zh-Hant.json +0 -7
- package/src/uni-ui/lib/uni-popup/keypress.js +0 -45
- package/src/uni-ui/lib/uni-popup/popup.js +0 -26
- package/src/uni-ui/lib/uni-popup/uni-popup.uvue +0 -90
- package/src/uni-ui/lib/uni-popup/uni-popup.vue +0 -552
- package/src/uni-ui/lib/uni-popup-dialog/keypress.js +0 -45
- package/src/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +0 -324
- package/src/uni-ui/lib/uni-popup-message/uni-popup-message.vue +0 -149
- package/src/uni-ui/lib/uni-rate/uni-rate.vue +0 -380
- package/src/uni-ui/lib/uni-row/uni-row.vue +0 -193
- package/src/uni-ui/lib/uni-search-bar/i18n/en.json +0 -4
- package/src/uni-ui/lib/uni-search-bar/i18n/index.js +0 -8
- package/src/uni-ui/lib/uni-search-bar/i18n/zh-Hans.json +0 -4
- package/src/uni-ui/lib/uni-search-bar/i18n/zh-Hant.json +0 -4
- package/src/uni-ui/lib/uni-search-bar/uni-search-bar.vue +0 -339
- package/src/uni-ui/lib/uni-swipe-action-item/bindingx.js +0 -311
- package/src/uni-ui/lib/uni-swipe-action-item/isPC.js +0 -12
- package/src/uni-ui/lib/uni-swipe-action-item/mpalipay.js +0 -195
- package/src/uni-ui/lib/uni-swipe-action-item/mpother.js +0 -260
- package/src/uni-ui/lib/uni-swipe-action-item/mpwxs.js +0 -84
- package/src/uni-ui/lib/uni-swipe-action-item/render.js +0 -270
- package/src/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +0 -493
- package/src/uni-ui/lib/uni-swipe-action-item/wx.wxs +0 -341
- package/src/uni-ui/lib/uni-table/uni-table.vue +0 -496
- package/src/uni-ui/lib/uni-td/uni-td.vue +0 -99
- package/src/uni-ui/lib/uni-th/filter-dropdown.vue +0 -559
- package/src/uni-ui/lib/uni-th/uni-th.vue +0 -322
- package/src/uni-ui/lib/uni-tr/table-checkbox.vue +0 -181
- package/src/uni-ui/lib/uni-tr/uni-tr.vue +0 -208
- package/src/uni-ui/lib/uni-transition/createAnimation.js +0 -131
- package/src/uni-ui/lib/uni-transition/uni-transition.vue +0 -310
- package/src/uni-ui/polyfill.ts +0 -41
@@ -1,425 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<view class="uni-collapse-item">
|
3
|
-
<!-- onClick(!isOpen) -->
|
4
|
-
<view
|
5
|
-
@click="onClick(!isOpen)"
|
6
|
-
class="uni-collapse-item__title"
|
7
|
-
:class="{
|
8
|
-
'is-open': isOpen && titleBorder === 'auto',
|
9
|
-
'uni-collapse-item-border': titleBorder !== 'none'
|
10
|
-
}">
|
11
|
-
<view class="uni-collapse-item__title-wrap">
|
12
|
-
<slot name="title">
|
13
|
-
<view
|
14
|
-
class="uni-collapse-item__title-box"
|
15
|
-
:class="{ 'is-disabled': disabled }">
|
16
|
-
<image
|
17
|
-
v-if="thumb"
|
18
|
-
:src="thumb"
|
19
|
-
class="uni-collapse-item__title-img" />
|
20
|
-
<text class="uni-collapse-item__title-text">{{ title }}</text>
|
21
|
-
</view>
|
22
|
-
</slot>
|
23
|
-
</view>
|
24
|
-
<view
|
25
|
-
v-if="showArrow"
|
26
|
-
:class="{
|
27
|
-
'uni-collapse-item__title-arrow-active': isOpen,
|
28
|
-
'uni-collapse-item--animation': showAnimation === true
|
29
|
-
}"
|
30
|
-
class="uni-collapse-item__title-arrow">
|
31
|
-
<uni-icons
|
32
|
-
:color="disabled ? '#ddd' : '#bbb'"
|
33
|
-
size="14"
|
34
|
-
type="bottom" />
|
35
|
-
</view>
|
36
|
-
</view>
|
37
|
-
<view
|
38
|
-
class="uni-collapse-item__wrap"
|
39
|
-
:class="{ 'is--transition': showAnimation }"
|
40
|
-
:style="{ height: (isOpen ? height : 0) + 'px' }">
|
41
|
-
<view
|
42
|
-
:id="elId"
|
43
|
-
ref="collapse--hook"
|
44
|
-
class="uni-collapse-item__wrap-content"
|
45
|
-
:class="{
|
46
|
-
open: isheight,
|
47
|
-
'uni-collapse-item--border': border && isOpen
|
48
|
-
}">
|
49
|
-
<slot></slot>
|
50
|
-
</view>
|
51
|
-
</view>
|
52
|
-
</view>
|
53
|
-
</template>
|
54
|
-
|
55
|
-
<script>
|
56
|
-
// #ifdef APP-NVUE
|
57
|
-
const dom = weex.requireModule('dom');
|
58
|
-
// #endif
|
59
|
-
/**
|
60
|
-
* CollapseItem 折叠面板子组件
|
61
|
-
* @description 折叠面板子组件
|
62
|
-
* @property {String} title 标题文字
|
63
|
-
* @property {String} thumb 标题左侧缩略图
|
64
|
-
* @property {String} name 唯一标志符
|
65
|
-
* @property {Boolean} open = [true|false] 是否展开组件
|
66
|
-
* @property {Boolean} titleBorder = [true|false] 是否显示标题分隔线
|
67
|
-
* @property {String} border = ['auto'|'show'|'none'] 是否显示分隔线
|
68
|
-
* @property {Boolean} disabled = [true|false] 是否展开面板
|
69
|
-
* @property {Boolean} showAnimation = [true|false] 开启动画
|
70
|
-
* @property {Boolean} showArrow = [true|false] 是否显示右侧箭头
|
71
|
-
*/
|
72
|
-
export default {
|
73
|
-
name: 'uniCollapseItem',
|
74
|
-
props: {
|
75
|
-
// 列表标题
|
76
|
-
title: {
|
77
|
-
type: String,
|
78
|
-
default: ''
|
79
|
-
},
|
80
|
-
name: {
|
81
|
-
type: [Number, String],
|
82
|
-
default: ''
|
83
|
-
},
|
84
|
-
// 是否禁用
|
85
|
-
disabled: {
|
86
|
-
type: Boolean,
|
87
|
-
default: false
|
88
|
-
},
|
89
|
-
// #ifdef APP-PLUS
|
90
|
-
// 是否显示动画,app 端默认不开启动画,卡顿严重
|
91
|
-
showAnimation: {
|
92
|
-
type: Boolean,
|
93
|
-
default: false
|
94
|
-
},
|
95
|
-
// #endif
|
96
|
-
// #ifndef APP-PLUS
|
97
|
-
// 是否显示动画
|
98
|
-
showAnimation: {
|
99
|
-
type: Boolean,
|
100
|
-
default: true
|
101
|
-
},
|
102
|
-
// #endif
|
103
|
-
// 是否展开
|
104
|
-
open: {
|
105
|
-
type: Boolean,
|
106
|
-
default: false
|
107
|
-
},
|
108
|
-
// 缩略图
|
109
|
-
thumb: {
|
110
|
-
type: String,
|
111
|
-
default: ''
|
112
|
-
},
|
113
|
-
// 标题分隔线显示类型
|
114
|
-
titleBorder: {
|
115
|
-
type: String,
|
116
|
-
default: 'auto'
|
117
|
-
},
|
118
|
-
border: {
|
119
|
-
type: Boolean,
|
120
|
-
default: true
|
121
|
-
},
|
122
|
-
showArrow: {
|
123
|
-
type: Boolean,
|
124
|
-
default: true
|
125
|
-
}
|
126
|
-
},
|
127
|
-
data() {
|
128
|
-
// TODO 随机生生元素ID,解决百度小程序获取同一个元素位置信息的bug
|
129
|
-
const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`;
|
130
|
-
return {
|
131
|
-
isOpen: false,
|
132
|
-
isheight: null,
|
133
|
-
height: 0,
|
134
|
-
elId,
|
135
|
-
nameSync: 0
|
136
|
-
};
|
137
|
-
},
|
138
|
-
watch: {
|
139
|
-
open(val) {
|
140
|
-
this.isOpen = val;
|
141
|
-
this.onClick(val, 'init');
|
142
|
-
}
|
143
|
-
},
|
144
|
-
updated(e) {
|
145
|
-
this.$nextTick(() => {
|
146
|
-
this.init(true);
|
147
|
-
});
|
148
|
-
},
|
149
|
-
created() {
|
150
|
-
this.collapse = this.getCollapse();
|
151
|
-
this.oldHeight = 0;
|
152
|
-
this.onClick(this.open, 'init');
|
153
|
-
},
|
154
|
-
// #ifndef VUE3
|
155
|
-
// TODO vue2
|
156
|
-
// destroyed() {
|
157
|
-
// if (this.__isUnmounted) return
|
158
|
-
// this.uninstall()
|
159
|
-
// },
|
160
|
-
// #endif
|
161
|
-
// #ifdef VUE3
|
162
|
-
// TODO vue3
|
163
|
-
unmounted() {
|
164
|
-
this.__isUnmounted = true;
|
165
|
-
this.uninstall();
|
166
|
-
},
|
167
|
-
// #endif
|
168
|
-
mounted() {
|
169
|
-
if (!this.collapse) return;
|
170
|
-
if (this.name !== '') {
|
171
|
-
this.nameSync = this.name;
|
172
|
-
} else {
|
173
|
-
this.nameSync = this.collapse.childrens.length + '';
|
174
|
-
}
|
175
|
-
if (this.collapse.names.indexOf(this.nameSync) === -1) {
|
176
|
-
this.collapse.names.push(this.nameSync);
|
177
|
-
} else {
|
178
|
-
console.warn(`name 值 ${this.nameSync} 重复`);
|
179
|
-
}
|
180
|
-
if (this.collapse.childrens.indexOf(this) === -1) {
|
181
|
-
this.collapse.childrens.push(this);
|
182
|
-
}
|
183
|
-
this.init();
|
184
|
-
},
|
185
|
-
methods: {
|
186
|
-
init(type) {
|
187
|
-
// #ifndef APP-NVUE
|
188
|
-
this.getCollapseHeight(type);
|
189
|
-
// #endif
|
190
|
-
// #ifdef APP-NVUE
|
191
|
-
// this.getNvueHwight(type);
|
192
|
-
// #endif
|
193
|
-
},
|
194
|
-
uninstall() {
|
195
|
-
if (this.collapse) {
|
196
|
-
this.collapse.childrens.forEach((item, index) => {
|
197
|
-
if (item === this) {
|
198
|
-
this.collapse.childrens.splice(index, 1);
|
199
|
-
}
|
200
|
-
});
|
201
|
-
this.collapse.names.forEach((item, index) => {
|
202
|
-
if (item === this.nameSync) {
|
203
|
-
this.collapse.names.splice(index, 1);
|
204
|
-
}
|
205
|
-
});
|
206
|
-
}
|
207
|
-
},
|
208
|
-
onClick(isOpen, type) {
|
209
|
-
if (this.disabled) return;
|
210
|
-
this.isOpen = isOpen;
|
211
|
-
if (this.isOpen && this.collapse) {
|
212
|
-
this.collapse.setAccordion(this);
|
213
|
-
}
|
214
|
-
if (type !== 'init') {
|
215
|
-
this.collapse.onChange(isOpen, this);
|
216
|
-
}
|
217
|
-
},
|
218
|
-
getCollapseHeight(type, index = 0) {
|
219
|
-
const views = uni.createSelectorQuery().in(this);
|
220
|
-
views
|
221
|
-
.select(`#${this.elId}`)
|
222
|
-
.fields(
|
223
|
-
{
|
224
|
-
size: true
|
225
|
-
},
|
226
|
-
(data) => {
|
227
|
-
// TODO 百度中可能获取不到节点信息 ,需要循环获取
|
228
|
-
if (index >= 10) return;
|
229
|
-
if (!data) {
|
230
|
-
index++;
|
231
|
-
this.getCollapseHeight(false, index);
|
232
|
-
return;
|
233
|
-
}
|
234
|
-
// #ifdef APP-NVUE
|
235
|
-
// this.height = data.height + 1
|
236
|
-
// #endif
|
237
|
-
// #ifndef APP-NVUE
|
238
|
-
this.height = data.height;
|
239
|
-
// #endif
|
240
|
-
this.isheight = true;
|
241
|
-
if (type) return;
|
242
|
-
this.onClick(this.isOpen, 'init');
|
243
|
-
}
|
244
|
-
)
|
245
|
-
.exec();
|
246
|
-
},
|
247
|
-
getNvueHwight(type) {
|
248
|
-
const result = dom.getComponentRect(
|
249
|
-
this.$refs['collapse--hook'],
|
250
|
-
(option) => {
|
251
|
-
if (option && option.result && option.size) {
|
252
|
-
// #ifdef APP-NVUE
|
253
|
-
this.height = option.size.height + 1;
|
254
|
-
// #endif
|
255
|
-
// #ifndef APP-NVUE
|
256
|
-
this.height = option.size.height;
|
257
|
-
// #endif
|
258
|
-
this.isheight = true;
|
259
|
-
if (type) return;
|
260
|
-
this.onClick(this.open, 'init');
|
261
|
-
}
|
262
|
-
}
|
263
|
-
);
|
264
|
-
},
|
265
|
-
/**
|
266
|
-
* 获取父元素实例
|
267
|
-
*/
|
268
|
-
getCollapse(name = 'uniCollapse') {
|
269
|
-
let parent = this.$parent;
|
270
|
-
let parentName = parent.$options.name;
|
271
|
-
while (parentName !== name) {
|
272
|
-
parent = parent.$parent;
|
273
|
-
if (!parent) return false;
|
274
|
-
parentName = parent.$options.name;
|
275
|
-
}
|
276
|
-
return parent;
|
277
|
-
}
|
278
|
-
}
|
279
|
-
};
|
280
|
-
</script>
|
281
|
-
|
282
|
-
<style lang="scss">
|
283
|
-
.uni-collapse-item {
|
284
|
-
/* #ifndef APP-NVUE */
|
285
|
-
box-sizing: border-box;
|
286
|
-
|
287
|
-
/* #endif */
|
288
|
-
&__title {
|
289
|
-
/* #ifndef APP-NVUE */
|
290
|
-
display: flex;
|
291
|
-
width: 100%;
|
292
|
-
box-sizing: border-box;
|
293
|
-
/* #endif */
|
294
|
-
flex-direction: row;
|
295
|
-
align-items: center;
|
296
|
-
transition: border-bottom-color 0.3s;
|
297
|
-
|
298
|
-
// transition-property: border-bottom-color;
|
299
|
-
// transition-duration: 5s;
|
300
|
-
&-wrap {
|
301
|
-
width: 100%;
|
302
|
-
flex: 1;
|
303
|
-
}
|
304
|
-
|
305
|
-
&-box {
|
306
|
-
padding: 0 15px;
|
307
|
-
/* #ifndef APP-NVUE */
|
308
|
-
display: flex;
|
309
|
-
width: 100%;
|
310
|
-
box-sizing: border-box;
|
311
|
-
/* #endif */
|
312
|
-
flex-direction: row;
|
313
|
-
justify-content: space-between;
|
314
|
-
align-items: center;
|
315
|
-
height: 48px;
|
316
|
-
line-height: 48px;
|
317
|
-
background-color: #fff;
|
318
|
-
color: #303133;
|
319
|
-
font-size: 13px;
|
320
|
-
font-weight: 500;
|
321
|
-
/* #ifdef H5 */
|
322
|
-
cursor: pointer;
|
323
|
-
outline: none;
|
324
|
-
|
325
|
-
/* #endif */
|
326
|
-
&.is-disabled {
|
327
|
-
.uni-collapse-item__title-text {
|
328
|
-
color: #999;
|
329
|
-
}
|
330
|
-
}
|
331
|
-
}
|
332
|
-
|
333
|
-
&.uni-collapse-item-border {
|
334
|
-
border-bottom: 1px solid #ebeef5;
|
335
|
-
}
|
336
|
-
|
337
|
-
&.is-open {
|
338
|
-
border-bottom-color: transparent;
|
339
|
-
}
|
340
|
-
|
341
|
-
&-img {
|
342
|
-
height: 22px;
|
343
|
-
width: 22px;
|
344
|
-
margin-right: 10px;
|
345
|
-
}
|
346
|
-
|
347
|
-
&-text {
|
348
|
-
flex: 1;
|
349
|
-
font-size: 14px;
|
350
|
-
/* #ifndef APP-NVUE */
|
351
|
-
white-space: nowrap;
|
352
|
-
color: inherit;
|
353
|
-
/* #endif */
|
354
|
-
/* #ifdef APP-NVUE */
|
355
|
-
lines: 1;
|
356
|
-
/* #endif */
|
357
|
-
overflow: hidden;
|
358
|
-
text-overflow: ellipsis;
|
359
|
-
}
|
360
|
-
|
361
|
-
&-arrow {
|
362
|
-
/* #ifndef APP-NVUE */
|
363
|
-
display: flex;
|
364
|
-
box-sizing: border-box;
|
365
|
-
/* #endif */
|
366
|
-
align-items: center;
|
367
|
-
justify-content: center;
|
368
|
-
width: 20px;
|
369
|
-
height: 20px;
|
370
|
-
margin-right: 10px;
|
371
|
-
transform: rotate(0deg);
|
372
|
-
|
373
|
-
&-active {
|
374
|
-
transform: rotate(-180deg);
|
375
|
-
}
|
376
|
-
}
|
377
|
-
}
|
378
|
-
|
379
|
-
&__wrap {
|
380
|
-
/* #ifndef APP-NVUE */
|
381
|
-
will-change: height;
|
382
|
-
box-sizing: border-box;
|
383
|
-
/* #endif */
|
384
|
-
background-color: #fff;
|
385
|
-
overflow: hidden;
|
386
|
-
position: relative;
|
387
|
-
height: 0;
|
388
|
-
|
389
|
-
&.is--transition {
|
390
|
-
// transition: all 0.3s;
|
391
|
-
transition-property: height, border-bottom-width;
|
392
|
-
transition-duration: 0.3s;
|
393
|
-
/* #ifndef APP-NVUE */
|
394
|
-
will-change: height;
|
395
|
-
/* #endif */
|
396
|
-
}
|
397
|
-
|
398
|
-
&-content {
|
399
|
-
position: absolute;
|
400
|
-
font-size: 13px;
|
401
|
-
color: #303133;
|
402
|
-
// transition: height 0.3s;
|
403
|
-
border-bottom-color: transparent;
|
404
|
-
border-bottom-style: solid;
|
405
|
-
border-bottom-width: 0;
|
406
|
-
|
407
|
-
&.uni-collapse-item--border {
|
408
|
-
border-bottom-width: 1px;
|
409
|
-
border-bottom-color: red;
|
410
|
-
border-bottom-color: #ebeef5;
|
411
|
-
}
|
412
|
-
|
413
|
-
&.open {
|
414
|
-
position: relative;
|
415
|
-
}
|
416
|
-
}
|
417
|
-
}
|
418
|
-
|
419
|
-
&--animation {
|
420
|
-
transition-property: transform;
|
421
|
-
transition-duration: 0.3s;
|
422
|
-
transition-timing-function: ease;
|
423
|
-
}
|
424
|
-
}
|
425
|
-
</style>
|
@@ -1,45 +0,0 @@
|
|
1
|
-
// #ifdef H5
|
2
|
-
export default {
|
3
|
-
name: 'Keypress',
|
4
|
-
props: {
|
5
|
-
disable: {
|
6
|
-
type: Boolean,
|
7
|
-
default: false
|
8
|
-
}
|
9
|
-
},
|
10
|
-
mounted () {
|
11
|
-
const keyNames = {
|
12
|
-
esc: ['Esc', 'Escape'],
|
13
|
-
tab: 'Tab',
|
14
|
-
enter: 'Enter',
|
15
|
-
space: [' ', 'Spacebar'],
|
16
|
-
up: ['Up', 'ArrowUp'],
|
17
|
-
left: ['Left', 'ArrowLeft'],
|
18
|
-
right: ['Right', 'ArrowRight'],
|
19
|
-
down: ['Down', 'ArrowDown'],
|
20
|
-
delete: ['Backspace', 'Delete', 'Del']
|
21
|
-
}
|
22
|
-
const listener = ($event) => {
|
23
|
-
if (this.disable) {
|
24
|
-
return
|
25
|
-
}
|
26
|
-
const keyName = Object.keys(keyNames).find(key => {
|
27
|
-
const keyName = $event.key
|
28
|
-
const value = keyNames[key]
|
29
|
-
return value === keyName || (Array.isArray(value) && value.includes(keyName))
|
30
|
-
})
|
31
|
-
if (keyName) {
|
32
|
-
// 避免和其他按键事件冲突
|
33
|
-
setTimeout(() => {
|
34
|
-
this.$emit(keyName, {})
|
35
|
-
}, 0)
|
36
|
-
}
|
37
|
-
}
|
38
|
-
document.addEventListener('keyup', listener)
|
39
|
-
this.$once('hook:beforeDestroy', () => {
|
40
|
-
document.removeEventListener('keyup', listener)
|
41
|
-
})
|
42
|
-
},
|
43
|
-
render: () => {}
|
44
|
-
}
|
45
|
-
// #endif
|