uview-plus 3.8.39 → 3.8.42
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 +18 -0
- package/components/u-calendar-strip/calendarStrip.js +36 -0
- package/components/u-calendar-strip/props.js +68 -0
- package/components/u-calendar-strip/u-calendar-strip.vue +507 -0
- package/components/u-guide/guide.js +16 -0
- package/components/u-guide/props.js +51 -0
- package/components/u-guide/u-guide.vue +259 -0
- package/components/u-signature/u-signature.vue +11 -0
- package/components/u-tabs/props.js +11 -6
- package/components/u-tabs/tabs.js +7 -6
- package/components/u-tabs/u-tabs.vue +145 -5
- package/libs/config/props.js +4 -0
- package/package.json +1 -1
- package/types/comps/calendarStrip.d.ts +116 -0
- package/types/comps/guide.d.ts +45 -0
- package/types/comps/tabs.d.ts +5 -0
- package/types/comps.d.ts +2 -0
- package/types/index.d.ts +2 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
v-if="innerShow && pageList.length"
|
|
4
|
+
class="up-guide"
|
|
5
|
+
:style="{ zIndex: `${zIndex}` }"
|
|
6
|
+
@touchmove.stop.prevent
|
|
7
|
+
>
|
|
8
|
+
<swiper
|
|
9
|
+
class="up-guide__swiper"
|
|
10
|
+
:current="current"
|
|
11
|
+
@change="onSwiperChange"
|
|
12
|
+
>
|
|
13
|
+
<swiper-item v-for="(item, index) in pageList" :key="index">
|
|
14
|
+
<view class="up-guide__page" :style="{ backgroundColor: item.backgroundColor || bgColor }">
|
|
15
|
+
<template v-if="item.image">
|
|
16
|
+
<image class="up-guide__image" :src="item.image" mode="aspectFit"></image>
|
|
17
|
+
</template>
|
|
18
|
+
<view v-else class="up-guide__placeholder">暂无引导图</view>
|
|
19
|
+
<text v-if="item.title" class="up-guide__title">{{ item.title }}</text>
|
|
20
|
+
<text v-if="item.desc" class="up-guide__desc">{{ item.desc }}</text>
|
|
21
|
+
</view>
|
|
22
|
+
</swiper-item>
|
|
23
|
+
</swiper>
|
|
24
|
+
|
|
25
|
+
<view class="up-guide__footer">
|
|
26
|
+
<view v-if="indicator" class="up-guide__dots">
|
|
27
|
+
<view
|
|
28
|
+
v-for="(_, dotIndex) in pageList"
|
|
29
|
+
:key="dotIndex"
|
|
30
|
+
class="up-guide__dot"
|
|
31
|
+
:class="{ 'up-guide__dot--active': dotIndex === current }"
|
|
32
|
+
></view>
|
|
33
|
+
</view>
|
|
34
|
+
<view class="up-guide__actions">
|
|
35
|
+
<view v-if="showSkip" class="up-guide__btn up-guide__btn--ghost" @tap="onSkip">
|
|
36
|
+
{{ skipText }}
|
|
37
|
+
</view>
|
|
38
|
+
<view class="up-guide__btn up-guide__btn--primary" @tap="onPrimaryAction">
|
|
39
|
+
{{ isLastPage() ? finishText : nextText }}
|
|
40
|
+
</view>
|
|
41
|
+
</view>
|
|
42
|
+
</view>
|
|
43
|
+
</view>
|
|
44
|
+
</template>
|
|
45
|
+
|
|
46
|
+
<script>
|
|
47
|
+
import { props } from './props';
|
|
48
|
+
import { mpMixin } from '../../libs/mixin/mpMixin';
|
|
49
|
+
import { mixin } from '../../libs/mixin/mixin';
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Guide 首屏引导
|
|
53
|
+
* @description 全屏首屏引导组件,支持一次性记忆与多页滑动
|
|
54
|
+
*/
|
|
55
|
+
export default {
|
|
56
|
+
name: 'up-guide',
|
|
57
|
+
mixins: [mpMixin, mixin, props],
|
|
58
|
+
emits: ['update:show', 'change', 'skip', 'finish', 'close'],
|
|
59
|
+
data() {
|
|
60
|
+
return {
|
|
61
|
+
innerShow: false,
|
|
62
|
+
current: 0,
|
|
63
|
+
closing: false
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
computed: {
|
|
67
|
+
pageList() {
|
|
68
|
+
return Array.isArray(this.list) ? this.list : []
|
|
69
|
+
},
|
|
70
|
+
resolvedStorageKey() {
|
|
71
|
+
return this.storageKey || 'up-guide-default'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
watch: {
|
|
75
|
+
show(value) {
|
|
76
|
+
this.innerShow = !!value
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
mounted() {
|
|
80
|
+
this.bootstrap()
|
|
81
|
+
},
|
|
82
|
+
methods: {
|
|
83
|
+
bootstrap() {
|
|
84
|
+
if (!this.pageList.length) {
|
|
85
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
86
|
+
console.warn('[up-guide] list is empty')
|
|
87
|
+
}
|
|
88
|
+
return
|
|
89
|
+
}
|
|
90
|
+
if (this.once && this.readRemembered()) {
|
|
91
|
+
this.innerShow = false
|
|
92
|
+
this.$emit('update:show', false)
|
|
93
|
+
return
|
|
94
|
+
}
|
|
95
|
+
this.innerShow = !!this.show
|
|
96
|
+
},
|
|
97
|
+
isLastPage() {
|
|
98
|
+
return this.current >= this.pageList.length - 1
|
|
99
|
+
},
|
|
100
|
+
onSwiperChange(event) {
|
|
101
|
+
const next = Number(event?.detail?.current ?? 0)
|
|
102
|
+
this.current = next
|
|
103
|
+
this.$emit('change', { current: next })
|
|
104
|
+
},
|
|
105
|
+
onPrimaryAction() {
|
|
106
|
+
if (this.isLastPage()) {
|
|
107
|
+
this.$emit('finish')
|
|
108
|
+
this.close(true)
|
|
109
|
+
return
|
|
110
|
+
}
|
|
111
|
+
this.current += 1
|
|
112
|
+
this.$emit('change', { current: this.current })
|
|
113
|
+
},
|
|
114
|
+
onSkip() {
|
|
115
|
+
this.$emit('skip')
|
|
116
|
+
this.close(true)
|
|
117
|
+
},
|
|
118
|
+
open() {
|
|
119
|
+
this.current = 0
|
|
120
|
+
this.innerShow = true
|
|
121
|
+
this.$emit('update:show', true)
|
|
122
|
+
},
|
|
123
|
+
close(remember = true) {
|
|
124
|
+
if (this.closing) return
|
|
125
|
+
this.closing = true
|
|
126
|
+
if (remember && this.once) {
|
|
127
|
+
this.writeRemembered()
|
|
128
|
+
}
|
|
129
|
+
this.innerShow = false
|
|
130
|
+
this.$emit('update:show', false)
|
|
131
|
+
this.$emit('close')
|
|
132
|
+
this.$nextTick(() => {
|
|
133
|
+
this.closing = false
|
|
134
|
+
})
|
|
135
|
+
},
|
|
136
|
+
reset() {
|
|
137
|
+
try {
|
|
138
|
+
uni.removeStorageSync(this.resolvedStorageKey)
|
|
139
|
+
} catch (error) {}
|
|
140
|
+
},
|
|
141
|
+
readRemembered() {
|
|
142
|
+
try {
|
|
143
|
+
const value = uni.getStorageSync(this.resolvedStorageKey)
|
|
144
|
+
return value === true || value === 1 || value === '1'
|
|
145
|
+
} catch (error) {
|
|
146
|
+
return false
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
writeRemembered() {
|
|
150
|
+
try {
|
|
151
|
+
uni.setStorageSync(this.resolvedStorageKey, 1)
|
|
152
|
+
} catch (error) {}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
</script>
|
|
157
|
+
|
|
158
|
+
<style lang="scss" scoped>
|
|
159
|
+
.up-guide {
|
|
160
|
+
position: fixed;
|
|
161
|
+
left: 0;
|
|
162
|
+
top: 0;
|
|
163
|
+
right: 0;
|
|
164
|
+
bottom: 0;
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.up-guide__swiper {
|
|
170
|
+
flex: 1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.up-guide__page {
|
|
174
|
+
height: 100%;
|
|
175
|
+
padding: 120rpx 40rpx 40rpx;
|
|
176
|
+
box-sizing: border-box;
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
align-items: center;
|
|
180
|
+
color: #ffffff;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.up-guide__image {
|
|
184
|
+
width: 560rpx;
|
|
185
|
+
height: 560rpx;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.up-guide__placeholder {
|
|
189
|
+
width: 560rpx;
|
|
190
|
+
height: 560rpx;
|
|
191
|
+
border-radius: 24rpx;
|
|
192
|
+
background: rgba(255, 255, 255, 0.12);
|
|
193
|
+
display: flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
justify-content: center;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.up-guide__title {
|
|
199
|
+
margin-top: 48rpx;
|
|
200
|
+
font-size: 40rpx;
|
|
201
|
+
font-weight: 600;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.up-guide__desc {
|
|
205
|
+
margin-top: 18rpx;
|
|
206
|
+
font-size: 28rpx;
|
|
207
|
+
opacity: 0.85;
|
|
208
|
+
text-align: center;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.up-guide__footer {
|
|
212
|
+
padding: 24rpx 32rpx calc(24rpx + env(safe-area-inset-bottom));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.up-guide__dots {
|
|
216
|
+
display: flex;
|
|
217
|
+
justify-content: center;
|
|
218
|
+
gap: 12rpx;
|
|
219
|
+
margin-bottom: 26rpx;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.up-guide__dot {
|
|
223
|
+
width: 14rpx;
|
|
224
|
+
height: 14rpx;
|
|
225
|
+
border-radius: 999px;
|
|
226
|
+
background: rgba(255, 255, 255, 0.35);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.up-guide__dot--active {
|
|
230
|
+
width: 34rpx;
|
|
231
|
+
background: #ffffff;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.up-guide__actions {
|
|
235
|
+
display: flex;
|
|
236
|
+
gap: 16rpx;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.up-guide__btn {
|
|
240
|
+
flex: 1;
|
|
241
|
+
height: 84rpx;
|
|
242
|
+
border-radius: 42rpx;
|
|
243
|
+
display: flex;
|
|
244
|
+
align-items: center;
|
|
245
|
+
justify-content: center;
|
|
246
|
+
font-size: 28rpx;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.up-guide__btn--ghost {
|
|
250
|
+
color: #ffffff;
|
|
251
|
+
border: 2rpx solid rgba(255, 255, 255, 0.42);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.up-guide__btn--primary {
|
|
255
|
+
color: #111111;
|
|
256
|
+
background: #ffffff;
|
|
257
|
+
font-weight: 600;
|
|
258
|
+
}
|
|
259
|
+
</style>
|
|
@@ -364,6 +364,17 @@
|
|
|
364
364
|
|
|
365
365
|
this.canvasInstance.clearCanvas();
|
|
366
366
|
},
|
|
367
|
+
|
|
368
|
+
// 对外暴露的清空方法(供工具栏与ref调用)
|
|
369
|
+
clear() {
|
|
370
|
+
this.pathStack = []
|
|
371
|
+
this.currentPath = []
|
|
372
|
+
this.lastPoint = null
|
|
373
|
+
this.isDrawing = false
|
|
374
|
+
this.isEmpty = true
|
|
375
|
+
this.clearCanvas()
|
|
376
|
+
this.$emit('clear')
|
|
377
|
+
},
|
|
367
378
|
|
|
368
379
|
// 导出签名图片
|
|
369
380
|
async exportSignature() {
|
|
@@ -63,9 +63,14 @@ export const props = defineMixin({
|
|
|
63
63
|
default: () => defProps.tabs.keyName
|
|
64
64
|
},
|
|
65
65
|
// 左侧图标样式
|
|
66
|
-
iconStyle: {
|
|
67
|
-
type: [String, Object],
|
|
68
|
-
default: () => defProps.tabs.iconStyle
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
iconStyle: {
|
|
67
|
+
type: [String, Object],
|
|
68
|
+
default: () => defProps.tabs.iconStyle
|
|
69
|
+
},
|
|
70
|
+
// 形态模式,可选:capsule/card/pill-arrow/tag
|
|
71
|
+
shapeMode: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: () => defProps.tabs.shapeMode
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="u-tabs" :class="[customClass]">
|
|
2
|
+
<view class="u-tabs" :class="[customClass, shapeModeClass]">
|
|
3
3
|
<view class="u-tabs__wrapper">
|
|
4
4
|
<slot name="left" />
|
|
5
5
|
<view class="u-tabs__wrapper__scroll-view-wrapper">
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
<view class="u-tabs__wrapper__nav__item" v-for="(item, index) in tabList" :key="index"
|
|
10
10
|
@tap="clickHandler(item, index)" @longpress="longPressHandler(item,index)"
|
|
11
11
|
:ref="`u-tabs__wrapper__nav__item-${index}`"
|
|
12
|
-
:style="[
|
|
12
|
+
:style="[itemComputedStyle, {flex: scrollable ? '' : 1}]" :class="[`u-tabs__wrapper__nav__item-${index}`,
|
|
13
|
+
shapeMode && `u-tabs__wrapper__nav__item--${shapeMode}`,
|
|
13
14
|
item.disabled && 'u-tabs__wrapper__nav__item--disabled',
|
|
14
15
|
innerCurrent == index ? 'u-tabs__wrapper__nav__item-active' : '']">
|
|
15
16
|
<slot v-if="$slots.icon" name="icon" :item="item" :keyName="keyName" :index="index" />
|
|
@@ -36,6 +37,12 @@
|
|
|
36
37
|
:numberType="item.badge && item.badge.numberType || propsBadge.numberType"
|
|
37
38
|
:inverted="item.badge && item.badge.inverted || propsBadge.inverted"
|
|
38
39
|
customStyle="margin-left: 4px;"></u-badge>
|
|
40
|
+
<view
|
|
41
|
+
v-if="shapeMode === 'card' && innerCurrent == index && index < tabList.length - 1"
|
|
42
|
+
class="u-tabs__wrapper__nav__item__card-corner"></view>
|
|
43
|
+
<view
|
|
44
|
+
v-if="shapeMode === 'pill-arrow' && innerCurrent == index"
|
|
45
|
+
class="u-tabs__wrapper__nav__item__active-arrow"></view>
|
|
39
46
|
</view>
|
|
40
47
|
<!-- #ifdef APP-NVUE -->
|
|
41
48
|
<view class="u-tabs__wrapper__nav__line" ref="u-tabs__wrapper__nav__line" :style="[{
|
|
@@ -43,6 +50,7 @@
|
|
|
43
50
|
height: addUnit(lineHeight),
|
|
44
51
|
background: lineColor,
|
|
45
52
|
backgroundSize: lineBgSize,
|
|
53
|
+
display: showLine ? 'block' : 'none'
|
|
46
54
|
}]">
|
|
47
55
|
</view>
|
|
48
56
|
<!-- #endif -->
|
|
@@ -55,7 +63,7 @@
|
|
|
55
63
|
height: addUnit(lineHeight),
|
|
56
64
|
background: lineColor,
|
|
57
65
|
backgroundSize: lineBgSize,
|
|
58
|
-
display:
|
|
66
|
+
display: showLine ? 'block': 'none'
|
|
59
67
|
}]">
|
|
60
68
|
</view>
|
|
61
69
|
<!-- #endif -->
|
|
@@ -98,6 +106,7 @@
|
|
|
98
106
|
* @property {String | Number} duration 滑块移动一次所需的时间,单位秒(默认 200 )
|
|
99
107
|
* @property {String | Number} swierWidth swiper的宽度(默认 '750rpx' )
|
|
100
108
|
* @property {String} keyName 从`list`元素对象中读取的键名(默认 'name' )
|
|
109
|
+
* @property {String} shapeMode 标签形态模式,可选capsule/card/pill-arrow/tag(默认 '' )
|
|
101
110
|
* @event {Function(index)} change 标签改变时触发 index: 点击了第几个tab,索引从0开始
|
|
102
111
|
* @event {Function(index)} click 点击标签时触发 index: 点击了第几个tab,索引从0开始
|
|
103
112
|
* @event {Function(index)} longPress 长按标签时触发 index: 点击了第几个tab,索引从0开始
|
|
@@ -151,6 +160,31 @@
|
|
|
151
160
|
}
|
|
152
161
|
},
|
|
153
162
|
computed: {
|
|
163
|
+
shapeModeClass() {
|
|
164
|
+
return this.shapeMode ? `u-tabs--shape-${this.shapeMode}` : ''
|
|
165
|
+
},
|
|
166
|
+
showLine() {
|
|
167
|
+
return this.lineShow && !['capsule', 'pill-arrow', 'tag'].includes(this.shapeMode)
|
|
168
|
+
},
|
|
169
|
+
itemComputedStyle() {
|
|
170
|
+
const style = addStyle(this.itemStyle) || {}
|
|
171
|
+
if (this.upHasProp('itemStyle')) {
|
|
172
|
+
return style
|
|
173
|
+
}
|
|
174
|
+
const defaultModeHeights = {
|
|
175
|
+
capsule: '30px',
|
|
176
|
+
card: '34px',
|
|
177
|
+
'pill-arrow': '32px',
|
|
178
|
+
tag: '28px'
|
|
179
|
+
}
|
|
180
|
+
const height = defaultModeHeights[this.shapeMode]
|
|
181
|
+
if (!height) {
|
|
182
|
+
return style
|
|
183
|
+
}
|
|
184
|
+
return deepMerge(style, {
|
|
185
|
+
height
|
|
186
|
+
})
|
|
187
|
+
},
|
|
154
188
|
textStyle() {
|
|
155
189
|
return index => {
|
|
156
190
|
const style = {}
|
|
@@ -165,10 +199,14 @@
|
|
|
165
199
|
|| (customeStyle && customeStyle.color && customeStyle.color !== defaultActiveColor)
|
|
166
200
|
const isInactiveStyleOverridden = this.upHasProp('inactiveStyle')
|
|
167
201
|
|| (customeStyle && customeStyle.color && customeStyle.color !== defaultInactiveColor)
|
|
168
|
-
if (isActive && !isActiveStyleOverridden) {
|
|
202
|
+
if (isActive && ['pill-arrow', 'tag'].includes(this.shapeMode) && !isActiveStyleOverridden) {
|
|
203
|
+
style.color = '#ffffff'
|
|
204
|
+
} else if (isActive && !isActiveStyleOverridden) {
|
|
169
205
|
style.color = this.upThemeVar('--up-main-color', this.$u.color.mainColor || defaultActiveColor)
|
|
170
206
|
}
|
|
171
|
-
if (!isActive && !isInactiveStyleOverridden) {
|
|
207
|
+
if (!isActive && ['pill-arrow', 'tag'].includes(this.shapeMode) && !isInactiveStyleOverridden) {
|
|
208
|
+
style.color = '#606266'
|
|
209
|
+
} else if (!isActive && !isInactiveStyleOverridden) {
|
|
172
210
|
style.color = this.upThemeVar('--up-content-color', this.$u.color.contentColor || defaultInactiveColor)
|
|
173
211
|
}
|
|
174
212
|
// 如果当前菜单被禁用,则加上对应颜色,需要在此做处理,是因为nvue下,无法在style样式中通过!import覆盖标签的内联样式
|
|
@@ -375,6 +413,7 @@
|
|
|
375
413
|
&__item {
|
|
376
414
|
padding: 0 11px;
|
|
377
415
|
@include flex;
|
|
416
|
+
position: relative;
|
|
378
417
|
align-items: center;
|
|
379
418
|
justify-content: center;
|
|
380
419
|
/* #ifdef H5 */
|
|
@@ -396,6 +435,30 @@
|
|
|
396
435
|
color: $u-disabled-color !important;
|
|
397
436
|
}
|
|
398
437
|
}
|
|
438
|
+
|
|
439
|
+
&__card-corner {
|
|
440
|
+
position: absolute;
|
|
441
|
+
top: 0;
|
|
442
|
+
right: -10px;
|
|
443
|
+
width: 20px;
|
|
444
|
+
height: 100%;
|
|
445
|
+
background-color: inherit;
|
|
446
|
+
transform: skewX(25deg);
|
|
447
|
+
border-top-right-radius: 10px;
|
|
448
|
+
z-index: 1;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
&__active-arrow {
|
|
452
|
+
position: absolute;
|
|
453
|
+
left: 50%;
|
|
454
|
+
bottom: -6px;
|
|
455
|
+
width: 0;
|
|
456
|
+
height: 0;
|
|
457
|
+
border-left: 6px solid transparent;
|
|
458
|
+
border-right: 6px solid transparent;
|
|
459
|
+
border-top: 6px solid #ff3b30;
|
|
460
|
+
transform: translateX(-50%);
|
|
461
|
+
}
|
|
399
462
|
}
|
|
400
463
|
|
|
401
464
|
&__line {
|
|
@@ -410,5 +473,82 @@
|
|
|
410
473
|
}
|
|
411
474
|
}
|
|
412
475
|
}
|
|
476
|
+
|
|
477
|
+
&--shape-capsule {
|
|
478
|
+
.u-tabs__wrapper__scroll-view-wrapper {
|
|
479
|
+
padding: 3px;
|
|
480
|
+
border-radius: 999px;
|
|
481
|
+
background-color: #edf0f5;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.u-tabs__wrapper__nav__item {
|
|
485
|
+
min-height: 30px;
|
|
486
|
+
padding: 0 14px;
|
|
487
|
+
border-radius: 999px;
|
|
488
|
+
transition: background-color 0.2s;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.u-tabs__wrapper__nav__item-active {
|
|
492
|
+
background-color: #ffffff;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
&--shape-card {
|
|
497
|
+
.u-tabs__wrapper__scroll-view-wrapper {
|
|
498
|
+
padding: 0;
|
|
499
|
+
border-radius: 10px;
|
|
500
|
+
background-color: #9ccde5;
|
|
501
|
+
box-shadow: inset 0 0 0 1px rgba(96, 98, 102, 0.06);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.u-tabs__wrapper__nav__item {
|
|
505
|
+
min-height: 34px;
|
|
506
|
+
padding: 0;
|
|
507
|
+
border-radius: 10px 10px 0 0;
|
|
508
|
+
transition: background-color 0.2s;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.u-tabs__wrapper__nav__item-active {
|
|
512
|
+
background-color: #f6f8fb;
|
|
513
|
+
box-shadow: inset 0 0 0 1px rgba(96, 98, 102, 0.06);
|
|
514
|
+
z-index: 2;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
&--shape-pill-arrow {
|
|
519
|
+
.u-tabs__wrapper__nav {
|
|
520
|
+
padding-bottom: 6px;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.u-tabs__wrapper__nav__item {
|
|
524
|
+
min-height: 32px;
|
|
525
|
+
padding: 0 12px;
|
|
526
|
+
border-radius: 8px;
|
|
527
|
+
background-color: #e8e8e8;
|
|
528
|
+
margin-right: 8px;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.u-tabs__wrapper__nav__item-active {
|
|
532
|
+
background: linear-gradient(90deg, #ff6c57 0%, #ff3b30 100%);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
&--shape-tag {
|
|
537
|
+
.u-tabs__wrapper__nav {
|
|
538
|
+
padding: 2px 0;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
.u-tabs__wrapper__nav__item {
|
|
542
|
+
min-height: 28px;
|
|
543
|
+
padding: 0 14px;
|
|
544
|
+
border-radius: 999px;
|
|
545
|
+
background-color: #f3f4f6;
|
|
546
|
+
margin-right: 8px;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.u-tabs__wrapper__nav__item-active {
|
|
550
|
+
background-color: #2a6bf6;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
413
553
|
}
|
|
414
554
|
</style>
|
package/libs/config/props.js
CHANGED
|
@@ -21,6 +21,7 @@ import Backtop from '../../components/u-back-top/backtop'
|
|
|
21
21
|
import Badge from '../../components/u-badge/badge'
|
|
22
22
|
import Button from '../../components/u-button/button'
|
|
23
23
|
import Calendar from '../../components/u-calendar/calendar'
|
|
24
|
+
import CalendarStrip from '../../components/u-calendar-strip/calendarStrip'
|
|
24
25
|
import CarKeyboard from '../../components/u-car-keyboard/carKeyboard'
|
|
25
26
|
import Card from '../../components/u-card/card'
|
|
26
27
|
import Cell from '../../components/u-cell/cell'
|
|
@@ -42,6 +43,7 @@ import Empty from '../../components/u-empty/empty'
|
|
|
42
43
|
import Form from '../../components/u-form/form'
|
|
43
44
|
import FormItem from '../../components/u-form-item/formItem'
|
|
44
45
|
import Gap from '../../components/u-gap/gap'
|
|
46
|
+
import Guide from '../../components/u-guide/guide'
|
|
45
47
|
import Grid from '../../components/u-grid/grid'
|
|
46
48
|
import GridItem from '../../components/u-grid-item/gridItem'
|
|
47
49
|
import Icon from '../../components/u-icon/icon'
|
|
@@ -112,6 +114,7 @@ const props = {
|
|
|
112
114
|
...Badge,
|
|
113
115
|
...Button,
|
|
114
116
|
...Calendar,
|
|
117
|
+
...CalendarStrip,
|
|
115
118
|
...CarKeyboard,
|
|
116
119
|
...Card,
|
|
117
120
|
...Cell,
|
|
@@ -133,6 +136,7 @@ const props = {
|
|
|
133
136
|
...Form,
|
|
134
137
|
...FormItem,
|
|
135
138
|
...Gap,
|
|
139
|
+
...Guide,
|
|
136
140
|
...Grid,
|
|
137
141
|
...GridItem,
|
|
138
142
|
...Icon,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "uview-plus",
|
|
3
3
|
"name": "uview-plus",
|
|
4
4
|
"displayName": "零云®uview-plus3.0重磅发布,全面的Vue3鸿蒙跨端移动组件库,组件丰富维护更新稳定。",
|
|
5
|
-
"version": "3.8.
|
|
5
|
+
"version": "3.8.42",
|
|
6
6
|
"description": "零云®uview-plus已兼容vue3支持多语言,120+全面的组件和便捷的工具会让您信手拈来。近期新增拖动排序、条码、图片裁剪、下拉刷新、虚拟列表、签名、Markdown等。",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"uview",
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { AllowedComponentProps, VNodeProps } from './_common'
|
|
2
|
+
|
|
3
|
+
declare interface CalendarStripPayload {
|
|
4
|
+
date: string
|
|
5
|
+
month: string
|
|
6
|
+
scene: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
declare interface CalendarStripProps {
|
|
10
|
+
/**
|
|
11
|
+
* 当前选中日期
|
|
12
|
+
*/
|
|
13
|
+
modelValue?: string | number | Date | null
|
|
14
|
+
/**
|
|
15
|
+
* 最小可选日期
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
minDate?: string | number
|
|
19
|
+
/**
|
|
20
|
+
* 最大可选日期
|
|
21
|
+
* @default 0
|
|
22
|
+
*/
|
|
23
|
+
maxDate?: string | number
|
|
24
|
+
/**
|
|
25
|
+
* 主题色
|
|
26
|
+
* @default "#3c9cff"
|
|
27
|
+
*/
|
|
28
|
+
color?: string
|
|
29
|
+
/**
|
|
30
|
+
* 星期文案(周一到周日)
|
|
31
|
+
*/
|
|
32
|
+
weekText?: string[]
|
|
33
|
+
/**
|
|
34
|
+
* 是否支持下拉展开完整月历
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
fullCalendar?: boolean
|
|
38
|
+
/**
|
|
39
|
+
* 透传给内嵌 up-calendar 的额外参数
|
|
40
|
+
*/
|
|
41
|
+
fullCalendarProps?: Record<string, any>
|
|
42
|
+
/**
|
|
43
|
+
* 完整月历可浏览月份数(仅在未传 minDate/maxDate 时生效)
|
|
44
|
+
* @default 24
|
|
45
|
+
*/
|
|
46
|
+
fullMonthNum?: string | number
|
|
47
|
+
/**
|
|
48
|
+
* 下拉/上拉手势触发阈值,单位 px
|
|
49
|
+
* @default 40
|
|
50
|
+
*/
|
|
51
|
+
pullDownThreshold?: string | number
|
|
52
|
+
/**
|
|
53
|
+
* 在完整月历中选择日期后是否自动收起
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
collapseAfterSelect?: boolean
|
|
57
|
+
/**
|
|
58
|
+
* 是否只读
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
readonly?: boolean
|
|
62
|
+
/**
|
|
63
|
+
* 是否高亮今天
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
showToday?: boolean
|
|
67
|
+
/**
|
|
68
|
+
* 顶部月份格式化模板,遵循 dayjs 格式
|
|
69
|
+
*/
|
|
70
|
+
monthFormat?: string
|
|
71
|
+
/**
|
|
72
|
+
* 收起状态提示文案
|
|
73
|
+
* @default "下拉展开月历"
|
|
74
|
+
*/
|
|
75
|
+
expandHint?: string
|
|
76
|
+
/**
|
|
77
|
+
* 展开状态提示文案
|
|
78
|
+
* @default "上拉收起月历"
|
|
79
|
+
*/
|
|
80
|
+
collapseHint?: string
|
|
81
|
+
/**
|
|
82
|
+
* 日期变更时触发
|
|
83
|
+
*/
|
|
84
|
+
onChange?: (payload: CalendarStripPayload) => any
|
|
85
|
+
/**
|
|
86
|
+
* 日期确认时触发
|
|
87
|
+
*/
|
|
88
|
+
onConfirm?: (payload: CalendarStripPayload) => any
|
|
89
|
+
/**
|
|
90
|
+
* 月份变更时触发
|
|
91
|
+
*/
|
|
92
|
+
onMonthChange?: (payload: { month: string; scene: string }) => any
|
|
93
|
+
/**
|
|
94
|
+
* 展开/收起完整月历时触发
|
|
95
|
+
*/
|
|
96
|
+
onToggleFull?: (payload: { show: boolean; source: string }) => any
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare interface _CalendarStrip {
|
|
100
|
+
new (): {
|
|
101
|
+
$props: AllowedComponentProps &
|
|
102
|
+
VNodeProps &
|
|
103
|
+
CalendarStripProps
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare interface _CalendarStripRef {
|
|
108
|
+
prevMonth: () => void
|
|
109
|
+
nextMonth: () => void
|
|
110
|
+
toggleFull: () => void
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare const CalendarStrip: _CalendarStrip
|
|
114
|
+
|
|
115
|
+
export declare const CalendarStripRef: _CalendarStripRef
|
|
116
|
+
|