uview-plus 3.5.5 → 3.5.15
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 +35 -0
- package/components/u-calendar/month.vue +1 -1
- package/components/u-calendar/u-calendar.vue +2 -2
- package/components/u-color-picker/u-color-picker.vue +1095 -0
- package/components/u-datetime-picker/datetimePicker.js +1 -0
- package/components/u-datetime-picker/props.js +5 -0
- package/components/u-datetime-picker/u-datetime-picker.vue +4 -3
- package/components/u-input/props.js +6 -1
- package/components/u-input/u-input.vue +9 -2
- package/components/u-pdf-reader/props.js +19 -0
- package/components/u-pdf-reader/u-pdf-reader.vue +52 -0
- package/components/u-picker/picker.js +2 -1
- package/components/u-picker/props.js +6 -1
- package/components/u-picker/u-picker.vue +2 -1
- package/components/u-popup/props.js +2 -2
- package/components/u-poster/u-poster.vue +622 -0
- package/components/u-qrcode/u-qrcode.vue +18 -12
- package/components/u-search/props.js +152 -134
- package/components/u-search/u-search.vue +14 -2
- package/components/u-short-video/u-short-video.vue +463 -0
- package/components/u-slider/props.js +5 -1
- package/components/u-slider/slider.js +2 -1
- package/components/u-slider/u-slider.vue +8 -3
- package/components/u-tabbar/props.js +10 -0
- package/components/u-tabbar/tabbar.js +3 -1
- package/components/u-tabbar/u-tabbar.vue +7 -0
- package/package.json +1 -1
|
@@ -163,6 +163,11 @@ export const props = defineMixin({
|
|
|
163
163
|
defaultIndex: {
|
|
164
164
|
type: Array,
|
|
165
165
|
default: () => defProps.datetimePicker.defaultIndex
|
|
166
|
+
},
|
|
167
|
+
// 是否页面内展示
|
|
168
|
+
pageInline:{
|
|
169
|
+
type: Boolean,
|
|
170
|
+
default: () => defProps.datetimePicker.pageInline
|
|
166
171
|
}
|
|
167
172
|
}
|
|
168
173
|
})
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
v-model="inputValue"
|
|
10
10
|
v-bind="inputPropsInner"
|
|
11
11
|
></up-input>
|
|
12
|
-
<
|
|
13
|
-
</
|
|
12
|
+
<view class="input-cover">
|
|
13
|
+
</view>
|
|
14
14
|
</slot>
|
|
15
15
|
</view>
|
|
16
16
|
<u-picker
|
|
17
17
|
ref="picker"
|
|
18
|
-
:show="show || (hasInput && showByClickInput)"
|
|
18
|
+
:show="pageInline || show || (hasInput && showByClickInput)"
|
|
19
19
|
:popupMode="popupMode"
|
|
20
20
|
:closeOnClickOverlay="closeOnClickOverlay"
|
|
21
21
|
:columns="columns"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
:cancelColor="cancelColor"
|
|
30
30
|
:confirmColor="confirmColor"
|
|
31
31
|
:toolbarRightSlot="toolbarRightSlot"
|
|
32
|
+
:pageInline="pageInline"
|
|
32
33
|
@close="close"
|
|
33
34
|
@cancel="cancel"
|
|
34
35
|
@confirm="confirm"
|
|
@@ -44,7 +44,12 @@ export const props = defineMixin({
|
|
|
44
44
|
// 是否显示清除控件
|
|
45
45
|
clearable: {
|
|
46
46
|
type: Boolean,
|
|
47
|
-
default:
|
|
47
|
+
default: false
|
|
48
|
+
},
|
|
49
|
+
// 是否仅在聚焦时显示清除控件
|
|
50
|
+
onlyClearableOnFocused: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: true
|
|
48
53
|
},
|
|
49
54
|
// 是否密码类型
|
|
50
55
|
password: {
|
|
@@ -205,8 +205,15 @@ export default {
|
|
|
205
205
|
},
|
|
206
206
|
// 是否显示清除控件
|
|
207
207
|
isShowClear() {
|
|
208
|
-
const { clearable, readonly, focused, innerValue } = this;
|
|
209
|
-
|
|
208
|
+
const { clearable, readonly, focused, innerValue, onlyClearableOnFocused } = this;
|
|
209
|
+
if (!clearable || readonly) {
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
if (onlyClearableOnFocused) {
|
|
213
|
+
return !!focused && innerValue !== "";
|
|
214
|
+
} else {
|
|
215
|
+
return innerValue !== "";
|
|
216
|
+
}
|
|
210
217
|
},
|
|
211
218
|
// 组件的类名
|
|
212
219
|
inputClass() {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
// PDF文件地址
|
|
4
|
+
src: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: ''
|
|
7
|
+
},
|
|
8
|
+
// 组件高度
|
|
9
|
+
height: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: '700px'
|
|
12
|
+
},
|
|
13
|
+
// pdfjs资源域名
|
|
14
|
+
baseUrl: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'https://uview-plus.jiangruyi.com/h5'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="up-pdf-reader" :style="{ height: height }">
|
|
3
|
+
<web-view :fullscreen="false"
|
|
4
|
+
:src="viewerUrl" :style="{ width: '750rpx', height: height }"
|
|
5
|
+
:webview-styles="{ width: '750rpx', height: height }"
|
|
6
|
+
frameborder="0"
|
|
7
|
+
></web-view>
|
|
8
|
+
</view>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import props from './props.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* pdfReader PDF阅读器
|
|
16
|
+
* @description 基于pdf.js的PDF阅读器组件
|
|
17
|
+
* @tutorial https://uview-plus.jiangruyi.com/components/pdfReader.html
|
|
18
|
+
* @property {String} src PDF文件地址
|
|
19
|
+
* @property {String} height 组件高度,默认为'700px'
|
|
20
|
+
* @property {String} pdfjsDomain pdfjs资源域名,默认为'https://uview-plus.jiangruyi.com/h5'
|
|
21
|
+
* @example <up-pdf-reader src="https://example.com/file.pdf"></up-pdf-reader>
|
|
22
|
+
*/
|
|
23
|
+
export default {
|
|
24
|
+
name: 'up-pdf-reader',
|
|
25
|
+
mixins: [props],
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
baseUrlInner: 'https://uview-plus.jiangruyi.com/h5',
|
|
29
|
+
viewerUrl: ''
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
watch: {
|
|
33
|
+
baseUrl: function (val) {
|
|
34
|
+
this.baseUrl = val;
|
|
35
|
+
},
|
|
36
|
+
src: function (val) {
|
|
37
|
+
this.viewerUrl = `${this.baseUrlInner}/static/pdfjs/web/viewer.html?file=` + encodeURIComponent(val);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
mounted() {
|
|
41
|
+
if (this.baseUrl) {
|
|
42
|
+
this.baseUrlInner = this.baseUrl;
|
|
43
|
+
}
|
|
44
|
+
this.viewerUrl = `${this.baseUrlInner}/static/pdfjs/web/viewer.html?file=` + encodeURIComponent(this.src);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style lang="scss" scoped>
|
|
50
|
+
.up-pdf-reader {
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -142,6 +142,11 @@ export const props = defineMixin({
|
|
|
142
142
|
overlayOpacity: {
|
|
143
143
|
type: [Number, String],
|
|
144
144
|
default: () => defProps.picker.overlayOpacity
|
|
145
|
-
}
|
|
145
|
+
},
|
|
146
|
+
// 是否页面内展示
|
|
147
|
+
pageInline:{
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: () => defProps.picker.pageInline
|
|
150
|
+
}
|
|
146
151
|
}
|
|
147
152
|
})
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
v-model="inputLabel"
|
|
12
12
|
v-bind="inputPropsInner">
|
|
13
13
|
</up-input>
|
|
14
|
-
<
|
|
14
|
+
<view class="input-cover"></view>
|
|
15
15
|
</view>
|
|
16
16
|
<u-popup
|
|
17
17
|
:show="show || (hasInput && showByClickInput)"
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:bgColor="bgColor"
|
|
21
21
|
:round="round"
|
|
22
22
|
:duration="duration"
|
|
23
|
+
:pageInline="pageInline"
|
|
23
24
|
:overlayOpacity="overlayOpacity"
|
|
24
25
|
@close="closeHandler"
|
|
25
26
|
>
|