uview-plus 3.4.43 → 3.4.44
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 +9 -0
- package/components/u-index-anchor/u-index-anchor.vue +12 -0
- package/components/u-index-list/u-index-list.vue +1 -0
- package/components/u-picker-data/u-picker-data.vue +2 -1
- package/components/u-search/u-search.vue +3 -2
- package/package.json +1 -1
- package/types/comps/search.d.ts +8 -0
package/changelog.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<!-- #endif -->
|
|
5
5
|
<view
|
|
6
6
|
class="u-index-anchor u-border-bottom"
|
|
7
|
+
:class="{ 'u-index-anchor--sticky': parentSticky }"
|
|
7
8
|
:ref="`u-index-anchor-${text}`"
|
|
8
9
|
:style="{
|
|
9
10
|
height: addUnit(height),
|
|
@@ -73,6 +74,12 @@
|
|
|
73
74
|
// #endif
|
|
74
75
|
}
|
|
75
76
|
},
|
|
77
|
+
computed: {
|
|
78
|
+
parentSticky() {
|
|
79
|
+
const indexList = $parent.call(this, "u-index-list");
|
|
80
|
+
return indexList ? indexList.sticky : true;
|
|
81
|
+
},
|
|
82
|
+
},
|
|
76
83
|
}
|
|
77
84
|
</script>
|
|
78
85
|
|
|
@@ -86,6 +93,11 @@
|
|
|
86
93
|
padding-left: 15px;
|
|
87
94
|
z-index: 1;
|
|
88
95
|
|
|
96
|
+
&--sticky {
|
|
97
|
+
position: sticky;
|
|
98
|
+
top: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
89
101
|
&__text {
|
|
90
102
|
@include flex;
|
|
91
103
|
align-items: center;
|
|
@@ -389,6 +389,7 @@
|
|
|
389
389
|
// 如果偏移量太小,前后得出的会是同一个索引字母,为了防抖,进行返回
|
|
390
390
|
if (currentIndex === this.activeIndex) return
|
|
391
391
|
this.activeIndex = currentIndex
|
|
392
|
+
this.$emit('select', this.uIndexList[currentIndex])
|
|
392
393
|
// #ifndef APP-NVUE || MP-WEIXIN
|
|
393
394
|
// 在非nvue中,由于anchor和item都在u-index-item中,所以需要对index-item进行偏移
|
|
394
395
|
this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].charCodeAt(0)}`
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
customStyle="line-height: 12px"
|
|
66
66
|
></u-icon>
|
|
67
67
|
</view>
|
|
68
|
+
<slot name="inputRight"></slot>
|
|
68
69
|
</view>
|
|
69
70
|
<text
|
|
70
71
|
:style="[actionStyle]"
|
|
@@ -108,8 +109,8 @@
|
|
|
108
109
|
* @property {String | Number} maxlength 输入框最大能输入的长度,-1为不限制长度 (默认 '-1' )
|
|
109
110
|
* @property {String | Number} height 输入框高度,单位px(默认 64 )
|
|
110
111
|
* @property {String | Number} label 搜索框左边显示内容
|
|
111
|
-
* @property {Boolean} adjustPosition 键盘弹起时,是否自动上推页面
|
|
112
|
-
* @property {Boolean} autoBlur 键盘收起时,是否自动失去焦点
|
|
112
|
+
* @property {Boolean} adjustPosition 键盘弹起时,是否自动上推页面
|
|
113
|
+
* @property {Boolean} autoBlur 键盘收起时,是否自动失去焦点
|
|
113
114
|
* @property {Object} customStyle 定义需要用到的外部样式
|
|
114
115
|
*
|
|
115
116
|
* @event {Function} change 输入框内容发生变化时触发
|
package/package.json
CHANGED
package/types/comps/search.d.ts
CHANGED
|
@@ -161,11 +161,19 @@ declare interface SearchProps {
|
|
|
161
161
|
onClickIcon?: () => any
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
declare interface SearchSlots {
|
|
165
|
+
/**
|
|
166
|
+
* 修改输入框区域内部右侧内容 类似于左侧图标区域
|
|
167
|
+
*/
|
|
168
|
+
['inputRight']?: () => any
|
|
169
|
+
}
|
|
170
|
+
|
|
164
171
|
declare interface _Search {
|
|
165
172
|
new (): {
|
|
166
173
|
$props: AllowedComponentProps &
|
|
167
174
|
VNodeProps &
|
|
168
175
|
SearchProps
|
|
176
|
+
$slots: SearchSlots
|
|
169
177
|
}
|
|
170
178
|
}
|
|
171
179
|
|