@10yun/cv-mobile-ui 0.4.2 → 0.4.3
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/ui-uni/amap-wx/js/util.js +166 -158
- package/ui-uni/page-foot/page-foot.vue +38 -0
- package/ui-uni/page-head/page-head.vue +16 -0
- package/ui-uni/product.vue +52 -52
- package/ui-uni/u-charts/u-charts.js +743 -1092
- package/ui-uni/u-link/u-link.vue +59 -0
- package/ui-uni/uni-badge/uni-badge.vue +250 -0
- package/ui-uni/uni-calendar/calendar.js +546 -0
- package/ui-uni/uni-calendar/uni-calendar-item.vue +171 -0
- package/ui-uni/uni-calendar/uni-calendar.vue +504 -0
- package/{ui-cv/cv-calendar → ui-uni/uni-calendar}/util.js +0 -0
- package/ui-uni/uni-card/uni-card.vue +420 -0
- package/ui-uni/uni-col/uni-col.vue +2968 -0
- package/ui-uni/uni-collapse/uni-collapse.vue +146 -0
- package/ui-uni/uni-collapse-item/uni-collapse-item.vue +378 -0
- package/ui-uni/uni-combox/uni-combox.vue +237 -0
- package/ui-uni/uni-countdown/uni-countdown.vue +234 -0
- package/ui-uni/uni-data-checkbox/uni-data-checkbox.vue +792 -0
- package/{ui-cv/cv-data-indexed-list → ui-uni/uni-data-indexed-list}/clientdb.js +0 -0
- package/ui-uni/uni-data-indexed-list/uni-data-indexed-list-item.vue +142 -0
- package/ui-uni/uni-data-indexed-list/uni-data-indexed-list.vue +364 -0
- package/{ui-cv/cv-data-picker → ui-uni/uni-data-picker}/keypress.js +0 -0
- package/ui-uni/uni-data-picker/uni-data-picker.vue +468 -0
- package/{ui-cv/cv-data-pickerview/cv-data-picker.js → ui-uni/uni-data-pickerview/uni-data-picker.js} +0 -0
- package/ui-uni/uni-data-pickerview/uni-data-pickerview.vue +298 -0
- package/{ui-cv/cv-dateformat → ui-uni/uni-dateformat}/date-format.js +0 -0
- package/ui-uni/uni-dateformat/uni-dateformat.vue +88 -0
- package/{ui-cv/cv-datetime-picker → ui-uni/uni-datetime-picker}/calendar-item.vue +0 -0
- package/{ui-cv/cv-datetime-picker → ui-uni/uni-datetime-picker}/calendar.js +0 -0
- package/ui-uni/uni-datetime-picker/calendar.vue +747 -0
- package/{ui-cv/cv-datetime-picker → ui-uni/uni-datetime-picker}/keypress.js +0 -0
- package/ui-uni/uni-datetime-picker/time-picker.vue +899 -0
- package/ui-uni/uni-datetime-picker/uni-datetime-picker.vue +874 -0
- package/{ui-cv/cv-datetime-picker → ui-uni/uni-datetime-picker}/util.js +0 -0
- package/ui-uni/uni-drawer/keypress.js +45 -0
- package/ui-uni/uni-drawer/uni-drawer.vue +178 -0
- package/{ui-cv/cv-easyinput → ui-uni/uni-easyinput}/common.js +0 -0
- package/ui-uni/uni-easyinput/uni-easyinput.vue +438 -0
- package/ui-uni/uni-fab/uni-fab.vue +443 -0
- package/{ui-cv/cv-fab/cv-fab.vue.bak → ui-uni/uni-fab/uni-fab.vue.bak} +2 -2
- package/ui-uni/uni-fav/uni-fav.vue +136 -0
- package/{ui-cv/cv-file-picker → ui-uni/uni-file-picker}/choose-and-upload-file.js +0 -0
- package/ui-uni/uni-file-picker/uni-file-picker.vue +614 -0
- package/{ui-cv/cv-file-picker → ui-uni/uni-file-picker}/upload-file.vue +0 -0
- package/{ui-cv/cv-file-picker → ui-uni/uni-file-picker}/upload-image.vue +0 -0
- package/{ui-cv/cv-file-picker → ui-uni/uni-file-picker}/utils.js +0 -0
- package/ui-uni/uni-forms/uni-forms.vue +467 -0
- package/ui-uni/uni-forms/validate.js +486 -0
- package/ui-uni/uni-forms-item/uni-forms-item.vue +500 -0
- package/{ui-cv/cv-goods-nav/cv-goods-nav.vue → ui-uni/uni-goods-nav/uni-goods-nav.vue} +1 -1
- package/ui-uni/uni-grid/uni-grid.vue +141 -0
- package/ui-uni/uni-grid-item/uni-grid-item.vue +123 -0
- package/ui-uni/uni-group/uni-group.vue +123 -0
- package/ui-uni/uni-icons/icons.js +132 -0
- package/ui-uni/uni-icons/uni-icons.vue +72 -0
- package/{ui-cv/cv-icon2 → ui-uni/uni-icons}/uni.ttf +0 -0
- package/ui-uni/uni-indexed-list/uni-indexed-list-item.vue +142 -0
- package/ui-uni/uni-indexed-list/uni-indexed-list.vue +357 -0
- package/ui-uni/uni-link/uni-link.vue +117 -0
- package/ui-uni/uni-list/uni-list.vue +107 -0
- package/ui-uni/uni-list/uni-refresh.vue +65 -0
- package/{ui-cv/cv-list → ui-uni/uni-list}/uni-refresh.wxs +0 -0
- package/ui-uni/uni-list-ad/uni-list-ad.vue +106 -0
- package/{ui-cv/cv-list-chat/cv-list-chat.scss → ui-uni/uni-list-chat/uni-list-chat.scss} +0 -0
- package/{ui-cv/cv-list-chat/cv-list-chat.vue → ui-uni/uni-list-chat/uni-list-chat.vue} +0 -0
- package/ui-uni/uni-list-item/uni-list-item.vue +428 -0
- package/ui-uni/uni-load-more/uni-load-more.vue +366 -0
- package/ui-uni/uni-nav-bar/uni-nav-bar.vue +244 -0
- package/{ui-cv/cv-nav-bar/cv-status-bar.vue → ui-uni/uni-nav-bar/uni-status-bar.vue} +0 -0
- package/ui-uni/uni-notice-bar/uni-notice-bar.vue +394 -0
- package/ui-uni/uni-number-box/uni-number-box.vue +224 -0
- package/ui-uni/uni-pagination/uni-pagination.vue +376 -0
- package/{ui-cv/cv-popup → ui-uni/uni-popup}/keypress.js +0 -0
- package/{ui-cv/cv-popup → ui-uni/uni-popup}/popup.js +0 -0
- package/ui-uni/uni-popup/uni-popup.vue +412 -0
- package/{ui-cv/cv-popup-dialog → ui-uni/uni-popup-dialog}/keypress.js +0 -0
- package/{ui-cv/cv-popup-dialog/cv-popup-dialog.vue → ui-uni/uni-popup-dialog/uni-popup-dialog.vue} +0 -0
- package/ui-uni/uni-popup-message/uni-popup-message.vue +143 -0
- package/{ui-cv/cv-popup-share/cv-popup-share.vue → ui-uni/uni-popup-share/uni-popup-share.vue} +0 -0
- package/ui-uni/uni-rate/uni-rate.vue +357 -0
- package/ui-uni/uni-row/uni-row.vue +155 -0
- package/ui-uni/uni-search-bar/uni-search-bar.vue +262 -0
- package/{ui-cv/cv-section/cv-section.vue → ui-uni/uni-section/uni-section.vue} +0 -0
- package/{ui-cv/cv-segmented-control/cv-segmented-control.vue → ui-uni/uni-segmented-control/uni-segmented-control.vue} +0 -0
- package/{ui-cv/cv-status-bar/cv-status-bar.vue → ui-uni/uni-status-bar/uni-status-bar.vue} +0 -0
- package/ui-uni/uni-steps/uni-steps.vue +250 -0
- package/{ui-cv/cv-swipe-action/cv-swipe-action.vue → ui-uni/uni-swipe-action/uni-swipe-action.vue} +0 -0
- package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/bindingx.js +0 -0
- package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/index.wxs +0 -0
- package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/isPC.js +0 -0
- package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/mpalipay.js +0 -0
- package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/mpother.js +0 -0
- package/{ui-cv/cv-swipe-action-item → ui-uni/uni-swipe-action-item}/mpwxs.js +0 -0
- package/{ui-cv/cv-swipe-action-item/cv-swipe-action-item.vue → ui-uni/uni-swipe-action-item/uni-swipe-action-item.vue} +0 -0
- package/ui-uni/uni-swiper-dot/uni-swiper-dot.vue +205 -0
- package/ui-uni/uni-table/uni-table.vue +455 -0
- package/ui-uni/uni-tag/uni-tag.vue +283 -0
- package/ui-uni/uni-tbody/uni-tbody.vue +30 -0
- package/ui-uni/uni-td/uni-td.vue +88 -0
- package/{ui-cv/cv-test/cv-test.vue → ui-uni/uni-test/uni-test.vue} +0 -0
- package/{ui-cv/cv-th → ui-uni/uni-th}/filter-dropdown.vue +0 -0
- package/ui-uni/uni-th/uni-th.vue +259 -0
- package/ui-uni/uni-thead/uni-thead.vue +114 -0
- package/ui-uni/uni-title/uni-title.vue +171 -0
- package/{ui-cv/cv-tr → ui-uni/uni-tr}/table-checkbox.vue +0 -0
- package/ui-uni/uni-tr/uni-tr.vue +156 -0
- package/{ui-cv/cv-transition → ui-uni/uni-transition}/createAnimation.js +0 -0
- package/ui-uni/uni-transition/uni-transition.vue +287 -0
- package/ui-cv/cv-badge/cv-badge.vue +0 -249
- package/ui-cv/cv-calendar/calendar.js +0 -963
- package/ui-cv/cv-calendar/cv-calendar-item.vue +0 -198
- package/ui-cv/cv-calendar/cv-calendar.vue +0 -508
- package/ui-cv/cv-card/cv-card.vue +0 -427
- package/ui-cv/cv-col/cv-col.vue +0 -2965
- package/ui-cv/cv-collapse/cv-collapse.vue +0 -146
- package/ui-cv/cv-collapse-item/cv-collapse-item.vue +0 -395
- package/ui-cv/cv-combox/cv-combox.vue +0 -250
- package/ui-cv/cv-countdown/cv-countdown.vue +0 -245
- package/ui-cv/cv-data-checkbox/cv-data-checkbox.vue +0 -841
- package/ui-cv/cv-data-indexed-list/cv-data-indexed-list-item.vue +0 -154
- package/ui-cv/cv-data-indexed-list/cv-data-indexed-list.vue +0 -376
- package/ui-cv/cv-data-picker/cv-data-picker.vue +0 -486
- package/ui-cv/cv-data-pickerview/cv-data-pickerview.vue +0 -304
- package/ui-cv/cv-dateformat/cv-dateformat.vue +0 -86
- package/ui-cv/cv-datetime-picker/calendar.vue +0 -761
- package/ui-cv/cv-datetime-picker/cv-datetime-picker.vue +0 -958
- package/ui-cv/cv-datetime-picker/time-picker.vue +0 -907
- package/ui-cv/cv-drawer/cv-drawer.vue +0 -185
- package/ui-cv/cv-drawer/keypress.js +0 -45
- package/ui-cv/cv-easyinput/cv-easyinput.vue +0 -514
- package/ui-cv/cv-fab/cv-fab.vue +0 -465
- package/ui-cv/cv-fav/cv-fav.vue +0 -150
- package/ui-cv/cv-file-picker/cv-file-picker.vue +0 -619
- package/ui-cv/cv-form-base/cv-form-base.vue +0 -470
- package/ui-cv/cv-form-base/validate.js +0 -477
- package/ui-cv/cv-grid-group/cv-grid-group.vue +0 -148
- package/ui-cv/cv-grid-item/cv-grid-item.vue +0 -132
- package/ui-cv/cv-icon2/cv-icon2.vue +0 -78
- package/ui-cv/cv-icon2/icons.js +0 -132
- package/ui-cv/cv-indexed-list/cv-indexed-list-item.vue +0 -154
- package/ui-cv/cv-indexed-list/cv-indexed-list.vue +0 -371
- package/ui-cv/cv-link2/cv-link2.vue +0 -130
- package/ui-cv/cv-list/cv-list.vue +0 -107
- package/ui-cv/cv-list/cv-refresh.vue +0 -65
- package/ui-cv/cv-list-ad/cv-list-ad.vue +0 -113
- package/ui-cv/cv-list-item/cv-list-item.vue +0 -449
- package/ui-cv/cv-nav-bar/cv-nav-bar.vue +0 -256
- package/ui-cv/cv-notice-bar/cv-notice-bar.vue +0 -453
- package/ui-cv/cv-number-box/cv-number-box.vue +0 -223
- package/ui-cv/cv-pagination/cv-pagination.vue +0 -397
- package/ui-cv/cv-popup/cv-popup.vue +0 -429
- package/ui-cv/cv-popup-message/cv-popup-message.vue +0 -143
- package/ui-cv/cv-row/cv-row.vue +0 -157
- package/ui-cv/cv-search-bar/cv-search-bar.vue +0 -280
- package/ui-cv/cv-steps/cv-steps.vue +0 -293
- package/ui-cv/cv-swiper-dot/cv-swiper-dot.vue +0 -255
- package/ui-cv/cv-table/cv-table.vue +0 -460
- package/ui-cv/cv-tag/cv-tag.vue +0 -276
- package/ui-cv/cv-tbody/cv-tbody.vue +0 -28
- package/ui-cv/cv-td/cv-td.vue +0 -93
- package/ui-cv/cv-th/cv-th.vue +0 -270
- package/ui-cv/cv-thead/cv-thead.vue +0 -114
- package/ui-cv/cv-title/cv-title.vue +0 -168
- package/ui-cv/cv-tr/cv-tr.vue +0 -166
- package/ui-cv/cv-transition/cv-transition.vue +0 -279
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="uni-searchbar">
|
|
3
|
+
<view :style="{borderRadius:radius+'px',backgroundColor: bgColor}" class="uni-searchbar__box" @click="searchClick">
|
|
4
|
+
<view class="uni-searchbar__box-icon-search">
|
|
5
|
+
<slot name="searchIcon">
|
|
6
|
+
<uni-icons color="#999999" size="18" type="search" />
|
|
7
|
+
</slot>
|
|
8
|
+
</view>
|
|
9
|
+
<input v-if="show || searchVal" :focus="showSync" :placeholder="placeholder" :maxlength="maxlength" class="uni-searchbar__box-search-input" confirm-type="search" type="text" v-model="searchVal" @confirm="confirm" @blur="blur" @focus="emitFocus" />
|
|
10
|
+
<text v-else class="uni-searchbar__text-placeholder">{{ placeholder }}</text>
|
|
11
|
+
<view v-if="show && (clearButton==='always'||clearButton==='auto'&&searchVal!=='')" class="uni-searchbar__box-icon-clear" @click="clear">
|
|
12
|
+
<slot name="clearIcon">
|
|
13
|
+
<uni-icons color="#c0c4cc" size="15" type="clear" />
|
|
14
|
+
</slot>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
17
|
+
<text @click="cancel" class="uni-searchbar__cancel" v-if="cancelButton ==='always' || show && cancelButton ==='auto'">{{cancelText}}</text>
|
|
18
|
+
</view>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
/**
|
|
23
|
+
* SearchBar 搜索栏
|
|
24
|
+
* @description 评分组件
|
|
25
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=866
|
|
26
|
+
* @property {Number} radius 搜索栏圆角
|
|
27
|
+
* @property {Number} maxlength 输入最大长度
|
|
28
|
+
* @property {String} placeholder 搜索栏Placeholder
|
|
29
|
+
* @property {String} clearButton = [always|auto|none] 是否显示清除按钮
|
|
30
|
+
* @value always 一直显示
|
|
31
|
+
* @value auto 输入框不为空时显示
|
|
32
|
+
* @value none 一直不显示
|
|
33
|
+
* @property {String} cancelButton = [always|auto|none] 是否显示取消按钮
|
|
34
|
+
* @value always 一直显示
|
|
35
|
+
* @value auto 输入框不为空时显示
|
|
36
|
+
* @value none 一直不显示
|
|
37
|
+
* @property {String} cancelText 取消按钮的文字
|
|
38
|
+
* @property {String} bgColor 输入框背景颜色
|
|
39
|
+
* @property {Boolean} focus 是否自动聚焦
|
|
40
|
+
* @event {Function} confirm uniSearchBar 的输入框 confirm 事件,返回参数为uniSearchBar的value,e={value:Number}
|
|
41
|
+
* @event {Function} input uniSearchBar 的 value 改变时触发事件,返回参数为uniSearchBar的value,e=value
|
|
42
|
+
* @event {Function} cancel 点击取消按钮时触发事件,返回参数为uniSearchBar的value,e={value:Number}
|
|
43
|
+
* @event {Function} clear 点击清除按钮时触发事件,返回参数为uniSearchBar的value,e={value:Number}
|
|
44
|
+
* @event {Function} blur input失去焦点时触发事件,返回参数为uniSearchBar的value,e={value:Number}
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
export default {
|
|
48
|
+
name: "UniSearchBar",
|
|
49
|
+
emits: ['input', 'update:modelValue', 'clear', 'cancel', 'confirm', 'blur', 'focus'],
|
|
50
|
+
props: {
|
|
51
|
+
placeholder: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: "请输入搜索内容"
|
|
54
|
+
},
|
|
55
|
+
radius: {
|
|
56
|
+
type: [Number, String],
|
|
57
|
+
default: 5
|
|
58
|
+
},
|
|
59
|
+
clearButton: {
|
|
60
|
+
type: String,
|
|
61
|
+
default: "auto"
|
|
62
|
+
},
|
|
63
|
+
cancelButton: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: "auto"
|
|
66
|
+
},
|
|
67
|
+
cancelText: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: '取消'
|
|
70
|
+
},
|
|
71
|
+
bgColor: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: "#F8F8F8"
|
|
74
|
+
},
|
|
75
|
+
maxlength: {
|
|
76
|
+
type: [Number, String],
|
|
77
|
+
default: 100
|
|
78
|
+
},
|
|
79
|
+
value: {
|
|
80
|
+
type: [Number, String],
|
|
81
|
+
default: ""
|
|
82
|
+
},
|
|
83
|
+
modelValue: {
|
|
84
|
+
type: [Number, String],
|
|
85
|
+
default: ""
|
|
86
|
+
},
|
|
87
|
+
focus: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
data() {
|
|
93
|
+
return {
|
|
94
|
+
show: false,
|
|
95
|
+
showSync: false,
|
|
96
|
+
searchVal: ''
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
watch: {
|
|
100
|
+
value: {
|
|
101
|
+
immediate: true,
|
|
102
|
+
handler(newVal) {
|
|
103
|
+
this.searchVal = newVal
|
|
104
|
+
if (newVal) {
|
|
105
|
+
this.show = true
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
modelValue: {
|
|
110
|
+
immediate: true,
|
|
111
|
+
handler(newVal) {
|
|
112
|
+
this.searchVal = newVal
|
|
113
|
+
if (newVal) {
|
|
114
|
+
this.show = true
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
focus: {
|
|
119
|
+
immediate: true,
|
|
120
|
+
handler(newVal) {
|
|
121
|
+
if (newVal) {
|
|
122
|
+
this.show = true;
|
|
123
|
+
this.$nextTick(() => {
|
|
124
|
+
this.showSync = true
|
|
125
|
+
})
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
searchVal(newVal, oldVal) {
|
|
130
|
+
this.$emit("input", newVal)
|
|
131
|
+
this.$emit("update:modelValue", newVal)
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
methods: {
|
|
135
|
+
searchClick() {
|
|
136
|
+
if (this.show) {
|
|
137
|
+
return
|
|
138
|
+
}
|
|
139
|
+
this.show = true;
|
|
140
|
+
this.$nextTick(() => {
|
|
141
|
+
this.showSync = true
|
|
142
|
+
})
|
|
143
|
+
},
|
|
144
|
+
clear() {
|
|
145
|
+
this.$emit("clear", {
|
|
146
|
+
value: this.searchVal
|
|
147
|
+
})
|
|
148
|
+
this.searchVal = ""
|
|
149
|
+
},
|
|
150
|
+
cancel() {
|
|
151
|
+
this.$emit("cancel", {
|
|
152
|
+
value: this.searchVal
|
|
153
|
+
});
|
|
154
|
+
this.searchVal = ""
|
|
155
|
+
this.show = false
|
|
156
|
+
this.showSync = false
|
|
157
|
+
// #ifndef APP-PLUS
|
|
158
|
+
uni.hideKeyboard()
|
|
159
|
+
// #endif
|
|
160
|
+
// #ifdef APP-PLUS
|
|
161
|
+
plus.key.hideSoftKeybord()
|
|
162
|
+
// #endif
|
|
163
|
+
},
|
|
164
|
+
confirm() {
|
|
165
|
+
// #ifndef APP-PLUS
|
|
166
|
+
uni.hideKeyboard();
|
|
167
|
+
// #endif
|
|
168
|
+
// #ifdef APP-PLUS
|
|
169
|
+
plus.key.hideSoftKeybord()
|
|
170
|
+
// #endif
|
|
171
|
+
this.$emit("confirm", {
|
|
172
|
+
value: this.searchVal
|
|
173
|
+
})
|
|
174
|
+
},
|
|
175
|
+
blur() {
|
|
176
|
+
// #ifndef APP-PLUS
|
|
177
|
+
uni.hideKeyboard();
|
|
178
|
+
// #endif
|
|
179
|
+
// #ifdef APP-PLUS
|
|
180
|
+
plus.key.hideSoftKeybord()
|
|
181
|
+
// #endif
|
|
182
|
+
this.$emit("blur", {
|
|
183
|
+
value: this.searchVal
|
|
184
|
+
})
|
|
185
|
+
},
|
|
186
|
+
emitFocus(e) {
|
|
187
|
+
this.$emit("focus", e.detail)
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
</script>
|
|
192
|
+
|
|
193
|
+
<style scoped>
|
|
194
|
+
.uni-searchbar {
|
|
195
|
+
/* #ifndef APP-NVUE */
|
|
196
|
+
display: flex;
|
|
197
|
+
/* #endif */
|
|
198
|
+
flex-direction: row;
|
|
199
|
+
position: relative;
|
|
200
|
+
padding: 8px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.uni-searchbar__box {
|
|
204
|
+
/* #ifndef APP-NVUE */
|
|
205
|
+
display: flex;
|
|
206
|
+
box-sizing: border-box;
|
|
207
|
+
/* #endif */
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
position: relative;
|
|
210
|
+
flex: 1;
|
|
211
|
+
justify-content: center;
|
|
212
|
+
flex-direction: row;
|
|
213
|
+
align-items: center;
|
|
214
|
+
height: 36px;
|
|
215
|
+
padding: 5px 8px 5px 0px;
|
|
216
|
+
border-width: 0.5px;
|
|
217
|
+
border-style: solid;
|
|
218
|
+
border-color: #e5e5e5;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.uni-searchbar__box-icon-search {
|
|
222
|
+
/* #ifndef APP-NVUE */
|
|
223
|
+
display: flex;
|
|
224
|
+
/* #endif */
|
|
225
|
+
flex-direction: row;
|
|
226
|
+
padding: 0 8px;
|
|
227
|
+
justify-content: center;
|
|
228
|
+
align-items: center;
|
|
229
|
+
color: #808080;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.uni-searchbar__box-search-input {
|
|
233
|
+
flex: 1;
|
|
234
|
+
font-size: 14px;
|
|
235
|
+
color: #333;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.uni-searchbar__box-icon-clear {
|
|
239
|
+
align-items: center;
|
|
240
|
+
line-height: 24px;
|
|
241
|
+
padding-left: 8px;
|
|
242
|
+
/* #ifdef H5 */
|
|
243
|
+
cursor: pointer;
|
|
244
|
+
/* #endif */
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.uni-searchbar__text-placeholder {
|
|
248
|
+
font-size: 14px;
|
|
249
|
+
color: #808080;
|
|
250
|
+
margin-left: 5px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.uni-searchbar__cancel {
|
|
254
|
+
padding-left: 10px;
|
|
255
|
+
line-height: 36px;
|
|
256
|
+
font-size: 14px;
|
|
257
|
+
color: #333;
|
|
258
|
+
/* #ifdef H5 */
|
|
259
|
+
cursor: pointer;
|
|
260
|
+
/* #endif */
|
|
261
|
+
}
|
|
262
|
+
</style>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="uni-steps">
|
|
3
|
+
<view :class="[direction==='column'?'uni-steps__column':'uni-steps__row']">
|
|
4
|
+
<view :class="[direction==='column'?'uni-steps__column-text-container':'uni-steps__row-text-container']">
|
|
5
|
+
<view v-for="(item,index) in options" :key="index" :class="[direction==='column'?'uni-steps__column-text':'uni-steps__row-text']">
|
|
6
|
+
<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-title':'uni-steps__row-title']">{{item.title}}</text>
|
|
7
|
+
<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.desc}}</text>
|
|
8
|
+
</view>
|
|
9
|
+
</view>
|
|
10
|
+
<view :class="[direction==='column'?'uni-steps__column-container':'uni-steps__row-container']">
|
|
11
|
+
<view :class="[direction==='column'?'uni-steps__column-line-item':'uni-steps__row-line-item']" v-for="(item,index) in options" :key="index">
|
|
12
|
+
<view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--before':'uni-steps__row-line--before']" :style="{backgroundColor:index<=active&&index!==0?activeColor:index===0?'transparent':deactiveColor}"></view>
|
|
13
|
+
<view :class="[direction==='column'?'uni-steps__column-check':'uni-steps__row-check']" v-if="index === active">
|
|
14
|
+
<uni-icons :color="activeColor" type="checkbox-filled" size="14"></uni-icons>
|
|
15
|
+
</view>
|
|
16
|
+
<view :class="[direction==='column'?'uni-steps__column-circle':'uni-steps__row-circle']" v-else :style="{backgroundColor:index<active?activeColor:deactiveColor}"></view>
|
|
17
|
+
<view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--after':'uni-steps__row-line--after']" :style="{backgroundColor:index<active&&index!==options.length-1?activeColor:index===options.length-1?'transparent':deactiveColor}"></view>
|
|
18
|
+
</view>
|
|
19
|
+
</view>
|
|
20
|
+
</view>
|
|
21
|
+
</view>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
/**
|
|
26
|
+
* Steps 步骤条
|
|
27
|
+
* @description 评分组件
|
|
28
|
+
* @tutorial https://ext.dcloud.net.cn/plugin?id=34
|
|
29
|
+
* @property {Number} active 当前步骤
|
|
30
|
+
* @property {String} direction = [row|column] 当前步骤
|
|
31
|
+
* @value row 横向
|
|
32
|
+
* @value column 纵向
|
|
33
|
+
* @property {String} activeColor 选中状态的颜色
|
|
34
|
+
* @property {Array} options 数据源,格式为:[{title:'xxx',desc:'xxx'},{title:'xxx',desc:'xxx'}]
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
export default {
|
|
38
|
+
name: 'UniSteps',
|
|
39
|
+
props: {
|
|
40
|
+
direction: {
|
|
41
|
+
// 排列方向 row column
|
|
42
|
+
type: String,
|
|
43
|
+
default: 'row'
|
|
44
|
+
},
|
|
45
|
+
activeColor: {
|
|
46
|
+
// 激活状态颜色
|
|
47
|
+
type: String,
|
|
48
|
+
default: '#1aad19'
|
|
49
|
+
},
|
|
50
|
+
deactiveColor: {
|
|
51
|
+
// 未激活状态颜色
|
|
52
|
+
type: String,
|
|
53
|
+
default: '#999999'
|
|
54
|
+
},
|
|
55
|
+
active: {
|
|
56
|
+
// 当前步骤
|
|
57
|
+
type: Number,
|
|
58
|
+
default: 0
|
|
59
|
+
},
|
|
60
|
+
options: {
|
|
61
|
+
type: Array,
|
|
62
|
+
default () {
|
|
63
|
+
return []
|
|
64
|
+
}
|
|
65
|
+
} // 数据
|
|
66
|
+
},
|
|
67
|
+
data() {
|
|
68
|
+
return {}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style scoped>
|
|
74
|
+
.uni-steps {
|
|
75
|
+
/* #ifndef APP-NVUE */
|
|
76
|
+
display: flex;
|
|
77
|
+
width: 100%;
|
|
78
|
+
/* #endif */
|
|
79
|
+
/* #ifdef APP-NVUE */
|
|
80
|
+
flex: 1;
|
|
81
|
+
/* #endif */
|
|
82
|
+
flex-direction: column;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.uni-steps__row {
|
|
86
|
+
/* #ifndef APP-NVUE */
|
|
87
|
+
display: flex;
|
|
88
|
+
/* #endif */
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.uni-steps__column {
|
|
93
|
+
/* #ifndef APP-NVUE */
|
|
94
|
+
display: flex;
|
|
95
|
+
/* #endif */
|
|
96
|
+
flex-direction: row-reverse;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.uni-steps__row-text-container {
|
|
100
|
+
/* #ifndef APP-NVUE */
|
|
101
|
+
display: flex;
|
|
102
|
+
/* #endif */
|
|
103
|
+
flex-direction: row;
|
|
104
|
+
align-items: flex-end;
|
|
105
|
+
margin-bottom: 8px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.uni-steps__column-text-container {
|
|
109
|
+
/* #ifndef APP-NVUE */
|
|
110
|
+
display: flex;
|
|
111
|
+
/* #endif */
|
|
112
|
+
flex-direction: column;
|
|
113
|
+
flex: 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.uni-steps__row-text {
|
|
117
|
+
/* #ifndef APP-NVUE */
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
/* #endif */
|
|
120
|
+
flex: 1;
|
|
121
|
+
flex-direction: column;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.uni-steps__column-text {
|
|
125
|
+
padding: 6px 0px;
|
|
126
|
+
border-bottom-style: solid;
|
|
127
|
+
border-bottom-width: 1px;
|
|
128
|
+
border-bottom-color: #e5e5e5;
|
|
129
|
+
/* #ifndef APP-NVUE */
|
|
130
|
+
display: flex;
|
|
131
|
+
/* #endif */
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.uni-steps__row-title {
|
|
136
|
+
font-size: 14px;
|
|
137
|
+
line-height: 16px;
|
|
138
|
+
text-align: center;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.uni-steps__column-title {
|
|
142
|
+
font-size: 14px;
|
|
143
|
+
text-align: left;
|
|
144
|
+
line-height: 18px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.uni-steps__row-desc {
|
|
148
|
+
font-size: 12px;
|
|
149
|
+
line-height: 14px;
|
|
150
|
+
text-align: center;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.uni-steps__column-desc {
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
text-align: left;
|
|
156
|
+
line-height: 18px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.uni-steps__row-container {
|
|
160
|
+
/* #ifndef APP-NVUE */
|
|
161
|
+
display: flex;
|
|
162
|
+
/* #endif */
|
|
163
|
+
flex-direction: row;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.uni-steps__column-container {
|
|
167
|
+
/* #ifndef APP-NVUE */
|
|
168
|
+
display: inline-flex;
|
|
169
|
+
/* #endif */
|
|
170
|
+
width: 30px;
|
|
171
|
+
flex-direction: column;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.uni-steps__row-line-item {
|
|
175
|
+
/* #ifndef APP-NVUE */
|
|
176
|
+
display: inline-flex;
|
|
177
|
+
/* #endif */
|
|
178
|
+
flex-direction: row;
|
|
179
|
+
flex: 1;
|
|
180
|
+
height: 14px;
|
|
181
|
+
line-height: 14px;
|
|
182
|
+
align-items: center;
|
|
183
|
+
justify-content: center;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.uni-steps__column-line-item {
|
|
187
|
+
/* #ifndef APP-NVUE */
|
|
188
|
+
display: flex;
|
|
189
|
+
/* #endif */
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
flex: 1;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.uni-steps__row-line {
|
|
197
|
+
flex: 1;
|
|
198
|
+
height: 1px;
|
|
199
|
+
background-color: #999;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.uni-steps__column-line {
|
|
203
|
+
width: 1px;
|
|
204
|
+
background-color: #999;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.uni-steps__row-line--after {
|
|
208
|
+
transform: translateX(1px);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.uni-steps__column-line--after {
|
|
212
|
+
flex: 1;
|
|
213
|
+
transform: translate(0px, 1px);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.uni-steps__row-line--before {
|
|
217
|
+
transform: translateX(-1px);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.uni-steps__column-line--before {
|
|
221
|
+
height: 6px;
|
|
222
|
+
transform: translate(0px, -1px);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.uni-steps__row-circle {
|
|
226
|
+
width: 5px;
|
|
227
|
+
height: 5px;
|
|
228
|
+
border-radius: 100px;
|
|
229
|
+
background-color: #999;
|
|
230
|
+
margin: 0px 3px;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.uni-steps__column-circle {
|
|
234
|
+
width: 5px;
|
|
235
|
+
height: 5px;
|
|
236
|
+
border-radius: 100px;
|
|
237
|
+
background-color: #999;
|
|
238
|
+
margin: 4px 0px 5px 0px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.uni-steps__row-check {
|
|
242
|
+
margin: 0px 6px;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.uni-steps__column-check {
|
|
246
|
+
height: 14px;
|
|
247
|
+
line-height: 14px;
|
|
248
|
+
margin: 2px 0px;
|
|
249
|
+
}
|
|
250
|
+
</style>
|
package/{ui-cv/cv-swipe-action/cv-swipe-action.vue → ui-uni/uni-swipe-action/uni-swipe-action.vue}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|