@10yun/cv-mobile-ui 0.5.55 → 0.5.57
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/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/config-ucharts.js +605 -605
- package/{ui-sdks → other}/qiun-data-charts/package.json +2 -1
- package/other/qiun-data-charts_2.5.0-20230101_example/App.vue +20 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/common/uni-icons.css +542 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/common/uni.css +246 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/components/qiun-title-bar/qiun-title-bar.vue +51 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/components/test-charts/test-charts.vue +48 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/main.js +13 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/manifest.json +75 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/mockdata/demodata.json +448 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/mockdata/mapdata.json +1 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/canvas/canvas.vue +142 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/echarts/echarts.vue +228 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/format-e/format-e.vue +113 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/format-u/format-u.vue +110 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/index/index.vue +58 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/layout/layout.vue +174 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/other/other.vue +233 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/tab/tab.vue +115 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/ucharts/ucharts.vue +339 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/unicloud/unicloud.vue +117 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages/updata/updata.vue +212 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/pages.json +79 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/static/logo.png +0 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/uni.scss +76 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/uniCloud-aliyun/database/db_init.json +455 -0
- package/other/qiun-data-charts_2.5.0-20230101_example/uniCloud-aliyun/database/qiun-charts-demo.schema.json +76 -0
- package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate0.vue +2 -1
- package/other/{u-parse-2019 → u-parse}/libs/html2json.js +2 -2
- package/other/{uParse → u-parse}/libs/wxDiscode.js +1 -1
- package/other/u-parse/readme.md +102 -0
- package/other/{u-parse-2019 → u-parse}/u-parse.vue +1 -6
- package/other/u-parse2026/libs/html2json.js +2 -2
- package/other/u-parse2026/libs/wxDiscode.js +1 -1
- package/other/u-parse2026/u-parse.css +1 -0
- package/other/u-parse2026/u-parse.vue +1 -3
- package/other/uParse2/components/wxParseAudio.vue +1 -0
- package/other/{uParse → uParse2}/components/wxParseImg.vue +4 -4
- package/other/{uParse → uParse2}/components/wxParseTable.vue +15 -6
- package/other/{uParse → uParse2}/components/wxParseTemplate0.vue +7 -6
- package/other/{uParse → uParse2}/components/wxParseTemplate1.vue +10 -0
- package/other/{uParse → uParse2}/libs/html2json.js +2 -2
- package/other/{u-parse-2019 → uParse2}/libs/wxDiscode.js +1 -1
- package/other/{uParse/wxParse.css → uParse2/u-parse.css} +4 -4
- package/other/{uParse/wxParse.vue → uParse2/u-parse.vue} +18 -11
- package/other/uParse2/u-parse2.css +264 -0
- package/package.json +1 -1
- package/ui-cv/components/cv-dialog-share/cv-dialog-share.vue +7 -7
- package/ui-cv/components/cv-geo-local/cv-geo-local.vue +1 -1
- package/ui-cv/components/cv-icons/cv-icons.vue +18 -62
- package/ui-cv/components/cv-icons/iconfont/font-default-icons.js +127 -131
- package/ui-cv/components/cv-input-password/cv-input-password.vue +1 -1
- package/ui-cv/components/cv-mask-svg/cv-mask-svg.vue +1 -1
- package/ui-cv/components/cv-mask-svg/mixins.js +16 -12
- package/ui-cv/components/cv-upload-image/cv-upload-image.vue +4 -4
- package/ui-fireui/components/u-share-model/u-share-model.vue +1 -1
- package/ui-fireui/components/u-uploadsamll/u-uploadsamll.vue +1 -1
- package/uview-plus/components/u-dropdown-list/u-dropdown-list.vue +1 -2
- package/uview-plus/components/u-form/form.js +13 -12
- package/uview-plus/components/u-image/u-image-wu.vue +25 -1
- package/uview-plus/components/u-parse/README.md +192 -0
- package/uview-plus/components/u-parse/changelog.md +163 -0
- package/uview-plus/components/u-parse/node/node.vue +37 -3
- package/{uni-ui/lib/uni-breadcrumb → uview-plus/components/u-parse}/package.json +24 -29
- package/uview-plus/components/u-parse/parser.js +8 -3
- package/uview-plus/components/u-parse/static/app-plus/up-parse/js/handler.js +1 -0
- package/uview-plus/components/u-parse/static/app-plus/up-parse/local-2.5.2.html +29 -0
- package/uview-plus/components/u-parse/u-parse.vue +29 -1
- package/other/lime-painter2/README2.md +0 -576
- package/other/lime-painter2/changelog.md +0 -225
- package/other/lime-painter2/package.json +0 -93
- package/other/lime-painter2/readme.md +0 -758
- package/other/lime-painter2/test.md +0 -45
- package/other/qiun-data-charts/qiun-data-charts.vue +0 -1618
- package/other/u-parse-2019/readme.md +0 -99
- package/other/uParse/components/style.css +0 -1
- package/other/uParse/components/wxParseAudio.vue +0 -1
- package/other/xt-parse/changelog.md +0 -41
- package/other/xt-parse/node/node.vue +0 -752
- package/other/xt-parse/package.json +0 -129
- package/other/xt-parse/parser.js +0 -1461
- package/other/xt-parse/props.js +0 -49
- package/other/xt-parse/readme.md +0 -145
- package/other/xt-parse/static/app-plus/u-parse/js/handler.js +0 -1
- package/other/xt-parse/u-parse.vue +0 -510
- package/plugins/luch-request/adapters/index.js +0 -131
- package/plugins/luch-request/core/InterceptorManager.js +0 -50
- package/plugins/luch-request/core/Request.js +0 -199
- package/plugins/luch-request/core/buildFullPath.js +0 -20
- package/plugins/luch-request/core/defaults.js +0 -32
- package/plugins/luch-request/core/dispatchRequest.js +0 -5
- package/plugins/luch-request/core/mergeConfig.js +0 -125
- package/plugins/luch-request/core/settle.js +0 -16
- package/plugins/luch-request/helpers/buildURL.js +0 -71
- package/plugins/luch-request/helpers/combineURLs.js +0 -12
- package/plugins/luch-request/helpers/isAbsoluteURL.js +0 -14
- package/plugins/luch-request/index.d.ts +0 -197
- package/plugins/luch-request/index.js +0 -2
- package/plugins/luch-request/readme.md +0 -3
- package/plugins/luch-request/utils/clone.js +0 -260
- package/plugins/luch-request/utils.js +0 -131
- package/ui-cv/components/cv-cell-row/cv-cell-row.vue +0 -220
- package/ui-cv/components/cv-icons/iconfont/font-action-icons.js +0 -73
- package/ui-cv/components/cv-icons/iconfont/font-action.css +0 -7
- package/ui-cv/components/cv-icons/iconfont/font-action.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-arrow-icons.js +0 -47
- package/ui-cv/components/cv-icons/iconfont/font-arrow.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-arrow.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-base-icons.js +0 -92
- package/ui-cv/components/cv-icons/iconfont/font-base.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-base.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-mall-icons.js +0 -35
- package/ui-cv/components/cv-icons/iconfont/font-mall.css +0 -7
- package/ui-cv/components/cv-icons/iconfont/font-mall.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-media-icons.js +0 -45
- package/ui-cv/components/cv-icons/iconfont/font-media.css +0 -7
- package/ui-cv/components/cv-icons/iconfont/font-media.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-order-icons.js +0 -34
- package/ui-cv/components/cv-icons/iconfont/font-order.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-order.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-people-icons.js +0 -49
- package/ui-cv/components/cv-icons/iconfont/font-people.css +0 -7
- package/ui-cv/components/cv-icons/iconfont/font-people.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-status-icons.js +0 -34
- package/ui-cv/components/cv-icons/iconfont/font-status.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-status.js +0 -5
- package/ui-cv/components/cv-icons/iconfont/font-wallet-icons.js +0 -17
- package/ui-cv/components/cv-icons/iconfont/font-wallet.css +0 -6
- package/ui-cv/components/cv-icons/iconfont/font-wallet.js +0 -5
- package/ui-cv/components/cv-icons/icons/default-icons.js +0 -132
- package/ui-cv/components/cv-icons/icons/icons-action.js +0 -72
- package/ui-cv/components/cv-icons/icons/icons-arrow.js +0 -46
- package/ui-cv/components/cv-icons/icons/icons-base.js +0 -89
- package/ui-cv/components/cv-icons/icons/icons-mall.js +0 -34
- package/ui-cv/components/cv-icons/icons/icons-media.js +0 -44
- package/ui-cv/components/cv-icons/icons/icons-order.js +0 -33
- package/ui-cv/components/cv-icons/icons/icons-people.js +0 -46
- package/ui-cv/components/cv-icons/icons/icons-status.js +0 -32
- package/ui-cv/components/cv-icons/icons/icons-wallet.js +0 -15
- package/ui-sdks/sdk-app-update/img/logo.png +0 -0
- package/ui-sdks/sdk-app-update/img/update_bg.png +0 -0
- package/ui-sdks/sdk-app-update/img/update_bg_top.png +0 -0
- package/ui-sdks/sdk-app-update/sdk-app-update.vue +0 -396
- package/ui-sdks/sdk-app-update/xxxx +0 -62
- package/ui-sdks/sdk-privacy-policy/sdk-privacy-policy.vue +0 -113
- package/ui-sdks/sdk-u-charts/config-echarts.js +0 -420
- package/ui-sdks/sdk-u-charts/config-ucharts.js +0 -630
- package/ui-sdks/sdk-u-charts/u-charts.js +0 -7398
- package/ui-sdks/sdk-u-charts/u-charts.min.js +0 -1
- package/ui-sdks/sdk-webview-main/WebViewMain.vue +0 -1
- package/ui-sdks/sdk-webview-main/main.js +0 -0
- package/ui-sdks/sdk-webview-main/mixin.js +0 -0
- package/uni-ui/lib/uni-badge/changelog.md +0 -33
- package/uni-ui/lib/uni-badge/package.json +0 -107
- package/uni-ui/lib/uni-badge/readme.md +0 -8
- package/uni-ui/lib/uni-breadcrumb/changelog.md +0 -6
- package/uni-ui/lib/uni-breadcrumb/readme.md +0 -66
- package/uni-ui/lib/uni-calendar/changelog.md +0 -30
- package/uni-ui/lib/uni-calendar/package.json +0 -105
- package/uni-ui/lib/uni-calendar/readme.md +0 -103
- package/uni-ui/lib/uni-card/changelog.md +0 -26
- package/uni-ui/lib/uni-card/package.json +0 -107
- package/uni-ui/lib/uni-card/readme.md +0 -10
- package/uni-ui/lib/uni-collapse/changelog.md +0 -48
- package/uni-ui/lib/uni-collapse/package.json +0 -106
- package/uni-ui/lib/uni-collapse/readme.md +0 -11
- package/uni-ui/lib/uni-combox/changelog.md +0 -17
- package/uni-ui/lib/uni-combox/package.json +0 -107
- package/uni-ui/lib/uni-combox/readme.md +0 -10
- package/uni-ui/lib/uni-countdown/changelog.md +0 -30
- package/uni-ui/lib/uni-countdown/package.json +0 -105
- package/uni-ui/lib/uni-countdown/readme.md +0 -9
- package/uni-ui/lib/uni-data-checkbox/changelog.md +0 -51
- package/uni-ui/lib/uni-data-checkbox/package.json +0 -107
- package/uni-ui/lib/uni-data-checkbox/readme.md +0 -17
- package/uni-ui/lib/uni-data-picker/changelog.md +0 -81
- package/uni-ui/lib/uni-data-picker/package.json +0 -109
- package/uni-ui/lib/uni-data-picker/readme.md +0 -21
- package/uni-ui/lib/uni-data-select/changelog.md +0 -51
- package/uni-ui/lib/uni-data-select/package.json +0 -106
- package/uni-ui/lib/uni-data-select/readme.md +0 -7
- package/uni-ui/lib/uni-dateformat/changelog.md +0 -10
- package/uni-ui/lib/uni-dateformat/package.json +0 -107
- package/uni-ui/lib/uni-dateformat/readme.md +0 -10
- package/uni-ui/lib/uni-datetime-picker/changelog.md +0 -177
- package/uni-ui/lib/uni-datetime-picker/package.json +0 -107
- package/uni-ui/lib/uni-datetime-picker/readme.md +0 -20
- package/uni-ui/lib/uni-drawer/changelog.md +0 -13
- package/uni-ui/lib/uni-drawer/package.json +0 -106
- package/uni-ui/lib/uni-drawer/readme.md +0 -9
- package/uni-ui/lib/uni-easyinput/changelog.md +0 -121
- package/uni-ui/lib/uni-easyinput/package.json +0 -107
- package/uni-ui/lib/uni-easyinput/readme.md +0 -10
- package/uni-ui/lib/uni-fab/changelog.md +0 -25
- package/uni-ui/lib/uni-fab/package.json +0 -107
- package/uni-ui/lib/uni-fab/readme.md +0 -8
- package/uni-ui/lib/uni-fav/changelog.md +0 -19
- package/uni-ui/lib/uni-fav/package.json +0 -106
- package/uni-ui/lib/uni-fav/readme.md +0 -9
- package/uni-ui/lib/uni-file-picker/changelog.md +0 -91
- package/uni-ui/lib/uni-file-picker/package.json +0 -105
- package/uni-ui/lib/uni-file-picker/readme.md +0 -10
- package/uni-ui/lib/uni-forms/changelog.md +0 -100
- package/uni-ui/lib/uni-forms/package.json +0 -107
- package/uni-ui/lib/uni-forms/readme.md +0 -22
- package/uni-ui/lib/uni-goods-nav/changelog.md +0 -18
- package/uni-ui/lib/uni-goods-nav/package.json +0 -105
- package/uni-ui/lib/uni-goods-nav/readme.md +0 -9
- package/uni-ui/lib/uni-grid/changelog.md +0 -13
- package/uni-ui/lib/uni-grid/package.json +0 -106
- package/uni-ui/lib/uni-grid/readme.md +0 -10
- package/uni-ui/lib/uni-group/changelog.md +0 -16
- package/uni-ui/lib/uni-group/package.json +0 -106
- package/uni-ui/lib/uni-group/readme.md +0 -8
- package/uni-ui/lib/uni-icons/changelog.md +0 -44
- package/uni-ui/lib/uni-icons/package.json +0 -111
- package/uni-ui/lib/uni-icons/readme.md +0 -7
- package/uni-ui/lib/uni-indexed-list/changelog.md +0 -19
- package/uni-ui/lib/uni-indexed-list/package.json +0 -107
- package/uni-ui/lib/uni-indexed-list/readme.md +0 -10
- package/uni-ui/lib/uni-link/changelog.md +0 -17
- package/uni-ui/lib/uni-link/package.json +0 -106
- package/uni-ui/lib/uni-link/readme.md +0 -10
- package/uni-ui/lib/uni-list/changelog.md +0 -52
- package/uni-ui/lib/uni-list/package.json +0 -108
- package/uni-ui/lib/uni-list/readme.md +0 -44
- package/uni-ui/lib/uni-load-more/changelog.md +0 -27
- package/uni-ui/lib/uni-load-more/package.json +0 -105
- package/uni-ui/lib/uni-load-more/readme.md +0 -12
- package/uni-ui/lib/uni-nav-bar/changelog.md +0 -64
- package/uni-ui/lib/uni-nav-bar/package.json +0 -106
- package/uni-ui/lib/uni-nav-bar/readme.md +0 -13
- package/uni-ui/lib/uni-notice-bar/changelog.md +0 -22
- package/uni-ui/lib/uni-notice-bar/package.json +0 -107
- package/uni-ui/lib/uni-notice-bar/readme.md +0 -11
- package/uni-ui/lib/uni-number-box/changelog.md +0 -39
- package/uni-ui/lib/uni-number-box/package.json +0 -104
- package/uni-ui/lib/uni-number-box/readme.md +0 -11
- package/uni-ui/lib/uni-pagination/changelog.md +0 -27
- package/uni-ui/lib/uni-pagination/package.json +0 -106
- package/uni-ui/lib/uni-pagination/readme.md +0 -10
- package/uni-ui/lib/uni-popup/changelog.md +0 -102
- package/uni-ui/lib/uni-popup/package.json +0 -107
- package/uni-ui/lib/uni-popup/readme.md +0 -15
- package/uni-ui/lib/uni-rate/changelog.md +0 -27
- package/uni-ui/lib/uni-rate/package.json +0 -106
- package/uni-ui/lib/uni-rate/readme.md +0 -11
- package/uni-ui/lib/uni-row/changelog.md +0 -10
- package/uni-ui/lib/uni-row/package.json +0 -106
- package/uni-ui/lib/uni-row/readme.md +0 -9
- package/uni-ui/lib/uni-scss/changelog.md +0 -8
- package/uni-ui/lib/uni-scss/package.json +0 -99
- package/uni-ui/lib/uni-scss/readme.md +0 -3
- package/uni-ui/lib/uni-search-bar/changelog.md +0 -47
- package/uni-ui/lib/uni-search-bar/package.json +0 -106
- package/uni-ui/lib/uni-search-bar/readme.md +0 -12
- package/uni-ui/lib/uni-section/changelog.md +0 -2
- package/uni-ui/lib/uni-section/package.json +0 -104
- package/uni-ui/lib/uni-section/readme.md +0 -7
- package/uni-ui/lib/uni-segmented-control/changelog.md +0 -15
- package/uni-ui/lib/uni-segmented-control/package.json +0 -106
- package/uni-ui/lib/uni-segmented-control/readme.md +0 -11
- package/uni-ui/lib/uni-steps/changelog.md +0 -18
- package/uni-ui/lib/uni-steps/package.json +0 -106
- package/uni-ui/lib/uni-steps/readme.md +0 -11
- package/uni-ui/lib/uni-swipe-action/changelog.md +0 -60
- package/uni-ui/lib/uni-swipe-action/package.json +0 -113
- package/uni-ui/lib/uni-swipe-action/readme.md +0 -10
- package/uni-ui/lib/uni-swiper-dot/changelog.md +0 -12
- package/uni-ui/lib/uni-swiper-dot/package.json +0 -106
- package/uni-ui/lib/uni-swiper-dot/readme.md +0 -10
- package/uni-ui/lib/uni-table/changelog.md +0 -35
- package/uni-ui/lib/uni-table/package.json +0 -106
- package/uni-ui/lib/uni-table/readme.md +0 -11
- package/uni-ui/lib/uni-tag/changelog.md +0 -25
- package/uni-ui/lib/uni-tag/package.json +0 -106
- package/uni-ui/lib/uni-tag/readme.md +0 -11
- package/uni-ui/lib/uni-title/changelog.md +0 -10
- package/uni-ui/lib/uni-title/package.json +0 -107
- package/uni-ui/lib/uni-title/readme.md +0 -12
- package/uni-ui/lib/uni-tooltip/changelog.md +0 -16
- package/uni-ui/lib/uni-tooltip/package.json +0 -104
- package/uni-ui/lib/uni-tooltip/readme.md +0 -7
- package/uni-ui/lib/uni-transition/changelog.md +0 -31
- package/uni-ui/lib/uni-transition/package.json +0 -112
- package/uni-ui/lib/uni-transition/readme.md +0 -10
- package/uni-ui/lib/uni-ui/changelog.md +0 -639
- package/uni-ui/lib/uni-ui/package.json +0 -148
- package/uni-ui/lib/uni-ui/readme.md +0 -247
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/canvas.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/draw.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/draw2.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/gradient.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/index.vue +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/index2.vue +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/layout.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/qrcode.js +0 -0
- /package/other/{lime-painter2/components/lime-painter → lime-painter/components/lime-painter2}/utils.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/changelog.md +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-error/qiun-error.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading1.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading2.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading3.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading4.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/loading5.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/components/qiun-loading/qiun-loading.vue +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/config-echarts.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/readme.md +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/u-charts.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/js_sdk/u-charts/u-charts.min.js +0 -0
- /package/{ui-sdks/sdk-u-charts → other/qiun-data-charts/js_sdk2}/app-echarts.min.js +0 -0
- /package/{ui-sdks/sdk-u-charts → other/qiun-data-charts/js_sdk2}/h5-echarts.min.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/license.md +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/readme.md +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/static/app-plus/echarts.min.js +0 -0
- /package/{ui-sdks → other}/qiun-data-charts/static/h5/echarts.min.js +0 -0
- /package/{ui-sdks → other}/tui-clipboard/tui-clipboard.js +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseAudio.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseImg.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate1.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate10.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate11.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate2.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate3.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate4.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate5.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate6.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate7.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate8.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseTemplate9.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/components/wxParseVideo.vue +0 -0
- /package/other/{u-parse-2019 → u-parse}/libs/htmlparser.js +0 -0
- /package/other/{u-parse-2019 → u-parse}/u-parse.css +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate10.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate11.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate2.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate3.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate4.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate5.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate6.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate7.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate8.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseTemplate9.vue +0 -0
- /package/other/{uParse → uParse2}/components/wxParseVideo.vue +0 -0
- /package/other/{uParse → uParse2}/editor.css +0 -0
- /package/other/{uParse → uParse2}/libs/htmlparser.js +0 -0
- /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/handler2.js +0 -0
- /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/uni.webview.min.js +0 -0
- /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/js/uni.webview.min2.js +0 -0
- /package/{other/xt-parse/static/app-plus/u-parse → uview-plus/components/u-parse/static/app-plus/up-parse}/local.html +0 -0
|
@@ -1,510 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view id="_root" :class="(selectable ? '_select ' : '') + '_root'" :style="containerStyle">
|
|
3
|
-
<slot v-if="!nodes[0]" />
|
|
4
|
-
<!-- #ifndef APP-PLUS-NVUE -->
|
|
5
|
-
<node v-else :childs="nodes" :opts="[lazyLoad, loadingImg, errorImg, showImgMenu, selectable]" name="span" />
|
|
6
|
-
<!-- #endif -->
|
|
7
|
-
<!-- #ifdef APP-PLUS-NVUE -->
|
|
8
|
-
<web-view
|
|
9
|
-
ref="web"
|
|
10
|
-
src="/uni_modules/xt-parse/static/app-plus/xt-parse/local.html"
|
|
11
|
-
:style="'margin-top:-2px;height:' + height + 'px'"
|
|
12
|
-
@onPostMessage="_onMessage"
|
|
13
|
-
/>
|
|
14
|
-
<!-- #endif -->
|
|
15
|
-
</view>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
/**
|
|
20
|
-
* Parse 富文本解析组件
|
|
21
|
-
* @description 本组件是基于mp-html封装的富文本解析器,感谢开源,更多信息请查看mp-html文档
|
|
22
|
-
* @tutorial https://ext.dcloud.net.cn/plugin?name=xt-parse
|
|
23
|
-
*
|
|
24
|
-
* @property {String} containerStyle 容器的样式
|
|
25
|
-
* @property {String} content 用于渲染的 html 字符串
|
|
26
|
-
* @property {Boolean} copyLink 是否允许外部链接被点击时自动复制
|
|
27
|
-
* @property {String} domain 主域名,用于拼接链接
|
|
28
|
-
* @property {String} errorImg 图片出错时的占位图链接
|
|
29
|
-
* @property {Boolean} lazyLoad 是否开启图片懒加载
|
|
30
|
-
* @property {string} loadingImg 图片加载过程中的占位图链接
|
|
31
|
-
* @property {Boolean} pauseVideo 是否在播放一个视频时自动暂停其他视频
|
|
32
|
-
* @property {Boolean} previewImg 是否允许图片被点击时自动预览
|
|
33
|
-
* @property {Boolean} scrollTable 是否给每个表格添加一个滚动层使其能单独横向滚动
|
|
34
|
-
* @property {Boolean | String} selectable 是否开启长按复制
|
|
35
|
-
* @property {Boolean} setTitle 是否将 title 标签的内容设置到页面标题
|
|
36
|
-
* @property {Boolean} showImgMenu 是否允许图片被长按时显示菜单
|
|
37
|
-
* @property {Object.<String, String>} tagStyle 标签的默认样式
|
|
38
|
-
* @property {Boolean | Number} useAnchor 是否使用锚点链接
|
|
39
|
-
* @event {Function} load dom 结构加载完毕时触发
|
|
40
|
-
* @event {Function} ready 所有图片加载完毕时触发
|
|
41
|
-
* @event {Function} imgtap 图片被点击时触发
|
|
42
|
-
* @event {Function} linktap 链接被点击时触发
|
|
43
|
-
* @event {Function} play 音视频播放时触发
|
|
44
|
-
* @event {Function} error 媒体加载出错时触发
|
|
45
|
-
*/
|
|
46
|
-
import props from './props.js';
|
|
47
|
-
// #ifndef APP-PLUS-NVUE
|
|
48
|
-
import node from './node/node';
|
|
49
|
-
// #endif
|
|
50
|
-
import Parser from './parser';
|
|
51
|
-
const plugins = [];
|
|
52
|
-
// #ifdef APP-PLUS-NVUE
|
|
53
|
-
const dom = weex.requireModule('dom');
|
|
54
|
-
// #endif
|
|
55
|
-
|
|
56
|
-
export default {
|
|
57
|
-
name: 'up-parse',
|
|
58
|
-
data() {
|
|
59
|
-
return {
|
|
60
|
-
nodes: [],
|
|
61
|
-
// #ifdef APP-PLUS-NVUE
|
|
62
|
-
height: 3
|
|
63
|
-
// #endif
|
|
64
|
-
};
|
|
65
|
-
},
|
|
66
|
-
mixins: [props],
|
|
67
|
-
// #ifdef VUE3
|
|
68
|
-
emits: ['load', 'ready', 'imgtap', 'linktap', 'play', 'error'],
|
|
69
|
-
// #endif
|
|
70
|
-
// #ifndef APP-PLUS-NVUE
|
|
71
|
-
components: {
|
|
72
|
-
node
|
|
73
|
-
},
|
|
74
|
-
// #endif
|
|
75
|
-
watch: {
|
|
76
|
-
content(content) {
|
|
77
|
-
this.setContent(this.handelBlank(content));
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
created() {
|
|
81
|
-
this.plugins = [];
|
|
82
|
-
for (let i = plugins.length; i--; ) {
|
|
83
|
-
this.plugins.push(new plugins[i](this));
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
mounted() {
|
|
87
|
-
if (this.content && !this.nodes.length) {
|
|
88
|
-
this.setContent(this.handelBlank(this.content));
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
beforeDestroy() {
|
|
92
|
-
this._hook('onDetached');
|
|
93
|
-
},
|
|
94
|
-
methods: {
|
|
95
|
-
/**
|
|
96
|
-
* @description
|
|
97
|
-
* 该函数主要用于处理传入的字符串,首先将连续的空格(两个及以上)替换为 ` `,
|
|
98
|
-
* 然后将空的段落标签 `<p></p>` 替换为 `<p><br></p>`。常用于处理 HTML 内容中的空白字符和空段落。
|
|
99
|
-
* @param {string} e - 需要处理的字符串,可能包含空白字符和空段落标签
|
|
100
|
-
* @returns {string} - 处理后的字符串,空格已替换为 ` `,空段落标签已替换为 `<p><br></p>`
|
|
101
|
-
*/
|
|
102
|
-
handelBlank(e) {
|
|
103
|
-
if (!e) return; // 如果传入的参数为空,则直接返回
|
|
104
|
-
let temp;
|
|
105
|
-
// 替换连续空格(两个及以上)为
|
|
106
|
-
temp = e.replace(/(\s{2,})(?![^<>]*>)/g, function (match) {
|
|
107
|
-
return match.replace(/ /g, ' '); // 将匹配到的空格替换为
|
|
108
|
-
});
|
|
109
|
-
// 替换空的段落标签 <p></p> 为 <p><br></p>
|
|
110
|
-
temp = temp.replace(/<p><\/p>/g, '<p><br></p>');
|
|
111
|
-
return temp; // 返回处理后的字符串
|
|
112
|
-
},
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* @description 将锚点跳转的范围限定在一个 scroll-view 内
|
|
116
|
-
* @param {Object} page scroll-view 所在页面的示例
|
|
117
|
-
* @param {String} selector scroll-view 的选择器
|
|
118
|
-
* @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名
|
|
119
|
-
*/
|
|
120
|
-
in(page, selector, scrollTop) {
|
|
121
|
-
// #ifndef APP-PLUS-NVUE
|
|
122
|
-
if (page && selector && scrollTop) {
|
|
123
|
-
this._in = {
|
|
124
|
-
page,
|
|
125
|
-
selector,
|
|
126
|
-
scrollTop
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
// #endif
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* @description 锚点跳转
|
|
134
|
-
* @param {String} id 要跳转的锚点 id
|
|
135
|
-
* @param {Number} offset 跳转位置的偏移量
|
|
136
|
-
* @returns {Promise}
|
|
137
|
-
*/
|
|
138
|
-
navigateTo(id, offset) {
|
|
139
|
-
return new Promise((resolve, reject) => {
|
|
140
|
-
if (!this.useAnchor) {
|
|
141
|
-
reject(Error('Anchor is disabled'));
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
offset = offset || parseInt(this.useAnchor) || 0;
|
|
145
|
-
// #ifdef APP-PLUS-NVUE
|
|
146
|
-
if (!id) {
|
|
147
|
-
dom.scrollToElement(this.$refs.web, {
|
|
148
|
-
offset
|
|
149
|
-
});
|
|
150
|
-
resolve();
|
|
151
|
-
} else {
|
|
152
|
-
this._navigateTo = {
|
|
153
|
-
resolve,
|
|
154
|
-
reject,
|
|
155
|
-
offset
|
|
156
|
-
};
|
|
157
|
-
this.$refs.web.evalJs(
|
|
158
|
-
'uni.postMessage({data:{action:"getOffset",offset:(document.getElementById(' + id + ')||{}).offsetTop}})'
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
// #endif
|
|
162
|
-
// #ifndef APP-PLUS-NVUE
|
|
163
|
-
let deep = ' ';
|
|
164
|
-
// #ifdef MP-WEIXIN || MP-QQ || MP-TOUTIAO
|
|
165
|
-
deep = '>>>';
|
|
166
|
-
// #endif
|
|
167
|
-
const selector = uni
|
|
168
|
-
.createSelectorQuery()
|
|
169
|
-
// #ifndef MP-ALIPAY
|
|
170
|
-
.in(this._in ? this._in.page : this)
|
|
171
|
-
// #endif
|
|
172
|
-
.select((this._in ? this._in.selector : '._root') + (id ? `${deep}#${id}` : ''))
|
|
173
|
-
.boundingClientRect();
|
|
174
|
-
if (this._in) {
|
|
175
|
-
selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect();
|
|
176
|
-
} else {
|
|
177
|
-
// 获取 scroll-view 的位置和滚动距离
|
|
178
|
-
selector.selectViewport().scrollOffset(); // 获取窗口的滚动距离
|
|
179
|
-
}
|
|
180
|
-
selector.exec((res) => {
|
|
181
|
-
if (!res[0]) {
|
|
182
|
-
reject(Error('Label not found'));
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset;
|
|
186
|
-
if (this._in) {
|
|
187
|
-
// scroll-view 跳转
|
|
188
|
-
this._in.page[this._in.scrollTop] = scrollTop;
|
|
189
|
-
} else {
|
|
190
|
-
// 页面跳转
|
|
191
|
-
uni.pageScrollTo({
|
|
192
|
-
scrollTop,
|
|
193
|
-
duration: 300
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
|
-
resolve();
|
|
197
|
-
});
|
|
198
|
-
// #endif
|
|
199
|
-
});
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* @description 获取文本内容
|
|
204
|
-
* @return {String}
|
|
205
|
-
*/
|
|
206
|
-
getText(nodes) {
|
|
207
|
-
let text = '';
|
|
208
|
-
(function traversal(nodes) {
|
|
209
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
210
|
-
const node = nodes[i];
|
|
211
|
-
if (node.type === 'text') {
|
|
212
|
-
text += node.text.replace(/&/g, '&');
|
|
213
|
-
} else if (node.name === 'br') {
|
|
214
|
-
text += '\n';
|
|
215
|
-
} else {
|
|
216
|
-
// 块级标签前后加换行
|
|
217
|
-
const isBlock =
|
|
218
|
-
node.name === 'p' ||
|
|
219
|
-
node.name === 'div' ||
|
|
220
|
-
node.name === 'tr' ||
|
|
221
|
-
node.name === 'li' ||
|
|
222
|
-
(node.name[0] === 'h' && node.name[1] > '0' && node.name[1] < '7');
|
|
223
|
-
if (isBlock && text && text[text.length - 1] !== '\n') {
|
|
224
|
-
text += '\n';
|
|
225
|
-
}
|
|
226
|
-
// 递归获取子节点的文本
|
|
227
|
-
if (node.children) {
|
|
228
|
-
traversal(node.children);
|
|
229
|
-
}
|
|
230
|
-
if (isBlock && text[text.length - 1] !== '\n') {
|
|
231
|
-
text += '\n';
|
|
232
|
-
} else if (node.name === 'td' || node.name === 'th') {
|
|
233
|
-
text += '\t';
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
})(nodes || this.nodes);
|
|
238
|
-
return text;
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* @description 获取内容大小和位置
|
|
243
|
-
* @return {Promise}
|
|
244
|
-
*/
|
|
245
|
-
getRect() {
|
|
246
|
-
return new Promise((resolve, reject) => {
|
|
247
|
-
uni
|
|
248
|
-
.createSelectorQuery()
|
|
249
|
-
// #ifndef MP-ALIPAY
|
|
250
|
-
.in(this)
|
|
251
|
-
// #endif
|
|
252
|
-
.select('#_root')
|
|
253
|
-
.boundingClientRect()
|
|
254
|
-
.exec((res) => (res[0] ? resolve(res[0]) : reject(Error('Root label not found'))));
|
|
255
|
-
});
|
|
256
|
-
},
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* @description 暂停播放媒体
|
|
260
|
-
*/
|
|
261
|
-
pauseMedia() {
|
|
262
|
-
for (let i = (this._videos || []).length; i--; ) {
|
|
263
|
-
this._videos[i].pause();
|
|
264
|
-
}
|
|
265
|
-
// #ifdef APP-PLUS
|
|
266
|
-
const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()';
|
|
267
|
-
// #ifndef APP-PLUS-NVUE
|
|
268
|
-
let page = this.$parent;
|
|
269
|
-
while (!page.$scope) page = page.$parent;
|
|
270
|
-
page.$scope.$getAppWebview().evalJS(command);
|
|
271
|
-
// #endif
|
|
272
|
-
// #ifdef APP-PLUS-NVUE
|
|
273
|
-
this.$refs.web.evalJs(command);
|
|
274
|
-
// #endif
|
|
275
|
-
// #endif
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* @description 设置媒体播放速率
|
|
280
|
-
* @param {Number} rate 播放速率
|
|
281
|
-
*/
|
|
282
|
-
setPlaybackRate(rate) {
|
|
283
|
-
this.playbackRate = rate;
|
|
284
|
-
for (let i = (this._videos || []).length; i--; ) {
|
|
285
|
-
this._videos[i].playbackRate(rate);
|
|
286
|
-
}
|
|
287
|
-
// #ifdef APP-PLUS
|
|
288
|
-
const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].playbackRate=' + rate;
|
|
289
|
-
// #ifndef APP-PLUS-NVUE
|
|
290
|
-
let page = this.$parent;
|
|
291
|
-
while (!page.$scope) page = page.$parent;
|
|
292
|
-
page.$scope.$getAppWebview().evalJS(command);
|
|
293
|
-
// #endif
|
|
294
|
-
// #ifdef APP-PLUS-NVUE
|
|
295
|
-
this.$refs.web.evalJs(command);
|
|
296
|
-
// #endif
|
|
297
|
-
// #endif
|
|
298
|
-
},
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* @description 设置内容
|
|
302
|
-
* @param {String} content html 内容
|
|
303
|
-
* @param {Boolean} append 是否在尾部追加
|
|
304
|
-
*/
|
|
305
|
-
setContent(content, append) {
|
|
306
|
-
if (!append || !this.imgList) {
|
|
307
|
-
this.imgList = [];
|
|
308
|
-
}
|
|
309
|
-
const nodes = new Parser(this).parse(content);
|
|
310
|
-
// #ifdef APP-PLUS-NVUE
|
|
311
|
-
if (this._ready) {
|
|
312
|
-
this._set(nodes, append);
|
|
313
|
-
}
|
|
314
|
-
// #endif
|
|
315
|
-
this.$set(this, 'nodes', append ? (this.nodes || []).concat(nodes) : nodes);
|
|
316
|
-
|
|
317
|
-
// #ifndef APP-PLUS-NVUE
|
|
318
|
-
this._videos = [];
|
|
319
|
-
this.$nextTick(() => {
|
|
320
|
-
this._hook('onLoad');
|
|
321
|
-
this.$emit('load');
|
|
322
|
-
});
|
|
323
|
-
|
|
324
|
-
if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) {
|
|
325
|
-
// 设置懒加载,每 350ms 获取高度,不变则认为加载完毕
|
|
326
|
-
let height = 0;
|
|
327
|
-
const callback = (rect) => {
|
|
328
|
-
if (!rect || !rect.height) rect = {};
|
|
329
|
-
// 350ms 总高度无变化就触发 ready 事件
|
|
330
|
-
if (rect.height === height) {
|
|
331
|
-
this.$emit('ready', rect);
|
|
332
|
-
} else {
|
|
333
|
-
height = rect.height;
|
|
334
|
-
setTimeout(() => {
|
|
335
|
-
this.getRect().then(callback).catch(callback);
|
|
336
|
-
}, 350);
|
|
337
|
-
}
|
|
338
|
-
};
|
|
339
|
-
this.getRect().then(callback).catch(callback);
|
|
340
|
-
} else {
|
|
341
|
-
// 未设置懒加载,等待所有图片加载完毕
|
|
342
|
-
if (!this.imgList._unloadimgs) {
|
|
343
|
-
this.getRect()
|
|
344
|
-
.then((rect) => {
|
|
345
|
-
this.$emit('ready', rect);
|
|
346
|
-
})
|
|
347
|
-
.catch(() => {
|
|
348
|
-
this.$emit('ready', {});
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
// #endif
|
|
353
|
-
},
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* @description 调用插件钩子函数
|
|
357
|
-
*/
|
|
358
|
-
_hook(name) {
|
|
359
|
-
for (let i = plugins.length; i--; ) {
|
|
360
|
-
if (this.plugins[i][name]) {
|
|
361
|
-
this.plugins[i][name]();
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
},
|
|
365
|
-
|
|
366
|
-
// #ifdef APP-PLUS-NVUE
|
|
367
|
-
/**
|
|
368
|
-
* @description 设置内容
|
|
369
|
-
*/
|
|
370
|
-
_set(nodes, append) {
|
|
371
|
-
this.$refs.web.evalJs(
|
|
372
|
-
'setContent(' +
|
|
373
|
-
JSON.stringify(nodes).replace(/%22/g, '') +
|
|
374
|
-
',' +
|
|
375
|
-
JSON.stringify([
|
|
376
|
-
this.containerStyle.replace(/(?:margin|padding)[^;]+/g, ''),
|
|
377
|
-
this.errorImg,
|
|
378
|
-
this.loadingImg,
|
|
379
|
-
this.pauseVideo,
|
|
380
|
-
this.scrollTable,
|
|
381
|
-
this.selectable
|
|
382
|
-
]) +
|
|
383
|
-
',' +
|
|
384
|
-
append +
|
|
385
|
-
')'
|
|
386
|
-
);
|
|
387
|
-
},
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* @description 接收到 web-view 消息
|
|
391
|
-
*/
|
|
392
|
-
_onMessage(e) {
|
|
393
|
-
const message = e.detail.data[0];
|
|
394
|
-
switch (message.action) {
|
|
395
|
-
// web-view 初始化完毕
|
|
396
|
-
case 'onJSBridgeReady':
|
|
397
|
-
this._ready = true;
|
|
398
|
-
if (this.nodes) {
|
|
399
|
-
this._set(this.nodes);
|
|
400
|
-
}
|
|
401
|
-
break;
|
|
402
|
-
// 内容 dom 加载完毕
|
|
403
|
-
case 'onLoad':
|
|
404
|
-
this.height = message.height;
|
|
405
|
-
this._hook('onLoad');
|
|
406
|
-
this.$emit('load');
|
|
407
|
-
break;
|
|
408
|
-
// 所有图片加载完毕
|
|
409
|
-
case 'onReady':
|
|
410
|
-
this.getRect()
|
|
411
|
-
.then((res) => {
|
|
412
|
-
this.$emit('ready', res);
|
|
413
|
-
})
|
|
414
|
-
.catch(() => {
|
|
415
|
-
this.$emit('ready', {});
|
|
416
|
-
});
|
|
417
|
-
break;
|
|
418
|
-
// 总高度发生变化
|
|
419
|
-
case 'onHeightChange':
|
|
420
|
-
this.height = message.height;
|
|
421
|
-
break;
|
|
422
|
-
// 图片点击
|
|
423
|
-
case 'onImgTap':
|
|
424
|
-
this.$emit('imgtap', message.attrs);
|
|
425
|
-
if (this.previewImg) {
|
|
426
|
-
uni.previewImage({
|
|
427
|
-
current: parseInt(message.attrs.i),
|
|
428
|
-
urls: this.imgList
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
break;
|
|
432
|
-
// 链接点击
|
|
433
|
-
case 'onLinkTap': {
|
|
434
|
-
const href = message.attrs.href;
|
|
435
|
-
this.$emit('linktap', message.attrs);
|
|
436
|
-
if (href) {
|
|
437
|
-
// 锚点跳转
|
|
438
|
-
if (href[0] === '#') {
|
|
439
|
-
if (this.useAnchor) {
|
|
440
|
-
dom.scrollToElement(this.$refs.web, {
|
|
441
|
-
offset: message.offset
|
|
442
|
-
});
|
|
443
|
-
}
|
|
444
|
-
} else if (href.includes('://')) {
|
|
445
|
-
// 打开外链
|
|
446
|
-
if (this.copyLink) {
|
|
447
|
-
plus.runtime.openWeb(href);
|
|
448
|
-
}
|
|
449
|
-
} else {
|
|
450
|
-
uni.navigateTo({
|
|
451
|
-
url: href,
|
|
452
|
-
fail() {
|
|
453
|
-
uni.switchTab({
|
|
454
|
-
url: href
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
break;
|
|
461
|
-
}
|
|
462
|
-
case 'onPlay':
|
|
463
|
-
this.$emit('play');
|
|
464
|
-
break;
|
|
465
|
-
// 获取到锚点的偏移量
|
|
466
|
-
case 'getOffset':
|
|
467
|
-
if (typeof message.offset === 'number') {
|
|
468
|
-
dom.scrollToElement(this.$refs.web, {
|
|
469
|
-
offset: message.offset + this._navigateTo.offset
|
|
470
|
-
});
|
|
471
|
-
this._navigateTo.resolve();
|
|
472
|
-
} else {
|
|
473
|
-
this._navigateTo.reject(Error('Label not found'));
|
|
474
|
-
}
|
|
475
|
-
break;
|
|
476
|
-
// 点击
|
|
477
|
-
case 'onClick':
|
|
478
|
-
this.$emit('tap');
|
|
479
|
-
this.$emit('click');
|
|
480
|
-
break;
|
|
481
|
-
// 出错
|
|
482
|
-
case 'onError':
|
|
483
|
-
this.$emit('error', {
|
|
484
|
-
source: message.source,
|
|
485
|
-
attrs: message.attrs
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
// #endif
|
|
490
|
-
}
|
|
491
|
-
};
|
|
492
|
-
</script>
|
|
493
|
-
|
|
494
|
-
<style>
|
|
495
|
-
/* #ifndef APP-PLUS-NVUE */
|
|
496
|
-
/* 根节点样式 */
|
|
497
|
-
._root {
|
|
498
|
-
padding: 1px 0;
|
|
499
|
-
overflow-x: auto;
|
|
500
|
-
overflow-y: hidden;
|
|
501
|
-
-webkit-overflow-scrolling: touch;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
/* 长按复制 */
|
|
505
|
-
._select {
|
|
506
|
-
user-select: text;
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
/* #endif */
|
|
510
|
-
</style>
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import buildURL from '../helpers/buildURL';
|
|
2
|
-
import buildFullPath from '../core/buildFullPath';
|
|
3
|
-
import settle from '../core/settle';
|
|
4
|
-
import { isUndefined } from '../utils';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 返回可选值存在的配置
|
|
8
|
-
* @param {Array} keys - 可选值数组
|
|
9
|
-
* @param {Object} config2 - 配置
|
|
10
|
-
* @return {{}} - 存在的配置项
|
|
11
|
-
*/
|
|
12
|
-
const mergeKeys = (keys, config2) => {
|
|
13
|
-
let config = {};
|
|
14
|
-
keys.forEach((prop) => {
|
|
15
|
-
if (!isUndefined(config2[prop])) {
|
|
16
|
-
config[prop] = config2[prop];
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
return config;
|
|
20
|
-
};
|
|
21
|
-
export default (config) => {
|
|
22
|
-
return new Promise((resolve, reject) => {
|
|
23
|
-
let fullPath = buildURL(buildFullPath(config.baseURL, config.url), config.params, config.paramsSerializer);
|
|
24
|
-
const _config = {
|
|
25
|
-
url: fullPath,
|
|
26
|
-
header: config.header,
|
|
27
|
-
complete: (response) => {
|
|
28
|
-
config.fullPath = fullPath;
|
|
29
|
-
response.config = config;
|
|
30
|
-
response.rawData = response.data;
|
|
31
|
-
try {
|
|
32
|
-
let jsonParseHandle = false;
|
|
33
|
-
const forcedJSONParsingType = typeof config.forcedJSONParsing;
|
|
34
|
-
if (forcedJSONParsingType === 'boolean') {
|
|
35
|
-
jsonParseHandle = config.forcedJSONParsing;
|
|
36
|
-
} else if (forcedJSONParsingType === 'object') {
|
|
37
|
-
const includesMethod = config.forcedJSONParsing.include || [];
|
|
38
|
-
jsonParseHandle = includesMethod.includes(config.method);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// 对可能字符串不是json 的情况容错
|
|
42
|
-
if (jsonParseHandle && typeof response.data === 'string') {
|
|
43
|
-
response.data = JSON.parse(response.data);
|
|
44
|
-
}
|
|
45
|
-
// eslint-disable-next-line no-empty
|
|
46
|
-
} catch (e) {}
|
|
47
|
-
settle(resolve, reject, response);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
let requestTask;
|
|
51
|
-
if (config.method === 'UPLOAD') {
|
|
52
|
-
delete _config.header['content-type'];
|
|
53
|
-
delete _config.header['Content-Type'];
|
|
54
|
-
let otherConfig = {
|
|
55
|
-
// #ifdef MP-ALIPAY
|
|
56
|
-
fileType: config.fileType,
|
|
57
|
-
// #endif
|
|
58
|
-
filePath: config.filePath,
|
|
59
|
-
name: config.name
|
|
60
|
-
};
|
|
61
|
-
const optionalKeys = [
|
|
62
|
-
// #ifdef APP-PLUS || H5
|
|
63
|
-
'files',
|
|
64
|
-
// #endif
|
|
65
|
-
// #ifdef H5
|
|
66
|
-
'file',
|
|
67
|
-
// #endif
|
|
68
|
-
// #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO || MP-KUAISHOU
|
|
69
|
-
'timeout',
|
|
70
|
-
// #endif
|
|
71
|
-
'formData'
|
|
72
|
-
];
|
|
73
|
-
requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys(optionalKeys, config) });
|
|
74
|
-
} else if (config.method === 'DOWNLOAD') {
|
|
75
|
-
const optionalKeys = [
|
|
76
|
-
// #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO || MP-KUAISHOU
|
|
77
|
-
'timeout',
|
|
78
|
-
// #endif
|
|
79
|
-
// #ifdef MP
|
|
80
|
-
'filePath'
|
|
81
|
-
// #endif
|
|
82
|
-
];
|
|
83
|
-
requestTask = uni.downloadFile({ ..._config, ...mergeKeys(optionalKeys, config) });
|
|
84
|
-
} else {
|
|
85
|
-
const optionalKeys = [
|
|
86
|
-
'data',
|
|
87
|
-
'method',
|
|
88
|
-
// #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN
|
|
89
|
-
'timeout',
|
|
90
|
-
// #endif
|
|
91
|
-
'dataType',
|
|
92
|
-
// #ifndef MP-ALIPAY
|
|
93
|
-
'responseType',
|
|
94
|
-
// #endif
|
|
95
|
-
// #ifdef APP-PLUS
|
|
96
|
-
'sslVerify',
|
|
97
|
-
// #endif
|
|
98
|
-
// #ifdef H5
|
|
99
|
-
'withCredentials',
|
|
100
|
-
// #endif
|
|
101
|
-
// #ifdef APP-PLUS
|
|
102
|
-
'firstIpv4',
|
|
103
|
-
// #endif
|
|
104
|
-
// #ifdef MP-WEIXIN
|
|
105
|
-
'enableHttp2',
|
|
106
|
-
'enableQuic',
|
|
107
|
-
// #endif
|
|
108
|
-
// #ifdef MP-TOUTIAO || MP-WEIXIN
|
|
109
|
-
'enableCache',
|
|
110
|
-
// #endif
|
|
111
|
-
// #ifdef MP-WEIXIN
|
|
112
|
-
'enableHttpDNS',
|
|
113
|
-
'httpDNSServiceId',
|
|
114
|
-
'enableChunked',
|
|
115
|
-
'forceCellularNetwork',
|
|
116
|
-
// #endif
|
|
117
|
-
// #ifdef MP-ALIPAY
|
|
118
|
-
'enableCookie',
|
|
119
|
-
// #endif
|
|
120
|
-
// #ifdef MP-BAIDU
|
|
121
|
-
'cloudCache',
|
|
122
|
-
'defer'
|
|
123
|
-
// #endif
|
|
124
|
-
];
|
|
125
|
-
requestTask = uni.request({ ..._config, ...mergeKeys(optionalKeys, config) });
|
|
126
|
-
}
|
|
127
|
-
if (config.getTask) {
|
|
128
|
-
config.getTask(requestTask, config);
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function InterceptorManager() {
|
|
4
|
-
this.handlers = [];
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Add a new interceptor to the stack
|
|
9
|
-
*
|
|
10
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
11
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
12
|
-
*
|
|
13
|
-
* @return {Number} An ID used to remove interceptor later
|
|
14
|
-
*/
|
|
15
|
-
InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
|
16
|
-
this.handlers.push({
|
|
17
|
-
fulfilled: fulfilled,
|
|
18
|
-
rejected: rejected
|
|
19
|
-
});
|
|
20
|
-
return this.handlers.length - 1;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Remove an interceptor from the stack
|
|
25
|
-
*
|
|
26
|
-
* @param {Number} id The ID that was returned by `use`
|
|
27
|
-
*/
|
|
28
|
-
InterceptorManager.prototype.eject = function eject(id) {
|
|
29
|
-
if (this.handlers[id]) {
|
|
30
|
-
this.handlers[id] = null;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Iterate over all the registered interceptors
|
|
36
|
-
*
|
|
37
|
-
* This method is particularly useful for skipping over any
|
|
38
|
-
* interceptors that may have become `null` calling `eject`.
|
|
39
|
-
*
|
|
40
|
-
* @param {Function} fn The function to call for each interceptor
|
|
41
|
-
*/
|
|
42
|
-
InterceptorManager.prototype.forEach = function forEach(fn) {
|
|
43
|
-
this.handlers.forEach((h) => {
|
|
44
|
-
if (h !== null) {
|
|
45
|
-
fn(h);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default InterceptorManager;
|