@10yun/cv-mobile-ui 0.5.44 → 0.5.46
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/build/parse-pages.js +20 -127
- package/libs/permission.js +256 -244
- package/libs/request-permission.js +40 -0
- package/other/u-charts/config.js +503 -0
- package/other/u-charts/data.json +1143 -0
- package/other/u-charts/demodata.json +267 -0
- package/other/u-charts/mapdata.json +41 -0
- package/other/u-charts/u-charts.js +5687 -5395
- package/other/u-charts/u-charts.min.js +1 -0
- package/other/u-charts/u-charts.vue +466 -0
- package/other/uParse/components/wxParseAudio.vue +1 -1
- package/other/uParse/components/wxParseImg.vue +8 -3
- package/package.json +1 -1
- package/ui-cv/components/cv-filter-hm/cv-filter-hm.vue +99 -75
- package/ui-cv/components/cv-geo-local/cv-geo-local.vue +1 -1
- package/ui-cv/components/cv-upload-image/demo.vue +407 -0
- package/ui-fireui/fireui.css +1445 -0
- package/ui-fireui/libs/fui-color-analysis/fui-color-analysis.js +1 -0
- package/ui-fireui/libs/fui-zh-pinyin/fui-zh-pinyin.js +1 -0
- package/ui-sdks/sdk-privacy-policy/sdk-privacy-policy.vue +1 -1
- package/uview-plus/README.md +2 -1
- package/uview-plus/changelog.md +593 -0
- package/uview-plus/components/u-action-sheet/_doc/readme.md +2 -2
- package/uview-plus/components/u-action-sheet/actionSheet.js +4 -4
- package/uview-plus/components/u-action-sheet/props.js +8 -0
- package/uview-plus/components/u-action-sheet/style.css +0 -26
- package/uview-plus/components/u-action-sheet/style.scss +0 -1
- package/uview-plus/components/u-action-sheet/u-action-sheet.vue +22 -1
- package/uview-plus/components/u-agreement/style.css +10 -0
- package/uview-plus/components/u-agreement/style.scss +12 -0
- package/uview-plus/components/u-agreement/u-agreement.vue +65 -0
- package/uview-plus/components/u-album/album.js +3 -3
- package/uview-plus/components/u-album/props.js +9 -0
- package/uview-plus/components/u-album/style.css +0 -26
- package/uview-plus/components/u-album/style.scss +0 -2
- package/uview-plus/components/u-album/u-album.vue +86 -21
- package/uview-plus/components/u-alert/alert.js +9 -5
- package/uview-plus/components/u-alert/props.js +29 -0
- package/uview-plus/components/u-alert/style.css +0 -26
- package/uview-plus/components/u-alert/style.scss +0 -2
- package/uview-plus/components/u-alert/u-alert.vue +48 -7
- package/uview-plus/components/u-app-update/_doc/readme.md +2 -2
- package/uview-plus/components/u-avatar/style.css +0 -26
- package/uview-plus/components/u-avatar/style.scss +0 -2
- package/uview-plus/components/u-avatar/u-avatar.vue +1 -1
- package/uview-plus/components/u-avatar-group/style.css +0 -26
- package/uview-plus/components/u-avatar-group/style.scss +0 -2
- package/uview-plus/components/u-avatar-group/u-avatar-group.vue +1 -1
- package/uview-plus/components/u-back-top/style.css +0 -26
- package/uview-plus/components/u-back-top/style.scss +0 -1
- package/uview-plus/components/u-badge/style.css +0 -26
- package/uview-plus/components/u-badge/style.scss +0 -2
- package/uview-plus/components/u-barcode/u-barcode.vue +1062 -0
- package/uview-plus/components/u-box/style.css +0 -26
- package/uview-plus/components/u-box/style.scss +0 -2
- package/uview-plus/components/{u-button-wu → u-button}/_doc/readme.md +2 -2
- package/uview-plus/components/u-button/style.css +0 -26
- package/uview-plus/components/u-button/style.scss +3 -4
- package/uview-plus/components/{u-button-wu/style.scss → u-button/style2.scss} +0 -1
- package/uview-plus/components/{u-button-wu → u-button}/u-button-wu.vue +2 -2
- package/uview-plus/components/u-button/u-button.vue +9 -9
- package/uview-plus/components/u-calendar/calendar.js +10 -7
- package/uview-plus/components/u-calendar/header.vue +1 -1
- package/uview-plus/components/u-calendar/month.vue +14 -6
- package/uview-plus/components/u-calendar/props.js +9 -0
- package/uview-plus/components/u-calendar/style.css +0 -26
- package/uview-plus/components/u-calendar/style.scss +0 -2
- package/uview-plus/components/u-calendar/u-calendar.vue +41 -8
- package/uview-plus/components/u-calendar/util.js +1 -1
- package/uview-plus/components/u-calendar-wu/_doc/readme.md +2 -2
- package/uview-plus/components/u-car-keyboard/style.css +0 -26
- package/uview-plus/components/u-car-keyboard/style.scss +0 -1
- package/uview-plus/components/u-card/style.css +0 -26
- package/uview-plus/components/u-card/style.scss +0 -2
- package/uview-plus/components/u-cascader/style.css +16 -0
- package/uview-plus/components/u-cascader/style.scss +25 -0
- package/uview-plus/components/u-cascader/u-cascader.vue +323 -0
- package/uview-plus/components/u-cate-tab/style.css +1 -0
- package/uview-plus/components/u-cate-tab/style.scss +1 -0
- package/uview-plus/components/u-cate-tab/u-cate-tab.vue +1 -1
- package/uview-plus/components/u-cell/_doc/readme.md +2 -2
- package/uview-plus/components/u-cell/style.css +0 -26
- package/uview-plus/components/u-cell/style.scss +0 -2
- package/uview-plus/components/u-cell-group/style.css +0 -26
- package/uview-plus/components/u-cell-group/style.scss +0 -2
- package/uview-plus/components/u-checkbox/_doc/readme.md +2 -2
- package/uview-plus/components/u-checkbox/style.css +3 -27
- package/uview-plus/components/u-checkbox/style.scss +0 -1
- package/uview-plus/components/u-checkbox/u-checkbox.vue +7 -6
- package/uview-plus/components/u-checkbox-group/style.css +0 -26
- package/uview-plus/components/u-checkbox-group/style.scss +0 -2
- package/uview-plus/components/u-checkbox-group/u-checkbox-group.vue +1 -1
- package/uview-plus/components/u-choose/style.css +13 -0
- package/uview-plus/components/u-choose/style.scss +17 -0
- package/uview-plus/components/u-choose/u-choose.vue +93 -0
- package/uview-plus/components/u-circle-progress/style.css +0 -26
- package/uview-plus/components/u-circle-progress/style.scss +0 -2
- package/uview-plus/components/u-circle-progress/u-circle-progress.vue +1 -1
- package/uview-plus/components/u-city-locate/style.css +20 -0
- package/uview-plus/components/u-city-locate/style.scss +20 -0
- package/uview-plus/components/u-city-locate/u-city-locate.vue +1 -0
- package/uview-plus/components/u-code/_doc/readme.md +2 -2
- package/uview-plus/components/u-code/code.js +5 -5
- package/uview-plus/components/u-code/u-code.vue +2 -4
- package/uview-plus/components/u-code-input/style.css +0 -26
- package/uview-plus/components/u-code-input/style.scss +0 -1
- package/uview-plus/components/u-code-input/u-code-input.vue +1 -1
- package/uview-plus/components/u-col/style.css +0 -26
- package/uview-plus/components/u-col/style.scss +0 -2
- package/uview-plus/components/u-col/u-col.vue +1 -1
- package/uview-plus/components/u-collapse/u-collapse.vue +2 -4
- package/uview-plus/components/u-collapse-item/style.css +0 -26
- package/uview-plus/components/u-collapse-item/style.scss +0 -2
- package/uview-plus/components/u-collapse-item/u-collapse-item.vue +2 -2
- package/uview-plus/components/u-color-picker/style.css +246 -0
- package/uview-plus/components/u-color-picker/style.scss +299 -0
- package/uview-plus/components/u-color-picker/u-color-picker.vue +702 -0
- package/uview-plus/components/u-column-notice/style.css +0 -26
- package/uview-plus/components/u-column-notice/style.scss +0 -2
- package/uview-plus/components/u-column-notice/u-column-notice.vue +1 -1
- package/uview-plus/components/u-copy/u-copy.vue +7 -5
- package/uview-plus/components/u-count-down/style.css +0 -26
- package/uview-plus/components/u-count-down/style.scss +0 -1
- package/uview-plus/components/u-count-down/u-count-down.vue +2 -1
- package/uview-plus/components/u-count-to/style.css +0 -26
- package/uview-plus/components/u-count-to/style.scss +0 -2
- package/uview-plus/components/u-count-to/u-count-to.vue +1 -1
- package/uview-plus/components/u-coupon/style.css +214 -0
- package/uview-plus/components/u-coupon/style.scss +246 -0
- package/uview-plus/components/u-coupon/u-coupon.vue +166 -0
- package/uview-plus/components/u-cropper/style.css +91 -0
- package/uview-plus/components/u-cropper/style.scss +93 -0
- package/uview-plus/components/u-cropper/u-cropper.vue +1 -0
- package/uview-plus/components/u-datetime-picker/datetimePicker.js +5 -3
- package/uview-plus/components/u-datetime-picker/dayjs.esm.min.js +7 -0
- package/uview-plus/components/u-datetime-picker/props.js +5 -0
- package/uview-plus/components/u-datetime-picker/style.css +0 -26
- package/uview-plus/components/u-datetime-picker/style.scss +0 -1
- package/uview-plus/components/u-datetime-picker/u-datetime-picker.vue +29 -6
- package/uview-plus/components/u-divider/style.css +0 -26
- package/uview-plus/components/u-divider/style.scss +0 -1
- package/uview-plus/components/u-divider/u-divider.vue +4 -2
- package/uview-plus/components/{u-drag-sort → u-dragsort}/_doc/readme.md +2 -2
- package/uview-plus/components/u-dragsort/style.css +40 -0
- package/uview-plus/components/u-dragsort/style.scss +52 -0
- package/uview-plus/components/u-dragsort/u-dragsort.vue +310 -0
- package/uview-plus/components/u-dropdown/style.css +0 -26
- package/uview-plus/components/u-dropdown/style.scss +0 -2
- package/uview-plus/components/u-dropdown/u-dropdown.vue +16 -8
- package/uview-plus/components/u-dropdown-item/style.css +0 -26
- package/uview-plus/components/u-dropdown-item/style.scss +0 -1
- package/uview-plus/components/u-dropdown-item/u-dropdown-item.vue +1 -1
- package/uview-plus/components/u-empty/style.css +0 -26
- package/uview-plus/components/u-empty/style.scss +0 -1
- package/{uview-ui/components/u-empty/u-empty.vue → uview-plus/components/u-empty/u-empty-new.vue} +16 -12
- package/uview-plus/components/u-empty/u-empty.vue +17 -2
- package/uview-plus/components/u-float-button/style.css +0 -26
- package/uview-plus/components/u-float-button/style.scss +0 -2
- package/uview-plus/components/u-float-button/u-float-button.vue +1 -1
- package/uview-plus/components/u-form/u-form.vue +2 -2
- package/uview-plus/components/u-form-item/style.css +0 -26
- package/uview-plus/components/u-form-item/style.scss +0 -2
- package/uview-plus/components/u-form-item/u-form-item.vue +3 -3
- package/uview-plus/components/u-gap/_doc/readme.md +2 -2
- package/uview-plus/components/u-gap/u-gap.vue +2 -4
- package/uview-plus/components/u-goods-sku/style.css +100 -0
- package/uview-plus/components/u-goods-sku/style.scss +120 -0
- package/uview-plus/components/u-goods-sku/u-goods-sku.vue +287 -0
- package/uview-plus/components/u-grid/style.css +1 -27
- package/uview-plus/components/u-grid/style.scss +1 -2
- package/uview-plus/components/u-grid/u-grid.vue +1 -1
- package/uview-plus/components/u-grid-item/style.css +0 -26
- package/uview-plus/components/u-grid-item/style.scss +0 -1
- package/uview-plus/components/u-grid-item/u-grid-item.vue +1 -1
- package/uview-plus/components/u-icon/_doc/readme.md +2 -2
- package/uview-plus/components/u-icon/icon.js +25 -23
- package/uview-plus/components/u-icon/icons.js +213 -213
- package/uview-plus/components/u-icon/style.css +3 -29
- package/uview-plus/components/u-icon/style.scss +1 -3
- package/uview-plus/components/u-icon/u-icon.vue +4 -47
- package/uview-plus/components/u-icon/util.js +68 -0
- package/uview-plus/components/{u-image-wu → u-image}/_doc/readme.md +2 -2
- package/uview-plus/components/u-image/props.js +10 -0
- package/uview-plus/components/u-image/style.css +0 -26
- package/uview-plus/components/u-image/style.scss +0 -2
- package/uview-plus/components/{u-image-wu → u-image}/u-image-wu.vue +47 -12
- package/uview-plus/components/u-image/u-image.vue +7 -4
- package/uview-plus/components/u-index-anchor/indexAnchor.js +1 -1
- package/uview-plus/components/u-index-anchor/style.css +4 -26
- package/uview-plus/components/u-index-anchor/style.scss +5 -2
- package/uview-plus/components/u-index-anchor/u-index-anchor.vue +13 -2
- package/uview-plus/components/u-index-item/u-index-item.vue +1 -3
- package/uview-plus/components/u-index-list/indexList.js +2 -1
- package/uview-plus/components/u-index-list/props.js +5 -0
- package/uview-plus/components/u-index-list/style.css +0 -26
- package/uview-plus/components/u-index-list/style.scss +0 -2
- package/uview-plus/components/u-index-list/u-index-list.vue +19 -10
- package/uview-plus/components/u-input/_doc/readme.md +2 -2
- package/uview-plus/components/u-input/input.js +6 -4
- package/uview-plus/components/u-input/props.js +16 -1
- package/uview-plus/components/u-input/style.css +0 -26
- package/uview-plus/components/u-input/style.scss +0 -2
- package/uview-plus/components/u-input/u-input.vue +34 -6
- package/uview-plus/components/u-keyboard/keyboard.js +3 -2
- package/uview-plus/components/u-keyboard/style.css +0 -26
- package/uview-plus/components/u-keyboard/style.scss +0 -2
- package/uview-plus/components/u-keyboard/u-keyboard.vue +1 -1
- package/uview-plus/components/u-lazy-load/style.css +0 -26
- package/uview-plus/components/u-lazy-load/style.scss +0 -2
- package/uview-plus/components/u-lazy-load/u-lazy-load.vue +6 -2
- package/uview-plus/components/u-line/_doc/readme.md +2 -2
- package/uview-plus/components/u-line/style.css +0 -26
- package/uview-plus/components/u-line/style.scss +0 -2
- package/uview-plus/components/u-line/u-line.vue +1 -1
- package/uview-plus/components/u-line-progress/lineProgress.js +2 -1
- package/uview-plus/components/u-line-progress/props.js +5 -0
- package/uview-plus/components/u-line-progress/style.css +0 -27
- package/uview-plus/components/u-line-progress/style.scss +0 -3
- package/uview-plus/components/u-line-progress/u-line-progress.vue +6 -1
- package/uview-plus/components/u-link/_doc/readme.md +2 -2
- package/uview-plus/components/u-link/link.js +2 -1
- package/uview-plus/components/u-link/style.css +0 -26
- package/uview-plus/components/u-link/style.scss +0 -1
- package/uview-plus/components/u-link/u-link.vue +1 -1
- package/uview-plus/components/u-list/style.css +0 -26
- package/uview-plus/components/u-list/style.scss +0 -2
- package/uview-plus/components/u-list/u-list.vue +1 -1
- package/uview-plus/components/u-list-item/style.css +0 -26
- package/uview-plus/components/u-list-item/style.scss +0 -2
- package/uview-plus/components/u-list-item/u-list-item.vue +1 -1
- package/uview-plus/components/u-loading-icon/_doc/readme.md +2 -2
- package/uview-plus/components/u-loading-icon/style.css +0 -26
- package/uview-plus/components/u-loading-icon/style.scss +0 -1
- package/uview-plus/components/u-loading-icon/u-loading-icon.vue +1 -1
- package/uview-plus/components/u-loading-page/loadingPage.js +2 -1
- package/uview-plus/components/u-loading-page/style.css +0 -26
- package/uview-plus/components/u-loading-page/style.scss +0 -2
- package/uview-plus/components/u-loading-page/u-loading-page.vue +1 -1
- package/uview-plus/components/u-loadmore/loadmore.js +4 -3
- package/uview-plus/components/u-loadmore/style.css +0 -26
- package/uview-plus/components/u-loadmore/style.scss +0 -2
- package/uview-plus/components/u-loadmore/u-loadmore.vue +1 -1
- package/uview-plus/components/u-markdown/marked.esm.js +7 -0
- package/uview-plus/components/u-markdown/style.css +188 -0
- package/uview-plus/components/u-markdown/style.scss +199 -0
- package/uview-plus/components/u-markdown/u-markdown.vue +91 -0
- package/uview-plus/components/u-modal/modal.js +5 -3
- package/uview-plus/components/u-modal/props.js +5 -0
- package/uview-plus/components/u-modal/style.css +0 -26
- package/uview-plus/components/u-modal/style.scss +0 -1
- package/uview-plus/components/u-modal/u-modal.vue +6 -2
- package/uview-plus/components/u-navbar/_doc/readme.md +2 -2
- package/uview-plus/components/u-navbar/props.js +22 -0
- package/uview-plus/components/u-navbar/style.css +0 -26
- package/uview-plus/components/u-navbar/style.scss +0 -2
- package/uview-plus/components/{u-navbar-wu → u-navbar}/u-navbar-wu.vue +18 -10
- package/uview-plus/components/u-navbar/u-navbar.vue +4 -3
- package/uview-plus/components/u-navbar-mini/style.css +0 -26
- package/uview-plus/components/u-navbar-mini/style.scss +0 -2
- package/uview-plus/components/u-navbar-mini/u-navbar-mini.vue +1 -1
- package/uview-plus/components/u-no-network/noNetwork.js +2 -2
- package/uview-plus/components/u-no-network/style.css +0 -26
- package/uview-plus/components/u-no-network/style.scss +0 -2
- package/uview-plus/components/u-no-network/u-no-network.vue +8 -6
- package/uview-plus/components/u-notice-bar/style.css +0 -26
- package/uview-plus/components/u-notice-bar/style.scss +0 -2
- package/uview-plus/components/u-notice-bar/u-notice-bar.vue +1 -3
- package/{uview-ui/components/u-notice-bar/u-notice-bar.vue → uview-plus/components/u-notice-bar/u-notice-bar2.vue} +14 -10
- package/uview-plus/components/u-notify/style.css +0 -26
- package/uview-plus/components/u-notify/style.scss +0 -2
- package/uview-plus/components/u-number-box/_doc/readme.md +2 -2
- package/uview-plus/components/u-number-box/numberBox.js +1 -0
- package/uview-plus/components/u-number-box/props.js +5 -0
- package/uview-plus/components/u-number-box/style.css +0 -26
- package/uview-plus/components/u-number-box/style.scss +0 -2
- package/uview-plus/components/u-number-box/u-number-box.vue +6 -5
- package/uview-plus/components/u-number-keyboard/style.css +0 -26
- package/uview-plus/components/u-number-keyboard/style.scss +0 -1
- package/uview-plus/components/u-overlay/_doc/readme.md +2 -2
- package/uview-plus/components/u-overlay/style.css +0 -26
- package/uview-plus/components/u-overlay/style.scss +0 -1
- package/uview-plus/components/u-overlay/u-overlay.vue +1 -1
- package/uview-plus/components/u-pagination/style.css +46 -0
- package/uview-plus/components/u-pagination/style.scss +51 -0
- package/uview-plus/components/u-pagination/u-pagination.vue +1 -0
- package/uview-plus/components/u-parse/node/node.vue +43 -24
- package/uview-plus/components/u-parse/parse.js +5 -5
- package/uview-plus/components/u-parse/parser.js +74 -13
- package/uview-plus/components/u-parse/props.js +53 -47
- package/uview-plus/components/u-parse/u-parse.vue +12 -7
- package/uview-plus/components/u-pdf-reader/props.js +19 -0
- package/uview-plus/components/u-pdf-reader/style.scss +2 -0
- package/uview-plus/components/u-pdf-reader/u-pdf-reader.vue +50 -0
- package/uview-plus/components/u-picker/picker.js +10 -3
- package/uview-plus/components/u-picker/props.js +30 -0
- package/uview-plus/components/u-picker/style.css +0 -26
- package/uview-plus/components/u-picker/style.scss +0 -2
- package/uview-plus/components/u-picker/u-picker.vue +87 -25
- package/uview-plus/components/u-picker-column/u-picker-column.vue +1 -3
- package/uview-plus/components/u-picker-data/style.css +1 -0
- package/uview-plus/components/u-picker-data/style.scss +1 -0
- package/uview-plus/components/u-picker-data/u-picker-data.vue +22 -4
- package/uview-plus/components/u-popover/props.js +59 -0
- package/uview-plus/components/u-popover/style.css +8 -0
- package/uview-plus/components/u-popover/style.scss +7 -0
- package/uview-plus/components/u-popover/u-popover.vue +84 -0
- package/uview-plus/components/u-popup/_doc/readme.md +2 -2
- package/uview-plus/components/u-popup/popup.js +6 -2
- package/uview-plus/components/u-popup/props.js +20 -0
- package/uview-plus/components/u-popup/style.css +18 -26
- package/uview-plus/components/u-popup/style.scss +21 -1
- package/uview-plus/components/u-popup/u-popup.vue +97 -9
- package/uview-plus/components/u-popup-wu/u-popup-wu.vue +1 -1
- package/uview-plus/components/u-poster/style.css +22 -0
- package/uview-plus/components/u-poster/style.scss +26 -0
- package/uview-plus/components/u-poster/u-poster.vue +564 -0
- package/uview-plus/components/u-pull-refresh/style.css +51 -0
- package/uview-plus/components/u-pull-refresh/style.scss +58 -0
- package/uview-plus/components/u-pull-refresh/u-pull-refresh.vue +231 -0
- package/uview-plus/components/u-qrcode/qrcode.js +145 -65
- package/uview-plus/components/u-qrcode/style.css +13 -0
- package/uview-plus/components/u-qrcode/style.scss +10 -0
- package/uview-plus/components/u-qrcode/u-qrcode.vue +144 -15
- package/uview-plus/components/u-radio/_doc/readme.md +2 -2
- package/uview-plus/components/u-radio/style.css +3 -27
- package/uview-plus/components/u-radio/style.scss +0 -1
- package/uview-plus/components/u-radio/u-radio.vue +3 -3
- package/uview-plus/components/u-radio-group/style.css +0 -26
- package/uview-plus/components/u-radio-group/style.scss +0 -2
- package/uview-plus/components/u-radio-group/u-radio-group.vue +1 -1
- package/uview-plus/components/u-rate/style.css +1 -27
- package/uview-plus/components/u-rate/style.scss +1 -2
- package/uview-plus/components/u-rate/u-rate.vue +1 -1
- package/uview-plus/components/u-read-more/readMore.js +3 -2
- package/uview-plus/components/u-read-more/style.css +0 -26
- package/uview-plus/components/u-read-more/style.scss +0 -2
- package/uview-plus/components/u-read-more/u-read-more.vue +1 -1
- package/uview-plus/components/u-refresh-virtual-list/u-refresh-virtual-list.vue +75 -0
- package/uview-plus/components/u-row/_doc/readme.md +2 -2
- package/uview-plus/components/u-row/style.css +0 -26
- package/uview-plus/components/u-row/style.scss +0 -2
- package/uview-plus/components/u-row/u-row.vue +1 -1
- package/uview-plus/components/u-row-notice/style.css +0 -27
- package/uview-plus/components/u-row-notice/style.scss +1 -3
- package/uview-plus/components/u-row-notice/u-row-notice.vue +1 -1
- package/uview-plus/components/u-safe-bottom/_doc/readme.md +2 -2
- package/uview-plus/components/u-safe-bottom/u-safe-bottom.vue +3 -3
- package/uview-plus/components/u-scroll-list/cc-scroll-list.vue +233 -0
- package/uview-plus/components/u-scroll-list/style.css +0 -26
- package/uview-plus/components/u-scroll-list/style.scss +0 -2
- package/uview-plus/components/u-scroll-list/u-scroll-list.vue +158 -171
- package/uview-plus/components/u-search/props.js +61 -43
- package/uview-plus/components/u-search/search.js +3 -2
- package/uview-plus/components/u-search/style.css +0 -26
- package/uview-plus/components/u-search/style.scss +0 -1
- package/uview-plus/components/u-search/u-search.vue +16 -3
- package/uview-plus/components/u-section/section.js +2 -1
- package/uview-plus/components/u-select/style.css +9 -3
- package/uview-plus/components/u-short-video/style.css +117 -0
- package/uview-plus/components/u-short-video/style.scss +138 -0
- package/uview-plus/components/u-short-video/u-short-video.vue +296 -0
- package/uview-plus/components/u-signature/style.css +70 -0
- package/uview-plus/components/u-signature/style.scss +88 -0
- package/uview-plus/components/u-signature/u-signature.vue +350 -0
- package/uview-plus/components/u-skeleton/style.css +0 -26
- package/uview-plus/components/u-skeleton/style.scss +0 -2
- package/uview-plus/components/u-skeleton/u-skeleton.vue +3 -3
- package/uview-plus/components/u-sku-wu/_doc/readme.md +2 -2
- package/uview-plus/components/u-sku-wu/u-sku-wu.vue +1 -1
- package/uview-plus/components/u-slider/nvue - /345/211/257/346/234/254.js" +166 -0
- package/uview-plus/components/u-slider/props.js +4 -0
- package/uview-plus/components/u-slider/slider.js +2 -1
- package/uview-plus/components/u-slider/style.css +6 -28
- package/uview-plus/components/u-slider/style.scss +0 -1
- package/uview-plus/components/u-slider/u-slider.vue +17 -5
- package/uview-plus/components/u-status-bar/_doc/readme.md +2 -2
- package/uview-plus/components/u-steps/style.css +3 -26
- package/uview-plus/components/u-steps/style.scss +5 -2
- package/uview-plus/components/u-steps-item/style.css +3 -26
- package/uview-plus/components/u-steps-item/style.scss +6 -2
- package/uview-plus/components/u-steps-item/u-steps-item.vue +3 -3
- package/uview-plus/components/u-sticky/u-sticky.vue +1 -1
- package/uview-plus/components/u-sticky/wlk-sticky.vue +117 -0
- package/uview-plus/components/u-subsection/props.js +16 -0
- package/uview-plus/components/u-subsection/style.css +17 -26
- package/uview-plus/components/u-subsection/style.scss +33 -2
- package/uview-plus/components/u-subsection/subsection.js +4 -1
- package/uview-plus/components/u-subsection/u-subsection.vue +75 -18
- package/uview-plus/components/u-swipe-action/u-swipe-action.vue +1 -1
- package/uview-plus/components/u-swipe-action-item/style.css +0 -26
- package/uview-plus/components/u-swipe-action-item/style.scss +0 -2
- package/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue +1 -1
- package/uview-plus/components/u-swiper/style.css +0 -26
- package/uview-plus/components/u-swiper/style.scss +0 -2
- package/uview-plus/components/u-swiper/u-swiper.vue +1 -1
- package/uview-plus/components/u-swiper-indicator/style.css +0 -26
- package/uview-plus/components/u-swiper-indicator/style.scss +0 -2
- package/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue +1 -1
- package/uview-plus/components/u-switch/style.css +1 -27
- package/uview-plus/components/u-switch/style.scss +0 -2
- package/uview-plus/components/u-switch/u-switch.vue +154 -160
- package/uview-plus/components/u-tabbar/props.js +10 -0
- package/uview-plus/components/u-tabbar/style.css +0 -26
- package/uview-plus/components/u-tabbar/style.scss +0 -2
- package/uview-plus/components/u-tabbar/tabbar.js +3 -1
- package/uview-plus/components/u-tabbar/u-tabbar.vue +8 -1
- package/uview-plus/components/u-tabbar-item/props.js +6 -1
- package/uview-plus/components/u-tabbar-item/style.css +23 -26
- package/uview-plus/components/u-tabbar-item/style.scss +28 -1
- package/uview-plus/components/u-tabbar-item/tabbarItem.js +2 -1
- package/uview-plus/components/u-tabbar-item/u-tabbar-item.vue +17 -5
- package/uview-plus/components/u-table/u-table.vue +82 -6
- package/uview-plus/components/u-table2/style.scss +117 -0
- package/uview-plus/components/u-table2/tableRow.vue +1 -0
- package/uview-plus/components/u-table2/u-table2.vue +1 -0
- package/uview-plus/components/u-tabs/style.css +0 -26
- package/uview-plus/components/u-tabs/style.scss +0 -2
- package/uview-plus/components/u-tabs/tabs.js +1 -1
- package/uview-plus/components/u-tabs/u-tabs.vue +12 -3
- package/uview-plus/components/u-tabs-item/u-tabs-item.vue +1 -1
- package/uview-plus/components/u-tag/props.js +5 -0
- package/uview-plus/components/u-tag/style.css +0 -26
- package/uview-plus/components/u-tag/style.scss +0 -2
- package/uview-plus/components/u-tag/u-tag.vue +1 -1
- package/uview-plus/components/u-td/style.css +12 -24
- package/uview-plus/components/u-td/style.scss +11 -1
- package/uview-plus/components/u-td/u-td.vue +60 -2
- package/uview-plus/components/u-text/_doc/readme.md +2 -2
- package/uview-plus/components/u-text/style.css +0 -26
- package/uview-plus/components/u-text/style.scss +0 -2
- package/{uview-ui/components/u-text/style.scss → uview-plus/components/u-text/style2.scss} +60 -62
- package/uview-plus/components/u-text/u-text.vue +1 -1
- package/uview-plus/components/u-text/value.js +83 -81
- package/uview-plus/components/u-textarea/_doc/readme.md +2 -2
- package/uview-plus/components/u-textarea/style.css +0 -26
- package/uview-plus/components/u-textarea/style.scss +0 -2
- package/uview-plus/components/u-textarea/u-textarea.vue +236 -3
- package/uview-plus/components/u-th/props.js +5 -0
- package/uview-plus/components/u-th/style.css +13 -0
- package/uview-plus/components/u-th/style.scss +10 -0
- package/uview-plus/components/u-th/u-th.vue +55 -0
- package/uview-plus/components/u-title/style.css +8 -0
- package/uview-plus/components/u-title/style.scss +10 -0
- package/uview-plus/components/u-title/u-title.vue +22 -0
- package/uview-plus/components/u-toast/style.css +0 -26
- package/uview-plus/components/u-toast/style.scss +1 -3
- package/uview-plus/components/u-toast/u-toast.vue +3 -2
- package/uview-plus/components/u-toolbar/style.css +0 -26
- package/uview-plus/components/u-toolbar/style.scss +0 -2
- package/uview-plus/components/u-toolbar/toolbar.js +3 -2
- package/uview-plus/components/u-toolbar/u-toolbar.vue +1 -1
- package/uview-plus/components/u-tooltip/props.js +16 -1
- package/uview-plus/components/u-tooltip/style.css +1 -26
- package/uview-plus/components/u-tooltip/style.scss +1 -2
- package/uview-plus/components/u-tooltip/tooltip.js +4 -1
- package/uview-plus/components/u-tooltip/u-tooltip.vue +141 -87
- package/uview-plus/components/u-tr/style.css +5 -25
- package/uview-plus/components/u-tr/style.scss +3 -1
- package/uview-plus/components/u-tr/u-tr.vue +3 -1
- package/uview-plus/components/u-transition/_doc/readme.md +2 -2
- package/uview-plus/components/u-transition/style.css +0 -26
- package/uview-plus/components/u-transition/style.scss +114 -3
- package/uview-plus/components/u-transition/transitionMixin.js +163 -163
- package/uview-plus/components/u-transition-wu/u-transition.vue +1 -1
- package/uview-plus/components/u-tree/tree-node.vue +131 -0
- package/uview-plus/components/u-tree/u-tree.vue +115 -0
- package/uview-plus/components/u-upload/props.js +4 -0
- package/uview-plus/components/u-upload/style.css +0 -26
- package/uview-plus/components/u-upload/style.scss +0 -1
- package/uview-plus/components/u-upload/u-upload.vue +12 -6
- package/uview-plus/components/u-upload/upload.js +2 -1
- package/uview-plus/components/u-view/style.css +0 -26
- package/uview-plus/components/u-view/style.scss +0 -2
- package/uview-plus/components/u-view/u-view.vue +70 -3
- package/uview-plus/components/u-virtual-list/style.scss +16 -0
- package/uview-plus/components/u-virtual-list/u-virtual-list.vue +218 -0
- package/uview-plus/components/u-waterfall/style.css +3 -26
- package/uview-plus/components/u-waterfall/style.scss +4 -2
- package/uview-plus/components/u-waterfall/u-waterfall.vue +247 -100
- package/uview-plus/index.css +32 -1
- package/uview-plus/index.js +34 -9
- package/uview-plus/index.scss +1 -0
- package/uview-plus/libs/config/config.js +50 -46
- package/uview-plus/libs/config/props.js +2 -2
- package/uview-plus/libs/css/color.scss +311 -32
- package/uview-plus/libs/css/common-libcss.scss +3 -1
- package/uview-plus/libs/css/common.scss +1 -1
- package/uview-plus/libs/css/components-libcss.scss +2 -0
- package/uview-plus/libs/css/components.scss +2 -0
- package/uview-plus/libs/css/flex.scss +41 -37
- package/uview-plus/libs/css/vue.scss +1 -1
- package/uview-plus/libs/ctocode/date.js +0 -96
- package/uview-plus/libs/ctocode/index.js +46 -0
- package/uview-plus/libs/function/calc.js +55 -61
- package/uview-plus/libs/function/colorGradient.js +106 -108
- package/uview-plus/libs/function/debounce.js +17 -17
- package/uview-plus/libs/function/digit.js +3 -1
- package/uview-plus/libs/function/http.js +3 -3
- package/{uview-ui/libs/function/index.js → uview-plus/libs/function/index-v2.js} +6 -6
- package/uview-plus/libs/function/index.js +585 -579
- package/uview-plus/libs/function/platform.js +18 -18
- package/uview-plus/libs/function/test.js +144 -135
- package/uview-plus/libs/function/throttle.js +17 -17
- package/uview-plus/libs/i18n/index.js +54 -0
- package/uview-plus/libs/i18n/locales/de.json +85 -0
- package/uview-plus/libs/i18n/locales/en.json +85 -0
- package/uview-plus/libs/i18n/locales/es.json +85 -0
- package/uview-plus/libs/i18n/locales/fr.json +85 -0
- package/uview-plus/libs/i18n/locales/ja.json +85 -0
- package/uview-plus/libs/i18n/locales/ko.json +85 -0
- package/uview-plus/libs/i18n/locales/ru.json +85 -0
- package/uview-plus/libs/i18n/locales/th.json +85 -0
- package/uview-plus/libs/i18n/locales/zh-Hans.json +85 -0
- package/uview-plus/libs/i18n/locales/zh-Hant.json +85 -0
- package/uview-plus/libs/mixin/mpMixin.js +0 -1
- package/uview-plus/libs/mixin/openType.js +0 -33
- package/uview-plus/libs/util/route.js +105 -101
- package/uview-plus/package.json +60 -56
- package/uview-plus/types/comps/modal.d.ts +1 -1
- package/uview-plus/types/comps/navbar.d.ts +5 -0
- package/uview-plus/types/comps/qrcode.d.ts +77 -0
- package/uview-plus/types/comps/search.d.ts +8 -0
- package/uview-plus/types/comps/subsection.d.ts +16 -0
- package/uview-plus/types/comps.d.ts +1 -0
- package/build/parse-pages2.js +0 -281
- package/extend/jweixin-module.js +0 -1
- package/extend/permission.js +0 -256
- package/ui-cv/components/cv-layout-topbar/cv-layout-topbar.vue +0 -239
- package/uview-plus/components/u--form/u--form.vue +0 -1
- package/uview-plus/components/u--image/u--image.vue +0 -1
- package/uview-plus/components/u--input/u--input.vue +0 -9
- package/uview-plus/components/u--text/u--text.vue +0 -1
- package/uview-plus/components/u--textarea/u--textarea.vue +0 -1
- package/uview-plus/components/u-button-wu/vue.scss +0 -81
- package/uview-plus/components/u-code/style.css +0 -26
- package/uview-plus/components/u-code/style.scss +0 -1
- package/uview-plus/components/u-collapse/style.css +0 -26
- package/uview-plus/components/u-collapse/style.scss +0 -1
- package/uview-plus/components/u-drag-sort/u-drag-sort.vue +0 -3
- package/uview-plus/components/u-gap/style.css +0 -26
- package/uview-plus/components/u-gap/style.scss +0 -1
- package/uview-plus/components/u-image-wu/props.js +0 -94
- package/uview-plus/components/u-index-item/style.css +0 -26
- package/uview-plus/components/u-index-item/style.scss +0 -1
- package/uview-plus/components/u-navbar-wu/props.js +0 -102
- package/uview-plus/components/u-navbar-wu/style.scss +0 -59
- package/uview-plus/components/u-picker-column/style.css +0 -26
- package/uview-plus/components/u-picker-column/style.scss +0 -1
- package/uview-plus/components/u-table/style.css +0 -26
- package/uview-plus/components/u-table/style.scss +0 -1
- package/uview-ui/LICENSE +0 -21
- package/uview-ui/README.md +0 -66
- package/uview-ui/components/u--form/u--form.vue +0 -1
- package/uview-ui/components/u--image/u--image.vue +0 -1
- package/uview-ui/components/u--input/u--input.vue +0 -1
- package/uview-ui/components/u--text/u--text.vue +0 -1
- package/uview-ui/components/u--textarea/u--textarea.vue +0 -1
- package/uview-ui/components/u-action-sheet/props.js +0 -55
- package/uview-ui/components/u-action-sheet/style.css +0 -68
- package/uview-ui/components/u-action-sheet/style.scss +0 -84
- package/uview-ui/components/u-action-sheet/u-action-sheet.vue +0 -158
- package/uview-ui/components/u-album/props.js +0 -60
- package/uview-ui/components/u-album/style.css +0 -41
- package/uview-ui/components/u-album/style.scss +0 -26
- package/uview-ui/components/u-album/u-album.vue +0 -203
- package/uview-ui/components/u-alert/props.js +0 -45
- package/uview-ui/components/u-alert/style.css +0 -101
- package/uview-ui/components/u-alert/style.scss +0 -113
- package/uview-ui/components/u-alert/u-alert.vue +0 -118
- package/uview-ui/components/u-avatar/props.js +0 -79
- package/uview-ui/components/u-avatar/style.css +0 -32
- package/uview-ui/components/u-avatar/style.scss +0 -26
- package/uview-ui/components/u-avatar/u-avatar.vue +0 -168
- package/uview-ui/components/u-avatar-group/props.js +0 -53
- package/uview-ui/components/u-avatar-group/style.css +0 -39
- package/uview-ui/components/u-avatar-group/style.scss +0 -28
- package/uview-ui/components/u-avatar-group/u-avatar-group.vue +0 -74
- package/uview-ui/components/u-back-top/props.js +0 -55
- package/uview-ui/components/u-back-top/style.css +0 -27
- package/uview-ui/components/u-back-top/style.scss +0 -19
- package/uview-ui/components/u-back-top/u-back-top.vue +0 -95
- package/uview-ui/components/u-badge/props.js +0 -73
- package/uview-ui/components/u-badge/style.css +0 -68
- package/uview-ui/components/u-badge/style.scss +0 -85
- package/uview-ui/components/u-badge/u-badge.vue +0 -96
- package/uview-ui/components/u-button/nvue-parse.scss +0 -27
- package/uview-ui/components/u-button/nvue.scss +0 -1
- package/uview-ui/components/u-button/props.js +0 -162
- package/uview-ui/components/u-button/style.css +0 -202
- package/uview-ui/components/u-button/style.scss +0 -196
- package/uview-ui/components/u-button/u-button.vue +0 -266
- package/uview-ui/components/u-button/vue-parse.scss +0 -42
- package/uview-ui/components/u-button/vue.scss +0 -80
- package/uview-ui/components/u-calendar/header.vue +0 -1
- package/uview-ui/components/u-calendar/month.vue +0 -476
- package/uview-ui/components/u-calendar/props.js +0 -145
- package/uview-ui/components/u-calendar/style.css +0 -14
- package/uview-ui/components/u-calendar/style.scss +0 -7
- package/uview-ui/components/u-calendar/u-calendar.vue +0 -325
- package/uview-ui/components/u-calendar/util.js +0 -85
- package/uview-ui/components/u-car-keyboard/props.js +0 -14
- package/uview-ui/components/u-car-keyboard/style.css +0 -80
- package/uview-ui/components/u-car-keyboard/style.scss +0 -90
- package/uview-ui/components/u-car-keyboard/u-car-keyboard.vue +0 -1
- package/uview-ui/components/u-cell/props.js +0 -111
- package/uview-ui/components/u-cell/style.css +0 -98
- package/uview-ui/components/u-cell/style.scss +0 -127
- package/uview-ui/components/u-cell/u-cell.vue +0 -125
- package/uview-ui/components/u-cell-group/props.js +0 -15
- package/uview-ui/components/u-cell-group/style.css +0 -25
- package/uview-ui/components/u-cell-group/style.scss +0 -24
- package/uview-ui/components/u-cell-group/u-cell-group.vue +0 -37
- package/uview-ui/components/u-checkbox/props.js +0 -70
- package/uview-ui/components/u-checkbox/style.css +0 -84
- package/uview-ui/components/u-checkbox/style.scss +0 -101
- package/uview-ui/components/u-checkbox/u-checkbox.vue +0 -239
- package/uview-ui/components/u-checkbox-group/props.js +0 -82
- package/uview-ui/components/u-checkbox-group/style.css +0 -23
- package/uview-ui/components/u-checkbox-group/style.scss +0 -11
- package/uview-ui/components/u-checkbox-group/u-checkbox-group.vue +0 -96
- package/uview-ui/components/u-circle-progress/props.js +0 -9
- package/uview-ui/components/u-circle-progress/style.css +0 -80
- package/uview-ui/components/u-circle-progress/style.scss +0 -86
- package/uview-ui/components/u-circle-progress/u-circle-progress.vue +0 -99
- package/uview-ui/components/u-code/props.js +0 -35
- package/uview-ui/components/u-code/style.css +0 -11
- package/uview-ui/components/u-code/style.scss +0 -1
- package/uview-ui/components/u-code/u-code.vue +0 -129
- package/uview-ui/components/u-code-input/props.js +0 -80
- package/uview-ui/components/u-code-input/style.css +0 -78
- package/uview-ui/components/u-code-input/style.scss +0 -75
- package/uview-ui/components/u-code-input/u-code-input.vue +0 -169
- package/uview-ui/components/u-col/props.js +0 -30
- package/uview-ui/components/u-col/style.css +0 -61
- package/uview-ui/components/u-col/style.scss +0 -67
- package/uview-ui/components/u-col/u-col.vue +0 -88
- package/uview-ui/components/u-collapse/props.js +0 -20
- package/uview-ui/components/u-collapse/style.css +0 -11
- package/uview-ui/components/u-collapse/style.scss +0 -1
- package/uview-ui/components/u-collapse/u-collapse.vue +0 -89
- package/uview-ui/components/u-collapse-item/props.js +0 -60
- package/uview-ui/components/u-collapse-item/style.css +0 -21
- package/uview-ui/components/u-collapse-item/style.scss +0 -15
- package/uview-ui/components/u-collapse-item/u-collapse-item.vue +0 -1
- package/uview-ui/components/u-column-notice/props.js +0 -56
- package/uview-ui/components/u-column-notice/style.css +0 -48
- package/uview-ui/components/u-column-notice/style.scss +0 -35
- package/uview-ui/components/u-column-notice/u-column-notice.vue +0 -95
- package/uview-ui/components/u-count-down/props.js +0 -25
- package/uview-ui/components/u-count-down/style.css +0 -16
- package/uview-ui/components/u-count-down/style.scss +0 -12
- package/uview-ui/components/u-count-down/u-count-down.vue +0 -1
- package/uview-ui/components/u-count-down/utils.js +0 -62
- package/uview-ui/components/u-count-to/props.js +0 -60
- package/uview-ui/components/u-count-to/style.css +0 -17
- package/uview-ui/components/u-count-to/style.scss +0 -8
- package/uview-ui/components/u-count-to/u-count-to.vue +0 -179
- package/uview-ui/components/u-datetime-picker/props.js +0 -121
- package/uview-ui/components/u-datetime-picker/style.css +0 -11
- package/uview-ui/components/u-datetime-picker/style.scss +0 -1
- package/uview-ui/components/u-datetime-picker/u-datetime-picker.vue +0 -376
- package/uview-ui/components/u-divider/props.js +0 -45
- package/uview-ui/components/u-divider/style.css +0 -28
- package/uview-ui/components/u-divider/style.scss +0 -23
- package/uview-ui/components/u-divider/u-divider.vue +0 -73
- package/uview-ui/components/u-dropdown/props.js +0 -65
- package/uview-ui/components/u-dropdown/style.css +0 -32
- package/uview-ui/components/u-dropdown/style.scss +0 -18
- package/uview-ui/components/u-dropdown/u-dropdown.vue +0 -1
- package/uview-ui/components/u-dropdown-item/props.js +0 -36
- package/uview-ui/components/u-dropdown-item/style.css +0 -32
- package/uview-ui/components/u-dropdown-item/style.scss +0 -18
- package/uview-ui/components/u-dropdown-item/u-dropdown-item.vue +0 -1
- package/uview-ui/components/u-empty/props.js +0 -60
- package/uview-ui/components/u-empty/style.css +0 -38
- package/uview-ui/components/u-empty/style.scss +0 -23
- package/uview-ui/components/u-form/props.js +0 -46
- package/uview-ui/components/u-form/u-form.vue +0 -1
- package/uview-ui/components/u-form-item/props.js +0 -49
- package/uview-ui/components/u-form-item/style.css +0 -95
- package/uview-ui/components/u-form-item/style.scss +0 -76
- package/uview-ui/components/u-form-item/u-form-item.vue +0 -159
- package/uview-ui/components/u-gap/props.js +0 -25
- package/uview-ui/components/u-gap/style.css +0 -11
- package/uview-ui/components/u-gap/style.scss +0 -1
- package/uview-ui/components/u-gap/u-gap.vue +0 -38
- package/uview-ui/components/u-grid/props.js +0 -20
- package/uview-ui/components/u-grid/style.css +0 -27
- package/uview-ui/components/u-grid/style.scss +0 -15
- package/uview-ui/components/u-grid/u-grid.vue +0 -79
- package/uview-ui/components/u-grid-item/props.js +0 -15
- package/uview-ui/components/u-grid-item/style.css +0 -41
- package/uview-ui/components/u-grid-item/style.scss +0 -44
- package/uview-ui/components/u-grid-item/u-grid-item.vue +0 -160
- package/uview-ui/components/u-icon/icons.js +0 -214
- package/uview-ui/components/u-icon/props.js +0 -90
- package/uview-ui/components/u-icon/style.css +0 -74
- package/uview-ui/components/u-icon/style.scss +0 -85
- package/uview-ui/components/u-icon/u-icon.vue +0 -132
- package/uview-ui/components/u-image/props.js +0 -85
- package/uview-ui/components/u-image/style.css +0 -35
- package/uview-ui/components/u-image/style.scss +0 -34
- package/uview-ui/components/u-image/u-image.vue +0 -182
- package/uview-ui/components/u-index-anchor/props.js +0 -30
- package/uview-ui/components/u-index-anchor/style.css +0 -29
- package/uview-ui/components/u-index-anchor/style.scss +0 -15
- package/uview-ui/components/u-index-anchor/u-index-anchor.vue +0 -78
- package/uview-ui/components/u-index-item/props.js +0 -3
- package/uview-ui/components/u-index-item/style.css +0 -11
- package/uview-ui/components/u-index-item/style.scss +0 -1
- package/uview-ui/components/u-index-item/u-index-item.vue +0 -81
- package/uview-ui/components/u-index-list/props.js +0 -30
- package/uview-ui/components/u-index-list/style.css +0 -61
- package/uview-ui/components/u-index-list/style.scss +0 -53
- package/uview-ui/components/u-index-list/u-index-list.vue +0 -367
- package/uview-ui/components/u-input/props.js +0 -188
- package/uview-ui/components/u-input/style.css +0 -78
- package/uview-ui/components/u-input/style.scss +0 -72
- package/uview-ui/components/u-input/u-input.vue +0 -260
- package/uview-ui/components/u-keyboard/props.js +0 -85
- package/uview-ui/components/u-keyboard/style.css +0 -37
- package/uview-ui/components/u-keyboard/style.scss +0 -31
- package/uview-ui/components/u-keyboard/u-keyboard.vue +0 -115
- package/uview-ui/components/u-line/props.js +0 -34
- package/uview-ui/components/u-line/style.css +0 -16
- package/uview-ui/components/u-line/style.scss +0 -7
- package/uview-ui/components/u-line/u-line.vue +0 -50
- package/uview-ui/components/u-line-progress/props.js +0 -29
- package/uview-ui/components/u-line-progress/style.css +0 -50
- package/uview-ui/components/u-line-progress/style.scss +0 -38
- package/uview-ui/components/u-line-progress/u-line-progress.vue +0 -99
- package/uview-ui/components/u-link/props.js +0 -40
- package/uview-ui/components/u-link/style.css +0 -22
- package/uview-ui/components/u-link/style.scss +0 -11
- package/uview-ui/components/u-link/u-link.vue +0 -68
- package/uview-ui/components/u-list/props.js +0 -76
- package/uview-ui/components/u-list/style.css +0 -17
- package/uview-ui/components/u-list/style.scss +0 -5
- package/uview-ui/components/u-list/u-list.vue +0 -152
- package/uview-ui/components/u-list-item/props.js +0 -10
- package/uview-ui/components/u-list-item/style.css +0 -11
- package/uview-ui/components/u-list-item/style.scss +0 -4
- package/uview-ui/components/u-list-item/u-list-item.vue +0 -105
- package/uview-ui/components/u-loading-icon/props.js +0 -60
- package/uview-ui/components/u-loading-icon/style.css +0 -148
- package/uview-ui/components/u-loading-icon/style.scss +0 -153
- package/uview-ui/components/u-loading-icon/u-loading-icon.vue +0 -1
- package/uview-ui/components/u-loading-page/props.js +0 -50
- package/uview-ui/components/u-loading-page/style.css +0 -44
- package/uview-ui/components/u-loading-page/style.scss +0 -37
- package/uview-ui/components/u-loading-page/u-loading-page.vue +0 -75
- package/uview-ui/components/u-loadmore/props.js +0 -95
- package/uview-ui/components/u-loadmore/style.css +0 -40
- package/uview-ui/components/u-loadmore/style.scss +0 -29
- package/uview-ui/components/u-loadmore/u-loadmore.vue +0 -101
- package/uview-ui/components/u-modal/props.js +0 -90
- package/uview-ui/components/u-modal/style.css +0 -70
- package/uview-ui/components/u-modal/style.scss +0 -65
- package/uview-ui/components/u-modal/u-modal.vue +0 -1
- package/uview-ui/components/u-navbar/props.js +0 -85
- package/uview-ui/components/u-navbar/style.css +0 -62
- package/uview-ui/components/u-navbar/style.scss +0 -58
- package/uview-ui/components/u-navbar/u-navbar.vue +0 -114
- package/uview-ui/components/u-no-network/props.js +0 -20
- package/uview-ui/components/u-no-network/style.css +0 -49
- package/uview-ui/components/u-no-network/style.scss +0 -36
- package/uview-ui/components/u-no-network/u-no-network.vue +0 -168
- package/uview-ui/components/u-notice-bar/props.js +0 -71
- package/uview-ui/components/u-notice-bar/style.css +0 -16
- package/uview-ui/components/u-notice-bar/style.scss +0 -7
- package/uview-ui/components/u-notify/props.js +0 -50
- package/uview-ui/components/u-notify/style.css +0 -39
- package/uview-ui/components/u-notify/style.scss +0 -40
- package/uview-ui/components/u-notify/u-notify.vue +0 -166
- package/uview-ui/components/u-number-box/props.js +0 -110
- package/uview-ui/components/u-number-box/style.css +0 -67
- package/uview-ui/components/u-number-box/style.scss +0 -70
- package/uview-ui/components/u-number-box/u-number-box.vue +0 -320
- package/uview-ui/components/u-number-keyboard/props.js +0 -20
- package/uview-ui/components/u-number-keyboard/style.css +0 -56
- package/uview-ui/components/u-number-keyboard/style.scss +0 -62
- package/uview-ui/components/u-number-keyboard/u-number-keyboard.vue +0 -118
- package/uview-ui/components/u-overlay/props.js +0 -25
- package/uview-ui/components/u-overlay/style.css +0 -19
- package/uview-ui/components/u-overlay/style.scss +0 -14
- package/uview-ui/components/u-overlay/u-overlay.vue +0 -48
- package/uview-ui/components/u-parse/node/node.vue +0 -1
- package/uview-ui/components/u-parse/parser.js +0 -1075
- package/uview-ui/components/u-parse/props.js +0 -46
- package/uview-ui/components/u-parse/u-parse.vue +0 -363
- package/uview-ui/components/u-picker/props.js +0 -80
- package/uview-ui/components/u-picker/style.css +0 -57
- package/uview-ui/components/u-picker/style.scss +0 -45
- package/uview-ui/components/u-picker/u-picker.vue +0 -231
- package/uview-ui/components/u-picker-column/props.js +0 -3
- package/uview-ui/components/u-picker-column/style.css +0 -11
- package/uview-ui/components/u-picker-column/style.scss +0 -1
- package/uview-ui/components/u-picker-column/u-picker-column.vue +0 -25
- package/uview-ui/components/u-popup/props.js +0 -80
- package/uview-ui/components/u-popup/style.css +0 -70
- package/uview-ui/components/u-popup/style.scss +0 -75
- package/uview-ui/components/u-popup/u-popup.vue +0 -1
- package/uview-ui/components/u-radio/props.js +0 -65
- package/uview-ui/components/u-radio/style.css +0 -84
- package/uview-ui/components/u-radio/style.scss +0 -100
- package/uview-ui/components/u-radio/u-radio.vue +0 -234
- package/uview-ui/components/u-radio-group/props.js +0 -86
- package/uview-ui/components/u-radio-group/style.css +0 -26
- package/uview-ui/components/u-radio-group/style.scss +0 -13
- package/uview-ui/components/u-radio-group/u-radio-group.vue +0 -97
- package/uview-ui/components/u-rate/props.js +0 -70
- package/uview-ui/components/u-rate/style.css +0 -43
- package/uview-ui/components/u-rate/style.scss +0 -38
- package/uview-ui/components/u-rate/u-rate.vue +0 -231
- package/uview-ui/components/u-read-more/props.js +0 -62
- package/uview-ui/components/u-read-more/style.css +0 -33
- package/uview-ui/components/u-read-more/style.scss +0 -22
- package/uview-ui/components/u-read-more/u-read-more.vue +0 -119
- package/uview-ui/components/u-row/props.js +0 -20
- package/uview-ui/components/u-row/style.css +0 -17
- package/uview-ui/components/u-row/style.scss +0 -5
- package/uview-ui/components/u-row/u-row.vue +0 -82
- package/uview-ui/components/u-row-notice/props.js +0 -40
- package/uview-ui/components/u-row-notice/style.css +0 -59
- package/uview-ui/components/u-row-notice/style.scss +0 -48
- package/uview-ui/components/u-row-notice/u-row-notice.vue +0 -256
- package/uview-ui/components/u-safe-bottom/props.js +0 -3
- package/uview-ui/components/u-safe-bottom/style.css +0 -5
- package/uview-ui/components/u-safe-bottom/style.scss +0 -5
- package/uview-ui/components/u-safe-bottom/u-safe-bottom.vue +0 -1
- package/uview-ui/components/u-scroll-list/nvue.js +0 -3
- package/uview-ui/components/u-scroll-list/other.js +0 -0
- package/uview-ui/components/u-scroll-list/props.js +0 -35
- package/uview-ui/components/u-scroll-list/scrollWxs.wxs +0 -50
- package/uview-ui/components/u-scroll-list/style.css +0 -45
- package/uview-ui/components/u-scroll-list/style.scss +0 -32
- package/uview-ui/components/u-scroll-list/u-scroll-list.vue +0 -191
- package/uview-ui/components/u-search/props.js +0 -119
- package/uview-ui/components/u-search/style.css +0 -92
- package/uview-ui/components/u-search/style.scss +0 -98
- package/uview-ui/components/u-search/u-search.vue +0 -204
- package/uview-ui/components/u-skeleton/props.js +0 -60
- package/uview-ui/components/u-skeleton/style.css +0 -62
- package/uview-ui/components/u-skeleton/style.scss +0 -59
- package/uview-ui/components/u-skeleton/u-skeleton.vue +0 -188
- package/uview-ui/components/u-slider/mpother.js +0 -113
- package/uview-ui/components/u-slider/mpwxs.js +0 -42
- package/uview-ui/components/u-slider/mpwxs.wxs +0 -121
- package/uview-ui/components/u-slider/nvue - /345/211/257/346/234/254.js" +0 -175
- package/uview-ui/components/u-slider/nvue.js +0 -190
- package/uview-ui/components/u-slider/props.js +0 -55
- package/uview-ui/components/u-slider/style.css +0 -11
- package/uview-ui/components/u-slider/style.scss +0 -1
- package/uview-ui/components/u-slider/u-slider.vue +0 -1
- package/uview-ui/components/u-status-bar/props.js +0 -9
- package/uview-ui/components/u-status-bar/style.css +0 -5
- package/uview-ui/components/u-status-bar/style.scss +0 -6
- package/uview-ui/components/u-status-bar/u-status-bar.vue +0 -37
- package/uview-ui/components/u-steps/props.js +0 -40
- package/uview-ui/components/u-steps/style.css +0 -24
- package/uview-ui/components/u-steps/style.scss +0 -14
- package/uview-ui/components/u-steps/u-steps.vue +0 -63
- package/uview-ui/components/u-steps-item/props.js +0 -25
- package/uview-ui/components/u-steps-item/style.css +0 -119
- package/uview-ui/components/u-steps-item/style.scss +0 -111
- package/uview-ui/components/u-steps-item/u-steps-item.vue +0 -225
- package/uview-ui/components/u-sticky/props.js +0 -41
- package/uview-ui/components/u-sticky/style.css +0 -5
- package/uview-ui/components/u-sticky/style.scss +0 -6
- package/uview-ui/components/u-sticky/u-sticky.vue +0 -201
- package/uview-ui/components/u-subsection/props.js +0 -50
- package/uview-ui/components/u-subsection/style.css +0 -95
- package/uview-ui/components/u-subsection/style.scss +0 -90
- package/uview-ui/components/u-subsection/u-subsection.vue +0 -188
- package/uview-ui/components/u-swipe-action/props.js +0 -10
- package/uview-ui/components/u-swipe-action/u-swipe-action.vue +0 -65
- package/uview-ui/components/u-swipe-action-item/index - backup.wxs +0 -256
- package/uview-ui/components/u-swipe-action-item/index.wxs +0 -225
- package/uview-ui/components/u-swipe-action-item/nvue - backup.js +0 -264
- package/uview-ui/components/u-swipe-action-item/nvue.js +0 -172
- package/uview-ui/components/u-swipe-action-item/props.js +0 -42
- package/uview-ui/components/u-swipe-action-item/style.css +0 -61
- package/uview-ui/components/u-swipe-action-item/style.scss +0 -45
- package/uview-ui/components/u-swipe-action-item/u-swipe-action-item.vue +0 -147
- package/uview-ui/components/u-swipe-action-item/wxs.js +0 -15
- package/uview-ui/components/u-swiper/props.js +0 -126
- package/uview-ui/components/u-swiper/style.css +0 -58
- package/uview-ui/components/u-swiper/style.scss +0 -50
- package/uview-ui/components/u-swiper/u-swiper.vue +0 -196
- package/uview-ui/components/u-swiper-indicator/props.js +0 -30
- package/uview-ui/components/u-swiper-indicator/style.css +0 -37
- package/uview-ui/components/u-swiper-indicator/style.scss +0 -31
- package/uview-ui/components/u-swiper-indicator/u-swiper-indicator.vue +0 -70
- package/uview-ui/components/u-switch/props.js +0 -55
- package/uview-ui/components/u-switch/style.css +0 -58
- package/uview-ui/components/u-switch/style.scss +0 -48
- package/uview-ui/components/u-switch/u-switch.vue +0 -121
- package/uview-ui/components/u-tabbar/props.js +0 -45
- package/uview-ui/components/u-tabbar/style.css +0 -39
- package/uview-ui/components/u-tabbar/style.scss +0 -24
- package/uview-ui/components/u-tabbar/u-tabbar.vue +0 -115
- package/uview-ui/components/u-tabbar-item/props.js +0 -35
- package/uview-ui/components/u-tabbar-item/style.css +0 -39
- package/uview-ui/components/u-tabbar-item/style.scss +0 -28
- package/uview-ui/components/u-tabbar-item/u-tabbar-item.vue +0 -101
- package/uview-ui/components/u-table/props.js +0 -3
- package/uview-ui/components/u-table/style.css +0 -11
- package/uview-ui/components/u-table/style.scss +0 -1
- package/uview-ui/components/u-table/u-table.vue +0 -24
- package/uview-ui/components/u-tabs/props.js +0 -65
- package/uview-ui/components/u-tabs/style.css +0 -69
- package/uview-ui/components/u-tabs/style.scss +0 -58
- package/uview-ui/components/u-tabs/u-tabs.vue +0 -303
- package/uview-ui/components/u-tabs-item/props.js +0 -3
- package/uview-ui/components/u-tabs-item/u-tabs-item.vue +0 -26
- package/uview-ui/components/u-tag/props.js +0 -85
- package/uview-ui/components/u-tag/style.css +0 -180
- package/uview-ui/components/u-tag/style.scss +0 -206
- package/uview-ui/components/u-tag/u-tag.vue +0 -1
- package/uview-ui/components/u-td/props.js +0 -3
- package/uview-ui/components/u-td/style.css +0 -11
- package/uview-ui/components/u-td/style.scss +0 -1
- package/uview-ui/components/u-td/u-td.vue +0 -26
- package/uview-ui/components/u-text/props.js +0 -111
- package/uview-ui/components/u-text/style.css +0 -65
- package/uview-ui/components/u-text/u-text.vue +0 -143
- package/uview-ui/components/u-text/value.js +0 -85
- package/uview-ui/components/u-textarea/props.js +0 -120
- package/uview-ui/components/u-textarea/style.css +0 -46
- package/uview-ui/components/u-textarea/style.scss +0 -39
- package/uview-ui/components/u-textarea/u-textarea.vue +0 -194
- package/uview-ui/components/u-toast/style.css +0 -78
- package/uview-ui/components/u-toast/style.scss +0 -108
- package/uview-ui/components/u-toast/u-toast.vue +0 -180
- package/uview-ui/components/u-toolbar/props.js +0 -35
- package/uview-ui/components/u-toolbar/style.css +0 -37
- package/uview-ui/components/u-toolbar/style.scss +0 -32
- package/uview-ui/components/u-toolbar/u-toolbar.vue +0 -62
- package/uview-ui/components/u-tooltip/props.js +0 -60
- package/uview-ui/components/u-tooltip/style.css +0 -75
- package/uview-ui/components/u-tooltip/style.scss +0 -63
- package/uview-ui/components/u-tooltip/u-tooltip.vue +0 -279
- package/uview-ui/components/u-tr/props.js +0 -3
- package/uview-ui/components/u-tr/style.css +0 -11
- package/uview-ui/components/u-tr/style.scss +0 -1
- package/uview-ui/components/u-tr/u-tr.vue +0 -26
- package/uview-ui/components/u-transition/nvue.ani-map.js +0 -1
- package/uview-ui/components/u-transition/props.js +0 -25
- package/uview-ui/components/u-transition/style.css +0 -109
- package/uview-ui/components/u-transition/style.scss +0 -9
- package/uview-ui/components/u-transition/transition.js +0 -157
- package/uview-ui/components/u-transition/u-transition.vue +0 -85
- package/uview-ui/components/u-transition/vue.ani-style.scss +0 -113
- package/uview-ui/components/u-upload/mixin.js +0 -21
- package/uview-ui/components/u-upload/props.js +0 -125
- package/uview-ui/components/u-upload/style.css +0 -167
- package/uview-ui/components/u-upload/style.scss +0 -206
- package/uview-ui/components/u-upload/u-upload.vue +0 -317
- package/uview-ui/components/u-upload/utils.js +0 -151
- package/uview-ui/components/uview-ui/uview-ui.vue +0 -8
- package/uview-ui/index.css +0 -352
- package/uview-ui/index.js +0 -78
- package/uview-ui/index.scss +0 -23
- package/uview-ui/libs/config/color.js +0 -17
- package/uview-ui/libs/config/config.js +0 -34
- package/uview-ui/libs/config/props/actionSheet.js +0 -25
- package/uview-ui/libs/config/props/album.js +0 -25
- package/uview-ui/libs/config/props/alert.js +0 -22
- package/uview-ui/libs/config/props/avatar.js +0 -28
- package/uview-ui/libs/config/props/avatarGroup.js +0 -23
- package/uview-ui/libs/config/props/backtop.js +0 -27
- package/uview-ui/libs/config/props/badge.js +0 -27
- package/uview-ui/libs/config/props/button.js +0 -42
- package/uview-ui/libs/config/props/calendar.js +0 -42
- package/uview-ui/libs/config/props/carKeyboard.js +0 -15
- package/uview-ui/libs/config/props/cell.js +0 -35
- package/uview-ui/libs/config/props/cellGroup.js +0 -17
- package/uview-ui/libs/config/props/checkbox.js +0 -27
- package/uview-ui/libs/config/props/checkboxGroup.js +0 -29
- package/uview-ui/libs/config/props/circleProgress.js +0 -15
- package/uview-ui/libs/config/props/code.js +0 -21
- package/uview-ui/libs/config/props/codeInput.js +0 -29
- package/uview-ui/libs/config/props/col.js +0 -19
- package/uview-ui/libs/config/props/collapse.js +0 -17
- package/uview-ui/libs/config/props/collapseItem.js +0 -25
- package/uview-ui/libs/config/props/columnNotice.js +0 -24
- package/uview-ui/libs/config/props/countDown.js +0 -18
- package/uview-ui/libs/config/props/countTo.js +0 -25
- package/uview-ui/libs/config/props/datetimePicker.js +0 -37
- package/uview-ui/libs/config/props/divider.js +0 -23
- package/uview-ui/libs/config/props/empty.js +0 -26
- package/uview-ui/libs/config/props/form.js +0 -22
- package/uview-ui/libs/config/props/formItem.js +0 -23
- package/uview-ui/libs/config/props/gap.js +0 -19
- package/uview-ui/libs/config/props/grid.js +0 -17
- package/uview-ui/libs/config/props/gridItem.js +0 -16
- package/uview-ui/libs/config/props/icon.js +0 -36
- package/uview-ui/libs/config/props/image.js +0 -30
- package/uview-ui/libs/config/props/indexAnchor.js +0 -19
- package/uview-ui/libs/config/props/indexList.js +0 -19
- package/uview-ui/libs/config/props/input.js +0 -48
- package/uview-ui/libs/config/props/keyboard.js +0 -30
- package/uview-ui/libs/config/props/line.js +0 -20
- package/uview-ui/libs/config/props/lineProgress.js +0 -19
- package/uview-ui/libs/config/props/link.js +0 -26
- package/uview-ui/libs/config/props/list.js +0 -28
- package/uview-ui/libs/config/props/listItem.js +0 -15
- package/uview-ui/libs/config/props/loadingIcon.js +0 -30
- package/uview-ui/libs/config/props/loadingPage.js +0 -23
- package/uview-ui/libs/config/props/loadmore.js +0 -32
- package/uview-ui/libs/config/props/modal.js +0 -31
- package/uview-ui/libs/config/props/navbar.js +0 -32
- package/uview-ui/libs/config/props/noNetwork.js +0 -18
- package/uview-ui/libs/config/props/noticeBar.js +0 -27
- package/uview-ui/libs/config/props/notify.js +0 -22
- package/uview-ui/libs/config/props/numberBox.js +0 -35
- package/uview-ui/libs/config/props/numberKeyboard.js +0 -17
- package/uview-ui/libs/config/props/overlay.js +0 -18
- package/uview-ui/libs/config/props/parse.js +0 -22
- package/uview-ui/libs/config/props/picker.js +0 -29
- package/uview-ui/libs/config/props/popup.js +0 -29
- package/uview-ui/libs/config/props/radio.js +0 -27
- package/uview-ui/libs/config/props/radioGroup.js +0 -30
- package/uview-ui/libs/config/props/rate.js +0 -26
- package/uview-ui/libs/config/props/readMore.js +0 -22
- package/uview-ui/libs/config/props/row.js +0 -17
- package/uview-ui/libs/config/props/rowNotice.js +0 -21
- package/uview-ui/libs/config/props/scrollList.js +0 -20
- package/uview-ui/libs/config/props/search.js +0 -37
- package/uview-ui/libs/config/props/section.js +0 -24
- package/uview-ui/libs/config/props/skeleton.js +0 -25
- package/uview-ui/libs/config/props/slider.js +0 -25
- package/uview-ui/libs/config/props/statusBar.js +0 -15
- package/uview-ui/libs/config/props/steps.js +0 -21
- package/uview-ui/libs/config/props/stepsItem.js +0 -18
- package/uview-ui/libs/config/props/sticky.js +0 -20
- package/uview-ui/libs/config/props/subsection.js +0 -23
- package/uview-ui/libs/config/props/swipeAction.js +0 -15
- package/uview-ui/libs/config/props/swipeActionItem.js +0 -21
- package/uview-ui/libs/config/props/swiper.js +0 -39
- package/uview-ui/libs/config/props/swipterIndicator.js +0 -19
- package/uview-ui/libs/config/props/switch.js +0 -24
- package/uview-ui/libs/config/props/tabbar.js +0 -22
- package/uview-ui/libs/config/props/tabbarItem.js +0 -20
- package/uview-ui/libs/config/props/tabs.js +0 -32
- package/uview-ui/libs/config/props/tag.js +0 -29
- package/uview-ui/libs/config/props/text.js +0 -38
- package/uview-ui/libs/config/props/textarea.js +0 -36
- package/uview-ui/libs/config/props/toast.js +0 -30
- package/uview-ui/libs/config/props/toolbar.js +0 -21
- package/uview-ui/libs/config/props/tooltip.js +0 -25
- package/uview-ui/libs/config/props/transition.js +0 -18
- package/uview-ui/libs/config/props/upload.js +0 -36
- package/uview-ui/libs/config/props.js +0 -190
- package/uview-ui/libs/config/zIndex.js +0 -20
- package/uview-ui/libs/css/color-libcss.scss +0 -117
- package/uview-ui/libs/css/color.scss +0 -155
- package/uview-ui/libs/css/common-libcss.scss +0 -132
- package/uview-ui/libs/css/common.scss +0 -97
- package/uview-ui/libs/css/components-libcss.scss +0 -11
- package/uview-ui/libs/css/components.scss +0 -15
- package/uview-ui/libs/css/flex-libcss.scss +0 -169
- package/uview-ui/libs/css/flex.scss +0 -257
- package/uview-ui/libs/css/h5-libcss.scss +0 -0
- package/uview-ui/libs/css/h5.scss +0 -0
- package/uview-ui/libs/css/mixin-libcss.scss +0 -0
- package/uview-ui/libs/css/mixin.scss +0 -8
- package/uview-ui/libs/css/mp-libcss.scss +0 -0
- package/uview-ui/libs/css/mp.scss +0 -0
- package/uview-ui/libs/css/nvue-libcss.scss +0 -0
- package/uview-ui/libs/css/nvue.scss +0 -0
- package/uview-ui/libs/css/vue-libcss.scss +0 -35
- package/uview-ui/libs/css/vue.scss +0 -27
- package/uview-ui/libs/function/colorGradient.js +0 -134
- package/uview-ui/libs/function/debounce.js +0 -29
- package/uview-ui/libs/function/digit.js +0 -167
- package/uview-ui/libs/function/platform.js +0 -75
- package/uview-ui/libs/function/test.js +0 -288
- package/uview-ui/libs/function/throttle.js +0 -30
- package/uview-ui/libs/luch-request/adapters/index.js +0 -97
- package/uview-ui/libs/luch-request/core/InterceptorManager.js +0 -50
- package/uview-ui/libs/luch-request/core/Request.js +0 -198
- package/uview-ui/libs/luch-request/core/buildFullPath.js +0 -20
- package/uview-ui/libs/luch-request/core/defaults.js +0 -29
- package/uview-ui/libs/luch-request/core/dispatchRequest.js +0 -3
- package/uview-ui/libs/luch-request/core/mergeConfig.js +0 -103
- package/uview-ui/libs/luch-request/core/settle.js +0 -16
- package/uview-ui/libs/luch-request/helpers/buildURL.js +0 -69
- package/uview-ui/libs/luch-request/helpers/combineURLs.js +0 -14
- package/uview-ui/libs/luch-request/helpers/isAbsoluteURL.js +0 -14
- package/uview-ui/libs/luch-request/index.d.ts +0 -116
- package/uview-ui/libs/luch-request/index.js +0 -3
- package/uview-ui/libs/luch-request/utils/clone.js +0 -264
- package/uview-ui/libs/luch-request/utils.js +0 -131
- package/uview-ui/libs/mixin/button.js +0 -13
- package/uview-ui/libs/mixin/mixin.js +0 -161
- package/uview-ui/libs/mixin/mpMixin.js +0 -8
- package/uview-ui/libs/mixin/mpShare.js +0 -13
- package/uview-ui/libs/mixin/openType.js +0 -25
- package/uview-ui/libs/mixin/style.js +0 -252
- package/uview-ui/libs/mixin/touch.js +0 -61
- package/uview-ui/libs/util/async-validator.js +0 -1343
- package/uview-ui/libs/util/calendar.js +0 -546
- package/uview-ui/libs/util/dayjs.js +0 -308
- package/uview-ui/libs/util/emitter.js +0 -51
- package/uview-ui/libs/util/route.js +0 -124
- package/uview-ui/package.json +0 -84
- package/uview-ui/theme.css +0 -29
- package/uview-ui/theme.scss +0 -44
- /package/ui-fireui/{fui-actionsheet → components/fui-actionsheet}/fui-actionsheet.vue +0 -0
- /package/ui-fireui/{fui-alert → components/fui-alert}/fui-alert.vue +0 -0
- /package/ui-fireui/{fui-badge → components/fui-badge}/fui-badge.vue +0 -0
- /package/ui-fireui/{fui-bottom-navigation → components/fui-bottom-navigation}/fui-bottom-navigation.vue +0 -0
- /package/ui-fireui/{fui-bottom-popup → components/fui-bottom-popup}/fui-bottom-popup.vue +0 -0
- /package/ui-fireui/{fui-bubble-popup → components/fui-bubble-popup}/fui-bubble-popup.vue +0 -0
- /package/ui-fireui/{fui-button → components/fui-button}/fui-button.vue +0 -0
- /package/ui-fireui/{fui-calendar → components/fui-calendar}/fui-calendar.js +0 -0
- /package/ui-fireui/{fui-calendar → components/fui-calendar}/fui-calendar.vue +0 -0
- /package/ui-fireui/{fui-card → components/fui-card}/fui-card.vue +0 -0
- /package/ui-fireui/{fui-cascade-selection → components/fui-cascade-selection}/fui-cascade-selection.vue +0 -0
- /package/ui-fireui/{fui-circular-progress → components/fui-circular-progress}/fui-circular-progress.vue +0 -0
- /package/ui-fireui/{fui-collapse → components/fui-collapse}/fui-collapse.vue +0 -0
- /package/ui-fireui/{fui-countdown → components/fui-countdown}/fui-countdown.vue +0 -0
- /package/ui-fireui/{fui-datetime → components/fui-datetime}/fui-datetime.vue +0 -0
- /package/ui-fireui/{fui-divider → components/fui-divider}/fui-divider.vue +0 -0
- /package/ui-fireui/{fui-drawer → components/fui-drawer}/fui-drawer.vue +0 -0
- /package/ui-fireui/{fui-dropdown-list → components/fui-dropdown-list}/fui-dropdown-list.vue +0 -0
- /package/ui-fireui/{fui-fab → components/fui-fab}/fui-fab.vue +0 -0
- /package/ui-fireui/{fui-footer → components/fui-footer}/fui-footer.vue +0 -0
- /package/ui-fireui/{fui-grid → components/fui-grid}/fui-grid.vue +0 -0
- /package/ui-fireui/{fui-grid-item → components/fui-grid-item}/fui-grid-item.vue +0 -0
- /package/ui-fireui/{fui-icon → components/fui-icon}/fui-icon.vue +0 -0
- /package/ui-fireui/{fui-image-cropper → components/fui-image-cropper}/fui-image-cropper.vue +0 -0
- /package/ui-fireui/{fui-image-group → components/fui-image-group}/fui-image-group.vue +0 -0
- /package/ui-fireui/{fui-keyboard → components/fui-keyboard}/fui-keyboard.vue +0 -0
- /package/ui-fireui/{fui-keyboard-input → components/fui-keyboard-input}/fui-keyboard-input.vue +0 -0
- /package/ui-fireui/{fui-list-cell → components/fui-list-cell}/fui-list-cell.vue +0 -0
- /package/ui-fireui/{fui-list-view → components/fui-list-view}/fui-list-view.vue +0 -0
- /package/ui-fireui/{fui-loading → components/fui-loading}/fui-loading.vue +0 -0
- /package/ui-fireui/{fui-loadmore → components/fui-loadmore}/fui-loadmore.vue +0 -0
- /package/ui-fireui/{fui-modal → components/fui-modal}/fui-modal.vue +0 -0
- /package/ui-fireui/{fui-navigation-bar → components/fui-navigation-bar}/fui-navigation-bar.vue +0 -0
- /package/ui-fireui/{fui-no-data → components/fui-no-data}/fui-no-data.vue +0 -0
- /package/ui-fireui/{fui-nomore → components/fui-nomore}/fui-nomore.vue +0 -0
- /package/ui-fireui/{fui-numberbox → components/fui-numberbox}/fui-numberbox.vue +0 -0
- /package/ui-fireui/{fui-numberbox-border → components/fui-numberbox-border}/fui-numberbox-border.vue +0 -0
- /package/ui-fireui/{fui-picture-cropper → components/fui-picture-cropper}/fui-picture-cropper.vue +0 -0
- /package/ui-fireui/{fui-picture-cropper → components/fui-picture-cropper}/fui-picture-cropper.wxs +0 -0
- /package/ui-fireui/{fui-rate → components/fui-rate}/fui-rate.vue +0 -0
- /package/ui-fireui/{fui-round-progress → components/fui-round-progress}/fui-round-progress.vue +0 -0
- /package/ui-fireui/{fui-scroll-top → components/fui-scroll-top}/fui-scroll-top.vue +0 -0
- /package/ui-fireui/{fui-sharemodel → components/fui-sharemodel}/fui-sharemodel.vue +0 -0
- /package/ui-fireui/{fui-skeleton → components/fui-skeleton}/fui-skeleton.vue +0 -0
- /package/ui-fireui/{fui-steps → components/fui-steps}/fui-steps.vue +0 -0
- /package/ui-fireui/{fui-sticky → components/fui-sticky}/fui-sticky.vue +0 -0
- /package/ui-fireui/{fui-sticky-wxs → components/fui-sticky-wxs}/fui-sticky-wxs.vue +0 -0
- /package/ui-fireui/{fui-sticky-wxs → components/fui-sticky-wxs}/fui-sticky.wxs +0 -0
- /package/ui-fireui/{fui-swipe-action → components/fui-swipe-action}/fui-swipe-action.vue +0 -0
- /package/ui-fireui/{fui-tabbar → components/fui-tabbar}/fui-tabbar.vue +0 -0
- /package/ui-fireui/{fui-tabs → components/fui-tabs}/fui-tabs.vue +0 -0
- /package/ui-fireui/{fui-tabs2 → components/fui-tabs2}/fui-tabs2.vue +0 -0
- /package/ui-fireui/{fui-tag → components/fui-tag}/fui-tag.vue +0 -0
- /package/ui-fireui/{fui-time-axis → components/fui-time-axis}/fui-time-axis.vue +0 -0
- /package/ui-fireui/{fui-timeaxis-item → components/fui-timeaxis-item}/fui-timeaxis-item.vue +0 -0
- /package/ui-fireui/{fui-tips → components/fui-tips}/fui-tips.vue +0 -0
- /package/ui-fireui/{fui-toast → components/fui-toast}/fui-toast.vue +0 -0
- /package/ui-fireui/{fui-top-dropdown → components/fui-top-dropdown}/fui-top-dropdown.vue +0 -0
- /package/ui-fireui/{fui-upload → components/fui-upload}/fui-upload.vue +0 -0
- /package/ui-fireui/{fui-uploadsamll → components/fui-uploadsamll}/fui-uploadsamll.vue +0 -0
- /package/{uview-ui/changelog.md → uview-plus/changelog-v2.md} +0 -0
- /package/uview-plus/components/{u-button-wu → u-button}/_doc/changelog.md +0 -0
- /package/uview-plus/components/{u-button-wu → u-button}/_doc/package.json +0 -0
- /package/uview-plus/components/{u-drag-sort → u-dragsort}/_doc/changelog.md +0 -0
- /package/uview-plus/components/{u-drag-sort → u-dragsort}/_doc/package.json +0 -0
- /package/uview-plus/components/{u-image-wu → u-image}/_doc/changelog.md +0 -0
- /package/uview-plus/components/{u-image-wu → u-image}/_doc/package.json +0 -0
- /package/{uview-ui/components/u-tooltip → uview-plus/libs/util}/clipboard.min.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<template>
|
|
2
|
<view class="u-cropper">
|
|
1
3
|
<!-- <image :src="imgSrc.imgSrc" @click="select" :style="[ imgStyle ]" class="my-avatar"></image> -->
|
|
2
4
|
<canvas
|
|
3
5
|
:canvas-id="'avatar-canvas-' + instanceId"
|
|
4
6
|
:id="'avatar-canvas-' + instanceId"
|
|
5
7
|
class="my-canvas"
|
|
6
8
|
:style="{ top: styleTop, height: cvsStyleHeight }"
|
|
7
9
|
disable-scroll="false"
|
|
8
10
|
></canvas>
|
|
9
11
|
<canvas
|
|
10
12
|
:canvas-id="'oper-canvas-' + instanceId"
|
|
11
13
|
:id="'oper-canvas-' + instanceId"
|
|
12
14
|
class="oper-canvas"
|
|
13
15
|
:style="{ top: styleTop, height: cvsStyleHeight }"
|
|
14
16
|
disable-scroll="false"
|
|
15
17
|
@touchstart="start"
|
|
16
18
|
@touchmove="move"
|
|
17
19
|
@touchend="end"
|
|
18
20
|
></canvas>
|
|
19
21
|
<canvas
|
|
20
22
|
:canvas-id="'prv-canvas-' + instanceId"
|
|
21
23
|
:id="'prv-canvas-' + instanceId"
|
|
22
24
|
class="prv-canvas"
|
|
23
25
|
disable-scroll="false"
|
|
24
26
|
@touchstart="hideImg"
|
|
25
27
|
:style="{ height: cvsStyleHeight, top: prvTop }"
|
|
26
28
|
></canvas>
|
|
27
29
|
<view class="oper-wrapper" :style="{ display: styleDisplay }">
|
|
28
30
|
<view class="oper">
|
|
29
31
|
<view class="btn-wrapper" v-if="showOper">
|
|
30
32
|
<view @click="select" hover-class="hover" :style="{ width: btnWidth }">
|
|
31
33
|
<text>{{ t('up.common.re-select') }}</text>
|
|
32
34
|
</view>
|
|
33
35
|
<view @click="close" hover-class="hover" :style="{ width: btnWidth }">
|
|
34
36
|
<text>{{ t('up.common.close') }}</text>
|
|
35
37
|
</view>
|
|
36
38
|
<view @click="rotate" hover-class="hover" :style="{ width: btnWidth, display: btnDsp }">
|
|
37
39
|
<text>{{ t('up.common.rotate') }}</text>
|
|
38
40
|
</view>
|
|
39
41
|
<view @click="preview" hover-class="hover" :style="{ width: btnWidth }">
|
|
40
42
|
<text>{{ t('up.common.preview') }}</text>
|
|
41
43
|
</view>
|
|
42
44
|
<view @click="confirm" hover-class="hover" :style="{ width: btnWidth }">
|
|
43
45
|
<text>{{ t('up.common.confirm') }}</text>
|
|
44
46
|
</view>
|
|
45
47
|
</view>
|
|
46
48
|
<view class="clr-wrapper" v-else>
|
|
47
49
|
<slider
|
|
48
50
|
class="my-slider"
|
|
49
51
|
@change="colorChange"
|
|
50
52
|
block-size="25"
|
|
51
53
|
value="0"
|
|
52
54
|
min="-100"
|
|
53
55
|
max="100"
|
|
54
56
|
activeColor="red"
|
|
55
57
|
backgroundColor="green"
|
|
56
58
|
block-color="grey"
|
|
57
59
|
show-value
|
|
58
60
|
></slider>
|
|
59
61
|
<view @click="prvUpload" hover-class="hover" :style="{ width: btnWidth }">
|
|
60
62
|
<text>{{ t('up.common.confirm') }}</text>
|
|
61
63
|
</view>
|
|
62
64
|
</view>
|
|
63
65
|
</view>
|
|
64
66
|
</view>
|
|
65
67
|
<view @click="chooseImage(0, {})" v-if="styleDisplay == 'none'">
|
|
66
68
|
<slot></slot>
|
|
67
69
|
</view>
|
|
68
70
|
</view>
|
|
69
71
|
name: 'u-cropper',
|
|
70
72
|
data() {
|
|
71
73
|
return {
|
|
72
74
|
// 添加实例ID用于区分不同实例
|
|
73
75
|
instanceId: Date.now() + '-' + Math.random().toString(36).substr(2, 9),
|
|
74
76
|
cvsStyleHeight: '0px',
|
|
75
77
|
styleDisplay: 'none',
|
|
76
78
|
styleTop: '-10000px',
|
|
77
79
|
prvTop: '-10000px',
|
|
78
80
|
imgStyle: {},
|
|
79
81
|
selStyle: {},
|
|
80
82
|
showOper: true,
|
|
81
83
|
imgSrc: {
|
|
82
84
|
imgSrc: ''
|
|
83
85
|
},
|
|
84
86
|
btnWidth: '19%',
|
|
85
87
|
btnDsp: 'flex',
|
|
86
88
|
// 裁剪区域宽度,用于设置选择区域的宽度
|
|
87
89
|
arWidth: '',
|
|
88
90
|
// 裁剪区域高度,用于设置选择区域的高度
|
|
89
91
|
arHeight: '',
|
|
90
92
|
// 导出图片宽度,用于设置最终导出图片的宽度
|
|
91
93
|
expWidth: '',
|
|
92
94
|
// 导出图片高度,用于设置最终导出图片的高度
|
|
93
95
|
expHeight: '',
|
|
94
96
|
// 是否允许调整裁剪框大小
|
|
95
97
|
letChangeSize: false
|
|
96
98
|
};
|
|
97
99
|
},
|
|
98
100
|
watch: {
|
|
99
101
|
avatarSrc() {
|
|
100
102
|
this.imgSrc.imgSrc = this.avatarSrc;
|
|
101
103
|
}
|
|
102
104
|
},
|
|
103
105
|
emits: ['avtinit', 'confirm'],
|
|
104
106
|
props: {
|
|
105
107
|
minScale: '',
|
|
106
108
|
maxScale: '',
|
|
107
109
|
canScale: true,
|
|
108
110
|
canRotate: true,
|
|
109
111
|
lockWidth: '',
|
|
110
112
|
lockHeight: '',
|
|
111
113
|
stretch: '',
|
|
112
114
|
lock: '',
|
|
113
115
|
noTab: true,
|
|
114
116
|
inner: false,
|
|
115
117
|
quality: '',
|
|
116
118
|
index: '',
|
|
117
119
|
canChangeSize: false,
|
|
118
120
|
areaWidth: '300rpx',
|
|
119
121
|
// 裁剪区域高度,用于设置选择区域的高度
|
|
120
122
|
areaHeight: '300rpx',
|
|
121
123
|
// 导出图片宽度,用于设置最终导出图片的宽度
|
|
122
124
|
exportWidth: '260rpx',
|
|
123
125
|
// 导出图片高度,用于设置最终导出图片的高度
|
|
124
126
|
exportHeight: '260rpx'
|
|
125
127
|
},
|
|
126
128
|
created() {
|
|
127
129
|
this.ctxCanvas = uni.createCanvasContext('avatar-canvas-' + this.instanceId, this);
|
|
128
130
|
this.ctxCanvasOper = uni.createCanvasContext('oper-canvas-' + this.instanceId, this);
|
|
129
131
|
this.ctxCanvasPrv = uni.createCanvasContext('prv-canvas-' + this.instanceId, this);
|
|
130
132
|
this.qlty = parseInt(this.quality) || 0.9;
|
|
131
133
|
this.imgSrc.imgSrc = this.imageSrc;
|
|
132
134
|
this.letRotate = this.canRotate === false || this.inner === true ? 0 : 1;
|
|
133
135
|
this.letScale = this.canScale === false ? 0 : 1;
|
|
134
136
|
// 是否允许调整裁剪框大小,false表示不允许,其他值表示允许
|
|
135
137
|
this.letChangeSize = this.canChangeSize;
|
|
136
138
|
this.isin = this.inner === true ? 1 : 0;
|
|
137
139
|
this.indx = this.index || undefined;
|
|
138
140
|
this.mnScale = this.minScale || 0.3;
|
|
139
141
|
this.mxScale = this.maxScale || 4;
|
|
140
142
|
this.noBar = this.noTab === true ? 1 : 0;
|
|
141
143
|
this.stc = this.stretch;
|
|
142
144
|
this.lck = this.lock;
|
|
143
145
|
if (this.isin) {
|
|
144
146
|
this.btnWidth = '24%';
|
|
145
147
|
this.btnDsp = 'none';
|
|
146
148
|
} else {
|
|
147
149
|
this.btnWidth = '19%';
|
|
148
150
|
this.btnDsp = 'flex';
|
|
149
151
|
}
|
|
150
152
|
if (this.noBar) {
|
|
151
153
|
this.moreHeight = 0;
|
|
152
154
|
this.windowResize();
|
|
153
155
|
} else {
|
|
154
156
|
uni.showTabBar({
|
|
155
157
|
complete: (res) => {
|
|
156
158
|
this.moreHeight = res.errMsg === 'showTabBar:ok' ? 50 : 0;
|
|
157
159
|
this.windowResize();
|
|
158
160
|
}
|
|
159
161
|
});
|
|
160
162
|
}
|
|
161
163
|
},
|
|
162
164
|
methods: {
|
|
163
165
|
t,
|
|
164
166
|
windowResize() {
|
|
165
167
|
let sysInfo = uni.getSystemInfoSync();
|
|
166
168
|
this.platform = sysInfo.platform;
|
|
167
169
|
this.pixelRatio = sysInfo.pixelRatio;
|
|
168
170
|
this.windowWidth = sysInfo.windowWidth;
|
|
169
171
|
// #ifdef H5
|
|
170
172
|
this.drawTop = sysInfo.windowTop;
|
|
171
173
|
this.windowHeight = sysInfo.windowHeight + sysInfo.windowBottom;
|
|
172
174
|
this.cvsStyleHeight = this.windowHeight - tabHeight + 'px';
|
|
173
175
|
// #endif
|
|
174
176
|
// #ifdef APP-PLUS
|
|
175
177
|
if (this.platform === 'android') {
|
|
176
178
|
this.windowHeight = sysInfo.screenHeight + sysInfo.statusBarHeight;
|
|
177
179
|
this.cvsStyleHeight = this.windowHeight - tabHeight + 'px';
|
|
178
180
|
} else {
|
|
179
181
|
this.windowHeight = sysInfo.windowHeight + this.moreHeight;
|
|
180
182
|
this.cvsStyleHeight = this.windowHeight - tabHeight + 6 + 'px';
|
|
181
183
|
}
|
|
182
184
|
// #endif
|
|
183
185
|
// #ifdef MP
|
|
184
186
|
this.windowHeight = sysInfo.windowHeight + this.moreHeight;
|
|
185
187
|
this.cvsStyleHeight = this.windowHeight - tabHeight - 2 + 'px';
|
|
186
188
|
// #endif
|
|
187
189
|
this.pxRatio = this.windowWidth / 750;
|
|
188
190
|
let style = this.avatarStyle;
|
|
189
191
|
if (style && style !== true && (style = style.trim())) {
|
|
190
192
|
style = style.split(';');
|
|
191
193
|
let obj = {};
|
|
192
194
|
for (let v of style) {
|
|
193
195
|
if (!v) continue;
|
|
194
196
|
v = v.trim().split(':');
|
|
195
197
|
if (v[1].indexOf('rpx') >= 0) {
|
|
196
198
|
let arr = v[1].trim().split(' ');
|
|
197
199
|
for (let k in arr) {
|
|
198
200
|
if (!arr[k]) continue;
|
|
199
201
|
if (arr[k].indexOf('rpx') >= 0) {
|
|
200
202
|
arr[k] = parseFloat(arr[k]) * this.pxRatio + 'px';
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
v[1] = arr.join(' ');
|
|
204
206
|
}
|
|
205
207
|
obj[v[0].trim()] = v[1].trim();
|
|
206
208
|
}
|
|
207
209
|
this.imgStyle = obj;
|
|
208
210
|
}
|
|
209
211
|
this.expWidth &&
|
|
210
212
|
(this.expWidth = this.expWidth.indexOf('rpx') >= 0 ? parseInt(this.expWidth) * this.pxRatio : parseInt(this.expWidth));
|
|
211
213
|
this.expHeight &&
|
|
212
214
|
(this.expHeight =
|
|
213
215
|
this.expHeight.indexOf('rpx') >= 0 ? parseInt(this.expHeight) * this.pxRatio : parseInt(this.expHeight));
|
|
214
216
|
if (this.styleDisplay === 'flex') {
|
|
215
217
|
this.drawInit(true);
|
|
216
218
|
}
|
|
217
219
|
this.hideImg();
|
|
218
220
|
},
|
|
219
221
|
select() {
|
|
220
222
|
if (this.fSelecting) return;
|
|
221
223
|
this.fSelecting = true;
|
|
222
224
|
setTimeout(() => {
|
|
223
225
|
this.fSelecting = false;
|
|
224
226
|
}, 500);
|
|
225
227
|
uni.chooseImage({
|
|
226
228
|
count: 1,
|
|
227
229
|
sizeType: ['original', 'compressed'],
|
|
228
230
|
sourceType: ['album', 'camera'],
|
|
229
231
|
success: (r) => {
|
|
230
232
|
uni.showLoading({ mask: true });
|
|
231
233
|
let path = (this.imgPath = r.tempFilePaths[0]);
|
|
232
234
|
uni.getImageInfo({
|
|
233
235
|
src: path,
|
|
234
236
|
success: (r) => {
|
|
235
237
|
this.imgWidth = r.width;
|
|
236
238
|
this.imgHeight = r.height;
|
|
237
239
|
this.path = path;
|
|
238
240
|
if (!this.hasSel) {
|
|
239
241
|
let style = this.selStyle || {};
|
|
240
242
|
if (this.arWidth && this.arHeight) {
|
|
241
243
|
let areaWidth =
|
|
242
244
|
this.arWidth.indexOf('rpx') >= 0 ? parseInt(this.arWidth) * this.pxRatio : parseInt(this.arWidth),
|
|
243
245
|
areaHeight =
|
|
244
246
|
this.arHeight.indexOf('rpx') >= 0 ? parseInt(this.arHeight) * this.pxRatio : parseInt(this.arHeight);
|
|
245
247
|
style.width = areaWidth + 'px';
|
|
246
248
|
style.height = areaHeight + 'px';
|
|
247
249
|
style.top = (this.windowHeight - areaHeight - tabHeight) / 2 + 'px';
|
|
248
250
|
style.left = (this.windowWidth - areaWidth) / 2 + 'px';
|
|
249
251
|
} else {
|
|
250
252
|
uni.showModal({
|
|
251
253
|
title: t('up.cropper.emptyWidhtOrHeight'),
|
|
252
254
|
showCancel: false
|
|
253
255
|
});
|
|
254
256
|
return;
|
|
255
257
|
}
|
|
256
258
|
this.selStyle = style;
|
|
257
259
|
}
|
|
258
260
|
if (this.noBar) {
|
|
259
261
|
this.drawInit(true);
|
|
260
262
|
} else {
|
|
261
263
|
uni.hideTabBar({
|
|
262
264
|
complete: () => {
|
|
263
265
|
this.drawInit(true);
|
|
264
266
|
}
|
|
265
267
|
});
|
|
266
268
|
}
|
|
267
269
|
},
|
|
268
270
|
fail: () => {
|
|
269
271
|
uni.showToast({
|
|
270
272
|
title: 'error3',
|
|
271
273
|
duration: 2000
|
|
272
274
|
});
|
|
273
275
|
},
|
|
274
276
|
complete() {
|
|
275
277
|
uni.hideLoading();
|
|
276
278
|
}
|
|
277
279
|
});
|
|
278
280
|
}
|
|
279
281
|
});
|
|
280
282
|
},
|
|
281
283
|
confirm() {
|
|
282
284
|
if (this.fUploading) return;
|
|
283
285
|
this.fUploading = true;
|
|
284
286
|
setTimeout(() => {
|
|
285
287
|
this.fUploading = false;
|
|
286
288
|
}, 1000);
|
|
287
289
|
let style = this.selStyle,
|
|
288
290
|
x = parseInt(style.left),
|
|
289
291
|
y = parseInt(style.top),
|
|
290
292
|
width = parseInt(style.width),
|
|
291
293
|
height = parseInt(style.height),
|
|
292
294
|
expWidth = this.expWidth || width,
|
|
293
295
|
expHeight = this.expHeight || height;
|
|
294
296
|
// #ifdef H5
|
|
295
297
|
// x *= this.pixelRatio;
|
|
296
298
|
// y *= this.pixelRatio;
|
|
297
299
|
expWidth = width;
|
|
298
300
|
expHeight = height;
|
|
299
301
|
// #endif
|
|
300
302
|
uni.showLoading({ mask: true });
|
|
301
303
|
this.styleDisplay = 'none';
|
|
302
304
|
this.styleTop = '-10000px';
|
|
303
305
|
this.hasSel = false;
|
|
304
306
|
this.hideImg();
|
|
305
307
|
uni.canvasToTempFilePath(
|
|
306
308
|
{
|
|
307
309
|
x: x,
|
|
308
310
|
y: y,
|
|
309
311
|
width: width,
|
|
310
312
|
height: height,
|
|
311
313
|
destWidth: expWidth,
|
|
312
314
|
destHeight: expHeight,
|
|
313
315
|
canvasId: 'avatar-canvas-' + this.instanceId,
|
|
314
316
|
fileType: 'png',
|
|
315
317
|
quality: this.qlty,
|
|
316
318
|
success: (r) => {
|
|
317
319
|
r = r.tempFilePath;
|
|
318
320
|
// #ifdef H5
|
|
319
321
|
this.btop(r).then((r) => {
|
|
320
322
|
if (this.expWidth && this.expHeight) {
|
|
321
323
|
let ctxCanvas = this.ctxCanvas;
|
|
322
324
|
(expWidth = this.expWidth), (expHeight = this.expHeight);
|
|
323
325
|
ctxCanvas.drawImage(r, 0, 0, expWidth, expHeight);
|
|
324
326
|
ctxCanvas.draw(false, () => {
|
|
325
327
|
uni.canvasToTempFilePath({
|
|
326
328
|
x: 0,
|
|
327
329
|
y: 0,
|
|
328
330
|
width: expWidth,
|
|
329
331
|
height: expHeight,
|
|
330
332
|
destWidth: expWidth,
|
|
331
333
|
destHeight: expHeight,
|
|
332
334
|
canvasId: 'avatar-canvas-' + this.instanceId,
|
|
333
335
|
fileType: 'png',
|
|
334
336
|
quality: this.qlty,
|
|
335
337
|
success: (r) => {
|
|
336
338
|
r = r.tempFilePath;
|
|
337
339
|
this.btop(r).then((r) => {
|
|
338
340
|
this.$emit('confirm', { avatar: this.imgSrc, path: r, index: this.indx, data: this.rtn });
|
|
339
341
|
});
|
|
340
342
|
},
|
|
341
343
|
fail: () => {
|
|
342
344
|
uni.showToast({
|
|
343
345
|
title: 'error0',
|
|
344
346
|
duration: 2000
|
|
345
347
|
});
|
|
346
348
|
}
|
|
347
349
|
});
|
|
348
350
|
});
|
|
349
351
|
} else {
|
|
350
352
|
this.$emit('confirm', { avatar: this.imgSrc, path: r, index: this.indx, data: this.rtn });
|
|
351
353
|
}
|
|
352
354
|
});
|
|
353
355
|
// #endif
|
|
354
356
|
// #ifndef H5
|
|
355
357
|
this.$emit('confirm', { avatar: this.imgSrc, path: r, index: this.indx, data: this.rtn });
|
|
356
358
|
// #endif
|
|
357
359
|
},
|
|
358
360
|
fail: (res) => {
|
|
359
361
|
uni.showToast({
|
|
360
362
|
title: 'error1',
|
|
361
363
|
duration: 2000
|
|
362
364
|
});
|
|
363
365
|
},
|
|
364
366
|
complete: () => {
|
|
365
367
|
uni.hideLoading();
|
|
366
368
|
this.noBar || uni.showTabBar();
|
|
367
369
|
}
|
|
368
370
|
},
|
|
369
371
|
this
|
|
370
372
|
);
|
|
371
373
|
},
|
|
372
374
|
// 用户点击"预览"模式下的"确认"按钮时被调用,用于将预览的裁剪结果上传
|
|
373
375
|
prvUpload() {
|
|
374
376
|
if (this.fPrvUploading) return;
|
|
375
377
|
this.fPrvUploading = true;
|
|
376
378
|
setTimeout(() => {
|
|
377
379
|
this.fPrvUploading = false;
|
|
378
380
|
}, 1000);
|
|
379
381
|
let style = this.selStyle,
|
|
380
382
|
destWidth = parseInt(style.width),
|
|
381
383
|
destHeight = parseInt(style.height),
|
|
382
384
|
prvX = this.prvX,
|
|
383
385
|
prvY = this.prvY,
|
|
384
386
|
prvWidth = this.prvWidth,
|
|
385
387
|
prvHeight = this.prvHeight,
|
|
386
388
|
expWidth = this.expWidth || prvWidth,
|
|
387
389
|
expHeight = this.expHeight || prvHeight;
|
|
388
390
|
// #ifdef H5
|
|
389
391
|
// prvX *= this.pixelRatio;
|
|
390
392
|
// prvY *= this.pixelRatio;
|
|
391
393
|
expWidth = prvWidth;
|
|
392
394
|
expHeight = prvHeight;
|
|
393
395
|
// #endif
|
|
394
396
|
uni.showLoading({ mask: true });
|
|
395
397
|
this.styleDisplay = 'none';
|
|
396
398
|
this.styleTop = '-10000px';
|
|
397
399
|
this.hasSel = false;
|
|
398
400
|
this.hideImg();
|
|
399
401
|
uni.canvasToTempFilePath(
|
|
400
402
|
{
|
|
401
403
|
x: prvX,
|
|
402
404
|
y: prvY,
|
|
403
405
|
width: prvWidth,
|
|
404
406
|
height: prvHeight,
|
|
405
407
|
destWidth: expWidth,
|
|
406
408
|
destHeight: expHeight,
|
|
407
409
|
canvasId: 'prv-canvas-' + this.instanceId,
|
|
408
410
|
fileType: 'png',
|
|
409
411
|
quality: this.qlty,
|
|
410
412
|
success: (r) => {
|
|
411
413
|
r = r.tempFilePath;
|
|
412
414
|
// #ifdef H5
|
|
413
415
|
this.btop(r).then((r) => {
|
|
414
416
|
if (this.expWidth && this.expHeight) {
|
|
415
417
|
let ctxCanvas = this.ctxCanvas;
|
|
416
418
|
(expWidth = this.expWidth), (expHeight = this.expHeight);
|
|
417
419
|
ctxCanvas.drawImage(r, 0, 0, expWidth, expHeight);
|
|
418
420
|
ctxCanvas.draw(false, () => {
|
|
419
421
|
uni.canvasToTempFilePath({
|
|
420
422
|
x: 0,
|
|
421
423
|
y: 0,
|
|
422
424
|
width: expWidth,
|
|
423
425
|
height: expHeight,
|
|
424
426
|
destWidth: expWidth,
|
|
425
427
|
destHeight: expHeight,
|
|
426
428
|
canvasId: 'avatar-canvas-' + this.instanceId,
|
|
427
429
|
fileType: 'png',
|
|
428
430
|
quality: this.qlty,
|
|
429
431
|
success: (r) => {
|
|
430
432
|
r = r.tempFilePath;
|
|
431
433
|
this.btop(r).then((r) => {
|
|
432
434
|
this.$emit('confirm', { avatar: this.imgSrc, path: r, index: this.indx, data: this.rtn });
|
|
433
435
|
});
|
|
434
436
|
},
|
|
435
437
|
fail: () => {
|
|
436
438
|
uni.showToast({
|
|
437
439
|
title: 'error0',
|
|
438
440
|
duration: 2000
|
|
439
441
|
});
|
|
440
442
|
}
|
|
441
443
|
});
|
|
442
444
|
});
|
|
443
445
|
} else {
|
|
444
446
|
this.$emit('confirm', { avatar: this.imgSrc, path: r, index: this.indx, data: this.rtn });
|
|
445
447
|
}
|
|
446
448
|
});
|
|
447
449
|
// #endif
|
|
448
450
|
// #ifndef H5
|
|
449
451
|
this.$emit('confirm', { avatar: this.imgSrc, path: r, index: this.indx, data: this.rtn });
|
|
450
452
|
// #endif
|
|
451
453
|
},
|
|
452
454
|
fail: () => {
|
|
453
455
|
uni.showToast({
|
|
454
456
|
title: 'error_prv',
|
|
455
457
|
duration: 2000
|
|
456
458
|
});
|
|
457
459
|
},
|
|
458
460
|
complete: () => {
|
|
459
461
|
uni.hideLoading();
|
|
460
462
|
this.noBar || uni.showTabBar();
|
|
461
463
|
}
|
|
462
464
|
},
|
|
463
465
|
this
|
|
464
466
|
);
|
|
465
467
|
},
|
|
466
468
|
drawInit(ini = false) {
|
|
467
469
|
let allWidth = this.windowWidth,
|
|
468
470
|
allHeight = this.windowHeight,
|
|
469
471
|
imgWidth = this.imgWidth,
|
|
470
472
|
imgHeight = this.imgHeight,
|
|
471
473
|
imgRadio = imgWidth / imgHeight,
|
|
472
474
|
useWidth = allWidth - 40,
|
|
473
475
|
useHeight = allHeight - tabHeight - 80,
|
|
474
476
|
pixelRatio = this.pixelRatio,
|
|
475
477
|
selWidth = parseInt(this.selStyle.width),
|
|
476
478
|
selHeight = parseInt(this.selStyle.height);
|
|
477
479
|
this.fixWidth = 0;
|
|
478
480
|
this.fixHeight = 0;
|
|
479
481
|
this.lckWidth = 0;
|
|
480
482
|
this.lckHeight = 0;
|
|
481
483
|
switch (this.stc) {
|
|
482
484
|
case 'x':
|
|
483
485
|
this.fixWidth = 1;
|
|
484
486
|
break;
|
|
485
487
|
case 'y':
|
|
486
488
|
this.fixHeight = 1;
|
|
487
489
|
break;
|
|
488
490
|
case 'long':
|
|
489
491
|
if (imgRadio > 1) this.fixWidth = 1;
|
|
490
492
|
else this.fixHeight = 1;
|
|
491
493
|
break;
|
|
492
494
|
case 'short':
|
|
493
495
|
if (imgRadio > 1) this.fixHeight = 1;
|
|
494
496
|
else this.fixWidth = 1;
|
|
495
497
|
break;
|
|
496
498
|
case 'longSel':
|
|
497
499
|
if (selWidth > selHeight) this.fixWidth = 1;
|
|
498
500
|
else this.fixHeight = 1;
|
|
499
501
|
break;
|
|
500
502
|
case 'shortSel':
|
|
501
503
|
if (selWidth > selHeight) this.fixHeight = 1;
|
|
502
504
|
else this.fixWidth = 1;
|
|
503
505
|
break;
|
|
504
506
|
}
|
|
505
507
|
// lck 用于控制裁剪框的宽度和高度锁定行为
|
|
506
508
|
// 'x': 锁定宽度,不允许水平方向调整
|
|
507
509
|
// 'y': 锁定高度,不允许垂直方向调整
|
|
508
510
|
// 'long': 根据图片长边锁定,如果图片横向较长则锁定宽度,否则锁定高度
|
|
509
511
|
// 'short': 根据图片短边锁定,如果图片横向较长则锁定高度,否则锁定宽度
|
|
510
512
|
// 'longSel': 根据选择框的长边锁定,如果选择框宽度大于高度则锁定宽度,否则锁定高度
|
|
511
513
|
// 'shortSel': 根据选择框的短边锁定,如果选择框宽度大于高度则锁定高度,否则锁定宽度
|
|
512
514
|
switch (this.lck) {
|
|
513
515
|
case 'x':
|
|
514
516
|
this.lckWidth = 1;
|
|
515
517
|
break;
|
|
516
518
|
case 'y':
|
|
517
519
|
this.lckHeight = 1;
|
|
518
520
|
break;
|
|
519
521
|
case 'long':
|
|
520
522
|
if (imgRadio > 1) this.lckWidth = 1;
|
|
521
523
|
else this.lckHeight = 1;
|
|
522
524
|
break;
|
|
523
525
|
case 'short':
|
|
524
526
|
if (imgRadio > 1) this.lckHeight = 1;
|
|
525
527
|
else this.lckWidth = 1;
|
|
526
528
|
break;
|
|
527
529
|
case 'longSel':
|
|
528
530
|
if (selWidth > selHeight) this.lckWidth = 1;
|
|
529
531
|
else this.lckHeight = 1;
|
|
530
532
|
break;
|
|
531
533
|
case 'shortSel':
|
|
532
534
|
if (selWidth > selHeight) this.lckHeight = 1;
|
|
533
535
|
else this.lckWidth = 1;
|
|
534
536
|
break;
|
|
535
537
|
}
|
|
536
538
|
if (this.fixWidth) {
|
|
537
539
|
useWidth = selWidth;
|
|
538
540
|
useHeight = useWidth / imgRadio;
|
|
539
541
|
} else if (this.fixHeight) {
|
|
540
542
|
useHeight = selHeight;
|
|
541
543
|
useWidth = useHeight * imgRadio;
|
|
542
544
|
} else if (imgRadio < 1) {
|
|
543
545
|
if (imgHeight < useHeight) {
|
|
544
546
|
useWidth = imgWidth;
|
|
545
547
|
useHeight = imgHeight;
|
|
546
548
|
} else {
|
|
547
549
|
useHeight = useHeight;
|
|
548
550
|
useWidth = useHeight * imgRadio;
|
|
549
551
|
}
|
|
550
552
|
} else {
|
|
551
553
|
if (imgWidth < useWidth) {
|
|
552
554
|
useWidth = imgWidth;
|
|
553
555
|
useHeight = imgHeight;
|
|
554
556
|
} else {
|
|
555
557
|
useWidth = useWidth;
|
|
556
558
|
useHeight = useWidth / imgRadio;
|
|
557
559
|
}
|
|
558
560
|
}
|
|
559
561
|
if (this.isin) {
|
|
560
562
|
this.scaleWidth = 0;
|
|
561
563
|
this.scaleHeight = 0;
|
|
562
564
|
if (useWidth < selWidth) {
|
|
563
565
|
useWidth = selWidth;
|
|
564
566
|
useHeight = useWidth / imgRadio;
|
|
565
567
|
this.lckHeight = 0;
|
|
566
568
|
}
|
|
567
569
|
if (useHeight < selHeight) {
|
|
568
570
|
useHeight = selHeight;
|
|
569
571
|
useWidth = useHeight * imgRadio;
|
|
570
572
|
this.lckWidth = 0;
|
|
571
573
|
}
|
|
572
574
|
}
|
|
573
575
|
this.scaleSize = 1;
|
|
574
576
|
this.rotateDeg = 0;
|
|
575
577
|
this.posWidth = (allWidth - useWidth) / 2;
|
|
576
578
|
this.posHeight = (allHeight - useHeight - tabHeight) / 2;
|
|
577
579
|
this.useWidth = useWidth;
|
|
578
580
|
this.useHeight = useHeight;
|
|
579
581
|
let style = this.selStyle,
|
|
580
582
|
left = parseInt(style.left),
|
|
581
583
|
top = parseInt(style.top),
|
|
582
584
|
width = parseInt(style.width),
|
|
583
585
|
height = parseInt(style.height),
|
|
584
586
|
canvas = this.canvas,
|
|
585
587
|
canvasOper = this.canvasOper,
|
|
586
588
|
ctxCanvas = this.ctxCanvas,
|
|
587
589
|
ctxCanvasOper = this.ctxCanvasOper;
|
|
588
590
|
ctxCanvasOper.setLineWidth(3);
|
|
589
591
|
ctxCanvasOper.setStrokeStyle('grey');
|
|
590
592
|
ctxCanvasOper.setGlobalAlpha(0.4);
|
|
591
593
|
ctxCanvasOper.setFillStyle('black');
|
|
592
594
|
ctxCanvasOper.strokeRect(left, top, width, height);
|
|
593
595
|
ctxCanvasOper.fillRect(0, 0, this.windowWidth, top);
|
|
594
596
|
ctxCanvasOper.fillRect(0, top, left, height);
|
|
595
597
|
ctxCanvasOper.fillRect(0, top + height, this.windowWidth, this.windowHeight - height - top - tabHeight);
|
|
596
598
|
ctxCanvasOper.fillRect(left + width, top, this.windowWidth - width - left, height);
|
|
597
599
|
ctxCanvasOper.setStrokeStyle('red');
|
|
598
600
|
ctxCanvasOper.moveTo(left + 20, top);
|
|
599
601
|
ctxCanvasOper.lineTo(left, top);
|
|
600
602
|
ctxCanvasOper.lineTo(left, top + 20);
|
|
601
603
|
ctxCanvasOper.moveTo(left + width - 20, top);
|
|
602
604
|
ctxCanvasOper.lineTo(left + width, top);
|
|
603
605
|
ctxCanvasOper.lineTo(left + width, top + 20);
|
|
604
606
|
ctxCanvasOper.moveTo(left + 20, top + height);
|
|
605
607
|
ctxCanvasOper.lineTo(left, top + height);
|
|
606
608
|
ctxCanvasOper.lineTo(left, top + height - 20);
|
|
607
609
|
ctxCanvasOper.moveTo(left + width - 20, top + height);
|
|
608
610
|
ctxCanvasOper.lineTo(left + width, top + height);
|
|
609
611
|
ctxCanvasOper.lineTo(left + width, top + height - 20);
|
|
610
612
|
// 绘制控制点(四个角)
|
|
611
613
|
const controlPointSize = 10;
|
|
612
614
|
ctxCanvasOper.setFillStyle('white');
|
|
613
615
|
ctxCanvasOper.setStrokeStyle('grey');
|
|
614
616
|
ctxCanvasOper.setLineWidth(1);
|
|
615
617
|
// 左上角
|
|
616
618
|
ctxCanvasOper.fillRect(left - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize);
|
|
617
619
|
ctxCanvasOper.strokeRect(left - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize);
|
|
618
620
|
// 右上角
|
|
619
621
|
ctxCanvasOper.fillRect(left + width - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize);
|
|
620
622
|
ctxCanvasOper.strokeRect(
|
|
621
623
|
left + width - controlPointSize / 2,
|
|
622
624
|
top - controlPointSize / 2,
|
|
623
625
|
controlPointSize,
|
|
624
626
|
controlPointSize
|
|
625
627
|
);
|
|
626
628
|
// 左下角
|
|
627
629
|
ctxCanvasOper.fillRect(
|
|
628
630
|
left - controlPointSize / 2,
|
|
629
631
|
top + height - controlPointSize / 2,
|
|
630
632
|
controlPointSize,
|
|
631
633
|
controlPointSize
|
|
632
634
|
);
|
|
633
635
|
ctxCanvasOper.strokeRect(
|
|
634
636
|
left - controlPointSize / 2,
|
|
635
637
|
top + height - controlPointSize / 2,
|
|
636
638
|
controlPointSize,
|
|
637
639
|
controlPointSize
|
|
638
640
|
);
|
|
639
641
|
// 右下角
|
|
640
642
|
ctxCanvasOper.fillRect(
|
|
641
643
|
left + width - controlPointSize / 2,
|
|
642
644
|
top + height - controlPointSize / 2,
|
|
643
645
|
controlPointSize,
|
|
644
646
|
controlPointSize
|
|
645
647
|
);
|
|
646
648
|
ctxCanvasOper.strokeRect(
|
|
647
649
|
left + width - controlPointSize / 2,
|
|
648
650
|
top + height - controlPointSize / 2,
|
|
649
651
|
controlPointSize,
|
|
650
652
|
controlPointSize
|
|
651
653
|
);
|
|
652
654
|
ctxCanvasOper.stroke();
|
|
653
655
|
ctxCanvasOper.draw(false, () => {
|
|
654
656
|
if (ini) {
|
|
655
657
|
this.styleDisplay = 'flex';
|
|
656
658
|
// #ifdef H5
|
|
657
659
|
this.styleTop = this.drawTop + 'px';
|
|
658
660
|
// #endif
|
|
659
661
|
// #ifndef H5
|
|
660
662
|
this.styleTop = '0';
|
|
661
663
|
// #endif
|
|
662
664
|
ctxCanvas.setFillStyle('black');
|
|
663
665
|
this.drawImage();
|
|
664
666
|
}
|
|
665
667
|
});
|
|
666
668
|
this.$emit('avtinit');
|
|
667
669
|
},
|
|
668
670
|
drawImage() {
|
|
669
671
|
let tm_now = Date.now();
|
|
670
672
|
if (tm_now - this.drawTm < 20) return;
|
|
671
673
|
this.drawTm = tm_now;
|
|
672
674
|
let ctxCanvas = this.ctxCanvas;
|
|
673
675
|
ctxCanvas.fillRect(0, 0, this.windowWidth, this.windowHeight - tabHeight);
|
|
674
676
|
ctxCanvas.translate(this.posWidth + this.useWidth / 2, this.posHeight + this.useHeight / 2);
|
|
675
677
|
ctxCanvas.scale(this.scaleSize, this.scaleSize);
|
|
676
678
|
ctxCanvas.rotate((this.rotateDeg * Math.PI) / 180);
|
|
677
679
|
ctxCanvas.drawImage(this.imgPath, -this.useWidth / 2, -this.useHeight / 2, this.useWidth, this.useHeight);
|
|
678
680
|
ctxCanvas.draw(false);
|
|
679
681
|
},
|
|
680
682
|
hideImg() {
|
|
681
683
|
this.prvImg = '';
|
|
682
684
|
this.prvTop = '-10000px';
|
|
683
685
|
this.showOper = true;
|
|
684
686
|
this.prvImgData = null;
|
|
685
687
|
this.target = null;
|
|
686
688
|
},
|
|
687
689
|
close() {
|
|
688
690
|
this.styleDisplay = 'none';
|
|
689
691
|
this.styleTop = '-10000px';
|
|
690
692
|
this.hasSel = false;
|
|
691
693
|
this.hideImg();
|
|
692
694
|
this.noBar || uni.showTabBar();
|
|
693
695
|
},
|
|
694
696
|
preview() {
|
|
695
697
|
if (this.fPreviewing) return;
|
|
696
698
|
this.fPreviewing = true;
|
|
697
699
|
setTimeout(() => {
|
|
698
700
|
this.fPreviewing = false;
|
|
699
701
|
}, 1000);
|
|
700
702
|
let style = this.selStyle,
|
|
701
703
|
x = parseInt(style.left),
|
|
702
704
|
y = parseInt(style.top),
|
|
703
705
|
width = parseInt(style.width),
|
|
704
706
|
height = parseInt(style.height);
|
|
705
707
|
uni.showLoading({ mask: true });
|
|
706
708
|
// console.log('size', x, y, width, height)
|
|
707
709
|
uni.canvasToTempFilePath(
|
|
708
710
|
{
|
|
709
711
|
x: x,
|
|
710
712
|
y: y,
|
|
711
713
|
width: width,
|
|
712
714
|
height: height,
|
|
713
715
|
canvasId: 'avatar-canvas-' + this.instanceId,
|
|
714
716
|
fileType: 'png',
|
|
715
717
|
quality: this.qlty,
|
|
716
718
|
success: (r) => {
|
|
717
719
|
// console.log(r)
|
|
718
720
|
this.prvImgTmp = r = r.tempFilePath;
|
|
719
721
|
let ctxCanvasPrv = this.ctxCanvasPrv,
|
|
720
722
|
prvX = this.windowWidth,
|
|
721
723
|
prvY = parseInt(this.cvsStyleHeight),
|
|
722
724
|
prvWidth = parseInt(this.selStyle.width),
|
|
723
725
|
prvHeight = parseInt(this.selStyle.height),
|
|
724
726
|
useWidth = prvX - 40,
|
|
725
727
|
useHeight = prvY - 80,
|
|
726
728
|
radio = useWidth / prvWidth,
|
|
727
729
|
rHeight = prvHeight * radio;
|
|
728
730
|
if (rHeight < useHeight) {
|
|
729
731
|
prvWidth = useWidth;
|
|
730
732
|
prvHeight = rHeight;
|
|
731
733
|
} else {
|
|
732
734
|
radio = useHeight / prvHeight;
|
|
733
735
|
prvWidth *= radio;
|
|
734
736
|
prvHeight = useHeight;
|
|
735
737
|
}
|
|
736
738
|
ctxCanvasPrv.setFillStyle('black');
|
|
737
739
|
ctxCanvasPrv.fillRect(0, 0, prvX, prvY);
|
|
738
740
|
ctxCanvasPrv.fillRect(x, y, width, height);
|
|
739
741
|
this.prvX = prvX = (prvX - prvWidth) / 2;
|
|
740
742
|
this.prvY = prvY = (prvY - prvHeight) / 2;
|
|
741
743
|
this.prvWidth = prvWidth;
|
|
742
744
|
this.prvHeight = prvHeight;
|
|
743
745
|
ctxCanvasPrv.drawImage(r, prvX, prvY, prvWidth, prvHeight);
|
|
744
746
|
ctxCanvasPrv.draw(false, () => {
|
|
745
747
|
// #ifdef H5
|
|
746
748
|
this.btop(this.prvImgTmp).then((r) => {
|
|
747
749
|
this.showOper = false;
|
|
748
750
|
this.prvTop = this.drawTop + 'px';
|
|
749
751
|
});
|
|
750
752
|
// #endif
|
|
751
753
|
// #ifndef H5
|
|
752
754
|
if (this.platform != 'android') {
|
|
753
755
|
this.showOper = false;
|
|
754
756
|
}
|
|
755
757
|
this.prvTop = '0';
|
|
756
758
|
// #endif
|
|
757
759
|
});
|
|
758
760
|
},
|
|
759
761
|
fail: () => {
|
|
760
762
|
uni.showToast({
|
|
761
763
|
title: 'error2',
|
|
762
764
|
duration: 2000
|
|
763
765
|
});
|
|
764
766
|
},
|
|
765
767
|
complete: () => {
|
|
766
768
|
uni.hideLoading();
|
|
767
769
|
}
|
|
768
770
|
},
|
|
769
771
|
this
|
|
770
772
|
);
|
|
771
773
|
},
|
|
772
774
|
chooseImage(index = undefined, params = undefined, data = undefined) {
|
|
773
775
|
if (params) {
|
|
774
776
|
console.log(params);
|
|
775
777
|
let areaWidth = params.areaWidth || this.areaWidth,
|
|
776
778
|
areaHeight = params.areaHeight || this.areaHeight,
|
|
777
779
|
expWidth = params.exportWidth || this.exportWidth,
|
|
778
780
|
expHeight = params.exportHeight || this.exportHeight,
|
|
779
781
|
quality = params.quality,
|
|
780
782
|
canRotate = params.canRotate,
|
|
781
783
|
canScale = params.canScale,
|
|
782
784
|
canChangeSize = params.canChangeSize,
|
|
783
785
|
minScale = params.minScale,
|
|
784
786
|
maxScale = params.maxScale,
|
|
785
787
|
stretch = params.stretch,
|
|
786
788
|
inner = params.inner,
|
|
787
789
|
lock = params.lock;
|
|
788
790
|
console.log('areaWidth', this.areaWidth);
|
|
789
791
|
expWidth && (this.expWidth = expWidth.indexOf('rpx') >= 0 ? parseInt(expWidth) * this.pxRatio : parseInt(expWidth));
|
|
790
792
|
expHeight && (this.expHeight = expHeight.indexOf('rpx') >= 0 ? parseInt(expHeight) * this.pxRatio : parseInt(expHeight));
|
|
791
793
|
this.letRotate = canRotate === false ? 0 : 1;
|
|
792
794
|
this.letScale = canScale === false ? 0 : 1;
|
|
793
795
|
// 设置是否允许调整裁剪框大小
|
|
794
796
|
this.letChangeSize = canChangeSize || false;
|
|
795
797
|
this.qlty = parseInt(quality) || 0.9;
|
|
796
798
|
this.mnScale = minScale || 0.3;
|
|
797
799
|
this.mxScale = maxScale || 4;
|
|
798
800
|
this.stc = stretch;
|
|
799
801
|
this.isin = inner === true ? 1 : 0;
|
|
800
802
|
this.lck = lock;
|
|
801
803
|
if (this.isin) {
|
|
802
804
|
this.btnWidth = '24%';
|
|
803
805
|
this.btnDsp = 'none';
|
|
804
806
|
} else {
|
|
805
807
|
this.btnWidth = '19%';
|
|
806
808
|
this.btnDsp = 'flex';
|
|
807
809
|
}
|
|
808
810
|
if (areaWidth && areaHeight) {
|
|
809
811
|
areaWidth = areaWidth.indexOf('rpx') >= 0 ? parseInt(areaWidth) * this.pxRatio : parseInt(areaWidth);
|
|
810
812
|
areaHeight = areaHeight.indexOf('rpx') >= 0 ? parseInt(areaHeight) * this.pxRatio : parseInt(areaHeight);
|
|
811
813
|
this.selStyle.width = areaWidth + 'px';
|
|
812
814
|
this.selStyle.height = areaHeight + 'px';
|
|
813
815
|
this.selStyle.top = (this.windowHeight - areaHeight - tabHeight) / 2 + 'px';
|
|
814
816
|
this.selStyle.left = (this.windowWidth - areaWidth) / 2 + 'px';
|
|
815
817
|
// console.log(this.selStyle);
|
|
816
818
|
this.hasSel = true;
|
|
817
819
|
}
|
|
818
820
|
}
|
|
819
821
|
this.rtn = data;
|
|
820
822
|
this.indx = index;
|
|
821
823
|
this.select();
|
|
822
824
|
},
|
|
823
825
|
rotate() {
|
|
824
826
|
// #ifdef APP-PLUS
|
|
825
827
|
if (this.platform === 'android') {
|
|
826
828
|
if (this.fRotateing) return;
|
|
827
829
|
this.fRotateing = true;
|
|
828
830
|
setTimeout(() => {
|
|
829
831
|
this.fRotateing = false;
|
|
830
832
|
}, 500);
|
|
831
833
|
}
|
|
832
834
|
// #endif
|
|
833
835
|
// if(this.letRotate) {
|
|
834
836
|
this.rotateDeg += 90 - (this.rotateDeg % 90);
|
|
835
837
|
this.drawImage();
|
|
836
838
|
// }
|
|
837
839
|
},
|
|
838
840
|
start(e) {
|
|
839
841
|
let touches = e.touches,
|
|
840
842
|
touch0 = touches[0],
|
|
841
843
|
touch1 = touches[1];
|
|
842
844
|
this.touch0 = touch0;
|
|
843
845
|
this.touch1 = touch1;
|
|
844
846
|
if (touch1) {
|
|
845
847
|
let x = touch1.x - touch0.x,
|
|
846
848
|
y = touch1.y - touch0.y;
|
|
847
849
|
this.fgDistance = Math.sqrt(x * x + y * y);
|
|
848
850
|
} else {
|
|
849
851
|
// 只有在允许调整大小时才检查控制点
|
|
850
852
|
if (this.letChangeSize) {
|
|
851
853
|
// 检查是否点击在控制点上
|
|
852
854
|
const controlPointSize = 20;
|
|
853
855
|
const x = touch0.x;
|
|
854
856
|
const y = touch0.y;
|
|
855
857
|
const style = this.selStyle;
|
|
856
858
|
const left = parseInt(style.left);
|
|
857
859
|
const top = parseInt(style.top);
|
|
858
860
|
const width = parseInt(style.width);
|
|
859
861
|
const height = parseInt(style.height);
|
|
860
862
|
// 检查四个控制点
|
|
861
863
|
if (Math.abs(x - left) < controlPointSize && Math.abs(y - top) < controlPointSize) {
|
|
862
864
|
this.resizeHandle = 'top-left';
|
|
863
865
|
} else if (Math.abs(x - (left + width)) < controlPointSize && Math.abs(y - top) < controlPointSize) {
|
|
864
866
|
this.resizeHandle = 'top-right';
|
|
865
867
|
} else if (Math.abs(x - left) < controlPointSize && Math.abs(y - (top + height)) < controlPointSize) {
|
|
866
868
|
this.resizeHandle = 'bottom-left';
|
|
867
869
|
} else if (Math.abs(x - (left + width)) < controlPointSize && Math.abs(y - (top + height)) < controlPointSize) {
|
|
868
870
|
this.resizeHandle = 'bottom-right';
|
|
869
871
|
} else {
|
|
870
872
|
this.resizeHandle = null;
|
|
871
873
|
}
|
|
872
874
|
} else {
|
|
873
875
|
this.resizeHandle = null;
|
|
874
876
|
}
|
|
875
877
|
}
|
|
876
878
|
},
|
|
877
879
|
move(e) {
|
|
878
880
|
let touches = e.touches,
|
|
879
881
|
touch0 = touches[0],
|
|
880
882
|
touch1 = touches[1];
|
|
881
883
|
if (touch1) {
|
|
882
884
|
let x = touch1.x - touch0.x,
|
|
883
885
|
y = touch1.y - touch0.y,
|
|
884
886
|
fgDistance = Math.sqrt(x * x + y * y),
|
|
885
887
|
scaleSize = 0.005 * (fgDistance - this.fgDistance),
|
|
886
888
|
beScaleSize = this.scaleSize + scaleSize;
|
|
887
889
|
do {
|
|
888
890
|
if (!this.letScale) break;
|
|
889
891
|
if (beScaleSize < this.mnScale) break;
|
|
890
892
|
if (beScaleSize > this.mxScale) break;
|
|
891
893
|
if (this.isin) {
|
|
892
894
|
let imgWidth = this.useWidth * beScaleSize,
|
|
893
895
|
imgHeight = this.useHeight * beScaleSize,
|
|
894
896
|
rx0 = this.posWidth + this.useWidth / 2,
|
|
895
897
|
ry0 = this.posHeight + this.useHeight / 2,
|
|
896
898
|
l = rx0 - imgWidth / 2,
|
|
897
899
|
t = ry0 - imgHeight / 2,
|
|
898
900
|
r = l + imgWidth,
|
|
899
901
|
b = t + imgHeight,
|
|
900
902
|
left = parseInt(this.selStyle.left),
|
|
901
903
|
top = parseInt(this.selStyle.top),
|
|
902
904
|
width = parseInt(this.selStyle.width),
|
|
903
905
|
height = parseInt(this.selStyle.height);
|
|
904
906
|
if (left < l || left + width > r || top < t || top + height > b) break;
|
|
905
907
|
this.scaleWidth = (this.useWidth - imgWidth) / 2;
|
|
906
908
|
this.scaleHeight = (this.useHeight - imgHeight) / 2;
|
|
907
909
|
}
|
|
908
910
|
this.scaleSize = beScaleSize;
|
|
909
911
|
} while (0);
|
|
910
912
|
this.fgDistance = fgDistance;
|
|
911
913
|
if (touch1.x !== touch0.x && this.letRotate) {
|
|
912
914
|
x = (this.touch1.y - this.touch0.y) / (this.touch1.x - this.touch0.x);
|
|
913
915
|
y = (touch1.y - touch0.y) / (touch1.x - touch0.x);
|
|
914
916
|
this.rotateDeg += (Math.atan((y - x) / (1 + x * y)) * 180) / Math.PI;
|
|
915
917
|
this.touch0 = touch0;
|
|
916
918
|
this.touch1 = touch1;
|
|
917
919
|
}
|
|
918
920
|
this.drawImage();
|
|
919
921
|
} else if (this.touch0) {
|
|
920
922
|
// 只有在允许调整大小时才处理裁剪框大小调整
|
|
921
923
|
if (this.resizeHandle && this.letChangeSize) {
|
|
922
924
|
const style = { ...this.selStyle };
|
|
923
925
|
const left = parseInt(style.left);
|
|
924
926
|
const top = parseInt(style.top);
|
|
925
927
|
const width = parseInt(style.width);
|
|
926
928
|
const height = parseInt(style.height);
|
|
927
929
|
const minWidth = 50;
|
|
928
930
|
const minHeight = 50;
|
|
929
931
|
switch (this.resizeHandle) {
|
|
930
932
|
case 'top-left':
|
|
931
933
|
style.left = touch0.x + 'px';
|
|
932
934
|
style.top = touch0.y + 'px';
|
|
933
935
|
style.width = left + width - touch0.x + 'px';
|
|
934
936
|
style.height = top + height - touch0.y + 'px';
|
|
935
937
|
break;
|
|
936
938
|
case 'top-right':
|
|
937
939
|
style.top = touch0.y + 'px';
|
|
938
940
|
style.width = touch0.x - left + 'px';
|
|
939
941
|
style.height = top + height - touch0.y + 'px';
|
|
940
942
|
break;
|
|
941
943
|
case 'bottom-left':
|
|
942
944
|
style.left = touch0.x + 'px';
|
|
943
945
|
style.width = left + width - touch0.x + 'px';
|
|
944
946
|
style.height = touch0.y - top + 'px';
|
|
945
947
|
break;
|
|
946
948
|
case 'bottom-right':
|
|
947
949
|
style.width = touch0.x - left + 'px';
|
|
948
950
|
style.height = touch0.y - top + 'px';
|
|
949
951
|
break;
|
|
950
952
|
}
|
|
951
953
|
// 确保最小尺寸
|
|
952
954
|
if (parseInt(style.width) >= minWidth && parseInt(style.height) >= minHeight) {
|
|
953
955
|
// 确保裁剪框不超出屏幕边界
|
|
954
956
|
if (
|
|
955
957
|
parseInt(style.left) >= 0 &&
|
|
956
958
|
parseInt(style.top) >= 0 &&
|
|
957
959
|
parseInt(style.left) + parseInt(style.width) <= this.windowWidth &&
|
|
958
960
|
parseInt(style.top) + parseInt(style.height) <= this.windowHeight - tabHeight
|
|
959
961
|
) {
|
|
960
962
|
this.selStyle = style;
|
|
961
963
|
// 重新绘制操作层
|
|
962
964
|
this.drawInit();
|
|
963
965
|
}
|
|
964
966
|
}
|
|
965
967
|
} else {
|
|
966
968
|
// 原有的移动图片逻辑
|
|
967
969
|
let x = touch0.x - this.touch0.x,
|
|
968
970
|
y = touch0.y - this.touch0.y,
|
|
969
971
|
beX = this.posWidth + x,
|
|
970
972
|
beY = this.posHeight + y;
|
|
971
973
|
if (this.isin) {
|
|
972
974
|
let imgWidth = this.useWidth * this.scaleSize,
|
|
973
975
|
imgHeight = this.useHeight * this.scaleSize,
|
|
974
976
|
rx0 = beX + this.useWidth / 2,
|
|
975
977
|
ry0 = beY + this.useHeight / 2,
|
|
976
978
|
l = rx0 - imgWidth / 2,
|
|
977
979
|
t = ry0 - imgHeight / 2,
|
|
978
980
|
r = l + imgWidth,
|
|
979
981
|
b = t + imgHeight,
|
|
980
982
|
left = parseInt(this.selStyle.left),
|
|
981
983
|
top = parseInt(this.selStyle.top),
|
|
982
984
|
width = parseInt(this.selStyle.width),
|
|
983
985
|
height = parseInt(this.selStyle.height);
|
|
984
986
|
if (!this.lckWidth && Math.abs(x) < 100) {
|
|
985
987
|
if (left >= l && left + width <= r) {
|
|
986
988
|
this.posWidth = beX;
|
|
987
989
|
} else if (left < l) {
|
|
988
990
|
this.posWidth = left - this.scaleWidth;
|
|
989
991
|
} else if (left + width > r) {
|
|
990
992
|
this.posWidth = left - (imgWidth - width) - this.scaleWidth;
|
|
991
993
|
}
|
|
992
994
|
}
|
|
993
995
|
if (!this.lckHeight && Math.abs(y) < 100) {
|
|
994
996
|
if (top >= t && top + height <= b) {
|
|
995
997
|
this.posHeight = beY;
|
|
996
998
|
} else if (top < t) {
|
|
997
999
|
this.posHeight = top - this.scaleHeight;
|
|
998
1000
|
} else if (top + height > b) {
|
|
999
1001
|
this.posHeight = top - (imgHeight - height) - this.scaleHeight;
|
|
1000
1002
|
}
|
|
1001
1003
|
}
|
|
1002
1004
|
} else {
|
|
1003
1005
|
if (Math.abs(x) < 100 && !this.lckWidth) this.posWidth = beX;
|
|
1004
1006
|
if (Math.abs(y) < 100 && !this.lckHeight) this.posHeight = beY;
|
|
1005
1007
|
}
|
|
1006
1008
|
this.touch0 = touch0;
|
|
1007
1009
|
this.drawImage();
|
|
1008
1010
|
}
|
|
1009
1011
|
}
|
|
1010
1012
|
},
|
|
1011
1013
|
end(e) {
|
|
1012
1014
|
let touches = e.touches,
|
|
1013
1015
|
touch0 = touches && touches[0],
|
|
1014
1016
|
touch1 = touches && touches[1];
|
|
1015
1017
|
if (touch0) {
|
|
1016
1018
|
this.touch0 = touch0;
|
|
1017
1019
|
} else {
|
|
1018
1020
|
this.touch0 = null;
|
|
1019
1021
|
this.touch1 = null;
|
|
1020
1022
|
this.resizeHandle = null; // 重置调整手柄
|
|
1021
1023
|
}
|
|
1022
1024
|
},
|
|
1023
1025
|
getImgData() {
|
|
1024
1026
|
return new Promise((resolve, reject) => {
|
|
1025
1027
|
let prvX = this.prvX,
|
|
1026
1028
|
prvY = this.prvY,
|
|
1027
1029
|
prvWidth = this.prvWidth,
|
|
1028
1030
|
prvHeight = this.prvHeight;
|
|
1029
1031
|
// #ifdef APP-PLUS||H5
|
|
1030
1032
|
prvX *= this.pixelRatio;
|
|
1031
1033
|
prvY *= this.pixelRatio;
|
|
1032
1034
|
prvWidth *= this.pixelRatio;
|
|
1033
1035
|
prvHeight *= this.pixelRatio;
|
|
1034
1036
|
// #endif
|
|
1035
1037
|
uni.canvasGetImageData(
|
|
1036
1038
|
{
|
|
1037
1039
|
canvasId: 'prv-canvas-' + this.instanceId,
|
|
1038
1040
|
x: prvX,
|
|
1039
1041
|
y: prvY,
|
|
1040
1042
|
width: prvWidth,
|
|
1041
1043
|
height: prvHeight,
|
|
1042
1044
|
success(res) {
|
|
1043
1045
|
resolve(res.data);
|
|
1044
1046
|
},
|
|
1045
1047
|
fail(err) {
|
|
1046
1048
|
reject(err);
|
|
1047
1049
|
}
|
|
1048
1050
|
},
|
|
1049
1051
|
this
|
|
1050
1052
|
);
|
|
1051
1053
|
});
|
|
1052
1054
|
},
|
|
1053
1055
|
async colorChange(e) {
|
|
1054
1056
|
let tm_now = Date.now();
|
|
1055
1057
|
if (tm_now - this.prvTm < 100) return;
|
|
1056
1058
|
this.prvTm = tm_now;
|
|
1057
1059
|
uni.showLoading({ mask: true });
|
|
1058
1060
|
if (!this.prvImgData) {
|
|
1059
1061
|
if (
|
|
1060
1062
|
!(this.prvImgData = await this.getImgData().catch((res) => {
|
|
1061
1063
|
uni.showToast({
|
|
1062
1064
|
title: 'error_read',
|
|
1063
1065
|
duration: 2000
|
|
1064
1066
|
});
|
|
1065
1067
|
}))
|
|
1066
1068
|
)
|
|
1067
1069
|
return;
|
|
1068
1070
|
this.target = new Uint8ClampedArray(this.prvImgData.length);
|
|
1069
1071
|
}
|
|
1070
1072
|
let data = this.prvImgData,
|
|
1071
1073
|
target = this.target,
|
|
1072
1074
|
i = e.detail.value,
|
|
1073
1075
|
r,
|
|
1074
1076
|
g,
|
|
1075
1077
|
b,
|
|
1076
1078
|
a,
|
|
1077
1079
|
h,
|
|
1078
1080
|
s,
|
|
1079
1081
|
l,
|
|
1080
1082
|
d,
|
|
1081
1083
|
p,
|
|
1082
1084
|
q,
|
|
1083
1085
|
t,
|
|
1084
1086
|
min,
|
|
1085
1087
|
max,
|
|
1086
1088
|
hK,
|
|
1087
1089
|
tR,
|
|
1088
1090
|
tG,
|
|
1089
1091
|
tB;
|
|
1090
1092
|
if (i === 0) {
|
|
1091
1093
|
target = data;
|
|
1092
1094
|
} else {
|
|
1093
1095
|
i = (i + 100) / 200;
|
|
1094
1096
|
if (i < 0.005) i = 0;
|
|
1095
1097
|
if (i > 0.995) i = 1;
|
|
1096
1098
|
for (let n = data.length - 1; n >= 0; n -= 4) {
|
|
1097
1099
|
r = data[n - 3] / 255;
|
|
1098
1100
|
g = data[n - 2] / 255;
|
|
1099
1101
|
b = data[n - 1] / 255;
|
|
1100
1102
|
max = Math.max(r, g, b);
|
|
1101
1103
|
min = Math.min(r, g, b);
|
|
1102
1104
|
d = max - min;
|
|
1103
1105
|
if (max === min) {
|
|
1104
1106
|
h = 0;
|
|
1105
1107
|
} else if (max === r && g >= b) {
|
|
1106
1108
|
h = 60 * ((g - b) / d);
|
|
1107
1109
|
} else if (max === r && g < b) {
|
|
1108
1110
|
h = 60 * ((g - b) / d) + 360;
|
|
1109
1111
|
} else if (max === g) {
|
|
1110
1112
|
h = 60 * ((b - r) / d) + 120;
|
|
1111
1113
|
} else if (max === b) {
|
|
1112
1114
|
h = 60 * ((r - g) / d) + 240;
|
|
1113
1115
|
}
|
|
1114
1116
|
l = (max + min) / 2;
|
|
1115
1117
|
if (l === 0 || max === min) {
|
|
1116
1118
|
s = 0;
|
|
1117
1119
|
} else if (0 < l && l <= 0.5) {
|
|
1118
1120
|
s = d / (2 * l);
|
|
1119
1121
|
} else if (l > 0.5) {
|
|
1120
1122
|
s = d / (2 - 2 * l);
|
|
1121
1123
|
}
|
|
1122
1124
|
data[n] && (a = data[n]);
|
|
1123
1125
|
if (i < 0.5) {
|
|
1124
1126
|
s = (s * i) / 0.5;
|
|
1125
1127
|
} else if (i > 0.5) {
|
|
1126
1128
|
s = 2 * s + 2 * i - (s * i) / 0.5 - 1;
|
|
1127
1129
|
}
|
|
1128
1130
|
if (s === 0) {
|
|
1129
1131
|
r = g = b = Math.round(l * 255);
|
|
1130
1132
|
} else {
|
|
1131
1133
|
if (l < 0.5) {
|
|
1132
1134
|
q = l * (1 + s);
|
|
1133
1135
|
} else if (l >= 0.5) {
|
|
1134
1136
|
q = l + s - l * s;
|
|
1135
1137
|
}
|
|
1136
1138
|
p = 2 * l - q;
|
|
1137
1139
|
hK = h / 360;
|
|
1138
1140
|
tR = hK + 1 / 3;
|
|
1139
1141
|
tG = hK;
|
|
1140
1142
|
tB = hK - 1 / 3;
|
|
1141
1143
|
let correctRGB = (t) => {
|
|
1142
1144
|
if (t < 0) {
|
|
1143
1145
|
return t + 1.0;
|
|
1144
1146
|
}
|
|
1145
1147
|
if (t > 1) {
|
|
1146
1148
|
return t - 1.0;
|
|
1147
1149
|
}
|
|
1148
1150
|
return t;
|
|
1149
1151
|
};
|
|
1150
1152
|
let createRGB = (t) => {
|
|
1151
1153
|
if (t < 1 / 6) {
|
|
1152
1154
|
return p + (q - p) * 6 * t;
|
|
1153
1155
|
} else if (t >= 1 / 6 && t < 1 / 2) {
|
|
1154
1156
|
return q;
|
|
1155
1157
|
} else if (t >= 1 / 2 && t < 2 / 3) {
|
|
1156
1158
|
return p + (q - p) * 6 * (2 / 3 - t);
|
|
1157
1159
|
}
|
|
1158
1160
|
return p;
|
|
1159
1161
|
};
|
|
1160
1162
|
r = tR = Math.round(createRGB(correctRGB(tR)) * 255);
|
|
1161
1163
|
g = tG = Math.round(createRGB(correctRGB(tG)) * 255);
|
|
1162
1164
|
b = tB = Math.round(createRGB(correctRGB(tB)) * 255);
|
|
1163
1165
|
}
|
|
1164
1166
|
a && (target[n] = a);
|
|
1165
1167
|
target[n - 3] = r;
|
|
1166
1168
|
target[n - 2] = g;
|
|
1167
1169
|
target[n - 1] = b;
|
|
1168
1170
|
}
|
|
1169
1171
|
}
|
|
1170
1172
|
let prvX = this.prvX,
|
|
1171
1173
|
prvY = this.prvY,
|
|
1172
1174
|
prvWidth = this.prvWidth,
|
|
1173
1175
|
prvHeight = this.prvHeight;
|
|
1174
1176
|
this.ctxCanvasPrv.setFillStyle('black');
|
|
1175
1177
|
this.ctxCanvasPrv.fillRect(prvX, prvY, prvWidth, prvHeight);
|
|
1176
1178
|
this.ctxCanvasPrv.draw(true);
|
|
1177
1179
|
// #ifdef APP-PLUS||H5
|
|
1178
1180
|
prvX *= this.pixelRatio;
|
|
1179
1181
|
prvY *= this.pixelRatio;
|
|
1180
1182
|
prvWidth *= this.pixelRatio;
|
|
1181
1183
|
prvHeight *= this.pixelRatio;
|
|
1182
1184
|
// #endif
|
|
1183
1185
|
uni.canvasPutImageData(
|
|
1184
1186
|
{
|
|
1185
1187
|
canvasId: 'prv-canvas-' + this.instanceId,
|
|
1186
1188
|
x: prvX,
|
|
1187
1189
|
y: prvY,
|
|
1188
1190
|
width: prvWidth,
|
|
1189
1191
|
height: prvHeight,
|
|
1190
1192
|
data: target,
|
|
1191
1193
|
fail() {
|
|
1192
1194
|
uni.showToast({
|
|
1193
1195
|
title: 'error_put',
|
|
1194
1196
|
duration: 2000
|
|
1195
1197
|
});
|
|
1196
1198
|
},
|
|
1197
1199
|
complete() {
|
|
1198
1200
|
uni.hideLoading();
|
|
1199
1201
|
}
|
|
1200
1202
|
},
|
|
1201
1203
|
this
|
|
1202
1204
|
);
|
|
1203
1205
|
},
|
|
1204
1206
|
btop(base64) {
|
|
1205
1207
|
return new Promise(function (resolve, reject) {
|
|
1206
1208
|
var arr = base64.split(','),
|
|
1207
1209
|
mime = arr[0].match(/:(.*?);/)[1],
|
|
1208
1210
|
bstr = atob(arr[1]),
|
|
1209
1211
|
n = bstr.length,
|
|
1210
1212
|
u8arr = new Uint8Array(n);
|
|
1211
1213
|
while (n--) {
|
|
1212
1214
|
u8arr[n] = bstr.charCodeAt(n);
|
|
1213
1215
|
}
|
|
1214
1216
|
return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([u8arr], { type: mime })));
|
|
1215
1217
|
});
|
|
1216
1218
|
}
|
|
1217
1219
|
}
|