uview-plus 3.1.35 → 3.1.37
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/changelog.md +4 -0
- package/components/u-action-sheet/u-action-sheet.vue +1 -0
- package/components/u-album/u-album.vue +1 -0
- package/components/u-alert/u-alert.vue +1 -0
- package/components/u-avatar/u-avatar.vue +1 -0
- package/components/u-avatar-group/u-avatar-group.vue +1 -0
- package/components/u-back-top/u-back-top.vue +2 -1
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-calendar/u-calendar.vue +1 -0
- package/components/u-car-keyboard/u-car-keyboard.vue +312 -311
- package/components/u-cell/u-cell.vue +1 -1
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-checkbox/u-checkbox.vue +2 -1
- package/components/u-code/u-code.vue +1 -0
- package/components/u-code-input/props.js +13 -5
- package/components/u-code-input/u-code-input.vue +8 -2
- package/components/u-col/u-col.vue +1 -0
- package/components/u-collapse/u-collapse.vue +1 -0
- package/components/u-column-notice/u-column-notice.vue +1 -0
- package/components/u-count-down/u-count-down.vue +164 -163
- package/components/u-count-to/u-count-to.vue +1 -0
- package/components/u-divider/u-divider.vue +1 -0
- package/components/u-dropdown/u-dropdown.vue +127 -129
- package/components/u-form-item/u-form-item.vue +1 -0
- package/components/u-image/u-image.vue +1 -1
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/u-index-list.vue +1 -1
- package/components/u-input/u-input.vue +3 -3
- package/components/u-keyboard/u-keyboard.vue +1 -0
- package/components/u-link/u-link.vue +1 -0
- package/components/u-list/u-list.vue +1 -0
- package/components/u-loadmore/u-loadmore.vue +1 -0
- package/components/u-modal/u-modal.vue +230 -229
- package/components/u-navbar/u-navbar.vue +1 -1
- package/components/u-no-network/u-no-network.vue +1 -0
- package/components/u-notice-bar/u-notice-bar.vue +1 -0
- package/components/u-number-box/u-number-box.vue +1 -1
- package/components/u-number-keyboard/u-number-keyboard.vue +1 -1
- package/components/u-overlay/u-overlay.vue +1 -0
- package/components/u-parse/node/node.vue +2 -2
- package/components/u-parse/parser.js +1333 -1333
- package/components/u-parse/u-parse.vue +5 -5
- package/components/u-popup/u-popup.vue +307 -306
- package/components/u-radio/u-radio.vue +1 -1
- package/components/u-read-more/u-read-more.vue +1 -0
- package/components/u-row/u-row.vue +1 -0
- package/components/u-row-notice/u-row-notice.vue +1 -0
- package/components/u-scroll-list/u-scroll-list.vue +1 -0
- package/components/u-search/u-search.vue +6 -2
- package/components/u-slider/props.js +13 -5
- package/components/u-slider/u-slider.vue +66 -55
- package/components/u-status-bar/u-status-bar.vue +1 -1
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/u-steps-item.vue +1 -1
- package/components/u-subsection/u-subsection.vue +1 -0
- package/components/u-swiper/u-swiper.vue +10 -9
- package/components/u-tabbar-item/u-tabbar-item.vue +1 -0
- package/components/u-tag/u-tag.vue +362 -361
- package/components/u-toolbar/u-toolbar.vue +1 -0
- package/components/u-tooltip/u-tooltip.vue +1 -0
- package/components/u-upload/u-upload.vue +1 -1
- package/package.json +1 -1
|
@@ -212,8 +212,12 @@
|
|
|
212
212
|
if (this.disabled) this.$emit('click');
|
|
213
213
|
},
|
|
214
214
|
// 点击左边图标
|
|
215
|
-
clickIcon() {
|
|
216
|
-
this.$emit('clickIcon');
|
|
215
|
+
clickIcon(e) {
|
|
216
|
+
this.$emit('clickIcon', this.keyword);
|
|
217
|
+
try {
|
|
218
|
+
// 收起键盘
|
|
219
|
+
uni.hideKeyboard();
|
|
220
|
+
} catch (e) {}
|
|
217
221
|
}
|
|
218
222
|
}
|
|
219
223
|
}
|
|
@@ -16,11 +16,19 @@ export default {
|
|
|
16
16
|
type: [Number, String],
|
|
17
17
|
default: defprops.slider.step
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
// #ifdef VUE3
|
|
20
|
+
// 当前取值
|
|
21
|
+
modelValue: {
|
|
22
|
+
type: [String, Number],
|
|
23
|
+
default: defprops.slider.value
|
|
24
|
+
},
|
|
25
|
+
// #endif
|
|
26
|
+
// #ifdef VUE2
|
|
27
|
+
// 当前取值
|
|
28
|
+
value: {
|
|
29
|
+
type: [String, Number],
|
|
30
|
+
default: defprops.slider.value
|
|
31
|
+
},
|
|
24
32
|
// 滑块右侧已选择部分的背景色
|
|
25
33
|
activeColor: {
|
|
26
34
|
type: String,
|
|
@@ -1,57 +1,68 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view
|
|
3
|
-
class="u-slider"
|
|
4
|
-
:style="[$u.addStyle(customStyle)]"
|
|
5
|
-
>
|
|
6
|
-
<slider
|
|
7
|
-
:min="min"
|
|
8
|
-
:max="max"
|
|
9
|
-
:step="step"
|
|
10
|
-
:value="value"
|
|
11
|
-
:activeColor="activeColor"
|
|
12
|
-
:
|
|
13
|
-
:blockSize="$u.getPx(blockSize)"
|
|
14
|
-
:blockColor="blockColor"
|
|
15
|
-
:showValue="showValue"
|
|
16
|
-
:disabled="disabled"
|
|
17
|
-
@changing="changingHandler"
|
|
18
|
-
@change="changeHandler"
|
|
19
|
-
></slider>
|
|
20
|
-
</view>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<script>
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="u-slider"
|
|
4
|
+
:style="[$u.addStyle(customStyle)]"
|
|
5
|
+
>
|
|
6
|
+
<slider
|
|
7
|
+
:min="min"
|
|
8
|
+
:max="max"
|
|
9
|
+
:step="step"
|
|
10
|
+
:value="value"
|
|
11
|
+
:activeColor="activeColor"
|
|
12
|
+
:backgroundColor="inactiveColor"
|
|
13
|
+
:blockSize="$u.getPx(blockSize)"
|
|
14
|
+
:blockColor="blockColor"
|
|
15
|
+
:showValue="showValue"
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
@changing="changingHandler"
|
|
18
|
+
@change="changeHandler"
|
|
19
|
+
></slider>
|
|
20
|
+
</view>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
24
|
import props from './props.js';
|
|
25
25
|
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
26
|
-
import mixin from '../../libs/mixin/mixin.js';
|
|
27
|
-
export default {
|
|
28
|
-
name: 'u--slider',
|
|
29
|
-
mixins: [mpMixin, mixin, props],
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
26
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
27
|
+
export default {
|
|
28
|
+
name: 'u--slider',
|
|
29
|
+
mixins: [mpMixin, mixin, props],
|
|
30
|
+
emits: ["changing", "change"],
|
|
31
|
+
methods: {
|
|
32
|
+
// 拖动过程中触发
|
|
33
|
+
changingHandler(e) {
|
|
34
|
+
const {
|
|
35
|
+
value
|
|
36
|
+
} = e.detail
|
|
37
|
+
// 更新v-model的值
|
|
38
|
+
// #ifdef VUE3
|
|
39
|
+
this.$emit("update:modelValue", value);
|
|
40
|
+
// #endif
|
|
41
|
+
// #ifdef VUE2
|
|
42
|
+
this.$emit("input", value);
|
|
43
|
+
// #endif
|
|
44
|
+
// 触发事件
|
|
45
|
+
this.$emit('changing', value)
|
|
46
|
+
},
|
|
47
|
+
// 滑动结束时触发
|
|
48
|
+
changeHandler(e) {
|
|
49
|
+
const {
|
|
50
|
+
value
|
|
51
|
+
} = e.detail
|
|
52
|
+
// 更新v-model的值
|
|
53
|
+
// #ifdef VUE3
|
|
54
|
+
this.$emit("update:modelValue", value);
|
|
55
|
+
// #endif
|
|
56
|
+
// #ifdef VUE2
|
|
57
|
+
this.$emit("input", value);
|
|
58
|
+
// #endif
|
|
59
|
+
// 触发事件
|
|
60
|
+
this.$emit('change', value)
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
}
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style lang="scss" scoped>
|
|
67
|
+
@import "../../libs/css/components.scss";
|
|
68
|
+
</style>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* StatbusBar 状态栏占位
|
|
16
16
|
* @description 本组件主要用于状态填充,比如在自定导航栏的时候,它会自动适配一个恰当的状态栏高度。
|
|
17
|
-
* @tutorial https://
|
|
17
|
+
* @tutorial https://uiadmin.net/uview-plus/components/statusBar.html
|
|
18
18
|
* @property {String} bgColor 背景色 (默认 'transparent' )
|
|
19
19
|
* @property {String | Object} customStyle 自定义样式
|
|
20
20
|
* @example <u-status-bar></u-status-bar>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* Steps 步骤条
|
|
16
16
|
* @description 该组件一般用于完成一个任务要分几个步骤,标识目前处于第几步的场景。
|
|
17
|
-
* @tutorial https://
|
|
17
|
+
* @tutorial https://uiadmin.net/uview-plus/components/steps.html
|
|
18
18
|
* @property {String} direction row-横向,column-竖向 (默认 'row' )
|
|
19
19
|
* @property {String | Number} current 设置当前处于第几步 (默认 0 )
|
|
20
20
|
* @property {String} activeColor 激活状态颜色 (默认 '#3c9cff' )
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
/**
|
|
57
57
|
* StepsItem 步骤条的子组件
|
|
58
58
|
* @description 本组件需要和u-steps配合使用
|
|
59
|
-
* @tutorial https://
|
|
59
|
+
* @tutorial https://uiadmin.net/uview-plus/components/steps.html
|
|
60
60
|
* @property {String} title 标题文字
|
|
61
61
|
* @property {String} current 描述文本
|
|
62
62
|
* @property {String | Number} iconSize 图标大小 (默认 17 )
|
|
@@ -139,6 +139,7 @@
|
|
|
139
139
|
this.currentIndex = val; // 和上游数据关联上
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
|
+
emits: ["click", "change"],
|
|
142
143
|
computed: {
|
|
143
144
|
itemStyle() {
|
|
144
145
|
return index => {
|
|
@@ -156,15 +157,15 @@
|
|
|
156
157
|
}
|
|
157
158
|
},
|
|
158
159
|
methods: {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
160
|
+
getItemType(item) {
|
|
161
|
+
if (typeof item === 'string') return uni.$u.test.video(this.getSource(item)) ? 'video' : 'image'
|
|
162
|
+
if (typeof item === 'object' && this.keyName) {
|
|
163
|
+
if (!item.type) return uni.$u.test.video(this.getSource(item)) ? 'video' : 'image'
|
|
164
|
+
if (item.type === 'image') return 'image'
|
|
165
|
+
if (item.type === 'video') return 'video'
|
|
166
|
+
return 'image'
|
|
167
|
+
}
|
|
168
|
+
},
|
|
168
169
|
// 获取目标路径,可能数组中为字符串,对象的形式,额外可指定对象的目标属性名keyName
|
|
169
170
|
getSource(item) {
|
|
170
171
|
if (typeof item === 'string') return item
|