uview-plus 3.8.55 → 3.8.106
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 +2147 -1828
- package/components/u-action-sheet/props.js +3 -1
- package/components/u-action-sheet/u-action-sheet.vue +22 -2
- package/components/u-album/props.js +3 -1
- package/components/u-alert/props.js +4 -2
- package/components/u-avatar/props.js +4 -1
- package/components/u-avatar-group/props.js +4 -1
- package/components/u-back-top/props.js +4 -1
- package/components/u-badge/props.js +4 -1
- package/components/u-barcode/u-barcode.vue +44 -15
- package/components/u-box/props.js +5 -2
- package/components/u-button/props.js +4 -1
- package/components/u-button/u-button.vue +2 -5
- package/components/u-button/vue.scss +3 -3
- package/components/u-calendar/calendar.js +8 -0
- package/components/u-calendar/props.js +43 -1
- package/components/u-calendar/u-calendar.vue +16 -0
- package/components/u-calendar-strip/props.js +3 -1
- package/components/u-canvas/u-canvas.vue +1028 -423
- package/components/u-car-keyboard/props.js +3 -1
- package/components/u-card/props.js +3 -1
- package/components/u-cell/props.js +4 -1
- package/components/u-cell/u-cell.vue +9 -1
- package/components/u-cell-group/props.js +4 -1
- package/components/u-checkbox/props.js +4 -1
- package/components/u-checkbox/u-checkbox.vue +7 -3
- package/components/u-checkbox-group/props.js +3 -1
- package/components/u-circle-progress/props.js +4 -1
- package/components/u-code/props.js +4 -1
- package/components/u-code-input/props.js +4 -1
- package/components/u-col/props.js +4 -1
- package/components/u-collapse/props.js +4 -1
- package/components/u-collapse-item/props.js +4 -1
- package/components/u-color-picker/u-color-picker.vue +1 -0
- package/components/u-column-notice/props.js +4 -1
- package/components/u-count-down/props.js +4 -1
- package/components/u-count-to/props.js +4 -1
- package/components/u-cropper/u-cropper.vue +95 -51
- package/components/u-datetime-picker/props.js +4 -1
- package/components/u-datetime-picker/u-datetime-picker.vue +53 -4
- package/components/u-divider/props.js +4 -1
- package/components/u-dragsort/u-dragsort.vue +57 -32
- package/components/u-dropdown/props.js +3 -1
- package/components/u-dropdown-item/props.js +3 -1
- package/components/u-empty/props.js +4 -1
- package/components/u-form/props.js +4 -1
- package/components/u-form-item/props.js +4 -1
- package/components/u-gap/props.js +4 -1
- package/components/u-grid/props.js +4 -1
- package/components/u-grid-item/props.js +4 -1
- package/components/u-guide/props.js +3 -1
- package/components/u-icon/props.js +4 -1
- package/components/u-icon/u-icon.vue +11 -2
- package/components/u-icon/upicon.ttf +0 -0
- package/components/u-icon/util.js +103 -10
- package/components/u-image/props.js +4 -1
- package/components/u-image/u-image.vue +280 -267
- package/components/u-index-anchor/props.js +4 -1
- package/components/u-index-item/props.js +2 -1
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/props.js +4 -1
- package/components/u-index-list/u-index-list.vue +1 -1
- package/components/u-input/props.js +3 -1
- package/components/u-keyboard/props.js +4 -1
- package/components/u-line/props.js +4 -1
- package/components/u-line-progress/props.js +6 -3
- package/components/u-link/props.js +4 -1
- package/components/u-list/props.js +4 -1
- package/components/u-list-item/props.js +4 -1
- package/components/u-loading-icon/props.js +4 -1
- package/components/u-loading-page/props.js +3 -1
- package/components/u-loadmore/props.js +4 -1
- package/components/u-markdown/u-markdown.vue +45 -3
- package/components/u-modal/props.js +4 -1
- package/components/u-navbar/props.js +4 -2
- package/components/u-navbar/u-navbar.vue +15 -9
- package/components/u-no-network/props.js +4 -1
- package/components/u-notice-bar/props.js +4 -1
- package/components/u-notify/props.js +4 -1
- package/components/u-novel-reader/content-normalizer.js +80 -0
- package/components/u-novel-reader/layout-engine.js +225 -0
- package/components/u-novel-reader/measure-adapter.js +69 -0
- package/components/u-novel-reader/novelReader.js +35 -0
- package/components/u-novel-reader/persistence.js +144 -0
- package/components/u-novel-reader/props.js +100 -0
- package/components/u-novel-reader/reader-catalog.vue +234 -0
- package/components/u-novel-reader/reader-content.vue +226 -0
- package/components/u-novel-reader/reader-core.js +151 -0
- package/components/u-novel-reader/reader-settings.vue +325 -0
- package/components/u-novel-reader/reader-toolbar.vue +313 -0
- package/components/u-novel-reader/theme-vars.scss +49 -0
- package/components/u-novel-reader/u-novel-reader.vue +836 -0
- package/components/u-number-box/props.js +4 -1
- package/components/u-number-box/u-number-box.vue +2 -2
- package/components/u-number-keyboard/props.js +4 -1
- package/components/u-overlay/props.js +4 -1
- package/components/u-pagination/u-pagination.vue +60 -39
- package/components/u-parse/props.js +4 -1
- package/components/u-picker/props.js +4 -1
- package/components/u-picker-column/props.js +3 -1
- package/components/u-popover/props.js +2 -1
- package/components/u-popup/props.js +4 -1
- package/components/u-poster/u-poster.vue +246 -214
- package/components/u-qrcode/qrcode.js +105 -97
- package/components/u-qrcode/u-qrcode.vue +242 -289
- package/components/u-radio/props.js +4 -1
- package/components/u-radio/u-radio.vue +7 -3
- package/components/u-radio-group/props.js +4 -1
- package/components/u-rate/props.js +4 -1
- package/components/u-read-more/props.js +4 -1
- package/components/u-row/props.js +4 -1
- package/components/u-row-notice/props.js +4 -1
- package/components/u-safe-bottom/props.js +2 -1
- package/components/u-scroll-list/props.js +4 -1
- package/components/u-scroll-list/scrollWxs.wxs +1 -1
- package/components/u-search/props.js +3 -1
- package/components/u-skeleton/props.js +4 -1
- package/components/u-slider/props.js +3 -1
- package/components/u-slider/u-slider.vue +71 -29
- package/components/u-status-bar/props.js +4 -1
- package/components/u-steps/props.js +4 -1
- package/components/u-steps-item/props.js +4 -1
- package/components/u-sticky/props.js +4 -1
- package/components/u-sticky/u-sticky.vue +11 -0
- package/components/u-subsection/props.js +3 -1
- package/components/u-swipe-action/props.js +4 -1
- package/components/u-swipe-action-item/index.wxs +43 -25
- package/components/u-swipe-action-item/nvue.js +9 -0
- package/components/u-swipe-action-item/other.js +32 -21
- package/components/u-swipe-action-item/props.js +9 -1
- package/components/u-swipe-action-item/swipeActionItem.js +1 -0
- package/components/u-swipe-action-item/u-swipe-action-item.vue +42 -4
- package/components/u-swiper/props.js +9 -1
- package/components/u-swiper/swiper.js +1 -0
- package/components/u-swiper/u-swiper.vue +2 -0
- package/components/u-swiper-indicator/props.js +4 -1
- package/components/u-switch/props.js +4 -1
- package/components/u-switch/u-switch.vue +1 -1
- package/components/u-tabbar/props.js +3 -1
- package/components/u-tabbar/u-tabbar.vue +2 -1
- package/components/u-tabbar-item/props.js +4 -1
- package/components/u-tabbar-item/u-tabbar-item.vue +64 -21
- package/components/u-table/props.js +3 -1
- package/components/u-table2/tableRow.vue +155 -69
- package/components/u-table2/u-table2.vue +327 -137
- package/components/u-tabs/props.js +4 -1
- package/components/u-tabs/u-tabs.vue +11 -8
- package/components/u-tabs-item/props.js +3 -1
- package/components/u-tabs-pro/u-tabs-pro.vue +212 -0
- package/components/u-tag/props.js +4 -1
- package/components/u-td/props.js +3 -1
- package/components/u-text/props.js +4 -1
- package/components/u-text/text.js +1 -1
- package/components/u-text/u-text.vue +18 -6
- package/components/u-textarea/props.js +3 -1
- package/components/u-textarea/u-textarea.vue +16 -5
- package/components/u-th/props.js +3 -1
- package/components/u-toolbar/props.js +4 -1
- package/components/u-tooltip/props.js +10 -2
- package/components/u-tooltip/tooltip.js +2 -1
- package/components/u-tooltip/u-tooltip.vue +31 -3
- package/components/u-tr/props.js +3 -1
- package/components/u-transition/nvue-ani-map.js +75 -68
- package/components/u-transition/props.js +4 -1
- package/components/u-transition/transitionMixin.js +164 -163
- package/components/u-upload/props.js +4 -1
- package/components/u-upload/u-upload.vue +48 -41
- package/components/u-waterfall/u-waterfall.vue +162 -110
- package/index.js +65 -8
- package/libs/config/config.js +1 -1
- package/libs/config/props.js +180 -204
- package/libs/css/components.scss +3 -0
- package/libs/function/index.js +66 -0
- package/libs/function/uni-api-shims.js +29 -0
- package/libs/i18n/index.js +71 -36
- package/libs/i18n/locale-packs.js +11 -0
- package/libs/i18n/locales/all.js +23 -0
- package/libs/i18n/locales/{de.json → de.js} +1 -1
- package/libs/i18n/locales/{en.json → en.js} +2 -2
- package/libs/i18n/locales/{es.json → es.js} +1 -1
- package/libs/i18n/locales/{fr.json → fr.js} +2 -2
- package/libs/i18n/locales/{ja.json → ja.js} +1 -1
- package/libs/i18n/locales/{ko.json → ko.js} +1 -1
- package/libs/i18n/locales/{ru.json → ru.js} +1 -1
- package/libs/i18n/locales/{th.json → th.js} +1 -1
- package/libs/i18n/locales/{zh-Hans.json → zh-Hans.js} +1 -1
- package/libs/i18n/locales/{zh-Hant.json → zh-Hant.js} +1 -1
- package/libs/mixin/mixin.js +18 -54
- package/libs/root/index.js +78 -5
- package/libs/root/page.js +7 -7
- package/libs/root/root.js +73 -3
- package/libs/util/app-nvue-webview-canvas.js +486 -0
- package/libs/util/gcanvas/bridge/bridge-weex.js +10 -7
- package/libs/util/gcanvas/context-2d/FillStyleLinearGradient.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStylePattern.js +0 -0
- package/libs/util/gcanvas/context-2d/FillStyleRadialGradient.js +0 -0
- package/libs/util/gcanvas/context-2d/RenderingContext.js +0 -0
- package/libs/util/gcanvas/context-webgl/ActiveInfo.js +0 -0
- package/libs/util/gcanvas/context-webgl/Buffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/Framebuffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLenum.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLmethod.js +0 -0
- package/libs/util/gcanvas/context-webgl/GLtype.js +0 -0
- package/libs/util/gcanvas/context-webgl/Program.js +0 -0
- package/libs/util/gcanvas/context-webgl/Renderbuffer.js +0 -0
- package/libs/util/gcanvas/context-webgl/RenderingContext.js +0 -0
- package/libs/util/gcanvas/context-webgl/Shader.js +0 -0
- package/libs/util/gcanvas/context-webgl/ShaderPrecisionFormat.js +0 -0
- package/libs/util/gcanvas/context-webgl/Texture.js +0 -0
- package/libs/util/gcanvas/context-webgl/UniformLocation.js +0 -0
- package/libs/util/gcanvas/context-webgl/classUtils.js +0 -0
- package/libs/util/gcanvas/env/canvas.js +0 -0
- package/libs/util/gcanvas/env/image.js +0 -0
- package/libs/util/gcanvas/env/tool.js +0 -0
- package/libs/util/gcanvas/index.js +3 -3
- package/package.json +4 -5
- package/tsconfig.json +18 -0
- package/types/comps/calendar.d.ts +38 -0
- package/types/comps/checkbox.d.ts +12 -0
- package/types/comps/lineProgress.d.ts +5 -0
- package/types/comps/navbar.d.ts +3 -3
- package/types/comps/swipeActionItem.d.ts +13 -0
- package/types/comps/swiper.d.ts +5 -0
- package/types/comps/tabs.d.ts +2 -1
- package/types/comps/text.d.ts +1 -1
- package/types/comps/tooltip.d.ts +36 -1
- package/types/func.d.ts +23 -0
- package/types/index.d.ts +1 -0
- /package/components/u-markdown/{marked.esm.js → marked.esm.mjs} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import NumberBoxDefaultProps from './numberBox'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(NumberBoxDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 步进器标识符,在change回调返回
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
@blur="onBlur"
|
|
42
42
|
@focus="onFocus"
|
|
43
43
|
@input="onInput"
|
|
44
|
-
type="number"
|
|
44
|
+
:type="integer ? 'number' : 'digit'"
|
|
45
45
|
:style="[inputStyle]"
|
|
46
46
|
/>
|
|
47
47
|
<!-- #endif -->
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
@blur="onBlur"
|
|
56
56
|
@focus="onFocus"
|
|
57
57
|
@input="onInput"
|
|
58
|
-
type="number"
|
|
58
|
+
:type="integer ? 'number' : 'digit'"
|
|
59
59
|
:style="[inputStyle]"
|
|
60
60
|
/>
|
|
61
61
|
<!-- #endif -->
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import NumberKeyboardDefaultProps from './numberKeyboard'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(NumberKeyboardDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 键盘的类型,number-数字键盘,card-身份证键盘
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import OverlayDefaultProps from './overlay'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(OverlayDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 是否显示遮罩
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="u-pagination">
|
|
3
|
-
|
|
4
|
-
<!-- 上一页按钮 -->
|
|
1
|
+
<template>
|
|
2
|
+
<view class="u-pagination">
|
|
3
|
+
<!-- 上一页按钮 -->
|
|
5
4
|
<view
|
|
6
5
|
:class="[
|
|
7
6
|
'u-pagination-btn',
|
|
@@ -30,23 +29,23 @@
|
|
|
30
29
|
</view>
|
|
31
30
|
</template>
|
|
32
31
|
|
|
33
|
-
<!-- 总数显示 -->
|
|
34
|
-
<view v-if="total > 0 && layout.includes('total')" class="u-pagination-total">
|
|
35
|
-
{{
|
|
36
|
-
</view>
|
|
37
|
-
|
|
38
|
-
<!-- 每页数量选择器 -->
|
|
39
|
-
|
|
40
|
-
v-if="layout.includes('sizes')"
|
|
41
|
-
mode="selector"
|
|
42
|
-
:range="
|
|
43
|
-
range-key="label"
|
|
44
|
-
:value="pageSizeIndex"
|
|
45
|
-
@change="handleSizeChange"
|
|
46
|
-
class="u-pagination-sizes"
|
|
47
|
-
>
|
|
48
|
-
<view>{{ pageSizeLabel }}</view>
|
|
49
|
-
</picker>
|
|
32
|
+
<!-- 总数显示 -->
|
|
33
|
+
<view v-if="total > 0 && layout.includes('total')" class="u-pagination-total">
|
|
34
|
+
共 {{ total }} 条
|
|
35
|
+
</view>
|
|
36
|
+
|
|
37
|
+
<!-- 每页数量选择器 -->
|
|
38
|
+
<picker
|
|
39
|
+
v-if="layout.includes('sizes') && normalizedPageSizes.length"
|
|
40
|
+
mode="selector"
|
|
41
|
+
:range="normalizedPageSizes"
|
|
42
|
+
range-key="label"
|
|
43
|
+
:value="pageSizeIndex"
|
|
44
|
+
@change="handleSizeChange"
|
|
45
|
+
class="u-pagination-sizes"
|
|
46
|
+
>
|
|
47
|
+
<view>{{ pageSizeLabel }}</view>
|
|
48
|
+
</picker>
|
|
50
49
|
|
|
51
50
|
<!-- 下一页按钮 -->
|
|
52
51
|
<view
|
|
@@ -139,17 +138,38 @@ export default {
|
|
|
139
138
|
};
|
|
140
139
|
},
|
|
141
140
|
computed: {
|
|
142
|
-
totalPages() {
|
|
143
|
-
return Math.max(1, Math.ceil(this.total / this.pageSize));
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
141
|
+
totalPages() {
|
|
142
|
+
return Math.max(1, Math.ceil(this.total / this.pageSize));
|
|
143
|
+
},
|
|
144
|
+
normalizedPageSizes() {
|
|
145
|
+
if (!Array.isArray(this.pageSizes)) return [];
|
|
146
|
+
return this.pageSizes
|
|
147
|
+
.map(size => {
|
|
148
|
+
if (typeof size === 'number' || typeof size === 'string') {
|
|
149
|
+
return {
|
|
150
|
+
label: `${size}条/页`,
|
|
151
|
+
value: Number(size)
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
if (size && typeof size === 'object') {
|
|
155
|
+
const value = Number(size.value);
|
|
156
|
+
return {
|
|
157
|
+
label: size.label || `${value}条/页`,
|
|
158
|
+
value
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
return null;
|
|
162
|
+
})
|
|
163
|
+
.filter(size => size && !isNaN(size.value));
|
|
164
|
+
},
|
|
165
|
+
pageSizeIndex() {
|
|
166
|
+
const index = this.normalizedPageSizes.findIndex(size => size.value === this.pageSize);
|
|
167
|
+
return index >= 0 ? index : 0;
|
|
168
|
+
},
|
|
169
|
+
pageSizeLabel() {
|
|
170
|
+
const found = this.normalizedPageSizes.find(size => size.value === this.pageSize);
|
|
171
|
+
return found?.label || this.pageSize;
|
|
172
|
+
},
|
|
153
173
|
displayedPages() {
|
|
154
174
|
const total = this.totalPages;
|
|
155
175
|
const current = this.currentPage;
|
|
@@ -197,13 +217,14 @@ export default {
|
|
|
197
217
|
}
|
|
198
218
|
},
|
|
199
219
|
methods: {
|
|
200
|
-
t,
|
|
201
|
-
handleSizeChange(e) {
|
|
202
|
-
const selected = e.detail.value;
|
|
203
|
-
const size = this.
|
|
204
|
-
|
|
205
|
-
this.$emit('
|
|
206
|
-
|
|
220
|
+
t,
|
|
221
|
+
handleSizeChange(e) {
|
|
222
|
+
const selected = Number(e.detail.value);
|
|
223
|
+
const size = this.normalizedPageSizes[selected]?.value || this.normalizedPageSizes[0]?.value;
|
|
224
|
+
if (!size) return;
|
|
225
|
+
this.$emit('update:pageSize', size);
|
|
226
|
+
this.$emit('size-change', size);
|
|
227
|
+
},
|
|
207
228
|
prev() {
|
|
208
229
|
if (this.currentPage > 1) {
|
|
209
230
|
this.goTo(this.currentPage - 1);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import ParseDefaultProps from './parse'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(ParseDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
containerStyle: {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import PickerDefaultProps from './picker'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(PickerDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
modelValue: {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
|
+
|
|
4
|
+
const defProps = registerComponentProps({ pickerColumn: {} })
|
|
3
5
|
export const props = defineMixin({
|
|
4
6
|
props: {
|
|
5
7
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
3
3
|
|
|
4
|
+
const defProps = registerComponentProps({ popover: {} })
|
|
4
5
|
export const props = defineMixin({
|
|
5
6
|
props: {
|
|
6
7
|
// 显示的文字内容
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { defineMixin } from '../../libs/vue'
|
|
2
|
-
import
|
|
2
|
+
import PopupDefaultProps from './popup'
|
|
3
|
+
import { registerComponentProps } from '../../libs/config/props.js'
|
|
4
|
+
|
|
5
|
+
const defProps = registerComponentProps(PopupDefaultProps)
|
|
3
6
|
export const props = defineMixin({
|
|
4
7
|
props: {
|
|
5
8
|
// 是否展示弹窗
|