fusions-ui 1.2.4 → 1.2.7
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/components/fu-avatar/fu-avatar.vue +4 -2
- package/components/fu-avatar/props.js +52 -15
- package/components/fu-avatar-group/fu-avatar-group.vue +3 -2
- package/components/fu-avatar-group/props.js +31 -9
- package/components/fu-badge/fu-badge.vue +8 -14
- package/components/fu-badge/props.js +56 -16
- package/components/fu-banner-arc/fu-banner-arc.vue +4 -5
- package/components/fu-banner-arc/props.js +15 -4
- package/components/fu-button/fu-button.vue +18 -20
- package/components/fu-button/props.js +108 -35
- package/components/fu-cell/fu-cell.vue +9 -8
- package/components/fu-cell-group/fu-cell-group.vue +2 -1
- package/components/fu-cell-group/props.js +7 -2
- package/components/fu-checkbox/fu-checkbox.vue +5 -4
- package/components/fu-checkbox/props.js +51 -14
- package/components/fu-code-input/fu-code-input.vue +10 -6
- package/components/fu-code-input/props.js +66 -17
- package/components/fu-code-verify/fu-code-verify.vue +9 -5
- package/components/fu-code-verify/props.js +64 -17
- package/components/fu-collapse/fu-collapse.vue +10 -3
- package/components/fu-collapse/props.js +9 -3
- package/components/fu-collapse-item/fu-collapse-item.vue +45 -31
- package/components/fu-collapse-item/props.js +49 -16
- package/components/fu-countdown/fu-countdown.vue +2 -1
- package/components/fu-countdown/props.js +15 -4
- package/components/fu-datetime-picker/fu-datetime-picker.vue +6 -5
- package/components/fu-datetime-picker/props.js +91 -25
- package/components/fu-form/fu-form.vue +2 -1
- package/components/fu-form/props.js +34 -6
- package/components/fu-form-item/fu-form-item.vue +26 -33
- package/components/fu-form-item/props.js +30 -8
- package/components/fu-grid/fu-grid.vue +16 -17
- package/components/fu-grid/props.js +20 -5
- package/components/fu-grid-item/fu-grid-item.vue +31 -35
- package/components/fu-grid-item/props.js +11 -3
- package/components/fu-icon/fu-icon.vue +110 -0
- package/components/fu-icon/fuicon.css +584 -0
- package/components/{fu-icons/icons.js → fu-icon/fuicon.js} +1031 -1031
- package/components/{fu-icons/fuicons.ttf → fu-icon/fuicon.ttf} +0 -0
- package/components/fu-icon/props.js +55 -0
- package/components/fu-image/fu-image.vue +15 -10
- package/components/fu-image/props.js +69 -18
- package/components/fu-index-anchor/fu-index-anchor.vue +6 -5
- package/components/fu-index-anchor/props.js +20 -6
- package/components/fu-index-item/fu-index-item.vue +4 -4
- package/components/fu-index-list/fu-index-list.vue +9 -9
- package/components/fu-index-list/props.js +19 -6
- package/components/fu-input/fu-input.vue +54 -68
- package/components/fu-input/props.js +145 -53
- package/components/fu-keyboard/fu-keyboard.vue +19 -9
- package/components/fu-keyboard/keyboard-car.vue +33 -22
- package/components/fu-keyboard/keyboard-number.vue +17 -9
- package/components/fu-keyboard/props.js +66 -17
- package/components/fu-line/fu-line.vue +17 -13
- package/components/fu-line/props.js +30 -5
- package/components/fu-link/fu-link.vue +14 -8
- package/components/fu-link/props.js +22 -7
- package/components/fu-loading/fu-loading.vue +32 -27
- package/components/fu-loading/props.js +28 -8
- package/components/fu-loading-more/fu-loading-more.vue +19 -23
- package/components/fu-loading-more/props.js +27 -13
- package/components/fu-modal/fu-modal.vue +11 -6
- package/components/fu-modal/props.js +61 -17
- package/components/{fu-nav-bar/fu-nav-bar.vue → fu-navbar/fu-navbar.vue} +37 -44
- package/components/fu-notice-bar/fu-notice-bar.vue +10 -8
- package/components/fu-notice-bar/notice-column.vue +187 -122
- package/components/fu-notice-bar/notice-row.vue +85 -28
- package/components/fu-notice-bar/props.js +83 -22
- package/components/fu-number-box/fu-number-box.vue +26 -28
- package/components/fu-number-box/props.js +37 -11
- package/components/fu-parse/fu-parse.vue +0 -1
- package/components/fu-picker/fu-picker.vue +22 -17
- package/components/fu-picker/props.js +70 -19
- package/components/fu-popup/fu-popup.vue +38 -43
- package/components/fu-popup/props.js +34 -9
- package/components/fu-progress/fu-progress.vue +3 -2
- package/components/fu-progress/props.js +36 -9
- package/components/fu-rate/fu-rate.vue +40 -32
- package/components/fu-rate/props.js +47 -13
- package/components/fu-read-more/fu-read-more.vue +19 -14
- package/components/fu-read-more/props.js +68 -46
- package/components/fu-ribbon/fu-ribbon.vue +8 -7
- package/components/fu-ribbon/props.js +15 -4
- package/components/fu-scroll-list/fu-scroll-list.vue +18 -34
- package/components/fu-scroll-list/props.js +19 -10
- package/components/fu-search/fu-search.vue +13 -18
- package/components/fu-search/props.js +69 -17
- package/components/fu-section/fu-section.vue +19 -22
- package/components/fu-section/props.js +30 -4
- package/components/fu-sign-board/fu-sign-board.vue +34 -17
- package/components/fu-sign-board/props.js +15 -5
- package/components/fu-skeleton/fu-skeleton.vue +8 -12
- package/components/fu-skeleton/props.js +15 -4
- package/components/fu-steps/fu-steps.vue +3 -2
- package/components/fu-steps/props.js +23 -7
- package/components/fu-steps-item/fu-steps-item.vue +3 -3
- package/components/fu-steps-item/props.js +15 -5
- package/components/fu-sticky/fu-sticky.vue +3 -3
- package/components/fu-sticky/props.js +21 -7
- package/components/fu-subsection/fu-subsection.vue +29 -22
- package/components/fu-subsection/props.js +40 -10
- package/components/fu-swipe-action-item/bindingx.js +1 -1
- package/components/fu-swipe-action-item/fu-swipe-action-item.vue +134 -123
- package/components/fu-swipe-action-item/mpwxs.js +1 -1
- package/components/fu-swipe-action-item/props.js +22 -6
- package/components/fu-swiper/fu-swiper.vue +29 -27
- package/components/fu-swiper/props.js +81 -25
- package/components/fu-switch/fu-switch.vue +20 -12
- package/components/fu-switch/props.js +48 -13
- package/components/fu-tabs/fu-tabs.vue +36 -33
- package/components/fu-tabs/props.js +46 -13
- package/components/fu-tag/fu-tag.vue +24 -21
- package/components/fu-tag/props.js +63 -17
- package/components/fu-text/fu-text.vue +72 -33
- package/components/fu-text/props.js +85 -27
- package/components/fu-text/value.js +6 -6
- package/components/fu-textarea/fu-textarea.vue +13 -17
- package/components/fu-textarea/props.js +103 -30
- package/components/fu-timeaxis/fu-timeaxis.vue +1 -1
- package/components/fu-timeaxis-item/fu-timeaxis-item.vue +8 -4
- package/components/fu-transition/fu-transition.vue +48 -49
- package/components/fu-transition/props.js +21 -0
- package/components/fu-upload/fu-upload.vue +3 -1
- package/components/fu-upload/props.js +67 -19
- package/components/fu-upload/upload-file.vue +31 -18
- package/components/fu-upload/upload-image.vue +37 -19
- package/components/fu-vtabs/fu-vtabs.vue +6 -4
- package/components/fu-vtabs/props.js +50 -15
- package/components/fu-waterfall/fu-waterfall.vue +11 -9
- package/components/fu-waterfall/props.js +37 -15
- package/index.js +17 -24
- package/index.scss +9 -7
- package/libs/config/config.js +16 -9
- package/libs/function/applyEven.js +9 -9
- package/libs/function/check.js +81 -89
- package/libs/function/{index.js → common.js} +5 -5
- package/libs/function/message.js +0 -27
- package/libs/mixin/mixin.js +26 -21
- package/libs/{utils/min.router.config.js → route/min.route.config.js} +7 -7
- package/libs/{utils/router.config.js → route/route.config.js} +10 -11
- package/libs/{css/main.scss → style/common.scss} +50 -87
- package/libs/style/style.h5.scss +8 -0
- package/libs/style/style.mp.scss +15 -0
- package/package.json +1 -1
- package/components/fu-calendar/calendar-item.vue +0 -214
- package/components/fu-calendar/calendar.js +0 -546
- package/components/fu-calendar/fu-calendar.vue +0 -536
- package/components/fu-calendar/i18n/en.json +0 -12
- package/components/fu-calendar/i18n/index.js +0 -8
- package/components/fu-calendar/i18n/zh-Hans.json +0 -12
- package/components/fu-calendar/i18n/zh-Hant.json +0 -12
- package/components/fu-calendar/util.js +0 -360
- package/components/fu-date-picker/calendar-item.vue +0 -177
- package/components/fu-date-picker/calendar.vue +0 -917
- package/components/fu-date-picker/fu-date-picker.vue +0 -1069
- package/components/fu-date-picker/i18n/en.json +0 -22
- package/components/fu-date-picker/i18n/index.js +0 -8
- package/components/fu-date-picker/i18n/zh-Hans.json +0 -22
- package/components/fu-date-picker/i18n/zh-Hant.json +0 -22
- package/components/fu-date-picker/props.js +0 -68
- package/components/fu-date-picker/time-picker.vue +0 -924
- package/components/fu-date-picker/util.js +0 -419
- package/components/fu-icons/fu-icons.vue +0 -102
- package/components/fu-icons/fuicons.css +0 -585
- package/components/fu-landscape/fu-landscape.vue +0 -167
- package/components/fu-landscape/props.js +0 -64
- package/components/fu-tabbar/fu-tabbar.vue +0 -333
- package/components/fu-tabbar/props.js +0 -78
- package/libs/css/style.h5.scss +0 -35
- package/libs/css/style.mp.scss +0 -50
- package/libs/utils/util.js +0 -58
- /package/components/{fu-nav-bar → fu-navbar}/props.js +0 -0
- /package/components/{fu-nav-bar → fu-navbar}/status-bar.vue +0 -0
- /package/{components/fu-datetime-picker → libs/function}/dayjs.js +0 -0
- /package/libs/{css → style}/color.scss +0 -0
- /package/libs/{css/component.scss → style/components.scss} +0 -0
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<!-- #endif -->
|
|
29
29
|
|
|
30
30
|
<!-- 指示灯 -->
|
|
31
|
-
<view class="fu-scroll-list__indicator"
|
|
31
|
+
<view class="fu-scroll-list__indicator" v-show="indicator">
|
|
32
32
|
<view class="fu-scroll-list__indicator__line" :style="[lineStyle]">
|
|
33
33
|
<view ref="fu-scroll-list__indicator__line__bar" class="fu-scroll-list__indicator__line__bar" :style="[barStyle]"></view>
|
|
34
34
|
</view>
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
* @property {Boolean} indicator = [true|false] 是否显示面板指示器 (默认 true )
|
|
54
54
|
* @property {String} indicatorColor 指示器非激活颜色 (默认 '#f2f2f2' )
|
|
55
55
|
* @property {String} indicatorActiveColor 指示器的激活颜色(默认 '#2979ff')
|
|
56
|
-
* @property {String,Object} indicatorStyle 指示器样式,可通过bottom,left,right进行定位
|
|
57
56
|
*/
|
|
58
57
|
export default {
|
|
59
58
|
name:"FuScrollList",
|
|
@@ -75,31 +74,28 @@
|
|
|
75
74
|
computed: {
|
|
76
75
|
// 指示器为线型的样式
|
|
77
76
|
barStyle() {
|
|
78
|
-
const style = {}
|
|
77
|
+
const style = {};
|
|
79
78
|
// #ifndef APP-NVUE || MP-WEIXIN || H5 || APP-VUE || MP-QQ
|
|
80
79
|
// 此为普通js方案,只有在非nvue和不支持wxs方案的端才使用、
|
|
81
80
|
// 此处的计算理由为:scroll-view的滚动距离与目标滚动距离(scroll-view的实际宽度减去包裹元素的宽度)之比,等于滑块当前移动距离与总需
|
|
82
81
|
// 滑动距离(指示器的总宽度减去滑块宽度)的比值
|
|
83
82
|
const scrollLeft = this.scrollInfo.scrollLeft,
|
|
84
83
|
scrollWidth = this.scrollInfo.scrollWidth,
|
|
85
|
-
barAllMoveWidth = this.indicatorWidth - this.indicatorBarWidth
|
|
86
|
-
const x = scrollLeft / (scrollWidth - this.scrollWidth) * barAllMoveWidth
|
|
87
|
-
style.transform = `translateX(${ x }px)
|
|
84
|
+
barAllMoveWidth = this.indicatorWidth - this.indicatorBarWidth;
|
|
85
|
+
const x = scrollLeft / (scrollWidth - this.scrollWidth) * barAllMoveWidth;
|
|
86
|
+
style.transform = `translateX(${ x }px)`;
|
|
88
87
|
// #endif
|
|
89
88
|
// 设置滑块的宽度和背景色,是每个平台都需要的
|
|
90
|
-
style.width = this.$fu.addUnit(this.indicatorBarWidth)
|
|
89
|
+
style.width = this.$fu.addUnit(this.indicatorBarWidth);
|
|
91
90
|
style.backgroundColor = this.indicatorActiveColor;
|
|
92
91
|
return style
|
|
93
92
|
},
|
|
93
|
+
// 指示器整体的样式,需要设置其宽度和背景色
|
|
94
94
|
lineStyle() {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return style
|
|
100
|
-
},
|
|
101
|
-
ledStyle() {
|
|
102
|
-
return this.$fu.addStyle(this.indicatorStyle)
|
|
95
|
+
return {
|
|
96
|
+
width: this.$fu.addUnit(this.indicatorWidth),
|
|
97
|
+
backgroundColor: this.indicatorColor
|
|
98
|
+
}
|
|
103
99
|
}
|
|
104
100
|
},
|
|
105
101
|
mounted() {
|
|
@@ -161,36 +157,22 @@
|
|
|
161
157
|
</script>
|
|
162
158
|
|
|
163
159
|
<style lang="scss" scoped>
|
|
164
|
-
@import '../../libs/
|
|
160
|
+
@import '../../libs/style/components.scss';
|
|
161
|
+
@import '../../libs/style/color.scss';
|
|
165
162
|
|
|
166
163
|
.fu-scroll-list {
|
|
167
164
|
padding-bottom: 10px;
|
|
168
165
|
|
|
169
166
|
&__scroll-view {
|
|
170
|
-
|
|
171
|
-
display: flex;
|
|
172
|
-
/* #endif */
|
|
173
|
-
/* #ifdef APP-NVUE */
|
|
174
|
-
flex-direction: row;
|
|
175
|
-
/* #endif */
|
|
167
|
+
@include flex(row);
|
|
176
168
|
|
|
177
169
|
&__content {
|
|
178
|
-
|
|
179
|
-
display: flex;
|
|
180
|
-
/* #endif */
|
|
181
|
-
/* #ifdef APP-NVUE */
|
|
182
|
-
flex-direction: row;
|
|
183
|
-
/* #endif */
|
|
170
|
+
@include flex(row);
|
|
184
171
|
}
|
|
185
172
|
}
|
|
186
173
|
|
|
187
174
|
&__indicator {
|
|
188
|
-
|
|
189
|
-
display: flex;
|
|
190
|
-
/* #endif */
|
|
191
|
-
/* #ifdef APP-NVUE */
|
|
192
|
-
flex-direction: row;
|
|
193
|
-
/* #endif */
|
|
175
|
+
@include flex(row);
|
|
194
176
|
justify-content: center;
|
|
195
177
|
margin-top: 15px;
|
|
196
178
|
|
|
@@ -198,7 +180,9 @@
|
|
|
198
180
|
width: 60px;
|
|
199
181
|
height: 4px;
|
|
200
182
|
border-radius: 100px;
|
|
183
|
+
/* #ifndef APP-NVUE */
|
|
201
184
|
overflow: hidden;
|
|
185
|
+
/* #endif */
|
|
202
186
|
|
|
203
187
|
&__bar {
|
|
204
188
|
width: 20px;
|
|
@@ -1,34 +1,43 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* @description 指示器的整体宽度
|
|
5
|
+
* @default 50
|
|
6
|
+
*/
|
|
4
7
|
indicatorWidth: {
|
|
5
8
|
type: [String, Number],
|
|
6
9
|
default: 50
|
|
7
10
|
},
|
|
8
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @description 滑块的宽度
|
|
13
|
+
* @default 20
|
|
14
|
+
*/
|
|
9
15
|
indicatorBarWidth: {
|
|
10
16
|
type: [String, Number],
|
|
11
17
|
default: 20
|
|
12
18
|
},
|
|
13
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @description 是否显示面板指示器
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
14
23
|
indicator: {
|
|
15
24
|
type: Boolean,
|
|
16
25
|
default: true
|
|
17
26
|
},
|
|
18
|
-
|
|
27
|
+
/**
|
|
28
|
+
* @description 指示器非激活颜色
|
|
29
|
+
* @default '#f2f2f2'
|
|
30
|
+
*/
|
|
19
31
|
indicatorColor: {
|
|
20
32
|
type: String,
|
|
21
33
|
default: '#f2f2f2'
|
|
22
34
|
},
|
|
23
|
-
|
|
35
|
+
/**
|
|
36
|
+
* @description 指示器的激活颜色
|
|
37
|
+
*/
|
|
24
38
|
indicatorActiveColor: {
|
|
25
39
|
type: String,
|
|
26
40
|
default: ''
|
|
27
|
-
},
|
|
28
|
-
// 指示器样式,可通过bottom,left,right进行定位
|
|
29
|
-
indicatorStyle: {
|
|
30
|
-
type: [String, Object],
|
|
31
|
-
default: 'bottom'
|
|
32
41
|
}
|
|
33
42
|
}
|
|
34
43
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<view class="fu-search__box" :style="[searchStyle]" @click="searchClick">
|
|
4
4
|
<view class="fu-search__box__icon-search">
|
|
5
5
|
<slot name="searchIcon">
|
|
6
|
-
<fu-
|
|
6
|
+
<fu-icon :name="searchIcon" :color="searchIconColor" :size="searchIconSize" />
|
|
7
7
|
</slot>
|
|
8
8
|
</view>
|
|
9
9
|
<input
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<text class="fu-search__text-placeholder" :style="[inputStyle]" v-else>{{ placeholder }}</text>
|
|
30
30
|
<view class="fu-search__box__icon-clear" v-if="show && (clearabled === 'always' || clearabled==='auto' && searchValue !=='') && !readonly" @click="clear">
|
|
31
31
|
<slot name="clearIcon">
|
|
32
|
-
<fu-
|
|
32
|
+
<fu-icon name="close-fill" color="#c0c4cc" size="20" />
|
|
33
33
|
</slot>
|
|
34
34
|
</view>
|
|
35
35
|
</view>
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
* @value right 右对齐
|
|
70
70
|
* @property {String,Number} height 高度(默认 36)
|
|
71
71
|
* @property {String} color 输入框字体颜色
|
|
72
|
+
*
|
|
72
73
|
* @event {Function} confirm fuSearch 的输入框 confirm 事件,返回参数为fuSearch的value,e={value:Number}
|
|
73
74
|
* @event {Function} input fuSearch 的 value 改变时触发事件,返回参数为fuSearch的value,e=value
|
|
74
75
|
* @event {Function} clear 点击清除按钮时触发事件,返回参数为fuSearch的value,e={value:Number}
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
* @event {Function} focus input聚焦时触发事件
|
|
77
78
|
* @event {Function} custom 用户点击右侧控件时触发
|
|
78
79
|
* @event {Function} click readonly为true时,点击输入框,发出此事件,用于跳转搜索页
|
|
80
|
+
* @example <fu-search></fu-search>
|
|
79
81
|
*/
|
|
80
82
|
export default {
|
|
81
83
|
name:"FuSearch",
|
|
@@ -122,7 +124,7 @@
|
|
|
122
124
|
this.$emit("clear", {
|
|
123
125
|
value: this.searchValue
|
|
124
126
|
})
|
|
125
|
-
this.searchValue = ""
|
|
127
|
+
this.searchValue = "";
|
|
126
128
|
},
|
|
127
129
|
|
|
128
130
|
// 点击右边自定义按钮的事件
|
|
@@ -131,8 +133,8 @@
|
|
|
131
133
|
this.$emit("custom", {
|
|
132
134
|
value: this.searchValue
|
|
133
135
|
});
|
|
134
|
-
this.show = false
|
|
135
|
-
this.showFocus = false
|
|
136
|
+
this.show = false;
|
|
137
|
+
this.showFocus = false;
|
|
136
138
|
// #ifndef APP-PLUS
|
|
137
139
|
uni.hideKeyboard()
|
|
138
140
|
// #endif
|
|
@@ -215,33 +217,29 @@
|
|
|
215
217
|
</script>
|
|
216
218
|
|
|
217
219
|
<style lang="scss" scoped>
|
|
220
|
+
@import '../../libs/style/components.scss';
|
|
218
221
|
$fu-search-height: 36px;
|
|
219
222
|
|
|
220
223
|
.fu-search {
|
|
224
|
+
@include flex(row);
|
|
221
225
|
flex: 1;
|
|
222
|
-
display: flex;
|
|
223
|
-
flex-direction: row;
|
|
224
226
|
position: relative;
|
|
225
227
|
align-items: center;
|
|
226
228
|
|
|
227
229
|
&__box {
|
|
230
|
+
@include flex(row);
|
|
228
231
|
/* #ifndef APP-NVUE */
|
|
229
|
-
display: flex;
|
|
230
232
|
box-sizing: border-box;
|
|
231
|
-
/* #endif */
|
|
232
233
|
overflow: hidden;
|
|
234
|
+
/* #endif */
|
|
233
235
|
position: relative;
|
|
234
236
|
flex: 1;
|
|
235
237
|
justify-content: center;
|
|
236
|
-
flex-direction: row;
|
|
237
238
|
align-items: center;
|
|
238
239
|
height: $fu-search-height;
|
|
239
240
|
|
|
240
241
|
&__icon-search {
|
|
241
|
-
|
|
242
|
-
display: flex;
|
|
243
|
-
/* #endif */
|
|
244
|
-
flex-direction: row;
|
|
242
|
+
@include flex(row);
|
|
245
243
|
padding: 0 8px;
|
|
246
244
|
justify-content: center;
|
|
247
245
|
align-items: center;
|
|
@@ -255,10 +253,7 @@
|
|
|
255
253
|
}
|
|
256
254
|
|
|
257
255
|
&__icon-clear {
|
|
258
|
-
|
|
259
|
-
display: flex;
|
|
260
|
-
/* #endif */
|
|
261
|
-
flex-direction: row;
|
|
256
|
+
@include flex(row);
|
|
262
257
|
align-items: center;
|
|
263
258
|
padding: 0 8px;
|
|
264
259
|
/* #ifdef H5 */
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
+
/**
|
|
4
|
+
* @description value / v-model 输入框初始值
|
|
5
|
+
*/
|
|
3
6
|
value: {
|
|
4
7
|
type: [String,Number],
|
|
5
8
|
default: ""
|
|
@@ -8,87 +11,136 @@ export default {
|
|
|
8
11
|
type: [String,Number],
|
|
9
12
|
default: ""
|
|
10
13
|
},
|
|
11
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @description 占位提示文字
|
|
16
|
+
* @default '搜索关键词'
|
|
17
|
+
*/
|
|
12
18
|
placeholder: {
|
|
13
19
|
type: String,
|
|
14
20
|
default: "搜索关键词"
|
|
15
21
|
},
|
|
16
|
-
|
|
22
|
+
/**
|
|
23
|
+
* @description 搜索栏圆角
|
|
24
|
+
* @default 5
|
|
25
|
+
*/
|
|
17
26
|
radius: {
|
|
18
27
|
type: [String,Number],
|
|
19
28
|
default: 5
|
|
20
29
|
},
|
|
21
|
-
|
|
30
|
+
/**
|
|
31
|
+
* @description 输入最大长度
|
|
32
|
+
* @default 150
|
|
33
|
+
*/
|
|
22
34
|
maxlength: {
|
|
23
35
|
type: [String,Number],
|
|
24
36
|
default: 150
|
|
25
37
|
},
|
|
26
|
-
|
|
38
|
+
/**
|
|
39
|
+
* @description 是否显示清除按钮
|
|
40
|
+
* @values 'always' - 一直显示, 'auto' - 输入框不为空时显示, 'none' - 一直不显示
|
|
41
|
+
* @default 'auto'
|
|
42
|
+
*/
|
|
27
43
|
clearabled: {
|
|
28
44
|
type: String,
|
|
29
45
|
default: "auto"
|
|
30
46
|
},
|
|
31
|
-
|
|
47
|
+
/**
|
|
48
|
+
* @description 输入框背景颜色
|
|
49
|
+
* @default '#F8F8F8'
|
|
50
|
+
*/
|
|
32
51
|
bgColor: {
|
|
33
52
|
type: String,
|
|
34
53
|
default: '#F8F8F8'
|
|
35
54
|
},
|
|
36
|
-
|
|
55
|
+
/**
|
|
56
|
+
* @description 是否自动聚焦
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
37
59
|
focus: {
|
|
38
60
|
type: Boolean,
|
|
39
61
|
default: false
|
|
40
62
|
},
|
|
41
|
-
|
|
63
|
+
/**
|
|
64
|
+
* @description 只读,不能有任何操作,只做展示
|
|
65
|
+
* @default false
|
|
66
|
+
*/
|
|
42
67
|
readonly: {
|
|
43
68
|
type: Boolean,
|
|
44
69
|
default: false
|
|
45
70
|
},
|
|
46
|
-
|
|
71
|
+
/**
|
|
72
|
+
* @description 是否显示右侧控件
|
|
73
|
+
* @default true
|
|
74
|
+
*/
|
|
47
75
|
showAction: {
|
|
48
76
|
type: Boolean,
|
|
49
77
|
default: true
|
|
50
78
|
},
|
|
51
|
-
|
|
79
|
+
/**
|
|
80
|
+
* @description 右侧控件的样式,对象形式
|
|
81
|
+
*/
|
|
52
82
|
actionStyle: {
|
|
53
83
|
type: Object,
|
|
54
84
|
default: () => ({})
|
|
55
85
|
},
|
|
56
|
-
|
|
86
|
+
/**
|
|
87
|
+
* @description 右侧控件文字
|
|
88
|
+
* @default '搜索'
|
|
89
|
+
*/
|
|
57
90
|
actionText: {
|
|
58
91
|
type: String,
|
|
59
92
|
default: '搜索'
|
|
60
93
|
},
|
|
61
|
-
|
|
94
|
+
/**
|
|
95
|
+
* @description input输入框的样式,可以定义文字颜色,大小等,对象形式
|
|
96
|
+
*/
|
|
62
97
|
inputStyle: {
|
|
63
98
|
type: [String,Object],
|
|
64
99
|
default: () => ({})
|
|
65
100
|
},
|
|
66
|
-
|
|
101
|
+
/**
|
|
102
|
+
* @description 左边的图标,可以为Icon图标名称
|
|
103
|
+
* @default 'magnifier'
|
|
104
|
+
*/
|
|
67
105
|
searchIcon: {
|
|
68
106
|
type: String,
|
|
69
107
|
default: 'magnifier'
|
|
70
108
|
},
|
|
71
|
-
|
|
109
|
+
/**
|
|
110
|
+
* @description 左边的图标大小
|
|
111
|
+
* @default 18
|
|
112
|
+
*/
|
|
72
113
|
searchIconSize: {
|
|
73
114
|
type: [String,Number],
|
|
74
115
|
default: 18
|
|
75
116
|
},
|
|
76
|
-
|
|
117
|
+
/**
|
|
118
|
+
* @description 左边图标的颜色
|
|
119
|
+
* @default '#c0c4cc'
|
|
120
|
+
*/
|
|
77
121
|
searchIconColor: {
|
|
78
122
|
type: String,
|
|
79
123
|
default: '#c0c4cc'
|
|
80
124
|
},
|
|
81
|
-
|
|
125
|
+
/**
|
|
126
|
+
* @description 输入框对齐方式
|
|
127
|
+
* @default 'center'
|
|
128
|
+
*/
|
|
82
129
|
inputAlign: {
|
|
83
130
|
type: String,
|
|
84
131
|
default: 'center'
|
|
85
132
|
},
|
|
86
|
-
|
|
133
|
+
/**
|
|
134
|
+
* @description 设置高度
|
|
135
|
+
* @default 36
|
|
136
|
+
*/
|
|
87
137
|
height: {
|
|
88
138
|
type: [String,Number],
|
|
89
139
|
default: 36
|
|
90
140
|
},
|
|
91
|
-
|
|
141
|
+
/**
|
|
142
|
+
* @description 输入框字体颜色
|
|
143
|
+
*/
|
|
92
144
|
color: {
|
|
93
145
|
type: String,
|
|
94
146
|
default: ''
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="fu-section" :class="customClass" :style="[customStyle]">
|
|
3
|
-
<view class="fu-section-header" @click="
|
|
2
|
+
<view class="fu-section" :class="customClass" :style="[$fu.addStyle(customStyle)]">
|
|
3
|
+
<view class="fu-section-header" @click="handleClick">
|
|
4
4
|
<view class="fu-section-header__decoration" :class="mode" v-if="mode" />
|
|
5
5
|
<slot v-else name="decoration"></slot>
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<text class="fu-section__content-title"
|
|
9
9
|
:class="{'distraction': !subTitle}"
|
|
10
10
|
:style="{'font-size': $fu.addUnit(titleSize), 'color': titleColor}">{{ title }}</text>
|
|
11
|
-
<text class="fu-section-header__content-sub" :style="{
|
|
11
|
+
<text class="fu-section-header__content-sub" :style="{fontSize: $fu.addUnit(subTitleSize), color: subTitleColor}" v-if="subTitle">{{ subTitle }}</text>
|
|
12
12
|
</view>
|
|
13
13
|
|
|
14
14
|
<view class="fu-section-header__slot-right">
|
|
@@ -34,44 +34,44 @@
|
|
|
34
34
|
* @value circle 圆形
|
|
35
35
|
* @value square 正方形
|
|
36
36
|
* @property {String} title 主标题
|
|
37
|
-
* @property {String} titleSize 主标题字体大小
|
|
37
|
+
* @property {String,Number} titleSize 主标题字体大小
|
|
38
38
|
* @property {String} titleColor 主标题字体颜色
|
|
39
39
|
* @property {String} subTitle 副标题
|
|
40
|
-
* @property {String} subTitleSize 副标题字体大小
|
|
40
|
+
* @property {String,Number} subTitleSize 副标题字体大小
|
|
41
41
|
* @property {String} subTitleColor 副标题字体颜色
|
|
42
|
-
* @property {String} customClass
|
|
43
|
-
* @property {Object,String} customStyle
|
|
42
|
+
* @property {String} customClass 定义需要用到的外部样式
|
|
43
|
+
* @property {Object,String} customStyle 定义需要用到的外部样式
|
|
44
|
+
*
|
|
44
45
|
* @event {Function} click 点击标题栏触发
|
|
46
|
+
* @example <fu-section title="标题"></fu-section>
|
|
45
47
|
*/
|
|
46
48
|
export default {
|
|
47
49
|
name: 'FuSection',
|
|
48
|
-
emits: ['click'],
|
|
49
50
|
mixins: [mpMixin, mixin, props],
|
|
51
|
+
emits: ['click'],
|
|
52
|
+
methods: {
|
|
53
|
+
handleClick() {
|
|
54
|
+
this.$emit('click')
|
|
55
|
+
}
|
|
56
|
+
},
|
|
50
57
|
watch: {
|
|
51
58
|
title(newVal) {
|
|
52
59
|
if (uni.report && newVal !== '') {
|
|
53
60
|
uni.report('title', newVal)
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
|
-
},
|
|
57
|
-
methods: {
|
|
58
|
-
onClick() {
|
|
59
|
-
this.$emit('click')
|
|
60
|
-
}
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
</script>
|
|
64
66
|
<style lang="scss" scoped>
|
|
65
|
-
|
|
67
|
+
@import '../../libs/style/components.scss';
|
|
68
|
+
@import '../../libs/style/color.scss';
|
|
66
69
|
|
|
67
70
|
.fu-section {
|
|
68
71
|
|
|
69
72
|
.fu-section-header {
|
|
73
|
+
@include flex(row);
|
|
70
74
|
position: relative;
|
|
71
|
-
/* #ifndef APP-NVUE */
|
|
72
|
-
display: flex;
|
|
73
|
-
/* #endif */
|
|
74
|
-
flex-direction: row;
|
|
75
75
|
align-items: center;
|
|
76
76
|
font-weight: normal;
|
|
77
77
|
padding: 12px 0;
|
|
@@ -102,10 +102,7 @@
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
&__content {
|
|
105
|
-
|
|
106
|
-
display: flex;
|
|
107
|
-
/* #endif */
|
|
108
|
-
flex-direction: column;
|
|
105
|
+
@include flex(column);
|
|
109
106
|
flex: 1;
|
|
110
107
|
color: #333;
|
|
111
108
|
|
|
@@ -1,30 +1,56 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
props: {
|
|
3
|
+
/**
|
|
4
|
+
* @description 标题装饰类型
|
|
5
|
+
* @values 'line' - 竖线, 'circle' - 圆形, 'square' - 正方形
|
|
6
|
+
*/
|
|
3
7
|
mode: {
|
|
4
8
|
type: String,
|
|
5
9
|
default: ''
|
|
6
10
|
},
|
|
11
|
+
/**
|
|
12
|
+
* @description 主标题
|
|
13
|
+
*/
|
|
7
14
|
title: {
|
|
8
15
|
type: String,
|
|
9
16
|
required: true,
|
|
10
17
|
default: ''
|
|
11
18
|
},
|
|
19
|
+
/**
|
|
20
|
+
* @description 主标题字体大小
|
|
21
|
+
* @default 14
|
|
22
|
+
*/
|
|
12
23
|
titleSize: {
|
|
13
|
-
type: String,
|
|
14
|
-
default:
|
|
24
|
+
type: [String,Number],
|
|
25
|
+
default: 14
|
|
15
26
|
},
|
|
27
|
+
/**
|
|
28
|
+
* @description 主标题字体颜色
|
|
29
|
+
* @default '#333333'
|
|
30
|
+
*/
|
|
16
31
|
titleColor: {
|
|
17
32
|
type: String,
|
|
18
33
|
default: '#333333'
|
|
19
34
|
},
|
|
35
|
+
/**
|
|
36
|
+
* @description 副标题
|
|
37
|
+
*/
|
|
20
38
|
subTitle: {
|
|
21
39
|
type: String,
|
|
22
40
|
default: ''
|
|
23
41
|
},
|
|
42
|
+
/**
|
|
43
|
+
* @description 副标题字体大小
|
|
44
|
+
* @default 12
|
|
45
|
+
*/
|
|
24
46
|
subTitleSize: {
|
|
25
|
-
type: String,
|
|
26
|
-
default:
|
|
47
|
+
type: [String,Number],
|
|
48
|
+
default: 12
|
|
27
49
|
},
|
|
50
|
+
/**
|
|
51
|
+
* @description 副标题字体颜色
|
|
52
|
+
* @default '#999999'
|
|
53
|
+
*/
|
|
28
54
|
subTitleColor: {
|
|
29
55
|
type: String,
|
|
30
56
|
default: '#999999'
|