var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; if (typeof Promise !== "undefined" && !Promise.prototype.finally) { Promise.prototype.finally = function(callback) { const promise = this.constructor; return this.then( (value) => promise.resolve(callback()).then(() => value), (reason) => promise.resolve(callback()).then(() => { throw reason; }) ); }; } ; if (typeof uni !== "undefined" && uni && uni.requireGlobal) { const global2 = uni.requireGlobal(); ArrayBuffer = global2.ArrayBuffer; Int8Array = global2.Int8Array; Uint8Array = global2.Uint8Array; Uint8ClampedArray = global2.Uint8ClampedArray; Int16Array = global2.Int16Array; Uint16Array = global2.Uint16Array; Int32Array = global2.Int32Array; Uint32Array = global2.Uint32Array; Float32Array = global2.Float32Array; Float64Array = global2.Float64Array; BigInt64Array = global2.BigInt64Array; BigUint64Array = global2.BigUint64Array; } ; if (uni.restoreGlobal) { uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval); } (function(vue) { "use strict"; var _a; const _export_sfc = (sfc, props2) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props2) { target[key] = val; } return target; }; const _sfc_main$2k = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const downloadFrom = (source) => { uni.getSystemInfoSync(); window.location.href = "https://a.app.qq.com/o/simple.jsp?pkgname=com.lucky.luckyclient"; }; const __returned__ = { downloadFrom }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2j(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { id: "app" }, [ vue.createElementVNode("view", { class: "container" }, [ vue.createCommentVNode(" 应用头部信息 "), vue.createElementVNode("view", { class: "app-header" }, [ vue.createElementVNode("view", { class: "app-icon" }, [ vue.createElementVNode("text", { class: "fas fa-book" }, "水贝商城"), vue.createElementVNode("view", { class: "official-badge" }, "官方") ]), vue.createCommentVNode(' \r\n \r\n 水贝商城\r\n \r\n \r\n \r\n \r\n \r\n 4.56分\r\n \r\n 1.9亿次下载\r\n \r\n \r\n 124.55MB\r\n \r\n ') ]), vue.createCommentVNode(" 下载选项 "), vue.createElementVNode("view", { class: "download-options" }, [ vue.createElementVNode("view", { class: "download-option option-primary", onClick: _cache[0] || (_cache[0] = ($event) => $setup.downloadFrom("应用宝")) }, [ vue.createElementVNode("view", { class: "option-icon" }, [ vue.createElementVNode("text", { class: "fas fa-shield-alt" }) ]), vue.createElementVNode("view", { class: "option-content" }, [ vue.createElementVNode("view", { class: "option-title" }, "通过应用宝下载"), vue.createElementVNode("view", { class: "option-desc" }, "腾讯应用宝下载,人工智能保证安全"), vue.createElementVNode("view", { class: "option-tag" }, "无病毒"), vue.createElementVNode("view", { class: "option-tag" }, "免广告骚扰") ]) ]), vue.createElementVNode("view", { class: "download-option", onClick: _cache[1] || (_cache[1] = ($event) => $setup.downloadFrom("第三方浏览器")) }, [ vue.createElementVNode("view", { class: "option-icon" }, [ vue.createElementVNode("text", { class: "fas fa-globe" }) ]), vue.createElementVNode("view", { class: "option-content" }, [ vue.createElementVNode("view", { class: "option-title" }, "通过第三方浏览器下载"), vue.createElementVNode("view", { class: "option-desc" }, "无法确认是否存在安全隐患"), vue.createElementVNode("view", { class: "option-warning" }, "请注意安全风险") ]) ]) ]), vue.createCommentVNode(" 应用详情 "), vue.createElementVNode("view", { class: "app-details" }, [ vue.createElementVNode("view", { class: "detail-item" }, [ vue.createElementVNode("view", { class: "detail-label" }, "运营者:"), vue.createElementVNode("view", { class: "detail-value" }, "神州通誉软件") ]), vue.createElementVNode("view", { class: "detail-item" }, [ vue.createElementVNode("view", { class: "detail-label" }, "开发者:"), vue.createElementVNode("view", { class: "detail-value" }, "神州通誉软件") ]), vue.createElementVNode("view", { class: "detail-item" }, [ vue.createElementVNode("view", { class: "detail-label" }, "版本:"), vue.createElementVNode("view", { class: "detail-value" }, "1.0.0") ]) ]), vue.createCommentVNode(" 底部信息 "), vue.createElementVNode("view", { class: "footer" }, [ vue.createElementVNode("view", { class: "footer-links" }, [ vue.createElementVNode("span", { class: "footer-link" }, "权限"), vue.createElementVNode("span", { class: "footer-link" }, "隐私"), vue.createElementVNode("span", { class: "footer-link" }, "功能"), vue.createElementVNode("span", { class: "footer-link" }, "备案") ]), vue.createElementVNode("view", null, "腾讯应用宝"), vue.createElementVNode("view", null, "该服务由应用宝技术提供") ]) ]) ]); } const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["render", _sfc_render$2j], ["__scopeId", "data-v-1cf27b2a"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/pages/index/index.vue"]]); const ON_SHOW = "onShow"; const ON_HIDE = "onHide"; const ON_LOAD = "onLoad"; const ON_READY = "onReady"; const ON_PAGE_SCROLL = "onPageScroll"; const ON_REACH_BOTTOM = "onReachBottom"; const ON_PULL_DOWN_REFRESH = "onPullDownRefresh"; function formatAppLog(type2, filename, ...args) { if (uni.__log__) { uni.__log__(type2, filename, ...args); } else { console[type2].apply(console, [...args, filename]); } } function resolveEasycom(component, easycom) { return typeof component === "string" ? easycom : component; } const createLifeCycleHook = (lifecycle, flag2 = 0) => (hook, target = vue.getCurrentInstance()) => { !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); }; const onShow = /* @__PURE__ */ createLifeCycleHook( ON_SHOW, 1 | 2 /* HookFlags.PAGE */ ); const onHide = /* @__PURE__ */ createLifeCycleHook( ON_HIDE, 1 | 2 /* HookFlags.PAGE */ ); const onLoad = /* @__PURE__ */ createLifeCycleHook( ON_LOAD, 2 /* HookFlags.PAGE */ ); const onReady = /* @__PURE__ */ createLifeCycleHook( ON_READY, 2 /* HookFlags.PAGE */ ); const onPageScroll = /* @__PURE__ */ createLifeCycleHook( ON_PAGE_SCROLL, 2 /* HookFlags.PAGE */ ); const onReachBottom = /* @__PURE__ */ createLifeCycleHook( ON_REACH_BOTTOM, 2 /* HookFlags.PAGE */ ); const onPullDownRefresh = /* @__PURE__ */ createLifeCycleHook( ON_PULL_DOWN_REFRESH, 2 /* HookFlags.PAGE */ ); const fontData = [ { "font_class": "arrow-down", "unicode": "" }, { "font_class": "arrow-left", "unicode": "" }, { "font_class": "arrow-right", "unicode": "" }, { "font_class": "arrow-up", "unicode": "" }, { "font_class": "auth", "unicode": "" }, { "font_class": "auth-filled", "unicode": "" }, { "font_class": "back", "unicode": "" }, { "font_class": "bars", "unicode": "" }, { "font_class": "calendar", "unicode": "" }, { "font_class": "calendar-filled", "unicode": "" }, { "font_class": "camera", "unicode": "" }, { "font_class": "camera-filled", "unicode": "" }, { "font_class": "cart", "unicode": "" }, { "font_class": "cart-filled", "unicode": "" }, { "font_class": "chat", "unicode": "" }, { "font_class": "chat-filled", "unicode": "" }, { "font_class": "chatboxes", "unicode": "" }, { "font_class": "chatboxes-filled", "unicode": "" }, { "font_class": "chatbubble", "unicode": "" }, { "font_class": "chatbubble-filled", "unicode": "" }, { "font_class": "checkbox", "unicode": "" }, { "font_class": "checkbox-filled", "unicode": "" }, { "font_class": "checkmarkempty", "unicode": "" }, { "font_class": "circle", "unicode": "" }, { "font_class": "circle-filled", "unicode": "" }, { "font_class": "clear", "unicode": "" }, { "font_class": "close", "unicode": "" }, { "font_class": "closeempty", "unicode": "" }, { "font_class": "cloud-download", "unicode": "" }, { "font_class": "cloud-download-filled", "unicode": "" }, { "font_class": "cloud-upload", "unicode": "" }, { "font_class": "cloud-upload-filled", "unicode": "" }, { "font_class": "color", "unicode": "" }, { "font_class": "color-filled", "unicode": "" }, { "font_class": "compose", "unicode": "" }, { "font_class": "contact", "unicode": "" }, { "font_class": "contact-filled", "unicode": "" }, { "font_class": "down", "unicode": "" }, { "font_class": "bottom", "unicode": "" }, { "font_class": "download", "unicode": "" }, { "font_class": "download-filled", "unicode": "" }, { "font_class": "email", "unicode": "" }, { "font_class": "email-filled", "unicode": "" }, { "font_class": "eye", "unicode": "" }, { "font_class": "eye-filled", "unicode": "" }, { "font_class": "eye-slash", "unicode": "" }, { "font_class": "eye-slash-filled", "unicode": "" }, { "font_class": "fire", "unicode": "" }, { "font_class": "fire-filled", "unicode": "" }, { "font_class": "flag", "unicode": "" }, { "font_class": "flag-filled", "unicode": "" }, { "font_class": "folder-add", "unicode": "" }, { "font_class": "folder-add-filled", "unicode": "" }, { "font_class": "font", "unicode": "" }, { "font_class": "forward", "unicode": "" }, { "font_class": "gear", "unicode": "" }, { "font_class": "gear-filled", "unicode": "" }, { "font_class": "gift", "unicode": "" }, { "font_class": "gift-filled", "unicode": "" }, { "font_class": "hand-down", "unicode": "" }, { "font_class": "hand-down-filled", "unicode": "" }, { "font_class": "hand-up", "unicode": "" }, { "font_class": "hand-up-filled", "unicode": "" }, { "font_class": "headphones", "unicode": "" }, { "font_class": "heart", "unicode": "" }, { "font_class": "heart-filled", "unicode": "" }, { "font_class": "help", "unicode": "" }, { "font_class": "help-filled", "unicode": "" }, { "font_class": "home", "unicode": "" }, { "font_class": "home-filled", "unicode": "" }, { "font_class": "image", "unicode": "" }, { "font_class": "image-filled", "unicode": "" }, { "font_class": "images", "unicode": "" }, { "font_class": "images-filled", "unicode": "" }, { "font_class": "info", "unicode": "" }, { "font_class": "info-filled", "unicode": "" }, { "font_class": "left", "unicode": "" }, { "font_class": "link", "unicode": "" }, { "font_class": "list", "unicode": "" }, { "font_class": "location", "unicode": "" }, { "font_class": "location-filled", "unicode": "" }, { "font_class": "locked", "unicode": "" }, { "font_class": "locked-filled", "unicode": "" }, { "font_class": "loop", "unicode": "" }, { "font_class": "mail-open", "unicode": "" }, { "font_class": "mail-open-filled", "unicode": "" }, { "font_class": "map", "unicode": "" }, { "font_class": "map-filled", "unicode": "" }, { "font_class": "map-pin", "unicode": "" }, { "font_class": "map-pin-ellipse", "unicode": "" }, { "font_class": "medal", "unicode": "" }, { "font_class": "medal-filled", "unicode": "" }, { "font_class": "mic", "unicode": "" }, { "font_class": "mic-filled", "unicode": "" }, { "font_class": "micoff", "unicode": "" }, { "font_class": "micoff-filled", "unicode": "" }, { "font_class": "minus", "unicode": "" }, { "font_class": "minus-filled", "unicode": "" }, { "font_class": "more", "unicode": "" }, { "font_class": "more-filled", "unicode": "" }, { "font_class": "navigate", "unicode": "" }, { "font_class": "navigate-filled", "unicode": "" }, { "font_class": "notification", "unicode": "" }, { "font_class": "notification-filled", "unicode": "" }, { "font_class": "paperclip", "unicode": "" }, { "font_class": "paperplane", "unicode": "" }, { "font_class": "paperplane-filled", "unicode": "" }, { "font_class": "person", "unicode": "" }, { "font_class": "person-filled", "unicode": "" }, { "font_class": "personadd", "unicode": "" }, { "font_class": "personadd-filled", "unicode": "" }, { "font_class": "personadd-filled-copy", "unicode": "" }, { "font_class": "phone", "unicode": "" }, { "font_class": "phone-filled", "unicode": "" }, { "font_class": "plus", "unicode": "" }, { "font_class": "plus-filled", "unicode": "" }, { "font_class": "plusempty", "unicode": "" }, { "font_class": "pulldown", "unicode": "" }, { "font_class": "pyq", "unicode": "" }, { "font_class": "qq", "unicode": "" }, { "font_class": "redo", "unicode": "" }, { "font_class": "redo-filled", "unicode": "" }, { "font_class": "refresh", "unicode": "" }, { "font_class": "refresh-filled", "unicode": "" }, { "font_class": "refreshempty", "unicode": "" }, { "font_class": "reload", "unicode": "" }, { "font_class": "right", "unicode": "" }, { "font_class": "scan", "unicode": "" }, { "font_class": "search", "unicode": "" }, { "font_class": "settings", "unicode": "" }, { "font_class": "settings-filled", "unicode": "" }, { "font_class": "shop", "unicode": "" }, { "font_class": "shop-filled", "unicode": "" }, { "font_class": "smallcircle", "unicode": "" }, { "font_class": "smallcircle-filled", "unicode": "" }, { "font_class": "sound", "unicode": "" }, { "font_class": "sound-filled", "unicode": "" }, { "font_class": "spinner-cycle", "unicode": "" }, { "font_class": "staff", "unicode": "" }, { "font_class": "staff-filled", "unicode": "" }, { "font_class": "star", "unicode": "" }, { "font_class": "star-filled", "unicode": "" }, { "font_class": "starhalf", "unicode": "" }, { "font_class": "trash", "unicode": "" }, { "font_class": "trash-filled", "unicode": "" }, { "font_class": "tune", "unicode": "" }, { "font_class": "tune-filled", "unicode": "" }, { "font_class": "undo", "unicode": "" }, { "font_class": "undo-filled", "unicode": "" }, { "font_class": "up", "unicode": "" }, { "font_class": "top", "unicode": "" }, { "font_class": "upload", "unicode": "" }, { "font_class": "upload-filled", "unicode": "" }, { "font_class": "videocam", "unicode": "" }, { "font_class": "videocam-filled", "unicode": "" }, { "font_class": "vip", "unicode": "" }, { "font_class": "vip-filled", "unicode": "" }, { "font_class": "wallet", "unicode": "" }, { "font_class": "wallet-filled", "unicode": "" }, { "font_class": "weibo", "unicode": "" }, { "font_class": "weixin", "unicode": "" } ]; const getVal = (val) => { const reg = /^[0-9]*$/g; return typeof val === "number" || reg.test(val) ? val + "px" : val; }; const _sfc_main$2j = { name: "UniIcons", emits: ["click"], props: { type: { type: String, default: "" }, color: { type: String, default: "#333333" }, size: { type: [Number, String], default: 16 }, customPrefix: { type: String, default: "" }, fontFamily: { type: String, default: "" } }, data() { return { icons: fontData }; }, computed: { unicode() { let code2 = this.icons.find((v2) => v2.font_class === this.type); if (code2) { return code2.unicode; } return ""; }, iconSize() { return getVal(this.size); }, styleObj() { if (this.fontFamily !== "") { return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`; } return `color: ${this.color}; font-size: ${this.iconSize};`; } }, methods: { _onClick(e2) { this.$emit("click", e2); } } }; function _sfc_render$2i(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "text", { style: vue.normalizeStyle($options.styleObj), class: vue.normalizeClass(["uni-icons", ["uniui-" + $props.type, $props.customPrefix, $props.customPrefix ? $props.type : ""]]), onClick: _cache[0] || (_cache[0] = (...args) => $options._onClick && $options._onClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$g = /* @__PURE__ */ _export_sfc(_sfc_main$2j, [["render", _sfc_render$2i], ["__scopeId", "data-v-d31e1c47"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uni-icons/components/uni-icons/uni-icons.vue"]]); function useToast() { const tipTitle = vue.ref(""); const tipIcon = vue.ref("none"); const tipEndtime = vue.ref(2e3); function Toast2(opt, to_url) { formatAppLog("log", "at hooks/useToast.js:31", "Toast", opt, to_url); if (typeof opt == "string") { to_url = opt; opt = {}; } tipTitle.value = opt.title || ""; tipIcon.value = opt.icon || "none"; tipEndtime.value = opt.endtime || 1e3; let success = opt.success; if (tipTitle.value) uni.showToast({ title: tipTitle.value, icon: tipIcon.value, duration: tipEndtime.value, success }); if (to_url != void 0) { if (typeof to_url == "object") { let tab = to_url.tab || 1, url2 = to_url.url || ""; formatAppLog("log", "at hooks/useToast.js:59", "tab", tab); switch (tab) { case 1: setTimeout(() => uni.switchTab({ url: url2 }), tipEndtime.value); break; case 2: setTimeout(() => uni.navigateTo({ url: url2 }), tipEndtime.value); break; case 3: setTimeout(() => { uni.navigateBack({ delta: 1 }); }, tipEndtime.value); break; case 4: setTimeout(() => uni.reLaunch({ url: url2 }), tipEndtime.value); break; case 5: setTimeout(() => uni.redirectTo({ url: url2 }), tipEndtime.value); break; } } else if (typeof to_url == "function") { setTimeout(() => to_url && to_url(), tipEndtime.value); } else { setTimeout( () => uni.navigateTo({ url: to_url }), tipTitle.value ? tipEndtime.value : 0 ); } } } return { tipTitle, tipIcon, tipEndtime, Toast: Toast2 }; } let domain = "http://192.168.100.199:8081"; const HTTP_REQUEST_URL = domain; const HEADER = { "content-type": "application/json" }; const HEADERPARAMS = { "content-type": "application/x-www-form-urlencoded" }; function baseRequest(url2, method, data, { noAuth = false, noVerify = false }, params2) { const { Toast: Toast2 } = useToast(); let Url = HTTP_REQUEST_URL, header = HEADER; if (params2 != void 0) { header = HEADERPARAMS; } return new Promise((reslove, reject) => { Url = HTTP_REQUEST_URL; uni.request({ url: Url + "/api/front/" + url2, method: method || "GET", header, timeout: 3e4, data: data || {}, success: (res) => { if (noVerify) reslove(res.data, res); else if (res.data.code == 200) reslove(res.data, res); else if ([41e4, 410001, 410002, 401].indexOf(res.data.code) !== -1) { reject(res.data); } else Toast2({ title: res.data.message || "系统错误" }); reject(res.data.message || "系统错误"); }, fail: (msg) => { Toast2({ title: "请求失败" }); reject("请求失败"); } }); }); } const request = {}; ["options", "get", "post", "put", "head", "delete", "trace", "connect"].forEach( (method) => { request[method] = (api, data, opt, params2) => baseRequest(api, method, data, opt || {}, params2); } ); function getGoodDetailId(data) { return request.get(`book/detail/${data}`); } function getArticleDetailId(data) { return request.get(`product/detail/${data}`); } const zStatic = { base64Arrow: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAD1BMVEVHcExRUVFMTExRUVFRUVE9CdWsAAAABHRSTlMAjjrY9ZnUjwAAAQFJREFUWMPt2MsNgzAMgGEEE1B1gKJmAIRYoCH7z9RCXrabh33iYktcIv35EEg5ZBh07pvxJU6MFSPOSRnjnBUjUsaciRUjMsb4xIoRCWNiYsUInzE5sWKEyxiYWDbyefqHx1zIeiYTk7mQYziTYecxHvEJjwmIT3hMQELCYSISEg4TkZj0mYTEpM8kJCU9JiMp6TEZyUmbAUhO2gxAQNJiIAKSFgMRmNQZhMCkziAEJTUGIyipMRjBSZkhCE7KDEFIUmTeGCHJxWz0zXaE0GTCG8ZFtEaS347r/1fe11YyHYVfubxayfjoHmc0YYwmmmiiiSaaaKLJ7ckyz5ve+dw3Xw2emdwm9xSbAAAAAElFTkSuQmCC", base64ArrowWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEVHcEz///////////////////+IGTx/AAAABnRSTlMA/dAkXZOhASU/AAABYElEQVRYw+2YwXLCIBCGsdAHWGbyAKZ4zxi9O017rxLf/1UaWFAgA1m8dcpedNSPf/l/Vh0Ya/Wn6hN0JcGvoCqRM4C8VBFiDwBqqNuJKV0rAnCgy3AUqZE57x0iqTL8Br4U3WBf/YWaIlTKfAcELU/h9w72CSVPa3C3OCDvhpHbRp/s2vq4fHhCeiCl2A3m4Qd71DQR257mFBlMcTlbFnFWzNtHxewYEfSiaLS4el8d8nyhmKJd1CF4eOS0keLMAuSxubLBIeIGQW8YHCFFo7EH9+YDcQt9FMZEswTheaNxTHwHT8SZorJjMrEVwo4Zo0U8HSEyZvJMOg4RjnmmRr8nDYeIz3OMkbfE/QhBo+U9RnZJxjGCRh/WKmHEMWLNkfPKsGh/CWJk1JjG0kcuJggTt34VDP8aWAFhp4nybVb5+9qQhjSkIQ1pSEMa8k+Q5U9rV3dF8MpFBK+/7miVq1/HZ2qmo9D+pAAAAABJRU5ErkJggg==", base64Flower: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAKlBMVEVHcEzDw8Ovr6+pqamUlJTCwsKenp61tbWxsbGysrLNzc2bm5u5ubmjo6MpovhuAAAACnRSTlMA/P79/sHDhiZS0DxZowAABBBJREFUWMPtl89rE0EUx7ctTXatB3MI1SWnDbUKPUgXqh4ED8Uf7KUVSm3ooVSpSii0Fn/gD4j4o+APiEoVmos9FO2celiqZVgwgaKHPQiCCkv+F99kM7Ozm5kxq1dfD91k9pPve9/3ZjbRNHHok/mKli4eIPNgSuRObuN9SqSEzM20iGnm0yIbqCuV7NSSSIV7uyPM6JMBYdeTOanh/QihJYZsUCSby+VkMj2AvOt0rAeQAwqE3lfKMZVlQCZk1QOCKkkVPadITCfIRNKxfoJI5+0OIFtJx14CMSg1mRSDko7VAfksRQzEbGYqxOJcVTWMCH2I1/IACNW0PWU2M8cmAVHtnH5mM1VRWtwKZjOd5JbF6s1IbaYqaotjNlPHgDAnlAizubTR6ovMYn052g/U5qcmOpi0WL8xTS/3IfSet5m8MEr5ajjF5le6dq/OJpobrdY0t3i9QgefWrxW9/1BLhk0E9m8FeUMhhXal499iD0eQRfDF+ts/tttORRerfp+oV7f4xJj82iUYm1Yzod+ZQEAlS/8mMBwKebVmCVp1f0JLS6zKd17+iwRKTARVg2SHtz3iEbBH+Q+U28zW2Jiza8Tjb1YFoYZMsJyjDqp3M9XBQdSdPLFdxEpvOB37JrHcmR/y9+LgoTlCFGZEa2sc6d4PGlweEa2JSVPoVm+IfGG3ZL037iV9oH+P+Jxc4HGVflNq1M0pivao/EopO4b/ojVCP9GjmiXOeS0DOn1o/iiccT4ORnyvBGF3yUywkQajW4Ti0SGuiy/wVSg/L8w+X/8Q+hvUx8Xd90z4oV5a1i88MbFWHz0WZZ1UrTwBGPX3Rat9AFiXRMRjoMdIdJLEOt2h7jrYOzgOamKZSWSNspOS0X8SAqRYmxRL7sg4eLzYmNehcxh3uoyud/BH2Udux4ywxFTc1xC7Mgf4vMhc5S+kSH3Y7yj+qpwIWSoPTVCOOPVthGx9FbGqrwFw6wSFxJr+17zeKcztt3u+2roAEVgUjDd+AHGuxHy2rZHaa8JMkTHEeyi85ANPO9j9BVuBRD2FY5LDMo/Sz/2hReqGIs/KiFin+CsPsYO/yvM3jL2vE8EbX7/Bf8ejtr2GLN65bioAdgLd8Bis/mD5GmP2qeqyo2ZwQEOtAjRIDH7mBKpUcMoApbZJ5UIxkEwxyMZyMxW/uKFvHCFR3SSmerHyDNQ2dF4JG6zIMpBgLfjSF9x1D6smFcYnGApjmSLICO3ecCDWrQ48geba9DI3STy2i7ax6WIB62fSyIZIiO3GFQqSURp8wCo7GhJBGwuSovJBNjb7kT6FPVnIa9qJ2Ko+l9mefGIdinaMp0yC1URYiwsdfNE45EuA5Cx9EhalfvN5s+UyItm81vaB3p4joniN+SCP7Qc1hblAAAAAElFTkSuQmCC", base64FlowerWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEX///9HcEz///////////////84chYNAAAABnRSTlP/AGzCOYZj5g1nAAACfklEQVRYw+2YTVPDIBCGtza9Jw25a0bvcax30o73OOr//yvma2F3YWlpPTijXNpAHrK8LLALVPFium2vNIFSbwGKTGQA2GUiHcD29yDNy3sMIdUBQl7r2H8mOEVqAHgPkYZUS6Qc2zYhQqtjyDZEximCZwWZLIBeIgYShs2NzxKpSUehYpMJhURGb+O+w5BpMCAREKPnCDHbIY20SzhM5yxziAXpOiBXydrekT9i5XDEq4NIIHHgyU5mRGqviII4mREJJA4QJzMiILwlRJzpKxJKvCBm8OsBBbLux0tsPl4RKYm5aPu6jw1U4mGxEUR9g8M1PcqBEp/WJliNgYOXueBzS4jZSIcgY5lCtevgDSgyzE+rAfuOTQMq0yzvoGH18qju27Mayzs4fPyMziCx81NJa5RNfW7vPYK9KOfDiVkBxFHG8hAj9txuoBuSWORsFfkpBf7xKFLSeaOefEojh5jz22DJEqMP8fUyaKdQx+RnG+yXMpe8Aars8ueR1pVH/bW3FyyvPRw90upLDHwpgBDtg4aUBNkxRLXMAi03IhcZtr1m+FeI/O/JNyDmmL1djLOauSlNflBpW18RQ2bPqXI22MXXEk75KRHTnkPkYbESbdKP2ZFk0r5sIwffAjy1lx+vx7NLjB6/E7Jfv5ERKhzpN0w8IDE8IGFDv5dhz10s7GFiXRZcUeLCEG5P5nDq9k4PFDcoMpE3GY4OuxuCXhmuyNB6k0RsLIAvqp9NE5r8ZCSS8gxnUp7ODdYhZTqxuiJ9uyJJtPmpqJ7wVj+XVieS903iViHziqAhchLEJAyb7jWU647EpUofQ0ziUuXXXhDddtlllSwjgSQu7r4BRWhQqfDPMVwAAAAASUVORK5CYII=", base64Success: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAElBMVEVRUVFHcExTU1NRUVFRUVFRUVFOSlSUAAAABnRSTlP/AI6+VySB3ZENAAACcElEQVRYw+2YyYKCMAyGI8hdpdxdZu7gcpdZ7jL6/s8yYheSNi0aPdqbwOffpGmaFOYPD3gj4bisN7vddv17N/JVgxn5x12IWgIaWTuO/IE3PseQbwjGPo2cgRmHFLJwdm/X643zwiqOKPPJ1nj3sjEP2iiifZWj5bhopSyGaEO2HX5fbQJzwJ+W7x/jw5ZFjsEU0PMph9xE8i5EqprKALW95eJQURkgzw98uJ/JvwGecR7bIjWWsUgVrrIfFZ2HlLy3sKETD1mmRLRMRhGVssRa0xJkdn3SpJBymBkM8+pSSDXMDNyDaToVHd2fgpNt0sjwiUZO19+jGQ+gQEg9Oq+bufmAVGihomNmjQG7UG3020vrlm7lkFnKFGU3kZ0KGAdmKe821pipQ+qEKcrZeTL2g5FsUks4cStjEZWwXg0b0n4GxmEpkWwIs5VBynjgK7xZaz1/0D7OxkVuLpsY5BQNFyLS84VBjjbg0iL2r2EQHBOxBhikuUOkdxODVF1cxHoWtPPsiyXO455Iv34hssCO8EV4ZIYTjS8SR4qYSHRiTiYQ4ZFbHi0iIhhBTi6dTCgSWRcnw4h4yGTuyTAiOGBIWGoZTgSHJQl+LcOJ4OCnW6yX2bMnJ9pidCOXtkTkTrIGpYuOynAiOF14SamMiOCk5Ke+mq8BcOrrvym8d0zKIQnWT+M1WwOQNO4fFiWb18hhERxJPx2fblbPHHyC41VyiAtKBUFBIih7JMWVoIQTFIr3lKPN80WvoLSWFPC653ioTZA0I0FrQ7qU6asaK0H7JmkSJa2ooOGVtNUsc3j9FYHkIkJy3SG6VHnfXKXGP9t4N9Q4Ye98AAAAAElFTkSuQmCC", base64SuccessWhite: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkBAMAAACCzIhnAAAAGFBMVEVHcEz///////////////////////////8dS1W+AAAAB3RSTlMAiVYk6KvDHLfaegAAAo1JREFUWMPtWEtzmzAQNhCTq910ytXpiyvxTNOr60zrayepx9d02gnX4sTm7xcEiJX2gdnkGJ1A4tOnfWqXyeR1vMRYzrcPD9v5h5MBl3/Ldvx4cxIg/FWC8X0xjLjalM54uhhCfCrRuJURX0pi3EmIqZV7O59vrRZmguStHL9b7S7ftfLwOtiZDw7AHMtmquAQ12b5Wwbnordm8g9zLLO49qc/m2n6aKnhwPOGZ08hAiNHhheiHae1lOUPGZpQkPKa3q0mOUjaRzSRaGUjpy/mmWSwySSpllcEteBKAT52KEnSbblA51pJEPxBQoiH1FP4E3s5+FJv07h6/ylD6ui7B+9fq/ehrFB98ghec9EoVtyjK8pqCHLmCBOwMWSCeWFNN4MbPAk55NhsvoFHSSVR0k5TCTTEzlUGcqV/nVp7n9oIVkmtaqbAEqEgfdgHJPwsEAyZ9r4VAZXFjpEwyaw3+H2v42KYxKhs1XvY/gSSGv+IHyUSuHXCeZhLAgVI3EjgSGo1Fb3xO0tGGU9S2/KAIbtjxpJASG73qox6w5LUq0cEOa+iIONIWIilQSQ0pPa2jgaRQAgQP7c0mITRWGxpMAmEQFN2NAQJNCV0mI6GIIEO47hlQ0ORQLd0nL+hoUjg1m6I1TRr8uYEAriBHLcVFQ5UEMiBe3XkTBEG04WXlGKGxPnMS305XQPA1Ocn2JiuAZwE66fxnKwBnDTuXxZTMq85lwW6kt5ndLqZPefiU1yvmktcUSooChJF2aMprhQlnKJQ5FxRKkcVRa+itNYU8Io2oVkY14w0NMWYlqft91Bj9VHq+ca3b43BxjWJmla0sfKohlfTVpPN+93L/yLQ/IjQ/O5Q/VR5HdL4D7mlxmjwVdELAAAAAElFTkSuQmCC", base64Empty: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAALeGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0LTAxLTEzVDE5OjA5OjQwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wMS0xM1QxOTowOTo0MCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ZWQwMWYzNWQtOWRjOC00MDBiLWEyMmQtNjM5OGZiNzVhNGRiIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6ZDhlMzQ3ZmEtMDY2My1jYTRiLTgzNTctNTk4YjBkNGIzOTU2IiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjMwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjMwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBzdEV2dDp3aGVuPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNjg2NzJkLWY5NDMtOTU0Mi1iMDBiLTVlMDExNmE1NmIzZSIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxMDoyNjoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDphYmJkZmUyZC0xY2Q2LTJiNDgtYjUyNS05YzlhZjdlNjA4NDMiIHN0RXZ0OndoZW49IjIwMjQtMDEtMTNUMTE6MjM6NDArMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YTQ5MjM5MDAtNDhiZC03YTQ1LWI4NGItYmVlZTVjOWUxYTM1IiBzdEV2dDp3aGVuPSIyMDI0LTAxLTEzVDExOjIzOjQwKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmVkMDFmMzVkLTlkYzgtNDAwYi1hMjJkLTYzOThmYjc1YTRkYiIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxOTowOTo0MCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmFiYmRmZTJkLTFjZDYtMmI0OC1iNTI1LTljOWFmN2U2MDg0MyIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjM2ZGQ4NTQxLWQ0MWEtYmY0Yy1iZjA3LWNmNjZhNjZhMDg2MSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmQwODAyODAyLTM1MmEtODU0YS05MWI3LTZkZTZkNTJlYjNkMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pm30U/gAAAAJcEhZcwAALiMAAC4jAXilP3YAAAA/UExURUdwTODg4O3t7e7u7unp6d7e3uTk5M/Pz8nJyePj4+jo6Pj4+MrKyszMzO7u7unp6fb29vLy8vr6+v7+/sHBweag3xAAAAAOdFJOUwAxia5pF0n+/vzX3KbULQ2DYQAACG1JREFUeNrtm4l2o7gShi20IWFrAd7/WUc7EosDWKZ976Hc7WTmdMKXv0qlqpLyeNx222233Xbbbbfddtv/mOHn8xexSNsiRH5PrbFtW4p+DetpsF4v8Gs+HA3WEwOAfwzriYxaLTVsP8X1QK0z+vqQCzewYogi60aL9SEX5oyxphYVCFTGjfSJCTmN1jBruN5KTGCUS8bhySQGHRaohmW4glwtldbOeYJYKlgvbyUuA8aFFEKc++aIM4hrRnyiMnIZKq1PrihcM3GNKboMF1Naa9X9+8T1KrxIlVbGjv3cAEHOYYMqqgUsVuJqqehV3+sjDwB+DTJp0lYtMCyZpxqjF4e+74+sRcQSFZO8UonUSEFzuUY+DKo59A2kZDatGCjzCauy/2AmhSyCq0WHEj0KTNJDmVeNhErMt1Q8W4xti4/FwMJ4jaxl05TKFiNtD3kBGrHnhiph9V0eXQc6DkyE2xX830AlKshFTErXeuCZXK/9m41wFsGSfZ4lcGeyZ98PrylJ7MWCojQZ3qSukL2QslgdngqJnTEPdTJhXvbNBoR/+7wabIxWduN/Ja5dWEivm4XSZ2uQckNzmRlHrn2lc6eiafvS4V2Hd12tesau8toZW0CtWoZYb9t+OqxdCYKYjVPF16pVbILIy/gR7MVaWMHYPCoa2VkzkX4Iry2rirXbumGyAjGC1h62YLw6ApsNKZph3fpIWHt08JovRWD62sejpXhTrhWrPpl6zZ6PW2oTG5ltlvgtF6weNYCWKeJJSfg4W6PNJlj3sVZgOXV4lc8n4RlkMTLEBDVoYc3nI09kpyzzfgWsjyzBZSNDKF2/wjh+sxYvn8Y1scxlfLF9T1RBO3wVHsnq8Fk4oGkEh/0KJPSa8T2CeWE5X9BPmgLsaRIGeNL2kshCsWoLBmdPJW5Wbz1ndAKUXjPwxXYAUpSV3fy5BJg1aa1tyVXHHMgVH31ewDVrleHr9XqC684SUF4mecR3+wW5SC2QNvxUizRv98mLDhPgYiMDb+v8g0OADxqxcnf9w01mZYJF0fUVP5LcdswbsMmy1DVs5PlE5NpNiTR8M8qAWZkOy6aN13VcoOF2/s3xn3Mes8Xza05tgR/BuNz69nlNzMR0fH45p+G4R9oxh2mKt9MF4J7K/lvWUojwF5nCgCpuRUptnZMQ3au0nSo2UsHgV3xpmeLYzGml3ZFBBzYGPCpOQRwXs1/GG1J74dlZc6JKUOtjBAz9XjVxucGWHbZVJDPJQGYDRl1Qmf1ovk2Sbghb6MQlnF7mBzM1bgOqJAPpoOQaVe+4Skcit3uqHMyG/Sh1rHNN0gAfM0nnPrmulfLVBSm20TSZSdWa0LJl2ukVyE4vTYCgP3uQkwv1TKtQWgxDzBSg80OQjCs4klKvuUzHLCfIbDKIE/S5VIGqD1iD2819pkAqTWdmeina+oZABi7X5B1MGoTJqJSchuk6JNHcgUPAcsVFk0+N0oDN68Vo7FQSmCXjx46OEtUk1lpY2ZFQGr/AcpqVato4wPUD+RhfAeyQI5sJ6l2sDwnKqNFSJvpiyJbFl3kTOjZ2ievwCR7hkUoWeV2vOLAXvB39AJoyqYa81A5cvaAidXYTFTycKDBcalVK5f3XS89kzLVl9txfL+K+p6NUnitz5KkKm7D3DrRPNq4bk7l20aFRppNilmuQI+uzTtj9wPBkTsVwM7HbJ5pwGgujyRyZDzQLNoiRFluRtQ+GzEguqRxUL+ZMFqulMzIfaP3ARj2k/txB8c+2HyjmDizCaVWtNoE5MvMlKs/4VQ7HUJZCrU6qCKcNJ2aSWUZhJZu4VI0LB4CHFdj77DRuGi28WKAxoRyZyzGVrmc0jmk1nP5QaxZo1puqq1YIAqgZb8e/rABZJWNCNxV7DSTpOO7Aail9J9nYHtua/4ouE/aS0X1qtXQzwGx+rnbi2vhF/TfZG52oc6DPo1WCi3RTDnRk7TEntoEp38gg+DjYs2opkR3JW5EpL9rU0XSK5/6LOTAVS+72x7pm60zSf5HMdldjhzJqw1FRcxXdS3ZNZp0s92FiyluUvBPoD9ynZNkBiu2NF11ofnlnQbZgKqvusj9R/f6DOzgVsahbNlXxlsxU8y7qrbTupitRyxFBKG6H3aEPUqj7YrzAymq41FXlZLlO4WLbvG2Kg4vYB+wPfWS2B5Rq8TW9ROpAZbiF6MmCTsx1NLLsx7NOoOiZup2CNbZ36xc96ErcxzuILGrmmFhimjtwKo/yTm7feTVwB61IzbnW4967Kt3cDDotGt8JKrTiUyO3Uy2PZZt9tapXEfXhWmTgcoB+JchFWsiCKvYnhmn/tKuJDbgly897FnFfkE1rQLKy810OU7xW3bEJHCD5gERtuTGuxoJqA6qI9TNMa6MbvZomsiubbPYx78YXDaaRqqsyqfSaLZdjYGHLu65rDgydXCWm1P5EvcQ828f9pcBapTILSMv1nZCAc0WzFIFsGfUi/kmAxc6cFqDSYuPSMIbs1OVrwITTQM9HVRFJ5JL56qcoFzzT1uVcd2v9jFw8BHlcWtmEI86hp5Dy/zOlK8cUp/rVseRUBqawz6kmAcPLM9l5m8h4V53Iz/2mFJaTCvF8JbsMvPjU/7crbUXart0v4WyE0LnDPcAX95Knj4VUE8HCdNdUP8BDcOXKdPl4uSWbh4LfOV0HDdfipOmu+eIRrDsNPkIT7np/8ZAzVdOd1u8wHIqeXt8VqtgiO50ePeNaGG+uO9rHiKdL71pnIun8jxEKXv2r2HYBzO/mz96vFKoMM5WLk7tQXS9U5kwCu5lk7n6++kdCFWRaTUzm0/5fClWGWTrM/AGhCrJO/ZBQhTPFLwmV7ebgcdttt91222233Xbbbf+H9h+2WEtdHVinLAAAAABJRU5ErkJggg==", base64Error: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAMAAAAL34HQAAALeGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgNzkuMTY0NDg4LCAyMDIwLzA3LzEwLTIyOjA2OjUzICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmVudCMiIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpwaG90b3Nob3A9Imh0dHA6Ly9ucy5hZG9iZS5jb20vcGhvdG9zaG9wLzEuMC8iIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIiB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDI0LTAxLTEzVDE5OjEwOjEwKzA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyNC0wMS0xM1QxOToxMDoxMCswODowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTQ3NTExNjAtZDY5MC00ZTkzLWFhNGUtNGMwYTViNGU1ZGFjIiB4bXBNTTpEb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRiNzlkYWMtZTJmYS1iNzQ0LWIxM2ItOWU1N2VjMDhhM2YwIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHRpZmY6T3JpZW50YXRpb249IjEiIHRpZmY6WFJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6WVJlc29sdXRpb249IjMwMDAwMDAvMTAwMDAiIHRpZmY6UmVzb2x1dGlvblVuaXQ9IjIiIGV4aWY6Q29sb3JTcGFjZT0iMSIgZXhpZjpQaXhlbFhEaW1lbnNpb249IjMwMCIgZXhpZjpQaXhlbFlEaW1lbnNpb249IjMwMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZDA4MDI4MDItMzUyYS04NTRhLTkxYjctNmRlNmQ1MmViM2QwIiBzdEV2dDp3aGVuPSIyMDIyLTAyLTIyVDIxOjIxOjQ1KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjQwNjg2NzJkLWY5NDMtOTU0Mi1iMDBiLTVlMDExNmE1NmIzZSIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxMDoyNjoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDpjZjk1NTE1OC04MjFiLTA4NDUtYWJmNS05YTE1NGM1ZTY4NjEiIHN0RXZ0OndoZW49IjIwMjQtMDEtMTNUMTE6MDQ6MDQrMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY29udmVydGVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJmcm9tIGFwcGxpY2F0aW9uL3ZuZC5hZG9iZS5waG90b3Nob3AgdG8gaW1hZ2UvcG5nIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJkZXJpdmVkIiBzdEV2dDpwYXJhbWV0ZXJzPSJjb252ZXJ0ZWQgZnJvbSBhcHBsaWNhdGlvbi92bmQuYWRvYmUucGhvdG9zaG9wIHRvIGltYWdlL3BuZyIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZGM1Y2IyNWItZDZlNC0yZjQ2LTgyODQtZmUwOTNlY2M2ZTkxIiBzdEV2dDp3aGVuPSIyMDI0LTAxLTEzVDExOjA0OjA0KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPHJkZjpsaSBzdEV2dDphY3Rpb249InNhdmVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjE0NzUxMTYwLWQ2OTAtNGU5My1hYTRlLTRjMGE1YjRlNWRhYyIgc3RFdnQ6d2hlbj0iMjAyNC0wMS0xM1QxOToxMDoxMCswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIyLjAgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOmNmOTU1MTU4LTgyMWItMDg0NS1hYmY1LTlhMTU0YzVlNjg2MSIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjM2ZGQ4NTQxLWQ0MWEtYmY0Yy1iZjA3LWNmNjZhNjZhMDg2MSIgc3RSZWY6b3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmQwODAyODAyLTM1MmEtODU0YS05MWI3LTZkZTZkNTJlYjNkMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Ph2LDQsAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA5UExURUdwTNra2s7Ozq2tre3t7dPT087OzuPj4+3t7dbW1u/v79bW1vz8/MrKytDQ0Nzc3MPDw/X19bi4uMZQDnEAAAAKdFJOUwBqEPywotz+wzqApqiTAAAHW0lEQVR42u1b25akIAwcbx2UFoj//7HLTQVBRcSZfTDnbM/uTl/KSlEkwf75eeONN95444033njjjTduR9/0/yOsbqoevObL7101tYX1HFs9QFtfZalRP+rpQVgdAFx990ZnT8L6eZItUl99jeGpf1DxdV/VP9fV1f/PFlF1bYHoVFSRC60IyVjrFRnuB8IoxpExSrstsErKHpJw1eqybNLbAQvAYkKjUrjoBgKRqAaeIjG5+qaps6hKcMWmcdSwqAJWBbAgCZZaIYbsqggqqlHNbFFa5yVR4jKvrKEErOEjNCqNSwHrfE8lpLsod/u+cOPPMPBJ+Gz5dM0cXNgclre+pSxhYI1WW5Tf9ENSMIdLCiWs6q9hwQprBVYKFqyPlx4WtoSvrT9lC/wkGt8qlkQooC3hi6sgW3Bb8gtdpSV/za/mn49pC0oYhONbfyd5hzDLFivKFpTS1gKM0we0tQCEncfgQn7Rt+DC/299i1MSRJcBC0r7VviG5KZvwV5WIUobxHyrJKy8VRjXVgFYsPu5kOtbxdhycCDuihziXVLoW7xwEiUmDgd544B46luWLW+nugMLB2BimmC3cxTNxCDg8xFtuUSNqoFsDKzY8psa+XtBNWXr74N6qxwsS5T6VL5robKl10+ZRu5S9qBvUYuJwVHzjwjrE3G33qKh+WXBgmkmCvHYquTvZ8oo7rLFA4PJgYW0MdePIRQIGUPNbSMw5lubJMKtJI6+Wk6cVFMmACO+VVryeL7ZgI8MhwS2fnNPPK0geHBRd11eJSiyL4KjrL2umm1XIpRii1MKB/mU/iCZwF+pt5z3UJ7UiF3nQqadAXC3T3xEW2IyuDBe3yDTe0+A64it2WTyYSGVHymUI/EduvSWKJ80Dtv2NbYSoQxbMkVC7yzNGIWFvDF7gRD79RYrWW/BDGti4wwLtgvO7gWKUZ8Mt94qX8vLJE70+xVNwzDm9ghNM+FX7p/jlZUId2HJD+Tf79hMe3WNrAK/30E+C8/6xOCqbqxE5JNMYrNbnaLUvJAewfCg8zF0Ba/tbviWLvPYfsGFA1PVD8ZdnjlVc/DS/o7LK4NHjOjKKbfCTSCo5XmwKbaZM4jlc9NGEYd9Ijd0QS5ZGaOR2O+DPlGyRb2nXZzgnI1GdFWF+0gh3ifyTRqvzpXI2eElk58FeHziCF5hY+hSMV9Ge/mohUTGuQ4vzHYe8bW5sNdFQ58St22Vcf5zzJbtcGT4iYQ7iz8dFuxoWRYMjAM7KCnypHOTLSqdUwYIFpndOD/6B2FBzNQxYmW/zxYE4j8yLHga1s2Rbm/O5PXtGcuNDIW1dTj5hpjGsO+7z2Kk9NP1JWDlnWKAM4H6zCUNM05KyVPHBclYzUbgjE3N3tP2JWHBmbqD4GLeCs2jhMT13lMVljwcEbetwZgtHUxVQ21ho3fE7inf2s8vzMWq0EWpfOBg5hcDSGwaF2+LaysRIzNFqRgBv2sMhi/Ix0WiW8rBKNBv4ExBI7eorx9ANazsPCb5FkSNH+Reacos+AYxaFzX76KMH65c8ytzZ40YvpFAqtgC/otn1eCmMI5K8yVRQVVwq3aVtU+jJktwjyP7x+BKv8vtoH098vXYSJcrWGJcAW11r8WVRxe5vgcuFbXqwnaEZejS6mrLwYKUg1ch2RJswTFYgMOwoau+AQsSp/FuDhVZi7J402ifgGla/GJIzGLYG5H4rnKMCUydL9wcsmZSuPikR2QmjQbWqaV2ob2RdMvaLEvFlRiXpYeTwqVOtMZF+qi0dS4uEjJKMvWuYK3S0jHZwaq7BylYp/O2uu3q04lNqudLWEJQd/3paTBz12IaLIPtzE5P1AUuW9TB8NVzaG9/TIfV+eXsWeezz6HWlptEbo4SIAeWur/Y/RZC/gmZTiLzUY2j5ct6fjKsFvxqgyQxE9sbmfYtnJMIciEKo6+FL0wziJmtkzspIcUl0PgWrL7VCKP7hl61U4WLeN+7Ieli2vZhmq0VgjDOgIyhJ62sSpDkWNZa1wiB8WoLlxzy29XpGVPgn1ut5VYcGyRLK7OCiJaDYMrAneJUkZWdw0yDgNm5nDowqLc0Kp581FO7QS4pC9S/YRW9xkVdNOj0ZHCp9anEZw3VEK/fopiDrkMObkcdJtT1g6+uzQ60bIdUPztdWZWy53m+v/zFYPOGHO4AZsalmtJNkyHrCAx1RXX7mt5g1L1pDezpkXv8wJwpVRSSaf2c26Y0rrXXxyWBptu/ovdak+VhkqjGBZUdvKygqANKA/MqZ/36kcGwFn90RnWp66ksKuHgitLFY8BU+F2ZvqpxpMY9qR3YwOUJ12fc0KUHVKdswcKXuwetErCnwvMKuXxfc/3RVJ2yFc+iosQd3X+WGSVz1UiuN2J156FyVyHbsOUp3krezaPUT/VxXqdfwvknb/Zgp+idTxTbrkLqYuKreRnhy65Gf4W0NsDoYiqf6uZsvr8V9eo6XWc5+3TVf/3N1TfeeOONN95444033njjjTfeSI1/IeOYOeO4fGAAAAAASUVORK5CYII=", base64BackToTop: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADIBAMAAABfdrOtAAAAElBMVEVRUVH+/v5HcEyZmZlRUVFRUVGm1ByOAAAABnRSTlPMzADMTZAJBBGsAAAEnElEQVR42t2cS27jMAyGf7/2U+QCQeDsbeQCgZDujaC5/1UmkzaJn+JDFGcw3LdfflKibJkkDnxrL7dbg7sNt6+L4O8OYBM+B0ys+QrGkHZG+OEEQ8g6go8Bx1GIGMdpNOQyIG6XdMgnSPtKhLQDGEZFBgYMkhKFtGBb0EIEjDgFRowoBVaMGAWpMedEfxMiZtwpUsgZCqtlkCNUdpVAWigtCCCDFtLwIWeoreZCWiRYYEKGFEjDg+yRZCUH0iLRAgNyToXUNCRZyMqWhGnUN2IPm3wSlwJ7IUspyCBkIQUZhCykIIeQuRTkEDKXAuM9srrtYbrZN7Y98giZSoFd+t1OxmMITG0dcrSFXFchZ1tIvQZpYWxhBbK3hpQrkMEa0iwh5t4a+QvZvDXyF7J5a+Qv5PPW21/I5623v5DPW29/IaO3Xv5Clrw1y1/Ikrdm+Qs5svw83yNnSJ5BQb4F/F7EIEJSnThGBAXxkFQfLOviQUE8JAUPsosHBfGQfDAtHhREQ1JxIV00KIgmrnRI84S0yAd5BAXxxJUck0f6Qnwr9qmr6xF5xLMjcwn/iudIEAdWnyjkEXlQKZiRVzoqRyLbgeUKKR8Q4alY7cSnoxzSf2ggsqehKr6YVpcXpOd7H93f60cKhOd7Re2LteUF4eLqiVS1mr0ge4io6C2+soaFkJ7MuuuQs1yITEp9hwwKISIpzR2iESKSIoT0rLNwuVHQqoSIpAQJpGce60vIUSdEIuUqgPTsJ5QFZK8UIpBS8iG94GFrDjlrhfCl8CG96Llxmle4kEr6vKWBPIVo9kqDQSRk9/3cWoikcCFPAd33v4dIChPyEvLzBA6RlEYWke4JEUnhKXkLeUEKxRHJFfKCQHGucIW8IdZSRkLeEGMpYyEjiK2UsZARxFTKRMgYYillImQMMZQyFTKB2EmZCplAuFLIHT8TMoWwpQwiIVMIUwqpZP5bp5CCvCTiQKr5f5lCQN+tPCBn2ZvVDFJwIDUP0m1BYAfZYRNSsCB7BqTbhoARePIxtZ9tgwWkoJcwCalmv3MBAemtO4R6dah2HaKQqj8Zvp9sQDjvJ21+SPCBHPJDDk6QITekEV7gqCC19CpKAym9IMfckKv4olMBCeIrWwVEfvkshzQekO9r9P1/ALk+IG1eSPCDiCJfyG+FyU+A6ZCa/piZDinpz7LpkCv5gdkAEshP5emQhv7onw6pGeULyZCSUYiRDAmMkpJkCKs4JhFSq8p8hJBSVbAkhARV6ZUQoisik0FqXTmcDHLVFfbJIEFXoiiCNMpiSxGkVJaNiiBBWQArgTTaUl4JpNQWJUsgQVteXQg+AKkLxQWFGKW+5J2+eVp4S168X3CF1CltCKdTJ8lb84YK2bUBO+wZW0Pqv9nk4tKu49N45NJC5dMM5tLW5tOg59Jq6NM06dL+abFXwr/RkuvTXJwae1abtE/Dt0/ruksTvs84AZ/BCC4jHnyGVfiM3VBQFANEXEah+Ax18RlP4zNox2dkkM/wI58xTn8yDCXGYCDV3W5RGSajtXyGhG1jbpbjzpwGt/0MJft8jqC7iUbQ/QZaxdnKqcIftwAAAABJRU5ErkJggg==" }; const _sfc_main$2i = { name: "z-paging-empty-view", data() { return {}; }, props: { // 空数据描述文字 emptyViewText: { type: String, default: "没有数据哦~" }, // 空数据图片 emptyViewImg: { type: String, default: "" }, // 是否显示空数据图重新加载按钮 showEmptyViewReload: { type: Boolean, default: false }, // 空数据点击重新加载文字 emptyViewReloadText: { type: String, default: "重新加载" }, // 是否是加载失败 isLoadFailed: { type: Boolean, default: false }, // 空数据图样式 emptyViewStyle: { type: Object, default: function() { return {}; } }, // 空数据图img样式 emptyViewImgStyle: { type: Object, default: function() { return {}; } }, // 空数据图描述文字样式 emptyViewTitleStyle: { type: Object, default: function() { return {}; } }, // 空数据图重新加载按钮样式 emptyViewReloadStyle: { type: Object, default: function() { return {}; } }, // 空数据图z-index emptyViewZIndex: { type: Number, default: 9 }, // 空数据图片是否使用fixed布局并铺满z-paging emptyViewFixed: { type: Boolean, default: true }, // 空数据图中布局的单位,默认为rpx unit: { type: String, default: "rpx" } }, computed: { emptyImg() { return this.isLoadFailed ? zStatic.base64Error : zStatic.base64Empty; }, finalEmptyViewStyle() { this.emptyViewStyle["z-index"] = this.emptyViewZIndex; return this.emptyViewStyle; } }, methods: { // 点击了reload按钮 reloadClick() { this.$emit("reload"); }, // 点击了空数据view emptyViewClick() { this.$emit("viewClick"); } } }; function _sfc_render$2h(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass({ "zp-container": true, "zp-container-fixed": $props.emptyViewFixed }), style: vue.normalizeStyle([$options.finalEmptyViewStyle]), onClick: _cache[1] || (_cache[1] = (...args) => $options.emptyViewClick && $options.emptyViewClick(...args)) }, [ vue.createElementVNode("view", { class: "zp-main" }, [ !$props.emptyViewImg.length ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: vue.normalizeClass({ "zp-main-image-rpx": $props.unit === "rpx", "zp-main-image-px": $props.unit === "px" }), style: vue.normalizeStyle([$props.emptyViewImgStyle]), src: $options.emptyImg }, null, 14, ["src"])) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: vue.normalizeClass({ "zp-main-image-rpx": $props.unit === "rpx", "zp-main-image-px": $props.unit === "px" }), mode: "aspectFit", style: vue.normalizeStyle([$props.emptyViewImgStyle]), src: $props.emptyViewImg }, null, 14, ["src"])), vue.createElementVNode( "text", { class: vue.normalizeClass(["zp-main-title", { "zp-main-title-rpx": $props.unit === "rpx", "zp-main-title-px": $props.unit === "px" }]), style: vue.normalizeStyle([$props.emptyViewTitleStyle]) }, vue.toDisplayString($props.emptyViewText), 7 /* TEXT, CLASS, STYLE */ ), $props.showEmptyViewReload ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: vue.normalizeClass({ "zp-main-error-btn": true, "zp-main-error-btn-rpx": $props.unit === "rpx", "zp-main-error-btn-px": $props.unit === "px" }), style: vue.normalizeStyle([$props.emptyViewReloadStyle]), onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.reloadClick && $options.reloadClick(...args), ["stop"])) }, vue.toDisplayString($props.emptyViewReloadText), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$f = /* @__PURE__ */ _export_sfc(_sfc_main$2i, [["render", _sfc_render$2h], ["__scopeId", "data-v-b7999e14"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/z-paging/components/z-paging-empty-view/z-paging-empty-view.vue"]]); const c$1 = { // 当前版本号 version: "2.8.7", // 延迟操作的通用时间 delayTime: 100, // 请求失败时候全局emit使用的key errorUpdateKey: "z-paging-error-emit", // 全局emit complete的key completeUpdateKey: "z-paging-complete-emit", // z-paging缓存的前缀key cachePrefixKey: "z-paging-cache", // 虚拟列表中列表index的key listCellIndexKey: "zp_index", // 虚拟列表中列表的唯一key listCellIndexUniqueKey: "zp_unique_index" }; const zLocalConfig = {}; const storageKey = "Z-PAGING-REFRESHER-TIME-STORAGE-KEY"; let config$2 = null; let configLoaded = false; let cachedSystemInfo = null; const timeoutMap = {}; function gc(key, defaultValue) { return () => { _handleDefaultConfig(); if (!config$2) return defaultValue; const value2 = config$2[key]; return value2 === void 0 ? defaultValue : value2; }; } function getTouch(e2) { let touch = null; if (e2.touches && e2.touches.length) { touch = e2.touches[0]; } else if (e2.changedTouches && e2.changedTouches.length) { touch = e2.changedTouches[0]; } else if (e2.datail && e2.datail != {}) { touch = e2.datail; } else { return { touchX: 0, touchY: 0 }; } return { touchX: touch.clientX, touchY: touch.clientY }; } function getTouchFromZPaging(target) { if (target && target.tagName && target.tagName !== "BODY" && target.tagName !== "UNI-PAGE-BODY") { const classList = target.classList; if (classList && classList.contains("z-paging-content")) { return { isFromZp: true, isPageScroll: classList.contains("z-paging-content-page"), isReachedTop: classList.contains("z-paging-reached-top"), isUseChatRecordMode: classList.contains("z-paging-use-chat-record-mode") }; } else { return getTouchFromZPaging(target.parentNode); } } else { return { isFromZp: false }; } } function getParent(parent) { if (!parent) return null; if (parent.$refs.paging) return parent; return getParent(parent.$parent); } function consoleErr(err) { formatAppLog("error", "at uni_modules/z-paging/components/z-paging/js/z-paging-utils.js:73", `[z-paging]${err}`); } function delay(callback, ms = c$1.delayTime, key) { const timeout2 = setTimeout(callback, ms); if (!!key) { timeoutMap[key] && clearTimeout(timeoutMap[key]); timeoutMap[key] = timeout2; } return timeout2; } function setRefesrherTime(time, key) { const datas = getRefesrherTime() || {}; datas[key] = time; uni.setStorageSync(storageKey, datas); } function getRefesrherTime() { return uni.getStorageSync(storageKey); } function getRefesrherTimeByKey(key) { const datas = getRefesrherTime(); return datas && datas[key] ? datas[key] : null; } function getRefesrherFormatTimeByKey(key, textMap) { const time = getRefesrherTimeByKey(key); const timeText = time ? _timeFormat(time, textMap) : textMap.none; return `${textMap.title}${timeText}`; } function convertToPx(text) { const dataType = Object.prototype.toString.call(text); if (dataType === "[object Number]") return text; let isRpx = false; if (text.indexOf("rpx") !== -1 || text.indexOf("upx") !== -1) { text = text.replace("rpx", "").replace("upx", ""); isRpx = true; } else if (text.indexOf("px") !== -1) { text = text.replace("px", ""); } if (!isNaN(text)) { if (isRpx) return Number(rpx2px(text)); return Number(text); } return 0; } function rpx2px(rpx) { return uni.upx2px(rpx); } function getSystemInfoSync(useCache = false) { if (useCache && cachedSystemInfo) { return cachedSystemInfo; } const infoTypes = ["DeviceInfo", "AppBaseInfo", "WindowInfo"]; const { deviceInfo, appBaseInfo, windowInfo } = infoTypes.reduce((acc, key) => { const method = `get${key}`; if (uni[method] && uni.canIUse(method)) { acc[key.charAt(0).toLowerCase() + key.slice(1)] = uni[method](); } return acc; }, {}); if (deviceInfo && appBaseInfo && windowInfo) { cachedSystemInfo = { ...deviceInfo, ...appBaseInfo, ...windowInfo }; } else { cachedSystemInfo = uni.getSystemInfoSync(); } return cachedSystemInfo; } function getTime() { return (/* @__PURE__ */ new Date()).getTime(); } function getInstanceId() { const s2 = []; const hexDigits = "0123456789abcdef"; for (let i2 = 0; i2 < 10; i2++) { s2[i2] = hexDigits.substr(Math.floor(Math.random() * 16), 1); } return s2.join("") + getTime(); } function wait(ms) { return new Promise((resolve) => { setTimeout(resolve, ms); }); } function isPromise(func2) { return Object.prototype.toString.call(func2) === "[object Promise]"; } function addUnit$1(value2, unit) { if (Object.prototype.toString.call(value2) === "[object String]") { let tempValue = value2; tempValue = tempValue.replace("rpx", "").replace("upx", "").replace("px", ""); if (value2.indexOf("rpx") === -1 && value2.indexOf("upx") === -1 && value2.indexOf("px") !== -1) { tempValue = parseFloat(tempValue) * 2; } value2 = tempValue; } return unit === "rpx" ? value2 + "rpx" : value2 / 2 + "px"; } function deepCopy(obj) { if (typeof obj !== "object" || obj === null) return obj; let newObj = Array.isArray(obj) ? [] : {}; for (let key in obj) { if (obj.hasOwnProperty(key)) { newObj[key] = deepCopy(obj[key]); } } return newObj; } function useBufferedInsert(fn, delay2 = 50) { let buffer = []; let timer = null; let latestArgs = []; return function insertBuffered(data, ...args) { const newData = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : data; buffer.push(...newData); latestArgs = args; if (!timer) { timer = setTimeout(() => { fn(buffer.length === 1 ? buffer[0] : buffer, ...latestArgs); buffer = []; timer = null; }, buffer.length === 1 ? 10 : delay2); } }; } function _handleDefaultConfig() { if (configLoaded) return; if (zLocalConfig && Object.keys(zLocalConfig).length) { config$2 = zLocalConfig; } if (!config$2 && uni.$zp) { config$2 = uni.$zp.config; } config$2 = config$2 ? Object.keys(config$2).reduce((result, key) => { result[_toCamelCase(key)] = config$2[key]; return result; }, {}) : null; configLoaded = true; } function _timeFormat(time, textMap) { const date3 = new Date(time); const currentDate = /* @__PURE__ */ new Date(); const dateDay = new Date(time).setHours(0, 0, 0, 0); const currentDateDay = (/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0); const disTime = dateDay - currentDateDay; let dayStr = ""; const timeStr = _dateTimeFormat(date3); if (disTime === 0) { dayStr = textMap.today; } else if (disTime === -864e5) { dayStr = textMap.yesterday; } else { dayStr = _dateDayFormat(date3, date3.getFullYear() !== currentDate.getFullYear()); } return `${dayStr} ${timeStr}`; } function _dateDayFormat(date3, showYear = true) { const year = date3.getFullYear(); const month = date3.getMonth() + 1; const day = date3.getDate(); return showYear ? `${year}-${_fullZeroToTwo(month)}-${_fullZeroToTwo(day)}` : `${_fullZeroToTwo(month)}-${_fullZeroToTwo(day)}`; } function _dateTimeFormat(date3) { const hour = date3.getHours(); const minute = date3.getMinutes(); return `${_fullZeroToTwo(hour)}:${_fullZeroToTwo(minute)}`; } function _fullZeroToTwo(str) { str = str.toString(); return str.length === 1 ? "0" + str : str; } function _toCamelCase(value2) { return value2.replace(/-([a-z])/g, (_2, group1) => group1.toUpperCase()); } const u$1 = { gc, setRefesrherTime, getRefesrherFormatTimeByKey, getTouch, getTouchFromZPaging, getParent, convertToPx, getTime, getInstanceId, consoleErr, delay, wait, isPromise, addUnit: addUnit$1, deepCopy, rpx2px, getSystemInfoSync, useBufferedInsert }; const Enum = { // 当前加载类型 refresher:下拉刷新 load-more:上拉加载更多 LoadingType: { Refresher: "refresher", LoadMore: "load-more" }, // 下拉刷新状态 default:默认状态 release-to-refresh:松手立即刷新 loading:刷新中 complete:刷新结束 go-f2:松手进入二楼 Refresher: { Default: "default", ReleaseToRefresh: "release-to-refresh", Loading: "loading", Complete: "complete", GoF2: "go-f2" }, // 底部加载更多状态 default:默认状态 loading:加载中 no-more:没有更多数据 fail:加载失败 More: { Default: "default", Loading: "loading", NoMore: "no-more", Fail: "fail" }, // @query触发来源 user-pull-down:用户主动下拉刷新 reload:通过reload触发 refresh:通过refresh触发 load-more:通过滚动到底部加载更多或点击底部加载更多触发 QueryFrom: { UserPullDown: "user-pull-down", Reload: "reload", Refresh: "refresh", LoadMore: "load-more" }, // 虚拟列表cell高度模式 CellHeightMode: { // 固定高度 Fixed: "fixed", // 动态高度 Dynamic: "dynamic" }, // 列表缓存模式 CacheMode: { // 默认模式,只会缓存一次 Default: "default", // 总是缓存,每次列表刷新(下拉刷新、调用reload等)都会更新缓存 Always: "always" } }; const _sfc_main$2h = { name: "z-paging-refresh", data() { return { R: Enum.Refresher, refresherTimeText: "", zTheme: { title: { white: "#efefef", black: "#555555" }, arrow: { white: zStatic.base64ArrowWhite, black: zStatic.base64Arrow }, flower: { white: zStatic.base64FlowerWhite, black: zStatic.base64Flower }, success: { white: zStatic.base64SuccessWhite, black: zStatic.base64Success }, indicator: { white: "#eeeeee", black: "#777777" } } }; }, props: [ "status", "defaultThemeStyle", "defaultText", "pullingText", "refreshingText", "completeText", "goF2Text", "defaultImg", "pullingImg", "refreshingImg", "completeImg", "refreshingAnimated", "showUpdateTime", "updateTimeKey", "imgStyle", "titleStyle", "updateTimeStyle", "updateTimeTextMap", "unit", "isIos" ], computed: { ts() { return this.defaultThemeStyle; }, // 当前状态Map statusTextMap() { this.updateTime(); const { R: R2, defaultText, pullingText, refreshingText, completeText, goF2Text } = this; return { [R2.Default]: defaultText, [R2.ReleaseToRefresh]: pullingText, [R2.Loading]: refreshingText, [R2.Complete]: completeText, [R2.GoF2]: goF2Text }; }, // 当前状态文字 currentTitle() { return this.statusTextMap[this.status] || this.defaultText; }, // 左侧图片class leftImageClass() { const preSizeClass = `zp-r-left-image-pre-size-${this.unit}`; if (this.status === this.R.Complete) return preSizeClass; return `zp-r-left-image ${preSizeClass} ${this.status === this.R.Default ? "zp-r-arrow-down" : "zp-r-arrow-top"}`; }, // 左侧图片style leftImageStyle() { const showUpdateTime = this.showUpdateTime; const size = showUpdateTime ? u$1.addUnit(36, this.unit) : u$1.addUnit(34, this.unit); return { width: size, height: size, "margin-right": showUpdateTime ? u$1.addUnit(20, this.unit) : u$1.addUnit(9, this.unit) }; }, // 左侧图片src leftImageSrc() { const R2 = this.R; const status = this.status; if (status === R2.Default) { if (!!this.defaultImg) return this.defaultImg; return this.zTheme.arrow[this.ts]; } else if (status === R2.ReleaseToRefresh) { if (!!this.pullingImg) return this.pullingImg; if (!!this.defaultImg) return this.defaultImg; return this.zTheme.arrow[this.ts]; } else if (status === R2.Loading) { if (!!this.refreshingImg) return this.refreshingImg; return this.zTheme.flower[this.ts]; } else if (status === R2.Complete) { if (!!this.completeImg) return this.completeImg; return this.zTheme.success[this.ts]; } else if (status === R2.GoF2) { return this.zTheme.arrow[this.ts]; } return ""; }, // 右侧文字style rightTextStyle() { let stl = {}; stl["color"] = this.zTheme.title[this.ts]; stl["font-size"] = u$1.addUnit(30, this.unit); return stl; } }, methods: { // 添加单位 addUnit(value2, unit) { return u$1.addUnit(value2, unit); }, // 更新下拉刷新时间 updateTime() { if (this.showUpdateTime) { this.refresherTimeText = u$1.getRefesrherFormatTimeByKey(this.updateTimeKey, this.updateTimeTextMap); } } } }; function _sfc_render$2g(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { style: { "height": "100%" } }, [ vue.createElementVNode( "view", { class: vue.normalizeClass($props.showUpdateTime ? "zp-r-container zp-r-container-padding" : "zp-r-container") }, [ vue.createElementVNode("view", { class: "zp-r-left" }, [ vue.createCommentVNode(" 非加载中(继续下拉刷新、松手立即刷新状态图片) "), $props.status !== $data.R.Loading ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: vue.normalizeClass($options.leftImageClass), style: vue.normalizeStyle([$options.leftImageStyle, $props.imgStyle]), src: $options.leftImageSrc }, null, 14, ["src"])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 加载状态图片 "), vue.createElementVNode("image", { class: vue.normalizeClass({ "zp-line-loading-image": $props.refreshingAnimated, "zp-r-left-image": true, "zp-r-left-image-pre-size-rpx": $props.unit === "rpx", "zp-r-left-image-pre-size-px": $props.unit === "px" }), style: vue.normalizeStyle([$options.leftImageStyle, $props.imgStyle]), src: $options.leftImageSrc }, null, 14, ["src"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )), vue.createCommentVNode(" 在nvue中,加载状态loading使用系统loading ") ]), vue.createCommentVNode(" 右侧文字内容 "), vue.createElementVNode("view", { class: "zp-r-right" }, [ vue.createCommentVNode(" 右侧下拉刷新状态文字 "), vue.createElementVNode( "text", { class: "zp-r-right-text", style: vue.normalizeStyle([$options.rightTextStyle, $props.titleStyle]) }, vue.toDisplayString($options.currentTitle), 5 /* TEXT, STYLE */ ), vue.createCommentVNode(" 右侧下拉刷新时间文字 "), $props.showUpdateTime && $data.refresherTimeText.length ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["zp-r-right-text", { "zp-r-right-time-text-rpx": $props.unit === "rpx", "zp-r-right-time-text-px": $props.unit === "px" }]), style: vue.normalizeStyle([{ color: $data.zTheme.title[$options.ts] }, $props.updateTimeStyle]) }, vue.toDisplayString($data.refresherTimeText), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ], 2 /* CLASS */ ) ]); } const zPagingRefresh = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["render", _sfc_render$2g], ["__scopeId", "data-v-00a16504"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/z-paging/components/z-paging/components/z-paging-refresh.vue"]]); const _sfc_main$2g = { name: "z-paging-load-more", data() { return { M: Enum.More, zTheme: { title: { white: "#efefef", black: "#a4a4a4" }, line: { white: "#efefef", black: "#eeeeee" }, circleBorder: { white: "#aaaaaa", black: "#c8c8c8" }, circleBorderTop: { white: "#ffffff", black: "#444444" }, flower: { white: zStatic.base64FlowerWhite, black: zStatic.base64Flower }, indicator: { white: "#eeeeee", black: "#777777" } } }; }, props: ["zConfig"], computed: { ts() { return this.c.defaultThemeStyle; }, // 底部加载更多配置 c() { return this.zConfig || {}; }, // 底部加载更多文字 ownLoadingMoreText() { return { [this.M.Default]: this.c.defaultText, [this.M.Loading]: this.c.loadingText, [this.M.NoMore]: this.c.noMoreText, [this.M.Fail]: this.c.failText }[this.finalStatus]; }, // 底部加载更多状态 finalStatus() { if (this.c.defaultAsLoading && this.c.status === this.M.Default) return this.M.Loading; return this.c.status; }, // 加载更多icon类型 finalLoadingIconType() { return this.c.loadingIconType; } }, methods: { // 点击了加载更多 doClick() { this.$emit("doClick"); } } }; function _sfc_render$2f(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["zp-l-container", { "zp-l-container-rpx": $options.c.unit === "rpx", "zp-l-container-px": $options.c.unit === "px" }]), style: vue.normalizeStyle([$options.c.customStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.doClick && $options.doClick(...args)) }, [ !$options.c.hideContent ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createCommentVNode(" 底部加载更多没有更多数据分割线 "), $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass({ "zp-l-line-rpx": $options.c.unit === "rpx", "zp-l-line-px": $options.c.unit === "px" }), style: vue.normalizeStyle([{ backgroundColor: $data.zTheme.line[$options.ts] }, $options.c.noMoreLineCustomStyle]) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部加载更多loading "), $options.finalStatus === $data.M.Loading && !!$options.c.loadingIconCustomImage ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: $options.c.loadingIconCustomImage, style: vue.normalizeStyle([$options.c.iconCustomStyle]), class: vue.normalizeClass({ "zp-l-line-loading-custom-image": true, "zp-l-line-loading-custom-image-animated": $options.c.loadingAnimated, "zp-l-line-loading-custom-image-rpx": $options.c.unit === "rpx", "zp-l-line-loading-custom-image-px": $options.c.unit === "px" }) }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true), $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "flower" && !$options.c.loadingIconCustomImage.length ? (vue.openBlock(), vue.createElementBlock("image", { key: 2, class: vue.normalizeClass({ "zp-line-loading-image": true, "zp-line-loading-image-rpx": $options.c.unit === "rpx", "zp-line-loading-image-px": $options.c.unit === "px" }), style: vue.normalizeStyle([$options.c.iconCustomStyle]), src: $data.zTheme.flower[$options.ts] }, null, 14, ["src"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部加载更多文字 "), $options.finalStatus === $data.M.Loading && $options.finalLoadingIconType === "circle" && !$options.c.loadingIconCustomImage.length ? (vue.openBlock(), vue.createElementBlock( "text", { key: 3, class: vue.normalizeClass(["zp-l-circle-loading-view", { "zp-l-circle-loading-view-rpx": $options.c.unit === "rpx", "zp-l-circle-loading-view-px": $options.c.unit === "px" }]), style: vue.normalizeStyle([{ borderColor: $data.zTheme.circleBorder[$options.ts], borderTopColor: $data.zTheme.circleBorderTop[$options.ts] }, $options.c.iconCustomStyle]) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), !$options.c.isChat || !$options.c.chatDefaultAsLoading && $options.finalStatus === $data.M.Default || $options.finalStatus === $data.M.Fail ? (vue.openBlock(), vue.createElementBlock( "text", { key: 4, class: vue.normalizeClass({ "zp-l-text-rpx": $options.c.unit === "rpx", "zp-l-text-px": $options.c.unit === "px" }), style: vue.normalizeStyle([{ color: $data.zTheme.title[$options.ts] }, $options.c.titleCustomStyle]) }, vue.toDisplayString($options.ownLoadingMoreText), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部加载更多没有更多数据分割线 "), $options.c.showNoMoreLine && $options.finalStatus === $data.M.NoMore ? (vue.openBlock(), vue.createElementBlock( "text", { key: 5, class: vue.normalizeClass({ "zp-l-line-rpx": $options.c.unit === "rpx", "zp-l-line-px": $options.c.unit === "px" }), style: vue.normalizeStyle([{ backgroundColor: $data.zTheme.line[$options.ts] }, $options.c.noMoreLineCustomStyle]) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const zPagingLoadMore = /* @__PURE__ */ _export_sfc(_sfc_main$2g, [["render", _sfc_render$2f], ["__scopeId", "data-v-8cc5c400"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/z-paging/components/z-paging/components/z-paging-load-more.vue"]]); const commonLayoutModule = { data() { return { systemInfo: null, cssSafeAreaInsetBottom: -1, isReadyDestroy: false }; }, computed: { // 顶部可用距离 windowTop() { if (!this.systemInfo) return 0; return this.systemInfo.windowTop || 0; }, // 底部安全区域高度 safeAreaBottom() { if (!this.systemInfo) return 0; let safeAreaBottom = 0; safeAreaBottom = this.systemInfo.safeAreaInsets.bottom || 0; return safeAreaBottom; }, // 是否是比较老的webview,在一些老的webview中,需要进行一些特殊处理 isOldWebView() { try { const systemInfos = u$1.getSystemInfoSync(true).system.split(" "); const deviceType = systemInfos[0]; const version2 = parseInt(systemInfos[1]); if (deviceType === "iOS" && version2 <= 10 || deviceType === "Android" && version2 <= 6) { return true; } } catch (e2) { return false; } return false; }, // 当前组件的$slots,兼容不同平台 zSlots() { return this.$slots; } }, beforeDestroy() { this.isReadyDestroy = true; }, unmounted() { this.isReadyDestroy = true; }, methods: { // 更新fixed模式下z-paging的布局 updateFixedLayout() { this.fixed && this.$nextTick(() => { this.systemInfo = u$1.getSystemInfoSync(); }); }, // 获取节点尺寸 _getNodeClientRect(select, inDom = true, scrollOffset = false) { if (this.isReadyDestroy) { return Promise.resolve(false); } let res = !!inDom ? uni.createSelectorQuery().in(inDom === true ? this : inDom) : uni.createSelectorQuery(); scrollOffset ? res.select(select).scrollOffset() : res.select(select).boundingClientRect(); return new Promise((resolve, reject) => { res.exec((data) => { resolve(data && data != "" && data != void 0 && data.length ? data : false); }); }); }, // 获取slot="left"和slot="right"宽度并且更新布局 _updateLeftAndRightWidth(targetStyle, parentNodePrefix) { this.$nextTick(() => { let delayTime = 0; setTimeout(() => { ["left", "right"].map((position) => { this._getNodeClientRect(`.${parentNodePrefix}-${position}`).then((res) => { this.$set(targetStyle, position, res ? res[0].width + "px" : "0px"); }); }); }, delayTime); }); }, // 通过获取css设置的底部安全区域占位view高度设置bottom距离(直接通过systemInfo在部分平台上无法获取到底部安全区域) _getCssSafeAreaInsetBottom(success) { this._getNodeClientRect(".zp-safe-area-inset-bottom").then((res) => { this.cssSafeAreaInsetBottom = res ? res[0].height : -1; res && success && success(); }); }, // 同步获取系统信息,兼容不同平台(供z-paging-swiper使用) _getSystemInfoSync(useCache = false) { return u$1.getSystemInfoSync(useCache); } } }; const queryKey = "Query"; const fetchParamsKey = "FetchParams"; const fetchResultKey = "FetchResult"; const language2LocalKey = "Language2Local"; function handleQuery(callback) { _addHandleByKey(queryKey, callback); return this; } function _handleQuery(pageNo, pageSize, from, lastItem) { const callback = _getHandleByKey(queryKey); return callback ? callback(pageNo, pageSize, from, lastItem) : [pageNo, pageSize, from]; } function handleFetchParams(callback) { _addHandleByKey(fetchParamsKey, callback); return this; } function _handleFetchParams(parmas, extraParams) { const callback = _getHandleByKey(fetchParamsKey); return callback ? callback(parmas, extraParams || {}) : { pageNo: parmas.pageNo, pageSize: parmas.pageSize, ...extraParams || {} }; } function handleFetchResult(callback) { _addHandleByKey(fetchResultKey, callback); return this; } function _handleFetchResult(result, paging, params2) { const callback = _getHandleByKey(fetchResultKey); callback && callback(result, paging, params2); return callback ? true : false; } function handleLanguage2Local(callback) { _addHandleByKey(language2LocalKey, callback); return this; } function _handleLanguage2Local(language, local) { const callback = _getHandleByKey(language2LocalKey); return callback ? callback(language, local) : local; } function _getApp() { return getApp(); } function _hasGlobalData() { return _getApp() && _getApp().globalData; } function _addHandleByKey(key, callback) { try { setTimeout(function() { if (_hasGlobalData()) { _getApp().globalData[`zp_handle${key}Callback`] = callback; } }, 1); } catch (_2) { } } function _getHandleByKey(key) { return _hasGlobalData() ? _getApp().globalData[`zp_handle${key}Callback`] : null; } const interceptor = { handleQuery, _handleQuery, handleFetchParams, _handleFetchParams, handleFetchResult, _handleFetchResult, handleLanguage2Local, _handleLanguage2Local }; const dataHandleModule = { props: { // 自定义初始的pageNo,默认为1 defaultPageNo: { type: Number, default: u$1.gc("defaultPageNo", 1), observer: function(newVal) { this.pageNo = newVal; } }, // 自定义pageSize,默认为10 defaultPageSize: { type: Number, default: u$1.gc("defaultPageSize", 10), validator: (value2) => { if (value2 <= 0) u$1.consoleErr("default-page-size必须大于0!"); return value2 > 0; } }, // 为保证数据一致,设置当前tab切换时的标识key,并在complete中传递相同key,若二者不一致,则complete将不会生效 dataKey: { type: [Number, String, Object], default: u$1.gc("dataKey", null) }, // 使用缓存,若开启将自动缓存第一页的数据,默认为否。请注意,因考虑到切换tab时不同tab数据不同的情况,默认仅会缓存组件首次加载时第一次请求到的数据,后续的下拉刷新操作不会更新缓存。 useCache: { type: Boolean, default: u$1.gc("useCache", false) }, // 使用缓存时缓存的key,用于区分不同列表的缓存数据,useCache为true时必须设置,否则缓存无效 cacheKey: { type: String, default: u$1.gc("cacheKey", null) }, // 缓存模式,默认仅会缓存组件首次加载时第一次请求到的数据,可设置为always,即代表总是缓存,每次列表刷新(下拉刷新、调用reload等)都会更新缓存 cacheMode: { type: String, default: u$1.gc("cacheMode", Enum.CacheMode.Default) }, // 自动注入的list名,可自动修改父view(包含ref="paging")中对应name的list值 autowireListName: { type: String, default: u$1.gc("autowireListName", "") }, // 自动注入的query名,可自动调用父view(包含ref="paging")中的query方法 autowireQueryName: { type: String, default: u$1.gc("autowireQueryName", "") }, // 获取分页数据Function,功能与@query类似。若设置了fetch则@query将不再触发 fetch: { type: Function, default: null }, // fetch的附加参数,fetch配置后有效 fetchParams: { type: Object, default: u$1.gc("fetchParams", null) }, // z-paging mounted后自动调用reload方法(mounted后自动调用接口),默认为是 auto: { type: Boolean, default: u$1.gc("auto", true) }, // 用户下拉刷新时是否触发reload方法,默认为是 reloadWhenRefresh: { type: Boolean, default: u$1.gc("reloadWhenRefresh", true) }, // reload时自动滚动到顶部,默认为是 autoScrollToTopWhenReload: { type: Boolean, default: u$1.gc("autoScrollToTopWhenReload", true) }, // reload时立即自动清空原list,默认为是,若立即自动清空,则在reload之后、请求回调之前页面是空白的 autoCleanListWhenReload: { type: Boolean, default: u$1.gc("autoCleanListWhenReload", true) }, // 列表刷新时自动显示下拉刷新view,默认为否 showRefresherWhenReload: { type: Boolean, default: u$1.gc("showRefresherWhenReload", false) }, // 列表刷新时自动显示加载更多view,且为加载中状态,默认为否 showLoadingMoreWhenReload: { type: Boolean, default: u$1.gc("showLoadingMoreWhenReload", false) }, // 组件created时立即触发reload(可解决一些情况下先看到页面再看到loading的问题),auto为true时有效。为否时将在mounted+nextTick后触发reload,默认为否 createdReload: { type: Boolean, default: u$1.gc("createdReload", false) }, // 本地分页时上拉加载更多延迟时间,单位为毫秒,默认200毫秒 localPagingLoadingTime: { type: [Number, String], default: u$1.gc("localPagingLoadingTime", 200) }, // 自动拼接complete中传过来的数组(使用聊天记录模式时无效) concat: { type: Boolean, default: u$1.gc("concat", true) }, // 请求失败是否触发reject,默认为是 callNetworkReject: { type: Boolean, default: u$1.gc("callNetworkReject", true) }, // 父组件v-model所绑定的list的值 value: { type: Array, default: function() { return []; } }, modelValue: { type: Array, default: function() { return []; } } }, data() { return { currentData: [], totalData: [], realTotalData: [], totalLocalPagingList: [], dataPromiseResultMap: { reload: null, complete: null, localPaging: null }, isSettingCacheList: false, pageNo: 1, currentRefreshPageSize: 0, isLocalPaging: false, isAddedData: false, isTotalChangeFromAddData: false, privateConcat: true, myParentQuery: -1, firstPageLoaded: false, pagingLoaded: false, loaded: false, isUserReload: true, fromEmptyViewReload: false, queryFrom: "", listRendering: false, isHandlingRefreshToPage: false, isFirstPageAndNoMore: false, totalDataChangeThrow: true, addDataFromTopBufferedInsert: u$1.useBufferedInsert(this._addDataFromTop) }; }, computed: { pageSize() { return this.defaultPageSize; }, finalConcat() { return this.concat && this.privateConcat; }, finalUseCache() { if (this.useCache && !this.cacheKey) { u$1.consoleErr("use-cache为true时,必须设置cache-key,否则缓存无效!"); } return this.useCache && !!this.cacheKey; }, finalCacheKey() { return this.cacheKey ? `${c$1.cachePrefixKey}-${this.cacheKey}` : null; }, isFirstPage() { return this.pageNo === this.defaultPageNo; } }, watch: { totalData(newVal, oldVal) { this._totalDataChange(newVal, oldVal, this.totalDataChangeThrow); this.totalDataChangeThrow = true; }, currentData(newVal, oldVal) { this._currentDataChange(newVal, oldVal); }, useChatRecordMode(newVal, oldVal) { if (newVal) { this.nLoadingMoreFixedHeight = false; } }, value: { handler(newVal) { if (newVal !== this.totalData) { this.totalDataChangeThrow = false; this.totalData = newVal; } }, immediate: true }, modelValue: { handler(newVal) { if (newVal !== this.totalData) { this.totalDataChangeThrow = false; this.totalData = newVal; } }, immediate: true } }, methods: { // 请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为是否成功(默认为是) complete(data, success = true) { this.customNoMore = -1; return this.addData(data, success); }, //【保证数据一致】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为dataKey,需与:data-key绑定的一致,第三个参数为是否成功(默认为是) completeByKey(data, dataKey = null, success = true) { if (dataKey !== null && this.dataKey !== null && dataKey !== this.dataKey) { this.isFirstPage && this.endRefresh(); return new Promise((resolve) => resolve()); } this.customNoMore = -1; return this.addData(data, success); }, //【通过total判断是否有更多数据】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为total(列表总数),第三个参数为是否成功(默认为是) completeByTotal(data, total, success = true) { if (total == "undefined") { this.customNoMore = -1; } else { const dataTypeRes = this._checkDataType(data, success, false); data = dataTypeRes.data; success = dataTypeRes.success; if (total >= 0 && success) { return new Promise((resolve, reject) => { this.$nextTick(() => { let nomore = false; const realTotalDataCount = this.pageNo == this.defaultPageNo ? 0 : this.realTotalData.length; const dataLength = this.privateConcat ? data.length : 0; let exceedCount = realTotalDataCount + dataLength - total; if (exceedCount >= 0) { nomore = true; exceedCount = this.defaultPageSize - exceedCount; if (this.privateConcat && exceedCount > 0 && exceedCount < data.length) { data = data.splice(0, exceedCount); } } this.completeByNoMore(data, nomore, success).then((res) => resolve(res)).catch(() => reject()); }); }); } } return this.addData(data, success); }, //【自行判断是否有更多数据】请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging处理,第一个参数为请求结果数组,第二个参数为是否没有更多数据,第三个参数为是否成功(默认是是) completeByNoMore(data, nomore, success = true) { if (nomore != "undefined") { this.customNoMore = nomore == true ? 1 : 0; } return this.addData(data, success); }, // 请求结束且请求失败时调用,支持传入请求失败原因 completeByError(errorMsg) { this.customerEmptyViewErrorText = errorMsg; return this.complete(false); }, // 与上方complete方法功能一致,新版本中设置服务端回调数组请使用complete方法 addData(data, success = true) { if (!this.fromCompleteEmit) { this.disabledCompleteEmit = true; this.fromCompleteEmit = false; } const currentTimeStamp = u$1.getTime(); const disTime = currentTimeStamp - this.requestTimeStamp; let minDelay = this.minDelay; if (this.isFirstPage && this.finalShowRefresherWhenReload) { minDelay = Math.max(400, minDelay); } const addDataDalay = this.requestTimeStamp > 0 && disTime < minDelay ? minDelay - disTime : 0; this.$nextTick(() => { u$1.delay(() => { this._addData(data, success, false); }, this.delay > 0 ? this.delay : addDataDalay); }); return new Promise((resolve, reject) => { this.dataPromiseResultMap.complete = { resolve, reject }; }); }, // 从顶部添加数据,不会影响分页的pageNo和pageSize addDataFromTop(data, toTop = true, toTopWithAnimate = true) { (this.finalUseVirtualList ? this.addDataFromTopBufferedInsert : this._addDataFromTop)( data, toTop, toTopWithAnimate ); }, // 重新设置列表数据,调用此方法不会影响pageNo和pageSize,也不会触发请求。适用场景:当需要删除列表中某一项时,将删除对应项后的数组通过此方法传递给z-paging。(当出现类似的需要修改列表数组的场景时,请使用此方法,请勿直接修改page中:list.sync绑定的数组) resetTotalData(data) { this.isTotalChangeFromAddData = true; data = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : data; this.totalData = data; }, // 设置本地分页数据,请求结束(成功或者失败)调用此方法,将请求的结果传递给z-paging作分页处理(若调用了此方法,则上拉加载更多时内部会自动分页,不会触发@query所绑定的事件) setLocalPaging(data, success = true) { this.isLocalPaging = true; this.$nextTick(() => { this._addData(data, success, true); }); return new Promise((resolve, reject) => { this.dataPromiseResultMap.localPaging = { resolve, reject }; }); }, // 重新加载分页数据,pageNo会恢复为默认值,相当于下拉刷新的效果(animate为true时会展示下拉刷新动画,默认为false) reload(animate = this.showRefresherWhenReload) { if (animate) { this.privateShowRefresherWhenReload = animate; this.isUserPullDown = true; } if (!this.showLoadingMoreWhenReload) { this.listRendering = true; } this.$nextTick(() => { this._preReload(animate, false); }); return new Promise((resolve, reject) => { this.dataPromiseResultMap.reload = { resolve, reject }; }); }, // 刷新列表数据,pageNo和pageSize不会重置,列表数据会重新从服务端获取。必须保证@query绑定的方法中的pageNo和pageSize和传给服务端的一致 refresh() { return this._handleRefreshWithDisPageNo(this.pageNo - this.defaultPageNo + 1); }, // 刷新列表数据至指定页,例如pageNo=5时则代表刷新列表至第5页,此时pageNo会变为5,列表会展示前5页的数据。必须保证@query绑定的方法中的pageNo和pageSize和传给服务端的一致 refreshToPage(pageNo) { this.isHandlingRefreshToPage = true; return this._handleRefreshWithDisPageNo(pageNo + this.defaultPageNo - 1); }, // 手动更新列表缓存数据,将自动截取v-model绑定的list中的前pageSize条覆盖缓存,请确保在list数据更新到预期结果后再调用此方法 updateCache() { if (this.finalUseCache && this.totalData.length) { this._saveLocalCache(this.totalData.slice(0, Math.min(this.totalData.length, this.pageSize))); } }, // 清空分页数据 clean() { this._reload(true); this._addData([], true, false); }, // 清空分页数据 clear() { this.clean(); }, // reload之前的一些处理 _preReload(animate = this.showRefresherWhenReload, isFromMounted = true, retryCount = 0) { const showRefresher = this.finalRefresherEnabled && this.useCustomRefresher; if (this.customRefresherHeight === -1 && showRefresher) { u$1.delay(() => { retryCount++; if (retryCount % 10 === 0) { this._updateCustomRefresherHeight(); } this._preReload(animate, isFromMounted, retryCount); }, c$1.delayTime / 2); return; } this.isUserReload = true; this.loadingType = Enum.LoadingType.Refresher; if (animate) { this.privateShowRefresherWhenReload = animate; if (this.useCustomRefresher) { this._doRefresherRefreshAnimate(); } else { this.refresherTriggered = true; } } else { this._refresherEnd(false, false, false, false); } this._reload(false, isFromMounted); }, // 重新加载分页数据 _reload(isClean = false, isFromMounted = false, isUserPullDown = false) { this.isAddedData = false; this.insideOfPaging = -1; this.cacheScrollNodeHeight = -1; this.pageNo = this.defaultPageNo; this._cleanRefresherEndTimeout(); !this.privateShowRefresherWhenReload && !isClean && this._startLoading(true); this.firstPageLoaded = true; this.isTotalChangeFromAddData = false; if (!this.isSettingCacheList) { this.totalData = []; } if (!isClean) { this._emitQuery(this.pageNo, this.defaultPageSize, isUserPullDown ? Enum.QueryFrom.UserPullDown : Enum.QueryFrom.Reload); let delay2 = 0; u$1.delay(this._callMyParentQuery, delay2); if (!isFromMounted && this.autoScrollToTopWhenReload) { this._scrollToTop(false); } } }, // 处理服务端返回的数组 _addData(data, success, isLocal) { this.isAddedData = true; this.fromEmptyViewReload = false; this.isTotalChangeFromAddData = true; this.refresherTriggered = false; this._endSystemLoadingAndRefresh(); const tempIsUserPullDown = this.isUserPullDown; if (this.showRefresherUpdateTime && this.isFirstPage) { u$1.setRefesrherTime(u$1.getTime(), this.refresherUpdateTimeKey); this.$refs.refresh && this.$refs.refresh.updateTime(); } if (!isLocal && tempIsUserPullDown && this.isFirstPage) { this.isUserPullDown = false; } this.listRendering = true; this.$nextTick(() => { u$1.delay(() => this.listRendering = false); }); let dataTypeRes = this._checkDataType(data, success, isLocal); data = dataTypeRes.data; success = dataTypeRes.success; let delayTime = c$1.delayTime; if (this.useChatRecordMode) delayTime = 0; this.loadingForNow = false; u$1.delay(() => { this.pagingLoaded = true; this.$nextTick(() => { !isLocal && this._refresherEnd(delayTime > 0, true, tempIsUserPullDown); }); }); if (this.isFirstPage) { this.isLoadFailed = !success; this.$emit("isLoadFailedChange", this.isLoadFailed); if (this.finalUseCache && success && (this.cacheMode === Enum.CacheMode.Always ? true : this.isSettingCacheList)) { this._saveLocalCache(data); } } this.isSettingCacheList = false; if (success) { if (!(this.privateConcat === false && !this.isHandlingRefreshToPage && this.loadingStatus === Enum.More.NoMore)) { this.loadingStatus = Enum.More.Default; } if (isLocal) { this.totalLocalPagingList = data; const localPageNo = this.defaultPageNo; const localPageSize = this.queryFrom !== Enum.QueryFrom.Refresh ? this.defaultPageSize : this.currentRefreshPageSize; this._localPagingQueryList(localPageNo, localPageSize, 0, (res) => { u$1.delay(() => { this.completeByTotal(res, this.totalLocalPagingList.length); }, 0); }); } else { let dataChangeDelayTime = 0; u$1.delay(() => { this._currentDataChange(data, this.currentData); this._callDataPromise(true, this.totalData); }, dataChangeDelayTime); } if (this.isHandlingRefreshToPage) { this.isHandlingRefreshToPage = false; this.pageNo = this.defaultPageNo + Math.ceil(data.length / this.pageSize) - 1; if (data.length % this.pageSize !== 0) { this.customNoMore = 1; } } } else { this._currentDataChange(data, this.currentData); this._callDataPromise(false); this.loadingStatus = Enum.More.Fail; this.isHandlingRefreshToPage = false; if (this.loadingType === Enum.LoadingType.LoadMore) { this.pageNo--; } } }, // 所有数据改变时调用 _totalDataChange(newVal, oldVal, eventThrow = true) { if ((!this.isUserReload || !this.autoCleanListWhenReload) && this.firstPageLoaded && !newVal.length && oldVal.length) { return; } this._doCheckScrollViewShouldFullHeight(newVal); if (!this.realTotalData.length && !newVal.length) { eventThrow = false; } this.realTotalData = newVal; if (eventThrow) { this.$emit("input", newVal); this.$emit("update:modelValue", newVal); this.$emit("update:list", newVal); this.$emit("listChange", newVal); this._callMyParentList(newVal); } this.firstPageLoaded = false; this.isTotalChangeFromAddData = false; this.$nextTick(() => { u$1.delay(() => { this._getNodeClientRect(".zp-paging-container-content").then((res) => { res && this.$emit("contentHeightChanged", res[0].height); }); }, c$1.delayTime * (this.isIos ? 1 : 3)); }); }, // 当前数据改变时调用 _currentDataChange(newVal, oldVal) { newVal = [...newVal]; this.finalUseVirtualList && this._setCellIndex(newVal, "bottom"); if (this.isFirstPage && this.finalConcat) { this.totalData = []; } if (this.customNoMore !== -1) { if (this.customNoMore === 1 || this.customNoMore !== 0 && !newVal.length) { this.loadingStatus = Enum.More.NoMore; } } else { if (!newVal.length || newVal.length && newVal.length < this.defaultPageSize) { this.loadingStatus = Enum.More.NoMore; } } if (!this.totalData.length) { this.totalData = newVal; } else { if (this.finalConcat) { this.oldScrollTop; this.totalData = [...this.totalData, ...newVal]; } else { this.totalData = newVal; } } this.privateConcat = true; }, // 根据pageNo处理refresh操作 _handleRefreshWithDisPageNo(pageNo) { if (!this.isHandlingRefreshToPage && !this.realTotalData.length) return this.reload(); if (pageNo >= 1) { this.loading = true; this.privateConcat = false; const totalPageSize = pageNo * this.pageSize; this.currentRefreshPageSize = totalPageSize; if (this.isLocalPaging && this.isHandlingRefreshToPage) { this._localPagingQueryList(this.defaultPageNo, totalPageSize, 0, (res) => { this.complete(res); }); } else { this._emitQuery(this.defaultPageNo, totalPageSize, Enum.QueryFrom.Refresh); this._callMyParentQuery(this.defaultPageNo, totalPageSize); } } return new Promise((resolve, reject) => { this.dataPromiseResultMap.reload = { resolve, reject }; }); }, // 本地分页请求 _localPagingQueryList(pageNo, pageSize, localPagingLoadingTime, callback) { pageNo = Math.max(1, pageNo); pageSize = Math.max(1, pageSize); const totalPagingList = [...this.totalLocalPagingList]; const pageNoIndex = (pageNo - 1) * pageSize; const finalPageNoIndex = Math.min(totalPagingList.length, pageNoIndex + pageSize); const resultPagingList = totalPagingList.splice(pageNoIndex, finalPageNoIndex - pageNoIndex); u$1.delay(() => callback(resultPagingList), localPagingLoadingTime); }, // 从顶部添加数据,不会影响分页的pageNo和pageSize _addDataFromTop(data, toTop = true, toTopWithAnimate = true) { let addFromTop = !this.isChatRecordModeAndNotInversion; data = Object.prototype.toString.call(data) !== "[object Array]" ? [data] : addFromTop ? data.reverse() : data; this.finalUseVirtualList && this._setCellIndex(data, "top"); this.totalData = addFromTop ? [...data, ...this.totalData] : [...this.totalData, ...data]; if (toTop) { u$1.delay(() => this.useChatRecordMode ? this.scrollToBottom(toTopWithAnimate) : this.scrollToTop(toTopWithAnimate)); } }, // 存储列表缓存数据 _saveLocalCache(data) { uni.setStorageSync(this.finalCacheKey, data); }, // 通过缓存数据填充列表数据 _setListByLocalCache() { this.totalData = uni.getStorageSync(this.finalCacheKey) || []; this.isSettingCacheList = true; }, // 修改父view的list _callMyParentList(newVal) { if (this.autowireListName.length) { const myParent = u$1.getParent(this.$parent); if (myParent && myParent[this.autowireListName]) { myParent[this.autowireListName] = newVal; } } }, // 调用父view的query _callMyParentQuery(customPageNo = 0, customPageSize = 0) { if (this.autowireQueryName) { if (this.myParentQuery === -1) { const myParent = u$1.getParent(this.$parent); if (myParent && myParent[this.autowireQueryName]) { this.myParentQuery = myParent[this.autowireQueryName]; } } if (this.myParentQuery !== -1) { customPageSize > 0 ? this.myParentQuery(customPageNo, customPageSize) : this.myParentQuery(this.pageNo, this.defaultPageSize); } } }, // emit query事件 _emitQuery(pageNo, pageSize, from) { this.queryFrom = from; this.requestTimeStamp = u$1.getTime(); const [lastItem] = this.realTotalData.slice(-1); if (this.fetch) { const fetchParams = interceptor._handleFetchParams({ pageNo, pageSize, from, lastItem: lastItem || null }, this.fetchParams); const fetchResult = this.fetch(fetchParams); if (!interceptor._handleFetchResult(fetchResult, this, fetchParams)) { u$1.isPromise(fetchResult) ? fetchResult.then((res) => { this.complete(res); }).catch((err) => { this.complete(false); }) : this.complete(fetchResult); } } else { this.$emit("query", ...interceptor._handleQuery(pageNo, pageSize, from, lastItem || null)); } }, // 触发数据改变promise _callDataPromise(success, totalList) { for (const key in this.dataPromiseResultMap) { const obj = this.dataPromiseResultMap[key]; if (!obj) continue; success ? obj.resolve({ totalList, noMore: this.loadingStatus === Enum.More.NoMore }) : this.callNetworkReject && obj.reject(`z-paging-${key}-error`); } }, // 检查complete data的类型 _checkDataType(data, success, isLocal) { const dataType = Object.prototype.toString.call(data); if (dataType === "[object Boolean]") { success = data; data = []; } else if (dataType !== "[object Array]") { data = []; if (dataType !== "[object Undefined]" && dataType !== "[object Null]") { u$1.consoleErr(`${isLocal ? "setLocalPaging" : "complete"}参数类型不正确,第一个参数类型必须为Array!`); } } return { data, success }; } } }; const isObject$1 = (val) => val !== null && typeof val === "object"; const defaultDelimiters = ["{", "}"]; class BaseFormatter { constructor() { this._caches = /* @__PURE__ */ Object.create(null); } interpolate(message, values, delimiters = defaultDelimiters) { if (!values) { return [message]; } let tokens = this._caches[message]; if (!tokens) { tokens = parse(message, delimiters); this._caches[message] = tokens; } return compile(tokens, values); } } const RE_TOKEN_LIST_VALUE = /^(?:\d)+/; const RE_TOKEN_NAMED_VALUE = /^(?:\w)+/; function parse(format2, [startDelimiter, endDelimiter]) { const tokens = []; let position = 0; let text = ""; while (position < format2.length) { let char = format2[position++]; if (char === startDelimiter) { if (text) { tokens.push({ type: "text", value: text }); } text = ""; let sub2 = ""; char = format2[position++]; while (char !== void 0 && char !== endDelimiter) { sub2 += char; char = format2[position++]; } const isClosed = char === endDelimiter; const type2 = RE_TOKEN_LIST_VALUE.test(sub2) ? "list" : isClosed && RE_TOKEN_NAMED_VALUE.test(sub2) ? "named" : "unknown"; tokens.push({ value: sub2, type: type2 }); } else { text += char; } } text && tokens.push({ type: "text", value: text }); return tokens; } function compile(tokens, values) { const compiled = []; let index2 = 0; const mode = Array.isArray(values) ? "list" : isObject$1(values) ? "named" : "unknown"; if (mode === "unknown") { return compiled; } while (index2 < tokens.length) { const token = tokens[index2]; switch (token.type) { case "text": compiled.push(token.value); break; case "list": compiled.push(values[parseInt(token.value, 10)]); break; case "named": if (mode === "named") { compiled.push(values[token.value]); } else { { console.warn(`Type of token '${token.type}' and format of value '${mode}' don't match!`); } } break; case "unknown": { console.warn(`Detect 'unknown' type of token!`); } break; } index2++; } return compiled; } const LOCALE_ZH_HANS = "zh-Hans"; const LOCALE_ZH_HANT = "zh-Hant"; const LOCALE_EN = "en"; const LOCALE_FR = "fr"; const LOCALE_ES = "es"; const hasOwnProperty = Object.prototype.hasOwnProperty; const hasOwn = (val, key) => hasOwnProperty.call(val, key); const defaultFormatter = new BaseFormatter(); function include(str, parts) { return !!parts.find((part) => str.indexOf(part) !== -1); } function startsWith(str, parts) { return parts.find((part) => str.indexOf(part) === 0); } function normalizeLocale(locale, messages2) { if (!locale) { return; } locale = locale.trim().replace(/_/g, "-"); if (messages2 && messages2[locale]) { return locale; } locale = locale.toLowerCase(); if (locale === "chinese") { return LOCALE_ZH_HANS; } if (locale.indexOf("zh") === 0) { if (locale.indexOf("-hans") > -1) { return LOCALE_ZH_HANS; } if (locale.indexOf("-hant") > -1) { return LOCALE_ZH_HANT; } if (include(locale, ["-tw", "-hk", "-mo", "-cht"])) { return LOCALE_ZH_HANT; } return LOCALE_ZH_HANS; } let locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES]; if (messages2 && Object.keys(messages2).length > 0) { locales = Object.keys(messages2); } const lang = startsWith(locale, locales); if (lang) { return lang; } } class I18n { constructor({ locale, fallbackLocale, messages: messages2, watcher, formater: formater2 }) { this.locale = LOCALE_EN; this.fallbackLocale = LOCALE_EN; this.message = {}; this.messages = {}; this.watchers = []; if (fallbackLocale) { this.fallbackLocale = fallbackLocale; } this.formater = formater2 || defaultFormatter; this.messages = messages2 || {}; this.setLocale(locale || LOCALE_EN); if (watcher) { this.watchLocale(watcher); } } setLocale(locale) { const oldLocale = this.locale; this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale; if (!this.messages[this.locale]) { this.messages[this.locale] = {}; } this.message = this.messages[this.locale]; if (oldLocale !== this.locale) { this.watchers.forEach((watcher) => { watcher(this.locale, oldLocale); }); } } getLocale() { return this.locale; } watchLocale(fn) { const index2 = this.watchers.push(fn) - 1; return () => { this.watchers.splice(index2, 1); }; } add(locale, message, override = true) { const curMessages = this.messages[locale]; if (curMessages) { if (override) { Object.assign(curMessages, message); } else { Object.keys(message).forEach((key) => { if (!hasOwn(curMessages, key)) { curMessages[key] = message[key]; } }); } } else { this.messages[locale] = message; } } f(message, values, delimiters) { return this.formater.interpolate(message, values, delimiters).join(""); } t(key, locale, values) { let message = this.message; if (typeof locale === "string") { locale = normalizeLocale(locale, this.messages); locale && (message = this.messages[locale]); } else { values = locale; } if (!hasOwn(message, key)) { console.warn(`Cannot translate the value of keypath ${key}. Use the value of keypath as default.`); return key; } return this.formater.interpolate(message[key], values).join(""); } } function watchAppLocale(appVm, i18n) { if (appVm.$watchLocale) { appVm.$watchLocale((newLocale) => { i18n.setLocale(newLocale); }); } else { appVm.$watch(() => appVm.$locale, (newLocale) => { i18n.setLocale(newLocale); }); } } function getDefaultLocale() { if (typeof uni !== "undefined" && uni.getLocale) { return uni.getLocale(); } if (typeof global !== "undefined" && global.getLocale) { return global.getLocale(); } return LOCALE_EN; } function initVueI18n(locale, messages2 = {}, fallbackLocale, watcher) { if (typeof locale !== "string") { const options2 = [ messages2, locale ]; locale = options2[0]; messages2 = options2[1]; } if (typeof locale !== "string") { locale = getDefaultLocale(); } if (typeof fallbackLocale !== "string") { fallbackLocale = typeof __uniConfig !== "undefined" && __uniConfig.fallbackLocale || LOCALE_EN; } const i18n = new I18n({ locale, fallbackLocale, messages: messages2, watcher }); let t2 = (key, values) => { if (typeof getApp !== "function") { t2 = function(key2, values2) { return i18n.t(key2, values2); }; } else { let isWatchedAppLocale = false; t2 = function(key2, values2) { const appVm = getApp().$vm; if (appVm) { appVm.$locale; if (!isWatchedAppLocale) { isWatchedAppLocale = true; watchAppLocale(appVm, i18n); } } return i18n.t(key2, values2); }; } return t2(key, values); }; return { i18n, f(message, values, delimiters) { return i18n.f(message, values, delimiters); }, t(key, values) { return t2(key, values); }, add(locale2, message, override = true) { return i18n.add(locale2, message, override); }, watch(fn) { return i18n.watchLocale(fn); }, getLocale() { return i18n.getLocale(); }, setLocale(newLocale) { return i18n.setLocale(newLocale); } }; } const en$1 = { "zp.refresher.default": "Pull down to refresh", "zp.refresher.pulling": "Release to refresh", "zp.refresher.refreshing": "Refreshing...", "zp.refresher.complete": "Refresh succeeded", "zp.refresher.f2": "Refresh to enter 2f", "zp.loadingMore.default": "Click to load more", "zp.loadingMore.loading": "Loading...", "zp.loadingMore.noMore": "No more data", "zp.loadingMore.fail": "Load failed,click to reload", "zp.emptyView.title": "No data", "zp.emptyView.reload": "Reload", "zp.emptyView.error": "Sorry,load failed", "zp.refresherUpdateTime.title": "Last update: ", "zp.refresherUpdateTime.none": "None", "zp.refresherUpdateTime.today": "Today", "zp.refresherUpdateTime.yesterday": "Yesterday", "zp.systemLoading.title": "Loading..." }; const zhHans$1 = { "zp.refresher.default": "继续下拉刷新", "zp.refresher.pulling": "松开立即刷新", "zp.refresher.refreshing": "正在刷新...", "zp.refresher.complete": "刷新成功", "zp.refresher.f2": "松手进入二楼", "zp.loadingMore.default": "点击加载更多", "zp.loadingMore.loading": "正在加载...", "zp.loadingMore.noMore": "没有更多了", "zp.loadingMore.fail": "加载失败,点击重新加载", "zp.emptyView.title": "没有数据哦~", "zp.emptyView.reload": "重新加载", "zp.emptyView.error": "很抱歉,加载失败", "zp.refresherUpdateTime.title": "最后更新:", "zp.refresherUpdateTime.none": "无", "zp.refresherUpdateTime.today": "今天", "zp.refresherUpdateTime.yesterday": "昨天", "zp.systemLoading.title": "加载中..." }; const zhHant$1 = { "zp.refresher.default": "繼續下拉重繪", "zp.refresher.pulling": "鬆開立即重繪", "zp.refresher.refreshing": "正在重繪...", "zp.refresher.complete": "重繪成功", "zp.refresher.f2": "鬆手進入二樓", "zp.loadingMore.default": "點擊加載更多", "zp.loadingMore.loading": "正在加載...", "zp.loadingMore.noMore": "沒有更多了", "zp.loadingMore.fail": "加載失敗,點擊重新加載", "zp.emptyView.title": "沒有數據哦~", "zp.emptyView.reload": "重新加載", "zp.emptyView.error": "很抱歉,加載失敗", "zp.refresherUpdateTime.title": "最後更新:", "zp.refresherUpdateTime.none": "無", "zp.refresherUpdateTime.today": "今天", "zp.refresherUpdateTime.yesterday": "昨天", "zp.systemLoading.title": "加載中..." }; const messages$1 = { en: en$1, "zh-Hans": zhHans$1, "zh-Hant": zhHant$1 }; const { t: t$2 } = initVueI18n(messages$1); const i18nModule = { computed: { finalLanguage() { try { const local = uni.getLocale(); const language = this.systemInfo.appLanguage; return local === "auto" ? interceptor._handleLanguage2Local(language, this._language2Local(language)) : local; } catch (e2) { return "zh-Hans"; } }, // 最终的下拉刷新默认状态的文字 finalRefresherDefaultText() { return this._getI18nText("zp.refresher.default", this.refresherDefaultText); }, // 最终的下拉刷新下拉中的文字 finalRefresherPullingText() { return this._getI18nText("zp.refresher.pulling", this.refresherPullingText); }, // 最终的下拉刷新中文字 finalRefresherRefreshingText() { return this._getI18nText("zp.refresher.refreshing", this.refresherRefreshingText); }, // 最终的下拉刷新完成文字 finalRefresherCompleteText() { return this._getI18nText("zp.refresher.complete", this.refresherCompleteText); }, // 最终的下拉刷新上次更新时间文字 finalRefresherUpdateTimeTextMap() { return { title: t$2("zp.refresherUpdateTime.title"), none: t$2("zp.refresherUpdateTime.none"), today: t$2("zp.refresherUpdateTime.today"), yesterday: t$2("zp.refresherUpdateTime.yesterday") }; }, // 最终的继续下拉进入二楼文字 finalRefresherGoF2Text() { return this._getI18nText("zp.refresher.f2", this.refresherGoF2Text); }, // 最终的底部加载更多默认状态文字 finalLoadingMoreDefaultText() { return this._getI18nText("zp.loadingMore.default", this.loadingMoreDefaultText); }, // 最终的底部加载更多加载中文字 finalLoadingMoreLoadingText() { return this._getI18nText("zp.loadingMore.loading", this.loadingMoreLoadingText); }, // 最终的底部加载更多没有更多数据文字 finalLoadingMoreNoMoreText() { return this._getI18nText("zp.loadingMore.noMore", this.loadingMoreNoMoreText); }, // 最终的底部加载更多加载失败文字 finalLoadingMoreFailText() { return this._getI18nText("zp.loadingMore.fail", this.loadingMoreFailText); }, // 最终的空数据图title finalEmptyViewText() { return this.isLoadFailed ? this.finalEmptyViewErrorText : this._getI18nText("zp.emptyView.title", this.emptyViewText); }, // 最终的空数据图reload title finalEmptyViewReloadText() { return this._getI18nText("zp.emptyView.reload", this.emptyViewReloadText); }, // 最终的空数据图加载失败文字 finalEmptyViewErrorText() { return this.customerEmptyViewErrorText || this._getI18nText("zp.emptyView.error", this.emptyViewErrorText); }, // 最终的系统loading title finalSystemLoadingText() { return this._getI18nText("zp.systemLoading.title", this.systemLoadingText); } }, methods: { // 获取当前z-paging的语言 getLanguage() { return this.finalLanguage; }, // 获取国际化转换后的文本 _getI18nText(key, value2) { const dataType = Object.prototype.toString.call(value2); if (dataType === "[object Object]") { const nextValue = value2[this.finalLanguage]; if (nextValue) return nextValue; } else if (dataType === "[object String]") { return value2; } return t$2(key); }, // 系统language转i18n local _language2Local(language) { const formatedLanguage = language.toLowerCase().replace(new RegExp("_", ""), "-"); if (formatedLanguage.indexOf("zh") !== -1) { if (formatedLanguage === "zh" || formatedLanguage === "zh-cn" || formatedLanguage.indexOf("zh-hans") !== -1) { return "zh-Hans"; } return "zh-Hant"; } if (formatedLanguage.indexOf("en") !== -1) return "en"; return language; } } }; const nvueModule = { props: {}, data() { return { nRefresherLoading: false, nListIsDragging: false, nShowBottom: true, nFixFreezing: false, nShowRefresherReveal: false, nLoadingMoreFixedHeight: false, nShowRefresherRevealHeight: 0, nOldShowRefresherRevealHeight: -1, nRefresherWidth: u$1.rpx2px(750), nListHeight: 0, nF2Opacity: 0 }; }, computed: {}, mounted() { }, methods: {} }; const emptyModule = { props: { // 是否强制隐藏空数据图,默认为否 hideEmptyView: { type: Boolean, default: u$1.gc("hideEmptyView", false) }, // 空数据图描述文字,默认为“没有数据哦~” emptyViewText: { type: [String, Object], default: u$1.gc("emptyViewText", null) }, // 是否显示空数据图重新加载按钮(无数据时),默认为否 showEmptyViewReload: { type: Boolean, default: u$1.gc("showEmptyViewReload", false) }, // 加载失败时是否显示空数据图重新加载按钮,默认为是 showEmptyViewReloadWhenError: { type: Boolean, default: u$1.gc("showEmptyViewReloadWhenError", true) }, // 空数据图点击重新加载文字,默认为“重新加载” emptyViewReloadText: { type: [String, Object], default: u$1.gc("emptyViewReloadText", null) }, // 空数据图图片,默认使用z-paging内置的图片 emptyViewImg: { type: String, default: u$1.gc("emptyViewImg", "") }, // 空数据图“加载失败”描述文字,默认为“很抱歉,加载失败” emptyViewErrorText: { type: [String, Object], default: u$1.gc("emptyViewErrorText", null) }, // 空数据图“加载失败”图片,默认使用z-paging内置的图片 emptyViewErrorImg: { type: String, default: u$1.gc("emptyViewErrorImg", "") }, // 空数据图样式 emptyViewStyle: { type: Object, default: u$1.gc("emptyViewStyle", {}) }, // 空数据图容器样式 emptyViewSuperStyle: { type: Object, default: u$1.gc("emptyViewSuperStyle", {}) }, // 空数据图img样式 emptyViewImgStyle: { type: Object, default: u$1.gc("emptyViewImgStyle", {}) }, // 空数据图描述文字样式 emptyViewTitleStyle: { type: Object, default: u$1.gc("emptyViewTitleStyle", {}) }, // 空数据图重新加载按钮样式 emptyViewReloadStyle: { type: Object, default: u$1.gc("emptyViewReloadStyle", {}) }, // 空数据图片是否铺满z-paging,默认为否,即填充满z-paging内列表(滚动区域)部分。若设置为否,则为填铺满整个z-paging emptyViewFixed: { type: Boolean, default: u$1.gc("emptyViewFixed", false) }, // 空数据图片是否垂直居中,默认为是,若设置为否即为从空数据容器顶部开始显示。emptyViewFixed为false时有效 emptyViewCenter: { type: Boolean, default: u$1.gc("emptyViewCenter", true) }, // 加载中时是否自动隐藏空数据图,默认为是 autoHideEmptyViewWhenLoading: { type: Boolean, default: u$1.gc("autoHideEmptyViewWhenLoading", true) }, // 用户下拉列表触发下拉刷新加载中时是否自动隐藏空数据图,默认为是 autoHideEmptyViewWhenPull: { type: Boolean, default: u$1.gc("autoHideEmptyViewWhenPull", true) }, // 空数据view的z-index,默认为9 emptyViewZIndex: { type: Number, default: u$1.gc("emptyViewZIndex", 9) } }, data() { return { customerEmptyViewErrorText: "" }; }, computed: { finalEmptyViewImg() { return this.isLoadFailed ? this.emptyViewErrorImg : this.emptyViewImg; }, finalShowEmptyViewReload() { return this.isLoadFailed ? this.showEmptyViewReloadWhenError : this.showEmptyViewReload; }, // 是否展示空数据图 showEmpty() { if (this.isOnly || this.hideEmptyView || this.realTotalData.length) return false; if (this.autoHideEmptyViewWhenLoading) { if (this.isAddedData && !this.firstPageLoaded && !this.loading) return true; } else { return true; } return !this.autoHideEmptyViewWhenPull && !this.isUserReload; } }, methods: { // 点击了空数据view重新加载按钮 _emptyViewReload() { let callbacked = false; this.$emit("emptyViewReload", (reload) => { if (reload === void 0 || reload === true) { this.fromEmptyViewReload = true; this.reload().catch(() => { }); } callbacked = true; }); this.$nextTick(() => { if (!callbacked) { this.fromEmptyViewReload = true; this.reload().catch(() => { }); } }); }, // 点击了空数据view _emptyViewClick() { this.$emit("emptyViewClick"); } } }; const refresherModule = { props: { // 下拉刷新的主题样式,支持black,white,默认black refresherThemeStyle: { type: String, default: u$1.gc("refresherThemeStyle", "") }, // 自定义下拉刷新中左侧图标的样式 refresherImgStyle: { type: Object, default: u$1.gc("refresherImgStyle", {}) }, // 自定义下拉刷新中右侧状态描述文字的样式 refresherTitleStyle: { type: Object, default: u$1.gc("refresherTitleStyle", {}) }, // 自定义下拉刷新中右侧最后更新时间文字的样式(show-refresher-update-time为true时有效) refresherUpdateTimeStyle: { type: Object, default: u$1.gc("refresherUpdateTimeStyle", {}) }, // 在微信小程序和QQ小程序中,是否实时监听下拉刷新中进度,默认为否 watchRefresherTouchmove: { type: Boolean, default: u$1.gc("watchRefresherTouchmove", false) }, // 底部加载更多的主题样式,支持black,white,默认black loadingMoreThemeStyle: { type: String, default: u$1.gc("loadingMoreThemeStyle", "") }, // 是否只使用下拉刷新,设置为true后将关闭mounted自动请求数据、关闭滚动到底部加载更多,强制隐藏空数据图。默认为否 refresherOnly: { type: Boolean, default: u$1.gc("refresherOnly", false) }, // 自定义下拉刷新默认状态下回弹动画时间,单位为毫秒,默认为100毫秒,nvue无效 refresherDefaultDuration: { type: [Number, String], default: u$1.gc("refresherDefaultDuration", 100) }, // 自定义下拉刷新结束以后延迟回弹的时间,单位为毫秒,默认为0 refresherCompleteDelay: { type: [Number, String], default: u$1.gc("refresherCompleteDelay", 0) }, // 自定义下拉刷新结束回弹动画时间,单位为毫秒,默认为300毫秒(refresherEndBounceEnabled为false时,refresherCompleteDuration为设定值的1/3),nvue无效 refresherCompleteDuration: { type: [Number, String], default: u$1.gc("refresherCompleteDuration", 300) }, // 自定义下拉刷新中是否允许列表滚动,默认为是 refresherRefreshingScrollable: { type: Boolean, default: u$1.gc("refresherRefreshingScrollable", true) }, // 自定义下拉刷新结束状态下是否允许列表滚动,默认为否 refresherCompleteScrollable: { type: Boolean, default: u$1.gc("refresherCompleteScrollable", false) }, // 是否使用自定义的下拉刷新,默认为是,即使用z-paging的下拉刷新。设置为false即代表使用uni scroll-view自带的下拉刷新,h5、App、微信小程序以外的平台不支持uni scroll-view自带的下拉刷新 useCustomRefresher: { type: Boolean, default: u$1.gc("useCustomRefresher", true) }, // 自定义下拉刷新下拉帧率,默认为40,过高可能会出现抖动问题 refresherFps: { type: [Number, String], default: u$1.gc("refresherFps", 40) }, // 自定义下拉刷新允许触发的最大下拉角度,默认为40度,当下拉角度小于设定值时,自定义下拉刷新动画不会被触发 refresherMaxAngle: { type: [Number, String], default: u$1.gc("refresherMaxAngle", 40) }, // 自定义下拉刷新的角度由未达到最大角度变到达到最大角度时,是否继续下拉刷新手势,默认为否 refresherAngleEnableChangeContinued: { type: Boolean, default: u$1.gc("refresherAngleEnableChangeContinued", false) }, // 自定义下拉刷新默认状态下的文字 refresherDefaultText: { type: [String, Object], default: u$1.gc("refresherDefaultText", null) }, // 自定义下拉刷新松手立即刷新状态下的文字 refresherPullingText: { type: [String, Object], default: u$1.gc("refresherPullingText", null) }, // 自定义下拉刷新刷新中状态下的文字 refresherRefreshingText: { type: [String, Object], default: u$1.gc("refresherRefreshingText", null) }, // 自定义下拉刷新刷新结束状态下的文字 refresherCompleteText: { type: [String, Object], default: u$1.gc("refresherCompleteText", null) }, // 自定义继续下拉进入二楼文字 refresherGoF2Text: { type: [String, Object], default: u$1.gc("refresherGoF2Text", null) }, // 自定义下拉刷新默认状态下的图片 refresherDefaultImg: { type: String, default: u$1.gc("refresherDefaultImg", null) }, // 自定义下拉刷新松手立即刷新状态下的图片,默认与refresherDefaultImg一致 refresherPullingImg: { type: String, default: u$1.gc("refresherPullingImg", null) }, // 自定义下拉刷新刷新中状态下的图片 refresherRefreshingImg: { type: String, default: u$1.gc("refresherRefreshingImg", null) }, // 自定义下拉刷新刷新结束状态下的图片 refresherCompleteImg: { type: String, default: u$1.gc("refresherCompleteImg", null) }, // 自定义下拉刷新刷新中状态下是否展示旋转动画 refresherRefreshingAnimated: { type: Boolean, default: u$1.gc("refresherRefreshingAnimated", true) }, // 是否开启自定义下拉刷新刷新结束回弹效果,默认为是 refresherEndBounceEnabled: { type: Boolean, default: u$1.gc("refresherEndBounceEnabled", true) }, // 是否开启自定义下拉刷新,默认为是 refresherEnabled: { type: Boolean, default: u$1.gc("refresherEnabled", true) }, // 设置自定义下拉刷新阈值,默认为80rpx refresherThreshold: { type: [Number, String], default: u$1.gc("refresherThreshold", "80rpx") }, // 设置系统下拉刷新默认样式,支持设置 black,white,none,none 表示不使用默认样式,默认为black refresherDefaultStyle: { type: String, default: u$1.gc("refresherDefaultStyle", "black") }, // 设置自定义下拉刷新区域背景 refresherBackground: { type: String, default: u$1.gc("refresherBackground", "transparent") }, // 设置固定的自定义下拉刷新区域背景 refresherFixedBackground: { type: String, default: u$1.gc("refresherFixedBackground", "transparent") }, // 设置固定的自定义下拉刷新区域高度,默认为0 refresherFixedBacHeight: { type: [Number, String], default: u$1.gc("refresherFixedBacHeight", 0) }, // 设置自定义下拉刷新下拉超出阈值后继续下拉位移衰减的比例,范围0-1,值越大代表衰减越多。默认为0.65(nvue无效) refresherOutRate: { type: Number, default: u$1.gc("refresherOutRate", 0.65) }, // 是否开启下拉进入二楼功能,默认为否 refresherF2Enabled: { type: Boolean, default: u$1.gc("refresherF2Enabled", false) }, // 下拉进入二楼阈值,默认为200rpx refresherF2Threshold: { type: [Number, String], default: u$1.gc("refresherF2Threshold", "200rpx") }, // 下拉进入二楼动画时间,单位为毫秒,默认为200毫秒 refresherF2Duration: { type: [Number, String], default: u$1.gc("refresherF2Duration", 200) }, // 下拉进入二楼状态松手后是否弹出二楼,默认为是 showRefresherF2: { type: Boolean, default: u$1.gc("showRefresherF2", true) }, // 设置自定义下拉刷新下拉时实际下拉位移与用户下拉距离的比值,默认为0.75,即代表若用户下拉10px,则实际位移为7.5px(nvue无效) refresherPullRate: { type: Number, default: u$1.gc("refresherPullRate", 0.75) }, // 是否显示最后更新时间,默认为否 showRefresherUpdateTime: { type: Boolean, default: u$1.gc("showRefresherUpdateTime", false) }, // 如果需要区别不同页面的最后更新时间,请为不同页面的z-paging的`refresher-update-time-key`设置不同的字符串 refresherUpdateTimeKey: { type: String, default: u$1.gc("refresherUpdateTimeKey", "default") }, // 下拉刷新时下拉到“松手立即刷新”或“松手进入二楼”状态时是否使手机短振动,默认为否(h5无效) refresherVibrate: { type: Boolean, default: u$1.gc("refresherVibrate", false) }, // 下拉刷新时是否禁止下拉刷新view跟随用户触摸竖直移动,默认为否。注意此属性只是禁止下拉刷新view移动,其他下拉刷新逻辑依然会正常触发 refresherNoTransform: { type: Boolean, default: u$1.gc("refresherNoTransform", false) }, // 是否开启下拉刷新状态栏占位,适用于隐藏导航栏时,下拉刷新需要避开状态栏高度的情况,默认为否 useRefresherStatusBarPlaceholder: { type: Boolean, default: u$1.gc("useRefresherStatusBarPlaceholder", false) } }, data() { return { R: Enum.Refresher, //下拉刷新状态 refresherStatus: Enum.Refresher.Default, refresherTouchstartY: 0, lastRefresherTouchmove: null, refresherReachMaxAngle: true, refresherTransform: "translateY(0px)", refresherTransition: "", finalRefresherDefaultStyle: "black", refresherRevealStackCount: 0, refresherCompleteTimeout: null, refresherCompleteSubTimeout: null, refresherEndTimeout: null, isTouchmovingTimeout: null, refresherTriggered: false, isTouchmoving: false, isTouchEnded: false, isUserPullDown: false, privateRefresherEnabled: -1, privateShowRefresherWhenReload: false, customRefresherHeight: -1, showCustomRefresher: false, doRefreshAnimateAfter: false, isRefresherInComplete: false, showF2: false, f2Transform: "", pullDownTimeStamp: 0, moveDis: 0, oldMoveDis: 0, currentDis: 0, oldCurrentMoveDis: 0, oldRefresherTouchmoveY: 0, oldTouchDirection: "", oldEmitedTouchDirection: "", oldPullingDistance: -1, refresherThresholdUpdateTag: 0 }; }, watch: { refresherDefaultStyle: { handler(newVal) { if (newVal.length) { this.finalRefresherDefaultStyle = newVal; } }, immediate: true }, refresherStatus(newVal) { newVal === Enum.Refresher.Loading && this._cleanRefresherEndTimeout(); this.refresherVibrate && (newVal === Enum.Refresher.ReleaseToRefresh || newVal === Enum.Refresher.GoF2) && this._doVibrateShort(); this.$emit("refresherStatusChange", newVal); this.$emit("update:refresherStatus", newVal); }, // 监听当前下拉刷新启用/禁用状态 refresherEnabled(newVal) { !newVal && this.endRefresh(); } }, computed: { pullDownDisTimeStamp() { return 1e3 / this.refresherFps; }, refresherThresholdUnitConverted() { return u$1.addUnit(this.refresherThreshold, this.unit); }, finalRefresherEnabled() { if (this.layoutOnly || this.useChatRecordMode) return false; if (this.privateRefresherEnabled === -1) return this.refresherEnabled; return this.privateRefresherEnabled === 1; }, finalRefresherThreshold() { let refresherThreshold = this.refresherThresholdUnitConverted; let idDefault = false; if (refresherThreshold === u$1.addUnit(80, this.unit)) { idDefault = true; if (this.showRefresherUpdateTime) { refresherThreshold = u$1.addUnit(120, this.unit); } } if (idDefault && this.customRefresherHeight > 0) return this.customRefresherHeight + this.finalRefresherThresholdPlaceholder; return u$1.convertToPx(refresherThreshold) + this.finalRefresherThresholdPlaceholder; }, finalRefresherF2Threshold() { return u$1.convertToPx(u$1.addUnit(this.refresherF2Threshold, this.unit)); }, finalRefresherThresholdPlaceholder() { return this.useRefresherStatusBarPlaceholder ? this.statusBarHeight : 0; }, finalRefresherFixedBacHeight() { return u$1.convertToPx(this.refresherFixedBacHeight); }, finalRefresherThemeStyle() { return this.refresherThemeStyle.length ? this.refresherThemeStyle : this.defaultThemeStyle; }, finalRefresherOutRate() { let rate = this.refresherOutRate; rate = Math.max(0, rate); rate = Math.min(1, rate); return rate; }, finalRefresherPullRate() { let rate = this.refresherPullRate; rate = Math.max(0, rate); return rate; }, finalRefresherTransform() { if (this.refresherNoTransform || this.refresherTransform === "translateY(0px)") return "none"; return this.refresherTransform; }, finalShowRefresherWhenReload() { return this.showRefresherWhenReload || this.privateShowRefresherWhenReload; }, finalRefresherTriggered() { if (!(this.finalRefresherEnabled && !this.useCustomRefresher)) return false; return this.refresherTriggered; }, showRefresher() { const showRefresher = this.finalRefresherEnabled || this.useCustomRefresher && !this.useChatRecordMode; this.active && this.customRefresherHeight === -1 && showRefresher && this.updateCustomRefresherHeight(); return showRefresher; }, hasTouchmove() { return this.watchRefresherTouchmove; } }, methods: { // 终止下拉刷新状态 endRefresh() { this.totalData = this.realTotalData; this._refresherEnd(); this._endSystemLoadingAndRefresh(); this._handleScrollViewBounce({ bounce: true }); this.$nextTick(() => { this.refresherTriggered = false; }); }, // 手动更新自定义下拉刷新view高度 updateCustomRefresherHeight() { u$1.delay(() => this.$nextTick(this._updateCustomRefresherHeight)); }, // 进入二楼 goF2() { this._handleGoF2(); }, // 关闭二楼 closeF2() { this._handleCloseF2(); }, // 自定义下拉刷新被触发 _onRefresh(fromScrollView = false, isUserPullDown = true) { if (fromScrollView && !(this.finalRefresherEnabled && !this.useCustomRefresher)) return; this.$emit("onRefresh"); this.$emit("Refresh"); if (this.loading || this.isRefresherInComplete) return; this.loadingType = Enum.LoadingType.Refresher; if (this.nShowRefresherReveal) return; this.isUserPullDown = isUserPullDown; this.isUserReload = !isUserPullDown; this._startLoading(true); this.refresherTriggered = true; if (this.reloadWhenRefresh && isUserPullDown) { this.useChatRecordMode ? this._onLoadingMore("click") : this._reload(false, false, isUserPullDown); } }, // 自定义下拉刷新被复位 _onRestore() { this.refresherTriggered = "restore"; this.$emit("onRestore"); this.$emit("Restore"); }, // 进一步处理touch开始结果 _handleRefresherTouchstart(touch) { if (!this.loading && this.isTouchEnded) { this.isTouchmoving = false; } this.loadingType = Enum.LoadingType.Refresher; this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); this.isTouchEnded = false; this.refresherTransition = ""; this.refresherTouchstartY = touch.touchY; this.$emit("refresherTouchstart", this.refresherTouchstartY); this.lastRefresherTouchmove = touch; this._cleanRefresherCompleteTimeout(); this._cleanRefresherEndTimeout(); }, // 非app-vue或微信小程序或QQ小程序或h5平台,使用js控制下拉刷新 // 进一步处理touch中结果 _handleRefresherTouchmove(moveDis, touch) { this.refresherReachMaxAngle = true; this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); this.isTouchmoving = true; this.isTouchEnded = false; if (moveDis >= this.finalRefresherThreshold) { this.refresherStatus = this.refresherF2Enabled && moveDis >= this.finalRefresherF2Threshold ? Enum.Refresher.GoF2 : Enum.Refresher.ReleaseToRefresh; } else { this.refresherStatus = Enum.Refresher.Default; } this.moveDis = moveDis; }, // 进一步处理touch结束结果 _handleRefresherTouchend(moveDis) { this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); this.refresherReachMaxAngle = true; this.isTouchEnded = true; const refresherThreshold = this.finalRefresherThreshold; if (moveDis >= refresherThreshold && [Enum.Refresher.ReleaseToRefresh, Enum.Refresher.GoF2].indexOf(this.refresherStatus) >= 0) { if (this.refresherStatus === Enum.Refresher.GoF2) { this._handleGoF2(); this._refresherEnd(); } else { u$1.delay(() => { this._emitTouchmove({ pullingDistance: refresherThreshold, dy: this.moveDis - refresherThreshold }); }, 0.1); this.moveDis = refresherThreshold; this.refresherStatus = Enum.Refresher.Loading; this._doRefresherLoad(); } } else { this._refresherEnd(); this.isTouchmovingTimeout = u$1.delay(() => { this.isTouchmoving = false; }, this.refresherDefaultDuration); } this.scrollEnable = true; this.$emit("refresherTouchend", moveDis); }, // 处理列表触摸开始事件 _handleListTouchstart() { if (this.useChatRecordMode && this.autoHideKeyboardWhenChat) { uni.hideKeyboard(); this.$emit("hidedKeyboard"); } }, // 处理scroll-view bounce是否生效 _handleScrollViewBounce({ bounce }) { if (!this.usePageScroll && !this.scrollToTopBounceEnabled) { if (this.wxsScrollTop <= 5) { this.refresherTransition = ""; this.scrollEnable = bounce; } else if (bounce) { this.scrollEnable = bounce; } } }, // wxs正在下拉状态改变处理 _handleWxsPullingDownStatusChange(onPullingDown) { this.wxsOnPullingDown = onPullingDown; if (onPullingDown && !this.useChatRecordMode) { this.renderPropScrollTop = 0; } }, // wxs正在下拉处理 _handleWxsPullingDown({ moveDis, diffDis }) { this._emitTouchmove({ pullingDistance: moveDis, dy: diffDis }); }, // wxs触摸方向改变 _handleTouchDirectionChange({ direction }) { this.$emit("touchDirectionChange", direction); }, // wxs通知更新其props _handlePropUpdate() { this.wxsPropType = u$1.getTime().toString(); }, // 下拉刷新结束 _refresherEnd(shouldEndLoadingDelay = true, fromAddData = false, isUserPullDown = false, setLoading = true) { if (this.loadingType === Enum.LoadingType.Refresher) { const refresherCompleteDelay = fromAddData && (isUserPullDown || this.showRefresherWhenReload) ? this.refresherCompleteDelay : 0; const refresherStatus = refresherCompleteDelay > 0 ? Enum.Refresher.Complete : Enum.Refresher.Default; if (this.finalShowRefresherWhenReload) { const stackCount = this.refresherRevealStackCount; this.refresherRevealStackCount--; if (stackCount > 1) return; } this._cleanRefresherEndTimeout(); this.refresherEndTimeout = u$1.delay(() => { this.refresherStatus = refresherStatus; if (refresherStatus !== Enum.Refresher.Complete) { this.isRefresherInComplete = false; } }, this.refresherStatus !== Enum.Refresher.Default && refresherStatus === Enum.Refresher.Default ? this.refresherCompleteDuration : 0); if (refresherCompleteDelay > 0) { this.isRefresherInComplete = true; } this._cleanRefresherCompleteTimeout(); this.refresherCompleteTimeout = u$1.delay(() => { let animateDuration = 1; const animateType = this.refresherEndBounceEnabled && fromAddData ? "cubic-bezier(0.19,1.64,0.42,0.72)" : "linear"; if (fromAddData) { animateDuration = this.refresherEndBounceEnabled ? this.refresherCompleteDuration / 1e3 : this.refresherCompleteDuration / 3e3; } this.refresherTransition = `transform ${fromAddData ? animateDuration : this.refresherDefaultDuration / 1e3}s ${animateType}`; this.wxsPropType = this.refresherTransition + "end" + u$1.getTime(); this.moveDis = 0; if (refresherStatus === Enum.Refresher.Complete) { if (this.refresherCompleteSubTimeout) { clearTimeout(this.refresherCompleteSubTimeout); this.refresherCompleteSubTimeout = null; } this.refresherCompleteSubTimeout = u$1.delay(() => { this.$nextTick(() => { this.refresherStatus = Enum.Refresher.Default; this.isRefresherInComplete = false; }); }, animateDuration * 800); } this._emitTouchmove({ pullingDistance: 0, dy: this.moveDis }); }, refresherCompleteDelay); } if (setLoading) { u$1.delay(() => this.loading = false, shouldEndLoadingDelay ? 10 : 0); isUserPullDown && this._onRestore(); } }, // 处理进入二楼 _handleGoF2() { if (this.showF2 || !this.refresherF2Enabled) return; this.$emit("refresherF2Change", "go"); if (!this.showRefresherF2) return; this.f2Transform = `translateY(${-this.superContentHeight}px)`; this.showF2 = true; u$1.delay(() => { this.f2Transform = "translateY(0px)"; }, 100, "f2ShowDelay"); }, // 处理退出二楼 _handleCloseF2() { if (!this.showF2 || !this.refresherF2Enabled) return; this.$emit("refresherF2Change", "close"); if (!this.showRefresherF2) return; this.f2Transform = `translateY(${-this.superContentHeight}px)`; u$1.delay(() => { this.showF2 = false; this.nF2Opacity = 0; }, this.refresherF2Duration, "f2CloseDelay"); }, // 模拟用户手动触发下拉刷新 _doRefresherRefreshAnimate() { this._cleanRefresherCompleteTimeout(); const doRefreshAnimateAfter = !this.doRefreshAnimateAfter && this.finalShowRefresherWhenReload && this.customRefresherHeight === -1 && this.refresherThreshold === u$1.addUnit(80, this.unit); if (doRefreshAnimateAfter) { this.doRefreshAnimateAfter = true; return; } this.refresherRevealStackCount++; this.wxsPropType = "begin" + u$1.getTime(); this.moveDis = this.finalRefresherThreshold; this.refresherStatus = Enum.Refresher.Loading; this.isTouchmoving = true; this.isTouchmovingTimeout && clearTimeout(this.isTouchmovingTimeout); this._doRefresherLoad(false); }, // 触发下拉刷新 _doRefresherLoad(isUserPullDown = true) { this._onRefresh(false, isUserPullDown); this.loading = true; }, // 更新自定义下拉刷新view高度 _updateCustomRefresherHeight() { this._getNodeClientRect(".zp-custom-refresher-slot-view").then((res) => { this.customRefresherHeight = res ? res[0].height : 0; this.showCustomRefresher = this.customRefresherHeight > 0; if (this.doRefreshAnimateAfter) { this.doRefreshAnimateAfter = false; this._doRefresherRefreshAnimate(); } }); }, // emit pullingDown事件 _emitTouchmove(e2) { e2.viewHeight = this.finalRefresherThreshold; e2.rate = e2.viewHeight > 0 ? e2.pullingDistance / e2.viewHeight : 0; this.hasTouchmove && this.oldPullingDistance !== e2.pullingDistance && this.$emit("refresherTouchmove", e2); this.oldPullingDistance = e2.pullingDistance; }, // 清除refresherCompleteTimeout _cleanRefresherCompleteTimeout() { this.refresherCompleteTimeout = this._cleanTimeout(this.refresherCompleteTimeout); }, // 清除refresherEndTimeout _cleanRefresherEndTimeout() { this.refresherEndTimeout = this._cleanTimeout(this.refresherEndTimeout); } } }; const loadMoreModule = { props: { // 自定义底部加载更多样式 loadingMoreCustomStyle: { type: Object, default: u$1.gc("loadingMoreCustomStyle", {}) }, // 自定义底部加载更多文字样式 loadingMoreTitleCustomStyle: { type: Object, default: u$1.gc("loadingMoreTitleCustomStyle", {}) }, // 自定义底部加载更多加载中动画样式 loadingMoreLoadingIconCustomStyle: { type: Object, default: u$1.gc("loadingMoreLoadingIconCustomStyle", {}) }, // 自定义底部加载更多加载中动画图标类型,可选flower或circle,默认为flower loadingMoreLoadingIconType: { type: String, default: u$1.gc("loadingMoreLoadingIconType", "flower") }, // 自定义底部加载更多加载中动画图标图片 loadingMoreLoadingIconCustomImage: { type: String, default: u$1.gc("loadingMoreLoadingIconCustomImage", "") }, // 底部加载更多加载中view是否展示旋转动画,默认为是 loadingMoreLoadingAnimated: { type: Boolean, default: u$1.gc("loadingMoreLoadingAnimated", true) }, // 是否启用加载更多数据(含滑动到底部加载更多数据和点击加载更多数据),默认为是 loadingMoreEnabled: { type: Boolean, default: u$1.gc("loadingMoreEnabled", true) }, // 是否启用滑动到底部加载更多数据,默认为是 toBottomLoadingMoreEnabled: { type: Boolean, default: u$1.gc("toBottomLoadingMoreEnabled", true) }, // 滑动到底部状态为默认状态时,以加载中的状态展示,默认为否。若设置为是,可避免滚动到底部看到默认状态然后立刻变为加载中状态的问题,但分页数量未超过一屏时,不会显示【点击加载更多】 loadingMoreDefaultAsLoading: { type: Boolean, default: u$1.gc("loadingMoreDefaultAsLoading", false) }, // 滑动到底部"默认"文字,默认为【点击加载更多】 loadingMoreDefaultText: { type: [String, Object], default: u$1.gc("loadingMoreDefaultText", null) }, // 滑动到底部"加载中"文字,默认为【正在加载...】 loadingMoreLoadingText: { type: [String, Object], default: u$1.gc("loadingMoreLoadingText", null) }, // 滑动到底部"没有更多"文字,默认为【没有更多了】 loadingMoreNoMoreText: { type: [String, Object], default: u$1.gc("loadingMoreNoMoreText", null) }, // 滑动到底部"加载失败"文字,默认为【加载失败,点击重新加载】 loadingMoreFailText: { type: [String, Object], default: u$1.gc("loadingMoreFailText", null) }, // 当没有更多数据且分页内容未超出z-paging时是否隐藏没有更多数据的view,默认为否 hideNoMoreInside: { type: Boolean, default: u$1.gc("hideNoMoreInside", false) }, // 当没有更多数据且分页数组长度少于这个值时,隐藏没有更多数据的view,默认为0,代表不限制。 hideNoMoreByLimit: { type: Number, default: u$1.gc("hideNoMoreByLimit", 0) }, // 是否显示默认的加载更多text,默认为是 showDefaultLoadingMoreText: { type: Boolean, default: u$1.gc("showDefaultLoadingMoreText", true) }, // 是否显示没有更多数据的view showLoadingMoreNoMoreView: { type: Boolean, default: u$1.gc("showLoadingMoreNoMoreView", true) }, // 是否显示没有更多数据的分割线,默认为是 showLoadingMoreNoMoreLine: { type: Boolean, default: u$1.gc("showLoadingMoreNoMoreLine", true) }, // 自定义底部没有更多数据的分割线样式 loadingMoreNoMoreLineCustomStyle: { type: Object, default: u$1.gc("loadingMoreNoMoreLineCustomStyle", {}) }, // 当分页未满一屏时,是否自动加载更多,默认为否(nvue无效) insideMore: { type: Boolean, default: u$1.gc("insideMore", false) }, // 距底部/右边多远时(单位px),触发 scrolltolower 事件,默认为100rpx lowerThreshold: { type: [Number, String], default: u$1.gc("lowerThreshold", "100rpx") } }, data() { return { M: Enum.More, // 底部加载更多状态 loadingStatus: Enum.More.Default, // 在渲染之后的底部加载更多状态 loadingStatusAfterRender: Enum.More.Default, // 底部加载更多时间戳 loadingMoreTimeStamp: 0, // 底部加载更多slot loadingMoreDefaultSlot: null, // 是否展示底部加载更多 showLoadingMore: false, // 是否是开发者自定义的加载更多,-1代表交由z-paging自行判断;1代表没有更多了;0代表还有更多数据 customNoMore: -1 }; }, computed: { // 底部加载更多配置 zLoadMoreConfig() { return { status: this.loadingStatusAfterRender, defaultAsLoading: this.loadingMoreDefaultAsLoading || this.useChatRecordMode && this.chatLoadingMoreDefaultAsLoading, defaultThemeStyle: this.finalLoadingMoreThemeStyle, customStyle: this.loadingMoreCustomStyle, titleCustomStyle: this.loadingMoreTitleCustomStyle, iconCustomStyle: this.loadingMoreLoadingIconCustomStyle, loadingIconType: this.loadingMoreLoadingIconType, loadingIconCustomImage: this.loadingMoreLoadingIconCustomImage, loadingAnimated: this.loadingMoreLoadingAnimated, showNoMoreLine: this.showLoadingMoreNoMoreLine, noMoreLineCustomStyle: this.loadingMoreNoMoreLineCustomStyle, defaultText: this.finalLoadingMoreDefaultText, loadingText: this.finalLoadingMoreLoadingText, noMoreText: this.finalLoadingMoreNoMoreText, failText: this.finalLoadingMoreFailText, hideContent: !this.loadingMoreDefaultAsLoading && this.listRendering, unit: this.unit, isChat: this.useChatRecordMode, chatDefaultAsLoading: this.chatLoadingMoreDefaultAsLoading }; }, // 最终的底部加载更多主题 finalLoadingMoreThemeStyle() { return this.loadingMoreThemeStyle.length ? this.loadingMoreThemeStyle : this.defaultThemeStyle; }, // 最终的底部加载更多触发阈值 finalLowerThreshold() { return u$1.convertToPx(this.lowerThreshold); }, // 是否显示默认状态下的底部加载更多 showLoadingMoreDefault() { return this._showLoadingMore("Default"); }, // 是否显示加载中状态下的底部加载更多 showLoadingMoreLoading() { return this._showLoadingMore("Loading"); }, // 是否显示没有更多了状态下的底部加载更多 showLoadingMoreNoMore() { return this._showLoadingMore("NoMore"); }, // 是否显示加载失败状态下的底部加载更多 showLoadingMoreFail() { return this._showLoadingMore("Fail"); }, // 是否显示自定义状态下的底部加载更多 showLoadingMoreCustom() { return this._showLoadingMore("Custom"); }, // 底部加载更多固定高度 loadingMoreFixedHeight() { return u$1.addUnit("80rpx", this.unit); } }, methods: { // 页面滚动到底部时通知z-paging进行进一步处理 pageReachBottom() { !this.useChatRecordMode && this.toBottomLoadingMoreEnabled && this._onLoadingMore("toBottom"); }, // 手动触发上拉加载更多(非必须,可依据具体需求使用) doLoadMore(type2) { this._onLoadingMore(type2); }, // 通过@scroll事件检测是否滚动到了底部(顺带检测下是否滚动到了顶部) _checkScrolledToBottom(scrollDiff, checked = false) { if (this.cacheScrollNodeHeight === -1) { this._getNodeClientRect(".zp-scroll-view").then((res) => { if (res) { const scrollNodeHeight = res[0].height; this.cacheScrollNodeHeight = scrollNodeHeight; if (scrollDiff - scrollNodeHeight <= this.finalLowerThreshold) { this._onLoadingMore("toBottom"); } } }); } else { if (scrollDiff - this.cacheScrollNodeHeight <= this.finalLowerThreshold) { this._onLoadingMore("toBottom"); } else if (scrollDiff - this.cacheScrollNodeHeight <= 500 && !checked) { u$1.delay(() => { this._getNodeClientRect(".zp-scroll-view", true, true).then((res) => { if (res) { this.oldScrollTop = res[0].scrollTop; const newScrollDiff = res[0].scrollHeight - this.oldScrollTop; this._checkScrolledToBottom(newScrollDiff, true); } }); }, 150, "checkScrolledToBottomDelay"); } if (this.oldScrollTop <= 150 && this.oldScrollTop !== 0) { u$1.delay(() => { if (this.oldScrollTop !== 0) { this._getNodeClientRect(".zp-scroll-view", true, true).then((res) => { if (res && res[0].scrollTop === 0 && this.oldScrollTop !== 0) { this._onScrollToUpper(); } }); } }, 150, "checkScrolledToTopDelay"); } } }, // 触发加载更多时调用,from:toBottom-滑动到底部触发;click-点击加载更多触发 _onLoadingMore(from = "click") { if (this.isIos && from === "toBottom" && !this.scrollToBottomBounceEnabled && this.scrollEnable) { this.scrollEnable = false; this.$nextTick(() => { this.scrollEnable = true; }); } this._emitScrollEvent("scrolltolower"); if (this.isOnly || !this.loadingMoreEnabled || !(this.loadingStatus === Enum.More.Default || this.loadingStatus === Enum.More.Fail) || this.loading || this.showEmpty) return; this._doLoadingMore(); }, // 处理开始加载更多 _doLoadingMore() { if (this.pageNo >= this.defaultPageNo && this.loadingStatus !== Enum.More.NoMore) { this.pageNo++; this._startLoading(false); if (this.isLocalPaging) { this._localPagingQueryList(this.pageNo, this.defaultPageSize, this.localPagingLoadingTime, (res) => { this.completeByTotal(res, this.totalLocalPagingList.length); this.queryFrom = Enum.QueryFrom.LoadMore; }); } else { this._emitQuery(this.pageNo, this.defaultPageSize, Enum.QueryFrom.LoadMore); this._callMyParentQuery(); } this.loadingType = Enum.LoadingType.LoadMore; } }, // (预处理)判断当没有更多数据且分页内容未超出z-paging时是否显示没有更多数据的view _preCheckShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode) { if (this.loadingStatus === Enum.More.NoMore && this.hideNoMoreByLimit > 0 && newVal.length) { this.showLoadingMore = newVal.length > this.hideNoMoreByLimit; } else if (this.loadingStatus === Enum.More.NoMore && this.hideNoMoreInside && newVal.length || this.insideMore && this.insideOfPaging !== false && newVal.length) { this.$nextTick(() => { this._checkShowNoMoreInside(newVal, scrollViewNode, pagingContainerNode); }); if (this.insideMore && this.insideOfPaging !== false && newVal.length) { this.showLoadingMore = newVal.length; } } else { this.showLoadingMore = newVal.length; } }, // 判断当没有更多数据且分页内容未超出z-paging时是否显示没有更多数据的view async _checkShowNoMoreInside(totalData, oldScrollViewNode, oldPagingContainerNode) { try { const scrollViewNode = oldScrollViewNode || await this._getNodeClientRect(".zp-scroll-view"); if (this.usePageScroll) { if (scrollViewNode) { const scrollViewTotalH = scrollViewNode[0].top + scrollViewNode[0].height; this.insideOfPaging = scrollViewTotalH < this.windowHeight; if (this.hideNoMoreInside) { this.showLoadingMore = !this.insideOfPaging; } this._updateInsideOfPaging(); } } else { const pagingContainerNode = oldPagingContainerNode || await this._getNodeClientRect(".zp-paging-container-content"); const pagingContainerH = pagingContainerNode ? pagingContainerNode[0].height : 0; const scrollViewH = scrollViewNode ? scrollViewNode[0].height : 0; this.insideOfPaging = pagingContainerH < scrollViewH; if (this.hideNoMoreInside) { this.showLoadingMore = !this.insideOfPaging; } this._updateInsideOfPaging(); } } catch (e2) { this.insideOfPaging = !totalData.length; if (this.hideNoMoreInside) { this.showLoadingMore = !this.insideOfPaging; } this._updateInsideOfPaging(); } }, // 是否要展示上拉加载更多view _showLoadingMore(type2) { if (!this.showLoadingMoreWhenReload && (!(this.loadingStatus === Enum.More.Default ? this.nShowBottom : true) || !this.realTotalData.length)) return false; if ((!this.showLoadingMoreWhenReload || this.isUserPullDown || this.loadingStatus !== Enum.More.Loading) && !this.showLoadingMore || !this.loadingMoreEnabled && (!this.showLoadingMoreWhenReload || this.isUserPullDown || this.loadingStatus !== Enum.More.Loading) || this.isOnly) { return false; } if (this.useChatRecordMode && type2 !== "Loading") return false; if (!this.zSlots) return false; if (type2 === "Custom") { return this.showDefaultLoadingMoreText && !(this.loadingStatus === Enum.More.NoMore && !this.showLoadingMoreNoMoreView); } const res = this.loadingStatus === Enum.More[type2] && this.zSlots[`loadingMore${type2}`] && (type2 === "NoMore" ? this.showLoadingMoreNoMoreView : true); return res; } } }; const loadingModule = { props: { // 第一次加载后自动隐藏loading slot,默认为是 autoHideLoadingAfterFirstLoaded: { type: Boolean, default: u$1.gc("autoHideLoadingAfterFirstLoaded", true) }, // loading slot是否铺满屏幕并固定,默认为否 loadingFullFixed: { type: Boolean, default: u$1.gc("loadingFullFixed", false) }, // 是否自动显示系统Loading:即uni.showLoading,若开启则将在刷新列表时(调用reload、refresh时)显示,下拉刷新和滚动到底部加载更多不会显示,默认为false。 autoShowSystemLoading: { type: Boolean, default: u$1.gc("autoShowSystemLoading", false) }, // 显示系统Loading时是否显示透明蒙层,防止触摸穿透,默认为是(H5、App、微信小程序、百度小程序有效) systemLoadingMask: { type: Boolean, default: u$1.gc("systemLoadingMask", true) }, // 显示系统Loading时显示的文字,默认为"加载中" systemLoadingText: { type: [String, Object], default: u$1.gc("systemLoadingText", null) } }, data() { return { loading: false, loadingForNow: false }; }, watch: { // loading状态 loadingStatus(newVal) { this.$emit("loadingStatusChange", newVal); this.$nextTick(() => { this.loadingStatusAfterRender = newVal; }); if (this.useChatRecordMode) { if (this.isFirstPage && (newVal === Enum.More.NoMore || newVal === Enum.More.Fail)) { this.isFirstPageAndNoMore = true; return; } } this.isFirstPageAndNoMore = false; }, loading(newVal) { if (newVal) { this.loadingForNow = newVal; } } }, computed: { // 是否显示loading showLoading() { if (this.firstPageLoaded || !this.loading || !this.loadingForNow) return false; if (this.finalShowSystemLoading) { uni.showLoading({ title: this.finalSystemLoadingText, mask: this.systemLoadingMask }); } return this.autoHideLoadingAfterFirstLoaded ? this.fromEmptyViewReload ? true : !this.pagingLoaded : this.loadingType === Enum.LoadingType.Refresher; }, // 最终的是否显示系统loading finalShowSystemLoading() { return this.autoShowSystemLoading && this.loadingType === Enum.LoadingType.Refresher; } }, methods: { // 处理开始加载更多状态 _startLoading(isReload = false) { if (this.showLoadingMoreWhenReload && !this.isUserPullDown || !isReload) { this.loadingStatus = Enum.More.Loading; } this.loading = true; }, // 停止系统loading和refresh _endSystemLoadingAndRefresh() { this.finalShowSystemLoading && uni.hideLoading(); !this.useCustomRefresher && uni.stopPullDownRefresh(); } } }; const chatRecordModerModule = { props: { // 使用聊天记录模式,默认为否 useChatRecordMode: { type: Boolean, default: u$1.gc("useChatRecordMode", false) }, // 使用聊天记录模式时滚动到顶部后,列表垂直移动偏移距离。默认0rpx。单位px(暂时无效) chatRecordMoreOffset: { type: [Number, String], default: u$1.gc("chatRecordMoreOffset", "0rpx") }, // 使用聊天记录模式时是否自动隐藏键盘:在用户触摸列表时候自动隐藏键盘,默认为是 autoHideKeyboardWhenChat: { type: Boolean, default: u$1.gc("autoHideKeyboardWhenChat", true) }, // 使用聊天记录模式中键盘弹出时是否自动调整slot="bottom"高度,默认为是 autoAdjustPositionWhenChat: { type: Boolean, default: u$1.gc("autoAdjustPositionWhenChat", true) }, // 使用聊天记录模式中键盘弹出时占位高度偏移距离。默认0rpx。单位px chatAdjustPositionOffset: { type: [Number, String], default: u$1.gc("chatAdjustPositionOffset", "0rpx") }, // 使用聊天记录模式中键盘弹出时是否自动滚动到底部,默认为否 autoToBottomWhenChat: { type: Boolean, default: u$1.gc("autoToBottomWhenChat", false) }, // 使用聊天记录模式中reload时是否显示chatLoading,默认为否 showChatLoadingWhenReload: { type: Boolean, default: u$1.gc("showChatLoadingWhenReload", false) }, // 在聊天记录模式中滑动到顶部状态为默认状态时,以加载中的状态展示,默认为是。若设置为否,则默认会显示【点击加载更多】,然后才会显示loading chatLoadingMoreDefaultAsLoading: { type: Boolean, default: u$1.gc("chatLoadingMoreDefaultAsLoading", true) } }, data() { return { // 键盘高度 keyboardHeight: 0, // 键盘高度是否未改变,此时占位高度变化不需要动画效果 isKeyboardHeightChanged: false }; }, computed: { finalChatRecordMoreOffset() { return u$1.convertToPx(this.chatRecordMoreOffset); }, finalChatAdjustPositionOffset() { return u$1.convertToPx(this.chatAdjustPositionOffset); }, // 聊天记录模式旋转180度style chatRecordRotateStyle() { let cellStyle; cellStyle = this.useChatRecordMode ? { transform: "scaleY(-1)" } : {}; this.$emit("update:cellStyle", cellStyle); this.$emit("cellStyleChange", cellStyle); this.$nextTick(() => { if (this.isFirstPage && this.isChatRecordModeAndNotInversion) { this.$nextTick(() => { this._scrollToBottom(false); u$1.delay(() => { this._scrollToBottom(false); u$1.delay(() => { this._scrollToBottom(false); }, 50); }, 50); }); } }); return cellStyle; }, // 是否是聊天记录列表并且有配置transform isChatRecordModeHasTransform() { return this.useChatRecordMode && this.chatRecordRotateStyle && this.chatRecordRotateStyle.transform; }, // 是否是聊天记录列表并且列表未倒置 isChatRecordModeAndNotInversion() { return this.isChatRecordModeHasTransform && this.chatRecordRotateStyle.transform === "scaleY(1)"; }, // 是否是聊天记录列表并且列表倒置 isChatRecordModeAndInversion() { return this.isChatRecordModeHasTransform && this.chatRecordRotateStyle.transform === "scaleY(-1)"; }, // 最终的聊天记录模式中底部安全区域的高度,如果开启了底部安全区域并且键盘未弹出,则添加底部区域高度 chatRecordModeSafeAreaBottom() { return this.safeAreaInsetBottom && !this.keyboardHeight ? this.safeAreaBottom : 0; } }, mounted() { this.addKeyboardHeightChangeListener(); }, methods: { // 添加聊天记录 addChatRecordData(data, toBottom = true, toBottomWithAnimate = true) { if (!this.useChatRecordMode) return; this.isTotalChangeFromAddData = true; this.addDataFromTop(data, toBottom, toBottomWithAnimate); }, // 手动触发滚动到顶部加载更多,聊天记录模式时有效 doChatRecordLoadMore() { this.useChatRecordMode && this._onLoadingMore("click"); }, // 手动添加键盘高度变化监听 addKeyboardHeightChangeListener() { if (this.useChatRecordMode) { uni.onKeyboardHeightChange(this._handleKeyboardHeightChange); } }, // 处理键盘高度变化 _handleKeyboardHeightChange(res) { this.$emit("keyboardHeightChange", res); if (this.autoAdjustPositionWhenChat) { this.isKeyboardHeightChanged = true; this.keyboardHeight = res.height > 0 ? res.height + this.finalChatAdjustPositionOffset : res.height; } if (this.autoToBottomWhenChat && this.keyboardHeight > 0) { u$1.delay(() => { this.scrollToBottom(false); u$1.delay(() => { this.scrollToBottom(false); }); }); } } } }; const scrollerModule = { props: { // 使用页面滚动,默认为否,当设置为是时则使用页面的滚动而非此组件内部的scroll-view的滚动,使用页面滚动时z-paging无需设置确定的高度且对于长列表展示性能更高,但配置会略微繁琐 usePageScroll: { type: Boolean, default: u$1.gc("usePageScroll", false) }, // 是否可以滚动,使用内置scroll-view和nvue时有效,默认为是 scrollable: { type: Boolean, default: u$1.gc("scrollable", true) }, // 控制是否出现滚动条,默认为是 showScrollbar: { type: Boolean, default: u$1.gc("showScrollbar", true) }, // 是否允许横向滚动,默认为否 scrollX: { type: Boolean, default: u$1.gc("scrollX", false) }, // iOS设备上滚动到顶部时是否允许回弹效果,默认为否。关闭回弹效果后可使滚动到顶部与下拉刷新更连贯,但是有吸顶view时滚动到顶部时可能出现抖动。 scrollToTopBounceEnabled: { type: Boolean, default: u$1.gc("scrollToTopBounceEnabled", false) }, // iOS设备上滚动到底部时是否允许回弹效果,默认为是。 scrollToBottomBounceEnabled: { type: Boolean, default: u$1.gc("scrollToBottomBounceEnabled", true) }, // 在设置滚动条位置时使用动画过渡,默认为否 scrollWithAnimation: { type: Boolean, default: u$1.gc("scrollWithAnimation", false) }, // 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素 scrollIntoView: { type: String, default: u$1.gc("scrollIntoView", "") } }, data() { return { scrollTop: 0, oldScrollTop: 0, scrollLeft: 0, oldScrollLeft: 0, scrollViewStyle: {}, scrollViewContainerStyle: {}, scrollViewInStyle: {}, pageScrollTop: -1, scrollEnable: true, privateScrollWithAnimation: -1, cacheScrollNodeHeight: -1, superContentHeight: 0, lastScrollHeight: 0, lastScrollDirection: "", setContentHeightPending: false }; }, watch: { oldScrollTop(newVal) { !this.usePageScroll && this._scrollTopChange(newVal, false); }, pageScrollTop(newVal) { this.usePageScroll && this._scrollTopChange(newVal, true); }, usePageScroll: { handler(newVal) { this.loaded && this.autoHeight && this._setAutoHeight(!newVal); }, immediate: true }, finalScrollTop(newVal) { this.renderPropScrollTop = newVal < 6 ? 0 : 10; } }, computed: { finalScrollWithAnimation() { if (this.privateScrollWithAnimation !== -1) { return this.privateScrollWithAnimation === 1; } return this.scrollWithAnimation; }, finalScrollViewStyle() { if (this.superContentZIndex != 1) { this.scrollViewStyle["z-index"] = this.superContentZIndex; this.scrollViewStyle["position"] = "relative"; } return this.scrollViewStyle; }, finalScrollTop() { return this.usePageScroll ? this.pageScrollTop : this.oldScrollTop; }, // 当前是否是旧版webview finalIsOldWebView() { return this.isOldWebView && !this.usePageScroll; }, // 当前scroll-view/list-view是否允许滚动 finalScrollable() { return this.scrollable && !this.usePageScroll && this.scrollEnable && (this.refresherCompleteScrollable ? true : this.refresherStatus !== Enum.Refresher.Complete) && (this.refresherRefreshingScrollable ? true : this.refresherStatus !== Enum.Refresher.Loading); } }, methods: { // 滚动到顶部,animate为是否展示滚动动画,默认为是 scrollToTop(animate, checkReverse = true) { if (this.useChatRecordMode && checkReverse && !this.isChatRecordModeAndNotInversion) { this.scrollToBottom(animate, false); return; } this.$nextTick(() => { this._scrollToTop(animate, false); }); }, // 滚动到底部,animate为是否展示滚动动画,默认为是 scrollToBottom(animate, checkReverse = true) { if (this.useChatRecordMode && checkReverse && !this.isChatRecordModeAndNotInversion) { this.scrollToTop(animate, false); return; } this.$nextTick(() => { this._scrollToBottom(animate); }); }, // 滚动到指定view(vue中有效)。sel为需要滚动的view的id值,不包含"#";offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollIntoViewById(sel, offset, animate) { this._scrollIntoView(sel, offset, animate); }, // 滚动到指定view(vue中有效)。nodeTop为需要滚动的view的top值(通过uni.createSelectorQuery()获取);offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollIntoViewByNodeTop(nodeTop, offset, animate) { this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this._scrollIntoViewByNodeTop(nodeTop, offset, animate); }); }, // y轴滚动到指定位置(vue中有效)。y为与顶部的距离,单位为px;offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollToY(y2, offset, animate) { this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this._scrollToY(y2, offset, animate); }); }, // x轴滚动到指定位置(非页面滚动且在vue中有效)。x为与左侧的距离,单位为px;offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollToX(x2, offset, animate) { this.scrollLeft = this.oldScrollLeft; this.$nextTick(() => { this._scrollToX(x2, offset, animate); }); }, // 滚动到指定view(nvue中和虚拟列表中有效)。index为需要滚动的view的index(第几个,从0开始);offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollIntoViewByIndex(index2, offset, animate) { if (index2 >= this.realTotalData.length) { u$1.consoleErr("当前滚动的index超出已渲染列表长度,请先通过refreshToPage加载到对应index页并等待渲染成功后再调用此方法!"); return; } this.$nextTick(() => { if (this.finalUseVirtualList) { const isCellFixed = this.cellHeightMode === Enum.CellHeightMode.Fixed; u$1.delay(() => { if (this.finalUseVirtualList) { const scrollTop = isCellFixed ? this.virtualCellHeight * index2 : this.virtualHeightCacheList[index2].lastTotalHeight; this.scrollToY(scrollTop, offset, animate); } }, isCellFixed ? 0 : 100); } }); }, // 滚动到指定view(nvue中有效)。view为需要滚动的view(通过`this.$refs.xxx`获取),不包含"#";offset为偏移量,单位为px;animate为是否展示滚动动画,默认为否 scrollIntoViewByView(view, offset, animate) { this._scrollIntoView(view, offset, animate); }, // 当使用页面滚动并且自定义下拉刷新时,请在页面的onPageScroll中调用此方法,告知z-paging当前的pageScrollTop,否则会导致在任意位置都可以下拉刷新 updatePageScrollTop(value2) { this.pageScrollTop = value2; }, // 当使用页面滚动并且设置了slot="top"时,默认初次加载会自动获取其高度,并使内部容器下移,当slot="top"的view高度动态改变时,在其高度需要更新时调用此方法 updatePageScrollTopHeight() { this._updatePageScrollTopOrBottomHeight("top"); }, // 当使用页面滚动并且设置了slot="bottom"时,默认初次加载会自动获取其高度,并使内部容器下移,当slot="bottom"的view高度动态改变时,在其高度需要更新时调用此方法 updatePageScrollBottomHeight() { this._updatePageScrollTopOrBottomHeight("bottom"); }, // 更新slot="left"和slot="right"宽度,当slot="left"或slot="right"宽度动态改变时调用 updateLeftAndRightWidth() { if (!this.finalIsOldWebView) return; this.$nextTick(() => this._updateLeftAndRightWidth(this.scrollViewContainerStyle, "zp-page")); }, // 更新z-paging内置scroll-view的scrollTop updateScrollViewScrollTop(scrollTop, animate = true) { this._updatePrivateScrollWithAnimation(animate); this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this.scrollTop = scrollTop; this.oldScrollTop = this.scrollTop; }); }, // 当滚动到顶部时 _onScrollToUpper() { this._emitScrollEvent("scrolltoupper"); this.$emit("scrollTopChange", 0); this.$nextTick(() => { this.oldScrollTop = 0; }); }, // 当滚动到底部时 _onScrollToLower(e2) { (!e2.detail || !e2.detail.direction || e2.detail.direction === "bottom") && this.toBottomLoadingMoreEnabled && this._onLoadingMore(this.useChatRecordMode ? "click" : "toBottom"); }, // 滚动到顶部 _scrollToTop(animate = true, isPrivate = true) { if (this.usePageScroll) { this.$nextTick(() => { uni.pageScrollTo({ scrollTop: 0, duration: animate ? 100 : 0 }); }); return; } this._updatePrivateScrollWithAnimation(animate); this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this.scrollTop = 0; this.oldScrollTop = this.scrollTop; }); }, // 滚动到底部 async _scrollToBottom(animate = true) { if (this.usePageScroll) { this.$nextTick(() => { uni.pageScrollTo({ scrollTop: Number.MAX_VALUE, duration: animate ? 100 : 0 }); }); return; } try { this._updatePrivateScrollWithAnimation(animate); const pagingContainerNode = await this._getNodeClientRect(".zp-paging-container"); const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view"); const pagingContainerH = pagingContainerNode ? pagingContainerNode[0].height : 0; const scrollViewH = scrollViewNode ? scrollViewNode[0].height : 0; if (pagingContainerH > scrollViewH) { this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this.scrollTop = pagingContainerH - scrollViewH + this.virtualPlaceholderTopHeight; this.oldScrollTop = this.scrollTop; }); } } catch (e2) { } }, // 滚动到指定view _scrollIntoView(sel, offset = 0, animate = false, finishCallback) { try { this.scrollTop = this.oldScrollTop; this.$nextTick(() => { this._getNodeClientRect("#" + sel.replace("#", ""), false).then((node2) => { if (node2) { this._getNodeClientRect(".zp-scroll-view-container").then((svContainerNode) => { if (svContainerNode) { this._scrollIntoViewByNodeTop(node2[0].top - svContainerNode[0].top, offset, animate); finishCallback && finishCallback(); } }); } else { u$1.consoleErr(`无法获取${sel}的节点信息,请检查!`); } }); }); } catch (e2) { } }, // 通过nodeTop滚动到指定view _scrollIntoViewByNodeTop(nodeTop, offset = 0, animate = false) { if (this.isChatRecordModeAndInversion) { this._getNodeClientRect(".zp-scroll-view").then((sNode) => { if (sNode) { this._scrollToY(sNode[0].height - nodeTop, offset, animate, true); } }); } else { this._scrollToY(nodeTop, offset, animate, true); } }, // y轴滚动到指定位置 _scrollToY(y2, offset = 0, animate = false, addScrollTop = false) { this._updatePrivateScrollWithAnimation(animate); u$1.delay(() => { if (this.usePageScroll) { if (addScrollTop && this.pageScrollTop !== -1) { y2 += this.pageScrollTop; } const scrollTop = y2 - offset; uni.pageScrollTo({ scrollTop, duration: animate ? 100 : 0 }); } else { if (addScrollTop) { y2 += this.oldScrollTop; } this.scrollTop = y2 - offset; } }, 10); }, // x轴滚动到指定位置 _scrollToX(x2, offset = 0, animate = false) { this._updatePrivateScrollWithAnimation(animate); u$1.delay(() => { if (!this.usePageScroll) { this.scrollLeft = x2 - offset; } else { u$1.consoleErr("使用页面滚动时不支持scrollToX"); } }, 10); }, // scroll-view滚动中 _scroll(e2) { this.$emit("scroll", e2); const { scrollTop, scrollLeft, scrollHeight } = e2.detail; if (this.watchScrollDirectionChange) { let direction = this.oldScrollTop > scrollTop ? "top" : "bottom"; if (scrollTop <= 0 || !this.scrollEnable) { direction = "top"; } if (scrollTop > this.lastScrollHeight - this.scrollViewHeight - 1 && this.scrollEnable) { direction = "bottom"; } if (direction !== this.lastScrollDirection) { this.$emit("scrollDirectionChange", direction); this.lastScrollDirection = direction; } if (this.lastScrollHeight !== scrollHeight && !this.setContentHeightPending) { this.setContentHeightPending = true; u$1.delay(() => { this.lastScrollHeight = scrollHeight; this.setContentHeightPending = false; }); } } this.finalUseVirtualList && this._updateVirtualScroll(scrollTop, this.oldScrollTop - scrollTop); this.oldScrollTop = scrollTop; this.oldScrollLeft = scrollLeft; const scrollDiff = e2.detail.scrollHeight - this.oldScrollTop; !this.isIos && this._checkScrolledToBottom(scrollDiff); }, // emit scrolltolower/scrolltoupper事件 _emitScrollEvent(type2) { const reversedType = type2 === "scrolltolower" ? "scrolltoupper" : "scrolltolower"; const eventType = this.useChatRecordMode && !this.isChatRecordModeAndNotInversion ? reversedType : type2; this.$emit(eventType); }, // 更新内置的scroll-view是否启用滚动动画 _updatePrivateScrollWithAnimation(animate) { this.privateScrollWithAnimation = animate ? 1 : 0; u$1.delay(() => this.$nextTick(() => { this.privateScrollWithAnimation = -1; }), 100, "updateScrollWithAnimationDelay"); }, // 检测scrollView是否要铺满屏幕 _doCheckScrollViewShouldFullHeight(totalData) { if (this.autoFullHeight && this.usePageScroll && this.isTotalChangeFromAddData) { this.$nextTick(() => { this._checkScrollViewShouldFullHeight((scrollViewNode, pagingContainerNode) => { this._preCheckShowNoMoreInside(totalData, scrollViewNode, pagingContainerNode); }); }); } else { this._preCheckShowNoMoreInside(totalData); } }, // 检测z-paging是否要全屏覆盖(当使用页面滚动并且不满全屏时,默认z-paging需要铺满全屏,避免数据过少时内部的empty-view无法正确展示) async _checkScrollViewShouldFullHeight(callback) { try { const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view"); const pagingContainerNode = await this._getNodeClientRect(".zp-paging-container-content"); if (!scrollViewNode || !pagingContainerNode) return; const scrollViewHeight = pagingContainerNode[0].height; const scrollViewTop = scrollViewNode[0].top; if (this.isAddedData && scrollViewHeight + scrollViewTop <= this.windowHeight) { this._setAutoHeight(true, scrollViewNode); callback(scrollViewNode, pagingContainerNode); } else { this._setAutoHeight(false); callback(null, null); } } catch (e2) { callback(null, null); } }, // 更新缓存中z-paging整个内容容器高度 async _updateCachedSuperContentHeight() { const superContentNode = await this._getNodeClientRect(".z-paging-content"); if (superContentNode) { this.superContentHeight = superContentNode[0].height; } }, // scrollTop改变时触发 _scrollTopChange(newVal, isPageScrollTop) { this.$emit("scrollTopChange", newVal); this.$emit("update:scrollTop", newVal); this._checkShouldShowBackToTop(newVal); const scrollTop = newVal > 5 ? 6 : 0; if (isPageScrollTop && this.wxsPageScrollTop !== scrollTop) { this.wxsPageScrollTop = scrollTop; } else if (!isPageScrollTop && this.wxsScrollTop !== scrollTop) { this.wxsScrollTop = scrollTop; if (scrollTop > 6) { this.scrollEnable = true; } } }, // 更新使用页面滚动时slot="top"或"bottom"插入view的高度 _updatePageScrollTopOrBottomHeight(type2) { if (!this.usePageScroll) return; this._doCheckScrollViewShouldFullHeight(this.realTotalData); const node2 = `.zp-page-${type2}`; const marginText = `margin${type2.slice(0, 1).toUpperCase() + type2.slice(1)}`; const safeAreaInsetBottomAdd = this.safeAreaInsetBottom && !this.zSlots.bottom && !this.useSafeAreaPlaceholder; this.$nextTick(() => { let delayTime = 0; u$1.delay(() => { this._getNodeClientRect(node2).then((res) => { if (res) { let pageScrollNodeHeight = res[0].height; if (type2 === "bottom") { if (safeAreaInsetBottomAdd) { pageScrollNodeHeight += this.safeAreaBottom; } } else { this.cacheTopHeight = pageScrollNodeHeight; } this.$set(this.scrollViewStyle, marginText, `${pageScrollNodeHeight}px`); } else if (safeAreaInsetBottomAdd) { this.$set(this.scrollViewStyle, marginText, `${this.safeAreaBottom}px`); } }); }, delayTime); }); } } }; const backToTopModule = { props: { // 自动显示点击返回顶部按钮,默认为否 autoShowBackToTop: { type: Boolean, default: u$1.gc("autoShowBackToTop", false) }, // 点击返回顶部按钮显示/隐藏的阈值(滚动距离),单位为px,默认为400rpx backToTopThreshold: { type: [Number, String], default: u$1.gc("backToTopThreshold", "400rpx") }, // 点击返回顶部按钮的自定义图片地址,默认使用z-paging内置的图片 backToTopImg: { type: String, default: u$1.gc("backToTopImg", "") }, // 点击返回顶部按钮返回到顶部时是否展示过渡动画,默认为是 backToTopWithAnimate: { type: Boolean, default: u$1.gc("backToTopWithAnimate", true) }, // 点击返回顶部按钮与底部的距离,注意添加单位px或rpx,默认为160rpx backToTopBottom: { type: [Number, String], default: u$1.gc("backToTopBottom", "160rpx") }, // 点击返回顶部按钮的自定义样式 backToTopStyle: { type: Object, default: u$1.gc("backToTopStyle", {}) }, // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向,默认为是 enableBackToTop: { type: Boolean, default: u$1.gc("enableBackToTop", true) } }, data() { return { // 点击返回顶部的class backToTopClass: "zp-back-to-top zp-back-to-top-hide", // 上次点击返回顶部的时间 lastBackToTopShowTime: 0, // 点击返回顶部显示的class是否在展示中,使得按钮展示/隐藏过度效果更自然 showBackToTopClass: false }; }, computed: { backToTopThresholdUnitConverted() { return u$1.addUnit(this.backToTopThreshold, this.unit); }, backToTopBottomUnitConverted() { return u$1.addUnit(this.backToTopBottom, this.unit); }, finalEnableBackToTop() { return this.usePageScroll ? false : this.enableBackToTop; }, finalBackToTopThreshold() { return u$1.convertToPx(this.backToTopThresholdUnitConverted); }, finalBackToTopStyle() { const backToTopStyle = this.backToTopStyle; if (!backToTopStyle.bottom) { backToTopStyle.bottom = this.windowBottom + u$1.convertToPx(this.backToTopBottomUnitConverted) + "px"; } if (!backToTopStyle.position) { backToTopStyle.position = this.usePageScroll ? "fixed" : "absolute"; } return backToTopStyle; }, finalBackToTopClass() { return `${this.backToTopClass} zp-back-to-top-${this.unit}`; } }, methods: { // 点击了返回顶部 _backToTopClick() { let callbacked = false; this.$emit("backToTopClick", (toTop) => { (toTop === void 0 || toTop === true) && this._handleToTop(); callbacked = true; }); this.$nextTick(() => { !callbacked && this._handleToTop(); }); }, // 处理滚动到顶部(聊天记录模式中为滚动到底部) _handleToTop() { !this.backToTopWithAnimate && this._checkShouldShowBackToTop(0); !this.useChatRecordMode ? this.scrollToTop(this.backToTopWithAnimate) : this.scrollToBottom(this.backToTopWithAnimate); }, // 判断是否要显示返回顶部按钮 _checkShouldShowBackToTop(scrollTop) { if (!this.autoShowBackToTop) { this.showBackToTopClass = false; return; } if (scrollTop > this.finalBackToTopThreshold) { if (!this.showBackToTopClass) { this.showBackToTopClass = true; this.lastBackToTopShowTime = (/* @__PURE__ */ new Date()).getTime(); u$1.delay(() => { this.backToTopClass = "zp-back-to-top zp-back-to-top-show"; }, 300); } } else { if (this.showBackToTopClass) { this.backToTopClass = "zp-back-to-top zp-back-to-top-hide"; u$1.delay(() => { this.showBackToTopClass = false; }, (/* @__PURE__ */ new Date()).getTime() - this.lastBackToTopShowTime < 500 ? 0 : 300); } } } } }; const virtualListModule = { props: { // 是否使用虚拟列表,默认为否 useVirtualList: { type: Boolean, default: u$1.gc("useVirtualList", false) }, // 在使用虚拟列表时,是否使用兼容模式,默认为否 useCompatibilityMode: { type: Boolean, default: u$1.gc("useCompatibilityMode", false) }, // 使用兼容模式时传递的附加数据 extraData: { type: Object, default: u$1.gc("extraData", {}) }, // 是否在z-paging内部循环渲染列表(内置列表),默认为否。若use-virtual-list为true,则此项恒为true useInnerList: { type: Boolean, default: u$1.gc("useInnerList", false) }, // 强制关闭inner-list,默认为false,如果为true将强制关闭innerList,适用于开启了虚拟列表后需要强制关闭inner-list的情况 forceCloseInnerList: { type: Boolean, default: u$1.gc("forceCloseInnerList", false) }, // 内置列表cell的key名称,仅nvue有效,在nvue中开启use-inner-list时必须填此项 cellKeyName: { type: String, default: u$1.gc("cellKeyName", "") }, // innerList样式 innerListStyle: { type: Object, default: u$1.gc("innerListStyle", {}) }, // innerCell样式 innerCellStyle: { type: Object, default: u$1.gc("innerCellStyle", {}) }, // 预加载的列表可视范围(列表高度)页数,默认为12,即预加载当前页及上下各12页的cell。此数值越大,则虚拟列表中加载的dom越多,内存消耗越大(会维持在一个稳定值),但增加预加载页面数量可缓解快速滚动短暂白屏问题 preloadPage: { type: [Number, String], default: u$1.gc("preloadPage", 12), validator: (value2) => { if (value2 <= 0) u$1.consoleErr("preload-page必须大于0!"); return value2 > 0; } }, // 虚拟列表cell高度模式,默认为fixed,也就是每个cell高度完全相同,将以第一个cell高度为准进行计算。可选值【dynamic】,即代表高度是动态非固定的,【dynamic】性能低于【fixed】。 cellHeightMode: { type: String, default: u$1.gc("cellHeightMode", Enum.CellHeightMode.Fixed) }, // 固定的cell高度,cellHeightMode=fixed才有效,若设置了值,则不计算第一个cell高度而使用设置的cell高度 fixedCellHeight: { type: [Number, String], default: u$1.gc("fixedCellHeight", 0) }, // 虚拟列表列数,默认为1。常用于每行有多列的情况,例如每行有2列数据,需要将此值设置为2 virtualListCol: { type: [Number, String], default: u$1.gc("virtualListCol", 1) }, // 虚拟列表scroll取样帧率,默认为80,过低容易出现白屏问题,过高容易出现卡顿问题 virtualScrollFps: { type: [Number, String], default: u$1.gc("virtualScrollFps", 80) }, // 虚拟列表cell id的前缀,适用于一个页面有多个虚拟列表的情况,用以区分不同虚拟列表cell的id,注意:请勿传数字或以数字开头的字符串。如设置为list1,则cell的id应为:list1-zp-id-${item.zp_index} virtualCellIdPrefix: { type: String, default: u$1.gc("virtualCellIdPrefix", "") }, // 虚拟列表是否使用swiper-item包裹,默认为否,此属性为了解决vue3+(微信小程序或QQ小程序)中,使用非内置列表写法时,若z-paging在swiper-item内存在无法获取slot插入的cell高度进而导致虚拟列表失败的问题 // 仅vue3+(微信小程序或QQ小程序)+非内置列表写法虚拟列表有效,其他情况此属性设置任何值都无效,所以如果您在swiper-item内使用z-paging的非内置虚拟列表写法,将此属性设置为true即可 virtualInSwiperSlot: { type: Boolean, default: false } }, data() { return { virtualListKey: u$1.getInstanceId(), virtualCellHeight: 0, virtualScrollTimeStamp: 0, virtualList: [], virtualPlaceholderTopHeight: 0, virtualPlaceholderBottomHeight: 0, virtualTopRangeIndex: 0, virtualBottomRangeIndex: 0, lastVirtualTopRangeIndex: 0, lastVirtualBottomRangeIndex: 0, virtualItemInsertedCount: 0, virtualHeightCacheList: [], getCellHeightRetryCount: { fixed: 0, dynamic: 0 }, updateVirtualListFromDataChange: false }; }, watch: { // 监听总数据的改变,刷新虚拟列表布局 realTotalData() { this.updateVirtualListRender(); }, // 监听虚拟列表渲染数组的改变并emit virtualList(newVal) { this.$emit("update:virtualList", newVal); this.$emit("virtualListChange", newVal); }, // 监听虚拟列表顶部占位高度改变并emit virtualPlaceholderTopHeight(newVal) { this.$emit("virtualTopHeightChange", newVal); } }, computed: { virtualCellIndexKey() { return c$1.listCellIndexKey; }, finalUseVirtualList() { if (this.useVirtualList && this.usePageScroll) { u$1.consoleErr("使用页面滚动时,开启虚拟列表无效!"); } return this.useVirtualList && !this.usePageScroll; }, finalUseInnerList() { return this.useInnerList || this.finalUseVirtualList && !this.forceCloseInnerList; }, finalCellKeyName() { return this.cellKeyName; }, finalVirtualPageHeight() { return this.scrollViewHeight > 0 ? this.scrollViewHeight : this.windowHeight; }, finalFixedCellHeight() { return u$1.convertToPx(this.fixedCellHeight); }, fianlVirtualCellIdPrefix() { const prefix = this.virtualCellIdPrefix ? this.virtualCellIdPrefix + "-" : ""; return prefix + "zp-id"; }, finalPlaceholderTopHeightStyle() { return {}; }, virtualRangePageHeight() { return this.finalVirtualPageHeight * this.preloadPage; }, virtualScrollDisTimeStamp() { return 1e3 / this.virtualScrollFps; } }, methods: { // 在使用动态高度虚拟列表时,若在列表数组中需要插入某个item,需要调用此方法;item:需要插入的item,index:插入的cell位置,若index为2,则插入的item在原list的index=1之后,index从0开始 doInsertVirtualListItem(item, index2) { if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic) return; this.realTotalData.splice(index2, 0, item); this.realTotalData = [...this.realTotalData]; this.virtualItemInsertedCount++; if (!item || Object.prototype.toString.call(item) !== "[object Object]") { item = { item }; } const cellIndexKey = this.virtualCellIndexKey; item[cellIndexKey] = `custom-${this.virtualItemInsertedCount}`; item[c$1.listCellIndexUniqueKey] = `${this.virtualListKey}-${item[cellIndexKey]}`; this.$nextTick(async () => { let retryCount = 0; while (retryCount <= 10) { await u$1.wait(c$1.delayTime); const cellNode = await this._getVirtualCellNodeByIndex(item[cellIndexKey]); if (!cellNode) { retryCount++; continue; } const currentHeight = cellNode ? cellNode[0].height : 0; const lastHeightCache = this.virtualHeightCacheList[index2 - 1]; const lastTotalHeight = lastHeightCache ? lastHeightCache.totalHeight : 0; this.virtualHeightCacheList.splice(index2, 0, { height: currentHeight, lastTotalHeight, totalHeight: lastTotalHeight + currentHeight }); for (let i2 = index2 + 1; i2 < this.virtualHeightCacheList.length; i2++) { const thisNode = this.virtualHeightCacheList[i2]; thisNode.lastTotalHeight += currentHeight; thisNode.totalHeight += currentHeight; } this._updateVirtualScroll(this.oldScrollTop); break; } }); }, // 在使用动态高度虚拟列表时,手动更新指定cell的缓存高度(当cell高度在初始化之后再次改变后调用);index:需要更新的cell在列表中的位置,从0开始 didUpdateVirtualListCell(index2) { if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic) return; const currentNode = this.virtualHeightCacheList[index2]; this.$nextTick(() => { this._getVirtualCellNodeByIndex(index2).then((cellNode) => { const cellNodeHeight = cellNode ? cellNode[0].height : 0; const heightDis = cellNodeHeight - currentNode.height; currentNode.height = cellNodeHeight; currentNode.totalHeight = currentNode.lastTotalHeight + cellNodeHeight; for (let i2 = index2 + 1; i2 < this.virtualHeightCacheList.length; i2++) { const thisNode = this.virtualHeightCacheList[i2]; thisNode.totalHeight += heightDis; thisNode.lastTotalHeight += heightDis; } }); }); }, // 在使用动态高度虚拟列表时,若删除了列表数组中的某个item,需要调用此方法以更新高度缓存数组;index:删除的cell在列表中的位置,从0开始 didDeleteVirtualListCell(index2) { if (this.cellHeightMode !== Enum.CellHeightMode.Dynamic) return; const currentNode = this.virtualHeightCacheList[index2]; for (let i2 = index2 + 1; i2 < this.virtualHeightCacheList.length; i2++) { const thisNode = this.virtualHeightCacheList[i2]; thisNode.totalHeight -= currentNode.height; thisNode.lastTotalHeight -= currentNode.height; } this.virtualHeightCacheList.splice(index2, 1); }, // 手动触发虚拟列表渲染更新,可用于解决例如修改了虚拟列表数组中元素,但展示未更新的情况 updateVirtualListRender() { if (this.finalUseVirtualList) { this.updateVirtualListFromDataChange = true; this.$nextTick(() => { this.getCellHeightRetryCount.fixed = 0; if (this.realTotalData.length) { this.cellHeightMode === Enum.CellHeightMode.Fixed && this.isFirstPage && this._updateFixedCellHeight(); } else { this._resetDynamicListState(!this.isUserPullDown); } this._updateVirtualScroll(this.oldScrollTop); }); } }, // cellHeightMode为fixed时获取第一个cell高度 _updateFixedCellHeight() { if (!this.finalFixedCellHeight) { this.$nextTick(() => { u$1.delay(() => { this._getVirtualCellNodeByIndex(0).then((cellNode) => { if (!cellNode) { if (this.getCellHeightRetryCount.fixed > 10) return; this.getCellHeightRetryCount.fixed++; this._updateFixedCellHeight(); } else { this.virtualCellHeight = cellNode[0].height; this._updateVirtualScroll(this.oldScrollTop); } }); }, c$1.delayTime, "updateFixedCellHeightDelay"); }); } else { this.virtualCellHeight = this.finalFixedCellHeight; } }, // cellHeightMode为dynamic时获取每个cell高度 _updateDynamicCellHeight(list, dataFrom = "bottom") { const dataFromTop = dataFrom === "top"; const heightCacheList = this.virtualHeightCacheList; const currentCacheList = dataFromTop ? [] : heightCacheList; let listTotalHeight = 0; this.$nextTick(() => { u$1.delay(async () => { for (let i2 = 0; i2 < list.length; i2++) { const cellNode = await this._getVirtualCellNodeByIndex(list[i2][this.virtualCellIndexKey]); const currentHeight = cellNode ? cellNode[0].height : 0; if (!cellNode) { if (this.getCellHeightRetryCount.dynamic <= 10) { heightCacheList.splice(heightCacheList.length - i2, i2); this.getCellHeightRetryCount.dynamic++; this._updateDynamicCellHeight(list, dataFrom); } return; } const lastHeightCache = currentCacheList.length ? currentCacheList.slice(-1)[0] : null; const lastTotalHeight = lastHeightCache ? lastHeightCache.totalHeight : 0; currentCacheList.push({ height: currentHeight, lastTotalHeight, totalHeight: lastTotalHeight + currentHeight }); if (dataFromTop) { listTotalHeight += currentHeight; } } if (dataFromTop && list.length) { for (let i2 = 0; i2 < heightCacheList.length; i2++) { const heightCacheItem = heightCacheList[i2]; heightCacheItem.lastTotalHeight += listTotalHeight; heightCacheItem.totalHeight += listTotalHeight; } this.virtualHeightCacheList = currentCacheList.concat(heightCacheList); } this._updateVirtualScroll(this.oldScrollTop); }, c$1.delayTime, "updateDynamicCellHeightDelay"); }); }, // 设置cellItem的index _setCellIndex(list, dataFrom = "bottom") { let currentItemIndex = 0; const cellIndexKey = this.virtualCellIndexKey; dataFrom === "bottom" && [Enum.QueryFrom.Refresh, Enum.QueryFrom.Reload].indexOf(this.queryFrom) >= 0 && this._resetDynamicListState(); if (this.totalData.length && this.queryFrom !== Enum.QueryFrom.Refresh) { if (dataFrom === "bottom") { currentItemIndex = this.realTotalData.length; const lastItem = this.realTotalData.length ? this.realTotalData.slice(-1)[0] : null; if (lastItem && lastItem[cellIndexKey] !== void 0) { currentItemIndex = lastItem[cellIndexKey] + 1; } } else if (dataFrom === "top") { const firstItem = this.realTotalData.length ? this.realTotalData[0] : null; if (firstItem && firstItem[cellIndexKey] !== void 0) { currentItemIndex = firstItem[cellIndexKey] - list.length; } } } else { this._resetDynamicListState(); } for (let i2 = 0; i2 < list.length; i2++) { let item = list[i2]; if (!item || Object.prototype.toString.call(item) !== "[object Object]") { item = { item }; } if (item[c$1.listCellIndexUniqueKey]) { item = u$1.deepCopy(item); } item[cellIndexKey] = currentItemIndex + i2; item[c$1.listCellIndexUniqueKey] = `${this.virtualListKey}-${item[cellIndexKey]}`; list[i2] = item; } this.getCellHeightRetryCount.dynamic = 0; this.cellHeightMode === Enum.CellHeightMode.Dynamic && this._updateDynamicCellHeight(list, dataFrom); }, // 更新scroll滚动(虚拟列表滚动时触发) _updateVirtualScroll(scrollTop, scrollDiff = 0) { const currentTimeStamp = u$1.getTime(); scrollTop === 0 && this._resetTopRange(); if (scrollTop !== 0 && this.virtualScrollTimeStamp && currentTimeStamp - this.virtualScrollTimeStamp <= this.virtualScrollDisTimeStamp) { return; } this.virtualScrollTimeStamp = currentTimeStamp; let scrollIndex = 0; const cellHeightMode = this.cellHeightMode; if (cellHeightMode === Enum.CellHeightMode.Fixed) { scrollIndex = parseInt(scrollTop / this.virtualCellHeight) || 0; this._updateFixedTopRangeIndex(scrollIndex); this._updateFixedBottomRangeIndex(scrollIndex); } else if (cellHeightMode === Enum.CellHeightMode.Dynamic) { const scrollDirection = scrollDiff > 0 ? "top" : "bottom"; const rangePageHeight = this.virtualRangePageHeight; const topRangePageOffset = scrollTop - rangePageHeight; const bottomRangePageOffset = scrollTop + this.finalVirtualPageHeight + rangePageHeight; let virtualBottomRangeIndex = 0; let virtualPlaceholderBottomHeight = 0; let reachedLimitBottom = false; const heightCacheList = this.virtualHeightCacheList; const lastHeightCache = !!heightCacheList ? heightCacheList.slice(-1)[0] : null; let startTopRangeIndex = this.virtualTopRangeIndex; if (scrollDirection === "bottom") { for (let i2 = startTopRangeIndex; i2 < heightCacheList.length; i2++) { const heightCacheItem = heightCacheList[i2]; if (heightCacheItem && heightCacheItem.totalHeight > topRangePageOffset) { this.virtualTopRangeIndex = i2; this.virtualPlaceholderTopHeight = heightCacheItem.lastTotalHeight; break; } } } else { let topRangeMatched = false; for (let i2 = startTopRangeIndex; i2 >= 0; i2--) { const heightCacheItem = heightCacheList[i2]; if (heightCacheItem && heightCacheItem.totalHeight < topRangePageOffset) { this.virtualTopRangeIndex = i2; this.virtualPlaceholderTopHeight = heightCacheItem.lastTotalHeight; topRangeMatched = true; break; } } !topRangeMatched && this._resetTopRange(); } for (let i2 = this.virtualTopRangeIndex; i2 < heightCacheList.length; i2++) { const heightCacheItem = heightCacheList[i2]; if (heightCacheItem && heightCacheItem.totalHeight > bottomRangePageOffset) { virtualBottomRangeIndex = i2; virtualPlaceholderBottomHeight = lastHeightCache.totalHeight - heightCacheItem.totalHeight; reachedLimitBottom = true; break; } } if (!reachedLimitBottom || this.virtualBottomRangeIndex === 0) { this.virtualBottomRangeIndex = this.realTotalData.length ? this.realTotalData.length - 1 : this.pageSize; this.virtualPlaceholderBottomHeight = 0; } else { this.virtualBottomRangeIndex = virtualBottomRangeIndex; this.virtualPlaceholderBottomHeight = virtualPlaceholderBottomHeight; } this._updateVirtualList(); } }, // 更新fixedCell模式下topRangeIndex&placeholderTopHeight _updateFixedTopRangeIndex(scrollIndex) { let virtualTopRangeIndex = this.virtualCellHeight === 0 ? 0 : scrollIndex - (parseInt(this.finalVirtualPageHeight / this.virtualCellHeight) || 1) * this.preloadPage; virtualTopRangeIndex *= this.virtualListCol; virtualTopRangeIndex = Math.max(0, virtualTopRangeIndex); this.virtualTopRangeIndex = virtualTopRangeIndex; this.virtualPlaceholderTopHeight = virtualTopRangeIndex / this.virtualListCol * this.virtualCellHeight; }, // 更新fixedCell模式下bottomRangeIndex&placeholderBottomHeight _updateFixedBottomRangeIndex(scrollIndex) { let virtualBottomRangeIndex = this.virtualCellHeight === 0 ? this.pageSize : scrollIndex + (parseInt(this.finalVirtualPageHeight / this.virtualCellHeight) || 1) * (this.preloadPage + 1); virtualBottomRangeIndex *= this.virtualListCol; virtualBottomRangeIndex = Math.min(this.realTotalData.length, virtualBottomRangeIndex); this.virtualBottomRangeIndex = virtualBottomRangeIndex; this.virtualPlaceholderBottomHeight = (this.realTotalData.length - virtualBottomRangeIndex) * this.virtualCellHeight / this.virtualListCol; this._updateVirtualList(); }, // 更新virtualList _updateVirtualList() { const shouldUpdateList = this.updateVirtualListFromDataChange || (this.lastVirtualTopRangeIndex !== this.virtualTopRangeIndex || this.lastVirtualBottomRangeIndex !== this.virtualBottomRangeIndex); if (shouldUpdateList) { this.updateVirtualListFromDataChange = false; this.lastVirtualTopRangeIndex = this.virtualTopRangeIndex; this.lastVirtualBottomRangeIndex = this.virtualBottomRangeIndex; this.virtualList = this.realTotalData.slice(this.virtualTopRangeIndex, this.virtualBottomRangeIndex + 1); } }, // 重置动态cell模式下的高度缓存数据、虚拟列表和滚动状态 _resetDynamicListState(resetVirtualList = false) { this.virtualHeightCacheList = []; if (resetVirtualList) { this.virtualList = []; } this.virtualTopRangeIndex = 0; this.virtualPlaceholderTopHeight = 0; }, // 重置topRangeIndex和placeholderTopHeight _resetTopRange() { this.virtualTopRangeIndex = 0; this.virtualPlaceholderTopHeight = 0; this._updateVirtualList(); }, // 检测虚拟列表当前滚动位置,如发现滚动位置不正确则重新计算虚拟列表相关参数(为解决在App中可能出现的长时间进入后台后打开App白屏的问题) _checkVirtualListScroll() { if (this.finalUseVirtualList) { this.$nextTick(() => { this._getNodeClientRect(".zp-paging-touch-view").then((node2) => { const currentTop = node2 ? node2[0].top : 0; if (!node2 || currentTop === this.pagingOrgTop && this.virtualPlaceholderTopHeight !== 0) { this._updateVirtualScroll(0); } }); }); } }, // 获取对应index的虚拟列表cell节点信息 _getVirtualCellNodeByIndex(index2) { let inDom = this.finalUseInnerList; return this._getNodeClientRect(`#${this.fianlVirtualCellIdPrefix}-${index2}`, inDom); }, // 处理使用内置列表时点击了cell事件 _innerCellClick(item, index2) { this.$emit("innerCellClick", item, index2); } } }; const systemInfo$1 = u$1.getSystemInfoSync(); const _sfc_main$2f = { name: "z-paging", components: { zPagingRefresh, zPagingLoadMore, zPagingEmptyView: __easycom_0$f }, mixins: [ commonLayoutModule, dataHandleModule, i18nModule, nvueModule, emptyModule, refresherModule, loadMoreModule, loadingModule, chatRecordModerModule, scrollerModule, backToTopModule, virtualListModule ], data() { return { // --------------静态资源--------------- base64BackToTop: zStatic.base64BackToTop, // -------------全局数据相关-------------- // 当前加载类型 loadingType: Enum.LoadingType.Refresher, requestTimeStamp: 0, wxsPropType: "", renderPropScrollTop: -1, checkScrolledToBottomTimeOut: null, cacheTopHeight: -1, statusBarHeight: systemInfo$1.statusBarHeight, scrollViewHeight: 0, pagingOrgTop: -1, // --------------状态&判断--------------- insideOfPaging: -1, isLoadFailed: false, isIos: systemInfo$1.platform === "ios", disabledBounce: false, fromCompleteEmit: false, disabledCompleteEmit: false, pageLaunched: false, active: false, // ---------------wxs相关--------------- wxsIsScrollTopInTopRange: true, wxsScrollTop: 0, wxsPageScrollTop: 0, wxsOnPullingDown: false }; }, props: { // 调用complete后延迟处理的时间,单位为毫秒,默认0毫秒,优先级高于minDelay delay: { type: [Number, String], default: u$1.gc("delay", 0) }, // 触发@query后最小延迟处理的时间,单位为毫秒,默认0毫秒,优先级低于delay(假设设置为300毫秒,若分页请求时间小于300毫秒,则在调用complete后延迟[300毫秒-请求时长];若请求时长大于300毫秒,则不延迟),当show-refresher-when-reload为true或reload(true)时,其最小值为400 minDelay: { type: [Number, String], default: u$1.gc("minDelay", 0) }, // 设置z-paging的style,部分平台(如微信小程序)无法直接修改组件的style,可使用此属性代替 pagingStyle: { type: Object, default: u$1.gc("pagingStyle", {}) }, // 设置z-paging的class,优先级低于pagingStyle和height、width、maxWidth、bgColor pagingClass: { type: [String, Array, Object], default: u$1.gc("pagingClass", "") }, // z-paging的高度,优先级低于pagingStyle中设置的height;传字符串,如100px、100rpx、100% height: { type: String, default: u$1.gc("height", "") }, // z-paging的宽度,优先级低于pagingStyle中设置的width;传字符串,如100px、100rpx、100% width: { type: String, default: u$1.gc("width", "") }, // z-paging的最大宽度,优先级低于pagingStyle中设置的max-width;传字符串,如100px、100rpx、100%。默认为空,也就是铺满窗口宽度,若设置了特定值则会自动添加margin: 0 auto maxWidth: { type: String, default: u$1.gc("maxWidth", "") }, // z-paging的背景色,优先级低于pagingStyle中设置的background。传字符串,如"#ffffff" bgColor: { type: String, default: u$1.gc("bgColor", "") }, // 设置z-paging的容器(插槽的父view)的style pagingContentStyle: { type: Object, default: u$1.gc("pagingContentStyle", {}) }, // z-paging是否自动高度,若自动高度则会自动铺满屏幕 autoHeight: { type: Boolean, default: u$1.gc("autoHeight", false) }, // z-paging是否自动高度时,附加的高度,注意添加单位px或rpx,若需要减少高度,则传负数 autoHeightAddition: { type: [Number, String], default: u$1.gc("autoHeightAddition", "0px") }, // loading(下拉刷新、上拉加载更多)的主题样式,支持black,white,默认black defaultThemeStyle: { type: String, default: u$1.gc("defaultThemeStyle", "black") }, // z-paging是否使用fixed布局,若使用fixed布局,则z-paging的父view无需固定高度,z-paging高度默认为100%,默认为是(当使用内置scroll-view滚动时有效) fixed: { type: Boolean, default: u$1.gc("fixed", true) }, // 是否开启底部安全区域适配 safeAreaInsetBottom: { type: Boolean, default: u$1.gc("safeAreaInsetBottom", false) }, // 开启底部安全区域适配后,是否使用placeholder形式实现,默认为否。为否时滚动区域会自动避开底部安全区域,也就是所有滚动内容都不会挡住底部安全区域,若设置为是,则滚动时滚动内容会挡住底部安全区域,但是当滚动到底部时才会避开底部安全区域 useSafeAreaPlaceholder: { type: Boolean, default: u$1.gc("useSafeAreaPlaceholder", false) }, // z-paging bottom的背景色,默认透明,传字符串,如"#ffffff" bottomBgColor: { type: String, default: u$1.gc("bottomBgColor", "") }, // slot="top"的view的z-index,默认为99,仅使用页面滚动时有效 topZIndex: { type: Number, default: u$1.gc("topZIndex", 99) }, // z-paging内容容器父view的z-index,默认为1 superContentZIndex: { type: Number, default: u$1.gc("superContentZIndex", 1) }, // z-paging内容容器部分的z-index,默认为1 contentZIndex: { type: Number, default: u$1.gc("contentZIndex", 1) }, // z-paging二楼的z-index,默认为100 f2ZIndex: { type: Number, default: u$1.gc("f2ZIndex", 100) }, // 使用页面滚动时,是否在不满屏时自动填充满屏幕,默认为是 autoFullHeight: { type: Boolean, default: u$1.gc("autoFullHeight", true) }, // 是否监听列表触摸方向改变,默认为否 watchTouchDirectionChange: { type: Boolean, default: u$1.gc("watchTouchDirectionChange", false) }, // 是否监听列表滚动方向改变,默认为否 watchScrollDirectionChange: { type: Boolean, default: u$1.gc("watchScrollDirectionChange", false) }, // 是否只使用基础布局,设置为true后将关闭mounted自动请求数据、关闭下拉刷新和滚动到底部加载更多,强制隐藏空数据图。默认为否 layoutOnly: { type: Boolean, default: u$1.gc("layoutOnly", false) }, // z-paging中布局的单位,默认为rpx unit: { type: String, default: u$1.gc("unit", "rpx") } }, created() { if (this.createdReload && !this.isOnly && this.auto) { this._startLoading(); this.$nextTick(this._preReload); } }, mounted() { this.active = true; this.wxsPropType = u$1.getTime().toString(); this.renderJsIgnore; if (!this.createdReload && !this.isOnly && this.auto) { u$1.delay(() => this.$nextTick(this._preReload), 0); } this.finalUseCache && this._setListByLocalCache(); this.$nextTick(() => { this.systemInfo = u$1.getSystemInfoSync(); !this.usePageScroll && this.autoHeight && this._setAutoHeight(); this.loaded = true; u$1.delay(() => { this.updateFixedLayout(); this._updateCachedSuperContentHeight(); this._updateScrollViewHeight(); }); }); this.updatePageScrollTopHeight(); this.updatePageScrollBottomHeight(); this.updateLeftAndRightWidth(); if (this.finalRefresherEnabled && this.useCustomRefresher) { this.$nextTick(() => { this.isTouchmoving = true; }); } if (!this.layoutOnly) { this._onEmit(); } }, destroyed() { this._handleUnmounted(); }, unmounted() { this._handleUnmounted(); }, watch: { defaultThemeStyle: { handler(newVal) { if (newVal.length) { this.finalRefresherDefaultStyle = newVal; } }, immediate: true }, autoHeight(newVal) { this.loaded && !this.usePageScroll && this._setAutoHeight(newVal); }, autoHeightAddition(newVal) { this.loaded && !this.usePageScroll && this.autoHeight && this._setAutoHeight(newVal); } }, computed: { // 当前z-paging的内置样式 finalPagingStyle() { const pagingStyle = { ...this.pagingStyle }; if (!this.systemInfo) return pagingStyle; const { windowTop, windowBottom } = this; if (!this.usePageScroll && this.fixed) { if (windowTop && !pagingStyle.top) { pagingStyle.top = windowTop + "px"; } if (windowBottom && !pagingStyle.bottom) { pagingStyle.bottom = windowBottom + "px"; } } if (this.bgColor.length && !pagingStyle["background"]) { pagingStyle["background"] = this.bgColor; } if (this.height.length && !pagingStyle["height"]) { pagingStyle["height"] = this.height; } if (this.width.length && !pagingStyle["width"]) { pagingStyle["width"] = this.width; } if (this.maxWidth.length && !pagingStyle["max-width"]) { pagingStyle["max-width"] = this.maxWidth; pagingStyle["margin"] = "0 auto"; } return pagingStyle; }, // 当前z-paging内容的样式 finalPagingContentStyle() { if (this.contentZIndex != 1) { this.pagingContentStyle["z-index"] = this.contentZIndex; this.pagingContentStyle["position"] = "relative"; } return this.pagingContentStyle; }, // 最终的当前开启安全区域适配后,是否使用placeholder形式实现。如果slot=bottom存在,则应当交由固定在底部的view处理,因此需排除此情况 finalUseSafeAreaPlaceholder() { return this.useSafeAreaPlaceholder && !this.zSlots.bottom; }, renderJsIgnore() { if (this.usePageScroll && this.useChatRecordMode || !this.refresherEnabled && this.scrollable || !this.useCustomRefresher) { this.$nextTick(() => { this.renderPropScrollTop = 10; }); } return 0; }, windowHeight() { if (!this.systemInfo) return 0; return this.systemInfo.windowHeight || 0; }, windowBottom() { if (!this.systemInfo) return 0; return this.systemInfo.windowBottom || 0; }, // 是否是ios+h5 isIosAndH5() { return false; }, // 是否是只使用基础布局或者只使用下拉刷新 isOnly() { return this.layoutOnly || this.refresherOnly; } }, methods: { // 当前版本号 getVersion() { return `z-paging v${c$1.version}`; }, // 设置nvue List的specialEffects setSpecialEffects(args) { this.setListSpecialEffects(args); }, // 与setSpecialEffects等效,兼容旧版本 setListSpecialEffects(args) { this.nFixFreezing = args && Object.keys(args).length; if (this.isIos) { this.privateRefresherEnabled = 0; } !this.usePageScroll && this.$refs["zp-n-list"].setSpecialEffects(args); }, // 当app长时间进入后台后进入前台,因系统内存管理导致app重新加载时,进行一些适配处理 _handlePageLaunch() { if (this.pageLaunched) { this.refresherThresholdUpdateTag = 1; this.$nextTick(() => { this.refresherThresholdUpdateTag = 0; }); this._checkVirtualListScroll(); } this.pageLaunched = true; }, // 使手机发生较短时间的振动(15ms) _doVibrateShort() { if (this.isIos) { const UISelectionFeedbackGenerator = plus.ios.importClass("UISelectionFeedbackGenerator"); const feedbackGenerator = new UISelectionFeedbackGenerator(); feedbackGenerator.init(); setTimeout(() => { feedbackGenerator.selectionChanged(); }, 0); } else { plus.device.vibrate(15); } }, // 设置z-paging高度 async _setAutoHeight(shouldFullHeight = true, scrollViewNode = null) { const heightKey = "min-height"; try { if (shouldFullHeight) { let finalScrollViewNode = scrollViewNode || await this._getNodeClientRect(".zp-scroll-view"); let finalScrollBottomNode = await this._getNodeClientRect(".zp-page-bottom"); if (finalScrollViewNode) { const scrollViewTop = finalScrollViewNode[0].top; let scrollViewHeight = this.windowHeight - scrollViewTop; scrollViewHeight -= finalScrollBottomNode ? finalScrollBottomNode[0].height : 0; const additionHeight = u$1.convertToPx(this.autoHeightAddition); let importantSuffix = " !important"; const finalHeight = scrollViewHeight + additionHeight - (this.insideMore ? 1 : 0) + "px" + importantSuffix; this.$set(this.scrollViewStyle, heightKey, finalHeight); this.$set(this.scrollViewInStyle, heightKey, finalHeight); } } else { this.$delete(this.scrollViewStyle, heightKey); this.$delete(this.scrollViewInStyle, heightKey); } } catch (e2) { } }, // 更新scroll-view高度 async _updateScrollViewHeight() { const scrollViewNode = await this._getNodeClientRect(".zp-scroll-view"); if (scrollViewNode) { const scrollViewNodeHeight = scrollViewNode[0].height; this.scrollViewHeight = scrollViewNodeHeight; this.pagingOrgTop = scrollViewNode[0].top; } }, // 组件销毁后续处理 _handleUnmounted() { this.active = false; if (!this.layoutOnly) { this._offEmit(); } this.useChatRecordMode && uni.offKeyboardHeightChange(this._handleKeyboardHeightChange); }, // 触发更新是否超出页面状态 _updateInsideOfPaging() { this.insideMore && this.insideOfPaging === true && setTimeout(this.doLoadMore, 200); }, // 清除timeout _cleanTimeout(timeout2) { if (timeout2) { clearTimeout(timeout2); timeout2 = null; } return timeout2; }, // 添加全局emit监听 _onEmit() { uni.$on(c$1.errorUpdateKey, (errorMsg) => { if (this.loading) { if (!!errorMsg) { this.customerEmptyViewErrorText = errorMsg; } this.complete(false).catch(() => { }); } }); uni.$on(c$1.completeUpdateKey, (data) => { setTimeout(() => { if (this.loading) { if (!this.disabledCompleteEmit) { const type2 = data.type || "normal"; const list = data.list || data; const rule = data.rule; this.fromCompleteEmit = true; switch (type2) { case "normal": this.complete(list); break; case "total": this.completeByTotal(list, rule); break; case "nomore": this.completeByNoMore(list, rule); break; case "key": this.completeByKey(list, rule); break; } } else { this.disabledCompleteEmit = false; } } }, 1); }); }, // 销毁全局emit和listener监听 _offEmit() { uni.$off(c$1.errorUpdateKey); uni.$off(c$1.completeUpdateKey); } } }; const block0$3 = (Comp) => { (Comp.$renderjs || (Comp.$renderjs = [])).push("pagingRenderjs"); (Comp.$renderjsModules || (Comp.$renderjsModules = {}))["pagingRenderjs"] = "463e3cc3"; }; const block1 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("pagingWxs"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["pagingWxs"] = "42613348"; }; function _sfc_render$2e(_ctx, _cache, $props, $setup, $data, $options) { const _component_z_paging_refresh = vue.resolveComponent("z-paging-refresh"); const _component_z_paging_load_more = vue.resolveComponent("z-paging-load-more"); const _component_z_paging_empty_view = resolveEasycom(vue.resolveDynamicComponent("z-paging-empty-view"), __easycom_0$f); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass([{ "z-paging-content": true, "z-paging-content-full": !_ctx.usePageScroll, "z-paging-content-fixed": !_ctx.usePageScroll && _ctx.fixed, "z-paging-content-page": _ctx.usePageScroll, "z-paging-reached-top": _ctx.renderPropScrollTop < 1, "z-paging-use-chat-record-mode": _ctx.useChatRecordMode }, _ctx.pagingClass]), style: vue.normalizeStyle([_ctx.finalPagingStyle]) }, [ vue.createCommentVNode(" 二楼view "), _ctx.showF2 && _ctx.showRefresherF2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop", "prevent"])), class: "zp-f2-content", style: vue.normalizeStyle([{ "transform": _ctx.f2Transform, "transition": `transform .2s linear`, "height": _ctx.superContentHeight + "px", "z-index": _ctx.f2ZIndex }]) }, [ vue.renderSlot(_ctx.$slots, "f2", {}, void 0, true) ], 36 /* STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 顶部固定的slot "), _ctx.zSlots.top ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ !_ctx.usePageScroll ? vue.renderSlot(_ctx.$slots, "top", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "zp-page-top", onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => { }, ["stop", "prevent"])), style: vue.normalizeStyle([{ "top": `${_ctx.windowTop}px`, "z-index": _ctx.topZIndex }]) }, [ vue.renderSlot(_ctx.$slots, "top", {}, void 0, true) ], 36 /* STYLE, NEED_HYDRATION */ )) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass({ "zp-view-super": true, "zp-scroll-view-super": !_ctx.usePageScroll }), style: vue.normalizeStyle([_ctx.finalScrollViewStyle]) }, [ _ctx.zSlots.left ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass({ "zp-page-left": true, "zp-absoulte": _ctx.finalIsOldWebView }) }, [ vue.renderSlot(_ctx.$slots, "left", {}, void 0, true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass({ "zp-scroll-view-container": true, "zp-absoulte": _ctx.finalIsOldWebView }), style: vue.normalizeStyle([_ctx.scrollViewContainerStyle]) }, [ vue.createElementVNode("scroll-view", { ref: "zp-scroll-view", class: vue.normalizeClass({ "zp-scroll-view": true, "zp-scroll-view-absolute": !_ctx.usePageScroll, "zp-scroll-view-hide-scrollbar": !_ctx.showScrollbar }), style: vue.normalizeStyle([_ctx.chatRecordRotateStyle]), "scroll-top": _ctx.scrollTop, "scroll-left": _ctx.scrollLeft, "scroll-x": _ctx.scrollX, "scroll-y": _ctx.finalScrollable, "enable-back-to-top": _ctx.finalEnableBackToTop, "show-scrollbar": _ctx.showScrollbar, "scroll-with-animation": _ctx.finalScrollWithAnimation, "scroll-into-view": _ctx.scrollIntoView, "lower-threshold": _ctx.finalLowerThreshold, "upper-threshold": 5, "refresher-enabled": _ctx.finalRefresherEnabled && !_ctx.useCustomRefresher, "refresher-threshold": _ctx.finalRefresherThreshold, "refresher-default-style": _ctx.finalRefresherDefaultStyle, "refresher-background": _ctx.refresherBackground, "refresher-triggered": _ctx.finalRefresherTriggered, onScroll: _cache[12] || (_cache[12] = (...args) => _ctx._scroll && _ctx._scroll(...args)), onScrolltolower: _cache[13] || (_cache[13] = (...args) => _ctx._onScrollToLower && _ctx._onScrollToLower(...args)), onScrolltoupper: _cache[14] || (_cache[14] = (...args) => _ctx._onScrollToUpper && _ctx._onScrollToUpper(...args)), onRefresherrestore: _cache[15] || (_cache[15] = (...args) => _ctx._onRestore && _ctx._onRestore(...args)), onRefresherrefresh: _cache[16] || (_cache[16] = ($event) => _ctx._onRefresh(true)) }, [ vue.createElementVNode( "view", { class: "zp-paging-touch-view", onTouchstart: _cache[4] || (_cache[4] = (...args) => _ctx.pagingWxs.touchstart && _ctx.pagingWxs.touchstart(...args)), onTouchmove: _cache[5] || (_cache[5] = (...args) => _ctx.pagingWxs.touchmove && _ctx.pagingWxs.touchmove(...args)), onTouchend: _cache[6] || (_cache[6] = (...args) => _ctx.pagingWxs.touchend && _ctx.pagingWxs.touchend(...args)), onTouchcancel: _cache[7] || (_cache[7] = (...args) => _ctx.pagingWxs.touchend && _ctx.pagingWxs.touchend(...args)), onMousedown: _cache[8] || (_cache[8] = (...args) => _ctx.pagingWxs.mousedown && _ctx.pagingWxs.mousedown(...args)), onMousemove: _cache[9] || (_cache[9] = (...args) => _ctx.pagingWxs.mousemove && _ctx.pagingWxs.mousemove(...args)), onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.pagingWxs.mouseup && _ctx.pagingWxs.mouseup(...args)), onMouseleave: _cache[11] || (_cache[11] = (...args) => _ctx.pagingWxs.mouseleave && _ctx.pagingWxs.mouseleave(...args)) }, [ _ctx.finalRefresherFixedBacHeight > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "zp-fixed-bac-view", style: vue.normalizeStyle([{ "background": _ctx.refresherFixedBackground, "height": `${_ctx.finalRefresherFixedBacHeight}px` }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "zp-paging-main", style: vue.normalizeStyle([_ctx.scrollViewInStyle, { "transform": _ctx.finalRefresherTransform, "transition": _ctx.refresherTransition }]), "change:prop": _ctx.pagingWxs.propObserver, prop: vue.wp(_ctx.wxsPropType), "data-refresherThreshold": _ctx.finalRefresherThreshold, "data-refresherF2Enabled": _ctx.refresherF2Enabled, "data-refresherF2Threshold": _ctx.finalRefresherF2Threshold, "data-isIos": _ctx.isIos, "data-loading": _ctx.loading || _ctx.isRefresherInComplete, "data-useChatRecordMode": _ctx.useChatRecordMode, "data-refresherEnabled": _ctx.finalRefresherEnabled, "data-useCustomRefresher": _ctx.useCustomRefresher, "data-pageScrollTop": _ctx.wxsPageScrollTop, "data-scrollTop": _ctx.wxsScrollTop, "data-refresherMaxAngle": _ctx.refresherMaxAngle, "data-refresherNoTransform": _ctx.refresherNoTransform, "data-refresherAecc": _ctx.refresherAngleEnableChangeContinued, "data-usePageScroll": _ctx.usePageScroll, "data-watchTouchDirectionChange": _ctx.watchTouchDirectionChange, "data-oldIsTouchmoving": _ctx.isTouchmoving, "data-refresherOutRate": _ctx.finalRefresherOutRate, "data-refresherPullRate": _ctx.finalRefresherPullRate, "data-hasTouchmove": _ctx.hasTouchmove, "change:renderPropIsIosAndH5": _ctx.pagingRenderjs.renderPropIsIosAndH5Change, renderPropIsIosAndH5: vue.wp(_ctx.isIosAndH5) }, [ _ctx.showRefresher ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "zp-custom-refresher-view", style: vue.normalizeStyle([{ "margin-top": `-${_ctx.finalRefresherThreshold + _ctx.refresherThresholdUpdateTag}px`, "background": _ctx.refresherBackground, "opacity": _ctx.isTouchmoving ? 1 : 0 }]) }, [ vue.createElementVNode( "view", { class: "zp-custom-refresher-container", style: vue.normalizeStyle([{ "height": `${_ctx.finalRefresherThreshold}px`, "background": _ctx.refresherBackground }]) }, [ _ctx.useRefresherStatusBarPlaceholder ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "zp-custom-refresher-status-bar-placeholder", style: vue.normalizeStyle([{ "height": `${_ctx.statusBarHeight}px` }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 下拉刷新view "), vue.createElementVNode("view", { class: "zp-custom-refresher-slot-view" }, [ !(_ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete) && !(_ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2) ? vue.renderSlot(_ctx.$slots, "refresher", { key: 0, refresherStatus: _ctx.refresherStatus }, void 0, true) : vue.createCommentVNode("v-if", true) ]), _ctx.zSlots.refresherComplete && _ctx.refresherStatus === _ctx.R.Complete ? vue.renderSlot(_ctx.$slots, "refresherComplete", { key: 1 }, void 0, true) : _ctx.zSlots.refresherF2 && _ctx.refresherStatus === _ctx.R.GoF2 ? vue.renderSlot(_ctx.$slots, "refresherF2", { key: 2 }, void 0, true) : !_ctx.showCustomRefresher ? (vue.openBlock(), vue.createBlock(_component_z_paging_refresh, { key: 3, ref: "refresh", class: "zp-custom-refresher-refresh", style: vue.normalizeStyle([{ "height": `${_ctx.finalRefresherThreshold - _ctx.finalRefresherThresholdPlaceholder}px` }]), status: _ctx.refresherStatus, defaultThemeStyle: _ctx.finalRefresherThemeStyle, defaultText: _ctx.finalRefresherDefaultText, isIos: _ctx.isIos, pullingText: _ctx.finalRefresherPullingText, refreshingText: _ctx.finalRefresherRefreshingText, completeText: _ctx.finalRefresherCompleteText, goF2Text: _ctx.finalRefresherGoF2Text, defaultImg: _ctx.refresherDefaultImg, pullingImg: _ctx.refresherPullingImg, refreshingImg: _ctx.refresherRefreshingImg, completeImg: _ctx.refresherCompleteImg, refreshingAnimated: _ctx.refresherRefreshingAnimated, showUpdateTime: _ctx.showRefresherUpdateTime, updateTimeKey: _ctx.refresherUpdateTimeKey, updateTimeTextMap: _ctx.finalRefresherUpdateTimeTextMap, imgStyle: _ctx.refresherImgStyle, titleStyle: _ctx.refresherTitleStyle, updateTimeStyle: _ctx.refresherUpdateTimeStyle, unit: _ctx.unit }, null, 8, ["style", "status", "defaultThemeStyle", "defaultText", "isIos", "pullingText", "refreshingText", "completeText", "goF2Text", "defaultImg", "pullingImg", "refreshingImg", "completeImg", "refreshingAnimated", "showUpdateTime", "updateTimeKey", "updateTimeTextMap", "imgStyle", "titleStyle", "updateTimeStyle", "unit"])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "zp-paging-container", style: vue.normalizeStyle([{ justifyContent: _ctx.useChatRecordMode ? "flex-end" : "flex-start" }]) }, [ vue.createCommentVNode(" 全屏Loading "), _ctx.showLoading && _ctx.zSlots.loading && !_ctx.loadingFullFixed ? vue.renderSlot(_ctx.$slots, "loading", { key: 0 }, void 0, true) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 主体内容 "), vue.createElementVNode( "view", { class: "zp-paging-container-content", style: vue.normalizeStyle([_ctx.finalPlaceholderTopHeightStyle, _ctx.finalPagingContentStyle]) }, [ vue.createCommentVNode(" 虚拟列表顶部占位view "), _ctx.useVirtualList ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "zp-virtual-placeholder", style: vue.normalizeStyle([{ height: _ctx.virtualPlaceholderTopHeight + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), vue.createCommentVNode(" 内置列表&虚拟列表 "), _ctx.finalUseInnerList ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.renderSlot(_ctx.$slots, "header", {}, void 0, true), vue.createElementVNode( "view", { class: "zp-list-container", style: vue.normalizeStyle([_ctx.innerListStyle]) }, [ _ctx.finalUseVirtualList ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(_ctx.virtualList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "zp-list-cell", style: vue.normalizeStyle([_ctx.innerCellStyle]), id: `${_ctx.fianlVirtualCellIdPrefix}-${item[_ctx.virtualCellIndexKey]}`, key: item["zp_unique_index"], onClick: ($event) => _ctx._innerCellClick(item, _ctx.virtualTopRangeIndex + index2) }, [ _ctx.useCompatibilityMode ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, "使用兼容模式请在组件源码z-paging.vue第105行中注释这一行,并打开下面一行注释")) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(' '), vue.renderSlot(_ctx.$slots, "cell", { item, index: _ctx.virtualTopRangeIndex + index2 }, void 0, true) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) ], 12, ["id", "onClick"]); }), 128 /* KEYED_FRAGMENT */ )) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(_ctx.realTotalData, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "zp-list-cell", key: index2, onClick: ($event) => _ctx._innerCellClick(item, index2) }, [ vue.renderSlot(_ctx.$slots, "cell", { item, index: index2 }, void 0, true) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ), vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 聊天记录模式加载更多loading "), _ctx.useChatRecordMode && _ctx.realTotalData.length >= _ctx.defaultPageSize && (_ctx.loadingStatus !== _ctx.M.NoMore || _ctx.zSlots.chatNoMore) && (_ctx.realTotalData.length || _ctx.showChatLoadingWhenReload && _ctx.showLoading) && !_ctx.isFirstPageAndNoMore ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, style: vue.normalizeStyle([_ctx.chatRecordRotateStyle]) }, [ _ctx.loadingStatus === _ctx.M.NoMore && _ctx.zSlots.chatNoMore ? vue.renderSlot(_ctx.$slots, "chatNoMore", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ _ctx.zSlots.chatLoading ? vue.renderSlot(_ctx.$slots, "chatLoading", { key: 0, loadingMoreStatus: _ctx.loadingStatus }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_z_paging_load_more, { key: 1, onDoClick: _cache[2] || (_cache[2] = ($event) => _ctx._onLoadingMore("click")), zConfig: _ctx.zLoadMoreConfig }, null, 8, ["zConfig"])) ], 64 /* STABLE_FRAGMENT */ )) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 虚拟列表底部占位view "), _ctx.useVirtualList ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "zp-virtual-placeholder", style: vue.normalizeStyle([{ height: _ctx.virtualPlaceholderBottomHeight + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 上拉加载更多view "), _ctx.showLoadingMoreDefault ? vue.renderSlot(_ctx.$slots, "loadingMoreDefault", { key: 4 }, void 0, true) : _ctx.showLoadingMoreLoading ? vue.renderSlot(_ctx.$slots, "loadingMoreLoading", { key: 5 }, void 0, true) : _ctx.showLoadingMoreNoMore ? vue.renderSlot(_ctx.$slots, "loadingMoreNoMore", { key: 6 }, void 0, true) : _ctx.showLoadingMoreFail ? vue.renderSlot(_ctx.$slots, "loadingMoreFail", { key: 7 }, void 0, true) : _ctx.showLoadingMoreCustom ? (vue.openBlock(), vue.createBlock(_component_z_paging_load_more, { key: 8, onDoClick: _cache[3] || (_cache[3] = ($event) => _ctx._onLoadingMore("click")), zConfig: _ctx.zLoadMoreConfig }, null, 8, ["zConfig"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 底部安全区域useSafeAreaPlaceholder模式占位,此时占位不再固定在底部而是跟随页面一起滚动 "), vue.createCommentVNode(" 如果底部slot=bottom存在,占位区域会插入在slot=bottom下方,不再跟随页面滚动,因此这里就没必要显示了 "), vue.createCommentVNode(" 聊天记录模式因为列表倒置,此处不需要显示底部安全区域,另行处理 "), _ctx.safeAreaInsetBottom && _ctx.finalUseSafeAreaPlaceholder && !_ctx.useChatRecordMode ? (vue.openBlock(), vue.createElementBlock( "view", { key: 9, class: "zp-safe-area-placeholder", style: vue.normalizeStyle([{ height: _ctx.safeAreaBottom + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createCommentVNode(" 空数据图 "), _ctx.showEmpty ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass({ "zp-empty-view": true, "zp-empty-view-center": _ctx.emptyViewCenter }), style: vue.normalizeStyle([_ctx.emptyViewSuperStyle, _ctx.chatRecordRotateStyle]) }, [ _ctx.zSlots.empty ? vue.renderSlot(_ctx.$slots, "empty", { key: 0, isLoadFailed: _ctx.isLoadFailed }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_z_paging_empty_view, { key: 1, emptyViewImg: _ctx.finalEmptyViewImg, emptyViewText: _ctx.finalEmptyViewText, showEmptyViewReload: _ctx.finalShowEmptyViewReload, emptyViewReloadText: _ctx.finalEmptyViewReloadText, isLoadFailed: _ctx.isLoadFailed, emptyViewStyle: _ctx.emptyViewStyle, emptyViewTitleStyle: _ctx.emptyViewTitleStyle, emptyViewImgStyle: _ctx.emptyViewImgStyle, emptyViewReloadStyle: _ctx.emptyViewReloadStyle, emptyViewZIndex: _ctx.emptyViewZIndex, emptyViewFixed: _ctx.emptyViewFixed, unit: _ctx.unit, onReload: _ctx._emptyViewReload, onViewClick: _ctx._emptyViewClick }, null, 8, ["emptyViewImg", "emptyViewText", "showEmptyViewReload", "emptyViewReloadText", "isLoadFailed", "emptyViewStyle", "emptyViewTitleStyle", "emptyViewImgStyle", "emptyViewReloadStyle", "emptyViewZIndex", "emptyViewFixed", "unit", "onReload", "onViewClick"])) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 12, ["change:prop", "prop", "data-refresherThreshold", "data-refresherF2Enabled", "data-refresherF2Threshold", "data-isIos", "data-loading", "data-useChatRecordMode", "data-refresherEnabled", "data-useCustomRefresher", "data-pageScrollTop", "data-scrollTop", "data-refresherMaxAngle", "data-refresherNoTransform", "data-refresherAecc", "data-usePageScroll", "data-watchTouchDirectionChange", "data-oldIsTouchmoving", "data-refresherOutRate", "data-refresherPullRate", "data-hasTouchmove", "change:renderPropIsIosAndH5", "renderPropIsIosAndH5"]) ], 32 /* NEED_HYDRATION */ ) ], 46, ["scroll-top", "scroll-left", "scroll-x", "scroll-y", "enable-back-to-top", "show-scrollbar", "scroll-with-animation", "scroll-into-view", "lower-threshold", "refresher-enabled", "refresher-threshold", "refresher-default-style", "refresher-background", "refresher-triggered"]) ], 6 /* CLASS, STYLE */ ), _ctx.zSlots.right ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass({ "zp-page-right": true, "zp-absoulte zp-right": _ctx.finalIsOldWebView }) }, [ vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 底部固定的slot "), vue.createElementVNode( "view", { class: "zp-page-bottom-container", style: vue.normalizeStyle({ "background": _ctx.bottomBgColor }) }, [ _ctx.zSlots.bottom ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createCommentVNode(" 非页面滚动底部插槽(父容器开启flex,中间列表设置了flex:1,通过中间列表撑开固定在底部) "), !_ctx.usePageScroll ? vue.renderSlot(_ctx.$slots, "bottom", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 页面滚动底部插槽(通过position: fixed固定在底部) "), vue.createElementVNode( "view", { class: "zp-page-bottom", onTouchmove: _cache[17] || (_cache[17] = vue.withModifiers(() => { }, ["stop", "prevent"])), style: vue.normalizeStyle([{ "bottom": `${_ctx.windowBottom}px`, "background": _ctx.bottomBgColor }]) }, [ vue.renderSlot(_ctx.$slots, "bottom", {}, void 0, true), vue.createCommentVNode(" 页面滚动底部安全区域占位(仅slot=bottom存在时展示在slot=bottom插入的view下方,当slot=bottom不存在时,通过控制容器的marginBottom设置底部安全区域间距) "), _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, style: vue.normalizeStyle([{ height: _ctx.safeAreaBottom + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 36 /* STYLE, NEED_HYDRATION */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 非页面滚动底部安全区域占位(无论slot=bottom是否存在)"), vue.createCommentVNode(" 如果useSafeAreaPlaceholder开启了并且slot=bottom不存在就不显示这个占位view了,因为此时useSafeAreaPlaceholder会是跟随滚动的状态 "), vue.createCommentVNode(" 聊天记录模式因为列表倒置,此处不需要显示底部安全区域,另行处理 "), _ctx.safeAreaInsetBottom && !_ctx.usePageScroll && !_ctx.finalUseSafeAreaPlaceholder && !_ctx.useChatRecordMode ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, style: vue.normalizeStyle([{ height: _ctx.safeAreaBottom + "px" }]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 聊天记录模式底部占位 "), _ctx.useChatRecordMode && _ctx.autoAdjustPositionWhenChat ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createElementVNode( "view", { style: vue.normalizeStyle([{ height: _ctx.chatRecordModeSafeAreaBottom + "px" }]) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "zp-page-bottom-keyboard-placeholder-animate", style: vue.normalizeStyle([{ height: _ctx.keyboardHeight + "px" }]) }, null, 4 /* STYLE */ ) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createCommentVNode(" 点击返回顶部view "), _ctx.showBackToTopClass ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: vue.normalizeClass(_ctx.finalBackToTopClass), style: vue.normalizeStyle([_ctx.finalBackToTopStyle]), onClick: _cache[18] || (_cache[18] = vue.withModifiers((...args) => _ctx._backToTopClick && _ctx._backToTopClick(...args), ["stop"])) }, [ _ctx.zSlots.backToTop ? vue.renderSlot(_ctx.$slots, "backToTop", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, class: vue.normalizeClass(["zp-back-to-top-img", { "zp-back-to-top-img-inversion": _ctx.useChatRecordMode && !_ctx.backToTopImg.length }]), src: _ctx.backToTopImg.length ? _ctx.backToTopImg : _ctx.base64BackToTop }, null, 10, ["src"])) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 全屏Loading(铺满z-paging并固定) "), _ctx.showLoading && _ctx.zSlots.loading && _ctx.loadingFullFixed ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "zp-loading-fixed" }, [ vue.renderSlot(_ctx.$slots, "loading", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } if (typeof block0$3 === "function") block0$3(_sfc_main$2f); if (typeof block1 === "function") block1(_sfc_main$2f); const __easycom_1$5 = /* @__PURE__ */ _export_sfc(_sfc_main$2f, [["render", _sfc_render$2e], ["__scopeId", "data-v-1aa372d7"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/z-paging/components/z-paging/z-paging.vue"]]); function useZPaging(paging) { const cPaging = !!paging ? paging.value || paging : null; onPullDownRefresh(() => { if (!cPaging || !cPaging.value) return; cPaging.value.reload().catch(() => { }); }); onPageScroll((e2) => { if (!cPaging || !cPaging.value) return; cPaging.value.updatePageScrollTop(e2.scrollTop); e2.scrollTop < 10 && cPaging.value.doChatRecordLoadMore(); }); onReachBottom(() => { if (!cPaging || !cPaging.value) return; cPaging.value.pageReachBottom(); }); } const _sfc_main$2e = { props: { modelValue: { type: [String, Number], default: "" }, title: { type: String, default: "" }, description: { type: String, default: "" }, options: { type: Array, default: () => { return []; } }, valueKey: { type: String, default: "value" }, labelKey: { type: String, default: "name" } }, data() { return { show: false, current: "" }; }, created() { if (this.modelValue) { this.options.forEach((ele) => { if (ele[this.valueKey] == this.modelValue) { this.current = ele[this.labelKey]; } }); } }, emits: ["update:modelValue"], watch: { modelValue() { this.options.forEach((ele) => { if (ele[this.valueKey] == this.modelValue) { this.current = ele[this.labelKey]; } }); } }, methods: { hideKeyboard() { uni.hideKeyboard(); }, select(e2) { this.$emit("update:modelValue", e2[this.valueKey]); this.current = e2[this.labelKey]; } } }; function _sfc_render$2d(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_input = vue.resolveComponent("up-input"); const _component_up_action_sheet = vue.resolveComponent("up-action-sheet"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-action-sheet-data" }, [ vue.createElementVNode("view", { class: "u-action-sheet-data__trigger" }, [ vue.renderSlot(_ctx.$slots, "trigger", {}, void 0, true), !_ctx.$slots["trigger"] ? (vue.openBlock(), vue.createBlock(_component_up_input, { key: 0, modelValue: $data.current, disabled: "", disabledColor: "#ffffff", placeholder: $props.title, border: "none" }, null, 8, ["modelValue", "placeholder"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { onClick: _cache[0] || (_cache[0] = ($event) => $data.show = true), class: "u-action-sheet-data__trigger__cover" }) ]), vue.createVNode(_component_up_action_sheet, { show: $data.show, actions: $props.options, title: $props.title, safeAreaInsetBottom: "", description: $props.description, onClose: _cache[1] || (_cache[1] = ($event) => $data.show = false), onSelect: $options.select }, null, 8, ["show", "actions", "title", "description", "onSelect"]) ]); } const uActionSheetData = /* @__PURE__ */ _export_sfc(_sfc_main$2e, [["render", _sfc_render$2d], ["__scopeId", "data-v-2ac4c00c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-action-sheet-data/u-action-sheet-data.vue"]]); const __vite_glob_0_0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uActionSheetData }, Symbol.toStringTag, { value: "Module" })); const defineMixin = (options2) => { return options2; }; const version = "3"; { formatAppLog("log", "at uni_modules/uview-plus/libs/config/config.js:5", ` %c uview-plus V${version} %c https://ijry.github.io/uview-plus/ `, "color: #ffffff; background: #3c9cff; padding:5px 0;", "color: #3c9cff;background: #ffffff; padding:5px 0;"); } const config$1 = { v: version, version, // 主题名称 type: [ "primary", "success", "info", "error", "warning" ], // 颜色部分,本来可以通过scss的:export导出供js使用,但是奈何nvue不支持 color: { "u-primary": "#2979ff", "u-warning": "#ff9900", "u-success": "#19be6b", "u-error": "#fa3534", "u-info": "#909399", "u-main-color": "#303133", "u-content-color": "#606266", "u-tips-color": "#909399", "u-light-color": "#c0c4cc", "up-primary": "#2979ff", "up-warning": "#ff9900", "up-success": "#19be6b", "up-error": "#fa3534", "up-info": "#909399", "up-main-color": "#303133", "up-content-color": "#606266", "up-tips-color": "#909399", "up-light-color": "#c0c4cc" }, // 字体图标地址 iconUrl: "https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf", // 自定义图标 customIcon: { family: "", url: "" }, customIcons: {}, // 自定义图标与unicode对应关系 // 默认单位,可以通过配置为rpx,那么在用于传入组件大小参数为数值时,就默认为rpx unit: "px", // 拦截器 interceptor: { navbarLeftClick: null }, // 只加载一次字体 loadFontOnce: false }; const zIndex = { toast: 10090, noNetwork: 10080, // popup包含popup,actionsheet,keyboard,picker的值 popup: 10075, mask: 10070, navbar: 980, topTips: 975, sticky: 970, indexListSticky: 965 }; const color$3 = { primary: "#3c9cff", info: "#909399", default: "#909399", warning: "#f9ae3d", error: "#f56c6c", success: "#5ac725", mainColor: "#303133", contentColor: "#606266", tipsColor: "#909399", lightColor: "#c0c4cc", borderColor: "#e4e7ed" }; const { toString } = Object.prototype; function isArray(val) { return toString.call(val) === "[object Array]"; } function isObject(val) { return val !== null && typeof val === "object"; } function isDate(val) { return toString.call(val) === "[object Date]"; } function isURLSearchParams(val) { return typeof URLSearchParams !== "undefined" && val instanceof URLSearchParams; } function forEach(obj, fn) { if (obj === null || typeof obj === "undefined") { return; } if (typeof obj !== "object") { obj = [obj]; } if (isArray(obj)) { for (let i2 = 0, l2 = obj.length; i2 < l2; i2++) { fn.call(null, obj[i2], i2, obj); } } else { for (const key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { fn.call(null, obj[key], key, obj); } } } } function isPlainObject(obj) { return Object.prototype.toString.call(obj) === "[object Object]"; } function deepMerge$2() { const result = {}; function assignValue(val, key) { if (typeof result[key] === "object" && typeof val === "object") { result[key] = deepMerge$2(result[key], val); } else if (typeof val === "object") { result[key] = deepMerge$2({}, val); } else { result[key] = val; } } for (let i2 = 0, l2 = arguments.length; i2 < l2; i2++) { forEach(arguments[i2], assignValue); } return result; } function isUndefined(val) { return typeof val === "undefined"; } function encode(val) { return encodeURIComponent(val).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function buildURL(url2, params2) { if (!params2) { return url2; } let serializedParams; if (isURLSearchParams(params2)) { serializedParams = params2.toString(); } else { const parts = []; forEach(params2, (val, key) => { if (val === null || typeof val === "undefined") { return; } if (isArray(val)) { key = `${key}[]`; } else { val = [val]; } forEach(val, (v2) => { if (isDate(v2)) { v2 = v2.toISOString(); } else if (isObject(v2)) { v2 = JSON.stringify(v2); } parts.push(`${encode(key)}=${encode(v2)}`); }); }); serializedParams = parts.join("&"); } if (serializedParams) { const hashmarkIndex = url2.indexOf("#"); if (hashmarkIndex !== -1) { url2 = url2.slice(0, hashmarkIndex); } url2 += (url2.indexOf("?") === -1 ? "?" : "&") + serializedParams; } return url2; } function isAbsoluteURL(url2) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2); } function combineURLs(baseURL, relativeURL) { return relativeURL ? `${baseURL.replace(/\/+$/, "")}/${relativeURL.replace(/^\/+/, "")}` : baseURL; } function buildFullPath(baseURL, requestedURL) { if (baseURL && !isAbsoluteURL(requestedURL)) { return combineURLs(baseURL, requestedURL); } return requestedURL; } function settle(resolve, reject, response) { const { validateStatus } = response.config; const status = response.statusCode; if (status && (!validateStatus || validateStatus(status))) { resolve(response); } else { reject(response); } } const mergeKeys$1 = (keys, config2) => { const config3 = {}; keys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } }); return config3; }; const adapter = (config2) => new Promise((resolve, reject) => { const fullPath = buildURL(buildFullPath(config2.baseURL, config2.url), config2.params); const _config = { url: fullPath, header: config2.header, complete: (response) => { config2.fullPath = fullPath; response.config = config2; try { if (typeof response.data === "string") { response.data = JSON.parse(response.data); } } catch (e2) { } settle(resolve, reject, response); } }; let requestTask; if (config2.method === "UPLOAD") { delete _config.header["content-type"]; delete _config.header["Content-Type"]; const otherConfig = { filePath: config2.filePath, name: config2.name }; const optionalKeys = [ "files", "timeout", "formData" ]; requestTask = uni.uploadFile({ ..._config, ...otherConfig, ...mergeKeys$1(optionalKeys, config2) }); } else if (config2.method === "DOWNLOAD") { if (!isUndefined(config2.timeout)) { _config.timeout = config2.timeout; } requestTask = uni.downloadFile(_config); } else { const optionalKeys = [ "data", "method", "timeout", "dataType", "responseType", "sslVerify", "firstIpv4" ]; requestTask = uni.request({ ..._config, ...mergeKeys$1(optionalKeys, config2) }); } if (config2.getTask) { config2.getTask(requestTask, config2); } }); const dispatchRequest = (config2) => adapter(config2); function InterceptorManager() { this.handlers = []; } InterceptorManager.prototype.use = function use(fulfilled, rejected) { this.handlers.push({ fulfilled, rejected }); return this.handlers.length - 1; }; InterceptorManager.prototype.eject = function eject(id) { if (this.handlers[id]) { this.handlers[id] = null; } }; InterceptorManager.prototype.forEach = function forEach2(fn) { this.handlers.forEach((h2) => { if (h2 !== null) { fn(h2); } }); }; const mergeKeys = (keys, globalsConfig, config2) => { const config3 = {}; keys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } else if (!isUndefined(globalsConfig[prop])) { config3[prop] = globalsConfig[prop]; } }); return config3; }; const mergeConfig = (globalsConfig, config2 = {}) => { const method = config2.method || globalsConfig.method || "GET"; let config3 = { baseURL: globalsConfig.baseURL || "", method, url: config2.url || "", params: config2.params || {}, custom: { ...globalsConfig.custom || {}, ...config2.custom || {} }, header: deepMerge$2(globalsConfig.header || {}, config2.header || {}) }; const defaultToConfig2Keys = ["getTask", "validateStatus"]; config3 = { ...config3, ...mergeKeys(defaultToConfig2Keys, globalsConfig, config2) }; if (method === "DOWNLOAD") { if (!isUndefined(config2.timeout)) { config3.timeout = config2.timeout; } else if (!isUndefined(globalsConfig.timeout)) { config3.timeout = globalsConfig.timeout; } } else if (method === "UPLOAD") { delete config3.header["content-type"]; delete config3.header["Content-Type"]; const uploadKeys = [ "files", "filePath", "name", "timeout", "formData" ]; uploadKeys.forEach((prop) => { if (!isUndefined(config2[prop])) { config3[prop] = config2[prop]; } }); if (isUndefined(config3.timeout) && !isUndefined(globalsConfig.timeout)) { config3.timeout = globalsConfig.timeout; } } else { const defaultsKeys = [ "data", "timeout", "dataType", "responseType", "sslVerify", "firstIpv4" ]; config3 = { ...config3, ...mergeKeys(defaultsKeys, globalsConfig, config2) }; } return config3; }; const defaults = { baseURL: "", header: {}, method: "GET", dataType: "json", responseType: "text", custom: {}, timeout: 6e4, sslVerify: true, firstIpv4: false, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; } }; var clone = function() { function _instanceof(obj, type2) { return type2 != null && obj instanceof type2; } var nativeMap; try { nativeMap = Map; } catch (_2) { nativeMap = function() { }; } var nativeSet; try { nativeSet = Set; } catch (_2) { nativeSet = function() { }; } var nativePromise; try { nativePromise = Promise; } catch (_2) { nativePromise = function() { }; } function clone2(parent, circular, depth, prototype, includeNonEnumerable) { if (typeof circular === "object") { depth = circular.depth; prototype = circular.prototype; includeNonEnumerable = circular.includeNonEnumerable; circular = circular.circular; } var allParents = []; var allChildren = []; var useBuffer = typeof Buffer != "undefined"; if (typeof circular == "undefined") circular = true; if (typeof depth == "undefined") depth = Infinity; function _clone(parent2, depth2) { if (parent2 === null) return null; if (depth2 === 0) return parent2; var child; var proto; if (typeof parent2 != "object") { return parent2; } if (_instanceof(parent2, nativeMap)) { child = new nativeMap(); } else if (_instanceof(parent2, nativeSet)) { child = new nativeSet(); } else if (_instanceof(parent2, nativePromise)) { child = new nativePromise(function(resolve, reject) { parent2.then(function(value2) { resolve(_clone(value2, depth2 - 1)); }, function(err) { reject(_clone(err, depth2 - 1)); }); }); } else if (clone2.__isArray(parent2)) { child = []; } else if (clone2.__isRegExp(parent2)) { child = new RegExp(parent2.source, __getRegExpFlags(parent2)); if (parent2.lastIndex) child.lastIndex = parent2.lastIndex; } else if (clone2.__isDate(parent2)) { child = new Date(parent2.getTime()); } else if (useBuffer && Buffer.isBuffer(parent2)) { if (Buffer.from) { child = Buffer.from(parent2); } else { child = new Buffer(parent2.length); parent2.copy(child); } return child; } else if (_instanceof(parent2, Error)) { child = Object.create(parent2); } else { if (typeof prototype == "undefined") { proto = Object.getPrototypeOf(parent2); child = Object.create(proto); } else { child = Object.create(prototype); proto = prototype; } } if (circular) { var index2 = allParents.indexOf(parent2); if (index2 != -1) { return allChildren[index2]; } allParents.push(parent2); allChildren.push(child); } if (_instanceof(parent2, nativeMap)) { parent2.forEach(function(value2, key) { var keyChild = _clone(key, depth2 - 1); var valueChild = _clone(value2, depth2 - 1); child.set(keyChild, valueChild); }); } if (_instanceof(parent2, nativeSet)) { parent2.forEach(function(value2) { var entryChild = _clone(value2, depth2 - 1); child.add(entryChild); }); } for (var i2 in parent2) { var attrs = Object.getOwnPropertyDescriptor(parent2, i2); if (attrs) { child[i2] = _clone(parent2[i2], depth2 - 1); } try { var objProperty = Object.getOwnPropertyDescriptor(parent2, i2); if (objProperty.set === "undefined") { continue; } child[i2] = _clone(parent2[i2], depth2 - 1); } catch (e2) { if (e2 instanceof TypeError) { continue; } else if (e2 instanceof ReferenceError) { continue; } } } if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(parent2); for (var i2 = 0; i2 < symbols.length; i2++) { var symbol = symbols[i2]; var descriptor = Object.getOwnPropertyDescriptor(parent2, symbol); if (descriptor && !descriptor.enumerable && !includeNonEnumerable) { continue; } child[symbol] = _clone(parent2[symbol], depth2 - 1); Object.defineProperty(child, symbol, descriptor); } } if (includeNonEnumerable) { var allPropertyNames = Object.getOwnPropertyNames(parent2); for (var i2 = 0; i2 < allPropertyNames.length; i2++) { var propertyName = allPropertyNames[i2]; var descriptor = Object.getOwnPropertyDescriptor(parent2, propertyName); if (descriptor && descriptor.enumerable) { continue; } child[propertyName] = _clone(parent2[propertyName], depth2 - 1); Object.defineProperty(child, propertyName, descriptor); } } return child; } return _clone(parent, depth); } clone2.clonePrototype = function clonePrototype(parent) { if (parent === null) return null; var c2 = function() { }; c2.prototype = parent; return new c2(); }; function __objToStr(o2) { return Object.prototype.toString.call(o2); } clone2.__objToStr = __objToStr; function __isDate(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object Date]"; } clone2.__isDate = __isDate; function __isArray(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object Array]"; } clone2.__isArray = __isArray; function __isRegExp(o2) { return typeof o2 === "object" && __objToStr(o2) === "[object RegExp]"; } clone2.__isRegExp = __isRegExp; function __getRegExpFlags(re2) { var flags = ""; if (re2.global) flags += "g"; if (re2.ignoreCase) flags += "i"; if (re2.multiline) flags += "m"; return flags; } clone2.__getRegExpFlags = __getRegExpFlags; return clone2; }(); class Request { /** * @param {Object} arg - 全局配置 * @param {String} arg.baseURL - 全局根路径 * @param {Object} arg.header - 全局header * @param {String} arg.method = [GET|POST|PUT|DELETE|CONNECT|HEAD|OPTIONS|TRACE] - 全局默认请求方式 * @param {String} arg.dataType = [json] - 全局默认的dataType * @param {String} arg.responseType = [text|arraybuffer] - 全局默认的responseType。支付宝小程序不支持 * @param {Object} arg.custom - 全局默认的自定义参数 * @param {Number} arg.timeout - 全局默认的超时时间,单位 ms。默认60000。H5(HBuilderX 2.9.9+)、APP(HBuilderX 2.9.9+)、微信小程序(2.10.0)、支付宝小程序 * @param {Boolean} arg.sslVerify - 全局默认的是否验证 ssl 证书。默认true.仅App安卓端支持(HBuilderX 2.3.3+) * @param {Boolean} arg.withCredentials - 全局默认的跨域请求时是否携带凭证(cookies)。默认false。仅H5支持(HBuilderX 2.6.15+) * @param {Boolean} arg.firstIpv4 - 全DNS解析时优先使用ipv4。默认false。仅 App-Android 支持 (HBuilderX 2.8.0+) * @param {Function(statusCode):Boolean} arg.validateStatus - 全局默认的自定义验证器。默认statusCode >= 200 && statusCode < 300 */ constructor(arg = {}) { if (!isPlainObject(arg)) { arg = {}; formatAppLog("warn", "at uni_modules/uview-plus/libs/luch-request/core/Request.js:40", "设置全局参数必须接收一个Object"); } this.config = clone({ ...defaults, ...arg }); this.interceptors = { request: new InterceptorManager(), response: new InterceptorManager() }; } /** * @Function * @param {Request~setConfigCallback} f - 设置全局默认配置 */ setConfig(f2) { this.config = f2(this.config); } middleware(config2) { config2 = mergeConfig(this.config, config2); const chain = [dispatchRequest, void 0]; let promise2 = Promise.resolve(config2); this.interceptors.request.forEach((interceptor2) => { chain.unshift(interceptor2.fulfilled, interceptor2.rejected); }); this.interceptors.response.forEach((interceptor2) => { chain.push(interceptor2.fulfilled, interceptor2.rejected); }); while (chain.length) { promise2 = promise2.then(chain.shift(), chain.shift()); } return promise2; } /** * @Function * @param {Object} config - 请求配置项 * @prop {String} options.url - 请求路径 * @prop {Object} options.data - 请求参数 * @prop {Object} [options.responseType = config.responseType] [text|arraybuffer] - 响应的数据类型 * @prop {Object} [options.dataType = config.dataType] - 如果设为 json,会尝试对返回的数据做一次 JSON.parse * @prop {Object} [options.header = config.header] - 请求header * @prop {Object} [options.method = config.method] - 请求方法 * @returns {Promise} */ request(config2 = {}) { return this.middleware(config2); } get(url2, options2 = {}) { return this.middleware({ url: url2, method: "GET", ...options2 }); } post(url2, data, options2 = {}) { return this.middleware({ url: url2, data, method: "POST", ...options2 }); } put(url2, data, options2 = {}) { return this.middleware({ url: url2, data, method: "PUT", ...options2 }); } delete(url2, data, options2 = {}) { return this.middleware({ url: url2, data, method: "DELETE", ...options2 }); } options(url2, data, options2 = {}) { return this.middleware({ url: url2, data, method: "OPTIONS", ...options2 }); } upload(url2, config2 = {}) { config2.url = url2; config2.method = "UPLOAD"; return this.middleware(config2); } download(url2, config2 = {}) { config2.url = url2; config2.method = "DOWNLOAD"; return this.middleware(config2); } } const http = new Request(); function email(value2) { return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value2); } function mobile(value2) { return /^1[23456789]\d{9}$/.test(value2); } function url(value2) { return /^((https|http|ftp|rtsp|mms):\/\/)(([0-9a-zA-Z_!~*'().&=+$%-]+: )?[0-9a-zA-Z_!~*'().&=+$%-]+@)?(([0-9]{1,3}.){3}[0-9]{1,3}|([0-9a-zA-Z_!~*'()-]+.)*([0-9a-zA-Z][0-9a-zA-Z-]{0,61})?[0-9a-zA-Z].[a-zA-Z]{2,6})(:[0-9]{1,4})?((\/?)|(\/[0-9a-zA-Z_!~*'().;?:@&=+$,%#-]+)+\/?)$/.test(value2); } function date(value2) { if (!value2) return false; if (typeof value2 === "number") { if (value2.toString().length !== 10 && value2.toString().length !== 13) { return false; } return !isNaN(new Date(value2).getTime()); } if (typeof value2 === "string") { const numV = Number(value2); if (!isNaN(numV)) { if (numV.toString().length === 10 || numV.toString().length === 13) { return !isNaN(new Date(numV).getTime()); } } if (value2.length < 10 || value2.length > 19) { return false; } const dateRegex = /^\d{4}[-\/]\d{2}[-\/]\d{2}( \d{1,2}:\d{2}(:\d{2})?)?$/; if (!dateRegex.test(value2)) { return false; } const dateValue = new Date(value2); return !isNaN(dateValue.getTime()); } return false; } function dateISO(value2) { return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value2); } function number(value2) { return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value2); } function string$1(value2) { return typeof value2 === "string"; } function digits(value2) { return /^\d+$/.test(value2); } function idCard(value2) { return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test( value2 ); } function carNo(value2) { const xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/; const creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/; if (value2.length === 7) { return creg.test(value2); } if (value2.length === 8) { return xreg.test(value2); } return false; } function amount(value2) { return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value2); } function chinese(value2) { const reg = /^[\u4e00-\u9fa5]+$/gi; return reg.test(value2); } function letter(value2) { return /^[a-zA-Z]*$/.test(value2); } function enOrNum(value2) { const reg = /^[0-9a-zA-Z]*$/g; return reg.test(value2); } function contains(value2, param) { return value2.indexOf(param) >= 0; } function range$2(value2, param) { return value2 >= param[0] && value2 <= param[1]; } function rangeLength(value2, param) { return value2.length >= param[0] && value2.length <= param[1]; } function landline(value2) { const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/; return reg.test(value2); } function empty(value2) { switch (typeof value2) { case "undefined": return true; case "string": if (value2.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0) return true; break; case "boolean": if (!value2) return true; break; case "number": if (value2 === 0 || isNaN(value2)) return true; break; case "object": if (value2 === null || value2.length === 0) return true; for (const i2 in value2) { return false; } return true; } return false; } function jsonString(value2) { if (typeof value2 === "string") { try { const obj = JSON.parse(value2); if (typeof obj === "object" && obj) { return true; } return false; } catch (e2) { return false; } } return false; } function array(value2) { if (typeof Array.isArray === "function") { return Array.isArray(value2); } return Object.prototype.toString.call(value2) === "[object Array]"; } function object(value2) { return Object.prototype.toString.call(value2) === "[object Object]"; } function objectPromise(value2) { return Object.prototype.toString.call(value2) === "[object Promise]"; } function code(value2, len = 6) { return new RegExp(`^\\d{${len}}$`).test(value2); } function func(value2) { return typeof value2 === "function"; } function promise(value2) { return objectPromise(value2) && func(value2.then) && func(value2.catch); } function image(value2) { const newValue = value2.split("?")[0]; const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; return IMAGE_REGEXP.test(newValue); } function video(value2) { const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i; return VIDEO_REGEXP.test(value2); } function regExp(o2) { return o2 && Object.prototype.toString.call(o2) === "[object RegExp]"; } const test = { email, mobile, url, date, dateISO, number, digits, idCard, carNo, amount, chinese, letter, enOrNum, contains, range: range$2, rangeLength, empty, isEmpty: empty, jsonString, landline, object, array, code, func, promise, video, image, regExp, string: string$1 }; function strip(num, precision = 15) { return +parseFloat(Number(num).toPrecision(precision)); } function digitLength(num) { const eSplit = num.toString().split(/[eE]/); const len = (eSplit[0].split(".")[1] || "").length - +(eSplit[1] || 0); return len > 0 ? len : 0; } function float2Fixed(num) { if (num.toString().indexOf("e") === -1) { return Number(num.toString().replace(".", "")); } const dLen = digitLength(num); return dLen > 0 ? strip(Number(num) * Math.pow(10, dLen)) : Number(num); } function checkBoundary(num) { { if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) { formatAppLog("warn", "at uni_modules/uview-plus/libs/function/digit.js:45", `${num} 超出了精度限制,结果可能不正确`); } } } function iteratorOperation(arr, operation) { const [num1, num2, ...others] = arr; let res = operation(num1, num2); others.forEach((num) => { res = operation(res, num); }); return res; } function times$1(...nums) { if (nums.length > 2) { return iteratorOperation(nums, times$1); } const [num1, num2] = nums; const num1Changed = float2Fixed(num1); const num2Changed = float2Fixed(num2); const baseNum = digitLength(num1) + digitLength(num2); const leftValue = num1Changed * num2Changed; checkBoundary(leftValue); return leftValue / Math.pow(10, baseNum); } function divide(...nums) { if (nums.length > 2) { return iteratorOperation(nums, divide); } const [num1, num2] = nums; const num1Changed = float2Fixed(num1); const num2Changed = float2Fixed(num2); checkBoundary(num1Changed); checkBoundary(num2Changed); return times$1(num1Changed / num2Changed, strip(Math.pow(10, digitLength(num2) - digitLength(num1)))); } function round(num, ratio) { const base = Math.pow(10, ratio); let result = divide(Math.round(Math.abs(times$1(num, base))), base); if (num < 0 && result !== 0) { result = times$1(result, -1); } return result; } function range$1(min = 0, max = 0, value2 = 0) { return Math.max(min, Math.min(max, Number(value2))); } function getPx(value2, unit = false) { if (number(value2)) { return unit ? `${value2}px` : Number(value2); } if (/(rpx|upx)$/.test(value2)) { return unit ? `${uni.upx2px(parseInt(value2))}px` : Number(uni.upx2px(parseInt(value2))); } return unit ? `${parseInt(value2)}px` : parseInt(value2); } function sleep(value2 = 30) { return new Promise((resolve) => { setTimeout(() => { resolve(); }, value2); }); } function os() { return uni.getDeviceInfo().platform.toLowerCase(); } function sys() { return uni.getSystemInfoSync(); } function getWindowInfo() { let ret = {}; ret = uni.getWindowInfo(); return ret; } function getDeviceInfo() { let ret = {}; ret = uni.getDeviceInfo(); return ret; } function random(min, max) { if (min >= 0 && max > 0 && max >= min) { const gab = max - min + 1; return Math.floor(Math.random() * gab + min); } return 0; } function guid(len = 32, firstU = true, radix = null) { const chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); const uuid = []; radix = radix || chars.length; if (len) { for (let i2 = 0; i2 < len; i2++) uuid[i2] = chars[0 | Math.random() * radix]; } else { let r2; uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-"; uuid[14] = "4"; for (let i2 = 0; i2 < 36; i2++) { if (!uuid[i2]) { r2 = 0 | Math.random() * 16; uuid[i2] = chars[i2 == 19 ? r2 & 3 | 8 : r2]; } } } if (firstU) { uuid.shift(); return `u${uuid.join("")}`; } return uuid.join(""); } function $parent(name2 = void 0) { let parent = this.$parent; while (parent) { name2 = name2.replace(/up-([a-zA-Z0-9-_]+)/g, "u-$1"); if (parent.$options && parent.$options.name !== name2) { parent = parent.$parent; } else { return parent; } } return false; } function addStyle(customStyle, target = "object") { if (empty(customStyle) || typeof customStyle === "object" && target === "object" || target === "string" && typeof customStyle === "string") { return customStyle; } if (target === "object") { customStyle = trim(customStyle); const styleArray = customStyle.split(";"); const style = {}; for (let i2 = 0; i2 < styleArray.length; i2++) { if (styleArray[i2]) { const item = styleArray[i2].split(":"); style[trim(item[0])] = trim(item[1]); } } return style; } let string2 = ""; if (typeof customStyle === "object") { customStyle.forEach((val, i2) => { const key = i2.replace(/([A-Z])/g, "-$1").toLowerCase(); string2 += `${key}:${val};`; }); } return trim(string2); } function addUnit(value2 = "auto", unit = "") { if (!unit) { unit = config$1.unit || "px"; } if (unit == "rpx" && number(String(value2))) { value2 = value2 * 2; } value2 = String(value2); return number(value2) ? `${value2}${unit}` : value2; } function deepClone(obj) { if ([null, void 0, NaN, false].includes(obj)) return obj; if (typeof obj !== "object" && typeof obj !== "function") { return obj; } const o2 = array(obj) ? [] : {}; for (const i2 in obj) { if (obj.hasOwnProperty(i2)) { o2[i2] = typeof obj[i2] === "object" ? deepClone(obj[i2]) : obj[i2]; } } return o2; } function deepMerge$1(targetOrigin = {}, source = {}) { let target = deepClone(targetOrigin); if (typeof target !== "object" || typeof source !== "object") return false; for (const prop in source) { if (!source.hasOwnProperty(prop)) continue; if (prop in target) { if (source[prop] == null) { target[prop] = source[prop]; } else if (typeof target[prop] !== "object") { target[prop] = source[prop]; } else if (typeof source[prop] !== "object") { target[prop] = source[prop]; } else if (target[prop].concat && source[prop].concat) { target[prop] = target[prop].concat(source[prop]); } else { target[prop] = deepMerge$1(target[prop], source[prop]); } } else { target[prop] = source[prop]; } } return target; } function shallowMerge(target, source = {}) { if (typeof target !== "object" || typeof source !== "object") return false; for (const prop in source) { if (!source.hasOwnProperty(prop)) continue; if (prop in target) { if (source[prop] == null) { target[prop] = source[prop]; } else if (typeof target[prop] !== "object") { target[prop] = source[prop]; } else if (typeof source[prop] !== "object") { target[prop] = source[prop]; } else if (target[prop].concat && source[prop].concat) { target[prop] = target[prop].concat(source[prop]); } else { target[prop] = shallowMerge(target[prop], source[prop]); } } else { target[prop] = source[prop]; } } return target; } function error(err) { { formatAppLog("error", "at uni_modules/uview-plus/libs/function/index.js:304", `uView提示:${err}`); } } function randomArray(array3 = []) { return array3.sort(() => Math.random() - 0.5); } if (!String.prototype.padStart) { String.prototype.padStart = function(maxLength, fillString = " ") { if (Object.prototype.toString.call(fillString) !== "[object String]") { throw new TypeError( "fillString must be String" ); } const str = this; if (str.length >= maxLength) return String(str); const fillLength = maxLength - str.length; let times2 = Math.ceil(fillLength / fillString.length); while (times2 >>= 1) { fillString += fillString; if (times2 === 1) { fillString += fillString; } } return fillString.slice(0, fillLength) + str; }; } function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd") { let date3; if (!dateTime) { date3 = /* @__PURE__ */ new Date(); } else if (/^\d{10}$/.test(dateTime.toString().trim())) { date3 = new Date(dateTime * 1e3); } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) { date3 = new Date(Number(dateTime)); } else if (typeof dateTime === "string" && /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(dateTime)) { date3 = new Date(dateTime); } else { date3 = new Date( typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime ); } const timeSource = { "y": date3.getFullYear().toString(), // 年 "m": (date3.getMonth() + 1).toString().padStart(2, "0"), // 月 "d": date3.getDate().toString().padStart(2, "0"), // 日 "h": date3.getHours().toString().padStart(2, "0"), // 时 "M": date3.getMinutes().toString().padStart(2, "0"), // 分 "s": date3.getSeconds().toString().padStart(2, "0") // 秒 // 有其他格式化字符需求可以继续添加,必须转化成字符串 }; for (const key in timeSource) { const [ret] = new RegExp(`${key}+`).exec(formatStr) || []; if (ret) { const beginIndex = key === "y" && ret.length === 2 ? 2 : 0; formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex)); } } return formatStr; } function timeFrom(timestamp = null, format2 = "yyyy-mm-dd") { if (timestamp == null) timestamp = Number(/* @__PURE__ */ new Date()); timestamp = parseInt(timestamp); if (timestamp.toString().length == 10) timestamp *= 1e3; let timer = (/* @__PURE__ */ new Date()).getTime() - timestamp; timer = parseInt(timer / 1e3); let tips = ""; switch (true) { case timer < 300: tips = "刚刚"; break; case (timer >= 300 && timer < 3600): tips = `${parseInt(timer / 60)}分钟前`; break; case (timer >= 3600 && timer < 86400): tips = `${parseInt(timer / 3600)}小时前`; break; case (timer >= 86400 && timer < 2592e3): tips = `${parseInt(timer / 86400)}天前`; break; default: if (format2 === false) { if (timer >= 2592e3 && timer < 365 * 86400) { tips = `${parseInt(timer / (86400 * 30))}个月前`; } else { tips = `${parseInt(timer / (86400 * 365))}年前`; } } else { tips = timeFormat(timestamp, format2); } } return tips; } function trim(str, pos = "both") { str = String(str); if (pos == "both") { return str.replace(/^\s+|\s+$/g, ""); } if (pos == "left") { return str.replace(/^\s*/, ""); } if (pos == "right") { return str.replace(/(\s*$)/g, ""); } if (pos == "all") { return str.replace(/\s+/g, ""); } return str; } function queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") { const prefix = isPrefix ? "?" : ""; const _result = []; if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) == -1) arrayFormat = "brackets"; for (const key in data) { const value2 = data[key]; if (["", void 0, null].indexOf(value2) >= 0) { continue; } if (value2.constructor === Array) { switch (arrayFormat) { case "indices": for (let i2 = 0; i2 < value2.length; i2++) { _result.push(`${key}[${i2}]=${value2[i2]}`); } break; case "brackets": value2.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); break; case "repeat": value2.forEach((_value) => { _result.push(`${key}=${_value}`); }); break; case "comma": let commaStr = ""; value2.forEach((_value) => { commaStr += (commaStr ? "," : "") + _value; }); _result.push(`${key}=${commaStr}`); break; default: value2.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); } } else { _result.push(`${key}=${value2}`); } } return _result.length ? prefix + _result.join("&") : ""; } function toast(title, duration = 2e3) { uni.showToast({ title: String(title), icon: "none", duration }); } function type2icon(type2 = "success", fill = false) { if (["primary", "info", "error", "warning", "success"].indexOf(type2) == -1) type2 = "success"; let iconName = ""; switch (type2) { case "primary": iconName = "info-circle"; break; case "info": iconName = "info-circle"; break; case "error": iconName = "close-circle"; break; case "warning": iconName = "error-circle"; break; case "success": iconName = "checkmark-circle"; break; default: iconName = "checkmark-circle"; } if (fill) iconName += "-fill"; return iconName; } function priceFormat(number3, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") { number3 = `${number3}`.replace(/[^0-9+-Ee.]/g, ""); const n2 = !isFinite(+number3) ? 0 : +number3; const prec = !isFinite(+decimals) ? 0 : Math.abs(decimals); const sep = typeof thousandsSeparator === "undefined" ? "," : thousandsSeparator; const dec = typeof decimalPoint === "undefined" ? "." : decimalPoint; let s2 = ""; s2 = (prec ? round(n2, prec) + "" : `${Math.round(n2)}`).split("."); const re2 = /(-?\d+)(\d{3})/; while (re2.test(s2[0])) { s2[0] = s2[0].replace(re2, `$1${sep}$2`); } if ((s2[1] || "").length < prec) { s2[1] = s2[1] || ""; s2[1] += new Array(prec - s2[1].length + 1).join("0"); } return s2.join(dec); } function getDuration(value2, unit = true) { const valueNum = parseInt(value2); if (unit) { if (/s$/.test(value2)) return value2; return value2 > 30 ? `${value2}ms` : `${value2}s`; } if (/ms$/.test(value2)) return valueNum; if (/s$/.test(value2)) return valueNum > 30 ? valueNum : valueNum * 1e3; return valueNum; } function padZero$1(value2) { return `00${value2}`.slice(-2); } function formValidate(instance, event) { const formItem = $parent.call(instance, "u-form-item"); const form = $parent.call(instance, "u-form"); if (formItem && form) { form.validateField(formItem.prop, () => { }, event); } } function getProperty(obj, key) { if (typeof obj !== "object" || null == obj) { return ""; } if (typeof key !== "string" || key === "") { return ""; } if (key.indexOf(".") !== -1) { const keys = key.split("."); let firstObj = obj[keys[0]] || {}; for (let i2 = 1; i2 < keys.length; i2++) { if (firstObj) { firstObj = firstObj[keys[i2]]; } } return firstObj; } return obj[key]; } function setProperty(obj, key, value2) { if (typeof obj !== "object" || null == obj) { return; } const inFn = function(_obj, keys, v2) { if (keys.length === 1) { _obj[keys[0]] = v2; return; } while (keys.length > 1) { const k2 = keys[0]; if (!_obj[k2] || typeof _obj[k2] !== "object") { _obj[k2] = {}; } keys.shift(); inFn(_obj[k2], keys, v2); } }; if (typeof key !== "string" || key === "") ; else if (key.indexOf(".") !== -1) { const keys = key.split("."); inFn(obj, keys, value2); } else { obj[key] = value2; } } function page() { const pages2 = getCurrentPages(); return `/${pages2[pages2.length - 1].route || ""}`; } function pages() { const pages2 = getCurrentPages(); return pages2; } function getValueByPath(obj, path) { const pathArr = path.split("."); return pathArr.reduce((acc, curr) => { return acc && acc[curr] !== void 0 ? acc[curr] : void 0; }, obj); } function genLightColor(textColor, lightness = 95) { const rgb = parseColorWithoutDOM(textColor); const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b); const bgHsl = { h: hsl.h, s: hsl.s, l: Math.min(lightness, 95) }; return hslToHex(bgHsl.h, bgHsl.s, bgHsl.l); } function parseColorWithoutDOM(colorStr) { const str = colorStr.toLowerCase().trim(); if (str.startsWith("#")) { const hex = str.replace("#", ""); const fullHex = hex.length === 3 ? hex.split("").map((c2) => c2 + c2).join("") : hex; return { r: parseInt(fullHex.substring(0, 2), 16), g: parseInt(fullHex.substring(2, 4), 16), b: parseInt(fullHex.substring(4, 6), 16) }; } const rgbMatch = str.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/); if (rgbMatch) { return { r: +rgbMatch[1], g: +rgbMatch[2], b: +rgbMatch[3] }; } throw new Error("Invalid color format"); } function rgbToHsl(r2, g2, b2) { r2 /= 255, g2 /= 255, b2 /= 255; const max = Math.max(r2, g2, b2), min = Math.min(r2, g2, b2); let h2, s2, l2 = (max + min) / 2; if (max === min) { h2 = s2 = 0; } else { const d2 = max - min; s2 = l2 > 0.5 ? d2 / (2 - max - min) : d2 / (max + min); switch (max) { case r2: h2 = (g2 - b2) / d2 + (g2 < b2 ? 6 : 0); break; case g2: h2 = (b2 - r2) / d2 + 2; break; case b2: h2 = (r2 - g2) / d2 + 4; break; } h2 = (h2 * 60).toFixed(1); } return { h: +h2, s: +(s2 * 100).toFixed(1), l: +(l2 * 100).toFixed(1) }; } function hslToHex(h2, s2, l2) { l2 /= 100; const a2 = s2 * Math.min(l2, 1 - l2) / 100; const f2 = (n2) => { const k2 = (n2 + h2 / 30) % 12; const color2 = l2 - a2 * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1); return Math.round(255 * color2).toString(16).padStart(2, "0"); }; return `#${f2(0)}${f2(8)}${f2(4)}`; } const index = { range: range$1, getPx, sleep, os, sys, getWindowInfo, random, guid, $parent, addStyle, addUnit, deepClone, deepMerge: deepMerge$1, shallowMerge, error, randomArray, timeFormat, timeFrom, trim, queryParams, toast, type2icon, priceFormat, getDuration, padZero: padZero$1, formValidate, getProperty, setProperty, page, pages, getValueByPath, genLightColor }; const ActionSheet = { // action-sheet组件 actionSheet: { show: false, title: "", description: "", actions: [], index: "", cancelText: "", closeOnClickAction: true, safeAreaInsetBottom: true, openType: "", closeOnClickOverlay: true, round: 0, wrapMaxHeight: "600px" } }; const Album = { // album 组件 album: { urls: [], keyName: "", singleSize: 180, multipleSize: 70, space: 6, singleMode: "scaleToFill", multipleMode: "aspectFill", maxCount: 9, previewFullImage: true, rowCount: 3, showMore: true, autoWrap: false, unit: "px", stop: true } }; const Alert = { // alert警告组件 alert: { title: "", type: "warning", description: "", closable: false, showIcon: false, effect: "light", center: false, fontSize: 14, transitionMode: "fade", duration: 0, icon: "", value: true } }; const Avatar = { // avatar 组件 avatar: { src: "", shape: "circle", size: 40, mode: "scaleToFill", text: "", bgColor: "#c0c4cc", color: "#ffffff", fontSize: 18, icon: "", mpAvatar: false, randomBgColor: false, defaultUrl: "", colorIndex: "", name: "" } }; const AvatarGroup = { // avatarGroup 组件 avatarGroup: { urls: [], maxCount: 5, shape: "circle", mode: "scaleToFill", showMore: true, size: 40, keyName: "", gap: 0.5, extraValue: 0 } }; const Backtop = { // backtop组件 backtop: { mode: "circle", icon: "arrow-upward", text: "", duration: 100, scrollTop: 0, top: 400, bottom: 100, right: 20, zIndex: 9, iconStyle: { color: "#909399", fontSize: "19px" } } }; const Badge = { // 徽标数组件 badge: { isDot: false, value: "", show: true, max: 999, type: "error", showZero: false, bgColor: null, color: null, shape: "circle", numberType: "overflow", offset: [], inverted: false, absolute: false } }; const Button = { // button组件 button: { hairline: false, type: "info", size: "normal", shape: "square", plain: false, disabled: false, loading: false, loadingText: "", loadingMode: "spinner", loadingSize: 15, openType: "", formType: "", appParameter: "", hoverStopPropagation: true, lang: "en", sessionFrom: "", sendMessageTitle: "", sendMessagePath: "", sendMessageImg: "", showMessageCard: false, dataName: "", throttleTime: 0, hoverStartTime: 0, hoverStayTime: 200, text: "", icon: "", iconColor: "", color: "", stop: true } }; const zhHans = { "up.common.cancel": "取消", "up.common.confirm": "确定", "up.common.start": "开始", "up.common.end": "结束", "up.common.stop": "停止", "up.common.copy": "复制", "up.common.none": "暂无", "up.common.tip": "提示", "up.common.success": "成功", "up.common.fail": "失败", "up.common.close": "关闭", "up.common.preview": "预览", "up.common.re-select": "重选", "up.common.rotate": "旋转", "up.common.pleaseChoose": "请选择", "up.common.loading": "加载中", "up.common.loading2": "正在加载", "up.common.inOperation": "操作中", "up.common.settings": "设置", "up.common.retry": "重试", "up.common.search": "搜索", "up.common.more": "更多", "up.common.video": "视频", "up.common.file": "文件", "up.week.one": "一", "up.week.two": "二", "up.week.three": "三", "up.week.four": "四", "up.week.five": "五", "up.week.six": "六", "up.week.seven": "日", "up.barcode.error": "生成条码失败", "up.calendar.chooseDates": "日期选择", "up.calendar.disabled": "该日期已禁用", "up.calendar.daysExceed": "选择天数不能超过{days}天", "up.cityLocate.locateCity": "定位城市", "up.cityLocate.fail": "定位失败,请点击重试。", "up.cityLocate.locating": "定位中", "up.code.send": "获取验证码", "up.code.resendAfter": "X秒重新获取", "up.code.resend": "重新获取", "up.cropper.emptyWidhtOrHeight": "裁剪框的宽或高没有设置", "up.empty.car": "购物车为空", "up.empty.page": "页面不存在", "up.empty.search": "没有搜索结果", "up.empty.address": "没有收货地址", "up.empty.wifi": "没有WiFi", "up.empty.order": "订单为空", "up.empty.coupon": "没有优惠券", "up.empty.favor": "暂无收藏", "up.empty.permission": "无权限", "up.empty.history": "无历史记录", "up.empty.news": "无新闻列表", "up.empty.message": "消息列表为空", "up.empty.list": "列表为空", "up.empty.data": "数据为空", "up.empty.comment": "暂无评论", "up.link.copyed": "链接已复制,请在浏览器打开", "up.loadmoe.loadmore": "加载更多", "up.loadmoe.nomore": "没有更多了", "up.noNetwork.text": "哎呀,网络信号丢失", "up.noNetwork.pleaseCheck": "请检查网络,或前往", "up.noNetwork.connect": "网络已连接", "up.noNetwork.disconnect": "无网络连接", "up.pagination.previous": "上一页", "up.pagination.next": "下一页", "up.pullRefresh.pull": "下拉刷新", "up.pullRefresh.release": "释放刷新", "up.pullRefresh.refreshing": "正在刷新", "up.readMore.expand": "展开阅读全文", "up.readMore.fold": "收起", "up.search.placeholder": "请输入关键字", "up.signature.penSize": "笔画大小", "up.signature.penColor": "笔画颜色", "up.upload.sizeExceed": "超过大小限制", "up.upload.uploading": "上传中", "up.upload.previewImageFail": "预览图片失败", "up.upload.previewVideoFail": "预览视频失败" }; const zhHant = { "up.common.cancel": "取消", "up.common.confirm": "确定", "up.common.start": "開始", "up.common.end": "結束", "up.common.stop": "停止", "up.common.copy": "複製", "up.common.none": "暫無", "up.common.tip": "提示", "up.common.success": "成功", "up.common.fail": "失敗", "up.common.close": "關閉", "up.common.preview": "預覽", "up.common.re-select": "重選", "up.common.rotate": "旋轉", "up.common.pleaseChoose": "請選擇", "up.common.loading": "加載中", "up.common.loading2": "正在加載", "up.common.inOperation": "操作中", "up.common.settings": "設置", "up.common.retry": "重試", "up.common.search": "搜索", "up.common.more": "更多", "up.common.video": "視頻", "up.common.file": "文件", "up.week.one": "一", "up.week.two": "二", "up.week.three": "三", "up.week.four": "四", "up.week.five": "五", "up.week.six": "六", "up.week.seven": "日", "up.barcode.error": "生成條碼失敗", "up.calendar.chooseDates": "日期選擇", "up.calendar.disabled": "該日期已禁用", "up.calendar.daysExceed": "選擇天數不能超過{days}天", "up.cityLocate.locateCity": "定位城市", "up.cityLocate.fail": "定位失敗,請點擊重試。", "up.cityLocate.locating": "定位中", "up.code.send": "獲取驗證碼", "up.code.resendAfter": "X秒重新獲取", "up.code.resend": "重新獲取", "up.cropper.emptyWidhtOrHeight": "裁剪框的寬或高沒有設置", "up.empty.car": "購物車為空", "up.empty.page": "頁面不存在", "up.empty.search": "沒有搜索結果", "up.empty.address": "沒有收貨地址", "up.empty.wifi": "沒有WiFi", "up.empty.order": "訂單為空", "up.empty.coupon": "沒有優惠券", "up.empty.favor": "暫無收藏", "up.empty.permission": "無權限", "up.empty.history": "無歷史記錄", "up.empty.news": "無新聞列表", "up.empty.message": "消息列表為空", "up.empty.list": "列表為空", "up.empty.data": "數據為空", "up.empty.comment": "暫無評論", "up.link.copyed": "鏈接已複製,請在瀏覽器打開", "up.loadmoe.loadmore": "加載更多", "up.loadmoe.nomore": "沒有更多了", "up.noNetwork.text": "哎呀,網絡信號丟失", "up.noNetwork.pleaseCheck": "請檢查網絡,或前往", "up.noNetwork.connect": "網絡已連接", "up.noNetwork.disconnect": "無網絡連接", "up.pagination.previous": "上一頁", "up.pagination.next": "下一頁", "up.pullRefresh.pull": "下拉刷新", "up.pullRefresh.release": "釋放刷新", "up.pullRefresh.refreshing": "正在刷新", "up.readMore.expand": "展開閱讀全文", "up.readMore.fold": "收起", "up.search.placeholder": "請輸入關鍵字", "up.signature.penSize": "筆畫大小", "up.signature.penColor": "筆畫顏色", "up.upload.sizeExceed": "超過大小限制", "up.upload.uploading": "上傳中", "up.upload.previewImageFail": "預覽圖片失敗", "up.upload.previewVideoFail": "預覽視頻失敗" }; const en = { "up.common.cancel": "Cancel", "up.common.confirm": "Confirm", "up.common.start": "Start", "up.common.end": "End", "up.common.stop": "Stop", "up.common.copy": "Copy", "up.common.none": "None", "up.common.tip": "Tip", "up.common.success": "Success", "up.common.fail": "Fail", "up.common.close": "Close", "up.common.preview": "Preview", "up.common.re-select": "Re-select", "up.common.rotate": "Rotate", "up.common.pleaseChoose": "Please choose", "up.common.loading": "Loading", "up.common.loading2": "Loading", "up.common.inOperation": "In operation", "up.common.settings": "Settings", "up.common.retry": "Retry", "up.common.search": "Search", "up.common.more": "More", "up.common.video": "Video", "up.common.file": "File", "up.week.one": "Mon", "up.week.two": "Tue", "up.week.three": "Wed", "up.week.four": "Thu", "up.week.five": "Fri", "up.week.six": "Sat", "up.week.seven": "Sun", "up.barcode.error": "Failed to generate barcode", "up.calendar.chooseDates": "Date selection", "up.calendar.disabled": "This date is disabled", "up.calendar.daysExceed": "The number of selected days cannot exceed {days} days", "up.cityLocate.locateCity": "Locate city", "up.cityLocate.fail": "Location failed, please click to retry.", "up.cityLocate.locating": "Locating", "up.code.send": "Get verification code", "up.code.resendAfter": "Resend after X seconds", "up.code.resend": "Resend", "up.cropper.emptyWidhtOrHeight": "The width or height of the cropping box is not set", "up.empty.car": "Shopping cart is empty", "up.empty.page": "Page not found", "up.empty.search": "No search results", "up.empty.address": "No shipping address", "up.empty.wifi": "No WiFi", "up.empty.order": "Order is empty", "up.empty.coupon": "No coupons", "up.empty.favor": "No favorites", "up.empty.permission": "No permission", "up.empty.history": "No history", "up.empty.news": "No news list", "up.empty.message": "Message list is empty", "up.empty.list": "List is empty", "up.empty.data": "Data is empty", "up.empty.comment": "No comments", "up.link.copyed": "Link copied, please open in browser", "up.loadmoe.loadmore": "Load more", "up.loadmoe.nomore": "No more", "up.noNetwork.text": "Oops, network signal lost", "up.noNetwork.pleaseCheck": "Please check the network, or go to", "up.noNetwork.connect": "Network connected", "up.noNetwork.disconnect": "No network connection", "up.pagination.previous": "Previous", "up.pagination.next": "Next", "up.pullRefresh.pull": "Pull to refresh", "up.pullRefresh.release": "Release to refresh", "up.pullRefresh.refreshing": "Refreshing", "up.readMore.expand": "Expand to read more", "up.readMore.fold": "Collapse", "up.search.placeholder": "Please enter keywords", "up.signature.penSize": "Stroke size", "up.signature.penColor": "Stroke color", "up.upload.sizeExceed": "Size limit exceeded", "up.upload.uploading": "Uploading", "up.upload.previewImageFail": "Failed to preview image", "up.upload.previewVideoFail": "Failed to preview video" }; const es = { "up.common.cancel": "Cancelar", "up.common.confirm": "Confirmar", "up.common.start": "Iniciar", "up.common.end": "Finalizar", "up.common.stop": "Detener", "up.common.copy": "Copiar", "up.common.none": "Ninguno", "up.common.tip": "Consejo", "up.common.success": "Éxito", "up.common.fail": "Fallido", "up.common.close": "Cerrar", "up.common.preview": "Vista previa", "up.common.re-select": "Re seleccionar", "up.common.rotate": "Rotar", "up.common.pleaseChoose": "Por favor seleccione", "up.common.loading": "Cargando", "up.common.loading2": "Cargando", "up.common.inOperation": "En operación", "up.common.settings": "Configuración", "up.common.retry": "Reintentar", "up.common.search": "Buscar", "up.common.more": "Más", "up.common.video": "Vídeo", "up.common.file": "Archivo", "up.week.one": "Lun", "up.week.two": "Mar", "up.week.three": "Mié", "up.week.four": "Jue", "up.week.five": "Vie", "up.week.six": "Sáb", "up.week.seven": "Dom", "up.barcode.error": "Error al generar código de barras", "up.calendar.chooseDates": "Selección de fecha", "up.calendar.disabled": "Esta fecha está deshabilitada", "up.calendar.daysExceed": "Los días seleccionados no pueden exceder {days} días", "up.cityLocate.locateCity": "Localizar ciudad", "up.cityLocate.fail": "Error de localización, haga clic para reintentar.", "up.cityLocate.locating": "Localizando", "up.code.send": "Obtener código de verificación", "up.code.resendAfter": "Reenviar en X segundos", "up.code.resend": "Reenviar", "up.cropper.emptyWidhtOrHeight": "El ancho o alto del recorte no está configurado", "up.empty.car": "Carrito de compras vacío", "up.empty.page": "Página no encontrada", "up.empty.search": "Sin resultados de búsqueda", "up.empty.address": "Sin dirección de envío", "up.empty.wifi": "Sin WiFi", "up.empty.order": "Pedido vacío", "up.empty.coupon": "Sin cupones", "up.empty.favor": "Sin favoritos", "up.empty.permission": "Sin permisos", "up.empty.history": "Sin historial", "up.empty.news": "Sin noticias", "up.empty.message": "Lista de mensajes vacía", "up.empty.list": "Lista vacía", "up.empty.data": "Datos vacíos", "up.empty.comment": "Sin comentarios", "up.link.copyed": "Enlace copiado, por favor abra en el navegador", "up.loadmoe.loadmore": "Cargar más", "up.loadmoe.nomore": "No hay más", "up.noNetwork.text": "¡Ups! Se perdió la señal de red", "up.noNetwork.pleaseCheck": "Por favor verifique la red, o vaya a", "up.noNetwork.connect": "Red conectada", "up.noNetwork.disconnect": "Sin conexión a internet", "up.pagination.previous": "Página anterior", "up.pagination.next": "Página siguiente", "up.pullRefresh.pull": "Deslizar hacia abajo para actualizar", "up.pullRefresh.release": "Soltar para actualizar", "up.pullRefresh.refreshing": "Actualizando", "up.readMore.expand": "Expandir para leer más", "up.readMore.fold": "Contraer", "up.search.placeholder": "Ingrese palabra clave", "up.signature.penSize": "Tamaño del trazo", "up.signature.penColor": "Color del trazo", "up.upload.sizeExceed": "Excede el límite de tamaño", "up.upload.uploading": "Subiendo", "up.upload.previewImageFail": "Error al previsualizar imagen", "up.upload.previewVideoFail": "Error al previsualizar vídeo" }; const fr = { "up.common.cancel": "Annuler", "up.common.confirm": "Confirmer", "up.common.start": "Démarrer", "up.common.end": "Terminer", "up.common.stop": "Arrêter", "up.common.copy": "Copier", "up.common.none": "Aucun", "up.common.tip": "Conseil", "up.common.success": "Succès", "up.common.fail": "Échec", "up.common.close": "Fermer", "up.common.preview": "Aperçu", "up.common.re-select": "Resélectionner", "up.common.rotate": "Rotation", "up.common.pleaseChoose": "Veuillez choisir", "up.common.loading": "Chargement", "up.common.loading2": "Chargement en cours", "up.common.inOperation": "En cours d'opération", "up.common.settings": "Paramètres", "up.common.retry": "Réessayer", "up.common.search": "Rechercher", "up.common.more": "Plus", "up.common.video": "Vidéo", "up.common.file": "Fichier", "up.week.one": "Lun", "up.week.two": "Mar", "up.week.three": "Mer", "up.week.four": "Jeu", "up.week.five": "Ven", "up.week.six": "Sam", "up.week.seven": "Dim", "up.barcode.error": "Échec de génération du code-barres", "up.calendar.chooseDates": "Sélection de dates", "up.calendar.disabled": "Cette date est désactivée", "up.calendar.daysExceed": "Le nombre de jours sélectionnés ne peut pas dépasser {days} jours", "up.cityLocate.locateCity": "Localiser la ville", "up.cityLocate.fail": "Échec de localisation, veuillez cliquer pour réessayer.", "up.cityLocate.locating": "Localisation en cours", "up.code.send": "Obtenir le code de vérification", "up.code.resendAfter": "Renvoyer dans X secondes", "up.code.resend": "Renvoyer", "up.cropper.emptyWidhtOrHeight": "La largeur ou la hauteur de recadrage n'est pas définie", "up.empty.car": "Panier vide", "up.empty.page": "Page introuvable", "up.empty.search": "Aucun résultat de recherche", "up.empty.address": "Aucune adresse de livraison", "up.empty.wifi": "Aucun Wi-Fi", "up.empty.order": "Commande vide", "up.empty.coupon": "Aucun coupon", "up.empty.favor": "Aucun favori", "up.empty.permission": "Aucune autorisation", "up.empty.history": "Aucun historique", "up.empty.news": "Aucune actualité", "up.empty.message": "Liste de messages vide", "up.empty.list": "Liste vide", "up.empty.data": "Données vides", "up.empty.comment": "Aucun commentaire", "up.link.copyed": "Lien copié, veuillez ouvrir dans le navigateur", "up.loadmoe.loadmore": "Charger plus", "up.loadmoe.nomore": "Plus de contenu", "up.noNetwork.text": "Oups, le signal réseau est perdu", "up.noNetwork.pleaseCheck": "Veuillez vérifier le réseau, ou aller à", "up.noNetwork.connect": "Réseau connecté", "up.noNetwork.disconnect": "Aucune connexion réseau", "up.pagination.previous": "Page précédente", "up.pagination.next": "Page suivante", "up.pullRefresh.pull": "Tirer pour actualiser", "up.pullRefresh.release": "Relâcher pour actualiser", "up.pullRefresh.refreshing": "Actualisation en cours", "up.readMore.expand": "Développer pour lire la suite", "up.readMore.fold": "Réduire", "up.search.placeholder": "Veuillez saisir un mot-clé", "up.signature.penSize": "Taille du trait", "up.signature.penColor": "Couleur du trait", "up.upload.sizeExceed": "Dépassement de la limite de taille", "up.upload.uploading": "Téléchargement en cours", "up.upload.previewImageFail": "Échec de l'aperçu de l'image", "up.upload.previewVideoFail": "Échec de l'aperçu de la vidéo" }; const de = { "up.common.cancel": "Abbrechen", "up.common.confirm": "Bestätigen", "up.common.start": "Start", "up.common.end": "Ende", "up.common.stop": "Stopp", "up.common.copy": "Kopieren", "up.common.none": "Keine", "up.common.tip": "Hinweis", "up.common.success": "Erfolg", "up.common.fail": "Fehlgeschlagen", "up.common.close": "Schließen", "up.common.preview": "Vorschau", "up.common.re-select": "Erneut auswählen", "up.common.rotate": "Drehen", "up.common.pleaseChoose": "Bitte wählen", "up.common.loading": "Laden", "up.common.loading2": "Wird geladen", "up.common.inOperation": "In Bearbeitung", "up.common.settings": "Einstellungen", "up.common.retry": "Wiederholen", "up.common.search": "Suchen", "up.common.more": "Mehr", "up.common.video": "Video", "up.common.file": "Datei", "up.week.one": "Mo", "up.week.two": "Di", "up.week.three": "Mi", "up.week.four": "Do", "up.week.five": "Fr", "up.week.six": "Sa", "up.week.seven": "So", "up.barcode.error": "Barcode-Generierung fehlgeschlagen", "up.calendar.chooseDates": "Datumsauswahl", "up.calendar.disabled": "Dieses Datum ist deaktiviert", "up.calendar.daysExceed": "Die Anzahl der ausgewählten Tage darf {days} Tage nicht überschreiten", "up.cityLocate.locateCity": "Stadt lokalisieren", "up.cityLocate.fail": "Lokalisierung fehlgeschlagen, bitte klicken Sie zum Wiederholen.", "up.cityLocate.locating": "Lokalisierung läuft", "up.code.send": "Bestätigungscode erhalten", "up.code.resendAfter": "Erneut senden in X Sekunden", "up.code.resend": "Erneut senden", "up.cropper.emptyWidhtOrHeight": "Breite oder Höhe des Zuschneidebereichs nicht festgelegt", "up.empty.car": "Warenkorb ist leer", "up.empty.page": "Seite existiert nicht", "up.empty.search": "Keine Suchergebnisse", "up.empty.address": "Keine Lieferadresse", "up.empty.wifi": "Kein WLAN", "up.empty.order": "Bestellungen sind leer", "up.empty.coupon": "Keine Gutscheine", "up.empty.favor": "Keine Favoriten", "up.empty.permission": "Keine Berechtigung", "up.empty.history": "Kein Verlauf", "up.empty.news": "Keine Nachrichtenliste", "up.empty.message": "Nachrichtenliste ist leer", "up.empty.list": "Liste ist leer", "up.empty.data": "Daten sind leer", "up.empty.comment": "Keine Kommentare", "up.link.copyed": "Link kopiert, bitte im Browser öffnen", "up.loadmoe.loadmore": "Mehr laden", "up.loadmoe.nomore": "Keine weiteren Daten", "up.noNetwork.text": "Ups, Netzwerksignal verloren", "up.noNetwork.pleaseCheck": "Bitte überprüfen Sie das Netzwerk oder gehen Sie zu", "up.noNetwork.connect": "Netzwerk verbunden", "up.noNetwork.disconnect": "Keine Netzwerkverbindung", "up.pagination.previous": "Vorherige Seite", "up.pagination.next": "Nächste Seite", "up.pullRefresh.pull": "Zum Aktualisieren nach unten ziehen", "up.pullRefresh.release": "Loslassen zum Aktualisieren", "up.pullRefresh.refreshing": "Aktualisierung läuft", "up.readMore.expand": "Erweitern zum vollständigen Lesen", "up.readMore.fold": "Einklappen", "up.search.placeholder": "Bitte Schlüsselwort eingeben", "up.signature.penSize": "Strichstärke", "up.signature.penColor": "Strichfarbe", "up.upload.sizeExceed": "Größenbegrenzung überschritten", "up.upload.uploading": "Upload läuft", "up.upload.previewImageFail": "Bildvorschau fehlgeschlagen", "up.upload.previewVideoFail": "Videovorschau fehlgeschlagen" }; const ko = { "up.common.cancel": "취소", "up.common.confirm": "확인", "up.common.start": "시작", "up.common.end": "종료", "up.common.stop": "정지", "up.common.copy": "복사", "up.common.none": "없음", "up.common.tip": "팁", "up.common.success": "성공", "up.common.fail": "실패", "up.common.close": "닫기", "up.common.preview": "미리보기", "up.common.re-select": "재선택", "up.common.rotate": "회전", "up.common.pleaseChoose": "선택해주세요", "up.common.loading": "로딩중", "up.common.loading2": "로딩중", "up.common.inOperation": "작업중", "up.common.settings": "설정", "up.common.retry": "재시도", "up.common.search": "검색", "up.common.more": "더보기", "up.common.video": "비디오", "up.common.file": "파일", "up.week.one": "월", "up.week.two": "화", "up.week.three": "수", "up.week.four": "목", "up.week.five": "금", "up.week.six": "토", "up.week.seven": "일", "up.barcode.error": "바코드 생성 실패", "up.calendar.chooseDates": "날짜 선택", "up.calendar.disabled": "해당 날짜는 사용할 수 없습니다", "up.calendar.daysExceed": "선택한 날짜 수가 {days}일을 초과할 수 없습니다", "up.cityLocate.locateCity": "도시 위치 찾기", "up.cityLocate.fail": "위치 찾기 실패, 다시 시도하려면 클릭하세요.", "up.cityLocate.locating": "위치 찾는 중", "up.code.send": "인증코드 받기", "up.code.resendAfter": "X초 후 재전송", "up.code.resend": "재전송", "up.cropper.emptyWidhtOrHeight": "자르기 영역의 너비 또는 높이가 설정되지 않았습니다", "up.empty.car": "장바구니가 비어 있습니다", "up.empty.page": "페이지가 존재하지 않습니다", "up.empty.search": "검색 결과가 없습니다", "up.empty.address": "배송 주소가 없습니다", "up.empty.wifi": "Wi-Fi가 없습니다", "up.empty.order": "주문이 없습니다", "up.empty.coupon": "쿠폰이 없습니다", "up.empty.favor": "즐겨찾기가 없습니다", "up.empty.permission": "권한이 없습니다", "up.empty.history": "기록이 없습니다", "up.empty.news": "뉴스가 없습니다", "up.empty.message": "메시지가 없습니다", "up.empty.list": "목록이 비어 있습니다", "up.empty.data": "데이터가 없습니다", "up.empty.comment": "댓글이 없습니다", "up.link.copyed": "링크가 복사되었습니다. 브라우저에서 열어주세요", "up.loadmoe.loadmore": "더 불러오기", "up.loadmoe.nomore": "더 이상 데이터가 없습니다", "up.noNetwork.text": "네트워크 신호가 없습니다", "up.noNetwork.pleaseCheck": "네트워크를 확인하거나 이동하세요", "up.noNetwork.connect": "네트워크 연결됨", "up.noNetwork.disconnect": "네트워크 연결 끊김", "up.pagination.previous": "이전 페이지", "up.pagination.next": "다음 페이지", "up.pullRefresh.pull": "당겨서 새로고침", "up.pullRefresh.release": "놓아서 새로고침", "up.pullRefresh.refreshing": "새로고침 중", "up.readMore.expand": "펼쳐서 전체 보기", "up.readMore.fold": "접기", "up.search.placeholder": "키워드를 입력하세요", "up.signature.penSize": "선 굵기", "up.signature.penColor": "선 색상", "up.upload.sizeExceed": "용량 제한 초과", "up.upload.uploading": "업로드 중", "up.upload.previewImageFail": "이미지 미리보기 실패", "up.upload.previewVideoFail": "비디오 미리보기 실패" }; const ja = { "up.common.cancel": "キャンセル", "up.common.confirm": "確認", "up.common.start": "開始", "up.common.end": "終了", "up.common.stop": "停止", "up.common.copy": "コピー", "up.common.none": "なし", "up.common.tip": "ヒント", "up.common.success": "成功", "up.common.fail": "失敗", "up.common.close": "閉じる", "up.common.preview": "プレビュー", "up.common.re-select": "再選択", "up.common.rotate": "回転", "up.common.pleaseChoose": "選択してください", "up.common.loading": "読み込み中", "up.common.loading2": "読み込み中", "up.common.inOperation": "操作中", "up.common.settings": "設定", "up.common.retry": "再試行", "up.common.search": "検索", "up.common.more": "もっと見る", "up.common.video": "ビデオ", "up.common.file": "ファイル", "up.week.one": "月", "up.week.two": "火", "up.week.three": "水", "up.week.four": "木", "up.week.five": "金", "up.week.six": "土", "up.week.seven": "日", "up.barcode.error": "バーコードの生成に失敗しました", "up.calendar.chooseDates": "日付選択", "up.calendar.disabled": "この日付は無効です", "up.calendar.daysExceed": "選択日数は{days}日を超えることはできません", "up.cityLocate.locateCity": "都市の位置を特定", "up.cityLocate.fail": "位置特定に失敗しました。再試行するにはクリックしてください。", "up.cityLocate.locating": "位置特定中", "up.code.send": "認証コードを取得", "up.code.resendAfter": "X秒後に再送信", "up.code.resend": "再送信", "up.cropper.emptyWidhtOrHeight": "切り抜き枠の幅または高さが設定されていません", "up.empty.car": "ショッピングカートは空です", "up.empty.page": "ページが存在しません", "up.empty.search": "検索結果がありません", "up.empty.address": "配送先住所がありません", "up.empty.wifi": "Wi-Fiがありません", "up.empty.order": "注文がありません", "up.empty.coupon": "クーポンがありません", "up.empty.favor": "お気に入りがありません", "up.empty.permission": "権限がありません", "up.empty.history": "履歴がありません", "up.empty.news": "ニュースがありません", "up.empty.message": "メッセージがありません", "up.empty.list": "リストが空です", "up.empty.data": "データがありません", "up.empty.comment": "コメントがありません", "up.link.copyed": "リンクがコピーされました。ブラウザで開いてください", "up.loadmoe.loadmore": "さらに読み込む", "up.loadmoe.nomore": "これ以上データがありません", "up.noNetwork.text": "ネットワーク信号が失われました", "up.noNetwork.pleaseCheck": "ネットワークを確認するか、移動してください", "up.noNetwork.connect": "ネットワーク接続済み", "up.noNetwork.disconnect": "ネットワーク未接続", "up.pagination.previous": "前へ", "up.pagination.next": "次へ", "up.pullRefresh.pull": "引き下げて更新", "up.pullRefresh.release": "指を離して更新", "up.pullRefresh.refreshing": "更新中", "up.readMore.expand": "全文表示", "up.readMore.fold": "折りたたむ", "up.search.placeholder": "キーワードを入力してください", "up.signature.penSize": "線の太さ", "up.signature.penColor": "線の色", "up.upload.sizeExceed": "サイズ制限を超えています", "up.upload.uploading": "アップロード中", "up.upload.previewImageFail": "画像プレビュー失敗", "up.upload.previewVideoFail": "ビデオプレビュー失敗" }; const ru = { "up.common.cancel": "Отмена", "up.common.confirm": "Подтвердить", "up.common.start": "Начало", "up.common.end": "Конец", "up.common.stop": "Стоп", "up.common.copy": "Копировать", "up.common.none": "Нет", "up.common.tip": "Подсказка", "up.common.success": "Успех", "up.common.fail": "Ошибка", "up.common.close": "Закрыть", "up.common.preview": "Предпросмотр", "up.common.re-select": "Выбрать снова", "up.common.rotate": "Повернуть", "up.common.pleaseChoose": "Пожалуйста, выберите", "up.common.loading": "Загрузка", "up.common.loading2": "Загружается", "up.common.inOperation": "В процессе", "up.common.settings": "Настройки", "up.common.retry": "Повторить", "up.common.search": "Поиск", "up.common.more": "Больше", "up.common.video": "Видео", "up.common.file": "Файл", "up.week.one": "Пн", "up.week.two": "Вт", "up.week.three": "Ср", "up.week.four": "Чт", "up.week.five": "Пт", "up.week.six": "Сб", "up.week.seven": "Вс", "up.barcode.error": "Ошибка генерации штрихкода", "up.calendar.chooseDates": "Выбор даты", "up.calendar.disabled": "Эта дата отключена", "up.calendar.daysExceed": "Количество выбранных дней не может превышать {days} дней", "up.cityLocate.locateCity": "Определение города", "up.cityLocate.fail": "Ошибка определения местоположения, нажмите для повтора.", "up.cityLocate.locating": "Определение местоположения", "up.code.send": "Получить код подтверждения", "up.code.resendAfter": "Повторная отправка через X секунд", "up.code.resend": "Отправить снова", "up.cropper.emptyWidhtOrHeight": "Ширина или высота области обрезки не задана", "up.empty.car": "Корзина пуста", "up.empty.page": "Страница не существует", "up.empty.search": "Нет результатов поиска", "up.empty.address": "Нет адреса доставки", "up.empty.wifi": "Нет Wi-Fi", "up.empty.order": "Заказы отсутствуют", "up.empty.coupon": "Нет купонов", "up.empty.favor": "Нет избранного", "up.empty.permission": "Нет разрешения", "up.empty.history": "Нет истории", "up.empty.news": "Нет новостей", "up.empty.message": "Список сообщений пуст", "up.empty.list": "Список пуст", "up.empty.data": "Нет данных", "up.empty.comment": "Нет комментариев", "up.link.copyed": "Ссылка скопирована, откройте в браузере", "up.loadmoe.loadmore": "Загрузить еще", "up.loadmoe.nomore": "Больше нет данных", "up.noNetwork.text": "Ой, потеряно сетевое соединение", "up.noNetwork.pleaseCheck": "Проверьте сеть или перейдите к", "up.noNetwork.connect": "Сеть подключена", "up.noNetwork.disconnect": "Нет сетевого подключения", "up.pagination.previous": "Предыдущая страница", "up.pagination.next": "Следующая страница", "up.pullRefresh.pull": "Потяните вниз для обновления", "up.pullRefresh.release": "Отпустите для обновления", "up.pullRefresh.refreshing": "Обновление", "up.readMore.expand": "Развернуть для полного чтения", "up.readMore.fold": "Свернуть", "up.search.placeholder": "Введите ключевое слово", "up.signature.penSize": "Размер штриха", "up.signature.penColor": "Цвет штриха", "up.upload.sizeExceed": "Превышен лимит размера", "up.upload.uploading": "Загрузка", "up.upload.previewImageFail": "Ошибка предпросмотра изображения", "up.upload.previewVideoFail": "Ошибка предпросмотра видео" }; let settings = { lang: uni.getLocale(), locales: { en, es, fr, de, ko, ja, ru, "zh-Hant": zhHant, "zh-Hans": zhHans } }; uni.onLocaleChange((locale) => { settings.lang = locale; }); function t$1(value2, params2 = {}) { if (value2) { let result = settings.locales[settings.lang][value2] || value2; Object.keys(params2).forEach((key) => { const reg = new RegExp(`{${key}}`, "g"); result = result.replace(reg, params2[key]); }); return result; } else { return value2; } } const Calendar$1 = { // calendar 组件 calendar: { title: t$1("up.calendar.chooseDates"), showTitle: true, showSubtitle: true, mode: "single", startText: t$1("up.common.start"), endText: t$1("up.common.end"), customList: [], color: "#3c9cff", minDate: 0, maxDate: 0, defaultDate: null, maxCount: Number.MAX_SAFE_INTEGER, // Infinity rowHeight: 56, formatter: null, showLunar: false, showMark: true, confirmText: t$1("up.common.confirm"), confirmDisabledText: t$1("up.common.confirm"), show: false, closeOnClickOverlay: false, readonly: false, showConfirm: true, maxRange: Number.MAX_SAFE_INTEGER, // Infinity rangePrompt: "", showRangePrompt: true, allowSameDay: false, round: 0, monthNum: 3, weekText: [t$1("up.week.one"), t$1("up.week.two"), t$1("up.week.three"), t$1("up.week.four"), t$1("up.week.five"), t$1("up.week.six"), t$1("up.week.seven")], forbidDays: [], forbidDaysToast: t$1("up.calendar.disabled"), monthFormat: "", pageInline: false } }; const CarKeyboard = { // 车牌号键盘 carKeyboard: { random: false } }; const Card = { // card组件的props card: { full: false, title: "", titleColor: "#303133", titleSize: "15px", subTitle: "", subTitleColor: "#909399", subTitleSize: "13px", border: true, index: "", margin: "15px", borderRadius: "8px", headStyle: {}, bodyStyle: {}, footStyle: {}, headBorderBottom: true, footBorderTop: true, thumb: "", thumbWidth: "30px", thumbCircle: false, padding: "15px", paddingHead: "", paddingBody: "", paddingFoot: "", showHead: true, showFoot: true, boxShadow: "none" } }; const Cell = { // cell组件的props cell: { customClass: "", title: "", label: "", value: "", icon: "", disabled: false, border: true, center: false, url: "", linkType: "navigateTo", clickable: false, isLink: false, required: false, arrowDirection: "", iconStyle: {}, rightIconStyle: {}, rightIcon: "arrow-right", titleStyle: {}, size: "", stop: true, name: "" } }; const CellGroup = { // cell-group组件的props cellGroup: { title: "", border: true, customStyle: {} } }; const Checkbox = { // checkbox组件 checkbox: { name: "", shape: "", size: "", checkbox: false, disabled: "", activeColor: "", inactiveColor: "", iconSize: "", iconColor: "", label: "", labelSize: "", labelColor: "", labelDisabled: "" } }; const CheckboxGroup = { // checkbox-group组件 checkboxGroup: { name: "", value: [], shape: "square", disabled: false, activeColor: "#2979ff", inactiveColor: "#c8c9cc", size: 18, placement: "row", labelSize: 14, labelColor: "#303133", labelDisabled: false, iconColor: "#ffffff", iconSize: 12, iconPlacement: "left", borderBottom: false } }; const CircleProgress = { // circleProgress 组件 circleProgress: { percentage: 30 } }; const Code = { // code 组件 code: { seconds: 60, startText: t$1("up.code.send"), changeText: t$1("up.code.resendAfter"), endText: t$1("up.code.resend"), keepRunning: false, uniqueKey: "" } }; const CodeInput = { // codeInput 组件 codeInput: { adjustPosition: true, maxlength: 6, dot: false, mode: "box", hairline: false, space: 10, value: "", focus: false, bold: false, color: "#606266", fontSize: 18, size: 35, disabledKeyboard: false, borderColor: "#c9cacc", disabledDot: true } }; const Col = { // col 组件 col: { span: 12, offset: 0, justify: "start", align: "stretch", textAlign: "left" } }; const Collapse = { // collapse 组件 collapse: { value: null, accordion: false, border: true } }; const CollapseItem = { // collapseItem 组件 collapseItem: { title: "", value: "", label: "", disabled: false, isLink: true, clickable: true, border: true, align: "left", name: "", icon: "", duration: 300, showRight: true, titleStyle: {}, iconStyle: {}, rightIconStyle: {}, cellCustomStyle: {}, cellCustomClass: "" } }; const ColumnNotice = { // columnNotice 组件 columnNotice: { text: "", icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", fontSize: 14, speed: 80, step: false, duration: 1500, disableTouch: true, justifyContent: "flex-start" } }; const CountDown = { // u-count-down 计时器组件 countDown: { time: 0, format: "HH:mm:ss", autoStart: true, millisecond: false } }; const CountTo = { // countTo 组件 countTo: { startVal: 0, endVal: 0, duration: 2e3, autoplay: true, decimals: 0, useEasing: true, decimal: ".", color: "#606266", fontSize: 22, bold: false, separator: "" } }; const DatetimePicker = { // datetimePicker 组件 datetimePicker: { show: false, popupMode: "bottom", showToolbar: true, value: "", title: "", mode: "datetime", maxDate: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1).getTime(), minDate: new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1).getTime(), minHour: 0, maxHour: 23, minMinute: 0, maxMinute: 59, filter: null, formatter: null, loading: false, itemHeight: 44, cancelText: t$1("up.common.cancel"), confirmText: t$1("up.common.confirm"), cancelColor: "#909193", confirmColor: "#3c9cff", visibleItemCount: 5, closeOnClickOverlay: false, defaultIndex: [], inputBorder: "surround", disabled: false, disabledColor: "", placeholder: t$1("up.common.pleaseChoose"), inputProps: {}, pageInline: false } }; const Divider = { // divider组件 divider: { dashed: false, hairline: true, dot: false, textPosition: "center", text: "", textSize: 14, textColor: "#909399", lineColor: "#dcdfe6" } }; const Empty = { // empty组件 empty: { icon: "", text: "", textColor: "#c0c4cc", textSize: 14, iconColor: "#c0c4cc", iconSize: 90, mode: "data", width: 160, height: 160, show: true, marginTop: 0 } }; const Form = { // form 组件 form: { model: {}, rules: {}, errorType: "message", borderBottom: true, labelPosition: "left", labelWidth: 45, labelAlign: "left", labelStyle: {} } }; const GormItem = { // formItem 组件 formItem: { label: "", prop: "", rules: [], borderBottom: "", labelPosition: "", labelWidth: "", rightIcon: "", leftIcon: "", required: false, leftIconStyle: "" } }; const Gap = { // gap组件 gap: { bgColor: "transparent", height: 20, marginTop: 0, marginBottom: 0, customStyle: {} } }; const Grid = { // grid组件 grid: { col: 3, border: false, align: "left" } }; const GridItem = { // grid-item组件 gridItem: { name: null, bgColor: "transparent" } }; const { color: color$2 } = config$1; const Icon = { // icon组件 icon: { name: "", color: color$2["u-content-color"], size: "16px", bold: false, index: "", hoverClass: "", customPrefix: "uicon", label: "", labelPos: "right", labelSize: "15px", labelColor: color$2["u-content-color"], space: "3px", imgMode: "", width: "", height: "", top: 0, stop: false } }; const Image$1 = { // image组件 image: { src: "", mode: "aspectFill", width: "300", height: "225", shape: "square", radius: 0, lazyLoad: true, showMenuByLongpress: true, loadingIcon: "photo", errorIcon: "error-circle", showLoading: true, showError: true, fade: true, webp: false, duration: 500, bgColor: "#f3f4f6" } }; const IndexAnchor = { // indexAnchor 组件 indexAnchor: { text: "", color: "#606266", size: 14, bgColor: "#f1f1f1", height: 32 } }; const IndexList = { // indexList 组件 indexList: { inactiveColor: "#606266", activeColor: "#5677fc", indexList: [], sticky: true, customNavHeight: 0, safeBottomFix: false } }; const Input = { // index 组件 input: { value: "", type: "text", fixed: false, disabled: false, disabledColor: "#f5f7fa", clearable: false, password: false, maxlength: 140, placeholder: null, placeholderClass: "input-placeholder", placeholderStyle: "color: #c0c4cc", showWordLimit: false, confirmType: "done", confirmHold: false, holdKeyboard: false, focus: false, autoBlur: false, disableDefaultPadding: false, cursor: -1, cursorSpacing: 30, selectionStart: -1, selectionEnd: -1, adjustPosition: true, inputAlign: "left", fontSize: "15px", color: "#303133", prefixIcon: "", prefixIconStyle: "", suffixIcon: "", suffixIconStyle: "", border: "surround", readonly: false, shape: "square", formatter: null, cursorColor: "", passwordVisibilityToggle: true } }; const Keyboard = { // 键盘组件 keyboard: { mode: "number", dotDisabled: false, tooltip: true, showTips: true, tips: "", showCancel: true, showConfirm: true, random: false, safeAreaInsetBottom: true, closeOnClickOverlay: true, show: false, overlay: true, zIndex: 10075, cancelText: t$1("up.common.cancel"), confirmText: t$1("up.common.confirm"), autoChange: false } }; const Line = { // line组件 line: { color: "#d6d7d9", length: "100%", direction: "row", hairline: true, margin: 0, dashed: false } }; const LineProgress = { // lineProgress 组件 lineProgress: { activeColor: "#19be6b", inactiveColor: "#ececec", percentage: 0, showText: true, height: 12, fromRight: false } }; const { color: color$1 } = config$1; const Link = { // link超链接组件props参数 link: { color: color$1["u-primary"], fontSize: 15, underLine: false, href: "", mpTips: t$1("up.link.copyed"), lineColor: "", text: "" } }; const List = { // list 组件 list: { showScrollbar: false, lowerThreshold: 50, upperThreshold: 0, scrollTop: 0, offsetAccuracy: 10, enableFlex: false, pagingEnabled: false, scrollable: true, scrollIntoView: "", scrollWithAnimation: false, enableBackToTop: false, height: 0, width: 0, preLoadScreen: 1 } }; const ListItem = { // listItem 组件 listItem: { anchor: "" } }; const { color } = config$1; const LoadingIcon = { // loading-icon加载中图标组件 loadingIcon: { show: true, color: color["u-tips-color"], textColor: color["u-tips-color"], vertical: false, mode: "spinner", size: 24, textSize: 15, text: "", timingFunction: "ease-in-out", duration: 1200, inactiveColor: "" } }; const LoadingPage = { // loading-page组件 loadingPage: { loadingText: t$1("up.common.loading2"), image: "", loadingMode: "circle", loading: false, bgColor: "#ffffff", color: "#C8C8C8", fontSize: 19, iconSize: 28, loadingColor: "#C8C8C8", zIndex: 10 } }; const Loadmore = { // loadmore 组件 loadmore: { status: "loadmore", bgColor: "transparent", icon: true, fontSize: 14, iconSize: 17, color: "#606266", loadingIcon: "spinner", loadmoreText: t$1("up.loadmoe.loadmore"), loadingText: t$1("up.common.loading2") + "...", nomoreText: t$1("up.loadmoe.nomore"), isDot: false, iconColor: "#b7b7b7", marginTop: 10, marginBottom: 10, height: "auto", line: false, lineColor: "#E6E8EB", dashed: false } }; const Modal = { // modal 组件 modal: { show: false, title: "", content: "", confirmText: t$1("up.common.confirm"), cancelText: t$1("up.common.cancel"), showConfirmButton: true, showCancelButton: false, confirmColor: "#2979ff", cancelColor: "#606266", buttonReverse: false, zoom: true, asyncClose: false, closeOnClickOverlay: false, negativeTop: 0, width: "650rpx", confirmButtonShape: "", duration: 400, contentTextAlign: "left", asyncCloseTip: t$1("up.common.inOperatio") + "...", asyncCancelClose: false, contentStyle: {} } }; const Navbar = { // navbar 组件 navbar: { safeAreaInsetTop: true, placeholder: false, fixed: true, border: false, leftIcon: "arrow-left", leftText: "", rightText: "", rightIcon: "", title: "", titleColor: "", bgColor: "#ffffff", titleWidth: "400rpx", height: "44px", leftIconSize: 20, leftIconColor: color$3.mainColor, autoBack: false, titleStyle: "" } }; const NoNetwork = { // noNetwork noNetwork: { tips: t$1("up.noNetwork.text"), zIndex: "", image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAABLKADAAQAAAABAAABLAAAAADYYILnAABAAElEQVR4Ae29CZhkV3kefNeq6m2W7tn3nl0aCbHIAgmQPGB+sLCNzSID9g9PYrAf57d/+4+DiW0cy8QBJ06c2In/PLFDHJ78+MGCGNsYgyxwIwktwEijAc1ohtmnZ+2Z7p5eq6vu9r/vuXWrq25VdVV1V3dXVX9Hmj73nv285963vvOd75yraeIEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaD8E9PbrkvRopSMwMBBYRs+5O/yJS68cPnzYXel4tFP/jXbqjPRFEAiCQNe6Bw/6gdFn9Oy9Q90LLG2DgBBW2wyldIQIPPPCte2a5q3jtR+4ff/4wuBuXotrDwSEsNpjHKUXQODppy+udYJMEUEZgbd94DvnNwlA7YGAEFZ7jOOK78Xp06eTTkq7sxwQhmXuf/754VXl4iSstRAQwmqt8ZLWlkHg0UcD49qYfUjXfLtMtOZ7npExJu4iqZWLl7DWQUAIq3XGSlpaAYHD77q8xwuCOSUoXw8Sl0eMux977DGzQjES3AIICGG1wCBJEysj8PXnz230XXdr5RQFMYbRvWnv6w8UhMhliyGwYghr4Pjg3oEXL34ey9zyC9tiD2ml5h47dr1LN7S6CMjz/A3PvHh1Z6UyJby5EVgRhKUe7Kz/JU0LfvrJo5f+Y3MPibSuFgQGBgasYSd9l6GDsup0WS/T/9RTp9fXmU2SNwECdQ92E7S57iaMeJnPQLK6ixkDLfjlb7546RfrLkQyNBcC3dsP6oHWMd9G+V3JgwPHh7rnm1/yLQ8CbU9Y33zp0j+nZFUMb/DHmB7+SHGY3LUKAk8cObtD00xlHDrfNge+Z2ozU3c9dvx4Yr5lSL6lR6CtCWvg6OAPw9z538ZhhZRl6XrwhW8du1KX/iNejtwvPQIDR8+vSRqJ/obU7GupjdNdh2gW0ZDypJBFR6BtB2rg2OVtuub9JcmpHIpBoK1xfffLzx4f7C0XL2HNiYDp6bs9z23Ypn1fC1Y/9PCFDc3ZW2lVHIG2JKzTp4Ok7nv/G6Q054MIvda+bNb74pEgKGtwGAdL7pcfAa8vOKEZ2kyjWuLr7uDh+/qvN6o8KWdxEWhLwroyeek/g4zuqwU6kNrhyZcu/UktaSXN8iNwuL9/RuvVXtJ9PbPQ1vhmcP6t9+47u9ByJP/SIdB2hDVw9MJHQFYfrQdCph84evFX68kjaZcPAZJWwjMXRFpJ2zr91tfuvrh8vZCa54NA2xGWrunvmg8QWCJ/N4ir7fCYDxatkOeBB7an501agXbygVdvv9IK/ZQ2FiPQdi9osGbH+zRNf7y4m9Xu9Me7N9nv0HXdr5ZS4psHgXpJC9P/wDRTx0Vn1TxjWG9LGrbaUm/Fi5meSvcrkxf/Cg/ow9XqAUk91v3qHT97r6471dJKfHMi8Oyzgx1Z03t1YAQVT2MwgsC3u+yXHzi0faQ5eyGtqgWBtpOw2Ol9+/TM+sTOn8L08MtzgQCy+tOHXr3jA0JWc6HU/HF5Scssr4jXcYqfP6V/T8iq+ceyWgvbUsKKOn38eJAYyl56TAuCEr2WYei//9Crd/5GlFb81kdASVopSFrerKRlaoZj9HR+700H10+0fg+lB21NWBxe2lhNHsUpDZr27mi4dV379R9+za4/iO7Fbx8ECknLCPTsTDJ17O33bJpqnx6u7J60PWFxeAcCbMV56dJfQKf1bkMLfuGh1+76zMoe9vbuPUnLsb2DtmOe5HSxvXsrvWtLBEhaTx29+Ma27Jx0ShAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQaEsEVoQdVluO3BJ06ptHL34b1XRjp4Ch6Rq24+kmjG4Nwwg+9uA9u/73EjRBqhAEihAoe3xwUQq5WTYEzp0b3ZnV/Ncf6O/9AvY9wlh/6dy3X7ncN512Zw9BVLXjuAP4np44vnQtkZoEgVkEhLBmsWiKqwsXpjbPBOn3gRfenwnc+7GBe+zsjclvonFDS9nA9Iy/u3x9+vAP3735VPk4CRUEFhcBIazFxbfm0k9fHD7k+v4nQFaPQIrx8Gmyx/GJ0J/t7ez7mw0b9MmaC2pQQgh0/ZSm4g5TwueWWtqLt0HuVy4CQljLPPYnB0depTn+b3t+8B4t0AdBUv93h2H9xc6da0aXs2m+r1WQsLRnl7NdUvfKRkAIa5nG//r1oGtsZvjTgev/kqYHF/TA+AXoqv4npJemOEiQU1Eo2l+G0movBK1UBBPU7s9E1+ILAkuNgKwSLjXiqO/khVtvARH8dxDBRkMzPrF/V+9/BlG5y9CUqlXinHv9mRPXtvuus88L9H3JPv2zD2yXExCqAicJBIFWRwAvv3Xqwq0/Pnn+lv/K+ZvfPH3p9p5W75O0fxaBp793ce3AwIDMWmYhafiVgNtwSMsXeHp4eNXJC8Nf0PAdRCiuf/XgrnWUqsqotcvnl9DmRkCdweX4b9N7+m/ih+mbMraLM14yJVwcXItKpT1VRve+ArC3Qqn+3gM7132jKEGZm6tXg86J7OhDfuA/iHwPUpfUZSfu2L59tXxEoQxeyxkEgjKeOnLxHb4RqC+NY5H3+2953d4XlrNN7Vq3ENYij+yZwbG9jpt9GkBPQ5H9zgP9607OVeWp87cOQtn9zwJf+xDMNFfj+jryPqXpxj8c2Nn7P+SXey70lidu4IXzb0DNB4tr9751+HV7zxSHyd1CERDCWiiCc+QPjUCnsaqmZ62O5IN7N/VUNP48ee7mAZDTf4Tt049iUG4Guv4ZfNLos9UIbo7qJWoJEHjy+bP7fNsoOcnW0A0/aacef8PdG28sQTNWTBVCWIs01OfPj66BpfqTmq732UnjgT1bei+Vq4pTv7HM8Ceg2/o1qLQug7T+FaaM3IqTLZdewpoHgYEjV9fphvOj+OShWa5V+CxvZtpzv/LwG/aNl4uXsPoRwI+4uEYjAJ2GmdG8L0FK2mYa+tsrkdXZy+P7x2ZuHdW14P+BLdank9q6Qwd3rf+ckFWjR6Tx5Q2cP58K9Jm3VCIr1ogt48lO237r3//96YofeG18y9q7RFklXITxPXV+5DchKb3ZDMy37Nu5tuxG4R9cHH6b42QfAzlds+3EPXu2rfrBIjRFilwkBIIR7SHoJDurFU89ZOd680Gke6JaWomvjoBIWNUxqivFD87fej0e0n8Fwvr0/t1rnyqX+QfnRz7g+8FX8Rv8vL3auF/IqhxKzR2WCPxXqKeq3krDTdj2ierpJEUtCIgOqxaUakwzNBR0D09yiqePHOjveyOkpxLr9VMXb73V97S/h3nDXx7Y2fdPkAYbncW1IgIDxy5vM7LZt/hgrnLtxyaBrJNxv/72N+6tuNhSLp+EVUZACKsyNnXHvHL+1qcgNf2KbSXu2bt9dcmS9qlzo/fARgcmCtpzB3b1/Vg5QiuslLowENyDWDn8cSjl98PgdBviu03N+rl9/WufLEwr18uDwLdevLTF1YK3xnVZ2HI1bUxrT7z5zTuXdRP78qCyeLUKYTUI25OXbm4JPO00TBj+6I7+db8ZL3ZwMOiYdG4dA1lN9HWte2iuI2NAVPapC8O/CGPR34Ip/AZIbIMo7yX8G9QMbcS09P+2b1vf5XgdrXaPfiYns9oeLLEd8D1/B7Dp0E1jGP042pXQj7RKf546cmGzp+tv1TRf6YQD35/QO3seP3xow5IfC9QqmM23naJ0ny9ysXwgq98BWc0kVhv/Nhalbqe8kd/Fr8MOSEr3zEVWrwyO3I29hl+E9LUHGf+nAXI6sGPdd8uV2YphIKnE5IyL6bLxk7cn3bdkHHefrpvJAExMZ1uBZmqeNzXtfzUzk/m/ens7LjV7Px+8d9e1579/44l0duZtge+Np5zEEw8c2pBu9na3YvtEwmrAqNE8IZvNHsep5//yjl3r/0O8yFOXbv0QCO05gP0JGIL+fjw+uj91YeRh/Dp/PtCDM7Zpfmjvjt6Xo7hW9ycmJjaYduf7Hdf/8HTGfa3rG9rYxLSWnsloPg7fijZV8oFM2Ja2a9t6EJd7bCztvHP7us4rrdD/r3/7ct9I99jEI4cOiQ3dIg2YEFYDgOUJDFj1e8TqX7cT4kImXuQr5279A4DeBEX8ayvprU4N3rovcALot/TH13T0fXDTJn0qXk4r3k9OTm4y7a6PzjjORzOOvn1kbEqbnEprPhRzwAKzwFLHk05hv6Yd6N+o3R6beG50aPSdr3qV6IJKkVp5ITIlXOCYn4Yexr0w/DO6YXymHFlR0e5r7tsM3fxgJbI6fW1ivTeT+SsYmr54cFff+5Cu5X+hb94Merp6/J/PusGvTE6724eGJ7RpSFOkKPCUZvBPBccoHBet3Rwe13rX9tw/PjXzZ5hKvr8SfhWKkeA2REAIa4GD6p0feRdWBnvxjv2PckVhVfBf4A29uG/X2i+Ui2eYn8n8NryuDr3jPfWSFV5k44UT137eshIP2K7/64cObbheqZ6lCp+Ydt8TBO7vTM5od1+/NR4SFVhoLpKKt410lnE8LTMzo3V2dLznxLkhYgQ9obiVjEDln7mVjEodfYcpw+MAsftg/7qSDbAnb97sCSb0Yei2fqOcbovVqKNnNO8HmAE9Cv3Wp+uoWjt27HpXNqH9WTKR+kBHKqEFbvo5y3N/avfu4g23R45f3WGa1k9ZicTd0zPTf/f6O7f8dT311Jp2fHzmgJlI/N70jPPe4bEZ6Kg4qw0lqlrLiNKBiLWerpTW25PUbkPXZViW62ecHz+4d8PXojTirzwEyhq8rTwYFtRjvpX/rlwJ+iSXugPbMuyKBOHo3geRJtuT7PujcmVUCuPJlhnL/9NUqvMD2eyM5sxMaIlE4n7XML907tyNjcxHQjty4sZv66Z1xEok/xNW5n4uZSf+8sT5m++vVO58wkEu5sR09pd9w/rWyET2vReujiqygrSopn/zKZN5qMeirotKeTyolm7p/+X06Wvr51ue5Gt9BISwFjiGsLl6N6SrvylXDNTK70D4mX071pwtF88w6Jd/DG/1E1u26NOV0pQL71y3/8PJVOcHMzPTWkcCH2YGOaTTaS2RTN6f1fQvvvDK1bdnbO2JZCr1SeRfn05Pa1PTU0gXJBKW+ecnzlxvCGndhFQ1NRP8bcY1/vjS9bF1V26MwHwsVKiXa3etYVw1TNhYJ3TDjQCO42jJVMcez7J+t9YyJF37ISCEtahjGjxkGDr2DJZ31D8h5vUQJL5RPkXlUMM07u3qSGidICvkzzuSlmlZb0olrK9hD9v9JCrPC196JoPMAolFg6CV+PPj54YeyWecx8Vk2v1Q0rSfhFT18LnBmzBRyNalp5qrSuq7kiAsh4SFa7oZ9M0wzI+cPHOjZPo9V1kS1z4ICGEt4lhiCvZrSa2jol7qzPXJPk6nIGbVbWfUvcr7hO9MP97ZVXpggOu6ajplYStj7l1XvbRMXbPAbp6HzSSBlkraNknrvfVCcPt2sHYi7f3pTDb47KUbYxuvKqkKpYBXKBnV869c3WgbDEixAck0FGFFfEzJzbIsO9C1TyrcymWWsLZGIHoW2rqTzdo5dXyykz0NC8l779i5vu4zwM+eHVntGP5jqVTq/6AkVc5NZ3wNH2lVxNWZNIukMSjiNd9z0+CHp5DXAdX4SAg203w8GB5IATtODHzdK8C15kEjhXvNS9rWA11dnfcMDY9prscss48RySakrOLWqODCoIKAgkuVgsS0urtD60haeV1YYVbbtjUn6/74HXvW/11huFy3PwKzT1r797Upe3jq4sib9u9Y+wxe+vh7W1N7jx49v6ZzbffnQD4/Cj1Pfjx54XiBls6GVuTUc9mQsOIO9mPQFdkIRlz4fy5JLm2ZMOqTcJaXIqpcqnixVe+rdbZ3dbc2OT0D0wZIibHSksmklslknvx+//q3PiKnXcTQae/b+LPQ3r1t0969cOL6G7o6E09qgZegdMJBpVQ1DbKCpyUt6oPKz/4NEJalCAuZFIuEVBJd+jgLh4rvAiFqUVGkhJZMWFp3Z0obGSu/d5gSnWmavuO6h+/cvYHSobgVgoAYjrb4QPMUiGtj1/79jBMkLBwiTlMASlYzTkhWCJyTrGAyMOFkst/BoYMmuIIyGJYcMXMMdNwHPhYN1qWS1t6ZLGaKZL8yzFXTr15BooLLMugHMBRNKgW+It8y9TEcJGt4rvcRFCCEVQbFdg0Swmrxkb0+cf2XOzq73kgdFieEXF2jdEUJKQH6SVWQrNjtZDKlpTPp38U58iUbthk/Ph7sN6zg/xudSGvD4xkq6otcnnjyF0XRRTflkyC0IIJE1JG0QbqGNpMNp5xFhRTcZDNoj66988SFm5vv3LX+WkGUXLYxAuXnCW3c4XbqGs9hwjv+a9lsuN+ahOJSCoLjNDAFvVUll0p1aNPp6adTweSflEszPO48oFn+4yOTmR+6enOshKyYhzWpf/jDuuf6x2aV/qNRaPG/1d0gUXWCA0uu7GhMmkqmerEc8KOVU0lMuyFQ+Ylut562YX9Sncmf7Ojo3BDZWbGLtMkiUVXSWTFNuMqWuYG530f7+/tnGFboxsfdd9mm8XdDo9O7rg6NFq0CFqZr5DWlK9qV0fZqGvZchSuPlevB2VmG/hOV4yWm3RAQwmrhEcW64qu4ykfJho52Vp3J8quBYQooqWDKADftBd6HD+5efyoKj/zR8ew/hWXY56/cnFh7a3RCTTGjuMX0SVB9qzu1qfQM+jO3dBW1g6uVSHv/qVNX10Vh4rc3AkJYLTy+WA/8ou9kJjo7bOh+DLVFZ64TEbCyBktxI5PJZj56R//Gx+NdH5vM4vuI+p8NXh9LjU1iw3EZhXc8TyPuuV9wDaaCfBjTM06N0hVWQmHBDzvSDZ5tvqYR7ZAymh8BIazmH6OKLbzv0KZvJEz3ZzEFnEolaEtV2XEaCLKadrIz//TQnk1/EU85NuH8th8Yf4j9gMZUOrNkZEVZCnsbtTU9KW18GqcKFyjh420sd2+j33pg3F8uTsLaDwEhrBYf04O7N/2t7/o/C2FoGnsIy/YGlvAwSfCvZzLOe+8oR1ZT3u/5uvHJC9dGtJlMrfqjslXVHwjpat2aLi2rjFFLjUSrFUjlO0juddXSSXx7ICCE1QbjiHO0/hofbPgwpnDTOR2V6hWNQqGUx34890noet5yaO+Gko3Y45PO7/uB/lvnrwxrWdha1absbgxo1FWtwplXqYSJY5Nn5lU3bLHQmGA/yko0plVSSjMjIITVzKNTR9sO7dv8RSeb/T9BWmMkKv4D+YzBXuljV7yxd+zfte6VeHGKrHTz4+cv38JWmyUmKzSGG5z7VndoE7kz3uPtq+Welvhwm39weVjOyaoFsBZPI4TV4gNY2Pw79mz8KyebeRIH+VEZTaX0sf27+v794TKmCxNTzr/2NOPj5wZBVjjdYSklq6jN69dyKuhqmWztivYob+RTSkPbe/xMdlMUJn77IiCE1W5jq+s4dYEO6mzsYAmvi/+CrH7LDYxPcBq4HGTFVcG1ULLT5orS1ULIkoSFI2cMHKG8obiXcteOCAhhtdmo6gaOh4EWWlkyYU9gvHswXfgV19d/7+LVkSWfBrItJJhObL/p7elQR8fUZnEV70XxPc01sM+xrzhU7toRgZIHuh07uZL6xA3LBaYB+Ar8rBsfz34YX1j+D5eu317QNGy2xPquSE4mDuXb2IujY2AgytNE67RiKFshzuwCR5s9ZSMlsK0QEMJqq+GkBKOF5yFzRoidK5BoFCeMjM/8mG+a//Xy0Li55KYLBRiTrGjwOQ1br4VMBQuKVJeQKVPxMLlvPwSEsNpsTEECmBLSgbHUpwD1YGwse59l2p+9fmuig4fiNZIowrqq/6Xeqm9Vh9JbjcOKvqFtACX7gV8kTVZvkaRoRQSEsFpx1OZoM2iKxxuHLtDcsZlgLzYZfv7m7XSv+r7fIm234XSP/8o5ktWqzqSyZr89PoXPYDTYkZvziw0NLluKayoEyq4iNVULpTF1IaDjHHZmoAW4aep9geN8fiLt998cGYdtVp7K6iqzXGJFUCAi7jdkuapsBJKcPBwgyP8YRyV7B04Q3dDbpY3jg6gupoMNla5U41BbUN9n0sr1ScKaHwEhrOYfo7paCAW0WiWknihhW/0Tabf/6tDtxpIVSIhGnz1dSXUkDL8fSHKi4/lWPId9Kp3Vxqegp8J/m9f14D6DQ/nmb281FwgkZ1Dj7bnSSFx7ICCE1R7jmO8FJJr8jCvjeNrIxFjDJBpKVaSlXhwDw384MyucBoLAGEfHI5ptO6n1YAq4FjorH9IWjUOnFlF3pj62aui3whbI33ZGQAir/UY3XCVEvzgdw/8NcSyGUhSlpVWQrFg2p39xp0JYLyIohaXxdZ2FGofG6yi85/QS32F0Asu8URgu1+2JgCjd22xcsVElPC85169Gaa1YTkRWJKpSqooBiQQzONvq9sRULKKxtzzAEJw1api2EFZjoW3K0oSwmnJY5tcoSD09HanEDztubnfO/IopyUWC6sUmZUpW5aSqkgwgK04DxxaZrFivacCaIdAuH9zaM1rSDgloOwSEsNpoSMenvU93dXb+EE5taFivKElRqd67qrNmsqIF+yjMF/i56MV2JqadYKxXMDXM6+4Wu04pf/kQEMJaPuwbWvPticwj4Il/NnTrdl7JrqaDC5wTUle1GmdWWVCw1+JotjA6PgnThsIdQrXknF8arkJi/+R355dbcrUaArU9ha3WqxXW3tHR9C5dN//T9eEJ3aGdUwP7T0V7F86Mr0VW4mF6o2NTS/ilaB2HDmb8wA2+08AuS1FNjIAQVhMPTi1NgwRkGKbxRxMz3uaJSRzVUkumOtLwo6Zc7aOkVdEhynN9NQ1cyuNqeEqD67mX9TXGyxXbJhFthYAQVosP58S0909czfqJqzdGODVqaG/IUbCWr2p0yukfp4FUtDfeir1yl8IPUGjPHFy/fqJyKolpJwSEsFp4NEfT6Z3YBvOp8MvMc0hAi9hHNQ1cBrJil5TUZxhfXsTuSdFNhoAQVpMNSD3NMTzzU1PZYAM/ProYkg3UV5rHT8lXmA7SwnwEq4FLLVkRI04HM+n0LdvzvlEPZpK2tREQwmrR8ZucCd7hePr7rw2N5PfxLUZXON1zHKz4kb0KnIttP6Njk8tyaimbwXPrsW/yq3v3bhoqaJZctjkCQlgtOMCYCnU4GedTI+NpQ32XbxH7QOmKG5nzdIWZJz8HNkKygqI9TmSL2JSiovGVn0A39c8WBcpN2yMghNWCQ4zPc0HRbr6GEs6chJFnmfl3knZO4/hmII1B6fiFG9br0s6qAeXPp2WUrhzHeXH/jr6n5pNf8rQuAkJYLTZ2kK7Wul7w6zeGx9DyUsZovOodOizosTg1TM9k1Wogpa7lIisOF+w48E/7E5B1Y/cgtdizsBKbK6c1tNioT6X9n3MDcyePOo7OoJqrC6S0+ZIYV+GSOHxvc18PJCxXG4ed13I727axqTp9yk9rX1jutkj9S4+ASFhLj/m8axwdDdbgELxfGsLpoZyqVXPVU1QugVJUV0dC27p+FaaBWWxknq6ceAljTNMiAf/BoUMbJpewWqmqSRAQCatJBqKWZpgJ731Zx9pJM4aK0hXe5vlKVFEbKFlxs3PvqpSSqpbzKztRm+gnEkktnU6/2GFMfa4wXK5XDgJCWC0y1iAR6/Z49iOjY7C5qkG6mk+3SFQGlEP8FFdnygrNFqBsn1OxP5+K5pGHbcBhqhT8fqu/v39mHkVIljZAQAirRQYx7Wj3Zj3tddQjVVJ4l50CMjHe8mqOTJCCvmoTyIrENXx7Uinbm4Gs2PZUqkObnp76i0N7N36tWl8kvn0RaGnCGhgILKPn3B3+xKVXDh8+nPseX3sOlpt13+P4uonv71WeDqLr1ampFB8S1JrulNaHc9rTMxltcpofOeWns0rTLkeIZUHRnpm5YibMf7kc9UudzYNAyyrd8ZLpWvfgQT8w+oyevXeo++bBtaEtQd9s1/ffRsV3I6eDJCp+nourgH04UZQnhIYfWm1o8xdUGCU8/E/bil89sH3dlQUVJplbHoGWJaxnXri2HTvd1nEEcCBS3z++MLi75UejQgcmJjL92ax/gNJPo6QekhVXAbdvXI3D+XQ1Bcxiu02zTAEjKFIdHTQS/S8Hd2/4YhQm/spFoCUJ6+mnL651gkwRQRmBt33gO+c3teNQYin/oG6aKX5rcKEukqqoWN+Ij5vy81v8UATDG0WGC21jlJ96K6wKPpWd8H8jChN/ZSPQcoR1+vTppJPS7iw3bIZl7n/++eFV5eJaOczX9Z2YvM1LPxWpocBHKv8qHHdMqSphGUqqahaThfj40ITBcbLnsDj6oXvu2bS4n96JVy73TYtASxHWo48GxrUx+5Cu+XY5RH3PMzLGxF0ktXLxrRoGNVPPfNtOolIrgElLGYH2wbZqcipdIFVFlDbfGhqfj9bskCaHHS/7gTt3r73Y+BqkxFZFoKUI6/C7Lu/Bl1jmlKB8PUhcHjHufuyxx/g5lbZw+BL7bX4EoiZqyS0T0uM0j1+82QSl+ua+bhxj7GjD2LicwWkLzaarigbKsmDJ7gcTmezMBw/t3ixntUfAiK8QaBmzhq8/f26j77pbaxo3w+jetPf1B5D2RE3pmzyR4/nH+Mti4Wx1dUrCHO0lSVGqskFUnakkpn6mhu086jgYHkWTW3Wbo4Tli6L5gqYHE47vfeDufVv+YflaIjU3KwItIWEdO3a9Szc0ElDNDqcLbHjmxas7a87QxAnX9ljfxcr+Mzs29ykpi1O8iJjoR/cm5o7dnUl89LRLW93dyWmVIip+Kp7pmlWqIvQ8Mga9Gslm3Efu3LX+K008HNK0ZUSgplnGMrZPGxgYsIKeXa/TA61jPu0w0+7xBx/cd3M+eZspD0wbDgWm+RXP13cODY/jWGKuGAb48jG+agNpilbqlKZoWDqDY2AyjtNUlupzYZlKpXgaxIVMNv0zd+/d+uxcaSVuZSPQ/IT13TN34QRvZW81n6HSDdMLUqmjh9tgd//Fi8OHEl3JL3Z2dh3MzGA7XU664llVWRz/QhLjNYmsmaWp/DjCjqIDdlaZTOZZ1/A+fGj7hjP5OLkQBMog0NSE9cSRszuswNhdpt31BRnazM3U9IuPHDrUuG+419eChqU+cvzqjp7u5P9KJpMPpqc51Zv9QntLkFQBEqZluVCw/7nhaP9i376+8YIouRQEyiLQtIQ1cPT8GjOw7vE8tyFtxBrb2MBXdh579FF99g0vC0nzB548ebNHT2l/aFmJj1BPBYyav9EFLaQ+jdPAVNL8/pZ13a8qiJLLOhAAjvrTRy/d0enbF+69d0tzHFhWR/vnk7Rple6mp+9uFFkRGF8LVj/08IUN8wGp2fIcPLh+4sCu9R+F3ucj0MLf4vaVVnChqYWmdaQS2jpY2vd0djh86Vqh7c3Yxm8dudTPxaW0lrn7yJEjZW0Tm7HdC2lT0xKW1xecgHE3FDWNcb7uDh6+r/96Y0prjlIO7ur7TOD5b3ayzt9ylY0Gl83qKFXZsCXrXdOlrV3djf2LBr556JOshLDmMWhPPXV6vav5O5jVxYLUhNl3iIbV8yiqpbI0bQcP85C2Xu0l3dczC0XUN4Pzb71339mFltOM+Q/0rzu5f2fvu1zH+QDOt3uZ0pbVRMRFouJK5qqeTkhVqyBdtdUmhGV5JI4cudrpd5kHiyp3tTU/8s6r+4rC2vCmaQmLWJO0Ep65INJK2tbpt75298U2HLuiLh3oX/95L+0/kHUyvwTieiUJHVEimVzy1UKeWMqv2pCoKEVFRNXT1aHawnBx80eAZj7TwcxdAc5Gi5fiaNnNT37nCk4xaV/X1IRF2B94YHt63qQVaCcfePX2K+07fMU9U7qtHev+xE/7r3cc70O+6w1gxuV0dHZiusgvJS/O7IskRXLs6KCxqj+B26t9a3uUREWi4plbQlTFYzXvu+7tB3EIUGel/L6e3TNw5NS8zYAqldss4YvzBC9C7559drAja3qvDoyg6pwCP+KBZaVOPPjazS1vMLpQKE9fuPnawDB+EqehPwzWuAuSl8LPg90WVxhJJPWQCUmPBAWTBEz1TFUGpqO3wYYvIPgr2az35a2b1/50V6f1e1NTlVcvEzB0xRekj67usu5FmS2/crvQcaol/zeeObfTSOj91dIq28PxiaOHDx9quy8LtQxhcZBqIS0Dhkl2l/3yA4e2j1Qb2JUUD1Iyz1waOQib0vsxKXsAFvH3wMB0JySwtZC+DBPTN5BOCEnhrI1BuKe9l6tIzsVCiD6E0DOabrwI2elZ09aP7N3aNxjheXvK+a1OENa0EFYEyYL9rz072Ju03ZpNQKj7Xd899cKhNrA9LASvZTY/s9GcHoK0XsrakLS8UklLxyl+/rj+/Qfu2367sJNyTS7SuZfneO7ffweBGScu3NwAqWgrTvTc5jjBZmw87tMCfRXYKQWOgula4OiBOQUZ7DZuhrAGdQXxV0zPuCaGnkv3VPGHOpPw7+QPR62OM5HhdNddGOeX2kmCbSnC4mDlSStVTFr4eLljdHV+702vWz9R66Cu5HS5h5hmHvz3QiOxwJTRo2BGgY06dm7OVhewYGAY6s75oD+ZDs4JPY9JyqSCQ7ABqftd5VFM3/j2Ja4mtsWpJQSq6ZXu5UZTKeJnsHpohiYPRqBn04nkS2+CQWW59BK2dAjwS0Y4IHDz2ERWG8Gnwm7iK9W3sFmbvrqGPzw6gW8eTmvTM07XmTPX28KYd7EQ3rjnvv1QFHbPt3zT9DcMPHd+13zzN1s+/hC2rKOo7NjeQdsxT5LEWrYjbdLw05eHtwWe9jl0542u62HZHZIVpalY/yIlP5X3MHYddLLZfy4fmYiBhNuB509vw+rG3tKY+kOwGHLi7W/cS91jS7v4s9TSnZHGLx8CICH9lXNDX+zpWfXuycnaBV2e3e567nAm4973qv0bzy1fD5qr5oEB7KXt0u7B3Loh7yhWVfypbOalh9+wr6U3mbfklLC5Hi1pDRE4ef7Wj+EEiZ+amqpvJT2bzWjJRLIPR3n9riA5i4DZg720DSIrlsrvHXSZ9p7ZGlrzSgirNcetqVp9/vz5FJTqj6JRejTdq6eBMzNpHP9s//QrF4bvrydfO6f1JrCX1mvcXlo98Kembjotr3wXwmrnp36J+pYNeh5JdqRem83O77gxkpxtW3bgOZ/g1HKJmt3U1Rw+3D+zrc89aunagnWzpq6PdxujLz388L4F78tdbtCEsJZ7BFq8/sHBoMPX/I9hyrGgnuDUUZzrnnz7yQu3HlxQQW2Ued++fZmJ1e5LoPB5k5ZpWCPXz+08du+99zrtAI0QVjuM4jL2YcIZeh+2+9wF49MFtYJSlgmHE0g/JlLWLJQPg7RmhtyXsJ18eja0tivsXhj6xy9ve/mRR5TRcG2ZmjyViN9NPkDN3Dz1FW5z9XM4i+s1ME1YcFNpUIrVLHzJzHnwjl0bn1twgW1UwPHjxxPXpztejR0HFTc+F3YXRwxdfdM9W08D0zrs4wtLaM5rkbCac1xaolWOvurhZIPIih0OdVm2haNTfqUlAFjCRnJP4HBn+iUqz6tVa2nGpTe/etsP2o2s2G8hrGqjL/FlEQC5GHghfplSUSMdvwaEA/9+4vjpa3c2stx2KIsfUek2dr+EuXNF2xEjSJx98w/tbFt7NiGsdniSl6EPp84O3W/Z1oPzXRms1GRKWdCJdeCIlJ+vlGYlh997r+70+EPH8NHJEtLCauCph+7bmj81ox1xEsJqx1Fdij4Zxi9AT2KSYBrtslgxhOD2gWOyz7AstFzx6zFHj1mGobYUYAgC9cHge3ddK5uhjQKFsNpoMJeqK6+8cm0X6noXiWUxHA8WxAdWNyQM45HFKL8dyiRpueM7jllmMGpnjO+1w9fNaxmXxiogaqlR0jQdAkeOBPjczrnOiQ6jw88ESSOA6KT7iQzOHEvavu1pZsLQg4QPP/DdZG9Xx/vWrOr+mfR03SvtNffdxleAQIgvTzjBT0w409Mpu2faufZy+vDhw5WPMa25dEnYqggIYbXqyNXY7i/jCyvdfmaVb5hdVsLp9LJGp43j1/1A7/RdvdMwPRzEboRnLVHe9vEvL3eXBOB4ZMta22H+TiqV2LJQ26u5u6Bju44Z3J7O/Lvp6cwPmBanOwQ4uNHRTWMK21bSvh1Mm642nTWCtKkH07rnTE72aOO0XZq7bIltVQSEsFp15HLthg5J/+aJE12m3tVjOPYq1/dW4cTjHnwMYhXOce8xDd3y/PJW6OpMdsTRVy4iK/rKMR/jwvz825VIHFzT3fkx13UW/dnhRy3GJyeeHEs7n1XNibUPFvY6vtGDw5vV9w0Vofn81qGhZfDhi3HX8SfQ/3HPMse9CWcCX0gel2OIFJIt+2fRH7qWRaYJG85NxldGzV4tGayFSLQ24+q9ULyu9gJfMU5ELTn6wUISTl03NHz1KzyiJLqmX657OLLdSJgoXTO7cBxyN172blier4YCvBsFdSNXV2dC35tKJrbzfPfFdjwvC/qs9MSMxxNRsSqmT6LhUDQHE+jUBE7UnATXTuLsrRn01K2l/x6+qItiR3TNG8V59KNB0DGSfNXGUXwJY2Gm+osNhpSvEBDCasIHgVLTt75/aQ0MnXpBNb2QgNYEntfr4wu/nBYpKQLtxtdwAh0SBX3VDe7nM/Ha5vf1Fb/CURS2bCTAWWuxR229qRsbQQQbUed61LfW14JVKKsTJ5sk8WUcHbtlNANyTOhgcmAGKH7p3m1FWpqtuZCu+LByVdKHVMjpKEQrBwIW9tnpXOIH+QTDSH/D9f0bmCLewDn1I4HmwtAypPDZ/oe9oXKf/aMPsWxSs/RR13FHrURiZE1gDR86tKHEdCDMKX+XCwEhrOVCvqBeHNaW6ui11/mWDtLQ1kEiWodXE4rwYgepAPssTPCMOjIdAk94TZ8pMZjch8HjDorGFUTUAwlkh64be0A9/ZCatiDZWtOyE7ClQmIdJICJFYhA+TRV4Fo5/QIHiUvrTEbkVRCxiJfsSBbfYk87OTExXxdazY5yUgiRKfpHQ1YSkONmAZY+gV4NIeVFfCXoLNA5h/Plb5LzWAyzF+IVXdNnvO/6GcsyhjC1vmWZ7s2pO3fdOqzriy9asnJxZREoerDLppDAhiIAEtCfO3F5rW0a6z1PX4/nf53nG5RqqrpieSnULEVh8cx4E7ugH78H8tG9eP/24oVezY+pkpA8b/abhPF8le75BqdsXUtaFeaTlTI2IByEoU1l8oq1mkokcZHElIRoWmpejMMCMyCvQXyy7JjjuUcgOl4tLCzCMpTHgFpcgkViX/dH/ax2Szf8m2Yqc/MN+1r7BM/C/rfCtRDWEozSkbMjq7NTY5t13dqE6dhG3wsSqlp+C9DDi0ifLrqmT1f6BgUaPjiHN0lJAGAfvpWcI4XjiHIMF6ocO/EjmMa9HeelQ1LT1PRpoce/sJwOTCQtc+kfGQp6Uxl+9JWtmL+jNEaJ0gKBgbsygR58B4sHfwV5aliVWg3vCHv6ymHcdG868IzrVsK6pnd71+/dsmXxbD3m3/W2ybn0T1/bQFe5I8euX+9ybuqbXMPbDA7ZCKV4uMOecyz+9OfmWvj9x9zEw6JW+JuOX298WhE6qtwLEV3TL1tb/AWj7sqwfqaro/sdmcyM+vBp2XzzDEzaBiQsNH+e+eeTjQ+ohwqnG0BYhfVzNYKrkOmpyauYYH8KvD8G6RPBszrC6Jq+ystl0ghzXEZjR5+O4+iZwTh+eG7Yqa5rq/3hGzzTSkXKn4YgIITVABjBP+ZzP7i8ydasrZCetuCHvIvFRs92SEdlpnCYE2LOQi12OA7RNf1yjrphHIyE9yOXPnfNMDg70DpdTf8DWDKs5rRvMVwChAWrUgh21HzllD0NrigqlxKVC7bKQuOOWeGiuI7OTkhb6T8C/Xw3xkel9cXxj6eIxiY3Hhx3X9dHsWJwDaa3l1+zd9Mt/F4tUk/ijWnP+/DBb8++LWqvnh0c7NDGta0pO7kl6zpb8AJzEUr91kYEFdeBRCt69Nm4+AsSl6jwjVGckY6VwPwUpLhLURx9xliWvxFHi/w+zB0SWCnLsVpxnoXesSI2ngp4zmRJXPgf/0IleGH51R6uwjeX5MR76qtITh7+8N9Cp4GF7Sm8Zl1s35pVXVomm/5c1vG+Wm284njHJeJq44/FjixUAld8w7uijW6+xo3MhW2S6+oIVHumqpewglJ87+LFtcFUcqur+1vxwPcZJqYPMOyhXw6GKI4+4/GwQpjCBhe+6XDIpFb06PM+np5hhS5eXzw9bLJ2pBLGv4Fe36BU4kA6IQGw8MUY6MJywVeqDs54Z69zrWdY7jI3G1ZtUiSV6zzDI3IqLLew/wu9jspl+yywrA1pEed5QceXPT3jBb/DLrA5ua5UHZ/4eMTbFx+fwvE3DJO8fANrjlctL7giJhRx9MrfR89R+VgJ1Y6currONuwd0FNsxwtV02mPlWGLy1TxlPHf6Hh8PH9xesvw9yRM+5PIRT2ZIgVKKZxWUY/PT8aTFPji0i3m4Ed1hDWV/7uY9bNGtiGqAyorJRWSqCgdkrQiR5KddrwPlsq8xfhG6efvx8dvtiQczDdmmPaldDBxSVYeZ3GJXxUMWzxq5d4fPz7Ym7X1HTAL2A7NqtJHEQ3qtCPjw3LoxB/v+OMZ5VVzR5aHWRuErYA+y4uu6fM+Xl9J/lh7bFvbY+vmv0bWos9tsXAWSLIiaSnyApHxJz6SbFSFuXTw8i86r5vVRW1m+6IHmUREAuI0lcREP5q2ztWPrO9/YK54xsXHI56+cePvj3qBfimZNS+J5FWMcrjptThsRd4dPX9+DcwEd5iQphwozfkCwJKaLv9ewHYKeicfSudwShcnJDBBOD3MTwGRO0cqLIj73jQTaejDBYaPHTBgJ/i5+HyYijd95sFhRzkzB7yL2IrCtGwezj9nOQVTUlfPwiicifnu5J0qHHd8mXHIG6ZD7JQqIk9kJK6QwAokMWRUhMaSeJ0vcfaiXNhs7PyuwpYV51Vh+EM/Pu2M9GckpyiOuZm2Wvtom+Y4me8xPbvIIujzPu6Wbvyt1ejL3U7Sv/v754ZHsORwaX3KGdwiJhO5pzY+Mivk/urVq52jTnIXlEc78LKu8qAMx/G8kHhyOicosz0ovM3IrIDKb15HSvDoOoqv+hMLYCOWI8ash0vmufryZVcqLz4u8fym3ov1xT/EVp4UDUTn4/iS0xW+sZTMojASmLqGp64iH4FRXJQ2TKj+lv7JVRTVxwQkm9APyaboGnGMzSVR6VR87ipsVT645ovOzi5tamb6zzB1/nqzjz+s9YetwLioZW5C8jq08K9+1IxS8yQsfF6ap1WL2BK8VOaJc6NbPcPrx7wJ++hmHQUPvOaQgMJ3ETtVlERDP0wVsQ19uPgcLQyt/Dc+p4jlL6k/1xa2qVyh5ApEzEoErm/DsPOTXV3de6anq36roFyRdYWVbVSshHJEMt98saIXfIu9koplYZL6m/hUz7kS/Jt0/PE8+Jj6X/Y6k+fv2tA1BKIvB/OC8WnGAmp5dpqx3XW36fjgYK/upXbhFd+BrRlqn16MfkrspkoC4hnirYjbUVWzs4rHx8uL3cerjwt0TA4RcBcsuX8Rn97q54okVsCKJJ9YkSvy1gJR4aOtnAr6OJP+L13d+BKBKMEzHhAfgDh6yzD+vqHjTDDvYpAxLqwEfVdbE9bpIEi6V27tdLP+LnzPrWS/XrRTnz5d4e79+LNY7r4kP+Z7Jv7z1LyPL0B4Tb+ci9cXLy+eJ54e8Rw//rqqcUR+HOrgYVprJbBl5E2w63oI64J7k8mUDZLGhmAXs19ucVkxP8gKQu4ptCxbMy2TW3KAGI4u1P207ztH3CDx/7bL+Cdse8h1Zy5ev7Dp8uHD7blJuy0J69TV8XW6l92Dl3cbLG6g98idbhDgdANcY1ZY9o2N4mpNr96GRf1Da3Wui0RW69F1bWslvp81LD2xDTOGu9DhQzBc7AcYfYlkAqo6A6ozqHNBYJTESGitTGShsp0qQSxT4AcoPJQw0LBlEPhBFakHDjoLvY+XgVIyg7WK77tG8n9pvpHXBbXL+OMBd7FN6KLu+uf27esbX9RHdIkLbxvCGhgYsDb3v2a7obt7YHakpKmYiqgE2ioqJbzIOszXcSov/DAzRRNehyJKvPx4+igv/ZLKEaCkoZxUFMYXE1I8f7Xyq/UHp9CkAlfbCF3NdlhS7IQguA0N2wiJYy1ktC5IISb1Okr5jSYruy2SGlYkIkKLSC3yy/WrUWGzSnjaTUX/QEhYQuNewLCdwBFKRkpOuAfr4sBnwwfDg6B0MHagORhBHNqHw5WxTwYav6lAt/42MBLfrYZXHO9w3Ftr/B0Hp0pY+tkD29ddAz5ln8NGjddSlNPyhHV8aKjbzAS7Dd3egRcvgRHJWyrHASw9Pyp+vlSxEluH0jWAGQF9VVZMpxHVRZ/xSKQU4PR5Xy0+/sLQZCFS9DN/XKtSeh5WrL2x+sMyZv+W67+vwz5eC7oDx12rm9pakNg639B68XL3Qh+2Bm94DySxHhg0daBHSQhiCbyyyMS9SDi8RhEHyYP1qD9qak0S4VGn5VYrSTRKEkKHWYYiHuQmCYb/YKYLqS+3H5LYckxJmz6qhSYJ5yNgzgtuclESpncBfN8Fj3lgJdCSGpHcGECoxrouMoHjzO+4evLLMB1VKxJV8Wyj8Q80Ix043jnTu32hlTdkh08Yn7UWcnio9Qs3pzZm0lN7LCOxIdIZxbuQ1+lAVFFxJB7aMeUIiPkiPRPjo2v6dPF4FVjHnxi/oQK0Az/bymf5uI7ayGLj6eM63nrbF5VNXzV7nv3HViQL3JAEaSV1z0iBNJIgJBCYkSKJYbdjEiSHw7a0BI5s6QBBbINUswMUsQ6E11UojZGccA9dcZDBdQY+TgyFTgkiEKYyIBvstAQzIRk8cBJ+A2j4gZFDFWAqjAp3V5IhQYYwwUJ57ByS0QINzMYK8FyrRxt3KNbXb2qG/UVNT5wDyCt6/A0boGbdqzPA4tD21SPquWihPy1FWHjQzYs3xnZkM95ePIZd8RccBx1xez/UPowp46I4+uVcLD9/8Plq0Gfy6Jp+uez5uqPyY+UtNN5DuVQc06drpv4bIDXsjtsMpdkOSC79QK4Xog3PzwF4IBNCBiIhpBSpoE8jioqWaM2KCRuOqwLXgIQItKIe0lCYD/lZjoqgGIo0+J++SsmMKA8eqQ21qHuUh2PfzQHN6vgG6vVK8GfmQhcbr3Yff+AEi3rtdCtNF8u/eIWD2ATXx4Mg0XH1Vr/hm7sDQw8PvyvTrriKWocEE0C6oM/kJRJHrAykgj6WGlq+JUifu6YfS6pu4/UVa6AgQcXKi78ApekhcWFBwMstEkTX9MvVHw+Lt2ex+4+Pg62CxgsHEwZbAdgWIJfA+ICkfDRYtyAwWWB7Ay8F8VT/KB0bOJ4Gx/CQfUKSwZGrJJs8iZHYgB0zMB+zk8hopQ8hEcEog2ERASIBAOL5fIrVIKLxXKtzKPZLgZUckvGf+/nH5HsK0+Uz3316zeAjj3D23Lwu90w0ZwNpiZ72UnvwfO/AXIFnXfLBxLOsHn6yiLqmr3oQ04LHX9hq6TFHI6txrlYWkHj98UT1lh8vryR/rIKq6aO204drdP8hRWF3itmLUw42QnW1CSTSA2IAIXkWOBYKLWw8wjVqNkEaFqjFwLQNJhWI4ZiFoiq6QX0SbsEo6HMoWVFCYprwjw6FP65BXCSoXJwiOwpnFK9A6yiWkQhRDwA9XAfpwLS/AqnqSKP7jwapquiznXFXMn6x8Yg/X/HySvLHKqiaPlZfvf0H6BloAM/v3tpzHkJwUx59Uxb4GE5Lfnt2ZGS16SX3+F5mq4llfegtwnaSR6J5EC8hPUV6IDaS6aDnoZ5DpYe6AtdgOr4pyhXLNPH0KKCo/DDP7N+S+mI6qHzbQr7AbdgW+iylWn0l5cf6E29ftfSN6L9lGl04x30tOtMHklmLhxpClW9BL4S1T+i2uNPRp+0FflD0AN9A9LHnmHGBBfJCE3QL9ALiguoJqiu+64gDzWGIIAlhzhaSDsMV/yjJi3BxyY9khP9BXBSzEMY/AFORGMmM1yyKZfmm+ZKuJf4uMHV1THEj+o+S864E7zYd/8Dliqp2MamvPbt9uw4dY/M4DnXTuMuXx/scK9iHLcbryzfKwvOJBSGNPl10Tb8WV0xYyMFymDdXXv46Kq+ueChJQI4WlSUqf8StOf5CNdXqr9afxe8/Gm6AoLAqGKyCGLSG350ACFzKM2FvaeOseEhFOsjItdQ2S6wYYmkOdl2+CfLBvmpIV55vYY2Qn6uAxAWC40zbhxSmWArcQj0TSIiSU37mx0kgVesgLereOSz8E5EWJa6Qzyh1hZEcO7xY4Ct9WLfNvwa+5xA2h6uGP6vMPxMsZ8WNf0Gf+cOCw9usq51a5+kNG9Sn1IjJsjoO0LI7EpVra/vxhPdFs7JyjYriohlbTAKGxO1C6oJEljseOLqmTxfPX66OucJK66OUNzuDjK7p05UIbGwX25I/vrj4BYrnD0uZ/Rtvfzz9fPsPIkgkbL0DZNMFRVEHFEY2ZCBTcwMLdfCsCCVN4SwpE9YG+ARNgD24IDHYSYB1yNCYDkLRFoC8oOUG40AKQx5IYyAmlQ6SF7dDoSof0hbJiApzqLs43aPc5UG+AvVQ/4T7nGQFQiJ5kdbAkmgH2Sz0FaWB4gLrad22v4nmuvPt/yzCc1+V4t0e4z93r8PYwDCvNANxLSthkai0jmCf5+jq6y6Y4SkjTfoKprgWufj9Dg3AozBmiK7pl3H8WDH3u0YfLY6u6c/HVS2vSvsxoygyTF2q/qNenEyjJ5NJPYGPRidME1M1/JYqwyoNq32Ihu4J0z5M+WA2DoqwEI9wfmEaEhQJzPNsKNOh0jJwrfRVJqbnNOrC6IGwQFzgHiKrpCuq2kE+FizrMXWE7IWCEKemg7hSiimOQchNIC3EchqpHlBO95TshQThkwF5TL9k+Mm/MZLGzVo3AlQdLzagDle1vCYd/wU9/5Z5ZcyZPnNow/J8ZHZZCGtsbKw3rdn7nIzTx42o0WfP1cPKuYJ6XPFs5q7p8zmKx5v8cdcxDeMPOR1fj+gh4X10TV/dukiC+nJPeLy8eH1hrtm/UVvpKxcrP2oL/dlcs1eQ9PCeo73wGcp+R2Xyvlp74vH19B9EkoA2CYKUlcQqJCQj6vkoyBjh/IurcJiy4Zxy2FMptRBO7sK3kClR0UYUZAX+wMqfC1ICiYHMYBsKSQsSFKaAUEqZLoiK00ASFsgpN0UEUWE6yOkiiArE6NmUb91OWwAAEuNJREFUszCNxA0c/uBoF04W86YOarWQAYjGmHBBEIkUiXEqib025hNmInWknv6zKo77Sh3/RvcfSx5Xl4O4yr5Y7NxiuEEQFT4uvs8yrF5VvosX28LLS185vsiRHkc9YPiJtrCbJIzHyx3gJdfpl80flZWPR6qIxJghus7xjSqj4E9UNn2VvN76Csqq6XIR+48OYEeGlcAaXhLfQwxNQcgQEI9IErOOxBUuCuDLz9Arm5iyOTaYy7Jty8hAb2VCm43ZmwnwQTbgFpAWyA4SGEKhaMdgYNpngKAcpeMCAfFjYGE4yAqco3RZ0LorUqOkxVkf6AgzvFBPFbISSsOUD+WRrWijpcwbmI4Gomj4yxAIv4bPVU+q9sfxk/EP36UlfP49N3vNWr/m9CZdX/zzjDDofAoW3XHVr9NPHdB8p2+uORl/mjFLUktMbBTtkSJbpLCRxYyD5OpJps/4+DJuvq5IIgoLqfi3pLzcRuloM7QSzKImsBSWG80LVKkxkSvOkFHaCjL5QvrPN9rwvaSVtEg2ICmQCNRQkGjwnlOpNktMxdds+GxcRFrIyCmhTQMEUJjl4qwtzPbAOVC8o0DUZroGiMmBpEUfRBZ4DvRUJC4/1GOpij1ML9XU0PJdFxIZGsOpJkkOQ0YdFh5CPodKl0WfRqQkVUhTIEf1iN4GkdJU4Rx/xsJfHkpfMv4cd+IAUJb1+YdkfSU7NXp6+/bti7qquKiEdfVq0Gl2TO2DonYzAcUTCv0slCB8FuGia/q8j7iAPl30aNIPHVKq55w+00MvjFLo05WmV8H5P9XLzydVF/H0xbGl9UGfjm226B98po2u6fO+0f3H9M7SbT1h+FoS00ybSmm+5/RZHxzbwWvVHtSvNuLRR4BKl0vPtHRhWh1SESUsNBkH0qjvNiAx4MA1JDBc4yBmTPmwJArJCFM+dA1SE5XsmFIqRTzKUrZYkMio78IUkauFoW6Mcbin1GWrOR8nqOEUEUQFmuK3ZdEw6NFg92s9j3XLp0CIsAuS8VdPkcKhCZ9/KAc81x/c3NdzFjy6KHZc0YPNh7VhDg9jYnh4co9n2dvx1nLalys7Rimx2xLGigfEJBQ0Xr149FkBVb04BQiTlPAFbTiDxRGKM1pJf5AgarPKG0sQu413N07hkCANO5m0fSebtCwziW5DqMISHTRMJCDF23inYbmsauNCHq+Vn1ta5dErzKN8psP/RiIXVpAegKJQ30Y06AQSEXdAIpdL0wbTNsLpoSIeCwRJHZYBpTusIFAIlPC0iqL5AxoCcmLPQkkLdITRCc0dSFqQD1A51g4pLOXmhZCwDMO2BpH9q6ZtDoU4oKQIy5yEynFnv+mzw+0+/q3Sf5yT4aYs89zq1alLIK7wYeQANcCpgW5AOaqIARzxcudrXrMTz+cuFAxBI1Rw06eLKz3xsnDikt+Mmr9mWBlXrbySeJAlTt8MXJImXHRNv0zx2GpWZ3r0KKqzXHlRHH26+fQf+mkbg56ADjppUuihMJl7BEhGtmnj+4Phj1lEUAzjaQcgJkzcqPPmlI/yjdJV8Trf/+hbeYyP0uMS0zSVF8SEaSELxkhR6a7IC1IVHkNMBWEkCljxYQ7YXgWKrDCHw2ohJDDKSkr5Tst3TANBp7DdgkTFKSOpxYMtV2i3hXQoJjwbBo3L4oibAajdXmSbCl01PEvi6x3PetMvwfi3cv+xHpPRk8GZvo6Oq5y5FvZlvtfqQZ5v5igfH7iRdHqrn/H24McyEb6ejCUxkCwqEATi8JDNKtWRIxI6wrLj+aOyQgIqLT/KTZ+OLYnCFGHE60PdSgzIgVmcfrbt5evjYkB97VeNyv8plx/UYoChElhYgB7KtD3PAUWRpejIVNzNAjNzyDuYRqnrMF5dIx4CkTrlAJQRps2FhZIX5lqYwfFLOygTBeSmkUhDEgNvIC7MR5ML6JhozoCpn+858G1utbH4j7BRT0Z9VlZzbTyOKJCKeCjkqYbkFBJh+DXCPVcKuXKIFURlm8WBoZSFOBCYmk6i33ioT+Kw1CegEMspcFfe+M8+rRySNum/YUwm9I7TPT04NWOBDg/nwtz16xMbEp3mPswIOuI6G7wBSlynz1pQWZEIP0smIcEEWN3QsfJDn+nj9FFSPh73wilgdE2f+eOumo4pPqWI2kI/LKu4RVXLq7H/kJopRUFhnkj4joNT9KC/BlZgAIVD1I+cwASVUBgCIsF1KEQxJLpGPKHGP5LYrAs5ikREnmJ61KF4K5cG1+REVS6HC1JauGroYYcOrLWUEp6MSF0UpoZgK5hV2dgEzeNLYbMBnRQZEUPnOwGMT6GOp57Kg/0WTCMYjnsQHpDmlJFTR5IcNt/alvV1PdF5NsKcLSpGG03L6QcjnWDpeIXqgFYb//A9wGi1+fMPDeqY7nae6uvT530KKp+JebkhHJyX6Fqz33X83tCgRr1d6gXBH+XnFtEwDmEVMBfAtbK7UvHxVTb1gGLQokbFVBZMDtUJHmT+dsPxmqSRU2nkrxkWxhfbOfEVwLov4sIaonSRr1qZy6vy8xliPbn+qPjYHxSm6mJwdB357DfaVtJ/BMLeW0/ayVQSR6TA5AB7h8kwmFeRrFBUSFYkJk7GsM+F5SuiCQmFBEriCskHYcxfEM9ozBjBS/yaKD//rBzndjD3BHswAcmqwFdhOWGugCw5owwpEt9sxMlVGWQEK4GlcAOi1XAcL6eLICfdcMFmNDnH7xdO/YTCHTkxM2B6EiSPbuXmHrZO5eJy4Iu6lfo2Gu8orFfA+PM9UMjnHpBIx9v+/Q9Wm8nMfcMTE1d7u7vP4Ec6fzy1wqOGP3xI63JHjgT2/rsy/boTbMP0pe78dVUWS5wjK0VUjIqNN3kA62ZYeIcfxofXDFNFUZBTT4W6m71mWBlXrb4yWSoEYWh0jVIUdJEmzA6o18mRDN7dCplCEkK8IiP4WRAU9OO8j5wimZB3SAhKYlJEphLkJCaSEP7PEdxsfVG5UWFxP6qPPngTlvBED6IWLN8dTPmg8ocFPPRXWBdlFWqqCEmLlhAgLRtKdLaAkpQNfRUM6DUQGOUiTimNEaT7FvRVw/F6K91XG4/mHf9KPaovvJ36jzfSS1mpc6mUdhnvhZL4a0GjZsKBKK+n0+kt0AHvztCAsIzjeeAeUKVPF1l101cBWCICxcGmcPalUeHRnyguIsJYej79fFnpKxdjrKhu+spVK69Ke+OW6SXlh7Xk/8b7D5umJKY6nUiQAEmp5ZKoD5Ay8kTFzcAsJIrL+ZREYCWAaU4ubXRNP8wfpuSuGubHMwCJhSuGPCiYJIMw5GV6xkfY0Wd+WoPiBAlEhvnzNluw3SKZYTkQHIQ5J1RQDg7Lw/QQGUIdFp4wcC9KgQ/7KkxjucEHROVmc3ZaCFfEjMxUvlPvBZ0WhT1Q1zG06hQKyGPA9qEh4bPRJuO/0p//WvoPyXpa77BPr9L1mn64QiJRT0vlP3jg1oyn0/th1dnN6VOkQyh8wVRuPpLUH9GHi+sckD4vLaj43NSHLwfv8cKjbGxdgc97JUpFpIRbpovKYHTUltkpHYkyEqNYf1gWfZU+Vn+JiMZERS4qKyTAMv1hmwoItLT/aL6OL9cn8A4mknhDkR5CUuh43ExhAXjnIQVxRQ9UwnU1JM73meHISINzlY/1Ir3jwNQBtui5IpU3K2mFZbEUEhgJiHlZhkqI8rws7hPFxBHlZ5romu1CGRSv2HyQEQiLPkwefJcSk2o0mU+F8Z46KswbKd8qvRUWiq7BsuoYlF/q+Jd839p4/KNnFHhw+Fbc819r/y3dHO7qsk9D2lLPBvEq59SLXC6CYSCq1OTk5F48g+FxLyQSvvyzhFK8taaYL1ACiYdkkSOg/HVO4irmAySLlR8+yHy5wnaWysTF7YmnRxdyecMXFDcxx3KjNCUEGUtb2r4Iixwh5qebxEG58v2Hkh0ERqlLp5kClNLkngLSyF8XExrZi089SYbFm9DRg1FCbEKyoxQE8sqFkTOgTwrDVIPCP/k8qpRcGrxMEXmxnpwjUeXbhjpgA2bBNsp0HPQWOiwNOnddw5YcNIdSFyzTlUKehEbrLDxDNn7osjCXPw5FO22qgPfKHn/pf8XxxxetvSvYlX8BxBVKCdGDmPPDhz0W+Oijjxof//jHt+Hh2oko/qKqFx4l0BJQmQIwS3RNn/fxZXqGFbq4nQzimI9tKFs+S1S1KJ9XoQkEfUQwtKg98fSzefMMwmx5F28/IqK2RLjM2b54/gX0H0v6+IiDZSVgHJogfYWNzDMUpCtsUkKg4pKIUJAsnNTlkjNWzfBCPMOhi8JAiCSqPBmyMFVQ1OdctQwLywNZ5cPCpDl80D6IhjzBASQF0sUeREpSJCyE4ceSpJXbEO2612AHepaTSRn/YrtEAD3n8xV/ntv4+S96nyGRO9gccQZmEPiBK3bRi5kPHcG+v2T32n2+53bxNY8oQyWIB0SR9OmqxMeTh5lm/8azx8srEbCQNSqTpUTX+eagwCiPqiWeQAXO/olHV2tPaYUFjWCxsQJjt7MV564K6iOB2Xj1adNGa3PqDMFl4XwSSnAQCUIibqFPlwtTwbiOkoSR+JvLx3KYv9BXaSrlLyifSegQBNMFTAWhiIeFArRZnoX+8Y2EzKhbnuNlYO9wFpZXkwoH5Kmj/6qOFTz+0n8+Y4Y/2pVIcJqY35+YJ6wjEN33ZzL9kPY3hWjx6Sv+RcByLIQAZZYQJSn2C944FRF/QkvjQ31XZDcV04GVPOGl+WdJEhVGbaNPV3d7Va7ZP83U/1ACgzTjkg4gjUFvHhGWkrPAPnnBLNeFSEKKfAbzOu9yBAUdVj6cZURpZuU3XOUILioD93x2IEnxxFGc9c6M+M93cHSNZVzHquBQDeMn4x898wQ2us7pgGvAbyU8/z5e5EupVEqtJirCgp4KHxVI7sbrQIYKHyKF3+yvIvEEX8FsQNk9qXwgBpgQwNo7p9OKrukzfdzF08+WTmYrV35YF+tU8bEpYImInGtLVH+8PkzZ8iQcVpjrawXCLOHH5uo/9JmWjbXHJMQcNhVW8bOklbsumnJw7Q+cgtVK2mJxAUNNKKncp54KHuzAwnjCE01B1UIHA1A80ik/IkdIfTj6mE8MXh2sSKZhdHUd+IcDykwFLj4eMv7Fv+il75c8/xEmeHaojD+jZ4LgbsPVVvO5iutg4oSAFCCiAqVp/jrUKRU8mzVexsube05ff3tiD0Q1wkP/ojrYgeiaftiheHsjLKL4GrudTxYvb0H9h94bpzeAwCD4cAqJf5SmlBjFH5D8ChVC1Q8KyIkrjtgbE64y4lqtINJHel5Hq4q4ZdsYzsWBWaU+rkFWtFzQbiNNnWciNbT/qD4+Hitq/FdE/3mWzmvQU+W4hZZPenQuRHRNfylcvfVjpUqz0Tj6dNE1/fm4euufTx1z5am3/hr6z6lj9A9ElneKwPJ3IYEVEpqKys0YFeUhoDBP4TV/+bjVIkfqKuu8/ixC/+tqR73111V4DYnrrb+G8a+h1tkk9dY/m7MxV7XUzwdP3ApBgCYG6Co+L6/+kcB4X0g0ERFFzwXjojBc5q8ZhqOKtWEoROmLEwSWBIHowVySyqSS5kIABEYhisRFEov8SgRWGD6K9OMgq8IwBIkTBBYXASGsxcW3pUoHgfF5iIiLPv9x+03kuLxMqaqsUj1KJL4gsFgICGEtFrJtUG6OwDhtJHHhqLOl+dBAG0AnXRAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBAFBQBAQBAQBQUAQEAQEAUFAEBAEBIGVhMD/D0fV/fpMMM+gAAAAAElFTkSuQmCC" } }; const NoticeBar = { // noticeBar noticeBar: { text: [], direction: "row", step: false, icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", speed: 80, fontSize: 14, duration: 2e3, disableTouch: true, url: "", linkType: "navigateTo", justifyContent: "flex-start" } }; const Notify = { // notify组件 notify: { top: 0, type: "primary", color: "#ffffff", bgColor: "", message: "", duration: 3e3, fontSize: 15, safeAreaInsetTop: false } }; const NumberBox = { // 步进器组件 numberBox: { name: "", value: 0, min: 1, max: Number.MAX_SAFE_INTEGER, step: 1, integer: false, disabled: false, disabledInput: false, asyncChange: false, inputWidth: 35, showMinus: true, showPlus: true, decimalLength: null, longPress: true, color: "#323233", buttonWidth: 30, buttonSize: 30, buttonRadius: "0px", bgColor: "#EBECEE", disabledBgColor: "#f7f8fa", inputBgColor: "#EBECEE", cursorSpacing: 100, disableMinus: false, disablePlus: false, iconStyle: "", miniMode: false } }; const NumberKeyboard = { // 数字键盘 numberKeyboard: { mode: "number", dotDisabled: false, random: false } }; const Overlay = { // overlay组件 overlay: { show: false, zIndex: 10070, duration: 300, opacity: 0.5 } }; const Parse = { // parse parse: { copyLink: true, errorImg: "", lazyLoad: false, loadingImg: "", pauseVideo: true, previewImg: true, setTitle: true, showImgMenu: true } }; const Picker = { // picker picker: { show: false, popupMode: "bottom", showToolbar: true, title: "", columns: [], loading: false, itemHeight: 44, cancelText: t$1("up.common.cancel"), confirmText: t$1("up.common.confirm"), cancelColor: "#909193", confirmColor: "", visibleItemCount: 5, keyName: "text", valueName: "value", closeOnClickOverlay: false, defaultIndex: [], immediateChange: true, zIndex: 10076, disabled: false, disabledColor: "", placeholder: t$1("up.common.pleaseChoose"), inputProps: {}, bgColor: "", round: 0, duration: 300, overlayOpacity: 0.5, pageInline: false } }; const Popup = { // popup组件 popup: { show: false, overlay: true, mode: "bottom", duration: 300, closeable: false, overlayStyle: {}, closeOnClickOverlay: true, zIndex: 10075, safeAreaInsetBottom: true, safeAreaInsetTop: false, closeIconPos: "top-right", round: 0, zoom: true, bgColor: "", overlayOpacity: 0.5, pageInline: false } }; const Radio = { // radio组件 radio: { name: "", shape: "", disabled: "", labelDisabled: "", activeColor: "", inactiveColor: "", iconSize: "", labelSize: "", label: "", labelColor: "", size: "", iconColor: "", placement: "" } }; const RadioGroup = { // radio-group组件 radioGroup: { value: "", disabled: false, shape: "circle", activeColor: "#2979ff", inactiveColor: "#c8c9cc", name: "", size: 18, placement: "row", label: "", labelColor: "#303133", labelSize: 14, labelDisabled: false, iconColor: "#ffffff", iconSize: 12, borderBottom: false, iconPlacement: "left", gap: "10px" } }; const Rate = { // rate组件 rate: { value: 1, count: 5, disabled: false, size: 18, inactiveColor: "#b2b2b2", activeColor: "#FA3534", gutter: 4, minCount: 1, allowHalf: false, activeIcon: "star-fill", inactiveIcon: "star", touchable: true } }; const ReadMore = { // readMore readMore: { showHeight: 400, toggle: false, closeText: t$1("up.readMore.expand"), openText: t$1("up.readMore.fold"), color: "#2979ff", fontSize: 14, textIndent: "2em", name: "" } }; const Row = { // row row: { gutter: 0, justify: "start", align: "center" } }; const RowNotice = { // rowNotice rowNotice: { text: "", icon: "volume", mode: "", color: "#f9ae3d", bgColor: "#fdf6ec", fontSize: 14, speed: 80 } }; const ScrollList = { // scrollList scrollList: { indicatorWidth: 50, indicatorBarWidth: 20, indicator: true, indicatorColor: "#f2f2f2", indicatorActiveColor: "#3c9cff", indicatorStyle: "" } }; const Search = { // search search: { shape: "round", bgColor: "#f2f2f2", placeholder: t$1("up.search.placeholder"), clearabled: true, focus: false, showAction: true, actionStyle: {}, actionText: t$1("up.common.search"), inputAlign: "left", inputStyle: {}, disabled: false, borderColor: "transparent", searchIconColor: "#909399", searchIconSize: 22, color: "#606266", placeholderColor: "#909399", searchIcon: "search", iconPosition: "left", margin: "0", animation: false, value: "", maxlength: "-1", height: 32, label: null } }; const Section = { // u-section组件 section: { title: "", subTitle: t$1("up.common.more"), right: true, fontSize: 15, bold: true, color: "#303133", subColor: "#909399", showLine: true, lineColor: "", arrow: true } }; const Skeleton = { // skeleton skeleton: { loading: true, animate: true, rows: 0, rowsWidth: "100%", rowsHeight: 18, title: true, titleWidth: "50%", titleHeight: 18, avatar: false, avatarSize: 32, avatarShape: "circle" } }; const Slider = { // slider组件 slider: { value: 0, blockSize: 18, min: 0, max: 100, step: 1, activeColor: "#2979ff", inactiveColor: "#c0c4cc", blockColor: "#ffffff", showValue: false, disabled: false, blockStyle: {}, useNative: false, height: "2px", innerStyle: {} } }; const StatusBar = { // statusBar statusBar: { bgColor: "transparent", height: 0 } }; const Steps = { // steps组件 steps: { direction: "row", current: 0, activeColor: "#3c9cff", inactiveColor: "#969799", activeIcon: "", inactiveIcon: "", dot: false } }; const StepsItem = { // steps-item组件 stepsItem: { title: "", desc: "", iconSize: 17, error: false } }; const Sticky = { // sticky组件 sticky: { offsetTop: 0, customNavHeight: 0, disabled: false, bgColor: "transparent", zIndex: "", index: "" } }; const Subsection = { // subsection组件 subsection: { list: [], current: 0, activeColor: "#3c9cff", inactiveColor: "#303133", mode: "button", fontSize: 12, bold: true, bgColor: "#eeeeef", keyName: "name", activeColorKeyName: "activeColorKey", inactiveColorKeyName: "inactiveColorKey", disabled: false } }; const SwipeAction = { // swipe-action组件 swipeAction: { autoClose: true } }; const SwipeActionItem = { // swipeActionItem 组件 swipeActionItem: { show: false, closeOnClick: true, name: "", disabled: false, threshold: 20, autoClose: true, options: [], duration: 300 } }; const Swiper = { // swiper 组件 swiper: { list: [], indicator: false, indicatorActiveColor: "#FFFFFF", indicatorInactiveColor: "rgba(255, 255, 255, 0.35)", indicatorStyle: "", indicatorMode: "line", autoplay: true, current: 0, currentItemId: "", interval: 3e3, duration: 300, circular: false, previousMargin: 0, nextMargin: 0, acceleration: false, displayMultipleItems: 1, easingFunction: "default", keyName: "url", imgMode: "aspectFill", height: 130, bgColor: "#f3f4f6", radius: 4, loading: false, showTitle: false } }; const SwipterIndicator = { // swiperIndicator 组件 swiperIndicator: { length: 0, current: 0, indicatorActiveColor: "", indicatorInactiveColor: "", indicatorMode: "line" } }; const Switch = { // switch switch: { loading: false, disabled: false, size: 25, activeColor: "#2979ff", inactiveColor: "#ffffff", value: false, activeValue: true, inactiveValue: false, asyncChange: false, space: 0 } }; const Tabbar = { // tabbar tabbar: { value: null, safeAreaInsetBottom: true, border: true, zIndex: 1, activeColor: "#1989fa", inactiveColor: "#7d7e80", fixed: true, placeholder: true, borderColor: "", backgroundColor: "" } }; const TabbarItem = { // tabbarItem: { name: null, icon: "", badge: null, dot: false, text: "", badgeStyle: "top: 6px;right:2px;", mode: "" } }; const Tabs = { // tabs: { duration: 300, list: [], lineColor: "", activeStyle: { color: "#303133" }, inactiveStyle: { color: "#606266" }, lineWidth: 20, lineHeight: 3, lineBgSize: "cover", itemStyle: { height: "44px" }, scrollable: true, current: 0, keyName: "name", iconStyle: {} } }; const Tag = { // tag 组件 tag: { type: "primary", disabled: false, size: "medium", shape: "square", text: "", bgColor: "", color: "", borderColor: "", closeColor: "#C6C7CB", name: "", plainFill: false, plain: false, closable: false, show: true, icon: "", iconColor: "", textSize: "", height: "", padding: "", borderRadius: "", autoBgColor: 0 } }; const Text = { // text 组件 text: { type: "", show: true, text: "", prefixIcon: "", suffixIcon: "", mode: "", href: "", format: "", call: false, openType: "", bold: false, block: false, lines: "", color: "#303133", size: 15, iconStyle: { fontSize: "15px" }, decoration: "none", margin: 0, lineHeight: "", align: "left", wordWrap: "normal", flex1: true } }; const Textarea = { // textarea 组件 textarea: { value: "", placeholder: "", placeholderClass: "textarea-placeholder", placeholderStyle: "color: #c0c4cc", height: 70, confirmType: "done", disabled: false, count: false, focus: false, autoHeight: false, fixed: false, cursorSpacing: 0, cursor: "", showConfirmBar: true, selectionStart: -1, selectionEnd: -1, adjustPosition: true, disableDefaultPadding: false, holdKeyboard: false, maxlength: 140, border: "surround", formatter: null } }; const Toast = { // toast组件 toast: { zIndex: 10090, loading: false, message: "", icon: "", type: "", loadingMode: "", show: "", overlay: false, position: "center", params: {}, duration: 2e3, isTab: false, url: "", callback: null, back: false } }; const Toolbar = { // toolbar 组件 toolbar: { show: true, cancelText: t$1("up.common.cancel"), confirmText: t$1("up.common.confirm"), cancelColor: "#909193", confirmColor: "", title: "" } }; const Tooltip = { // tooltip 组件 tooltip: { text: "", copyText: "", size: 14, color: "#606266", bgColor: "transparent", direction: "top", zIndex: 10071, showCopy: true, buttons: [], overlay: true, showToast: true, popupBgColor: "", triggerMode: "longpress" } }; const Transition = { // transition动画组件的props transition: { show: false, mode: "fade", duration: "300", timingFunction: "ease-out" } }; const Upload = { // upload组件 upload: { accept: "image", extension: [], capture: ["album", "camera"], compressed: true, camera: "back", maxDuration: 60, uploadIcon: "camera-fill", uploadIconColor: "#D3D4D6", useBeforeRead: false, previewFullImage: true, maxCount: 52, disabled: false, imageMode: "aspectFill", name: "", sizeType: ["original", "compressed"], multiple: false, deletable: true, maxSize: Number.MAX_VALUE, fileList: [], uploadText: "", width: 80, height: 80, previewImage: true, autoDelete: false, autoUpload: false, autoUploadApi: "", autoUploadAuthUrl: "", autoUploadDriver: "", autoUploadHeader: {}, getVideoThumb: false, customAfterAutoUpload: false, videoPreviewObjectFit: "cover" } }; const props$1x = { ...ActionSheet, ...Album, ...Alert, ...Avatar, ...AvatarGroup, ...Backtop, ...Badge, ...Button, ...Calendar$1, ...CarKeyboard, ...Card, ...Cell, ...CellGroup, ...Checkbox, ...CheckboxGroup, ...CircleProgress, ...Code, ...CodeInput, ...Col, ...Collapse, ...CollapseItem, ...ColumnNotice, ...CountDown, ...CountTo, ...DatetimePicker, ...Divider, ...Empty, ...Form, ...GormItem, ...Gap, ...Grid, ...GridItem, ...Icon, ...Image$1, ...IndexAnchor, ...IndexList, ...Input, ...Keyboard, ...Line, ...LineProgress, ...Link, ...List, ...ListItem, ...LoadingIcon, ...LoadingPage, ...Loadmore, ...Modal, ...Navbar, ...NoNetwork, ...NoticeBar, ...Notify, ...NumberBox, ...NumberKeyboard, ...Overlay, ...Parse, ...Picker, ...Popup, ...Radio, ...RadioGroup, ...Rate, ...ReadMore, ...Row, ...RowNotice, ...ScrollList, ...Search, ...Section, ...Skeleton, ...Slider, ...StatusBar, ...Steps, ...StepsItem, ...Sticky, ...Subsection, ...SwipeAction, ...SwipeActionItem, ...Swiper, ...SwipterIndicator, ...Switch, ...Tabbar, ...TabbarItem, ...Tabs, ...Tag, ...Text, ...Textarea, ...Toast, ...Toolbar, ...Tooltip, ...Transition, ...Upload }; function setConfig$1(configs) { shallowMerge(config$1, configs.config || {}); shallowMerge(props$1x, configs.props || {}); shallowMerge(color$3, configs.color || {}); shallowMerge(zIndex, configs.zIndex || {}); } if (uni && uni.upuiParams) { formatAppLog("log", "at uni_modules/uview-plus/libs/config/props.js:206", "setting uview-plus"); let temp = uni.upuiParams(); if (temp.httpIns) { temp.httpIns(http); } if (temp.options) { setConfig$1(temp.options); } } const props$1w = defineMixin({ props: { color: { type: String, default: () => props$1x.line.color }, // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 length: { type: [String, Number], default: () => props$1x.line.length }, // 线条方向,col-竖向,row-横向 direction: { type: String, default: () => props$1x.line.direction }, // 是否显示细边框 hairline: { type: Boolean, default: () => props$1x.line.hairline }, // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px" margin: { type: [String, Number], default: () => props$1x.line.margin }, // 是否虚线,true-虚线,false-实线 dashed: { type: Boolean, default: () => props$1x.line.dashed } } }); const mpMixin = defineMixin({}); class Router { constructor() { this.config = { type: "navigateTo", url: "", delta: 1, // navigateBack页面后退时,回退的层数 params: {}, // 传递的参数 animationType: "pop-in", // 窗口动画,只在APP有效 animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效 intercept: false // 是否需要拦截 }; this.route = this.route.bind(this); } // 判断url前面是否有"/",如果没有则加上,否则无法跳转 addRootPath(url2) { return url2[0] === "/" ? url2 : `/${url2}`; } // 整合路由参数 mixinParam(url2, params2) { url2 = url2 && this.addRootPath(url2); let query = ""; if (/.*\/.*\?.*=.*/.test(url2)) { query = queryParams(params2, false); return url2 += `&${query}`; } query = queryParams(params2); return url2 += query; } // 对外的方法名称 async route(options2 = {}, params2 = {}) { let mergeConfig2 = {}; if (typeof options2 === "string") { mergeConfig2.url = this.mixinParam(options2, params2); mergeConfig2.type = "navigateTo"; } else { mergeConfig2 = deepMerge$1(this.config, options2); mergeConfig2.url = this.mixinParam(options2.url, options2.params); } if (mergeConfig2.url === page()) return; if (params2.intercept) { this.config.intercept = params2.intercept; } mergeConfig2.params = params2; mergeConfig2 = deepMerge$1(this.config, mergeConfig2); if (typeof uni.$u.routeIntercept === "function") { const isNext = await new Promise((resolve, reject) => { uni.$u.routeIntercept(mergeConfig2, resolve); }); isNext && this.openPage(mergeConfig2); } else { this.openPage(mergeConfig2); } } // 执行路由跳转 openPage(config2) { const { url: url2, type: type2, delta, animationType, animationDuration } = config2; if (config2.type == "navigateTo" || config2.type == "to") { uni.navigateTo({ url: url2, animationType, animationDuration }); } if (config2.type == "redirectTo" || config2.type == "redirect") { uni.redirectTo({ url: url2 }); } if (config2.type == "switchTab" || config2.type == "tab") { uni.switchTab({ url: url2 }); } if (config2.type == "reLaunch" || config2.type == "launch") { uni.reLaunch({ url: url2 }); } if (config2.type == "navigateBack" || config2.type == "back") { uni.navigateBack({ delta }); } } } const route = new Router().route; const mixin = defineMixin({ // 定义每个组件都可能需要用到的外部样式以及类名 props: { // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式 customStyle: { type: [Object, String], default: () => ({}) }, customClass: { type: String, default: "" }, // 跳转的页面路径 url: { type: String, default: "" }, // 页面跳转的类型 linkType: { type: String, default: "navigateTo" } }, data() { return {}; }, onLoad() { this.$u.getRect = this.$uGetRect; }, created() { this.$u.getRect = this.$uGetRect; }, computed: { // 在2.x版本中,将会把$u挂载到uni对象下,导致在模板中无法使用uni.$u.xxx形式 // 所以这里通过computed计算属性将其附加到this.$u上,就可以在模板或者js中使用uni.$u.xxx // 只在nvue环境通过此方式引入完整的$u,其他平台会出现性能问题,非nvue则按需引入(主要原因是props过大) $u() { return deepMerge$1(uni.$u, { props: void 0, http: void 0, mixin: void 0 }); }, /** * 生成bem规则类名 * 由于微信小程序,H5,nvue之间绑定class的差异,无法通过:class="[bem()]"的形式进行同用 * 故采用如下折中做法,最后返回的是数组(一般平台)或字符串(支付宝和字节跳动平台),类似['a', 'b', 'c']或'a b c'的形式 * @param {String} name 组件名称 * @param {Array} fixed 一直会存在的类名 * @param {Array} change 会根据变量值为true或者false而出现或者隐藏的类名 * @returns {Array|string} */ bem() { return function(name2, fixed, change) { const prefix = `u-${name2}--`; const classes = {}; if (fixed) { fixed.map((item) => { classes[prefix + this[item]] = true; }); } if (change) { change.map((item) => { this[item] ? classes[prefix + item] = this[item] : delete classes[prefix + item]; }); } return Object.keys(classes); }; } }, methods: { // 跳转某一个页面 openPage(urlKey = "url") { const url2 = this[urlKey]; if (url2) { route({ type: this.linkType, url: url2 }); } }, navTo(url2 = "", linkType = "navigateTo") { route({ type: this.linkType, url: url2 }); }, // 查询节点信息 // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21) // 解决办法为在组件根部再套一个没有任何作用的view元素 $uGetRect(selector, all) { return new Promise((resolve) => { uni.createSelectorQuery().in(this)[all ? "selectAll" : "select"](selector).boundingClientRect((rect) => { if (all && Array.isArray(rect) && rect.length) { resolve(rect); } if (!all && rect) { resolve(rect); } }).exec(); }); }, getParentData(parentName = "") { if (!this.parent) this.parent = {}; this.parent = $parent.call(this, parentName); if (this.parent.children) { this.parent.children.indexOf(this) === -1 && this.parent.children.push(this); } if (this.parent && this.parentData) { Object.keys(this.parentData).map((key) => { this.parentData[key] = this.parent[key]; }); } }, // 阻止事件冒泡 preventEvent(e2) { e2 && typeof e2.stopPropagation === "function" && e2.stopPropagation(); }, // 空操作 noop(e2) { this.preventEvent(e2); } }, onReachBottom() { uni.$emit("uOnReachBottom"); }, beforeUnmount() { if (this.parent && test.array(this.parent.children)) { const childrenList = this.parent.children; childrenList.map((child, index2) => { if (child === this) { childrenList.splice(index2, 1); } }); } } }); const _sfc_main$2d = { name: "u-line", mixins: [mpMixin, mixin, props$1w], computed: { lineStyle() { const style = {}; style.margin = this.margin; if (this.direction === "row") { style.borderBottomWidth = "1px"; style.borderBottomStyle = this.dashed ? "dashed" : "solid"; style.width = addUnit(this.length); if (this.hairline) style.transform = "scaleY(0.5)"; } else { style.borderLeftWidth = "1px"; style.borderLeftStyle = this.dashed ? "dashed" : "solid"; style.height = addUnit(this.length); if (this.hairline) style.transform = "scaleX(0.5)"; } style.borderColor = this.color; return deepMerge$1(style, addStyle(this.customStyle)); } } }; function _sfc_render$2c(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-line", style: vue.normalizeStyle([$options.lineStyle]) }, null, 4 /* STYLE */ ); } const __easycom_1$4 = /* @__PURE__ */ _export_sfc(_sfc_main$2d, [["render", _sfc_render$2c], ["__scopeId", "data-v-72791e59"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-line/u-line.vue"]]); const __vite_glob_0_55 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_1$4 }, Symbol.toStringTag, { value: "Module" })); const props$1v = defineMixin({ props: { // 是否显示组件 show: { type: Boolean, default: () => props$1x.loadingIcon.show }, // 颜色 color: { type: String, default: () => props$1x.loadingIcon.color }, // 提示文字颜色 textColor: { type: String, default: () => props$1x.loadingIcon.textColor }, // 文字和图标是否垂直排列 vertical: { type: Boolean, default: () => props$1x.loadingIcon.vertical }, // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 mode: { type: String, default: () => props$1x.loadingIcon.mode }, // 图标大小,单位默认px size: { type: [String, Number], default: () => props$1x.loadingIcon.size }, // 文字大小 textSize: { type: [String, Number], default: () => props$1x.loadingIcon.textSize }, // 文字内容 text: { type: [String, Number], default: () => props$1x.loadingIcon.text }, // 动画模式 timingFunction: { type: String, default: () => props$1x.loadingIcon.timingFunction }, // 动画执行周期时间 duration: { type: [String, Number], default: () => props$1x.loadingIcon.duration }, // mode=circle时的暗边颜色 inactiveColor: { type: String, default: () => props$1x.loadingIcon.inactiveColor } } }); function colorGradient(startColor = "rgb(0, 0, 0)", endColor = "rgb(255, 255, 255)", step = 10) { const startRGB = hexToRgb(startColor, false); const startR = startRGB[0]; const startG = startRGB[1]; const startB = startRGB[2]; const endRGB = hexToRgb(endColor, false); const endR = endRGB[0]; const endG = endRGB[1]; const endB = endRGB[2]; const sR = (endR - startR) / step; const sG = (endG - startG) / step; const sB = (endB - startB) / step; const colorArr = []; for (let i2 = 0; i2 < step; i2++) { let hex = rgbToHex(`rgb(${Math.round(sR * i2 + startR)},${Math.round(sG * i2 + startG)},${Math.round(sB * i2 + startB)})`); if (i2 === 0) hex = rgbToHex(startColor); if (i2 === step - 1) hex = rgbToHex(endColor); colorArr.push(hex); } return colorArr; } function hexToRgb(sColor, str = true) { const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; sColor = String(sColor).toLowerCase(); if (sColor && reg.test(sColor)) { if (sColor.length === 4) { let sColorNew = "#"; for (let i2 = 1; i2 < 4; i2 += 1) { sColorNew += sColor.slice(i2, i2 + 1).concat(sColor.slice(i2, i2 + 1)); } sColor = sColorNew; } const sColorChange = []; for (let i2 = 1; i2 < 7; i2 += 2) { sColorChange.push(parseInt(`0x${sColor.slice(i2, i2 + 2)}`)); } if (!str) { return sColorChange; } return `rgb(${sColorChange[0]},${sColorChange[1]},${sColorChange[2]})`; } if (/^(rgb|RGB)/.test(sColor)) { const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); return arr.map((val) => Number(val)); } return sColor; } function rgbToHex(rgb) { const _this = rgb; const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; if (/^(rgb|RGB)/.test(_this)) { const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(","); let strHex = "#"; for (let i2 = 0; i2 < aColor.length; i2++) { let hex = Number(aColor[i2]).toString(16); hex = String(hex).length == 1 ? `${0}${hex}` : hex; if (hex === "0") { hex += hex; } strHex += hex; } if (strHex.length !== 7) { strHex = _this; } return strHex; } if (reg.test(_this)) { const aNum = _this.replace(/#/, "").split(""); if (aNum.length === 6) { return _this; } if (aNum.length === 3) { let numHex = "#"; for (let i2 = 0; i2 < aNum.length; i2 += 1) { numHex += aNum[i2] + aNum[i2]; } return numHex; } } else { return _this; } } function colorToRgba(color2, alpha) { color2 = rgbToHex(color2); const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; let sColor = String(color2).toLowerCase(); if (sColor && reg.test(sColor)) { if (sColor.length === 4) { let sColorNew = "#"; for (let i2 = 1; i2 < 4; i2 += 1) { sColorNew += sColor.slice(i2, i2 + 1).concat(sColor.slice(i2, i2 + 1)); } sColor = sColorNew; } const sColorChange = []; for (let i2 = 1; i2 < 7; i2 += 2) { sColorChange.push(parseInt(`0x${sColor.slice(i2, i2 + 2)}`)); } return `rgba(${sColorChange.join(",")},${alpha})`; } return sColor; } const colorGradient$1 = { colorGradient, hexToRgb, rgbToHex, colorToRgba }; const _sfc_main$2c = { name: "u-loading-icon", mixins: [mpMixin, mixin, props$1v], data() { return { // Array.form可以通过一个伪数组对象创建指定长度的数组 // https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/from array12: Array.from({ length: 12 }), // 这里需要设置默认值为360,否则在安卓nvue上,会延迟一个duration周期后才执行 // 在iOS nvue上,则会一开始默认执行两个周期的动画 aniAngel: 360, // 动画旋转角度 webviewHide: false, // 监听webview的状态,如果隐藏了页面,则停止动画,以免性能消耗 loading: false // 是否运行中,针对nvue使用 }; }, computed: { // 当为circle类型时,给其另外三边设置一个更轻一些的颜色 // 之所以需要这么做的原因是,比如父组件传了color为红色,那么需要另外的三个边为浅红色 // 而不能是固定的某一个其他颜色(因为这个固定的颜色可能浅蓝,导致效果没有那么细腻良好) otherBorderColor() { const lightColor = colorGradient(this.color, "#ffffff", 100)[80]; if (this.mode === "circle") { return this.inactiveColor ? this.inactiveColor : lightColor; } else { return "transparent"; } } }, watch: { show(n2) { } }, mounted() { this.init(); }, methods: { addUnit, addStyle, init() { setTimeout(() => { this.show && this.addEventListenerToWebview(); }, 20); }, // 监听webview的显示与隐藏 addEventListenerToWebview() { const pages2 = getCurrentPages(); const page2 = pages2[pages2.length - 1]; const currentWebview = page2.$getAppWebview(); currentWebview.addEventListener("hide", () => { this.webviewHide = true; }); currentWebview.addEventListener("show", () => { this.webviewHide = false; }); } } }; function _sfc_render$2b(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-loading-icon", [_ctx.vertical && "u-loading-icon--vertical"]]), style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]) }, [ !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-loading-icon__spinner", [`u-loading-icon__spinner--${_ctx.mode}`]]), ref: "ani", style: vue.normalizeStyle({ color: _ctx.color, width: $options.addUnit(_ctx.size), height: $options.addUnit(_ctx.size), borderTopColor: _ctx.color, borderBottomColor: $options.otherBorderColor, borderLeftColor: $options.otherBorderColor, borderRightColor: $options.otherBorderColor, "animation-duration": `${_ctx.duration}ms`, "animation-timing-function": _ctx.mode === "semicircle" || _ctx.mode === "circle" ? _ctx.timingFunction : "" }) }, [ _ctx.mode === "spinner" ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.array12, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "u-loading-icon__dot" }); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-loading-icon__text", style: vue.normalizeStyle({ fontSize: $options.addUnit(_ctx.textSize), color: _ctx.textColor }) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$e = /* @__PURE__ */ _export_sfc(_sfc_main$2c, [["render", _sfc_render$2b], ["__scopeId", "data-v-2af81691"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-loading-icon/u-loading-icon.vue"]]); const __vite_glob_0_59 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$e }, Symbol.toStringTag, { value: "Module" })); const props$1u = defineMixin({ props: { // 背景颜色(默认transparent) bgColor: { type: String, default: () => props$1x.gap.bgColor }, // 分割槽高度,单位px(默认30) height: { type: [String, Number], default: () => props$1x.gap.height }, // 与上一个组件的距离 marginTop: { type: [String, Number], default: () => props$1x.gap.marginTop }, // 与下一个组件的距离 marginBottom: { type: [String, Number], default: () => props$1x.gap.marginBottom } } }); const _sfc_main$2b = { name: "u-gap", mixins: [mpMixin, mixin, props$1u], computed: { gapStyle() { const style = { backgroundColor: this.bgColor, height: addUnit(this.height), marginTop: addUnit(this.marginTop), marginBottom: addUnit(this.marginBottom) }; return deepMerge$1(style, addStyle(this.customStyle)); } } }; function _sfc_render$2a(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-gap", style: vue.normalizeStyle([$options.gapStyle]) }, null, 4 /* STYLE */ ); } const __easycom_1$3 = /* @__PURE__ */ _export_sfc(_sfc_main$2b, [["render", _sfc_render$2a], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-gap/u-gap.vue"]]); const __vite_glob_0_43 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_1$3 }, Symbol.toStringTag, { value: "Module" })); const props$1t = defineMixin({ props: { // 是否展示组件 show: { type: Boolean, default: () => props$1x.transition.show }, // 使用的动画模式 mode: { type: String, default: () => props$1x.transition.mode }, // 动画的执行时间,单位ms duration: { type: [String, Number], default: () => props$1x.transition.duration }, // 使用的动画过渡函数 timingFunction: { type: String, default: () => props$1x.transition.timingFunction } } }); const getClassNames = (name2) => ({ enter: `u-${name2}-enter u-${name2}-enter-active`, "enter-to": `u-${name2}-enter-to u-${name2}-enter-active`, leave: `u-${name2}-leave u-${name2}-leave-active`, "leave-to": `u-${name2}-leave-to u-${name2}-leave-active` }); const transitionMixin = { methods: { // 组件被点击发出事件 clickHandler() { this.$emit("click"); }, // vue版本的组件进场处理 async vueEnter() { const classNames = getClassNames(this.mode); this.status = "enter"; this.$emit("beforeEnter"); this.inited = true; this.display = true; this.classes = classNames.enter; await vue.nextTick(); { await sleep(20); this.$emit("enter"); this.transitionEnded = false; this.$emit("afterEnter"); this.classes = classNames["enter-to"]; } }, // 动画离场处理 async vueLeave() { if (!this.display) return; const classNames = getClassNames(this.mode); this.status = "leave"; this.$emit("beforeLeave"); this.classes = classNames.leave; await vue.nextTick(); { this.transitionEnded = false; this.$emit("leave"); setTimeout(this.onTransitionEnd, this.duration); this.classes = classNames["leave-to"]; } }, // 完成过渡后触发 onTransitionEnd() { if (this.transitionEnded) return; this.transitionEnded = true; this.$emit(this.status === "leave" ? "afterLeave" : "afterEnter"); if (!this.show && this.display) { this.display = false; this.inited = false; } } } }; const _sfc_main$2a = { name: "u-transition", data() { return { inited: false, // 是否显示/隐藏组件 viewStyle: {}, // 组件内部的样式 status: "", // 记录组件动画的状态 transitionEnded: false, // 组件是否结束的标记 display: false, // 组件是否展示 classes: "" // 应用的类名 }; }, emits: ["click", "beforeEnter", "enter", "afterEnter", "beforeLeave", "leave", "afterLeave"], computed: { mergeStyle() { const { viewStyle, customStyle } = this; return { transitionDuration: `${this.duration}ms`, // display: `${this.display ? '' : 'none'}`, transitionTimingFunction: this.timingFunction, // 避免自定义样式影响到动画属性,所以写在viewStyle前面 ...addStyle(customStyle), ...viewStyle }; } }, // 将mixin挂在到组件中,实际上为一个vue格式对象。 mixins: [mpMixin, mixin, transitionMixin, props$1t], watch: { show: { handler(newVal) { newVal ? this.vueEnter() : this.vueLeave(); }, // 表示同时监听初始化时的props的show的意思 immediate: true } } }; function _sfc_render$29(_ctx, _cache, $props, $setup, $data, $options) { return $data.inited ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-transition", $data.classes]), ref: "u-transition", onClick: _cache[0] || (_cache[0] = (...args) => _ctx.clickHandler && _ctx.clickHandler(...args)), style: vue.normalizeStyle([$options.mergeStyle]), onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.noop && _ctx.noop(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const __easycom_2$1 = /* @__PURE__ */ _export_sfc(_sfc_main$2a, [["render", _sfc_render$29], ["__scopeId", "data-v-5cec8177"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-transition/u-transition.vue"]]); const __vite_glob_0_124 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_2$1 }, Symbol.toStringTag, { value: "Module" })); const props$1s = defineMixin({ props: { // 是否显示遮罩 show: { type: Boolean, default: () => props$1x.overlay.show }, // 层级z-index zIndex: { type: [String, Number], default: () => props$1x.overlay.zIndex }, // 遮罩的过渡时间,单位为ms duration: { type: [String, Number], default: () => props$1x.overlay.duration }, // 不透明度值,当做rgba的第四个参数 opacity: { type: [String, Number], default: () => props$1x.overlay.opacity } } }); const _sfc_main$29 = { name: "u-overlay", mixins: [mpMixin, mixin, props$1s], computed: { overlayStyle() { const style = { position: "fixed", top: 0, left: 0, right: 0, zIndex: this.zIndex, bottom: 0, "background-color": `rgba(0, 0, 0, ${this.opacity})` }; return deepMerge$1(style, addStyle(this.customStyle)); } }, emits: ["click"], methods: { clickHandler() { this.$emit("click"); } } }; function _sfc_render$28(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createBlock(_component_u_transition, { show: _ctx.show, "custom-class": "u-overlay", duration: _ctx.duration, "custom-style": $options.overlayStyle, onClick: $options.clickHandler, onTouchmove: vue.withModifiers(_ctx.noop, ["stop", "prevent"]) }, { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), _: 3 /* FORWARDED */ }, 8, ["show", "duration", "custom-style", "onClick", "onTouchmove"]); } const __easycom_0$d = /* @__PURE__ */ _export_sfc(_sfc_main$29, [["render", _sfc_render$28], ["__scopeId", "data-v-9112bed9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-overlay/u-overlay.vue"]]); const __vite_glob_0_72 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$d }, Symbol.toStringTag, { value: "Module" })); const props$1r = defineMixin({ props: { bgColor: { type: String, default: () => props$1x.statusBar.bgColor }, // 状态栏获取得高度 height: { type: Number, default: () => props$1x.statusBar.height } } }); const _sfc_main$28 = { name: "u-status-bar", mixins: [mpMixin, mixin, props$1r], data() { return { isH5: false }; }, created() { }, emits: ["update:height"], computed: { style() { const style = {}; let sheight = getWindowInfo().statusBarHeight; this.$emit("update:height", sheight); if (sheight == 0) { this.isH5 = true; } else { style.height = addUnit(sheight, "px"); } style.backgroundColor = this.bgColor; return deepMerge$1(style, addStyle(this.customStyle)); } } }; function _sfc_render$27(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle([$options.style]), class: vue.normalizeClass(["u-status-bar", [$data.isH5 && "u-safe-area-inset-top"]]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$c = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["render", _sfc_render$27], ["__scopeId", "data-v-eb8e0cdd"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-status-bar/u-status-bar.vue"]]); const __vite_glob_0_98 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$c }, Symbol.toStringTag, { value: "Module" })); const props$1q = defineMixin({ props: {} }); const _sfc_main$27 = { name: "u-safe-bottom", mixins: [mpMixin, mixin, props$1q], data() { return { safeAreaBottomHeight: 0, isNvue: false }; }, computed: { style() { const style = {}; return deepMerge$1(style, addStyle(this.customStyle)); } }, mounted() { } }; function _sfc_render$26(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-safe-bottom", [!$data.isNvue && "u-safe-area-inset-bottom"]]), style: vue.normalizeStyle([$options.style]) }, null, 6 /* CLASS, STYLE */ ); } const __easycom_0$b = /* @__PURE__ */ _export_sfc(_sfc_main$27, [["render", _sfc_render$26], ["__scopeId", "data-v-f3d22cfe"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-safe-bottom/u-safe-bottom.vue"]]); const __vite_glob_0_90 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$b }, Symbol.toStringTag, { value: "Module" })); const props$1p = defineMixin({ props: { // 是否展示弹窗 show: { type: Boolean, default: () => props$1x.popup.show }, // 是否显示遮罩 overlay: { type: Boolean, default: () => props$1x.popup.overlay }, // 弹出的方向,可选值为 top bottom right left center mode: { type: String, default: () => props$1x.popup.mode }, // 动画时长,单位ms duration: { type: [String, Number], default: () => props$1x.popup.duration }, // 是否显示关闭图标 closeable: { type: Boolean, default: () => props$1x.popup.closeable }, // 自定义遮罩的样式 overlayStyle: { type: [Object, String], default: () => props$1x.popup.overlayStyle }, // 点击遮罩是否关闭弹窗 closeOnClickOverlay: { type: Boolean, default: () => props$1x.popup.closeOnClickOverlay }, // 层级 zIndex: { type: [String, Number], default: () => props$1x.popup.zIndex }, // 是否为iPhoneX留出底部安全距离 safeAreaInsetBottom: { type: Boolean, default: () => props$1x.popup.safeAreaInsetBottom }, // 是否留出顶部安全距离(状态栏高度) safeAreaInsetTop: { type: Boolean, default: () => props$1x.popup.safeAreaInsetTop }, // 自定义关闭图标位置,top-left为左上角,top-right为右上角,bottom-left为左下角,bottom-right为右下角 closeIconPos: { type: String, default: () => props$1x.popup.closeIconPos }, // 是否显示圆角 round: { type: [Boolean, String, Number], default: () => props$1x.popup.round }, // mode=center,也即中部弹出时,是否使用缩放模式 zoom: { type: Boolean, default: () => props$1x.popup.zoom }, // 弹窗背景色,设置为transparent可去除白色背景 bgColor: { type: String, default: () => props$1x.popup.bgColor }, // 遮罩的透明度,0-1之间 overlayOpacity: { type: [Number, String], default: () => props$1x.popup.overlayOpacity }, // 是否页面内展示 pageInline: { type: Boolean, default: () => props$1x.popup.pageInline } } }); const _sfc_main$26 = { name: "u-popup", mixins: [mpMixin, mixin, props$1p], data() { return { overlayDuration: this.duration + 50 }; }, watch: { show(newValue, oldValue) { } }, computed: { transitionStyle() { const style = { display: "flex" }; if (!this.pageInline) { style.zIndex = this.zIndex; style.position = "fixed"; } style[this.mode] = 0; if (this.mode === "left") { return deepMerge$1(style, { bottom: 0, top: 0 }); } else if (this.mode === "right") { return deepMerge$1(style, { bottom: 0, top: 0 }); } else if (this.mode === "top") { return deepMerge$1(style, { left: 0, right: 0 }); } else if (this.mode === "bottom") { return deepMerge$1(style, { left: 0, right: 0 }); } else if (this.mode === "center") { return deepMerge$1(style, { alignItems: "center", "justify-content": "center", top: 0, left: 0, right: 0, bottom: 0 }); } }, contentStyle() { const style = {}; getWindowInfo(); if (this.mode !== "center") { style.flex = 1; } if (this.bgColor) { style.backgroundColor = this.bgColor; } if (this.round) { const value2 = addUnit(this.round); if (this.mode === "top") { style.borderBottomLeftRadius = value2; style.borderBottomRightRadius = value2; } else if (this.mode === "bottom") { style.borderTopLeftRadius = value2; style.borderTopRightRadius = value2; } else if (this.mode === "center") { style.borderRadius = value2; } } return deepMerge$1(style, addStyle(this.customStyle)); }, position() { if (this.mode === "center") { return this.zoom ? "fade-zoom" : "fade"; } if (this.mode === "left") { return "slide-left"; } if (this.mode === "right") { return "slide-right"; } if (this.mode === "bottom") { return "slide-up"; } if (this.mode === "top") { return "slide-down"; } } }, emits: ["open", "close", "click", "update:show"], methods: { // 点击遮罩 overlayClick() { if (this.closeOnClickOverlay) { this.$emit("update:show", false); this.$emit("close"); } }, open(e2) { this.$emit("update:show", true); }, close(e2) { this.$emit("update:show", false); this.$emit("close"); }, afterEnter() { this.$emit("open"); }, clickHandler() { if (this.mode === "center") { this.overlayClick(); } this.$emit("click"); } } }; function _sfc_render$25(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d); const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$c); const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_0$b); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-popup", [_ctx.customClass]]), style: vue.normalizeStyle({ width: _ctx.show == false ? "0px" : "", height: _ctx.show == false ? "0px" : "" }) }, [ vue.createElementVNode("view", { class: "u-popup__trigger" }, [ vue.renderSlot(_ctx.$slots, "trigger", {}, void 0, true), vue.createElementVNode("view", { onClick: _cache[0] || (_cache[0] = (...args) => $options.open && $options.open(...args)), class: "u-popup__trigger__cover" }) ]), _ctx.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, { key: 0, show: _ctx.show && _ctx.pageInline == false, onClick: $options.overlayClick, zIndex: _ctx.zIndex, duration: $data.overlayDuration, customStyle: _ctx.overlayStyle, opacity: _ctx.overlayOpacity }, null, 8, ["show", "onClick", "zIndex", "duration", "customStyle", "opacity"])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_transition, { show: _ctx.show, customStyle: $options.transitionStyle, mode: _ctx.pageInline ? "none" : $options.position, duration: _ctx.duration, onAfterEnter: $options.afterEnter, onClick: $options.clickHandler }, { default: vue.withCtx(() => [ vue.createCommentVNode(" @click.stop不能去除,去除会导致居中模式下点击内容区域触发关闭弹窗 "), vue.createElementVNode( "view", { class: "u-popup__content", style: vue.normalizeStyle([$options.contentStyle]), onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop"])), onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])) }, [ _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), _ctx.closeable ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.close && $options.close(...args), ["stop"])), class: vue.normalizeClass(["u-popup__content__close", ["u-popup__content__close--" + _ctx.closeIconPos]]), "hover-class": "u-popup__content__close--hover", "hover-stay-time": "150" }, [ vue.createVNode(_component_up_icon, { name: "close", color: "#909399", size: "18", bold: "" }) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 2 })) : vue.createCommentVNode("v-if", true) ], 36 /* STYLE, NEED_HYDRATION */ ), vue.renderSlot(_ctx.$slots, "bottom", {}, void 0, true) ]), _: 3 /* FORWARDED */ }, 8, ["show", "customStyle", "mode", "duration", "onAfterEnter", "onClick"]) ], 6 /* CLASS, STYLE */ ); } const __easycom_2 = /* @__PURE__ */ _export_sfc(_sfc_main$26, [["render", _sfc_render$25], ["__scopeId", "data-v-05c24e9b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-popup/u-popup.vue"]]); const __vite_glob_0_79 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_2 }, Symbol.toStringTag, { value: "Module" })); const openType = defineMixin({ props: { openType: String }, methods: { onGetUserInfo(event) { this.$emit("getuserinfo", event.detail); }, onContact(event) { this.$emit("contact", event.detail); }, onGetPhoneNumber(event) { this.$emit("getphonenumber", event.detail); }, onError(event) { this.$emit("error", event.detail); }, onLaunchApp(event) { this.$emit("launchapp", event.detail); }, onOpenSetting(event) { this.$emit("opensetting", event.detail); } } }); const buttonMixin = defineMixin({ props: { lang: String, sessionFrom: String, sendMessageTitle: String, sendMessagePath: String, sendMessageImg: String, showMessageCard: Boolean, appParameter: String, formType: String, openType: String } }); const props$1o = defineMixin({ props: { // 操作菜单是否展示 (默认false) show: { type: Boolean, default: () => props$1x.actionSheet.show }, // 标题 title: { type: String, default: () => props$1x.actionSheet.title }, // 选项上方的描述信息 description: { type: String, default: () => props$1x.actionSheet.description }, // 数据 actions: { type: Array, default: () => props$1x.actionSheet.actions }, // 取消按钮的文字,不为空时显示按钮 cancelText: { type: String, default: () => props$1x.actionSheet.cancelText }, // 点击某个菜单项时是否关闭弹窗 closeOnClickAction: { type: Boolean, default: () => props$1x.actionSheet.closeOnClickAction }, // 处理底部安全区(默认true) safeAreaInsetBottom: { type: Boolean, default: () => props$1x.actionSheet.safeAreaInsetBottom }, // 小程序的打开方式 openType: { type: String, default: () => props$1x.actionSheet.openType }, // 点击遮罩是否允许关闭 (默认true) closeOnClickOverlay: { type: Boolean, default: () => props$1x.actionSheet.closeOnClickOverlay }, // 圆角值 round: { type: [Boolean, String, Number], default: () => props$1x.actionSheet.round }, // 选项区域最大高度 wrapMaxHeight: { type: [String], default: () => props$1x.actionSheet.wrapMaxHeight } } }); const _sfc_main$25 = { name: "u-action-sheet", // 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到 mixins: [openType, buttonMixin, mixin, props$1o], data() { return {}; }, computed: { // 操作项目的样式 itemStyle() { return (index2) => { let style = {}; if (this.actions[index2].color) style.color = this.actions[index2].color; if (this.actions[index2].fontSize) style.fontSize = addUnit(this.actions[index2].fontSize); if (this.actions[index2].disabled) style.color = "#c0c4cc"; return style; }; } }, emits: ["close", "select", "update:show"], methods: { // 关闭操作菜单事件处理 closeHandler() { if (this.closeOnClickOverlay) { this.$emit("update:show", false); this.$emit("close"); } }, // 点击取消按钮 cancel() { this.$emit("update:show", false); this.$emit("close"); }, // 选择操作项处理 selectHandler(index2) { const item = this.actions[index2]; if (item && !item.disabled && !item.loading) { this.$emit("select", item); if (this.closeOnClickAction) { this.$emit("update:show", false); this.$emit("close"); } } } } }; function _sfc_render$24(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_1$3); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2); return vue.openBlock(), vue.createBlock(_component_u_popup, { show: _ctx.show, mode: "bottom", onClose: $options.closeHandler, safeAreaInsetBottom: _ctx.safeAreaInsetBottom, round: _ctx.round }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-action-sheet" }, [ vue.createCommentVNode(" 顶部标题区域 "), _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-action-sheet__header" }, [ vue.createElementVNode( "text", { class: "u-action-sheet__header__title u-line-1" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "u-action-sheet__header__icon-wrap", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.cancel && $options.cancel(...args), ["stop"])) }, [ vue.createVNode(_component_up_icon, { name: "close", size: "17", color: "#c8c9cc", bold: "" }) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 描述信息 "), _ctx.description ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-action-sheet__description", style: vue.normalizeStyle([{ marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}` }]) }, vue.toDisplayString(_ctx.description), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createCommentVNode(" 分割线 "), _ctx.description ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 操作项列表 "), vue.createElementVNode( "scroll-view", { "scroll-y": "", class: "u-action-sheet__item-wrap", style: vue.normalizeStyle({ maxHeight: _ctx.wrapMaxHeight }) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.actions, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createElementVNode("view", { class: "u-action-sheet__item-wrap__item", onClick: vue.withModifiers(($event) => $options.selectHandler(index2), ["stop"]), "hover-class": !item.disabled && !item.loading ? "u-action-sheet--hover" : "", "hover-stay-time": 150 }, [ !item.loading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "text", { class: "u-action-sheet__item-wrap__item__name", style: vue.normalizeStyle([$options.itemStyle(index2)]) }, vue.toDisplayString(item.name), 5 /* TEXT, STYLE */ ), item.subname ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-action-sheet__item-wrap__item__subname" }, vue.toDisplayString(item.subname), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 加载状态图标 "), vue.createVNode(_component_u_loading_icon, { "custom-class": "van-action-sheet__loading", size: "18", mode: "circle" }) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) ], 8, ["onClick", "hover-class"]), vue.createCommentVNode(" 选项间分割线 "), index2 !== _ctx.actions.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ) ], true), vue.createCommentVNode(" 取消按钮前的分割区域 "), _ctx.cancelText ? (vue.openBlock(), vue.createBlock(_component_u_gap, { key: 2, bgColor: "#eaeaec", height: "6" })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 取消按钮 "), _ctx.cancelText ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "u-action-sheet__item-wrap__item u-action-sheet__cancel", "hover-class": "u-action-sheet--hover", onClick: _cache[2] || (_cache[2] = (...args) => $options.cancel && $options.cancel(...args)) }, [ vue.createElementVNode( "text", { onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers(() => { }, ["stop", "prevent"])), "hover-stay-time": 150, class: "u-action-sheet__cancel-text" }, vue.toDisplayString(_ctx.cancelText), 33 /* TEXT, NEED_HYDRATION */ ) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show", "onClose", "safeAreaInsetBottom", "round"]); } const uActionSheet = /* @__PURE__ */ _export_sfc(_sfc_main$25, [["render", _sfc_render$24], ["__scopeId", "data-v-69669810"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.vue"]]); const __vite_glob_0_1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uActionSheet }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$24 = { name: "up-agreement", props: { urlProtocol: { type: String, default: "/pages/user_agreement/agreement/info?title=用户协议" }, urlPrivacy: { type: String, default: "/pages/user_agreement/agreement/info?title=隐私政策" } }, emits: ["confirm"], data() { return { show: false }; }, methods: { close() { plus.runtime.quit(); }, confirm() { this.show = false; this.$emit("confirm", 1); }, showModal() { this.show = true; }, urlClick(type2) { uni.navigateTo({ url: this[type2] }); } } }; function _sfc_render$23(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_modal = vue.resolveComponent("up-modal"); return vue.openBlock(), vue.createElementBlock("view", { class: "up-agreement" }, [ vue.createVNode(_component_up_modal, { show: $data.show, "onUpdate:show": _cache[2] || (_cache[2] = ($event) => $data.show = $event), showCancelButton: "", onConfirm: $options.confirm, onCancel: $options.close, confirmText: "阅读并同意" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "agreement-content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createTextVNode(" 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前, 请务必审慎阅读《"), vue.createElementVNode("text", { class: "agreement-url", onClick: _cache[0] || (_cache[0] = ($event) => $options.urlClick("urlProtocol")) }, "用户协议"), vue.createTextVNode("》 和《"), vue.createElementVNode("text", { class: "agreement-url", onClick: _cache[1] || (_cache[1] = ($event) => $options.urlClick("urlPrivacy")) }, "隐私政策"), vue.createTextVNode("》内的所有条款, 尤其是:1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;2. 约定我们的限制责任、免责 条款;3.其他以颜色或加粗进行标识的重要条款。如您对以上协议有任何疑问,请先不要同意,您点击“同意并继续”的行为即表示您已阅读 完毕并同意以上协议的全部内容。 ") ], true) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show", "onConfirm", "onCancel"]) ]); } const uAgreement = /* @__PURE__ */ _export_sfc(_sfc_main$24, [["render", _sfc_render$23], ["__scopeId", "data-v-1bf68e1e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-agreement/u-agreement.vue"]]); const __vite_glob_0_2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uAgreement }, Symbol.toStringTag, { value: "Module" })); const props$1n = defineMixin({ props: { // 图片地址,Array|Array形式 urls: { type: Array, default: () => props$1x.album.urls }, // 指定从数组的对象元素中读取哪个属性作为图片地址 keyName: { type: String, default: () => props$1x.album.keyName }, // 单图时,图片长边的长度 singleSize: { type: [String, Number], default: () => props$1x.album.singleSize }, // 多图时,图片边长 multipleSize: { type: [String, Number], default: () => props$1x.album.multipleSize }, // 多图时,图片水平和垂直之间的间隔 space: { type: [String, Number], default: () => props$1x.album.space }, // 单图时,图片缩放裁剪的模式 singleMode: { type: String, default: () => props$1x.album.singleMode }, // 多图时,图片缩放裁剪的模式 multipleMode: { type: String, default: () => props$1x.album.multipleMode }, // 最多展示的图片数量,超出时最后一个位置将会显示剩余图片数量 maxCount: { type: [String, Number], default: () => props$1x.album.maxCount }, // 是否可以预览图片 previewFullImage: { type: Boolean, default: () => props$1x.album.previewFullImage }, // 每行展示图片数量,如设置,singleSize和multipleSize将会无效 rowCount: { type: [String, Number], default: () => props$1x.album.rowCount }, // 超出maxCount时是否显示查看更多的提示 showMore: { type: Boolean, default: () => props$1x.album.showMore }, // 图片形状,circle-圆形,square-方形 shape: { type: String, default: () => props$1x.image.shape }, // 圆角,单位任意 radius: { type: [String, Number], default: () => props$1x.image.radius }, // 自适应换行 autoWrap: { type: Boolean, default: () => props$1x.album.autoWrap }, // 单位 unit: { type: [String], default: () => props$1x.album.unit }, // 阻止点击冒泡 stop: { type: Boolean, default: () => props$1x.album.stop } } }); const _sfc_main$23 = { name: "u-album", mixins: [mpMixin, mixin, props$1n], data() { return { // 单图的宽度 singleWidth: 0, // 单图的高度 singleHeight: 0, // 单图时,如果无法获取图片的尺寸信息,让图片宽度默认为容器的一定百分比 singlePercent: 0.6 }; }, watch: { urls: { immediate: true, handler(newVal) { if (newVal.length === 1) { this.getImageRect(); } } } }, computed: { /** * 计算图片样式 * @param {Number} index1 - 行索引 * @param {Number} index2 - 列索引 * @returns {Object} 图片样式对象 */ imageStyle() { return (index1, index2) => { const { space, rowCount, multipleSize, urls } = this, rowLen = this.showUrls.length; this.urls.length; const style = { marginRight: addUnit(space), marginBottom: addUnit(space) }; if (index1 === rowLen && !this.autoWrap) style.marginBottom = 0; if (!this.autoWrap) { if (index2 === rowCount || index1 === rowLen && index2 === this.showUrls[index1 - 1].length) style.marginRight = 0; } return style; }; }, /** * 将图片地址数组划分为二维数组,用于按行显示 * @returns {Array} 二维数组,每个子数组代表一行图片 */ showUrls() { if (this.autoWrap) { return [this.urls.slice(0, this.maxCount)]; } else { const arr = []; this.urls.map((item, index2) => { if (index2 + 1 <= this.maxCount) { const itemIndex = Math.floor(index2 / this.rowCount); if (!arr[itemIndex]) { arr[itemIndex] = []; } arr[itemIndex].push(item); } }); return arr; } }, /** * 计算图片宽度 * @returns {String} 图片宽度样式值 */ imageWidth() { return addUnit( this.urls.length === 1 ? this.singleWidth : this.multipleSize, this.unit ); }, /** * 计算图片高度 * @returns {String} 图片高度样式值 */ imageHeight() { return addUnit( this.urls.length === 1 ? this.singleHeight : this.multipleSize, this.unit ); }, /** * 计算相册总宽度,用于外部组件对齐 * 此变量无实际用途,仅仅是为了利用computed特性,让其在urls长度等变化时,重新计算图片的宽度 * @returns {Number} 相册宽度 */ albumWidth() { let width = 0; if (this.urls.length === 1) { width = this.singleWidth; } else { width = this.showUrls[0].length * this.multipleSize + this.space * (this.showUrls[0].length - 1); } this.$emit("albumWidth", width); return width; } }, emits: ["preview", "albumWidth"], methods: { addUnit, /** * 点击图片预览 * @param {Event} e - 点击事件对象 * @param {String} url - 当前点击图片的地址 */ onPreviewTap(e2, url2) { const urls = this.urls.map((item) => { return this.getSrc(item); }); if (this.previewFullImage) { uni.previewImage({ current: url2, urls }); this.stop && this.preventEvent(e2); } else { this.$emit("preview", { urls, currentIndex: urls.indexOf(url2) }); } }, /** * 获取图片地址 * @param {String|Object} item - 图片项,可以是字符串或对象 * @returns {String} 图片地址 */ getSrc(item) { return test.object(item) ? this.keyName && item[this.keyName] || item.src : item; }, /** * 单图时,获取图片的尺寸 * 在小程序中,需要将网络图片的的域名添加到小程序的download域名才可能获取尺寸 * 在没有添加的情况下,让单图宽度默认为盒子的一定宽度(singlePercent) */ getImageRect() { const src = this.getSrc(this.urls[0]); uni.getImageInfo({ src, success: (res) => { let singleSize = this.singleSize; let unit = ""; if (Number.isNaN(Number(this.singleSize))) { unit = this.singleSize.replace(/\d+/g, ""); singleSize = Number(this.singleSize.replace(/\D+/g, ""), 10); } const isHorizotal = res.width >= res.height; this.singleWidth = isHorizotal ? singleSize : res.width / res.height * singleSize; this.singleHeight = !isHorizotal ? singleSize : res.height / res.width * this.singleWidth; if (unit != null && unit !== "") { this.singleWidth = this.singleWidth + unit; this.singleHeight = this.singleHeight + unit; } }, fail: () => { this.getComponentWidth(); } }); }, /** * 获取组件的宽度,用于计算单图显示尺寸 */ async getComponentWidth() { await sleep(30); this.$uGetRect(".u-album__row").then((size) => { this.singleWidth = size.width * this.singlePercent; }); } } }; function _sfc_render$22(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_text = vue.resolveComponent("up-text"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-album" }, [ vue.createCommentVNode(" 相册行容器,每行显示 rowCount 个图片 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.showUrls, (arr, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-album__row", ref_for: true, ref: "u-album__row", forComputedUse: $options.albumWidth, key: index2, style: vue.normalizeStyle({ flexWrap: _ctx.autoWrap ? "wrap" : "nowrap" }) }, [ vue.createCommentVNode(" 图片包装容器 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(arr, (item, index1) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-album__row__wrapper", key: index1, style: vue.normalizeStyle([$options.imageStyle(index2 + 1, index1 + 1)]), onClick: ($event) => $options.onPreviewTap($event, $options.getSrc(item)) }, [ vue.createCommentVNode(" 图片显示 "), vue.createElementVNode("image", { src: $options.getSrc(item), mode: _ctx.urls.length === 1 ? $options.imageHeight > 0 ? _ctx.singleMode : "widthFix" : _ctx.multipleMode, style: vue.normalizeStyle([ { width: $options.imageWidth, height: $options.imageHeight, borderRadius: _ctx.shape == "circle" ? "10000px" : $options.addUnit(_ctx.radius) } ]) }, null, 12, ["src", "mode"]), vue.createCommentVNode(" 超出最大显示数量时的更多提示 "), _ctx.showMore && _ctx.urls.length > _ctx.rowCount * $options.showUrls.length && index2 === $options.showUrls.length - 1 && index1 === $options.showUrls[$options.showUrls.length - 1].length - 1 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-album__row__wrapper__text", style: vue.normalizeStyle({ borderRadius: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius) }) }, [ vue.createVNode(_component_up_text, { text: `+${_ctx.urls.length - _ctx.maxCount}`, color: "#fff", size: _ctx.multipleSize * 0.3, align: "center", customStyle: "justify-content: center" }, null, 8, ["text", "size"]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 12, ["forComputedUse"]); }), 128 /* KEYED_FRAGMENT */ )) ]); } const uAlbum = /* @__PURE__ */ _export_sfc(_sfc_main$23, [["render", _sfc_render$22], ["__scopeId", "data-v-96d28356"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-album/u-album.vue"]]); const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uAlbum }, Symbol.toStringTag, { value: "Module" })); const props$1m = defineMixin({ props: { // 显示文字 title: { type: String, default: () => props$1x.alert.title }, // 主题,success/warning/info/error type: { type: String, default: () => props$1x.alert.type }, // 辅助性文字 description: { type: String, default: () => props$1x.alert.description }, // 是否可关闭 closable: { type: Boolean, default: () => props$1x.alert.closable }, // 是否显示图标 showIcon: { type: Boolean, default: () => props$1x.alert.showIcon }, // 浅或深色调,light-浅色,dark-深色 effect: { type: String, default: () => props$1x.alert.effect }, // 文字是否居中 center: { type: Boolean, default: () => props$1x.alert.center }, // 字体大小 fontSize: { type: [String, Number], default: () => props$1x.alert.fontSize }, // 动画类型 transitionMode: { type: [String], default: () => props$1x.alert.transitionMode }, // 自动定时关闭毫秒 duration: { type: [Number], default: () => props$1x.alert.duration }, // 自定义图标 icon: { type: [String], default: () => props$1x.alert.icon }, // 是否显示 modelValue: { type: [String], default: () => props$1x.alert.value } } }); const _sfc_main$22 = { name: "u-alert", mixins: [mpMixin, mixin, props$1m], data() { return { // 控制组件显示隐藏 show: true }; }, computed: { // 根据不同的主题类型返回对应的图标颜色 iconColor() { return this.effect === "light" ? this.type : "#fff"; }, // 不同主题对应不同的图标 iconName() { if (this.icon) return this.icon; switch (this.type) { case "success": return "checkmark-circle-fill"; case "error": return "close-circle-fill"; case "warning": return "error-circle-fill"; case "info": return "info-circle-fill"; case "primary": return "more-circle-fill"; default: return "error-circle-fill"; } } }, emits: ["click", "close", "closed", "update:modelValue"], watch: { modelValue: { handler(newVal) { this.show = newVal; }, immediate: true }, show: { handler(newVal) { this.$emit("update:modelValue", newVal); if (!newVal && this.duration > 0) { this.$emit("closed"); } } } }, mounted() { if (this.duration > 0) { setTimeout(() => { this.closeHandler(); }, this.duration); } }, methods: { addUnit, addStyle, // 点击内容区域触发click事件 clickHandler() { this.$emit("click"); }, // 点击关闭按钮触发close事件并隐藏组件 closeHandler() { this.show = false; this.$emit("close"); } } }; function _sfc_render$21(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_up_transition = vue.resolveComponent("up-transition"); return vue.openBlock(), vue.createBlock(_component_up_transition, { mode: _ctx.transitionMode, show: $data.show }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-alert", [`u-alert--${_ctx.type}--${_ctx.effect}`]]), onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])), style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]) }, [ vue.createCommentVNode(" 左侧图标 "), _ctx.showIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-alert__icon" }, [ vue.createVNode(_component_up_icon, { name: $options.iconName, size: "18", color: $options.iconColor }, null, 8, ["name", "color"]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 内容区域 "), vue.createElementVNode( "view", { class: "u-alert__content", style: vue.normalizeStyle([{ paddingRight: _ctx.closable ? "20px" : 0 }]) }, [ vue.createCommentVNode(" 标题 "), _ctx.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["u-alert__content__title", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]), style: vue.normalizeStyle([{ fontSize: $options.addUnit(_ctx.fontSize), textAlign: _ctx.center ? "center" : "left" }]) }, vue.toDisplayString(_ctx.title), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 描述信息 "), _ctx.description ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: vue.normalizeClass(["u-alert__content__desc", [_ctx.effect === "dark" ? "u-alert__text--dark" : `u-alert__text--${_ctx.type}--light`]]), style: vue.normalizeStyle([{ fontSize: $options.addUnit(_ctx.fontSize), textAlign: _ctx.center ? "center" : "left" }]) }, vue.toDisplayString(_ctx.description), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ), vue.createCommentVNode(" 关闭按钮 "), _ctx.closable ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-alert__close", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])) }, [ vue.renderSlot(_ctx.$slots, "close", {}, () => [ vue.createVNode(_component_up_icon, { name: "close", color: $options.iconColor, size: "15" }, null, 8, ["color"]) ], true) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["mode", "show"]); } const uAlert = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["render", _sfc_render$21], ["__scopeId", "data-v-158e540a"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-alert/u-alert.vue"]]); const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uAlert }, Symbol.toStringTag, { value: "Module" })); const props$1l = defineMixin({ props: { // 头像图片路径(不能为相对路径) src: { type: String, default: () => props$1x.avatar.src }, // 头像形状,circle-圆形,square-方形 shape: { type: String, default: () => props$1x.avatar.shape }, // 头像尺寸 size: { type: [String, Number], default: () => props$1x.avatar.size }, // 裁剪模式 mode: { type: String, default: () => props$1x.avatar.mode }, // 显示的文字 text: { type: String, default: () => props$1x.avatar.text }, // 背景色 bgColor: { type: String, default: () => props$1x.avatar.bgColor }, // 文字颜色 color: { type: String, default: () => props$1x.avatar.color }, // 文字大小 fontSize: { type: [String, Number], default: () => props$1x.avatar.fontSize }, // 显示的图标 icon: { type: String, default: () => props$1x.avatar.icon }, // 显示小程序头像,只对百度,微信,QQ小程序有效 mpAvatar: { type: Boolean, default: () => props$1x.avatar.mpAvatar }, // 是否使用随机背景色 randomBgColor: { type: Boolean, default: () => props$1x.avatar.randomBgColor }, // 加载失败的默认头像(组件有内置默认图片) defaultUrl: { type: String, default: () => props$1x.avatar.defaultUrl }, // 如果配置了randomBgColor为true,且配置了此值,则从默认的背景色数组中取出对应索引的颜色值,取值0-19之间 colorIndex: { type: [String, Number], // 校验参数规则,索引在0-19之间 validator(n2) { return test.range(n2, [0, 19]) || n2 === ""; }, default: () => props$1x.avatar.colorIndex }, // 组件标识符 name: { type: String, default: () => props$1x.avatar.name } } }); const base64Avatar = "data:image/jpg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAA8AAD/4QMraHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjMtYzAxMSA2Ni4xNDU2NjEsIDIwMTIvMDIvMDYtMTQ6NTY6MjcgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDUzYgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjREMEQwRkY0RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjREMEQwRkY1RjgwNDExRUE5OTY2RDgxODY3NkJFODMxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NEQwRDBGRjJGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NEQwRDBGRjNGODA0MTFFQTk5NjZEODE4Njc2QkU4MzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAGBAQEBQQGBQUGCQYFBgkLCAYGCAsMCgoLCgoMEAwMDAwMDBAMDg8QDw4MExMUFBMTHBsbGxwfHx8fHx8fHx8fAQcHBw0MDRgQEBgaFREVGh8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx//wAARCADIAMgDAREAAhEBAxEB/8QAcQABAQEAAwEBAAAAAAAAAAAAAAUEAQMGAgcBAQAAAAAAAAAAAAAAAAAAAAAQAAIBAwICBgkDBQAAAAAAAAABAhEDBCEFMVFBYXGREiKBscHRMkJSEyOh4XLxYjNDFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A/fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHbHFyZ/Dam+yLA+Z2L0Pjtyj2poD4AAAAAAAAAAAAAAAAAAAAAAAAKWFs9y6lcvvwQeqj8z9wFaziY1n/HbUX9XF97A7QAGXI23EvJ1goyfzR0YEfN269jeZ+a03pNe0DIAAAAAAAAAAAAAAAAAAAACvtO3RcVkXlWutuL9YFYAAAAAOJRjKLjJVi9GmB5/csH/mu1h/in8PU+QGMAAAAAAAAAAAAAAAAAAaMDG/6MmMH8C80+xAelSSVFolwQAAAAAAAHVlWI37ErUulaPk+hgeYnCUJuElSUXRrrQHAAAAAAAAAAAAAAAAABa2Oz4bM7r4zdF2ICmAAAAAAAAAg7zZ8GX41wuJP0rRgYAAAAAAAAAAAAAAAAAD0m2R8ODaXU33tsDSAAAAAAAAAlb9HyWZcnJd9PcBHAAAAAAAAAAAAAAAAAPS7e64Vn+KA0AAAAAAAAAJm+v8Ftf3ewCKAAAAAAAAAAAAAAAAAX9muqeGo9NttP06+0DcAAAAAAAAAjb7dTu2ra+VOT9P8AQCWAAAAAAAAAAAAAAAAAUNmyPt5Ltv4bui/kuAF0AAAAAAADiUlGLlJ0SVW+oDzOXfd/Ind6JPRdS0QHSAAAAAAAAAAAAAAAAAE2nVaNcGB6Lbs6OTao9LsF51z60BrAAAAAABJ3jOVHjW3r/sa9QEgAAAAAAAAAAAAAAAAAAAPu1duWriuW34ZR4MC9hbnZyEoy8l36XwfYBsAAADaSq9EuLAlZ+7xSdrGdW9Hc5dgEdtt1erfFgAAAAAAAAAAAAAAAAADVjbblX6NR8MH80tEBRs7HYivyzlN8lovaBPzduvY0m6eK10TXtAyAarO55lpJK54orolr+4GqO/Xaea1FvqbXvA+Z77kNeW3GPbV+4DJfzcm/pcm3H6Vou5AdAFLC2ed2Pjv1txa8sV8T6wOL+yZEKu1JXFy4MDBOE4ScZxcZLinoB8gAAAAAAAAAAAB242LeyJ+C3GvN9C7QLmJtePYpKS+5c+p8F2IDYAANJqj1T4oCfk7Nj3G5Wn9qXJax7gJ93Z82D8sVNc4v30A6Xg5i42Z+iLfqARwcyT0sz9MWvWBps7LlTf5Grce9/oBTxdtxseklHxT+uWr9AGoAB138ezfj4bsFJdD6V2MCPm7RdtJzs1uW1xXzL3gTgAAAAAAAAADRhYc8q74I6RWs5ckB6GxYtWLat21SK731sDsAAAAAAAAAAAAAAAASt021NO/YjrxuQXT1oCOAAAAAAABzGLlJRSq26JAelwsWONYjbXxcZvmwO8AAAAAAAAAAAAAAAAAAef3TEWPkVivx3NY9T6UBiAAAAAABo2+VmGXblddIJ8eivRUD0oAAAAAAAAAAAAAAAAAAAYt4tKeFKVNYNSXfRgefAAAAAAAAr7VuSSWPedKaW5v1MCsAAAAAAAAAAAAAAAAAAIe6bj96Ts2n+JPzSXzP3ATgAAAAAAAAFbbt1UUrOQ9FpC4/UwK6aaqtU+DAAAAAAAAAAAAAAA4lKMIuUmoxWrb4ARNx3R3q2rLpa4Sl0y/YCcAAAAAAAAAAANmFud7G8r89r6X0dgFvGzLGRGtuWvTF6NAdwAAAAAAAAAAAy5W442PVN+K59EePp5ARMvOv5MvO6QXCC4AZwAAAAAAAAAAAAAcxlKLUotprg1owN+PvORborq+7Hnwl3gUbO74VzRydt8pKn68ANcJwmqwkpLmnUDkAAAAfNy9atqtyagut0AxXt5xIV8Fbj6lRd7Am5G65V6qUvtwfyx94GMAAAAAAAAAAAAAAAAAAAOU2nVOj5gdsc3LiqRvTpyqwOxbnnrhdfpSfrQB7pnv/AGvuS9gHXPMy5/Fem1yq0v0A6W29XqwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf//Z"; const _sfc_main$21 = { name: "u-avatar", mixins: [mpMixin, mixin, props$1l], data() { return { // 如果配置randomBgColor参数为true,在图标或者文字的模式下,会随机从中取出一个颜色值当做背景色 colors: [ "#ffb34b", "#f2bba9", "#f7a196", "#f18080", "#88a867", "#bfbf39", "#89c152", "#94d554", "#f19ec2", "#afaae4", "#e1b0df", "#c38cc1", "#72dcdc", "#9acdcb", "#77b1cc", "#448aca", "#86cefa", "#98d1ee", "#73d1f1", "#80a7dc" ], avatarUrl: this.src, allowMp: false }; }, watch: { // 监听头像src的变化,赋值给内部的avatarUrl变量,因为图片加载失败时,需要修改图片的src为默认值 // 而组件内部不能直接修改props的值,所以需要一个中间变量 src: { immediate: true, handler(newVal) { this.avatarUrl = newVal; if (!newVal) { this.errorHandler(); } } } }, computed: { imageStyle() { const style = {}; return style; } }, created() { this.init(); }, emits: ["click"], methods: { addStyle, addUnit, random, init() { }, // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 isImg() { return this.src.indexOf("/") !== -1; }, // 图片加载时失败时触发 errorHandler() { this.avatarUrl = this.defaultUrl || base64Avatar; }, clickHandler(e2) { this.$emit("click", this.name, e2); } } }; function _sfc_render$20(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_up_text = vue.resolveComponent("up-text"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-avatar", [`u-avatar--${_ctx.shape}`]]), style: vue.normalizeStyle([{ backgroundColor: _ctx.text || _ctx.icon ? _ctx.randomBgColor ? $data.colors[_ctx.colorIndex !== "" ? _ctx.colorIndex : $options.random(0, 19)] : _ctx.bgColor : "transparent", width: $options.addUnit(_ctx.size), height: $options.addUnit(_ctx.size) }, $options.addStyle(_ctx.customStyle)]), onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ _ctx.mpAvatar && $data.allowMp ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [], 64 /* STABLE_FRAGMENT */ )) : _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, name: _ctx.icon, size: _ctx.fontSize, color: _ctx.color }, null, 8, ["name", "size", "color"])) : _ctx.text ? (vue.openBlock(), vue.createBlock(_component_up_text, { key: 2, text: _ctx.text, size: _ctx.fontSize, color: _ctx.color, align: "center", customStyle: "justify-content: center" }, null, 8, ["text", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", { key: 3, class: vue.normalizeClass(["u-avatar__image", [`u-avatar__image--${_ctx.shape}`]]), src: $data.avatarUrl || _ctx.defaultUrl, mode: _ctx.mode, onError: _cache[0] || (_cache[0] = (...args) => $options.errorHandler && $options.errorHandler(...args)), style: vue.normalizeStyle([{ width: $options.addUnit(_ctx.size), height: $options.addUnit(_ctx.size) }]) }, null, 46, ["src", "mode"])) ], true) ], 6 /* CLASS, STYLE */ ); } const __easycom_0$a = /* @__PURE__ */ _export_sfc(_sfc_main$21, [["render", _sfc_render$20], ["__scopeId", "data-v-34d954f9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-avatar/u-avatar.vue"]]); const __vite_glob_0_6 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$a }, Symbol.toStringTag, { value: "Module" })); const props$1k = defineMixin({ props: { // 头像图片组 urls: { type: Array, default: () => props$1x.avatarGroup.urls }, // 最多展示的头像数量 maxCount: { type: [String, Number], default: () => props$1x.avatarGroup.maxCount }, // 头像形状 shape: { type: String, default: () => props$1x.avatarGroup.shape }, // 图片裁剪模式 mode: { type: String, default: () => props$1x.avatarGroup.mode }, // 超出maxCount时是否显示查看更多的提示 showMore: { type: Boolean, default: () => props$1x.avatarGroup.showMore }, // 头像大小 size: { type: [String, Number], default: () => props$1x.avatarGroup.size }, // 指定从数组的对象元素中读取哪个属性作为图片地址 keyName: { type: String, default: () => props$1x.avatarGroup.keyName }, // 头像之间的遮挡比例 gap: { type: [String, Number], validator(value2) { return value2 >= 0 && value2 <= 1; }, default: () => props$1x.avatarGroup.gap }, // 需额外显示的值 extraValue: { type: [Number, String], default: () => props$1x.avatarGroup.extraValue } } }); const _sfc_main$20 = { name: "u-avatar-group", mixins: [mpMixin, mixin, props$1k], data() { return {}; }, computed: { showUrl() { return this.urls.slice(0, this.maxCount); } }, emits: ["showMore"], methods: { addUnit, testObject: test.object, clickHandler() { this.$emit("showMore"); } } }; function _sfc_render$1$(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$a); const _component_up_text = vue.resolveComponent("up-text"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-avatar-group" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.showUrl, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-avatar-group__item", key: index2, style: vue.normalizeStyle({ marginLeft: index2 === 0 ? 0 : $options.addUnit(-_ctx.size * _ctx.gap) }) }, [ vue.createVNode(_component_u_avatar, { size: _ctx.size, shape: _ctx.shape, mode: _ctx.mode, src: $options.testObject(item) ? _ctx.keyName && item[_ctx.keyName] || item.url : item }, null, 8, ["size", "shape", "mode", "src"]), _ctx.showMore && index2 === $options.showUrl.length - 1 && (_ctx.urls.length > _ctx.maxCount || _ctx.extraValue > 0) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-avatar-group__item__show-more", onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.createVNode(_component_up_text, { color: "#ffffff", size: _ctx.size * 0.4, text: `+${_ctx.extraValue || _ctx.urls.length - $options.showUrl.length}`, align: "center", customStyle: "justify-content: center" }, null, 8, ["size", "text"]) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ]); } const uAvatarGroup = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["render", _sfc_render$1$], ["__scopeId", "data-v-3bd09520"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-avatar-group/u-avatar-group.vue"]]); const __vite_glob_0_5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uAvatarGroup }, Symbol.toStringTag, { value: "Module" })); const props$1j = defineMixin({ props: { // 返回顶部的形状,circle-圆形,square-方形 mode: { type: String, default: () => props$1x.backtop.mode }, // 自定义图标 icon: { type: String, default: () => props$1x.backtop.icon }, // 提示文字 text: { type: String, default: () => props$1x.backtop.text }, // 返回顶部滚动时间 duration: { type: [String, Number], default: () => props$1x.backtop.duration }, // 滚动距离 scrollTop: { type: [String, Number], default: () => props$1x.backtop.scrollTop }, // 距离顶部多少距离显示,单位px top: { type: [String, Number], default: () => props$1x.backtop.top }, // 返回顶部按钮到底部的距离,单位px bottom: { type: [String, Number], default: () => props$1x.backtop.bottom }, // 返回顶部按钮到右边的距离,单位px right: { type: [String, Number], default: () => props$1x.backtop.right }, // 层级 zIndex: { type: [String, Number], default: () => props$1x.backtop.zIndex }, // 图标的样式,对象形式 iconStyle: { type: Object, default: () => props$1x.backtop.iconStyle } } }); const _sfc_main$1$ = { name: "u-back-top", mixins: [mpMixin, mixin, props$1j], computed: { backTopStyle() { const style = { bottom: addUnit(this.bottom), right: addUnit(this.right), width: "40px", height: "40px", position: "fixed", zIndex: 10 }; return style; }, show() { return getPx(this.scrollTop) > getPx(this.top); }, contentStyle() { const style = {}; let radius = 0; if (this.mode === "circle") { radius = "100px"; } else { radius = "4px"; } style.borderTopLeftRadius = radius; style.borderTopRightRadius = radius; style.borderBottomLeftRadius = radius; style.borderBottomRightRadius = radius; return deepMerge$1(style, addStyle(this.customStyle)); } }, emits: ["click"], methods: { backToTop() { uni.pageScrollTo({ scrollTop: 0, duration: this.duration }); this.$emit("click"); } } }; function _sfc_render$1_(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createBlock(_component_u_transition, { mode: "fade", customStyle: $options.backTopStyle, show: $options.show }, { default: vue.withCtx(() => [ !_ctx.$slots.default && !_ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-back-top", style: vue.normalizeStyle([$options.contentStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.backToTop && $options.backToTop(...args)) }, [ vue.createVNode(_component_up_icon, { name: _ctx.icon, "custom-style": _ctx.iconStyle }, null, 8, ["name", "custom-style"]), _ctx.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-back-top__text" }, vue.toDisplayString(_ctx.text), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) ]), _: 3 /* FORWARDED */ }, 8, ["customStyle", "show"]); } const uBackTop = /* @__PURE__ */ _export_sfc(_sfc_main$1$, [["render", _sfc_render$1_], ["__scopeId", "data-v-91347e36"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-back-top/u-back-top.vue"]]); const __vite_glob_0_7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uBackTop }, Symbol.toStringTag, { value: "Module" })); const props$1i = defineMixin({ props: { // 是否显示圆点 isDot: { type: Boolean, default: () => props$1x.badge.isDot }, // 显示的内容 value: { type: [Number, String], default: () => props$1x.badge.value }, // 显示的内容 modelValue: { type: [Number, String], default: () => props$1x.badge.modelValue }, // 是否显示 show: { type: Boolean, default: () => props$1x.badge.show }, // 最大值,超过最大值会显示 '{max}+' max: { type: [Number, String], default: () => props$1x.badge.max }, // 主题类型,error|warning|success|primary type: { type: String, default: () => props$1x.badge.type }, // 当数值为 0 时,是否展示 Badge showZero: { type: Boolean, default: () => props$1x.badge.showZero }, // 背景颜色,优先级比type高,如设置,type参数会失效 bgColor: { type: [String, null], default: () => props$1x.badge.bgColor }, // 字体颜色 color: { type: [String, null], default: () => props$1x.badge.color }, // 徽标形状,circle-四角均为圆角,horn-左下角为直角 shape: { type: String, default: () => props$1x.badge.shape }, // 设置数字的显示方式,overflow|ellipsis|limit // overflow会根据max字段判断,超出显示`${max}+` // ellipsis会根据max判断,超出显示`${max}...` // limit会依据1000作为判断条件,超出1000,显示`${value/1000}K`,比如2.2k、3.34w,最多保留2位小数 numberType: { type: String, default: () => props$1x.badge.numberType }, // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效 offset: { type: Array, default: () => props$1x.badge.offset }, // 是否反转背景和字体颜色 inverted: { type: Boolean, default: () => props$1x.badge.inverted }, // 是否绝对定位 absolute: { type: Boolean, default: () => props$1x.badge.absolute } } }); const _sfc_main$1_ = { name: "u-badge", mixins: [mpMixin, props$1i, mixin], computed: { // 是否将badge中心与父组件右上角重合 boxStyle() { let style = {}; return style; }, // 整个组件的样式 badgeStyle() { const style = {}; if (this.color) { style.color = this.color; } if (this.bgColor && !this.inverted) { style.backgroundColor = this.bgColor; } if (this.absolute) { style.position = "absolute"; if (this.offset.length) { const top = this.offset[0]; const right = this.offset[1] || top; style.top = addUnit(top); style.right = addUnit(right); } } return style; }, showValue() { switch (this.numberType) { case "overflow": return Number(this.value) > Number(this.max) ? this.max + "+" : this.value; case "ellipsis": return Number(this.value) > Number(this.max) ? "..." : this.value; case "limit": return Number(this.value) > 999 ? Number(this.value) >= 9999 ? Math.floor(this.value / 1e4 * 100) / 100 + "w" : Math.floor(this.value / 1e3 * 100) / 100 + "k" : this.value; default: return Number(this.value); } } }, methods: { addStyle } }; function _sfc_render$1Z(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show && ((Number(_ctx.value) === 0 ? _ctx.showZero : true) || _ctx.isDot) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass([[_ctx.isDot ? "u-badge--dot" : "u-badge--not-dot", _ctx.inverted && "u-badge--inverted", _ctx.shape === "horn" && "u-badge--horn", `u-badge--${_ctx.type}${_ctx.inverted ? "--inverted" : ""}`], "u-badge"]), style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle), $options.badgeStyle]) }, vue.toDisplayString(_ctx.isDot ? "" : $options.showValue), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$9 = /* @__PURE__ */ _export_sfc(_sfc_main$1_, [["render", _sfc_render$1Z], ["__scopeId", "data-v-06cca9b7"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-badge/u-badge.vue"]]); const __vite_glob_0_8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$9 }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1Z = { name: "u-barcode", props: { // 条码值 value: { type: [String, Number], required: true }, // 条码格式 format: { type: String, default: "auto", validator: function(value2) { return [ "auto", "CODE128", "CODE128A", "CODE128B", "CODE128C", "EAN13", "EAN8", "EAN5", "EAN2", "UPC", "UPCA", "UPCE", "CODE39", "ITF", "ITF14", "MSI", "MSI10", "MSI11", "MSI1010", "MSI1110", "pharmacode", "codabar" ].includes(value2); } }, // 宽度 width: { type: Number, default: 200 }, // 高度 height: { type: Number, default: 80 }, // 是否显示文本 displayValue: { type: Boolean, default: true }, // 文本内容 text: { type: String, default: void 0 }, // 字体选项 fontOptions: { type: String, default: "" }, // 字体 font: { type: String, default: "monospace" }, // 文本对齐方式 textAlign: { type: String, default: "center" }, // 文本位置 textPosition: { type: String, default: "bottom" }, // 文本边距 textMargin: { type: Number, default: 2 }, // 字体大小 fontSize: { type: Number, default: 14 }, // 背景色 background: { type: String, default: "#ffffff" }, // 条码颜色 lineColor: { type: String, default: "#000000" }, // 边距 margin: { type: Number, default: 10 }, // 上边距 marginTop: { type: Number, default: void 0 }, // 下边距 marginBottom: { type: Number, default: void 0 }, // 左边距 marginLeft: { type: Number, default: void 0 }, // 右边距 marginRight: { type: Number, default: void 0 }, // 使用canvas还是生成图片 useCanvas: { type: Boolean, default: true } }, data() { return { canvasId: "barcode-" + Math.random().toString(36).substr(2, 9), barcodeImage: "", showCanvas: false, canvasWidth: 0, canvasHeight: 0, calcSizeDone: false, error: "" }; }, watch: { value() { this.generateBarcode(); }, format() { this.generateBarcode(); }, width() { this.generateBarcode(); }, height() { this.generateBarcode(); }, displayValue() { this.generateBarcode(); }, text() { this.generateBarcode(); }, font() { this.generateBarcode(); }, textAlign() { this.generateBarcode(); }, textPosition() { this.generateBarcode(); }, textMargin() { this.generateBarcode(); }, fontSize() { this.generateBarcode(); }, background() { this.generateBarcode(); }, lineColor() { this.generateBarcode(); }, margin() { this.generateBarcode(); } }, mounted() { this.$nextTick(() => { this.generateBarcode(); }); }, methods: { /** * 生成条形码 * @author jry * @param {String|Number} value - 条码值 * @param {Object} options - 条码配置选项 */ generateBarcode() { const margin = this.margin; const options2 = { format: this.format || "auto", width: this.width, height: this.height, displayValue: this.displayValue, text: this.text, fontOptions: this.fontOptions || "", font: this.font || "monospace", textAlign: this.textAlign || "center", textPosition: this.textPosition || "bottom", textMargin: this.textMargin !== void 0 ? this.textMargin : 2, fontSize: this.fontSize || 20, background: this.background || "#ffffff", lineColor: this.lineColor || "#000000", margin, marginTop: this.marginTop !== void 0 ? this.marginTop : margin, marginBottom: this.marginBottom !== void 0 ? this.marginBottom : margin, marginLeft: this.marginLeft !== void 0 ? this.marginLeft : margin, marginRight: this.marginRight !== void 0 ? this.marginRight : margin }; Object.keys(options2).forEach((key) => { if (options2[key] === void 0) { delete options2[key]; } }); if (this.useCanvas) { this.showCanvas = true; this.$nextTick(() => { this.renderToCanvas(options2); }); } else { this.showCanvas = false; this.renderToImage(options2); } }, /** * 渲染条形码到canvas * @author jry * @param {Object} options - 条码配置选项 */ async renderToCanvas(options2) { try { this.calculateCanvasSize(options2); await vue.nextTick(); const ctx = uni.createCanvasContext(this.canvasId, this); ctx.setFillStyle(options2.background); ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight); const barcodeData = this.encodeBarcode(this.value, options2.format); if (barcodeData) { this.drawBarcode(ctx, barcodeData, options2); } ctx.draw(false, () => { this.$emit("rendered", { type: "canvas", id: this.canvasId }); }); } catch (error2) { formatAppLog("error", "at uni_modules/uview-plus/components/u-barcode/u-barcode.vue:293", "生成条码失败:", error2); this.error = error2.message || t$1("up.barcode.error"); this.$emit("error", error2); } }, /** * 渲染条形码为图片 * @author jry * @param {Object} options - 条码配置选项 */ renderToImage(options2) { try { this.calculateCanvasSize(options2); const tempCanvasId = "temp-" + this.canvasId; const ctx = uni.createCanvasContext(tempCanvasId, this); ctx.setFillStyle(options2.background); ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight); const barcodeData = this.encodeBarcode(this.value, options2.format); if (barcodeData) { this.drawBarcode(ctx, barcodeData, options2); } ctx.draw(false, () => { setTimeout(() => { uni.canvasToTempFilePath({ canvasId: tempCanvasId, success: (res) => { this.barcodeImage = res.tempFilePath; this.$emit("rendered", { type: "image", value: this.value, path: res.tempFilePath }); }, fail: (error2) => { formatAppLog("error", "at uni_modules/uview-plus/components/u-barcode/u-barcode.vue:337", "生成条码图片失败:", error2); this.$emit("error", error2); } }, this); }, 100); }); } catch (error2) { formatAppLog("error", "at uni_modules/uview-plus/components/u-barcode/u-barcode.vue:344", "生成条码图片失败:", error2); this.$emit("error", error2); } }, /** * 计算canvas尺寸 * @author jry * @param {Object} options - 条码配置选项 */ calculateCanvasSize(options2) { let width = options2.width; let height = options2.height; const marginLeft = options2.marginLeft; const marginRight = options2.marginRight; const marginTop = options2.marginTop; const marginBottom = options2.marginBottom; let textHeight = 0; if (options2.displayValue !== false) { textHeight = options2.fontSize + options2.textMargin; } if (options2.textPosition === "top" || options2.textPosition === "bottom") { height += textHeight; } width += marginLeft + marginRight; height += marginTop + marginBottom; this.canvasWidth = Math.max(width, 100); this.canvasHeight = Math.max(height, 60 + textHeight); this.calcSizeDone = true; }, /** * 编码条形码数据 * @author jry * @param {String|Number} value - 条码值 * @param {String} format - 条码格式 * @returns {String|null} 条形码编码数据 */ encodeBarcode(value2, format2) { try { switch (format2) { case "CODE128": case "auto": return this.encodeCode128(value2); case "CODE39": return this.encodeCode39(value2); case "EAN13": return this.encodeEAN13(value2); case "EAN8": return this.encodeEAN8(value2); case "EAN5": case "EAN2": return this.encodeEAN52(value2, format2); case "UPC": case "UPCA": return this.encodeUPCA(value2); case "UPCE": return this.encodeUPCE(value2); default: return this.encodeCode128(value2); } } catch (error2) { formatAppLog("error", "at uni_modules/uview-plus/components/u-barcode/u-barcode.vue:418", "条码编码失败:", error2); throw error2; } }, /** * 添加右侧安静区(至少2个模块宽度的空白) * @author jry * @param {String} data - 要编码的数据 * @returns {String|null} 编码后的条形码数据 */ encodeCode128(data) { const CODE128_START_CODE_B = 104; const CODE128_STOP = 106; const CODE128_CODE_B_CHARS = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"; const codes = []; let checksum = CODE128_START_CODE_B; codes.push(CODE128_START_CODE_B); for (let i2 = 0; i2 < data.length; i2++) { const char = data[i2]; const code2 = CODE128_CODE_B_CHARS.indexOf(char); if (code2 === -1) { throw new Error("Invalid character in CODE128: " + char); } codes.push(code2); checksum += code2 * (i2 + 1); } codes.push(checksum % 103); codes.push(CODE128_STOP); let barcode = ""; for (let i2 = 0; i2 < codes.length; i2++) { const code2 = codes[i2]; barcode += this.getCode128Pattern(code2); } barcode += "00000"; return barcode; }, /** * 获取CODE128编码模式 * @author jry * @param {Number} code - 字符编码 * @returns {String} 条形码二进制模式 */ getCode128Pattern(code2) { const patterns = [ "11011001100", "11001101100", "11001100110", "10010011000", "10010001100", "10001001100", "10011001000", "10011000100", "10001100100", "11001001000", "11001000100", "11000100100", "10110011100", "10011011100", "10011001110", "10111001100", "10011101100", "10011100110", "11001110010", "11001011100", "11001001110", "11011100100", "11001110100", "11101101110", "11101001100", "11100101100", "11100100110", "11101100100", "11100110100", "11100110010", "11011011000", "11011000110", "11000110110", "10100011000", "10001011000", "10001000110", "10110001000", "10001101000", "10001100010", "11010001000", "11000101000", "11000100010", "10110111000", "10110001110", "10001101110", "10111011000", "10111000110", "10001110110", "11101110110", "11010001110", "11000101110", "11011101000", "11011100010", "11011101110", "11101011000", "11101000110", "11100010110", "11101101000", "11101100010", "11100011010", "11101111010", "11001000010", "11110001010", "10100110000", "10100001100", "10010110000", "10010000110", "10000101100", "10000100110", "10110010000", "10110000100", "10011010000", "10011000010", "10000110100", "10000110010", "11000010010", "11001010000", "11110111010", "11000010100", "10001111010", "10100111100", "10010111100", "10010011110", "10111100100", "10011110100", "10011110010", "11110100100", "11110010100", "11110010010", "11011011110", "11011110110", "11110110110", "10101111000", "10100011110", "10001011110", "10111101000", "10111100010", "11110101000", "11110100010", "10111011110", "10111101110", "11101011110", "11110101110", "11010000100", "11010010000", "11010011100", "11000111010" ]; return patterns[code2] || ""; }, /** * CODE39编码实现 * @author jry * @param {String} data - 要编码的数据 * @returns {String|null} 编码后的条形码数据 */ encodeCode39(data) { const codes = { "0": "101000111011101", "1": "111010001010111", "2": "101110001010111", "3": "111011100010101", "4": "101000111010111", "5": "111010001110101", "6": "101110001110101", "7": "101000101110111", "8": "111010001011101", "9": "101110001011101", "A": "111010100010111", "B": "101110100010111", "C": "111011101000101", "D": "101011100010111", "E": "111010111000101", "F": "101110111000101", "G": "101010001110111", "H": "111010100011101", "I": "101110100011101", "J": "101011100011101", "K": "111010101000111", "L": "101110101000111", "M": "111011101010001", "N": "101011101000111", "O": "111010111010001", "P": "101110111010001", "Q": "101010111000111", "R": "111010101110001", "S": "101110101110001", "T": "101011101110001", "U": "111000101010111", "V": "100011101010111", "W": "111000111010101", "X": "100010111010111", "Y": "111000101110101", "Z": "100011101110101", "-": "100010101110111", ".": "111000101011101", " ": "100011101011101", "*": "100010111011101", // 起始和终止字符 "$": "100010001000101", "/": "100010001010001", "+": "100010100010001", "%": "101000100010001" }; data = data.toUpperCase(); let barcode = codes["*"]; for (let i2 = 0; i2 < data.length; i2++) { const char = data[i2]; if (codes[char]) { barcode += "0"; barcode += codes[char]; } else { throw new Error("Invalid character in CODE39: " + char); } } barcode += "0"; barcode += codes["*"]; return barcode; }, /** * EAN13编码实现 * @author jry * @param {String} data - 13位数字字符串 * @returns {String|null} 编码后的条形码数据 */ encodeEAN13(data) { if (!/^\d{13}$/.test(data)) { throw new Error("EAN13 must be 13 digits"); } let sum = 0; for (let i2 = 0; i2 < 12; i2++) { const digit = parseInt(data[i2]); sum += i2 % 2 === 0 ? digit : digit * 3; } const checkDigit = (10 - sum % 10) % 10; if (parseInt(data[12]) !== checkDigit) { throw new Error("Invalid EAN13 check digit"); } const leftData = data.substring(1, 7); const rightData = data.substring(7, 13); let barcode = "101"; const firstDigit = parseInt(data[0]); const leftPatterns = [ [ "LLLLLL", "LLGLGG", "LLGGLG", "LLGGGL", "LGLLGG", "LGGLLG", "LGGGLL", "LGLGLG", "LGLGGL", "LGGLGL" ] ]; const pattern2 = leftPatterns[0][firstDigit]; const leftOdd = [ "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ]; const leftEven = [ "0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111" ]; for (let i2 = 0; i2 < leftData.length; i2++) { const digit = parseInt(leftData[i2]); if (pattern2[i2] === "L") { barcode += leftOdd[digit]; } else { barcode += leftEven[digit]; } } barcode += "01010"; const rightCodes = [ "1110010", "1100110", "1101100", "1000010", "1011100", "1001110", "1010000", "1000100", "1001000", "1110100" ]; for (let i2 = 0; i2 < rightData.length; i2++) { const digit = parseInt(rightData[i2]); barcode += rightCodes[digit]; } barcode += "101"; return barcode; }, /** * EAN8编码实现 * @author jry * @param {String} data - 8位数字字符串 * @returns {String|null} 编码后的条形码数据 */ encodeEAN8(data) { if (!/^\d{8}$/.test(data)) { throw new Error("EAN8 must be 8 digits"); } let sum = 0; for (let i2 = 0; i2 < 7; i2++) { const digit = parseInt(data[i2]); sum += digit * (i2 % 2 === 0 ? 3 : 1); } const checkDigit = (10 - sum % 10) % 10; if (parseInt(data[7]) !== checkDigit) { throw new Error("Invalid EAN8 check digit"); } const leftData = data.substring(0, 4); const rightData = data.substring(4, 8); let barcode = "101"; const leftOdd = [ "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ]; for (let i2 = 0; i2 < leftData.length; i2++) { const digit = parseInt(leftData[i2]); barcode += leftOdd[digit]; } barcode += "01010"; const rightCodes = [ "1110010", "1100110", "1101100", "1000010", "1011100", "1001110", "1010000", "1000100", "1001000", "1110100" ]; for (let i2 = 0; i2 < rightData.length; i2++) { const digit = parseInt(rightData[i2]); barcode += rightCodes[digit]; } barcode += "101"; return barcode; }, /** * EAN5/EAN2编码实现 * @author jry * @param {String} data - 2位或5位数字字符串 * @param {String} format - 格式类型(EAN5或EAN2) * @returns {String|null} 编码后的条形码数据 */ encodeEAN52(data, format2) { const length = format2 === "EAN5" ? 5 : 2; if (!new RegExp(`^\\d{${length}}$`).test(data)) { throw new Error(`${format2} must be ${length} digits`); } const codes = [ "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ]; let checksum = 0; for (let i2 = 0; i2 < data.length; i2++) { checksum += parseInt(data[i2]) * (i2 % 2 === 0 ? 3 : 1); } let barcode = "1011"; for (let i2 = 0; i2 < data.length; i2++) { if (i2 > 0) { barcode += "01"; } const digit = parseInt(data[i2]); const code2 = codes[digit]; barcode += code2; } return barcode; }, /** * UPCA编码实现 * @author jry * @param {String} data - 11位或12位数字字符串 * @returns {String|null} 编码后的条形码数据 */ encodeUPCA(data) { if (/^\d{11}$/.test(data)) { let sum = 0; for (let i2 = 0; i2 < 11; i2++) { const digit = parseInt(data[i2]); sum += i2 % 2 === 0 ? digit * 3 : digit; } const checkDigit = (10 - sum % 10) % 10; data += checkDigit; } if (!/^\d{12}$/.test(data)) { throw new Error("UPC-A must be 11 or 12 digits"); } return this.encodeEAN13("0" + data); }, /** * UPCE编码实现 * @author jry * @param {String} data - 6位或8位数字字符串 * @returns {String|null} 编码后的条形码数据 */ encodeUPCE(data) { if (/^\d{7}$/.test(data)) { let sum = 0; for (let i2 = 0; i2 < 7; i2++) { const digit = parseInt(data[i2]); sum += i2 % 2 === 0 ? digit * 3 : digit; } const checkDigit2 = (10 - sum % 10) % 10; data += checkDigit2; } if (!/^\d{8}$/.test(data)) { throw new Error("UPC-E must be 7 or 8 digits"); } if (data[0] !== "0" && data[0] !== "1") { throw new Error("UPC-E must start with 0 or 1"); } const leftOdd = [ "0001101", "0011001", "0010011", "0111101", "0100011", "0110001", "0101111", "0111011", "0110111", "0001011" ]; const leftEven = [ "0100111", "0110011", "0011011", "0100001", "0011101", "0111001", "0000101", "0010001", "0001001", "0010111" ]; data[0]; const checkDigit = data[7]; const middleData = data.substring(1, 7); let pattern2; if (checkDigit === "0" || checkDigit === "1" || checkDigit === "2") { pattern2 = "EEEEOO"; } else if (checkDigit === "3") { pattern2 = "EEEEOO"; } else if (checkDigit === "4") { pattern2 = "EEEOOO"; } else { pattern2 = "EEOOOO"; } let barcode = "101"; for (let i2 = 0; i2 < middleData.length; i2++) { const digit = parseInt(middleData[i2]); if (pattern2[i2] === "E") { barcode += leftEven[digit]; } else { barcode += leftOdd[digit]; } } barcode += "010101"; barcode += "101"; return barcode; }, /** * 绘制条形码 * @author jry * @param {Object} ctx - canvas上下文 * @param {String} barcodeData - 条形码数据 * @param {Object} options - 条码配置选项 */ drawBarcode(ctx, barcodeData, options2) { if (!barcodeData) return; const marginLeft = options2.marginLeft; const marginTop = options2.marginTop; const marginBottom = options2.marginBottom; const textHeight = options2.displayValue !== false ? options2.fontSize + options2.textMargin : 0; const height = options2.height; const moduleWidth = Math.max(1, (this.canvasWidth - marginLeft - (options2.marginRight || 10)) / barcodeData.length); ctx.setFillStyle(options2.lineColor); let barcodeY = marginTop; if (options2.displayValue !== false && options2.textPosition === "top") { barcodeY += textHeight; } let x2 = marginLeft; for (let i2 = 0; i2 < barcodeData.length; i2++) { if (barcodeData[i2] === "1") { ctx.fillRect(x2, barcodeY, moduleWidth, height); } x2 += moduleWidth; } if (options2.displayValue !== false) { const text = options2.text || this.value; let textY; ctx.setFillStyle(options2.lineColor); ctx.setFontSize(options2.fontSize); ctx.setTextAlign(options2.textAlign); let textX; switch (options2.textAlign) { case "left": textX = marginLeft; break; case "right": textX = this.canvasWidth - options2.marginRight; break; default: textX = this.canvasWidth / 2; } if (options2.textPosition === "top") { textY = marginTop + options2.fontSize - 3; } else { textY = barcodeY + height + options2.textMargin + options2.fontSize; if (textY > this.canvasHeight - marginBottom) { textY = this.canvasHeight - marginBottom - 2; } } ctx.fillText(text, textX, textY); } } } }; function _sfc_render$1Y(_ctx, _cache, $props, $setup, $data, $options) { return $data.calcSizeDone ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-barcode" }, [ $data.showCanvas && !$data.error ? (vue.openBlock(), vue.createElementBlock("canvas", { key: 0, id: $data.canvasId, "canvas-id": $data.canvasId, style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px" }) }, null, 12, ["id", "canvas-id"])) : !$data.showCanvas && !$data.error ? (vue.openBlock(), vue.createElementBlock("image", { key: 1, src: $data.barcodeImage, style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px" }), mode: "aspectFit" }, null, 12, ["src"])) : (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "error-container", style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px" }) }, [ vue.createElementVNode( "text", { class: "error-text" }, vue.toDisplayString($data.error), 1 /* TEXT */ ) ], 4 /* STYLE */ )) ])) : vue.createCommentVNode("v-if", true); } const uBarcode = /* @__PURE__ */ _export_sfc(_sfc_main$1Z, [["render", _sfc_render$1Y], ["__scopeId", "data-v-f3ca37b6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-barcode/u-barcode.vue"]]); const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uBarcode }, Symbol.toStringTag, { value: "Module" })); const propsBox = defineMixin({ props: { // 背景色 bgColors: { type: [Array], default: ["#EEFCFF", "#FCF8FF", "#FDF8F2"] }, // 高度 height: { type: [String], default: "160px" }, // 圆角 borderRadius: { type: [String], default: "6px" }, // 间隔 gap: { type: [String], default: "15px" } } }); const _sfc_main$1Y = { name: "up-box", data() { return {}; }, mixins: [mpMixin, mixin, propsBox], computed: {}, emits: [], methods: { addStyle } }; function _sfc_render$1X(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-box", style: vue.normalizeStyle([{ height: _ctx.height }, $options.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode( "view", { class: "u-box__left", style: vue.normalizeStyle({ borderRadius: _ctx.borderRadius, backgroundColor: _ctx.bgColors[0] }) }, [ vue.renderSlot(_ctx.$slots, "left", {}, () => [ vue.createTextVNode("左") ], true) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "u-box__gap", style: vue.normalizeStyle({ width: _ctx.gap, height: _ctx.height }) }, null, 4 /* STYLE */ ), vue.createElementVNode("view", { class: "u-box__right" }, [ vue.createElementVNode( "view", { class: "u-box__right-top", style: vue.normalizeStyle({ borderRadius: _ctx.borderRadius, backgroundColor: _ctx.bgColors[1] }) }, [ vue.renderSlot(_ctx.$slots, "rightTop", {}, () => [ vue.createTextVNode("右上") ], true) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "u-box__right-gap", style: vue.normalizeStyle({ height: _ctx.gap }) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "u-box__right-bottom", style: vue.normalizeStyle({ borderRadius: _ctx.borderRadius, backgroundColor: _ctx.bgColors[2] }) }, [ vue.renderSlot(_ctx.$slots, "rightBottom", {}, () => [ vue.createTextVNode("右下") ], true) ], 4 /* STYLE */ ) ]) ], 4 /* STYLE */ ); } const uBox = /* @__PURE__ */ _export_sfc(_sfc_main$1Y, [["render", _sfc_render$1X], ["__scopeId", "data-v-5409417d"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-box/u-box.vue"]]); const __vite_glob_0_10 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uBox }, Symbol.toStringTag, { value: "Module" })); const props$1h = defineMixin({ props: { // 是否细边框 hairline: { type: Boolean, default: () => props$1x.button.hairline }, // 按钮的预置样式,info,primary,error,warning,success type: { type: String, default: () => props$1x.button.type }, // 按钮尺寸,large,normal,small,mini size: { type: String, default: () => props$1x.button.size }, // 按钮形状,circle(两边为半圆),square(带圆角) shape: { type: String, default: () => props$1x.button.shape }, // 按钮是否镂空 plain: { type: Boolean, default: () => props$1x.button.plain }, // 是否禁止状态 disabled: { type: Boolean, default: () => props$1x.button.disabled }, // 是否加载中 loading: { type: Boolean, default: () => props$1x.button.loading }, // 加载中提示文字 loadingText: { type: [String, Number], default: () => props$1x.button.loadingText }, // 加载状态图标类型 loadingMode: { type: String, default: () => props$1x.button.loadingMode }, // 加载图标大小 loadingSize: { type: [String, Number], default: () => props$1x.button.loadingSize }, // 开放能力,具体请看uniapp稳定关于button组件部分说明 // https://uniapp.dcloud.io/component/button openType: { type: String, default: () => props$1x.button.openType }, // 用于
组件,点击分别会触发 组件的 submit/reset 事件 // 取值为submit(提交表单),reset(重置表单) formType: { type: String, default: () => props$1x.button.formType }, // 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 // 只微信小程序、QQ小程序有效 appParameter: { type: String, default: () => props$1x.button.appParameter }, // 指定是否阻止本节点的祖先节点出现点击态,微信小程序有效 hoverStopPropagation: { type: Boolean, default: () => props$1x.button.hoverStopPropagation }, // 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文。只微信小程序有效 lang: { type: String, default: () => props$1x.button.lang }, // 会话来源,open-type="contact"时有效。只微信小程序有效 sessionFrom: { type: String, default: () => props$1x.button.sessionFrom }, // 会话内消息卡片标题,open-type="contact"时有效 // 默认当前标题,只微信小程序有效 sendMessageTitle: { type: String, default: () => props$1x.button.sendMessageTitle }, // 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 // 默认当前分享路径,只微信小程序有效 sendMessagePath: { type: String, default: () => props$1x.button.sendMessagePath }, // 会话内消息卡片图片,open-type="contact"时有效 // 默认当前页面截图,只微信小程序有效 sendMessageImg: { type: String, default: () => props$1x.button.sendMessageImg }, // 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示, // 用户点击后可以快速发送小程序消息,open-type="contact"时有效 showMessageCard: { type: Boolean, default: () => props$1x.button.showMessageCard }, // 额外传参参数,用于小程序的data-xxx属性,通过target.dataset.name获取 dataName: { type: String, default: () => props$1x.button.dataName }, // 节流,一定时间内只能触发一次 throttleTime: { type: [String, Number], default: () => props$1x.button.throttleTime }, // 按住后多久出现点击态,单位毫秒 hoverStartTime: { type: [String, Number], default: () => props$1x.button.hoverStartTime }, // 手指松开后点击态保留时间,单位毫秒 hoverStayTime: { type: [String, Number], default: () => props$1x.button.hoverStayTime }, // 按钮文字,之所以通过props传入,是因为slot传入的话 // nvue中无法控制文字的样式 text: { type: [String, Number], default: () => props$1x.button.text }, // 按钮图标 icon: { type: String, default: () => props$1x.button.icon }, // 按钮图标 iconColor: { type: String, default: () => props$1x.button.icon }, // 按钮颜色,支持传入linear-gradient渐变色 color: { type: String, default: () => props$1x.button.color }, // 停止冒泡 stop: { type: Boolean, default: () => props$1x.button.stop } } }); let flag; function throttle(func2, wait2 = 500, immediate = true) { if (immediate) { if (!flag) { flag = true; typeof func2 === "function" && func2(); setTimeout(() => { flag = false; }, wait2); } } else if (!flag) { flag = true; setTimeout(() => { flag = false; typeof func2 === "function" && func2(); }, wait2); } } const _sfc_main$1X = { name: "u-button", mixins: [mpMixin, mixin, props$1h], data() { return {}; }, computed: { // 生成bem风格的类名 bemClass() { if (!this.color) { return this.bem( "button", ["type", "shape", "size"], ["disabled", "plain", "hairline"] ); } else { return this.bem( "button", ["shape", "size"], ["disabled", "plain", "hairline"] ); } }, loadingColor() { if (this.plain) { return this.color ? this.color : color$3[`u-${this.type}`]; } if (this.type === "info") { return "#c9c9c9"; } return "rgb(200, 200, 200)"; }, iconColorCom() { if (this.iconColor) return this.iconColor; if (this.plain) { return this.color ? this.color : this.type; } else { return this.type === "info" ? "#000000" : "#ffffff"; } }, baseColor() { let style = {}; if (this.color) { style.color = this.plain ? this.color : "white"; if (!this.plain) { style["background-color"] = this.color; } if (this.color.indexOf("gradient") !== -1) { style.borderTopWidth = 0; style.borderRightWidth = 0; style.borderBottomWidth = 0; style.borderLeftWidth = 0; if (!this.plain) { style.backgroundImage = this.color; } } else { style.borderColor = this.color; style.borderWidth = "1px"; style.borderStyle = "solid"; } } return style; }, // nvue版本按钮的字体不会继承父组件的颜色,需要对每一个text组件进行单独的设置 nvueTextStyle() { let style = {}; if (this.type === "info") { style.color = "#323233"; } if (this.color) { style.color = this.plain ? this.color : "white"; } style.fontSize = this.textSize + "px"; return style; }, // 字体大小 textSize() { let fontSize = 14, { size } = this; if (size === "large") fontSize = 16; if (size === "normal") fontSize = 14; if (size === "small") fontSize = 12; if (size === "mini") fontSize = 10; return fontSize; } }, emits: [ "click", "getphonenumber", "getuserinfo", "error", "opensetting", "launchapp", "agreeprivacyauthorization" ], methods: { addStyle, clickHandler(e2) { if (!this.disabled && !this.loading) { throttle(() => { this.$emit("click", e2); }, this.throttleTime); } this.stop && this.preventEvent(e2); }, // 下面为对接uniapp官方按钮开放能力事件回调的对接 getphonenumber(res) { this.$emit("getphonenumber", res); }, getuserinfo(res) { this.$emit("getuserinfo", res); }, error(res) { this.$emit("error", res); }, opensetting(res) { this.$emit("opensetting", res); }, launchapp(res) { this.$emit("launchapp", res); }, agreeprivacyauthorization(res) { this.$emit("agreeprivacyauthorization", res); } } }; function _sfc_render$1W(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock("button", { "hover-start-time": Number(_ctx.hoverStartTime), "hover-stay-time": Number(_ctx.hoverStayTime), "form-type": _ctx.formType, "open-type": _ctx.openType, "app-parameter": _ctx.appParameter, "hover-stop-propagation": _ctx.hoverStopPropagation, "send-message-title": _ctx.sendMessageTitle, "send-message-path": _ctx.sendMessagePath, lang: _ctx.lang, "data-name": _ctx.dataName, "session-from": _ctx.sessionFrom, "send-message-img": _ctx.sendMessageImg, "show-message-card": _ctx.showMessageCard, onGetphonenumber: _cache[0] || (_cache[0] = (...args) => $options.getphonenumber && $options.getphonenumber(...args)), onGetuserinfo: _cache[1] || (_cache[1] = (...args) => $options.getuserinfo && $options.getuserinfo(...args)), onError: _cache[2] || (_cache[2] = (...args) => $options.error && $options.error(...args)), onOpensetting: _cache[3] || (_cache[3] = (...args) => $options.opensetting && $options.opensetting(...args)), onLaunchapp: _cache[4] || (_cache[4] = (...args) => $options.launchapp && $options.launchapp(...args)), onAgreeprivacyauthorization: _cache[5] || (_cache[5] = (...args) => $options.agreeprivacyauthorization && $options.agreeprivacyauthorization(...args)), "hover-class": !_ctx.disabled && !_ctx.loading ? "u-button--active" : "", class: vue.normalizeClass(["u-button u-reset-button", $options.bemClass]), style: vue.normalizeStyle([$options.baseColor, $options.addStyle(_ctx.customStyle)]), onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ _ctx.loading ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createVNode(_component_u_loading_icon, { mode: _ctx.loadingMode, size: _ctx.loadingSize * 1.15, color: $options.loadingColor }, null, 8, ["mode", "size", "color"]), vue.createElementVNode( "text", { class: "u-button__loading-text", style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }]) }, vue.toDisplayString(_ctx.loadingText || _ctx.text), 5 /* TEXT, STYLE */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: _ctx.icon, color: $options.iconColorCom, size: $options.textSize * 1.35, customStyle: { marginRight: "2px" } }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "u-button__text", style: vue.normalizeStyle([{ fontSize: $options.textSize + "px" }]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ ) ], true) ], 64 /* STABLE_FRAGMENT */ )) ], 46, ["hover-start-time", "hover-stay-time", "form-type", "open-type", "app-parameter", "hover-stop-propagation", "send-message-title", "send-message-path", "lang", "data-name", "session-from", "send-message-img", "show-message-card", "hover-class"]); } const __easycom_0$8 = /* @__PURE__ */ _export_sfc(_sfc_main$1X, [["render", _sfc_render$1W], ["__scopeId", "data-v-5ce41ee6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-button/u-button.vue"]]); const __vite_glob_0_11 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$8 }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1W = { name: "u-calendar-header", mixins: [mpMixin, mixin], props: { // 标题 title: { type: String, default: "" }, // 副标题 subtitle: { type: String, default: "" }, // 是否显示标题 showTitle: { type: Boolean, default: true }, // 是否显示副标题 showSubtitle: { type: Boolean, default: true }, // 星期文本 weekText: { type: Array, default: () => { return []; } } }, data() { return {}; }, methods: { name() { } } }; function _sfc_render$1V(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-calendar-header u-border-bottom" }, [ $props.showTitle ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-calendar-header__title" }, vue.toDisplayString($props.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $props.showSubtitle ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-calendar-header__subtitle" }, vue.toDisplayString($props.subtitle), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-calendar-header__weekdays" }, [ vue.createElementVNode( "text", { class: "u-calendar-header__weekdays__weekday" }, vue.toDisplayString($props.weekText[0]), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "u-calendar-header__weekdays__weekday" }, vue.toDisplayString($props.weekText[1]), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "u-calendar-header__weekdays__weekday" }, vue.toDisplayString($props.weekText[2]), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "u-calendar-header__weekdays__weekday" }, vue.toDisplayString($props.weekText[3]), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "u-calendar-header__weekdays__weekday" }, vue.toDisplayString($props.weekText[4]), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "u-calendar-header__weekdays__weekday" }, vue.toDisplayString($props.weekText[5]), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "u-calendar-header__weekdays__weekday" }, vue.toDisplayString($props.weekText[6]), 1 /* TEXT */ ) ]) ]); } const uHeader = /* @__PURE__ */ _export_sfc(_sfc_main$1W, [["render", _sfc_render$1V], ["__scopeId", "data-v-7f0f7602"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-calendar/header.vue"]]); var e$1 = function() { var t2 = 1e3, e2 = 6e4, n2 = 36e5, r2 = "millisecond", s2 = "second", i2 = "minute", u2 = "hour", a2 = "day", o2 = "week", c2 = "month", f2 = "quarter", h2 = "year", d2 = "date", l2 = "Invalid Date", $2 = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t3) { var e3 = ["th", "st", "nd", "rd"], n3 = t3 % 100; return "[" + t3 + (e3[(n3 - 20) % 10] || e3[n3] || e3[0]) + "]"; } }, g2 = function(t3, e3, n3) { var r3 = String(t3); return !r3 || r3.length >= e3 ? t3 : "" + Array(e3 + 1 - r3.length).join(n3) + t3; }, v2 = { s: g2, z: function(t3) { var e3 = -t3.utcOffset(), n3 = Math.abs(e3), r3 = Math.floor(n3 / 60), s3 = n3 % 60; return (e3 <= 0 ? "+" : "-") + g2(r3, 2, "0") + ":" + g2(s3, 2, "0"); }, m: function t3(e3, n3) { if (e3.date() < n3.date()) return -t3(n3, e3); var r3 = 12 * (n3.year() - e3.year()) + (n3.month() - e3.month()), s3 = e3.clone().add(r3, c2), i3 = n3 - s3 < 0, u3 = e3.clone().add(r3 + (i3 ? -1 : 1), c2); return +(-(r3 + (n3 - s3) / (i3 ? s3 - u3 : u3 - s3)) || 0); }, a: function(t3) { return t3 < 0 ? Math.ceil(t3) || 0 : Math.floor(t3); }, p: function(t3) { return { M: c2, y: h2, w: o2, d: a2, D: d2, h: u2, m: i2, s: s2, ms: r2, Q: f2 }[t3] || String(t3 || "").toLowerCase().replace(/s$/, ""); }, u: function(t3) { return void 0 === t3; } }, m2 = "en", D2 = {}; D2[m2] = M2; var p2 = "$isDayjsObject", S2 = function(t3) { return t3 instanceof _2 || !(!t3 || !t3[p2]); }, w2 = function t3(e3, n3, r3) { var s3; if (!e3) return m2; if ("string" == typeof e3) { var i3 = e3.toLowerCase(); D2[i3] && (s3 = i3), n3 && (D2[i3] = n3, s3 = i3); var u3 = e3.split("-"); if (!s3 && u3.length > 1) return t3(u3[0]); } else { var a3 = e3.name; D2[a3] = e3, s3 = a3; } return !r3 && s3 && (m2 = s3), s3 || !r3 && m2; }, b2 = function(t3, e3) { if (S2(t3)) return t3.clone(); var n3 = "object" == typeof e3 ? e3 : {}; return n3.date = t3, n3.args = arguments, new _2(n3); }, O2 = v2; O2.l = w2, O2.i = S2, O2.w = function(t3, e3) { return b2(t3, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset }); }; var _2 = function() { function M3(t3) { this.$L = w2(t3.locale, null, true), this.parse(t3), this.$x = this.$x || t3.x || {}, this[p2] = true; } var g3 = M3.prototype; return g3.parse = function(t3) { this.$d = function(t4) { var e3 = t4.date, n3 = t4.utc; if (null === e3) return /* @__PURE__ */ new Date(NaN); if (O2.u(e3)) return /* @__PURE__ */ new Date(); if (e3 instanceof Date) return new Date(e3); if ("string" == typeof e3 && !/Z$/i.test(e3)) { var r3 = e3.match($2); if (r3) { var s3 = r3[2] - 1 || 0, i3 = (r3[7] || "0").substring(0, 3); return n3 ? new Date(Date.UTC(r3[1], s3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, i3)) : new Date(r3[1], s3, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, i3); } } return new Date(e3); }(t3), this.init(); }, g3.init = function() { var t3 = this.$d; this.$y = t3.getFullYear(), this.$M = t3.getMonth(), this.$D = t3.getDate(), this.$W = t3.getDay(), this.$H = t3.getHours(), this.$m = t3.getMinutes(), this.$s = t3.getSeconds(), this.$ms = t3.getMilliseconds(); }, g3.$utils = function() { return O2; }, g3.isValid = function() { return !(this.$d.toString() === l2); }, g3.isSame = function(t3, e3) { var n3 = b2(t3); return this.startOf(e3) <= n3 && n3 <= this.endOf(e3); }, g3.isAfter = function(t3, e3) { return b2(t3) < this.startOf(e3); }, g3.isBefore = function(t3, e3) { return this.endOf(e3) < b2(t3); }, g3.$g = function(t3, e3, n3) { return O2.u(t3) ? this[e3] : this.set(n3, t3); }, g3.unix = function() { return Math.floor(this.valueOf() / 1e3); }, g3.valueOf = function() { return this.$d.getTime(); }, g3.startOf = function(t3, e3) { var n3 = this, r3 = !!O2.u(e3) || e3, f3 = O2.p(t3), l3 = function(t4, e4) { var s3 = O2.w(n3.$u ? Date.UTC(n3.$y, e4, t4) : new Date(n3.$y, e4, t4), n3); return r3 ? s3 : s3.endOf(a2); }, $3 = function(t4, e4) { return O2.w(n3.toDate()[t4].apply(n3.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n3); }, y3 = this.$W, M4 = this.$M, g4 = this.$D, v3 = "set" + (this.$u ? "UTC" : ""); switch (f3) { case h2: return r3 ? l3(1, 0) : l3(31, 11); case c2: return r3 ? l3(1, M4) : l3(0, M4 + 1); case o2: var m3 = this.$locale().weekStart || 0, D3 = (y3 < m3 ? y3 + 7 : y3) - m3; return l3(r3 ? g4 - D3 : g4 + (6 - D3), M4); case a2: case d2: return $3(v3 + "Hours", 0); case u2: return $3(v3 + "Minutes", 1); case i2: return $3(v3 + "Seconds", 2); case s2: return $3(v3 + "Milliseconds", 3); default: return this.clone(); } }, g3.endOf = function(t3) { return this.startOf(t3, false); }, g3.$set = function(t3, e3) { var n3, o3 = O2.p(t3), f3 = "set" + (this.$u ? "UTC" : ""), l3 = (n3 = {}, n3[a2] = f3 + "Date", n3[d2] = f3 + "Date", n3[c2] = f3 + "Month", n3[h2] = f3 + "FullYear", n3[u2] = f3 + "Hours", n3[i2] = f3 + "Minutes", n3[s2] = f3 + "Seconds", n3[r2] = f3 + "Milliseconds", n3)[o3], $3 = o3 === a2 ? this.$D + (e3 - this.$W) : e3; if (o3 === c2 || o3 === h2) { var y3 = this.clone().set(d2, 1); y3.$d[l3]($3), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d; } else l3 && this.$d[l3]($3); return this.init(), this; }, g3.set = function(t3, e3) { return this.clone().$set(t3, e3); }, g3.get = function(t3) { return this[O2.p(t3)](); }, g3.add = function(r3, f3) { var d3, l3 = this; r3 = Number(r3); var $3 = O2.p(f3), y3 = function(t3) { var e3 = b2(l3); return O2.w(e3.date(e3.date() + Math.round(t3 * r3)), l3); }; if ($3 === c2) return this.set(c2, this.$M + r3); if ($3 === h2) return this.set(h2, this.$y + r3); if ($3 === a2) return y3(1); if ($3 === o2) return y3(7); var M4 = (d3 = {}, d3[i2] = e2, d3[u2] = n2, d3[s2] = t2, d3)[$3] || 1, g4 = this.$d.getTime() + r3 * M4; return O2.w(g4, this); }, g3.subtract = function(t3, e3) { return this.add(-1 * t3, e3); }, g3.format = function(t3) { var e3 = this, n3 = this.$locale(); if (!this.isValid()) return n3.invalidDate || l2; var r3 = t3 || "YYYY-MM-DDTHH:mm:ssZ", s3 = O2.z(this), i3 = this.$H, u3 = this.$m, a3 = this.$M, o3 = n3.weekdays, c3 = n3.months, f3 = n3.meridiem, h3 = function(t4, n4, s4, i4) { return t4 && (t4[n4] || t4(e3, r3)) || s4[n4].slice(0, i4); }, d3 = function(t4) { return O2.s(i3 % 12 || 12, t4, "0"); }, $3 = f3 || function(t4, e4, n4) { var r4 = t4 < 12 ? "AM" : "PM"; return n4 ? r4.toLowerCase() : r4; }; return r3.replace(y2, function(t4, r4) { return r4 || function(t5) { switch (t5) { case "YY": return String(e3.$y).slice(-2); case "YYYY": return O2.s(e3.$y, 4, "0"); case "M": return a3 + 1; case "MM": return O2.s(a3 + 1, 2, "0"); case "MMM": return h3(n3.monthsShort, a3, c3, 3); case "MMMM": return h3(c3, a3); case "D": return e3.$D; case "DD": return O2.s(e3.$D, 2, "0"); case "d": return String(e3.$W); case "dd": return h3(n3.weekdaysMin, e3.$W, o3, 2); case "ddd": return h3(n3.weekdaysShort, e3.$W, o3, 3); case "dddd": return o3[e3.$W]; case "H": return String(i3); case "HH": return O2.s(i3, 2, "0"); case "h": return d3(1); case "hh": return d3(2); case "a": return $3(i3, u3, true); case "A": return $3(i3, u3, false); case "m": return String(u3); case "mm": return O2.s(u3, 2, "0"); case "s": return String(e3.$s); case "ss": return O2.s(e3.$s, 2, "0"); case "SSS": return O2.s(e3.$ms, 3, "0"); case "Z": return s3; } return null; }(t4) || s3.replace(":", ""); }); }, g3.utcOffset = function() { return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); }, g3.diff = function(r3, d3, l3) { var $3, y3 = this, M4 = O2.p(d3), g4 = b2(r3), v3 = (g4.utcOffset() - this.utcOffset()) * e2, m3 = this - g4, D3 = function() { return O2.m(y3, g4); }; switch (M4) { case h2: $3 = D3() / 12; break; case c2: $3 = D3(); break; case f2: $3 = D3() / 3; break; case o2: $3 = (m3 - v3) / 6048e5; break; case a2: $3 = (m3 - v3) / 864e5; break; case u2: $3 = m3 / n2; break; case i2: $3 = m3 / e2; break; case s2: $3 = m3 / t2; break; default: $3 = m3; } return l3 ? $3 : O2.a($3); }, g3.daysInMonth = function() { return this.endOf(c2).$D; }, g3.$locale = function() { return D2[this.$L]; }, g3.locale = function(t3, e3) { if (!t3) return this.$L; var n3 = this.clone(), r3 = w2(t3, e3, true); return r3 && (n3.$L = r3), n3; }, g3.clone = function() { return O2.w(this.$d, this); }, g3.toDate = function() { return new Date(this.valueOf()); }, g3.toJSON = function() { return this.isValid() ? this.toISOString() : null; }, g3.toISOString = function() { return this.$d.toISOString(); }, g3.toString = function() { return this.$d.toUTCString(); }, M3; }(), k2 = _2.prototype; return b2.prototype = k2, [["$ms", r2], ["$s", s2], ["$m", i2], ["$H", u2], ["$W", a2], ["$M", c2], ["$y", h2], ["$D", d2]].forEach(function(t3) { k2[t3[1]] = function(e3) { return this.$g(e3, t3[0], t3[1]); }; }), b2.extend = function(t3, e3) { return t3.$i || (t3(e3, _2, b2), t3.$i = true), b2; }, b2.locale = w2, b2.isDayjs = S2, b2.unix = function(t3) { return b2(1e3 * t3); }, b2.en = D2[m2], b2.Ls = D2, b2.p = {}, b2; }(); const _sfc_main$1V = { name: "u-calendar-month", mixins: [mpMixin, mixin], props: { // 是否显示月份背景色 showMark: { type: Boolean, default: true }, // 主题色,对底部按钮和选中日期有效 color: { type: String, default: "#3c9cff" }, // 月份数据 months: { type: Array, default: () => [] }, // 日期选择类型 mode: { type: String, default: "single" }, // 日期行高 rowHeight: { type: [String, Number], default: 58 }, // mode=multiple时,最多可选多少个日期 maxCount: { type: [String, Number], default: Infinity }, // mode=range时,第一个日期底部的提示文字 startText: { type: String, default: "开始" }, // mode=range时,最后一个日期底部的提示文字 endText: { type: String, default: "结束" }, // 默认选中的日期,mode为multiple或range是必须为数组格式 defaultDate: { type: [Array, String, Date], default: null }, // 最小的可选日期 minDate: { type: [String, Number], default: 0 }, // 最大可选日期 maxDate: { type: [String, Number], default: 0 }, // 如果没有设置maxDate,则往后推多少个月 maxMonth: { type: [String, Number], default: 2 }, // 是否为只读状态,只读状态下禁止选择日期 readonly: { type: Boolean, default: () => props$1x.calendar.readonly }, // 日期区间最多可选天数,默认无限制,mode = range时有效 maxRange: { type: [Number, String], default: Infinity }, // 范围选择超过最多可选天数时的提示文案,mode = range时有效 rangePrompt: { type: String, default: "" }, // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 showRangePrompt: { type: Boolean, default: true }, // 是否允许日期范围的起止时间为同一天,mode = range时有效 allowSameDay: { type: Boolean, default: false }, forbidDays: { type: Array, default: () => [] }, forbidDaysToast: { type: String, default: "" } }, data() { return { // 每个日期的宽度 width: 0, // 当前选中的日期item item: {}, selected: [] }; }, watch: { selectedChange: { immediate: true, handler(n2) { this.setDefaultDate(); } } }, computed: { // 多个条件的变化,会引起选中日期的变化,这里统一管理监听 selectedChange() { return [this.minDate, this.maxDate, this.defaultDate]; }, dayStyle(index1, index2, item) { return (index12, index22, item2) => { const style = {}; let week = item2.week; const dayWidth = Number(parseFloat(this.width / 7).toFixed(3).slice(0, -1)); style.height = addUnit(this.rowHeight, "px"); if (index22 === 0) { week = (week === 0 ? 7 : week) - 1; style.marginLeft = addUnit(week * dayWidth, "px"); } if (this.mode === "range") { style.paddingLeft = 0; style.paddingRight = 0; style.paddingBottom = 0; style.paddingTop = 0; } return style; }; }, daySelectStyle() { return (index1, index2, item) => { let date3 = e$1(item.date).format("YYYY-MM-DD"), style = {}; if (this.selected.some((item2) => this.dateSame(item2, date3))) { style.backgroundColor = this.color; } if (this.mode === "single") { if (date3 === this.selected[0]) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; style.borderTopRightRadius = "3px"; style.borderBottomRightRadius = "3px"; } } else if (this.mode === "range") { if (this.selected.length >= 2) { const len = this.selected.length - 1; if (this.dateSame(date3, this.selected[0])) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; } if (this.dateSame(date3, this.selected[len])) { style.borderTopRightRadius = "3px"; style.borderBottomRightRadius = "3px"; } if (e$1(date3).isAfter(e$1(this.selected[0])) && e$1(date3).isBefore(e$1(this.selected[len]))) { style.backgroundColor = colorGradient(this.color, "#ffffff", 100)[90]; style.opacity = 0.7; } } else if (this.selected.length === 1) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; } } else { if (this.selected.some((item2) => this.dateSame(item2, date3))) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; style.borderTopRightRadius = "3px"; style.borderBottomRightRadius = "3px"; } } return style; }; }, // 某个日期是否被选中 textStyle() { return (item) => { const date3 = e$1(item.date).format("YYYY-MM-DD"), style = {}; if (this.selected.some((item2) => this.dateSame(item2, date3))) { style.color = "#ffffff"; } if (this.mode === "range") { const len = this.selected.length - 1; if (e$1(date3).isAfter(e$1(this.selected[0])) && e$1(date3).isBefore(e$1(this.selected[len]))) { style.color = this.color; } } return style; }; }, // 获取底部的提示文字 getBottomInfo() { return (index1, index2, item) => { const date3 = e$1(item.date).format("YYYY-MM-DD"); const bottomInfo = item.bottomInfo; if (this.mode === "range" && this.selected.length > 0) { if (this.selected.length === 1) { if (this.dateSame(date3, this.selected[0])) return this.startText; else return bottomInfo; } else { const len = this.selected.length - 1; if (this.dateSame(date3, this.selected[0]) && this.dateSame(date3, this.selected[1]) && len === 1) { return `${this.startText}/${this.endText}`; } else if (this.dateSame(date3, this.selected[0])) { return this.startText; } else if (this.dateSame(date3, this.selected[len])) { return this.endText; } else { return bottomInfo; } } } else { return bottomInfo; } }; } }, mounted() { this.init(); }, emits: ["monthSelected", "updateMonthTop"], methods: { init() { this.$emit("monthSelected", this.selected); this.$nextTick(() => { sleep(10).then(() => { this.getWrapperWidth(); this.getMonthRect(); }); }); }, monthTitle(item) { if (uni.getLocale() == "zh-Hans" || uni.getLocale() == "zh-Hant") { return item.year + "年" + (item.month < 10 ? "0" + item.month : item.month) + "月"; } else { return (item.month < 10 ? "0" + item.month : item.month) + "/" + item.year; } }, isForbid(item) { let date3 = e$1(item.date).format("YYYY-MM-DD"); if (this.mode !== "range" && this.forbidDays.includes(date3)) { return true; } return false; }, // 判断两个日期是否相等 dateSame(date1, date22) { return e$1(date1).isSame(e$1(date22)); }, // 获取月份数据区域的宽度,因为nvue不支持百分比,所以无法通过css设置每个日期item的宽度 getWrapperWidth() { this.$uGetRect(".u-calendar-month-wrapper").then((size) => { this.width = size.width; }); }, getMonthRect() { const promiseAllArr = this.months.map((item, index2) => this.getMonthRectByPromise( `u-calendar-month-${index2}` )); Promise.all(promiseAllArr).then( (sizes) => { let height = 1; const topArr = []; for (let i2 = 0; i2 < this.months.length; i2++) { topArr[i2] = height; height += sizes[i2].height; } this.$emit("updateMonthTop", topArr); } ); }, // 获取每个月份区域的尺寸 getMonthRectByPromise(el) { return new Promise((resolve) => { this.$uGetRect(`.${el}`).then((size) => { resolve(size); }); }); }, // 点击某一个日期 clickHandler(index1, index2, item) { if (this.readonly) { return; } this.item = item; const date3 = e$1(item.date).format("YYYY-MM-DD"); if (item.disabled) return; if (this.isForbid(item)) { uni.showToast({ title: this.forbidDaysToast }); return; } let selected = deepClone(this.selected); if (this.mode === "single") { selected = [date3]; } else if (this.mode === "multiple") { if (selected.some((item2) => this.dateSame(item2, date3))) { const itemIndex = selected.findIndex((item2) => item2 === date3); selected.splice(itemIndex, 1); } else { if (selected.length < this.maxCount) selected.push(date3); } } else { if (selected.length === 0 || selected.length >= 2) { selected = [date3]; } else if (selected.length === 1) { const existsDate = selected[0]; if (e$1(date3).isBefore(existsDate)) { selected = [date3]; } else if (e$1(date3).isAfter(existsDate)) { if (e$1(e$1(date3).subtract(this.maxRange, "day")).isAfter(e$1(selected[0])) && this.showRangePrompt) { if (this.rangePrompt) { toast(this.rangePrompt); } else { toast(t$1("up.calendar.daysExceed", { days: this.maxRange })); } return; } selected.push(date3); const startDate = selected[0]; const endDate = selected[1]; const arr = []; let i2 = 0; do { arr.push(e$1(startDate).add(i2, "day").format("YYYY-MM-DD")); i2++; } while (e$1(startDate).add(i2, "day").isBefore(e$1(endDate))); arr.push(endDate); selected = arr; } else { if (selected[0] === date3 && !this.allowSameDay) return; selected.push(date3); } } } this.setSelected(selected); }, // 设置默认日期 setDefaultDate() { if (!this.defaultDate) { const selected = [e$1().format("YYYY-MM-DD")]; return this.setSelected(selected, false); } let defaultDate = []; const minDate = this.minDate || e$1().format("YYYY-MM-DD"); const maxDate = this.maxDate || e$1(minDate).add(this.maxMonth - 1, "month").format("YYYY-MM-DD"); if (this.mode === "single") { if (!test.array(this.defaultDate)) { defaultDate = [e$1(this.defaultDate).format("YYYY-MM-DD")]; } else { defaultDate = [this.defaultDate[0]]; } } else { if (!test.array(this.defaultDate)) return; defaultDate = this.defaultDate; } defaultDate = defaultDate.filter((item) => { return e$1(item).isAfter(e$1(minDate).subtract(1, "day")) && e$1(item).isBefore(e$1( maxDate ).add(1, "day")); }); this.setSelected(defaultDate, false); }, setSelected(selected, event = true) { this.selected = selected; event && this.$emit("monthSelected", this.selected, "tap"); } } }; function _sfc_render$1U(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-calendar-month-wrapper", ref: "u-calendar-month-wrapper" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.months, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass([`u-calendar-month-${index2}`]), ref_for: true, ref: `u-calendar-month-${index2}`, id: `month-${index2}` }, [ index2 !== 0 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-calendar-month__title" }, vue.toDisplayString($options.monthTitle(item)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-calendar-month__days" }, [ $props.showMark ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-calendar-month__days__month-mark-wrapper" }, [ vue.createElementVNode( "text", { class: "u-calendar-month__days__month-mark-wrapper__text" }, vue.toDisplayString(item.month), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.date, (item1, index1) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-calendar-month__days__day", [item1.selected && "u-calendar-month__days__day__select--selected"]]), key: index1, style: vue.normalizeStyle([$options.dayStyle(index2, index1, item1)]), onClick: ($event) => $options.clickHandler(index2, index1, item1) }, [ vue.createElementVNode( "view", { class: "u-calendar-month__days__day__select", style: vue.normalizeStyle([$options.daySelectStyle(index2, index1, item1)]) }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["u-calendar-month__days__day__select__info", [item1.disabled || $options.isForbid(item1) ? "u-calendar-month__days__day__select__info--disabled" : ""]]), style: vue.normalizeStyle([$options.textStyle(item1)]) }, vue.toDisplayString(item1.day), 7 /* TEXT, CLASS, STYLE */ ), $options.getBottomInfo(index2, index1, item1) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["u-calendar-month__days__day__select__buttom-info", [item1.disabled || $options.isForbid(item1) ? "u-calendar-month__days__day__select__buttom-info--disabled" : ""]]), style: vue.normalizeStyle([$options.textStyle(item1)]) }, vue.toDisplayString($options.getBottomInfo(index2, index1, item1)), 7 /* TEXT, CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), item1.dot ? (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: "u-calendar-month__days__day__select__dot" })) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 10, ["id"]); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ); } const uMonth = /* @__PURE__ */ _export_sfc(_sfc_main$1V, [["render", _sfc_render$1U], ["__scopeId", "data-v-3c847935"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-calendar/month.vue"]]); const props$1g = defineMixin({ props: { // 日历顶部标题 title: { type: String, default: () => props$1x.calendar.title }, // 是否显示标题 showTitle: { type: Boolean, default: () => props$1x.calendar.showTitle }, // 是否显示副标题 showSubtitle: { type: Boolean, default: () => props$1x.calendar.showSubtitle }, // 日期类型选择,single-选择单个日期,multiple-可以选择多个日期,range-选择日期范围 mode: { type: String, default: () => props$1x.calendar.mode }, // mode=range时,第一个日期底部的提示文字 startText: { type: String, default: () => props$1x.calendar.startText }, // mode=range时,最后一个日期底部的提示文字 endText: { type: String, default: () => props$1x.calendar.endText }, // 自定义列表 customList: { type: Array, default: () => props$1x.calendar.customList }, // 主题色,对底部按钮和选中日期有效 color: { type: String, default: () => props$1x.calendar.color }, // 最小的可选日期 minDate: { type: [String, Number], default: () => props$1x.calendar.minDate }, // 最大可选日期 maxDate: { type: [String, Number], default: () => props$1x.calendar.maxDate }, // 默认选中的日期,mode为multiple或range是必须为数组格式 defaultDate: { type: [Array, String, Date, null], default: () => props$1x.calendar.defaultDate }, // mode=multiple时,最多可选多少个日期 maxCount: { type: [String, Number], default: () => props$1x.calendar.maxCount }, // 日期行高 rowHeight: { type: [String, Number], default: () => props$1x.calendar.rowHeight }, // 日期格式化函数 formatter: { type: [Function, null], default: () => props$1x.calendar.formatter }, // 是否显示农历 showLunar: { type: Boolean, default: () => props$1x.calendar.showLunar }, // 是否显示月份背景色 showMark: { type: Boolean, default: () => props$1x.calendar.showMark }, // 确定按钮的文字 confirmText: { type: String, default: () => props$1x.calendar.confirmText }, // 确认按钮处于禁用状态时的文字 confirmDisabledText: { type: String, default: () => props$1x.calendar.confirmDisabledText }, // 是否显示日历弹窗 show: { type: Boolean, default: () => props$1x.calendar.show }, // 是否允许点击遮罩关闭日历 closeOnClickOverlay: { type: Boolean, default: () => props$1x.calendar.closeOnClickOverlay }, // 是否为只读状态,只读状态下禁止选择日期 readonly: { type: Boolean, default: () => props$1x.calendar.readonly }, // 是否展示确认按钮 showConfirm: { type: Boolean, default: () => props$1x.calendar.showConfirm }, // 日期区间最多可选天数,默认无限制,mode = range时有效 maxRange: { type: [Number, String], default: () => props$1x.calendar.maxRange }, // 范围选择超过最多可选天数时的提示文案,mode = range时有效 rangePrompt: { type: String, default: () => props$1x.calendar.rangePrompt }, // 范围选择超过最多可选天数时,是否展示提示文案,mode = range时有效 showRangePrompt: { type: Boolean, default: () => props$1x.calendar.showRangePrompt }, // 是否允许日期范围的起止时间为同一天,mode = range时有效 allowSameDay: { type: Boolean, default: () => props$1x.calendar.allowSameDay }, // 圆角值 round: { type: [Boolean, String, Number], default: () => props$1x.calendar.round }, // 最多展示月份数量 monthNum: { type: [Number, String], default: 3 }, // 星期文案 weekText: { type: Array, default: props$1x.calendar.weekText }, forbidDays: { type: Array, default: props$1x.calendar.forbidDays }, forbidDaysToast: { type: String, default: props$1x.calendar.forbidDaysToast }, monthFormat: { type: String, default: props$1x.calendar.monthFormat }, // 是否页面内展示 pageInline: { type: Boolean, default: props$1x.calendar.pageInline } } }); var Calendar = { /** * 农历1900-2100的润大小信息表 * @Array Of Property * @return Hex */ lunarInfo: [ 19416, 19168, 42352, 21717, 53856, 55632, 91476, 22176, 39632, 21970, // 1900-1909 19168, 42422, 42192, 53840, 119381, 46400, 54944, 44450, 38320, 84343, // 1910-1919 18800, 42160, 46261, 27216, 27968, 109396, 11104, 38256, 21234, 18800, // 1920-1929 25958, 54432, 59984, 28309, 23248, 11104, 100067, 37600, 116951, 51536, // 1930-1939 54432, 120998, 46416, 22176, 107956, 9680, 37584, 53938, 43344, 46423, // 1940-1949 27808, 46416, 86869, 19872, 42416, 83315, 21168, 43432, 59728, 27296, // 1950-1959 44710, 43856, 19296, 43748, 42352, 21088, 62051, 55632, 23383, 22176, // 1960-1969 38608, 19925, 19152, 42192, 54484, 53840, 54616, 46400, 46752, 103846, // 1970-1979 38320, 18864, 43380, 42160, 45690, 27216, 27968, 44870, 43872, 38256, // 1980-1989 19189, 18800, 25776, 29859, 59984, 27480, 23232, 43872, 38613, 37600, // 1990-1999 51552, 55636, 54432, 55888, 30034, 22176, 43959, 9680, 37584, 51893, // 2000-2009 43344, 46240, 47780, 44368, 21977, 19360, 42416, 86390, 21168, 43312, // 2010-2019 31060, 27296, 44368, 23378, 19296, 42726, 42208, 53856, 60005, 54576, // 2020-2029 23200, 30371, 38608, 19195, 19152, 42192, 118966, 53840, 54560, 56645, // 2030-2039 46496, 22224, 21938, 18864, 42359, 42160, 43600, 111189, 27936, 44448, // 2040-2049 /** Add By JJonline@JJonline.Cn**/ 84835, 37744, 18936, 18800, 25776, 92326, 59984, 27424, 108228, 43744, // 2050-2059 41696, 53987, 51552, 54615, 54432, 55888, 23893, 22176, 42704, 21972, // 2060-2069 21200, 43448, 43344, 46240, 46758, 44368, 21920, 43940, 42416, 21168, // 2070-2079 45683, 26928, 29495, 27296, 44368, 84821, 19296, 42352, 21732, 53600, // 2080-2089 59752, 54560, 55968, 92838, 22224, 19168, 43476, 41680, 53584, 62034, // 2090-2099 54560 ], // 2100 /** * 公历每个月份的天数普通表 * @Array Of Property * @return Number */ solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], /** * 天干地支之天干速查表 * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"] * @return Cn string */ Gan: ["甲", "乙", "丙", "丁", "戊", "己", "庚", "辛", "壬", "癸"], /** * 天干地支之地支速查表 * @Array Of Property * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"] * @return Cn string */ Zhi: ["子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥"], /** * 天干地支之地支速查表<=>生肖 * @Array Of Property * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"] * @return Cn string */ Animals: ["鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪"], /** * 24节气速查表 * @Array Of Property * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"] * @return Cn string */ solarTerm: ["小寒", "大寒", "立春", "雨水", "惊蛰", "春分", "清明", "谷雨", "立夏", "小满", "芒种", "夏至", "小暑", "大暑", "立秋", "处暑", "白露", "秋分", "寒露", "霜降", "立冬", "小雪", "大雪", "冬至"], /** * 1900-2100各年的24节气日期速查表 * @Array Of Property * @return 0x string For splice */ sTermInfo: [ "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd0b06bdb0722c965ce1cfcc920f", "b027097bd097c36b0b6fc9274c91aa", "9778397bd19801ec9210c965cc920e", "97b6b97bd19801ec95f8c965cc920f", "97bd09801d98082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd197c36c9210c9274c91aa", "97b6b97bd19801ec95f8c965cc920e", "97bd09801d98082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec95f8c965cc920e", "97bcf97c3598082c95f8e1cfcc920f", "97bd097bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c3598082c95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf97c359801ec95f8c965cc920f", "97bd097bd07f595b0b6fc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "9778397bd19801ec9210c9274c920e", "97b6b97bd19801ec95f8c965cc920f", "97bd07f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c920e", "97b6b97bd19801ec95f8c965cc920f", "97bd07f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bd07f1487f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c965cc920e", "97bcf7f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b97bd19801ec9210c9274c920e", "97bcf7f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c91aa", "97b6b97bd197c36c9210c9274c920e", "97bcf7f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "9778397bd097c36c9210c9274c920e", "97b6b7f0e47f531b0723b0b6fb0722", "7f0e37f5307f595b0b0bc920fb0722", "7f0e397bd097c36b0b6fc9210c8dc2", "9778397bd097c36b0b70c9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9274c91aa", "97b6b7f0e47f531b0723b0787b0721", "7f0e27f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c91aa", "97b6b7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "9778397bd097c36b0b6fc9210c8dc2", "977837f0e37f149b0723b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f5307f595b0b0bc920fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "977837f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc9210c8dc2", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd097c35b0b6fc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0787b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0b0bb0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14998082b0723b06bd", "7f07e7f0e37f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e397bd07f595b0b0bc920fb0722", "977837f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f1487f595b0b0bb0b6fb0722", "7f0e37f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e37f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e37f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f1487f531b0b0bb0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0723b06bd", "7f07e7f0e47f149b0723b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14998082b0723b06bd", "7f07e7f0e37f14998083b0787b0721", "7f0e27f0e47f531b0723b0b6fb0722", "7f0e37f0e366aa89801eb072297c35", "7ec967f0e37f14898082b0723b02d5", "7f07e7f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e36665b66aa89801e9808297c35", "665f67f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b0721", "7f07e7f0e47f531b0723b0b6fb0722", "7f0e36665b66a449801e9808297c35", "665f67f0e37f14898082b0723b02d5", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e36665b66a449801e9808297c35", "665f67f0e37f14898082b072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e26665b66a449801e9808297c35", "665f67f0e37f1489801eb072297c35", "7ec967f0e37f14998082b0787b06bd", "7f07e7f0e47f531b0723b0b6fb0721", "7f0e27f1487f531b0b0bb0b6fb0722" ], /** * 数字转中文速查表 * @Array Of Property * @trans ['日','一','二','三','四','五','六','七','八','九','十'] * @return Cn string */ nStr1: ["日", "一", "二", "三", "四", "五", "六", "七", "八", "九", "十"], /** * 日期转农历称呼速查表 * @Array Of Property * @trans ['初','十','廿','卅'] * @return Cn string */ nStr2: ["初", "十", "廿", "卅"], /** * 月份转农历称呼速查表 * @Array Of Property * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊'] * @return Cn string */ nStr3: ["正", "二", "三", "四", "五", "六", "七", "八", "九", "十", "冬", "腊"], /** * 返回农历y年一整年的总天数 * @param lunar Year * @return Number * @eg:var count = calendar.lYearDays(1987) ;//count=387 */ lYearDays: function(y2) { var i2; var sum = 348; for (i2 = 32768; i2 > 8; i2 >>= 1) { sum += this.lunarInfo[y2 - 1900] & i2 ? 1 : 0; } return sum + this.leapDays(y2); }, /** * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0 * @param lunar Year * @return Number (0-12) * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6 */ leapMonth: function(y2) { return this.lunarInfo[y2 - 1900] & 15; }, /** * 返回农历y年闰月的天数 若该年没有闰月则返回0 * @param lunar Year * @return Number (0、29、30) * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29 */ leapDays: function(y2) { if (this.leapMonth(y2)) { return this.lunarInfo[y2 - 1900] & 65536 ? 30 : 29; } return 0; }, /** * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法 * @param lunar Year * @return Number (-1、29、30) * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29 */ monthDays: function(y2, m2) { if (m2 > 12 || m2 < 1) { return -1; } return this.lunarInfo[y2 - 1900] & 65536 >> m2 ? 30 : 29; }, /** * 返回公历(!)y年m月的天数 * @param solar Year * @return Number (-1、28、29、30、31) * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30 */ solarDays: function(y2, m2) { if (m2 > 12 || m2 < 1) { return -1; } var ms = m2 - 1; if (ms == 1) { return y2 % 4 == 0 && y2 % 100 != 0 || y2 % 400 == 0 ? 29 : 28; } else { return this.solarMonth[ms]; } }, /** * 农历年份转换为干支纪年 * @param lYear 农历年的年份数 * @return Cn string */ toGanZhiYear: function(lYear) { var ganKey = (lYear - 3) % 10; var zhiKey = (lYear - 3) % 12; if (ganKey == 0) ganKey = 10; if (zhiKey == 0) zhiKey = 12; return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]; }, /** * 公历月、日判断所属星座 * @param cMonth [description] * @param cDay [description] * @return Cn string */ toAstro: function(cMonth, cDay) { var s2 = "魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯"; var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]; return s2.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + "座"; }, /** * 传入offset偏移量返回干支 * @param offset 相对甲子的偏移量 * @return Cn string */ toGanZhi: function(offset) { return this.Gan[offset % 10] + this.Zhi[offset % 12]; }, /** * 传入公历(!)y年获得该年第n个节气的公历日期 * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起 * @return day Number * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春 */ getTerm: function(y2, n2) { if (y2 < 1900 || y2 > 2100) { return -1; } if (n2 < 1 || n2 > 24) { return -1; } var _table = this.sTermInfo[y2 - 1900]; var _info = [ parseInt("0x" + _table.substr(0, 5)).toString(), parseInt("0x" + _table.substr(5, 5)).toString(), parseInt("0x" + _table.substr(10, 5)).toString(), parseInt("0x" + _table.substr(15, 5)).toString(), parseInt("0x" + _table.substr(20, 5)).toString(), parseInt("0x" + _table.substr(25, 5)).toString() ]; var _calday = [ _info[0].substr(0, 1), _info[0].substr(1, 2), _info[0].substr(3, 1), _info[0].substr(4, 2), _info[1].substr(0, 1), _info[1].substr(1, 2), _info[1].substr(3, 1), _info[1].substr(4, 2), _info[2].substr(0, 1), _info[2].substr(1, 2), _info[2].substr(3, 1), _info[2].substr(4, 2), _info[3].substr(0, 1), _info[3].substr(1, 2), _info[3].substr(3, 1), _info[3].substr(4, 2), _info[4].substr(0, 1), _info[4].substr(1, 2), _info[4].substr(3, 1), _info[4].substr(4, 2), _info[5].substr(0, 1), _info[5].substr(1, 2), _info[5].substr(3, 1), _info[5].substr(4, 2) ]; return parseInt(_calday[n2 - 1]); }, /** * 传入农历数字月份返回汉语通俗表示法 * @param lunar month * @return Cn string * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月' */ toChinaMonth: function(m2) { if (m2 > 12 || m2 < 1) { return -1; } var s2 = this.nStr3[m2 - 1]; s2 += "月"; return s2; }, /** * 传入农历日期数字返回汉字表示法 * @param lunar day * @return Cn string * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一' */ toChinaDay: function(d2) { var s2; switch (d2) { case 10: s2 = "初十"; break; case 20: s2 = "二十"; break; case 30: s2 = "三十"; break; default: s2 = this.nStr2[Math.floor(d2 / 10)]; s2 += this.nStr1[d2 % 10]; } return s2; }, /** * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春” * @param y year * @return Cn string * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔' */ getAnimal: function(y2) { return this.Animals[(y2 - 4) % 12]; }, /** * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON * @param y solar year * @param m solar month * @param d solar day * @return JSON object * @eg:__f__('log','at uni_modules/uview-plus/libs/util/calendar.js:381',calendar.solar2lunar(1987,11,01)); */ solar2lunar: function(y2, m2, d2) { if (y2 < 1900 || y2 > 2100) { return -1; } if (y2 == 1900 && m2 == 1 && d2 < 31) { return -1; } if (!y2) { var objDate = /* @__PURE__ */ new Date(); } else { var objDate = new Date(y2, parseInt(m2) - 1, d2); } var i2; var leap = 0; var temp = 0; var y2 = objDate.getFullYear(); var m2 = objDate.getMonth() + 1; var d2 = objDate.getDate(); var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 864e5; for (i2 = 1900; i2 < 2101 && offset > 0; i2++) { temp = this.lYearDays(i2); offset -= temp; } if (offset < 0) { offset += temp; i2--; } var isTodayObj = /* @__PURE__ */ new Date(); var isToday = false; if (isTodayObj.getFullYear() == y2 && isTodayObj.getMonth() + 1 == m2 && isTodayObj.getDate() == d2) { isToday = true; } var nWeek = objDate.getDay(); var cWeek = this.nStr1[nWeek]; if (nWeek == 0) { nWeek = 7; } var year = i2; var leap = this.leapMonth(i2); var isLeap = false; for (i2 = 1; i2 < 13 && offset > 0; i2++) { if (leap > 0 && i2 == leap + 1 && isLeap == false) { --i2; isLeap = true; temp = this.leapDays(year); } else { temp = this.monthDays(year, i2); } if (isLeap == true && i2 == leap + 1) { isLeap = false; } offset -= temp; } if (offset == 0 && leap > 0 && i2 == leap + 1) { if (isLeap) { isLeap = false; } else { isLeap = true; --i2; } } if (offset < 0) { offset += temp; --i2; } var month = i2; var day = offset + 1; var sm = m2 - 1; var gzY = this.toGanZhiYear(year); var firstNode = this.getTerm(y2, m2 * 2 - 1); var secondNode = this.getTerm(y2, m2 * 2); var gzM = this.toGanZhi((y2 - 1900) * 12 + m2 + 11); if (d2 >= firstNode) { gzM = this.toGanZhi((y2 - 1900) * 12 + m2 + 12); } var isTerm = false; var Term = null; if (firstNode == d2) { isTerm = true; Term = this.solarTerm[m2 * 2 - 2]; } if (secondNode == d2) { isTerm = true; Term = this.solarTerm[m2 * 2 - 1]; } var dayCyclical = Date.UTC(y2, sm, 1, 0, 0, 0, 0) / 864e5 + 25567 + 10; var gzD = this.toGanZhi(dayCyclical + d2 - 1); var astro = this.toAstro(m2, d2); return { "lYear": year, "lMonth": month, "lDay": day, "Animal": this.getAnimal(year), "IMonthCn": (isLeap ? "闰" : "") + this.toChinaMonth(month), "IDayCn": this.toChinaDay(day), "cYear": y2, "cMonth": m2, "cDay": d2, "gzYear": gzY, "gzMonth": gzM, "gzDay": gzD, "isToday": isToday, "isLeap": isLeap, "nWeek": nWeek, "ncWeek": "星期" + cWeek, "isTerm": isTerm, "Term": Term, "astro": astro }; }, /** * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON * @param y lunar year * @param m lunar month * @param d lunar day * @param isLeapMonth lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可] * @return JSON object * @eg:__f__('log','at uni_modules/uview-plus/libs/util/calendar.js:500',calendar.lunar2solar(1987,9,10)); */ lunar2solar: function(y2, m2, d2, isLeapMonth) { var isLeapMonth = !!isLeapMonth; var leapMonth = this.leapMonth(y2); this.leapDays(y2); if (isLeapMonth && leapMonth != m2) { return -1; } if (y2 == 2100 && m2 == 12 && d2 > 1 || y2 == 1900 && m2 == 1 && d2 < 31) { return -1; } var day = this.monthDays(y2, m2); var _day = day; if (isLeapMonth) { _day = this.leapDays(y2, m2); } if (y2 < 1900 || y2 > 2100 || d2 > _day) { return -1; } var offset = 0; for (var i2 = 1900; i2 < y2; i2++) { offset += this.lYearDays(i2); } var leap = 0; var isAdd = false; for (var i2 = 1; i2 < m2; i2++) { leap = this.leapMonth(y2); if (!isAdd) { if (leap <= i2 && leap > 0) { offset += this.leapDays(y2); isAdd = true; } } offset += this.monthDays(y2, i2); } if (isLeapMonth) { offset += day; } var stmap = Date.UTC(1900, 1, 30, 0, 0, 0); var calObj = new Date((offset + d2 - 31) * 864e5 + stmap); var cY = calObj.getUTCFullYear(); var cM = calObj.getUTCMonth() + 1; var cD = calObj.getUTCDate(); return this.solar2lunar(cY, cM, cD); } }; const _sfc_main$1U = { name: "u-calendar", mixins: [mpMixin, mixin, props$1g], components: { uHeader, uMonth }, data() { return { // 需要显示的月份的数组 months: [], // 在月份滚动区域中,当前视图中月份的index索引 monthIndex: 0, // 月份滚动区域的高度 listHeight: 0, // month组件中选择的日期数组 selected: [], scrollIntoView: "", scrollIntoViewScroll: "", scrollTop: 0, // 过滤处理方法 innerFormatter: (value2) => value2 }; }, watch: { scrollIntoView: { immediate: true, handler(n2) { } }, selectedChange: { immediate: true, handler(n2) { this.setMonth(); } }, // 打开弹窗时,设置月份数据 show: { immediate: true, handler(n2) { if (n2) { this.setMonth(); } else { this.scrollIntoView = ""; } } } }, computed: { // 由于maxDate和minDate可以为字符串(2021-10-10),或者数值(时间戳),但是dayjs如果接受字符串形式的时间戳会有问题,这里进行处理 innerMaxDate() { return test.number(this.maxDate) ? Number(this.maxDate) : this.maxDate; }, innerMinDate() { return test.number(this.minDate) ? Number(this.minDate) : this.minDate; }, // 多个条件的变化,会引起选中日期的变化,这里统一管理监听 selectedChange() { return [this.innerMinDate, this.innerMaxDate, this.defaultDate]; }, subtitle() { if (this.months.length) { if (uni.getLocale() == "zh-Hans" || uni.getLocale() == "zh-Hant") { return this.months[this.monthIndex].year + "年" + (this.months[this.monthIndex].month < 10 ? "0" + this.months[this.monthIndex].month : this.months[this.monthIndex].month) + "月"; } else { return (this.months[this.monthIndex].month < 10 ? "0" + this.months[this.monthIndex].month : this.months[this.monthIndex].month) + "/" + this.months[this.monthIndex].year; } } else { return ""; } }, buttonDisabled() { if (this.mode === "range") { if (this.selected.length <= 1) { return true; } else { return false; } } else { return false; } } }, mounted() { this.start = Date.now(); this.init(); }, emits: ["confirm", "close"], methods: { addUnit, // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 setFormatter(e2) { this.innerFormatter = e2; }, // month组件内部选择日期后,通过事件通知给父组件 monthSelected(e2, scene = "init") { this.selected = e2; if (!this.showConfirm) { if (this.mode === "multiple" || this.mode === "single" || this.mode === "range" && this.selected.length >= 2) { if (scene === "init") { return; } if (scene === "tap") { this.$emit("confirm", this.selected); } } } }, init() { if (this.innerMaxDate && this.innerMinDate && new Date(this.innerMaxDate).getTime() < new Date(this.innerMinDate).getTime()) { return error("maxDate不能小于minDate时间"); } let bottomPadding = 0; if (this.pageInline) { bottomPadding = 0; } else { bottomPadding = 30; } this.listHeight = this.rowHeight * 5 + bottomPadding; this.setMonth(); }, close() { this.$emit("close"); }, // 点击确定按钮 confirm() { if (!this.buttonDisabled) { this.$emit("confirm", this.selected); } }, // 获得两个日期之间的月份数 getMonths(minDate, maxDate) { const minYear = e$1(minDate).year(); const minMonth = e$1(minDate).month() + 1; const maxYear = e$1(maxDate).year(); const maxMonth = e$1(maxDate).month() + 1; return (maxYear - minYear) * 12 + (maxMonth - minMonth) + 1; }, // 设置月份数据 setMonth() { const minDate = this.innerMinDate || e$1().valueOf(); const maxDate = this.innerMaxDate || e$1(minDate).add(this.monthNum - 1, "month").valueOf(); const months = range$1( 1, this.monthNum, this.getMonths(minDate, maxDate) ); this.months = []; for (let i2 = 0; i2 < months; i2++) { this.months.push({ date: new Array( e$1(minDate).add(i2, "month").daysInMonth() ).fill(1).map((item, index2) => { let day = index2 + 1; const week = e$1(minDate).add(i2, "month").date(day).day(); const date3 = e$1(minDate).add(i2, "month").date(day).format("YYYY-MM-DD"); let bottomInfo = ""; if (this.showLunar) { const lunar = Calendar.solar2lunar( e$1(date3).year(), e$1(date3).month() + 1, e$1(date3).date() ); bottomInfo = lunar.IDayCn; } let config2 = { day, week, // 小于最小允许的日期,或者大于最大的日期,则设置为disabled状态 disabled: e$1(date3).isBefore( e$1(minDate).format("YYYY-MM-DD") ) || e$1(date3).isAfter( e$1(maxDate).format("YYYY-MM-DD") ), // 返回一个日期对象,供外部的formatter获取当前日期的年月日等信息,进行加工处理 date: new Date(date3), bottomInfo, dot: false, month: e$1(minDate).add(i2, "month").month() + 1 }; const formatter = this.formatter || this.innerFormatter; return formatter(config2); }), // 当前所属的月份 month: e$1(minDate).add(i2, "month").month() + 1, // 当前年份 year: e$1(minDate).add(i2, "month").year() }); } }, // 滚动到默认设置的月份 scrollIntoDefaultMonth(selected) { const _index = this.months.findIndex(({ year, month }) => { month = padZero$1(month); return `${year}-${month}` === selected; }); if (_index !== -1) { this.$nextTick(() => { this.scrollIntoView = `month-${_index}`; this.scrollIntoViewScroll = this.scrollIntoView; }); } }, // scroll-view滚动监听 onScroll(event) { const scrollTop = Math.max(0, event.detail.scrollTop); for (let i2 = 0; i2 < this.months.length; i2++) { if (scrollTop >= (this.months[i2].top || this.listHeight)) { this.monthIndex = i2; this.scrollIntoViewScroll = `month-${i2}`; } } }, // 更新月份的top值 updateMonthTop(topArr = []) { topArr.map((item, index2) => { this.months[index2].top = item; }); if (!this.defaultDate) { const selected2 = e$1().format("YYYY-MM"); this.scrollIntoDefaultMonth(selected2); return; } let selected = e$1().format("YYYY-MM"); if (!test.array(this.defaultDate)) { selected = e$1(this.defaultDate).format("YYYY-MM"); } else { selected = e$1(this.defaultDate[0]).format("YYYY-MM"); } this.scrollIntoDefaultMonth(selected); } } }; function _sfc_render$1T(_ctx, _cache, $props, $setup, $data, $options) { const _component_uHeader = vue.resolveComponent("uHeader"); const _component_uMonth = vue.resolveComponent("uMonth"); const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_0$8); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2); return vue.openBlock(), vue.createBlock(_component_u_popup, { show: _ctx.show, mode: "bottom", closeable: !_ctx.pageInline, onClose: $options.close, round: _ctx.round, pageInline: _ctx.pageInline, closeOnClickOverlay: _ctx.closeOnClickOverlay }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-calendar" }, [ vue.createVNode(_component_uHeader, { title: _ctx.title, subtitle: $options.subtitle, showSubtitle: _ctx.showSubtitle, showTitle: _ctx.showTitle, weekText: _ctx.weekText }, null, 8, ["title", "subtitle", "showSubtitle", "showTitle", "weekText"]), vue.createElementVNode("scroll-view", { style: vue.normalizeStyle({ height: $options.addUnit($data.listHeight, "px") }), "scroll-y": "", onScroll: _cache[0] || (_cache[0] = (...args) => $options.onScroll && $options.onScroll(...args)), "scroll-top": $data.scrollTop, scrollIntoView: $data.scrollIntoView }, [ vue.createVNode(_component_uMonth, { color: _ctx.color, rowHeight: _ctx.rowHeight, showMark: _ctx.showMark, months: $data.months, mode: _ctx.mode, maxCount: _ctx.maxCount, startText: _ctx.startText, endText: _ctx.endText, defaultDate: _ctx.defaultDate, minDate: $options.innerMinDate, maxDate: $options.innerMaxDate, maxMonth: _ctx.monthNum, readonly: _ctx.readonly, maxRange: _ctx.maxRange, rangePrompt: _ctx.rangePrompt, showRangePrompt: _ctx.showRangePrompt, allowSameDay: _ctx.allowSameDay, forbidDays: _ctx.forbidDays, forbidDaysToast: _ctx.forbidDaysToast, monthFormat: _ctx.monthFormat, ref: "month", onMonthSelected: $options.monthSelected, onUpdateMonthTop: $options.updateMonthTop }, null, 8, ["color", "rowHeight", "showMark", "months", "mode", "maxCount", "startText", "endText", "defaultDate", "minDate", "maxDate", "maxMonth", "readonly", "maxRange", "rangePrompt", "showRangePrompt", "allowSameDay", "forbidDays", "forbidDaysToast", "monthFormat", "onMonthSelected", "onUpdateMonthTop"]) ], 44, ["scroll-top", "scrollIntoView"]), _ctx.showConfirm ? vue.renderSlot(_ctx.$slots, "footer", { key: 0 }, () => [ vue.createElementVNode("view", { class: "u-calendar__confirm" }, [ vue.createVNode(_component_u_button, { shape: "circle", text: $options.buttonDisabled ? _ctx.confirmDisabledText : _ctx.confirmText, color: _ctx.color, onClick: $options.confirm, disabled: $options.buttonDisabled }, null, 8, ["text", "color", "onClick", "disabled"]) ]) ], true) : vue.createCommentVNode("v-if", true) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show", "closeable", "onClose", "round", "pageInline", "closeOnClickOverlay"]); } const uCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["render", _sfc_render$1T], ["__scopeId", "data-v-c9867878"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-calendar/u-calendar.vue"]]); const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCalendar }, Symbol.toStringTag, { value: "Module" })); const props$1f = defineMixin({ props: { // 是否打乱键盘按键的顺序 random: { type: Boolean, default: false }, // 输入一个中文后,是否自动切换到英文 autoChange: { type: Boolean, default: false } } }); const _sfc_main$1T = { name: "u-car-keyboard", mixins: [mpMixin, mixin, props$1f], data() { return { // 车牌输入时,abc=true为输入车牌号码,bac=false为输入省份中文简称 abc: false }; }, computed: { areaList() { let data = [ "京", "沪", "粤", "津", "冀", "豫", "云", "辽", "黑", "湘", "皖", "鲁", "苏", "浙", "赣", "鄂", "桂", "甘", "晋", "陕", "蒙", "吉", "闽", "贵", "渝", "川", "青", "琼", "宁", "挂", "藏", "港", "澳", "新", "使", "学" ]; let tmp = []; if (this.random) data = randomArray(data); tmp[0] = data.slice(0, 10); tmp[1] = data.slice(10, 20); tmp[2] = data.slice(20, 30); tmp[3] = data.slice(30, 36); return tmp; }, engKeyBoardList() { let data = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "A", "S", "D", "F", "G", "H", "J", "K", "L", "Z", "X", "C", "V", "B", "N", "M" ]; let tmp = []; if (this.random) data = randomArray(data); tmp[0] = data.slice(0, 10); tmp[1] = data.slice(10, 20); tmp[2] = data.slice(20, 30); tmp[3] = data.slice(30, 36); return tmp; } }, emits: ["change", "backspace"], methods: { // 点击键盘按钮 carInputClick(i2, j2) { let value2 = ""; if (this.abc) value2 = this.engKeyBoardList[i2][j2]; else value2 = this.areaList[i2][j2]; if (!this.abc && this.autoChange) sleep(200).then(() => this.abc = true); this.$emit("change", value2); }, // 修改汽车牌键盘的输入模式,中文|英文 changeCarInputMode() { this.abc = !this.abc; }, // 点击退格键 backspaceClick() { this.$emit("backspace"); clearInterval(this.timer); this.timer = null; this.timer = setInterval(() => { this.$emit("backspace"); }, 250); }, clearTimer() { clearInterval(this.timer); this.timer = null; } } }; function _sfc_render$1S(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-keyboard", onTouchmove: _cache[3] || (_cache[3] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.abc ? $options.engKeyBoardList : $options.areaList, (group, i2) => { return vue.openBlock(), vue.createElementBlock("view", { key: i2, class: vue.normalizeClass(["u-keyboard__button", [i2 + 1 === 4 && "u-keyboard__button--center"]]), index: i2 }, [ i2 === 3 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-keyboard__button__inner-wrapper" }, [ vue.createElementVNode("view", { class: "u-keyboard__button__inner-wrapper__left", "hover-class": "u-hover-class", "hover-stay-time": 200, onClick: _cache[0] || (_cache[0] = (...args) => $options.changeCarInputMode && $options.changeCarInputMode(...args)) }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["u-keyboard__button__inner-wrapper__left__lang", [!$data.abc && "u-keyboard__button__inner-wrapper__left__lang--active"]]) }, "中", 2 /* CLASS */ ), vue.createElementVNode("text", { class: "u-keyboard__button__inner-wrapper__left__line" }, "/"), vue.createElementVNode( "text", { class: vue.normalizeClass(["u-keyboard__button__inner-wrapper__left__lang", [$data.abc && "u-keyboard__button__inner-wrapper__left__lang--active"]]) }, "英", 2 /* CLASS */ ) ]) ])) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(group, (item, j2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-keyboard__button__inner-wrapper", key: j2 }, [ vue.createElementVNode("view", { class: "u-keyboard__button__inner-wrapper__inner", "hover-stay-time": 200, onClick: ($event) => $options.carInputClick(i2, j2), "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-keyboard__button__inner-wrapper__inner__text" }, vue.toDisplayString(item), 1 /* TEXT */ ) ], 8, ["onClick"]) ]); }), 128 /* KEYED_FRAGMENT */ )), i2 === 3 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, onTouchstart: _cache[1] || (_cache[1] = (...args) => $options.backspaceClick && $options.backspaceClick(...args)), onTouchend: _cache[2] || (_cache[2] = (...args) => $options.clearTimer && $options.clearTimer(...args)), class: "u-keyboard__button__inner-wrapper" }, [ vue.createElementVNode("view", { class: "u-keyboard__button__inner-wrapper__right", "hover-class": "u-hover-class", "hover-stay-time": 200 }, [ vue.createVNode(_component_up_icon, { size: "28", name: "backspace", color: "#303133" }) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true) ], 10, ["index"]); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ); } const __easycom_1$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1T, [["render", _sfc_render$1S], ["__scopeId", "data-v-e3990159"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-car-keyboard/u-car-keyboard.vue"]]); const __vite_glob_0_13 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_1$2 }, Symbol.toStringTag, { value: "Module" })); const propsCard = defineMixin({ props: { // 与屏幕两侧是否留空隙 full: { type: Boolean, default: () => props$1x.card.full }, // 标题 title: { type: String, default: () => props$1x.card.title }, // 标题颜色 titleColor: { type: String, default: () => props$1x.card.titleColor }, // 标题字体大小 titleSize: { type: [Number, String], default: () => props$1x.card.titleSize }, // 副标题 subTitle: { type: String, default: () => props$1x.card.subTitle }, // 副标题颜色 subTitleColor: { type: String, default: () => props$1x.card.subTitleColor }, // 副标题字体大小 subTitleSize: { type: [Number, String], default: () => props$1x.card.subTitleSize }, // 是否显示外部边框,只对full=false时有效(卡片与边框有空隙时) border: { type: Boolean, default: () => props$1x.card.border }, // 用于标识点击了第几个 index: { type: [Number, String, Object], default: () => props$1x.card.index }, // 用于隔开上下左右的边距,带单位的写法,如:"30px 30px","20px 20px 30px 30px" margin: { type: String, default: () => props$1x.card.margin }, // card卡片的圆角 borderRadius: { type: [Number, String], default: () => props$1x.card.borderRadius }, // 头部自定义样式,对象形式 headStyle: { type: Object, default: () => props$1x.card.headStyle }, // 主体自定义样式,对象形式 bodyStyle: { type: Object, default: () => props$1x.card.bodyStyle }, // 底部自定义样式,对象形式 footStyle: { type: Object, default: () => props$1x.card.footStyle }, // 头部是否下边框 headBorderBottom: { type: Boolean, default: () => props$1x.card.headBorderBottom }, // 底部是否有上边框 footBorderTop: { type: Boolean, default: () => props$1x.card.footBorderTop }, // 标题左边的缩略图 thumb: { type: String, default: () => props$1x.card.thumb }, // 缩略图宽高 thumbWidth: { type: [String, Number], default: () => props$1x.card.thumbWidth }, // 缩略图是否为圆形 thumbCircle: { type: Boolean, default: () => props$1x.card.thumbCircle }, // 给head,body,foot的内边距 padding: { type: [String, Number], default: () => props$1x.card.padding }, paddingHead: { type: [String, Number], default: () => props$1x.card.paddingHead }, paddingBody: { type: [String, Number], default: () => props$1x.card.paddingBody }, paddingFoot: { type: [String, Number], default: () => props$1x.card.paddingFoot }, // 是否显示头部 showHead: { type: Boolean, default: () => props$1x.card.showHead }, // 是否显示尾部 showFoot: { type: Boolean, default: () => props$1x.card.showFoot }, // 卡片外围阴影,字符串形式 boxShadow: { type: String, default: () => props$1x.card.boxShadow } } }); const _sfc_main$1S = { name: "up-card", data() { return {}; }, mixins: [mpMixin, mixin, propsCard], emits: ["click", "head-click", "body-click", "foot-click"], methods: { addStyle, addUnit, getPx, click() { this.$emit("click", this.index); }, headClick() { this.$emit("head-click", this.index); }, bodyClick() { this.$emit("body-click", this.index); }, footClick() { this.$emit("foot-click", this.index); } } }; function _sfc_render$1R(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-card", { "u-border": _ctx.border, "u-card-full": _ctx.full, "u-card--border": $options.getPx(_ctx.borderRadius) > 0 }]), onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.click && $options.click(...args), ["stop"])), style: vue.normalizeStyle({ borderRadius: $options.addUnit(_ctx.borderRadius), margin: _ctx.margin, boxShadow: _ctx.boxShadow }) }, [ _ctx.showHead ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-card__head", { "u-border-bottom": _ctx.headBorderBottom }]), style: vue.normalizeStyle([{ padding: $options.addUnit(_ctx.paddingHead || _ctx.padding) }, _ctx.headStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.headClick && $options.headClick(...args)) }, [ !_ctx.$slots.head ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-flex u-flex-between" }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-card__head--left u-flex u-line-1" }, [ _ctx.thumb ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _ctx.thumb, class: "u-card__head--left__thumb", mode: "aspectFill", style: vue.normalizeStyle({ height: $options.addUnit(_ctx.thumbWidth), width: $options.addUnit(_ctx.thumbWidth), borderRadius: _ctx.thumbCircle ? "50px" : "4px" }) }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "u-card__head--left__title u-line-1", style: vue.normalizeStyle({ fontSize: $options.addUnit(_ctx.titleSize), color: _ctx.titleColor }) }, vue.toDisplayString(_ctx.title), 5 /* TEXT, STYLE */ ) ])) : vue.createCommentVNode("v-if", true), _ctx.subTitle ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-card__head--right u-line-1" }, [ vue.createElementVNode( "text", { class: "u-card__head__title__text", style: vue.normalizeStyle({ fontSize: $options.addUnit(_ctx.subTitleSize), color: _ctx.subTitleColor }) }, vue.toDisplayString(_ctx.subTitle), 5 /* TEXT, STYLE */ ) ])) : vue.createCommentVNode("v-if", true) ])) : vue.renderSlot(_ctx.$slots, "head", { key: 1 }, void 0, true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { onClick: _cache[1] || (_cache[1] = (...args) => $options.bodyClick && $options.bodyClick(...args)), class: "u-card__body", style: vue.normalizeStyle([{ padding: $options.addUnit(_ctx.paddingBody || _ctx.padding) }, _ctx.bodyStyle]) }, [ vue.renderSlot(_ctx.$slots, "body", {}, void 0, true) ], 4 /* STYLE */ ), _ctx.showFoot ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["u-card__foot", { "u-border-top": _ctx.footBorderTop }]), onClick: _cache[2] || (_cache[2] = (...args) => $options.footClick && $options.footClick(...args)), style: vue.normalizeStyle([{ padding: _ctx.$slots.foot ? $options.addUnit(_ctx.paddingFoot || _ctx.padding) : 0 }, _ctx.footStyle]) }, [ vue.renderSlot(_ctx.$slots, "foot", {}, void 0, true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const uCard = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["render", _sfc_render$1R], ["__scopeId", "data-v-040f828b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-card/u-card.vue"]]); const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCard }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1R = { name: "up-cate-tab", props: { height: { type: String, default: "100%" }, tabList: { type: Array, default: () => { return []; } }, tabKeyName: { type: String, default: "name" }, itemKeyName: { type: String, default: "name" }, current: { type: Number, default: 0 } }, watch: { tabList: { deep: true, handler(newVal, oldVal) { sleep(30); this.getMenuItemTop(); this.leftMenuStatus(this.innerCurrent); } }, current(nval) { this.innerCurrent = nval; this.leftMenuStatus(this.innerCurrent); }, height() { this.getMenuItemTop(); this.leftMenuStatus(this.innerCurrent); } }, emits: ["update:current"], data() { return { scrollTop: 0, //tab标题的滚动条位置 scrollIntoView: "", // 滚动至哪个元素 oldScrollTop: 0, innerCurrent: 0, // 预设当前项的值 menuHeight: 0, // 左边菜单的高度 menuItemHeight: 0, // 左边菜单item的高度 itemId: "", // 栏目右边scroll-view用于滚动的id menuItemPos: [], rects: [], arr: [], scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度 timer: null // 定时器 }; }, mounted() { this.innerCurrent = this.current; this.leftMenuStatus(this.innerCurrent); this.getMenuItemTop(); }, methods: { addUnit, // 点击左边的栏目切换 async swichMenu(index2) { if (this.arr.length == 0) { await this.getMenuItemTop(); } this.scrollIntoView = "item" + index2; if (index2 == this.innerCurrent) return; this.$nextTick(function() { this.innerCurrent = index2; this.$emit("update:current", index2); }); }, // 获取一个目标元素的高度 getElRect(elClass, dataVal) { return new Promise((resolve, reject) => { const query = uni.createSelectorQuery().in(this); query.select("." + elClass).fields({ size: true }, (res) => { if (!res) { setTimeout(() => { this.getElRect(elClass); }, 10); return; } this[dataVal] = res.height; resolve(); }).exec(); }); }, // 观测元素相交状态 async observer() { await this.$nextTick(); if (this._observerList) { this._observerList.forEach((observer) => { observer.disconnect(); }); } this._observerList = []; this.tabList.map((val, index2) => { let observer = uni.createIntersectionObserver(this); this._observerList.push(observer); observer.relativeTo(".u-cate-tab__right-box", { top: 10 }).observe("#item" + index2, (res) => { if (res.intersectionRatio > 0) { formatAppLog("log", "at uni_modules/uview-plus/components/u-cate-tab/u-cate-tab.vue:170", "res", res); let id = res.id ? res.id.substring(4) : index2; this.leftMenuStatus(parseInt(id)); } }); }); }, // 设置左边菜单的滚动状态 async leftMenuStatus(index2) { this.innerCurrent = index2; this.$emit("update:current", index2); if (this.menuHeight == 0 || this.menuItemHeight == 0) { await this.getElRect("u-cate-tab__menu-scroll-view", "menuHeight"); await this.getElRect("u-cate-tab__item", "menuItemHeight"); } this.scrollTop = index2 * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2; }, // 获取右边菜单每个item到顶部的距离 async getMenuItemTop() { return new Promise((resolve) => { let selectorQuery = uni.createSelectorQuery().in(this); selectorQuery.selectAll(".u-cate-tab__page-item").boundingClientRect((rects) => { if (!rects.length) { setTimeout(() => { this.getMenuItemTop(); }, 100); return; } this.rects = rects; this.arr = []; rects.forEach((rect) => { this.arr.push(rect.top - rects[0].top); }); resolve(); }).exec(); }); }, // 右边菜单滚动 async rightScroll(e2) { this.oldScrollTop = e2.detail.scrollTop; if (this.arr.length == 0) { await this.getMenuItemTop(); } if (this.timer) return; if (!this.menuHeight) { await this.getElRect("u-cate-tab__menu-scroll-view", "menuHeight"); } setTimeout(() => { this.timer = null; let scrollHeight = e2.detail.scrollTop + 1; for (let i2 = 0; i2 < this.arr.length; i2++) { let height1 = this.arr[i2]; let height2 = this.arr[i2 + 1]; if (!height2 || scrollHeight >= height1 && scrollHeight <= height2) { this.leftMenuStatus(i2); return; } } }, 100); } } }; function _sfc_render$1Q(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-cate-tab", style: vue.normalizeStyle({ height: $options.addUnit($props.height) }) }, [ vue.createElementVNode("view", { class: "u-cate-tab__wrap" }, [ vue.createElementVNode("scroll-view", { class: "u-cate-tab__view u-cate-tab__menu-scroll-view", "scroll-y": "", "scroll-with-animation": "", "scroll-top": $data.scrollTop, "scroll-into-view": $data.itemId }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.tabList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass(["u-cate-tab__item", [$data.innerCurrent == index2 ? "u-cate-tab__item-active" : ""]]), onClick: vue.withModifiers(($event) => $options.swichMenu(index2), ["stop"]) }, [ vue.renderSlot(_ctx.$slots, "tabItem", { item }, void 0, true), !_ctx.$slots["tabItem"] ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-line-1" }, vue.toDisplayString(item[$props.tabKeyName]), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 8, ["scroll-top", "scroll-into-view"]), vue.createElementVNode("scroll-view", { "scroll-top": $data.scrollRightTop, "scroll-with-animation": "", "scroll-into-view": $data.scrollIntoView, "scroll-y": "", class: "u-cate-tab__right-box", onScroll: _cache[0] || (_cache[0] = (...args) => $options.rightScroll && $options.rightScroll(...args)) }, [ vue.createElementVNode("view", { class: "u-cate-tab__right-top" }, [ vue.renderSlot(_ctx.$slots, "rightTop", { tabList: $props.tabList }, void 0, true) ]), vue.createElementVNode("view", { class: "u-cate-tab__page-view" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.tabList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-cate-tab__page-item", id: "item" + index2, key: index2 }, [ vue.renderSlot(_ctx.$slots, "itemList", { item }, void 0, true), !_ctx.$slots["itemList"] ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode("view", { class: "item-title" }, [ vue.createElementVNode( "text", null, vue.toDisplayString(item[$props.tabKeyName]), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item-container" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.children, (item1, index1) => { return vue.renderSlot(_ctx.$slots, "pageItem", { key: index1, pageItem: item1 }, () => [ vue.createElementVNode("view", { class: "thumb-box" }, [ vue.createElementVNode("image", { class: "item-menu-image", src: item1.icon, mode: "" }, null, 8, ["src"]), vue.createElementVNode( "view", { class: "item-menu-name" }, vue.toDisplayString(item1[$props.itemKeyName]), 1 /* TEXT */ ) ]) ], true); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 8, ["id"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 40, ["scroll-top", "scroll-into-view"]) ]) ], 4 /* STYLE */ ); } const uCateTab = /* @__PURE__ */ _export_sfc(_sfc_main$1R, [["render", _sfc_render$1Q], ["__scopeId", "data-v-963a5e40"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-cate-tab/u-cate-tab.vue"]]); const __vite_glob_0_15 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCateTab }, Symbol.toStringTag, { value: "Module" })); const props$1e = defineMixin({ props: { // 分组标题 title: { type: String, default: () => props$1x.cellGroup.title }, // 是否显示外边框 border: { type: Boolean, default: () => props$1x.cellGroup.border } } }); const _sfc_main$1Q = { name: "u-cell-group", mixins: [mpMixin, mixin, props$1e], methods: { addStyle } }; function _sfc_render$1P(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock( "view", { style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]), class: vue.normalizeClass([[_ctx.customClass], "u-cell-group"]) }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-cell-group__title" }, [ vue.renderSlot(_ctx.$slots, "title", {}, () => [ vue.createElementVNode( "text", { class: "u-cell-group__title__text" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ ) ], true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-cell-group__wrapper" }, [ _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]) ], 6 /* CLASS, STYLE */ ); } const uCellGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1Q, [["render", _sfc_render$1P], ["__scopeId", "data-v-014d39dc"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-cell-group/u-cell-group.vue"]]); const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCellGroup }, Symbol.toStringTag, { value: "Module" })); const props$1d = defineMixin({ props: { // 标题 title: { type: [String, Number], default: () => props$1x.cell.title }, // 标题下方的描述信息 label: { type: [String, Number], default: () => props$1x.cell.label }, // 右侧的内容 value: { type: [String, Number], default: () => props$1x.cell.value }, // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址) icon: { type: String, default: () => props$1x.cell.icon }, // 是否禁用cell disabled: { type: Boolean, default: () => props$1x.cell.disabled }, // 是否显示下边框 border: { type: Boolean, default: () => props$1x.cell.border }, // 内容是否垂直居中(主要是针对右侧的value部分) center: { type: Boolean, default: () => props$1x.cell.center }, // 点击后跳转的URL地址 url: { type: String, default: () => props$1x.cell.url }, // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作 linkType: { type: String, default: () => props$1x.cell.linkType }, // 是否开启点击反馈(表现为点击时加上灰色背景) clickable: { type: Boolean, default: () => props$1x.cell.clickable }, // 是否展示右侧箭头并开启点击反馈 isLink: { type: Boolean, default: () => props$1x.cell.isLink }, // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件) required: { type: Boolean, default: () => props$1x.cell.required }, // 右侧的图标箭头 rightIcon: { type: String, default: () => props$1x.cell.rightIcon }, // 右侧箭头的方向,可选值为:left,up,down arrowDirection: { type: String, default: () => props$1x.cell.arrowDirection }, // 左侧图标样式 iconStyle: { type: [Object, String], default: () => { return props$1x.cell.iconStyle; } }, // 右侧箭头图标的样式 rightIconStyle: { type: [Object, String], default: () => { return props$1x.cell.rightIconStyle; } }, // 标题的样式 titleStyle: { type: [Object, String], default: () => { return props$1x.cell.titleStyle; } }, // 单位元的大小,可选值为large size: { type: String, default: () => props$1x.cell.size }, // 点击cell是否阻止事件传播 stop: { type: Boolean, default: () => props$1x.cell.stop }, // 标识符,cell被点击时返回 name: { type: [Number, String], default: () => props$1x.cell.name } } }); const _sfc_main$1P = { name: "u-cell", data() { return {}; }, mixins: [mpMixin, mixin, props$1d], computed: { titleTextStyle() { return addStyle(this.titleStyle); } }, emits: ["click"], methods: { addStyle, testEmpty: test.empty, // 点击cell clickHandler(e2) { if (this.disabled) return; this.$emit("click", { name: this.name }); this.openPage(); this.stop && this.preventEvent(e2); } } }; function _sfc_render$1O(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-cell", [_ctx.customClass]]), style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]), "hover-class": !_ctx.disabled && (_ctx.clickable || _ctx.isLink) ? "u-cell--clickable" : "", "hover-stay-time": 250, onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-cell__body", [_ctx.center && "u-cell--center", _ctx.size === "large" && "u-cell__body--large"]]) }, [ vue.createElementVNode("view", { class: "u-cell__body__content" }, [ _ctx.$slots.icon || _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-cell__left-icon-wrap" }, [ _ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, name: _ctx.icon, "custom-style": _ctx.iconStyle, size: _ctx.size === "large" ? 22 : 18 }, null, 8, ["name", "custom-style", "size"])) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-cell__title" }, [ vue.createCommentVNode(" 将slot与默认内容用if/else分开主要是因为微信小程序不支持slot嵌套传递,这样才能解决collapse组件的slot不失效问题,label暂时未用到。 "), _ctx.$slots.title || !_ctx.title ? vue.renderSlot(_ctx.$slots, "title", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: vue.normalizeClass(["u-cell__title-text", [_ctx.required && "u-cell--required", _ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__title-text--large"]]), style: vue.normalizeStyle([$options.titleTextStyle]) }, vue.toDisplayString(_ctx.title), 7 /* TEXT, CLASS, STYLE */ )), vue.renderSlot(_ctx.$slots, "label", {}, () => [ _ctx.label ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["u-cell__label", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__label--large"]]) }, vue.toDisplayString(_ctx.label), 3 /* TEXT, CLASS */ )) : vue.createCommentVNode("v-if", true) ], true) ]) ]), vue.renderSlot(_ctx.$slots, "value", {}, () => [ !$options.testEmpty(_ctx.value) ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["u-cell__value", [_ctx.disabled && "u-cell--disabled", _ctx.size === "large" && "u-cell__value--large"]]) }, vue.toDisplayString(_ctx.value), 3 /* TEXT, CLASS */ )) : vue.createCommentVNode("v-if", true) ], true), _ctx.$slots["right-icon"] || _ctx.isLink ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]]) }, [ _ctx.rightIcon && !_ctx.$slots["right-icon"] ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: _ctx.rightIcon, "custom-style": _ctx.rightIconStyle, color: _ctx.disabled ? "#c8c9cc" : "info", size: _ctx.size === "large" ? 18 : 16 }, null, 8, ["name", "custom-style", "color", "size"])) : vue.renderSlot(_ctx.$slots, "right-icon", { key: 1 }, void 0, true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), _ctx.$slots["righticon"] ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["u-cell__right-icon-wrap", [`u-cell__right-icon-wrap--${_ctx.arrowDirection}`]]) }, [ vue.renderSlot(_ctx.$slots, "righticon", {}, void 0, true) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ), _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true) ], 14, ["hover-class"]); } const __easycom_0$7 = /* @__PURE__ */ _export_sfc(_sfc_main$1P, [["render", _sfc_render$1O], ["__scopeId", "data-v-3fd6feca"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-cell/u-cell.vue"]]); const __vite_glob_0_17 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$7 }, Symbol.toStringTag, { value: "Module" })); const props$1c = defineMixin({ props: { // 标识符 name: { type: String, default: () => props$1x.checkboxGroup.name }, // 绑定的值 modelValue: { type: Array, default: () => props$1x.checkboxGroup.value }, // 形状,circle-圆形,square-方形 shape: { type: String, default: () => props$1x.checkboxGroup.shape }, // 是否禁用全部checkbox disabled: { type: Boolean, default: () => props$1x.checkboxGroup.disabled }, // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 activeColor: { type: String, default: () => props$1x.checkboxGroup.activeColor }, // 未选中的颜色 inactiveColor: { type: String, default: () => props$1x.checkboxGroup.inactiveColor }, // 整个组件的尺寸,默认px size: { type: [String, Number], default: () => props$1x.checkboxGroup.size }, // 布局方式,row-横向,column-纵向 placement: { type: String, default: () => props$1x.checkboxGroup.placement }, // label的字体大小,px单位 labelSize: { type: [String, Number], default: () => props$1x.checkboxGroup.labelSize }, // label的字体颜色 labelColor: { type: [String], default: () => props$1x.checkboxGroup.labelColor }, // 是否禁止点击文本操作 labelDisabled: { type: Boolean, default: () => props$1x.checkboxGroup.labelDisabled }, // 图标颜色 iconColor: { type: String, default: () => props$1x.checkboxGroup.iconColor }, // 图标的大小,单位px iconSize: { type: [String, Number], default: () => props$1x.checkboxGroup.iconSize }, // 勾选图标的对齐方式,left-左边,right-右边 iconPlacement: { type: String, default: () => props$1x.checkboxGroup.iconPlacement }, // 竖向配列时,是否显示下划线 borderBottom: { type: Boolean, default: () => props$1x.checkboxGroup.borderBottom } } }); const _sfc_main$1O = { name: "u-checkbox-group", mixins: [mpMixin, mixin, props$1c], computed: { // 这里computed的变量,都是子组件u-checkbox需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化 // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-checkbox-group) // 拉取父组件新的变化后的参数 parentData() { return [ this.modelValue, this.disabled, this.inactiveColor, this.activeColor, this.size, this.labelDisabled, this.shape, this.iconSize, this.borderBottom, this.placement ]; }, bemClass() { return this.bem("checkbox-group", ["placement"]); } }, watch: { // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 parentData: { handler() { if (this.children.length) { this.children.map((child) => { typeof child.init === "function" && child.init(); }); } }, deep: true } }, data() { return {}; }, created() { this.children = []; }, emits: ["update:modelValue", "change"], methods: { // 将其他的checkbox设置为未选中的状态 unCheckedOther(childInstance) { const values = []; this.children.map((child) => { if (child.isChecked) { values.push(child.name); } }); this.$emit("update:modelValue", values); this.$emit("change", values); } } }; function _sfc_render$1N(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-checkbox-group", $options.bemClass]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 2 /* CLASS */ ); } const uCheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1O, [["render", _sfc_render$1N], ["__scopeId", "data-v-ff0492f0"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-checkbox-group/u-checkbox-group.vue"]]); const __vite_glob_0_18 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCheckboxGroup }, Symbol.toStringTag, { value: "Module" })); const props$1b = defineMixin({ props: { // checkbox的名称 name: { type: [String, Number, Boolean], default: () => props$1x.checkbox.name }, // 形状,square为方形,circle为圆型 shape: { type: String, default: () => props$1x.checkbox.shape }, // 整体的大小 size: { type: [String, Number], default: () => props$1x.checkbox.size }, // 是否默认选中 checked: { type: Boolean, default: () => props$1x.checkbox.checked }, // 是否禁用 disabled: { type: [String, Boolean], default: () => props$1x.checkbox.disabled }, // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 activeColor: { type: String, default: () => props$1x.checkbox.activeColor }, // 未选中的颜色 inactiveColor: { type: String, default: () => props$1x.checkbox.inactiveColor }, // 图标的大小,单位px iconSize: { type: [String, Number], default: () => props$1x.checkbox.iconSize }, // 图标颜色 iconColor: { type: String, default: () => props$1x.checkbox.iconColor }, // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式 label: { type: [String, Number], default: () => props$1x.checkbox.label }, // label的字体大小,px单位 labelSize: { type: [String, Number], default: () => props$1x.checkbox.labelSize }, // label的颜色 labelColor: { type: String, default: () => props$1x.checkbox.labelColor }, // 是否禁止点击提示语选中复选框 labelDisabled: { type: [String, Boolean], default: () => props$1x.checkbox.labelDisabled }, // 是否独立使用 usedAlone: { type: [Boolean], default: () => false } } }); const _sfc_main$1N = { name: "u-checkbox", mixins: [mpMixin, mixin, props$1b], data() { return { isChecked: false, // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式 // 故只能使用如此方法 parentData: { iconSize: 12, labelDisabled: null, disabled: null, shape: "square", activeColor: null, inactiveColor: null, size: 18, modelValue: null, iconColor: null, placement: "row", borderBottom: false, iconPlacement: "left" } }; }, computed: { // 是否禁用,如果父组件u-radios-group禁用的话,将会忽略子组件的配置 elDisabled() { return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false; }, // 是否禁用label点击 elLabelDisabled() { return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false; }, // 组件尺寸,对应size的值,默认值为21px elSize() { return this.size ? this.size : this.parentData.size ? this.parentData.size : 21; }, // 组件的勾选图标的尺寸,默认12px elIconSize() { return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12; }, // 组件选中激活时的颜色 elActiveColor() { return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff"; }, // 组件选未中激活时的颜色 elInactiveColor() { return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc"; }, // label的颜色 elLabelColor() { return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266"; }, // 组件的形状 elShape() { return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle"; }, // label大小 elLabelSize() { return addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15"); }, elIconColor() { const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff"; if (this.elDisabled) { return this.isChecked ? this.elInactiveColor : "transparent"; } else { return this.isChecked ? iconColor : "transparent"; } }, iconClasses() { let classes = []; classes.push("u-checkbox__icon-wrap--" + this.elShape); if (this.elDisabled) { classes.push("u-checkbox__icon-wrap--disabled"); } if (this.isChecked && this.elDisabled) { classes.push("u-checkbox__icon-wrap--disabled--checked"); } return classes; }, iconWrapStyle() { const style = {}; style.backgroundColor = this.isChecked && !this.elDisabled ? this.elActiveColor : "#ffffff"; style.borderColor = this.isChecked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor; style.width = addUnit(this.elSize); style.height = addUnit(this.elSize); if (!this.usedAlone) { if (this.parentData.iconPlacement === "right") { style.marginRight = 0; } } return style; }, checkboxStyle() { const style = {}; if (!this.usedAlone) { if (this.parentData.borderBottom && this.parentData.placement === "row") { error("检测到您将borderBottom设置为true,需要同时将up-checkbox-group的placement设置为column才有效"); } if (this.parentData.borderBottom && this.parentData.placement === "column") { style.paddingBottom = "8px"; } } return deepMerge$1(style, addStyle(this.customStyle)); } }, mounted() { this.init(); }, emits: ["change", "update:checked"], methods: { init() { if (!this.usedAlone) { this.updateParentData(); if (!this.parent) { error("up-checkbox必须搭配up-checkbox-group组件使用"); } const value2 = this.parentData.modelValue; if (this.checked) { this.isChecked = true; } else if (!this.usedAlone && test.array(value2)) { this.isChecked = value2.some((item) => { return item === this.name; }); } } else { if (this.checked) { this.isChecked = true; } } }, updateParentData() { this.getParentData("u-checkbox-group"); }, // 横向两端排列时,点击组件即可触发选中事件 wrapperClickHandler(e2) { if (!this.usedAlone) { this.parentData.iconPlacement === "right" && this.iconClickHandler(e2); } else { this.iconClickHandler(e2); } }, // 点击图标 iconClickHandler(e2) { this.preventEvent(e2); if (!this.elDisabled) { this.setRadioCheckedStatus(); } }, // 点击label labelClickHandler(e2) { this.preventEvent(e2); if (!this.elLabelDisabled && !this.elDisabled) { this.setRadioCheckedStatus(); } }, emitEvent() { this.$emit("change", this.isChecked, { name: this.name }); if (this.usedAlone) { this.$emit("update:checked", this.isChecked); } this.$nextTick(() => { formValidate(this, "change"); }); }, // 改变组件选中状态 // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-checkbox实例 // 将本组件外的其他u-checkbox的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态 setRadioCheckedStatus() { this.isChecked = !this.isChecked; this.emitEvent(); if (!this.usedAlone) { typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this); } } }, watch: { checked(newValue, oldValue) { if (newValue !== this.isChecked) { this.isChecked = newValue; } } } }; function _sfc_render$1M(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-checkbox cursor-pointer", [`u-checkbox-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]), style: vue.normalizeStyle([$options.checkboxStyle]), onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-checkbox__icon-wrap cursor-pointer", $options.iconClasses]), onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])), style: vue.normalizeStyle([$options.iconWrapStyle]) }, [ vue.renderSlot(_ctx.$slots, "icon", { elIconSize: $options.elIconSize, elIconColor: $options.elIconColor }, () => [ vue.createVNode(_component_up_icon, { class: "u-checkbox__icon-wrap__icon", name: "checkbox-mark", size: $options.elIconSize, color: $options.elIconColor }, null, 8, ["size", "color"]) ], true) ], 6 /* CLASS, STYLE */ ), vue.createElementVNode("view", { class: "u-checkbox__label-wrap cursor-pointer", onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])) }, [ vue.renderSlot(_ctx.$slots, "label", { label: _ctx.label, elDisabled: $options.elDisabled }, () => [ vue.createElementVNode( "text", { style: vue.normalizeStyle({ color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor, fontSize: $options.elLabelSize, lineHeight: $options.elLabelSize }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ ) ], true) ]) ], 6 /* CLASS, STYLE */ ); } const uCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$1N, [["render", _sfc_render$1M], ["__scopeId", "data-v-41713600"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-checkbox/u-checkbox.vue"]]); const __vite_glob_0_19 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCheckbox }, Symbol.toStringTag, { value: "Module" })); const props$1a = defineMixin({ props: { percentage: { type: [String, Number], default: () => props$1x.circleProgress.percentage } } }); const _sfc_main$1M = { name: "u-circle-progress", mixins: [mpMixin, mixin, props$1a], data() { return { leftBorderColor: "rgb(200, 200, 200)", rightBorderColor: "rgb(200, 200, 200)" }; }, computed: { leftSyle() { const style = {}; style.borderTopColor = this.leftBorderColor; style.borderRightColor = this.leftBorderColor; return style; }, rightSyle() { const style = {}; style.borderLeftColor = this.rightBorderColor; style.borderBottomColor = this.rightBorderColor; return style; } }, mounted() { sleep().then(() => { this.rightBorderColor = "rgb(66, 185, 131)"; }); }, methods: { init() { animation.transition(this.$refs["right-circle"].ref, { styles: { transform: "rotate(45deg)", transformOrigin: "center center" } }, () => { this.rightBorderColor = "rgb(66, 185, 131)"; }); } } }; function _sfc_render$1L(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-circle-progress" }, [ vue.createElementVNode("view", { class: "u-circle-progress__left" }, [ vue.createElementVNode( "view", { class: "u-circle-progress__left__circle", style: vue.normalizeStyle([$options.leftSyle]), ref: "left-circle" }, null, 4 /* STYLE */ ) ]), vue.createElementVNode("view", { class: "u-circle-progress__right" }, [ vue.createElementVNode( "view", { class: "u-circle-progress__right__circle", ref: "right-circle", style: vue.normalizeStyle([$options.rightSyle]) }, null, 4 /* STYLE */ ) ]), vue.createElementVNode("view", { class: "u-circle-progress__circle" }) ]); } const uCircleProgress = /* @__PURE__ */ _export_sfc(_sfc_main$1M, [["render", _sfc_render$1L], ["__scopeId", "data-v-8379d4ea"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-circle-progress/u-circle-progress.vue"]]); const __vite_glob_0_20 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCircleProgress }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1L = { name: "u-city-locate", props: { indexList: { type: Array, default: ["🔥"] }, cityList: { type: Array, default: () => { return [ [ { name: "北京", value: "beijing" }, { name: "上海", value: "shanghai" }, { name: "广州", value: "guangzhou" }, { name: "深圳", value: "shenzhen" }, { name: "杭州", value: "hangzhou" } ] ]; } }, locationType: { type: String, default: "wgs84" }, currentCity: { type: String, default: "" }, nameKey: { type: String, default: "name" } }, computed: {}, watch: { currentCity(val) { this.locationCity = val; } }, data() { return { locationCity: t$1("up.cityLocate.locating") + "...." }; }, emits: ["location-success", "select-city"], methods: { t: t$1, // 获取城市 selectedCity(city) { this.locationCity = city[this.nameKey]; this.$emit("select-city", { locationCity: this.locationCity }); }, // 定位操作 location() { let That = this; uni.getLocation({ type: this.locationType, geocode: true, success(res) { formatAppLog("log", "at uni_modules/uview-plus/components/u-city-locate/u-city-locate.vue:120", res); That.locationCity = res.address && res.address.city; That.$emit("location-success", { ...res, locationCity: That.locationCity }); }, fail() { That.locationCity = t$1("up.cityLocate.fail"); } }); } }, // 页面挂载后进行异步操作 created() { }, mounted() { this.location(); } }; function _sfc_render$1K(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_index_anchor = vue.resolveComponent("up-index-anchor"); const _component_up_line = vue.resolveComponent("up-line"); const _component_up_index_item = vue.resolveComponent("up-index-item"); const _component_up_index_list = vue.resolveComponent("up-index-list"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-city-locate" }, [ vue.createVNode(_component_up_index_list, { indexList: $props.indexList }, { header: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-current-city-wrap" }, [ vue.createElementVNode( "view", { class: "u-current-city-title" }, vue.toDisplayString($options.t("up.cityLocate.locateCity")), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "u-current-city-item", onClick: _cache[0] || (_cache[0] = (...args) => $options.location && $options.location(...args)) }, [ vue.createElementVNode( "view", { class: "u-location-city" }, vue.toDisplayString($data.locationCity), 1 /* TEXT */ ) ]) ]) ]), footer: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-safe-area-inset--bottom" }, [ vue.createElementVNode("text", { class: "list__footer" }) ]) ]), default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.cityList, (item, index2) => { return vue.openBlock(), vue.createBlock( _component_up_index_item, { key: index2 }, { default: vue.withCtx(() => [ vue.createVNode(_component_up_index_anchor, { text: $props.indexList[index2] }, null, 8, ["text"]), index2 == 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "hot-city-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item, (item1, index1) => { return vue.openBlock(), vue.createElementBlock("view", { class: "", onClick: ($event) => $options.selectedCity(item1) }, [ vue.createElementVNode( "view", { class: "hot-city-item" }, vue.toDisplayString(item1[$props.nameKey]), 1 /* TEXT */ ) ], 8, ["onClick"]); }), 256 /* UNKEYED_FRAGMENT */ )) ])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(item, (item1, index1) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item-list", key: index1 }, [ vue.createElementVNode("view", { class: "list__item", onClick: ($event) => $options.selectedCity(item1) }, [ vue.createElementVNode( "text", { class: "list__item__city-name" }, vue.toDisplayString(item1[$props.nameKey]), 1 /* TEXT */ ) ], 8, ["onClick"]), vue.createVNode(_component_up_line) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 2 /* DYNAMIC */ }, 1024 /* DYNAMIC_SLOTS */ ); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["indexList"]) ]); } const uCityLocate = /* @__PURE__ */ _export_sfc(_sfc_main$1L, [["render", _sfc_render$1K], ["__scopeId", "data-v-8eca2484"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-city-locate/u-city-locate.vue"]]); const __vite_glob_0_21 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCityLocate }, Symbol.toStringTag, { value: "Module" })); const props$19 = defineMixin({ props: { // 键盘弹起时,是否自动上推页面 adjustPosition: { type: Boolean, default: () => props$1x.codeInput.adjustPosition }, // 最大输入长度 maxlength: { type: [String, Number], default: () => props$1x.codeInput.maxlength }, // 是否用圆点填充 dot: { type: Boolean, default: () => props$1x.codeInput.dot }, // 显示模式,box-盒子模式,line-底部横线模式 mode: { type: String, default: () => props$1x.codeInput.mode }, // 是否细边框 hairline: { type: Boolean, default: () => props$1x.codeInput.hairline }, // 字符间的距离 space: { type: [String, Number], default: () => props$1x.codeInput.space }, // 预置值 modelValue: { type: [String, Number], default: () => props$1x.codeInput.value }, // 是否自动获取焦点 focus: { type: Boolean, default: () => props$1x.codeInput.focus }, // 字体是否加粗 bold: { type: Boolean, default: () => props$1x.codeInput.bold }, // 字体颜色 color: { type: String, default: () => props$1x.codeInput.color }, // 字体大小 fontSize: { type: [String, Number], default: () => props$1x.codeInput.fontSize }, // 输入框的大小,宽等于高 size: { type: [String, Number], default: () => props$1x.codeInput.size }, // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true disabledKeyboard: { type: Boolean, default: () => props$1x.codeInput.disabledKeyboard }, // 边框和线条颜色 borderColor: { type: String, default: () => props$1x.codeInput.borderColor }, // 是否禁止输入"."符号 disabledDot: { type: Boolean, default: () => props$1x.codeInput.disabledDot } } }); const _sfc_main$1K = { name: "u-code-input", mixins: [mpMixin, mixin, props$19], data() { return { inputValue: "", isFocus: this.focus, timer: null, opacity: 1 }; }, watch: { modelValue: { immediate: true, handler(val) { this.inputValue = String(val).substring(0, this.maxlength); } }, isFocus: { handler(val) { } } }, created() { }, beforeUnmount() { }, computed: { // 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for codeLength() { return new Array(Number(this.maxlength)); }, // 循环item的样式 itemStyle() { return (index2) => { const style = { width: addUnit(this.size), height: addUnit(this.size) }; if (this.mode === "box") { style.border = `${this.hairline ? 0.5 : 1}px solid ${this.borderColor}`; if (getPx(this.space) === 0) { if (index2 === 0) { style.borderTopLeftRadius = "3px"; style.borderBottomLeftRadius = "3px"; } if (index2 === this.codeLength.length - 1) { style.borderTopRightRadius = "3px"; style.borderBottomRightRadius = "3px"; } if (index2 !== this.codeLength.length - 1) { style.borderRight = "none"; } } } if (index2 !== this.codeLength.length - 1) { style.marginRight = addUnit(this.space); } else { style.marginRight = 0; } return style; }; }, // 将输入的值,转为数组,给item历遍时,根据当前的索引显示数组的元素 codeArray() { return String(this.inputValue).split(""); }, // 下划线模式下,横线的样式 lineStyle() { const style = {}; style.height = this.hairline ? "2px" : "4px"; style.width = addUnit(this.size); style.backgroundColor = this.borderColor; return style; } }, emits: ["change", "finish", "update:modelValue"], methods: { addUnit, // 监听输入框的值发生变化 inputHandler(e2) { const value2 = e2.detail.value; this.inputValue = value2; if (this.disabledDot) { this.$nextTick(() => { this.inputValue = value2.replace(".", ""); }); } this.$emit("change", value2); this.$emit("update:modelValue", value2); if (String(value2).length >= Number(this.maxlength)) { this.$emit("finish", value2); } } } }; function _sfc_render$1J(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-code-input" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.codeLength, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-code-input__item", style: vue.normalizeStyle([$options.itemStyle(index2)]), key: index2 }, [ _ctx.dot && $options.codeArray.length > index2 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-code-input__item__dot" })) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: vue.normalizeStyle({ fontSize: $options.addUnit(_ctx.fontSize), fontWeight: _ctx.bold ? "bold" : "normal", color: _ctx.color }) }, vue.toDisplayString($options.codeArray[index2]), 5 /* TEXT, STYLE */ )), _ctx.mode === "line" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "u-code-input__item__line", style: vue.normalizeStyle([$options.lineStyle]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $data.isFocus && $options.codeArray.length === index2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, style: vue.normalizeStyle({ backgroundColor: _ctx.color }), class: "u-code-input__item__cursor" }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("input", { disabled: _ctx.disabledKeyboard, type: "number", focus: _ctx.focus, value: $data.inputValue, maxlength: _ctx.maxlength, adjustPosition: _ctx.adjustPosition, class: "u-code-input__input", onInput: _cache[0] || (_cache[0] = (...args) => $options.inputHandler && $options.inputHandler(...args)), style: vue.normalizeStyle({ height: $options.addUnit(_ctx.size) }), onFocus: _cache[1] || (_cache[1] = ($event) => $data.isFocus = true), onBlur: _cache[2] || (_cache[2] = ($event) => $data.isFocus = false) }, null, 44, ["disabled", "focus", "value", "maxlength", "adjustPosition"]) ]); } const uCodeInput = /* @__PURE__ */ _export_sfc(_sfc_main$1K, [["render", _sfc_render$1J], ["__scopeId", "data-v-10e44dac"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-code-input/u-code-input.vue"]]); const __vite_glob_0_22 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCodeInput }, Symbol.toStringTag, { value: "Module" })); const props$18 = defineMixin({ props: { // 倒计时总秒数 seconds: { type: [String, Number], default: () => props$1x.code.seconds }, // 尚未开始时提示 startText: { type: String, default: () => props$1x.code.startText }, // 正在倒计时中的提示 changeText: { type: String, default: () => props$1x.code.changeText }, // 倒计时结束时的提示 endText: { type: String, default: () => props$1x.code.endText }, // 是否在H5刷新或各端返回再进入时继续倒计时 keepRunning: { type: Boolean, default: () => props$1x.code.keepRunning }, // 为了区分多个页面,或者一个页面多个倒计时组件本地存储的继续倒计时变了 uniqueKey: { type: String, default: () => props$1x.code.uniqueKey } } }); const _sfc_main$1J = { name: "u-code", mixins: [mpMixin, mixin, props$18], data() { return { secNum: this.seconds, timer: null, canGetCode: true // 是否可以执行验证码操作 }; }, mounted() { this.checkKeepRunning(); }, watch: { seconds: { immediate: true, handler(n2) { this.secNum = n2; } } }, emits: ["start", "end", "change"], methods: { checkKeepRunning() { let lastTimestamp = Number(uni.getStorageSync(this.uniqueKey + "_$uCountDownTimestamp")); if (!lastTimestamp) return this.changeEvent(this.startText); let nowTimestamp = Math.floor(+/* @__PURE__ */ new Date() / 1e3); if (this.keepRunning && lastTimestamp && lastTimestamp > nowTimestamp) { this.secNum = lastTimestamp - nowTimestamp; uni.removeStorageSync(this.uniqueKey + "_$uCountDownTimestamp"); this.start(); } else { this.changeEvent(this.startText); } }, // 开始倒计时 start() { if (this.timer) { clearInterval(this.timer); this.timer = null; } this.$emit("start"); this.canGetCode = false; this.changeEvent(this.changeText.replace(/x|X/, this.secNum)); this.timer = setInterval(() => { if (--this.secNum) { this.changeEvent(this.changeText.replace(/x|X/, this.secNum)); } else { clearInterval(this.timer); this.timer = null; this.changeEvent(this.endText); this.secNum = this.seconds; this.$emit("end"); this.canGetCode = true; } }, 1e3); this.setTimeToStorage(); }, // 重置,可以让用户再次获取验证码 reset() { this.canGetCode = true; clearInterval(this.timer); this.secNum = this.seconds; this.changeEvent(this.endText); }, changeEvent(text) { this.$emit("change", text); }, // 保存时间戳,为了防止倒计时尚未结束,H5刷新或者各端的右上角返回上一页再进来 setTimeToStorage() { if (!this.keepRunning || !this.timer) return; if (this.secNum > 0 && this.secNum <= this.seconds) { let nowTimestamp = Math.floor(+/* @__PURE__ */ new Date() / 1e3); uni.setStorage({ key: this.uniqueKey + "_$uCountDownTimestamp", data: nowTimestamp + Number(this.secNum) }); } } }, // 组件销毁的时候,清除定时器,否则定时器会继续存在,系统不会自动清除 beforeUnmount() { this.setTimeToStorage(); clearTimeout(this.timer); this.timer = null; } }; function _sfc_render$1I(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-code" }, [ vue.createCommentVNode(" 此组件功能由js完成,无需写html逻辑 ") ]); } const uCode = /* @__PURE__ */ _export_sfc(_sfc_main$1J, [["render", _sfc_render$1I], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-code/u-code.vue"]]); const __vite_glob_0_23 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCode }, Symbol.toStringTag, { value: "Module" })); const props$17 = defineMixin({ props: { // 占父容器宽度的多少等分,总分为12份 span: { type: [String, Number], default: () => props$1x.col.span }, // 指定栅格左侧的间隔数(总12栏) offset: { type: [String, Number], default: () => props$1x.col.offset }, // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) justify: { type: String, default: () => props$1x.col.justify }, // 垂直对齐方式,可选值为top、center、bottom、stretch align: { type: String, default: () => props$1x.col.align }, // 文字对齐方式 textAlign: { type: String, default: () => props$1x.col.textAlign } } }); const _sfc_main$1I = { name: "u-col", mixins: [mpMixin, mixin, props$17], data() { return { width: 0, parentData: { gutter: 0 }, gridNum: 12 }; }, // 微信小程序中 options 选项 options: { virtualHost: true // 将自定义节点设置成虚拟的,更加接近Vue组件的表现。我们不希望自定义组件的这个节点本身可以设置样式、响应 flex 布局等 }, computed: { uJustify() { if (this.justify == "end" || this.justify == "start") return "flex-" + this.justify; else if (this.justify == "around" || this.justify == "between") return "space-" + this.justify; else return this.justify; }, uAlignItem() { if (this.align == "top") return "flex-start"; if (this.align == "bottom") return "flex-end"; else return this.align; }, colStyle() { const style = { // 这里写成"padding: 0 10px"的形式是因为nvue的需要 paddingLeft: addUnit(getPx(this.parentData.gutter) / 2), paddingRight: addUnit(getPx(this.parentData.gutter) / 2), alignItems: this.uAlignItem, justifyContent: this.uJustify, textAlign: this.textAlign, // 在非nvue上,使用百分比形式 flex: `0 0 ${100 / this.gridNum * this.span}%`, marginLeft: 100 / 12 * this.offset + "%" }; return deepMerge$1(style, addStyle(this.customStyle)); } }, mounted() { this.init(); }, emits: ["click"], methods: { async init() { this.updateParentData(); this.width = await this.parent.getComponentWidth(); }, updateParentData() { this.getParentData("u-row"); }, clickHandler(e2) { this.$emit("click"); } } }; function _sfc_render$1H(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-col", [ "u-col-" + _ctx.span ]]), ref: "u-col", style: vue.normalizeStyle([$options.colStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const uCol = /* @__PURE__ */ _export_sfc(_sfc_main$1I, [["render", _sfc_render$1H], ["__scopeId", "data-v-2ae1a870"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-col/u-col.vue"]]); const __vite_glob_0_24 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCol }, Symbol.toStringTag, { value: "Module" })); const props$16 = defineMixin({ props: { // 标题 title: { type: String, default: () => props$1x.collapseItem.title }, // 标题的样式 titleStyle: { type: [Object, String], default: () => { return props$1x.collapseItem.titleStyle; } }, // 标题右侧内容 value: { type: String, default: () => props$1x.collapseItem.value }, // 标题下方的描述信息 label: { type: String, default: () => props$1x.collapseItem.label }, // 是否禁用折叠面板 disabled: { type: Boolean, default: () => props$1x.collapseItem.disabled }, // 是否展示右侧箭头并开启点击反馈 isLink: { type: Boolean, default: () => props$1x.collapseItem.isLink }, // 是否开启点击反馈 clickable: { type: Boolean, default: () => props$1x.collapseItem.clickable }, // 是否显示内边框 border: { type: Boolean, default: () => props$1x.collapseItem.border }, // 标题的对齐方式 align: { type: String, default: () => props$1x.collapseItem.align }, // 唯一标识符 name: { type: [String, Number], default: () => props$1x.collapseItem.name }, // 标题左侧图片,可为绝对路径的图片或内置图标 icon: { type: String, default: () => props$1x.collapseItem.icon }, // 面板展开收起的过渡时间,单位ms duration: { type: Number, default: () => props$1x.collapseItem.duration }, // 显示右侧图标 showRight: { type: Boolean, default: () => props$1x.collapseItem.showRight }, // 左侧图标样式 iconStyle: { type: [Object, String], default: () => { return props$1x.collapseItem.iconStyle; } }, // 右侧箭头图标的样式 rightIconStyle: { type: [Object, String], default: () => { return props$1x.collapseItem.rightIconStyle; } }, cellCustomStyle: { type: [Object, String], default: () => { return props$1x.collapseItem.cellCustomStyle; } }, cellCustomClass: { type: String, default: () => props$1x.collapseItem.cellCustomClass } } }); const _sfc_main$1H = { name: "u-collapse-item", mixins: [mpMixin, mixin, props$16], data() { return { elId: guid(), // uni.createAnimation的导出数据 animationData: {}, // 是否展开状态 expanded: false, // 根据expanded确定是否显示border,为了控制展开时,cell的下划线更好的显示效果,进行一定时间的延时 showBorder: false, // 是否动画中,如果是则不允许继续触发点击 animating: false, // 父组件u-collapse的参数 parentData: { accordion: false, border: false } }; }, watch: { expanded(n2) { clearTimeout(this.timer); this.timer = null; this.timer = setTimeout(() => { this.showBorder = n2; }, n2 ? 10 : 290); } }, mounted() { this.init(); }, methods: { // 异步获取内容,或者动态修改了内容时,需要重新初始化 async init() { this.updateParentData(); if (!this.parent) { return error("u-collapse-item必须要搭配u-collapse组件使用"); } const { value: value2, accordion, children = [] } = this.parent; if (accordion) { if (test.array(value2)) { return error("手风琴模式下,u-collapse组件的value参数不能为数组"); } this.expanded = this.name == value2; } else { if (!test.array(value2) && value2 !== null) { return error("非手风琴模式下,u-collapse组件的value参数必须为数组"); } this.expanded = (value2 || []).some((item) => item == this.name); } await vue.nextTick(); this.setContentAnimate(); }, updateParentData() { this.getParentData("u-collapse"); }, async setContentAnimate() { const rect = await this.queryRect(); const height = this.expanded ? rect.height : 0; this.animating = true; const animation2 = uni.createAnimation({ timingFunction: "ease-in-out" }); animation2.height(height).step({ duration: this.duration }).step(); this.animationData = animation2.export(); sleep(this.duration).then(() => { this.animating = false; }); }, // 点击collapsehead头部 clickHandler() { if (this.disabled && this.animating) return; this.parent && this.parent.onChange(this); }, // 查询内容高度 queryRect() { return new Promise((resolve) => { this.$uGetRect(`#${this.elId}`).then((size) => { resolve(size); }); }); } } }; function _sfc_render$1G(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_cell = resolveEasycom(vue.resolveDynamicComponent("u-cell"), __easycom_0$7); const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock("view", { class: "u-collapse-item" }, [ vue.createVNode(_component_u_cell, { title: _ctx.$slots.title ? "" : _ctx.title, value: _ctx.value, label: _ctx.label, icon: _ctx.icon, isLink: _ctx.isLink, clickable: _ctx.clickable, border: $data.parentData.border && $data.showBorder, onClick: $options.clickHandler, arrowDirection: $data.expanded ? "up" : "down", disabled: _ctx.disabled, customClass: _ctx.cellCustomClass, customStyle: _ctx.cellCustomStyle }, { title: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "title", {}, () => [ !_ctx.$slots.title && _ctx.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) ]), icon: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ !_ctx.$slots.icon && _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, size: 22, name: _ctx.icon }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true) ], true) ]), value: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "value", {}, () => [ !_ctx.$slots.value && _ctx.value ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, vue.toDisplayString(_ctx.value), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) ]), "right-icon": vue.withCtx(() => [ _ctx.showRight ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ !_ctx.$slots["right-icon"] ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, size: 16, name: "arrow-right" })) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "right-icon", {}, void 0, true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]), _: 3 /* FORWARDED */ }, 8, ["title", "value", "label", "icon", "isLink", "clickable", "border", "onClick", "arrowDirection", "disabled", "customClass", "customStyle"]), vue.createElementVNode("view", { class: "u-collapse-item__content", animation: $data.animationData, ref: "animation" }, [ vue.createElementVNode("view", { class: "u-collapse-item__content__text content-class", id: $data.elId, ref: $data.elId }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 8, ["id"]) ], 8, ["animation"]), $data.parentData.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true) ]); } const uCollapseItem = /* @__PURE__ */ _export_sfc(_sfc_main$1H, [["render", _sfc_render$1G], ["__scopeId", "data-v-82f3baf9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-collapse-item/u-collapse-item.vue"]]); const __vite_glob_0_25 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCollapseItem }, Symbol.toStringTag, { value: "Module" })); const props$15 = defineMixin({ props: { // 当前展开面板的name,非手风琴模式:[],手风琴模式:string | number value: { type: [String, Number, Array, null], default: () => props$1x.collapse.value }, // 是否手风琴模式 accordion: { type: Boolean, default: () => props$1x.collapse.accordion }, // 是否显示外边框 border: { type: Boolean, default: () => props$1x.collapse.border } } }); const _sfc_main$1G = { name: "u-collapse", mixins: [mpMixin, mixin, props$15], watch: { needInit() { this.init(); }, // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 parentData() { if (this.children.length) { this.children.map((child) => { typeof child.updateParentData === "function" && child.updateParentData(); }); } } }, created() { this.children = []; }, computed: { needInit() { return [this.accordion, this.value]; } }, emits: ["open", "close", "change"], methods: { // 重新初始化一次内部的所有子元素 init() { this.children.map((child) => { child.init(); }); }, /** * collapse-item被点击时触发,由collapse统一处理各子组件的状态 * @param {Object} target 被操作的面板的实例 */ onChange(target) { let changeArr = []; this.children.map((child, index2) => { if (this.accordion) { child.expanded = child === target ? !target.expanded : false; child.setContentAnimate(); } else { if (child === target) { child.expanded = !child.expanded; child.setContentAnimate(); } } changeArr.push({ // 如果没有定义name属性,则默认返回组件的index索引 name: child.name || index2, status: child.expanded ? "open" : "close" }); }); this.$emit("change", changeArr); this.$emit(target.expanded ? "open" : "close", target.name); } } }; function _sfc_render$1F(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock("view", { class: "u-collapse" }, [ _ctx.border ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default") ]); } const uCollapse = /* @__PURE__ */ _export_sfc(_sfc_main$1G, [["render", _sfc_render$1F], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-collapse/u-collapse.vue"]]); const __vite_glob_0_26 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCollapse }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1F = { name: "up-color-picker", props: { // 初始颜色值 modelValue: { type: String, default: "#ff0000" }, // 常用颜色列表 commonColors: { type: Array, default: () => [] } }, data() { return { show: false, // 颜色类型索引:0-纯色,1-渐变色 colorTypeIndex: 0, // 纯色相关数据 hue: 0, saturation: 100, lightness: 50, alpha: 1, saturationPosition: { x: 150, y: 0 }, huePosition: 0, alphaPosition: 0, // 将在initColor中设置为最右侧 // 渐变色相关数据 gradientColors: [ { color: "#ff0000", percent: 0 }, { color: "#0000ff", percent: 1 } ], gradientDirections: [ { label: "从左到右", value: "to right" }, { label: "从上到下", value: "to bottom" }, { label: "从左上到右下", value: "to bottom right" }, { label: "从右上到左下", value: "to bottom left" } ], currentDirection: { label: "从左到右", value: "to right" }, showDirectionPicker: false, // 当前选中颜色 currentColor: "#ff0000", // 渐变色控制相关 draggingPointerIndex: -1, directionPointer: { x: 20, y: 20 }, // 默认向右(在圆的右侧) // 渐变节点颜色修改相关 editingGradientIndex: -1, // 保存纯色和渐变色的各自状态 solidColorState: { hue: 0, saturation: 100, lightness: 50, alpha: 1, saturationPosition: { x: 150, y: 0 }, huePosition: 0, alphaPosition: 0, // 将在initColor中设置为最右侧 currentColor: "#ff0000" }, gradientColorState: { gradientColors: [ { color: "#ff0000", percent: 0 }, { color: "#0000ff", percent: 1 } ], currentDirection: { label: "从左到右", value: "to right" }, directionPointer: { x: 100, y: 0 } }, // 区分预览类型:solid-纯色预览,gradient-整体渐变预览,gradient-point-渐变点预览 previewType: "solid" }; }, computed: { // 渐变色样式 gradientStyle() { const colors = this.gradientColors.map((item) => `${item.color} ${Math.round(item.percent * 100)}%`).join(", "); return `linear-gradient(${this.currentDirection.value}, ${colors})`; }, // 显示的颜色预览值 displayColor() { if (this.previewType === "gradient-point" && this.editingGradientIndex >= 0) { return this.gradientColors[this.editingGradientIndex].color; } formatAppLog("log", "at uni_modules/uview-plus/components/u-color-picker/u-color-picker.vue:251", this.editingGradientIndex); return this.currentColor; } }, watch: { show(newVal) { if (newVal) { this.initColor(); } }, colorTypeIndex(newVal) { if (newVal == 0) { this.editingGradientIndex = -1; } } }, mounted() { this.initColor(); }, emits: ["update:modelValue", "confirm", "close"], methods: { // 初始化颜色 initColor() { if (this.modelValue) { this.currentColor = this.modelValue; if (this.modelValue.includes("linear-gradient")) { this.colorTypeIndex = 1; this.parseGradientColor(this.modelValue); this.previewType = "gradient"; } else { this.colorTypeIndex = 0; this.parseSolidColor(this.modelValue); this.previewType = "solid"; } } this.initDirectionPointer(); this.initAlphaPosition(); }, // 初始化alpha位置为最右侧 async initAlphaPosition() { const query = uni.createSelectorQuery().in(this); query.select(".up-color-picker__alpha").boundingClientRect(); await this.$nextTick(); query.exec((res) => { const rect = res[0]; if (rect) { this.alphaPosition = rect.width || 150; } else { this.alphaPosition = 150; } this.solidColorState.alphaPosition = this.alphaPosition; this.updateSolidColor(); }); }, // 初始化方向指针位置 initDirectionPointer() { const angle = this.getDirectionAngle(this.currentDirection.value); this.setDirectionPointerByAngle(angle); }, // 根据方向值获取角度 getDirectionAngle(direction) { switch (direction) { case "to right": return 0; case "to bottom": return 90; case "to left": return 180; case "to top": return 270; case "to bottom right": return 45; case "to bottom left": return 135; case "to top left": return 225; case "to top right": return 315; default: return 0; } }, // 根据角度设置方向指针位置 setDirectionPointerByAngle(angle) { const radian = angle * Math.PI / 180; const radius = 20; this.directionPointer = { x: radius * Math.cos(radian) + 20, // 20是圆心位置 y: radius * Math.sin(radian) + 20 }; }, // 打开颜色选择器以修改渐变节点颜色 openColorPickerForGradient(index2) { this.editingGradientIndex = index2; const color2 = this.gradientColors[index2].color; this.currentColor = color2; this.previewType = "gradient-point"; if (!color2.includes("linear-gradient")) { this.colorTypeIndex = 0; this.parseSolidColor(color2); this.gradientColorState = { gradientColors: [...this.gradientColors], currentDirection: { ...this.currentDirection }, directionPointer: { ...this.directionPointer } }; } }, // 解析纯色 parseSolidColor(color2) { this.currentColor = color2; if (this.editingGradientIndex >= 0) { this.gradientColors[this.editingGradientIndex].color = color2; this.colorTypeIndex = 1; Object.assign(this, this.solidColorState); this.previewType = "gradient-point"; } else { this.previewType = "solid"; } }, // 解析渐变色 parseGradientColor(gradient) { this.currentColor = gradient; }, // 切换颜色类型 changeColorType(index2) { if (this.colorTypeIndex === 0) { this.solidColorState = { hue: this.hue, saturation: this.saturation, lightness: this.lightness, alpha: this.alpha, saturationPosition: { ...this.saturationPosition }, huePosition: this.huePosition, alphaPosition: this.alphaPosition, currentColor: this.currentColor }; } else { this.gradientColorState = { gradientColors: [...this.gradientColors], currentDirection: { ...this.currentDirection }, directionPointer: { ...this.directionPointer } }; } this.colorTypeIndex = index2; if (index2 === 0) { Object.assign(this, this.solidColorState); this.previewType = "solid"; } else { Object.assign(this, this.gradientColorState); this.gradientColors = [...this.gradientColorState.gradientColors]; this.previewType = "gradient"; } }, // 饱和度和明度触摸开始 onSaturationTouchStart(e2) { this.updateSaturationPosition(e2); }, // 饱和度和明度触摸移动 onSaturationTouchMove(e2) { this.updateSaturationPosition(e2); }, // 饱和度和明度触摸结束 onSaturationTouchEnd(e2) { this.updateSaturationPosition(e2); }, // 更新饱和度和明度位置 updateSaturationPosition(e2) { const touch = e2.touches[0] || e2.changedTouches[0]; e2.currentTarget; const query = uni.createSelectorQuery().in(this); query.select(".up-color-picker__saturation").boundingClientRect(); query.exec((res) => { const rect = res[0]; if (rect) { let x2 = touch.clientX - rect.left; let y2 = touch.clientY - rect.top; x2 = Math.max(0, Math.min(x2, rect.width)); y2 = Math.max(0, Math.min(y2, rect.height)); this.saturationPosition = { x: x2, y: y2 }; this.updateSolidColor(); } }); }, // 色相触摸开始 onHueTouchStart(e2) { this.updateHuePosition(e2); }, // 色相触摸移动 onHueTouchMove(e2) { this.updateHuePosition(e2); }, // 色相触摸结束 onHueTouchEnd(e2) { this.updateHuePosition(e2); }, // 更新色相位置 updateHuePosition(e2) { const touch = e2.touches[0] || e2.changedTouches[0]; e2.currentTarget; const query = uni.createSelectorQuery().in(this); query.select(".up-color-picker__hue").boundingClientRect(); query.exec((res) => { const rect = res[0]; if (rect) { let x2 = touch.clientX - rect.left; x2 = Math.max(0, Math.min(x2, rect.width)); this.huePosition = x2; this.hue = Math.round(x2 / rect.width * 360); this.updateSolidColor(); } }); }, // 透明度触摸开始 onAlphaTouchStart(e2) { this.updateAlphaPosition(e2); }, // 透明度触摸移动 onAlphaTouchMove(e2) { this.updateAlphaPosition(e2); }, // 透明度触摸结束 onAlphaTouchEnd(e2) { this.updateAlphaPosition(e2); }, // 更新透明度位置 updateAlphaPosition(e2) { const touch = e2.touches[0] || e2.changedTouches[0]; e2.currentTarget; const query = uni.createSelectorQuery().in(this); query.select(".up-color-picker__alpha").boundingClientRect(); query.exec((res) => { const rect = res[0]; if (rect) { let x2 = touch.clientX - rect.left; x2 = Math.max(0, Math.min(x2, rect.width)); this.alphaPosition = x2; this.alpha = x2 / rect.width; this.updateSolidColor(); } }); }, // 更新纯色 updateSolidColor() { const query = uni.createSelectorQuery().in(this); query.select(".up-color-picker__saturation").boundingClientRect(); query.exec((res) => { const rect = res[0]; const size = rect ? Math.min(rect.width, rect.height) : 150; const s2 = this.saturationPosition.x / size * 100; const l2 = 100 - this.saturationPosition.y / size * 100; this.saturation = s2; this.lightness = l2; if (this.colorTypeIndex == 0) { this.currentColor = this.hslToRgb(this.hue, this.saturation, this.lightness, this.alpha); } else if (this.colorTypeIndex == 1) { this.gradientColors[this.editingGradientIndex].color = this.hslToRgb(this.hue, this.saturation, this.lightness, this.alpha); } }); }, // 添加渐变色 addGradientColor() { if (this.gradientColors.length < 5) { this.gradientColors.push({ color: "#ffffff", percent: 1 }); } }, // 删除渐变色 removeGradientColor(index2) { if (this.gradientColors.length > 2) { this.gradientColors.splice(index2, 1); } }, // 获取渐变控制点位置 getGradientPointerPosition(index2) { const trackWidth = 280; return this.gradientColors[index2].percent * trackWidth; }, // 更新渐变色 updateGradientColor(e2) { const touch = e2.touches[0] || e2.changedTouches[0]; const query = uni.createSelectorQuery().in(this); query.select(".up-color-picker__gradient-track").boundingClientRect(); query.exec((res) => { const rect = res[0]; if (rect) { let x2 = touch.clientX - rect.left; x2 = Math.max(0, Math.min(x2, rect.width)); const percent = x2 / rect.width; if (this.draggingPointerIndex >= 0) { this.gradientColors[this.draggingPointerIndex].percent = percent; this.gradientColors.sort((a2, b2) => a2.percent - b2.percent); } } }); }, // 控制点触摸开始 onPointerTouchStart(e2, index2) { this.draggingPointerIndex = index2; this.currentColor = this.gradientColors[index2].color; this.previewType = "gradient-point"; this.editingGradientIndex = index2; e2.stopPropagation(); }, // 控制点触摸移动 onPointerTouchMove(e2) { if (this.draggingPointerIndex === -1) return; const touch = e2.touches[0] || e2.changedTouches[0]; const query = uni.createSelectorQuery().in(this); query.select(".up-color-picker__gradient-track").boundingClientRect(); query.exec((res) => { const rect = res[0]; if (rect) { let x2 = touch.clientX - rect.left; x2 = Math.max(0, Math.min(x2, rect.width)); let percent = x2 / rect.width; if (x2 === 0) percent = 0; if (x2 === rect.width) percent = 1; this.gradientColors[this.draggingPointerIndex].percent = percent; this.gradientColors.sort((a2, b2) => a2.percent - b2.percent); this.draggingPointerIndex = this.gradientColors.findIndex((item, index2) => { return Math.abs(item.percent - percent) < 1e-4; }); } }); }, // 控制点触摸结束 onPointerTouchEnd() { this.draggingPointerIndex = -1; }, // 方向选择器触摸开始 onDirectionTouchStart(e2) { this.updateDirection(e2); }, // 方向选择器触摸移动 onDirectionTouchMove(e2) { this.updateDirection(e2); }, // 方向选择器触摸结束 onDirectionTouchEnd(e2) { this.updateDirection(e2); }, // 更新方向 updateDirection(e2) { const touch = e2.touches[0] || e2.changedTouches[0]; const query = uni.createSelectorQuery().in(this); query.select(".up-color-picker__gradient__direction-circle").boundingClientRect(); query.exec((res) => { const rect = res[0]; if (rect) { const centerX = rect.left + rect.width / 2; const centerY = rect.top + rect.height / 2; const x2 = touch.clientX - centerX; const y2 = touch.clientY - centerY; const distance = Math.sqrt(x2 * x2 + y2 * y2); const maxDistance = rect.width / 2; if (distance <= maxDistance) { this.directionPointer = { x: x2 + rect.width / 2, y: y2 + rect.height / 2 }; } else { const ratio = maxDistance / distance; this.directionPointer = { x: x2 * ratio + rect.width / 2, y: y2 * ratio + rect.height / 2 }; } const angle = Math.atan2(y2, x2) * 180 / Math.PI; formatAppLog("log", "at uni_modules/uview-plus/components/u-color-picker/u-color-picker.vue:704", angle); this.updateGradientDirection(angle); } }); }, // 根据角度更新渐变方向 updateGradientDirection(angle) { if (angle < 0) angle += 360; if (angle >= 315 || angle < 45) { this.currentDirection = { label: "从左到右", value: "to right" }; } else if (angle >= 45 && angle < 135) { this.currentDirection = { label: "从上到下", value: "to bottom" }; } else if (angle >= 135 && angle < 225) { this.currentDirection = { label: "从右到左", value: "to left" }; } else { this.currentDirection = { label: "从下到上", value: "to top" }; } }, // 确认方向选择 confirmDirection(e2) { this.currentDirection = this.gradientDirections[e2.index]; this.showDirectionPicker = false; }, // 选择常用颜色 selectCommonColor(color2) { this.currentColor = color2; if (this.colorTypeIndex === 0) { this.parseSolidColor(color2); } else { this.gradientColors[this.editingGradientIndex].color = color2; } }, // 确认选择 confirm() { let color2 = this.currentColor; if (this.colorTypeIndex === 1) { color2 = this.gradientStyle; } this.$emit("update:modelValue", color2); this.show = false; this.$emit("confirm", color2); this.editingGradientIndex = -1; this.previewType = this.colorTypeIndex === 0 ? "solid" : "gradient"; this.close(); }, // 关闭选择器 close() { this.show = false; this.$emit("close"); }, // HSL转RGB辅助函数 hslToRgb(h2, s2, l2, a2 = 1) { h2 = h2 / 360; s2 = s2 / 100; l2 = l2 / 100; let r2, g2, b2; if (s2 === 0) { r2 = g2 = b2 = l2; } else { const hue2rgb = (p3, q3, t2) => { if (t2 < 0) t2 += 1; if (t2 > 1) t2 -= 1; if (t2 < 1 / 6) return p3 + (q3 - p3) * 6 * t2; if (t2 < 1 / 2) return q3; if (t2 < 2 / 3) return p3 + (q3 - p3) * (2 / 3 - t2) * 6; return p3; }; const q2 = l2 < 0.5 ? l2 * (1 + s2) : l2 + s2 - l2 * s2; const p2 = 2 * l2 - q2; r2 = hue2rgb(p2, q2, h2 + 1 / 3); g2 = hue2rgb(p2, q2, h2); b2 = hue2rgb(p2, q2, h2 - 1 / 3); } const round2 = (value2) => Math.round(value2 * 255); return `rgba(${round2(r2)}, ${round2(g2)}, ${round2(b2)}, ${a2.toFixed(2)})`; } } }; function _sfc_render$1E(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_subsection = vue.resolveComponent("up-subsection"); const _component_up_button = vue.resolveComponent("up-button"); const _component_up_popup = vue.resolveComponent("up-popup"); return vue.openBlock(), vue.createElementBlock("view", { class: "up-color-picker" }, [ vue.createElementVNode( "view", { clas: "up-color-picker__trigger", onClick: _cache[0] || (_cache[0] = ($event) => $data.show = true), style: vue.normalizeStyle({ backgroundColor: _ctx.value }) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ), vue.createVNode(_component_up_popup, { show: $data.show, mode: "bottom", round: "10", onClose: $options.close, closeOnClickOverlay: true }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "up-color-picker__content" }, [ vue.createElementVNode("view", { class: "up-color-picker__header" }, [ vue.createElementVNode("text", { class: "up-color-picker__title" }, "选择颜色") ]), vue.createCommentVNode(" 纯色/渐变色切换 "), vue.createElementVNode("view", { class: "up-color-picker__switch" }, [ vue.createVNode(_component_up_subsection, { list: [{ name: "纯色" }, { name: "渐变" }], current: $data.colorTypeIndex, onChange: $options.changeColorType, fontSize: "14" }, null, 8, ["current", "onChange"]) ]), vue.createCommentVNode(" 渐变色选择器 "), $data.colorTypeIndex == 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "up-color-picker__gradient" }, [ vue.createCommentVNode(" 渐变色控制条 "), vue.createElementVNode( "view", { class: "up-color-picker__gradient-track", style: vue.normalizeStyle({ background: $options.gradientStyle }) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.gradientColors, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "up-color-picker__gradient-pointer", key: index2, style: vue.normalizeStyle({ left: $options.getGradientPointerPosition(index2) + "px" }), onClick: ($event) => $options.openColorPickerForGradient(index2), onTouchstart: ($event) => $options.onPointerTouchStart($event, index2), onTouchmove: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.onPointerTouchMove && $options.onPointerTouchMove(...args), ["stop"])), onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.onPointerTouchEnd && $options.onPointerTouchEnd(...args), ["stop"])) }, [ vue.createElementVNode( "view", { class: "up-color-picker__gradient-pointer-inner", style: vue.normalizeStyle({ backgroundColor: item.color }) }, null, 4 /* STYLE */ ) ], 44, ["onClick", "onTouchstart"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ), vue.createElementVNode("view", { class: "up-color-picker__gradient-controls" }, [ vue.createVNode(_component_up_button, { type: "primary", size: "mini", plain: "", onClick: $options.addGradientColor, class: "up-color-picker__add-btn" }, { default: vue.withCtx(() => [ vue.createTextVNode(" 添加颜色 ") ]), _: 1 /* STABLE */ }, 8, ["onClick"]) ]), vue.createCommentVNode(" 圆形方向选择器 "), vue.createElementVNode("view", { class: "up-color-picker__gradient-direction" }, [ vue.createElementVNode("text", null, "方向:"), vue.createElementVNode( "view", { class: "up-color-picker__gradient__direction-circle", onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.onDirectionTouchStart && $options.onDirectionTouchStart(...args)), onTouchmove: _cache[4] || (_cache[4] = (...args) => $options.onDirectionTouchMove && $options.onDirectionTouchMove(...args)), onTouchend: _cache[5] || (_cache[5] = (...args) => $options.onDirectionTouchEnd && $options.onDirectionTouchEnd(...args)) }, [ vue.createElementVNode( "view", { class: "up-color-picker__direction-pointer", style: vue.normalizeStyle({ left: $data.directionPointer.x + "px", top: $data.directionPointer.y + "px" }) }, null, 4 /* STYLE */ ) ], 32 /* NEED_HYDRATION */ ) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 纯色选择器 "), vue.createElementVNode("view", { class: "up-color-picker__solid" }, [ vue.createCommentVNode(" 饱和度和明度选择区域 "), vue.createElementVNode( "view", { class: "up-color-picker__saturation", style: vue.normalizeStyle({ backgroundColor: `hsl(${$data.hue}, 100%, 50%)` }), onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.onSaturationTouchStart && $options.onSaturationTouchStart(...args)), onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.onSaturationTouchMove && $options.onSaturationTouchMove(...args)), onTouchend: _cache[8] || (_cache[8] = (...args) => $options.onSaturationTouchEnd && $options.onSaturationTouchEnd(...args)) }, [ vue.createElementVNode( "view", { class: "up-color-picker__saturation-pointer", style: vue.normalizeStyle({ left: $data.saturationPosition.x + "px", top: $data.saturationPosition.y + "px" }) }, null, 4 /* STYLE */ ) ], 36 /* STYLE, NEED_HYDRATION */ ), vue.createCommentVNode(" 色相选择 "), vue.createElementVNode( "view", { class: "up-color-picker__hue", onTouchstart: _cache[9] || (_cache[9] = (...args) => $options.onHueTouchStart && $options.onHueTouchStart(...args)), onTouchmove: _cache[10] || (_cache[10] = (...args) => $options.onHueTouchMove && $options.onHueTouchMove(...args)), onTouchend: _cache[11] || (_cache[11] = (...args) => $options.onHueTouchEnd && $options.onHueTouchEnd(...args)) }, [ vue.createElementVNode( "view", { class: "up-color-picker__hue-pointer", style: vue.normalizeStyle({ left: $data.huePosition + "px" }) }, null, 4 /* STYLE */ ) ], 32 /* NEED_HYDRATION */ ), vue.createCommentVNode(" 透明度选择 "), $data.colorTypeIndex == 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "up-color-picker__alpha", onTouchstart: _cache[12] || (_cache[12] = (...args) => $options.onAlphaTouchStart && $options.onAlphaTouchStart(...args)), onTouchmove: _cache[13] || (_cache[13] = (...args) => $options.onAlphaTouchMove && $options.onAlphaTouchMove(...args)), onTouchend: _cache[14] || (_cache[14] = (...args) => $options.onAlphaTouchEnd && $options.onAlphaTouchEnd(...args)) }, [ vue.createElementVNode("view", { class: "up-color-picker__alpha-bg" }), vue.createElementVNode( "view", { class: "up-color-picker__alpha-pointer", style: vue.normalizeStyle({ left: $data.alphaPosition + "px" }) }, null, 4 /* STYLE */ ) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true) ]), vue.createCommentVNode(" 常用颜色 "), $props.commonColors && $props.commonColors.length ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "up-color-picker__common" }, [ vue.createElementVNode("text", { class: "up-color-picker__common-title" }, "常用颜色"), vue.createElementVNode("view", { class: "up-color-picker__common-list" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.commonColors, (color2, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "up-color-picker__common-item", style: vue.normalizeStyle({ backgroundColor: color2 }), onClick: ($event) => $options.selectCommonColor(color2) }, null, 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 颜色预览和操作按钮 "), vue.createElementVNode("view", { class: "up-color-picker__footer" }, [ vue.createElementVNode("view", { class: "up-color-picker__preview" }, [ vue.createElementVNode( "view", { class: "up-color-picker__preview-color", style: vue.normalizeStyle({ backgroundColor: $options.displayColor }) }, null, 4 /* STYLE */ ), vue.createElementVNode( "text", { class: "up-color-picker__preview-text" }, vue.toDisplayString($options.displayColor), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "up-color-picker__actions" }, [ vue.createVNode(_component_up_button, { type: "primary", size: "small", onClick: $options.confirm, class: "up-color-picker__btn" }, { default: vue.withCtx(() => [ vue.createTextVNode(" 确定 ") ]), _: 1 /* STABLE */ }, 8, ["onClick"]), vue.createVNode(_component_up_button, { type: "info", size: "small", onClick: $options.close, class: "up-color-picker__btn" }, { default: vue.withCtx(() => [ vue.createTextVNode(" 取消 ") ]), _: 1 /* STABLE */ }, 8, ["onClick"]) ]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "onClose"]) ]); } const uColorPicker = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_render$1E], ["__scopeId", "data-v-b51e9743"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-color-picker/u-color-picker.vue"]]); const __vite_glob_0_27 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uColorPicker }, Symbol.toStringTag, { value: "Module" })); const props$14 = defineMixin({ props: { // 显示的内容,字符串 text: { type: [Array], default: () => props$1x.columnNotice.text }, // 是否显示左侧的音量图标 icon: { type: String, default: () => props$1x.columnNotice.icon }, // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 mode: { type: String, default: () => props$1x.columnNotice.mode }, // 文字颜色,各图标也会使用文字颜色 color: { type: String, default: () => props$1x.columnNotice.color }, // 背景颜色 bgColor: { type: String, default: () => props$1x.columnNotice.bgColor }, // 字体大小,单位px fontSize: { type: [String, Number], default: () => props$1x.columnNotice.fontSize }, // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 speed: { type: [String, Number], default: () => props$1x.columnNotice.speed }, // direction = row时,是否使用步进形式滚动 step: { type: Boolean, default: () => props$1x.columnNotice.step }, // 滚动一个周期的时间长,单位ms duration: { type: [String, Number], default: () => props$1x.columnNotice.duration }, // 是否禁止用手滑动切换 // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序 disableTouch: { type: Boolean, default: () => props$1x.columnNotice.disableTouch }, justifyContent: { type: String, default: () => props$1x.columnNotice.justifyContent } } }); const _sfc_main$1E = { mixins: [mpMixin, mixin, props$14], watch: { text: { immediate: true, handler(newValue, oldValue) { if (!test.array(newValue)) { error("noticebar组件direction为column时,要求text参数为数组形式"); } } } }, computed: { // 文字内容的样式 textStyle() { let style = {}; style.color = this.color; style.fontSize = addUnit(this.fontSize); return style; }, // 垂直或者水平滚动 vertical() { if (this.mode == "horizontal") return false; else return true; } }, data() { return { index: 0 }; }, emits: ["click", "close"], methods: { noticeChange(e2) { this.index = e2.detail.current; }, // 点击通告栏 clickHandler() { this.$emit("click", this.index); }, // 点击关闭按钮 close() { this.$emit("close"); } } }; function _sfc_render$1D(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-notice", onClick: _cache[1] || (_cache[1] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-notice__left-icon" }, [ vue.createVNode(_component_up_icon, { name: _ctx.icon, color: _ctx.color, size: "19" }, null, 8, ["name", "color"]) ])) : vue.createCommentVNode("v-if", true) ], true), vue.createElementVNode("swiper", { "disable-touch": _ctx.disableTouch, vertical: _ctx.step ? false : true, circular: "", interval: _ctx.duration, autoplay: true, class: "u-notice__swiper", onChange: _cache[0] || (_cache[0] = (...args) => $options.noticeChange && $options.noticeChange(...args)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.text, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "swiper-item", { key: index2, class: "u-notice__swiper__item", style: vue.normalizeStyle({ "justifyContent": _ctx.justifyContent }) }, [ vue.createElementVNode( "text", { class: "u-notice__swiper__item__text u-line-1", style: vue.normalizeStyle([$options.textStyle]) }, vue.toDisplayString(item), 5 /* TEXT, STYLE */ ) ], 4 /* STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 40, ["disable-touch", "vertical", "interval"]), ["link", "closable"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-notice__right-icon" }, [ _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: "arrow-right", size: 17, color: _ctx.color }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true), _ctx.mode === "closable" ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, name: "close", size: 16, color: _ctx.color, onClick: $options.close }, null, 8, ["color", "onClick"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]); } const __easycom_0$6 = /* @__PURE__ */ _export_sfc(_sfc_main$1E, [["render", _sfc_render$1D], ["__scopeId", "data-v-bacc3427"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-column-notice/u-column-notice.vue"]]); const __vite_glob_0_28 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$6 }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1D = { name: "up-copy", props: { content: { type: String, default: "" }, alertStyle: { type: String, default: "toast" }, notice: { type: String, default: t$1("up.common.copy") + t$1("up.common.success") } }, emits: ["success"], methods: { t: t$1, handleClick() { let content = this.content; if (!content) { uni.showToast({ title: t$1("up.common.none"), icon: "none", duration: 2e3 }); return false; } content = typeof content === "string" ? content : content.toString(); let that2 = this; uni.setClipboardData({ data: content, success: function() { if (that2.alertStyle == "modal") { uni.showModal({ title: "up.common.tip", content: that2.notice }); } else { uni.showToast({ title: that2.notice, icon: "none" }); } that2.$emit("success"); }, fail: function() { uni.showToast({ title: t$1("up.common.copy") + t$1("up.common.fail"), icon: "none", duration: 3e3 }); } }); } } }; function _sfc_render$1C(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClick && $options.handleClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createTextVNode( vue.toDisplayString($options.t("up.common.copy")), 1 /* TEXT */ ) ]) ]); } const uCopy = /* @__PURE__ */ _export_sfc(_sfc_main$1D, [["render", _sfc_render$1C], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-copy/u-copy.vue"]]); const __vite_glob_0_29 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCopy }, Symbol.toStringTag, { value: "Module" })); const props$13 = defineMixin({ props: { // 倒计时时长,单位ms time: { type: [String, Number], default: () => props$1x.countDown.time }, // 时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒 format: { type: String, default: () => props$1x.countDown.format }, // 是否自动开始倒计时 autoStart: { type: Boolean, default: () => props$1x.countDown.autoStart }, // 是否展示毫秒倒计时 millisecond: { type: Boolean, default: () => props$1x.countDown.millisecond } } }); function padZero(num, targetLength = 2) { let str = `${num}`; while (str.length < targetLength) { str = `0${str}`; } return str; } const SECOND = 1e3; const MINUTE = 60 * SECOND; const HOUR = 60 * MINUTE; const DAY = 24 * HOUR; function parseTimeData(time) { const days = Math.floor(time / DAY); const hours = Math.floor(time % DAY / HOUR); const minutes = Math.floor(time % HOUR / MINUTE); const seconds = Math.floor(time % MINUTE / SECOND); const milliseconds = Math.floor(time % SECOND); return { days, hours, minutes, seconds, milliseconds }; } function parseFormat(format2, timeData) { let { days, hours, minutes, seconds, milliseconds } = timeData; if (format2.indexOf("DD") === -1) { hours += days * 24; } else { format2 = format2.replace("DD", padZero(days)); } if (format2.indexOf("HH") === -1) { minutes += hours * 60; } else { format2 = format2.replace("HH", padZero(hours)); } if (format2.indexOf("mm") === -1) { seconds += minutes * 60; } else { format2 = format2.replace("mm", padZero(minutes)); } if (format2.indexOf("ss") === -1) { milliseconds += seconds * 1e3; } else { format2 = format2.replace("ss", padZero(seconds)); } return format2.replace("SSS", padZero(milliseconds, 3)); } function isSameSecond(time1, time2) { return Math.floor(time1 / 1e3) === Math.floor(time2 / 1e3); } const _sfc_main$1C = { name: "u-count-down", mixins: [mpMixin, mixin, props$13], data() { return { timer: null, // 各单位(天,时,分等)剩余时间 timeData: parseTimeData(0), // 格式化后的时间,如"03:23:21" formattedTime: "0", // 倒计时是否正在进行中 runing: false, endTime: 0, // 结束的毫秒时间戳 remainTime: 0 // 剩余的毫秒时间 }; }, watch: { time(n2) { this.reset(); } }, mounted() { this.init(); }, emits: ["change", "finish"], methods: { init() { this.reset(); }, // 开始倒计时 start() { if (this.runing) return; this.runing = true; this.endTime = Date.now() + this.remainTime; this.toTick(); }, // 根据是否展示毫秒,执行不同操作函数 toTick() { if (this.millisecond) { this.microTick(); } else { this.macroTick(); } }, macroTick() { this.clearTimeout(); this.timer = setTimeout(() => { const remain = this.getRemainTime(); if (!isSameSecond(remain, this.remainTime) || remain === 0) { this.setRemainTime(remain); } if (this.remainTime !== 0) { this.macroTick(); } }, 30); }, microTick() { this.clearTimeout(); this.timer = setTimeout(() => { this.setRemainTime(this.getRemainTime()); if (this.remainTime !== 0) { this.microTick(); } }, 50); }, // 获取剩余的时间 getRemainTime() { return Math.max(this.endTime - Date.now(), 0); }, // 设置剩余的时间 setRemainTime(remain) { this.remainTime = remain; const timeData = parseTimeData(remain); this.timeData = timeData; this.$emit("change", timeData); this.formattedTime = parseFormat(this.format, timeData); if (remain <= 0) { this.pause(); this.$emit("finish"); } }, // 重置倒计时 reset() { this.pause(); this.remainTime = this.time; this.setRemainTime(this.remainTime); if (this.autoStart) { this.start(); } }, // 暂停倒计时 pause() { this.runing = false; this.clearTimeout(); }, // 清空定时器 clearTimeout() { clearTimeout(this.timer); this.timer = null; } }, beforeUnmount() { this.clearTimeout(); } }; function _sfc_render$1B(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-count-down" }, [ vue.renderSlot(_ctx.$slots, "default", { days: $data.timeData.days, hours: $data.timeData.hours, minutes: $data.timeData.minutes, seconds: $data.timeData.seconds }, () => [ vue.createElementVNode( "text", { class: "u-count-down__text" }, vue.toDisplayString($data.formattedTime), 1 /* TEXT */ ) ], true) ]); } const uCountDown = /* @__PURE__ */ _export_sfc(_sfc_main$1C, [["render", _sfc_render$1B], ["__scopeId", "data-v-2f829c0f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-count-down/u-count-down.vue"]]); const __vite_glob_0_30 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCountDown }, Symbol.toStringTag, { value: "Module" })); const props$12 = defineMixin({ props: { // 开始的数值,默认从0增长到某一个数 startVal: { type: [String, Number], default: () => props$1x.countTo.startVal }, // 要滚动的目标数值,必须 endVal: { type: [String, Number], default: () => props$1x.countTo.endVal }, // 滚动到目标数值的动画持续时间,单位为毫秒(ms) duration: { type: [String, Number], default: () => props$1x.countTo.duration }, // 设置数值后是否自动开始滚动 autoplay: { type: Boolean, default: () => props$1x.countTo.autoplay }, // 要显示的小数位数 decimals: { type: [String, Number], default: () => props$1x.countTo.decimals }, // 是否在即将到达目标数值的时候,使用缓慢滚动的效果 useEasing: { type: Boolean, default: () => props$1x.countTo.useEasing }, // 十进制分割 decimal: { type: [String, Number], default: () => props$1x.countTo.decimal }, // 字体颜色 color: { type: String, default: () => props$1x.countTo.color }, // 字体大小 fontSize: { type: [String, Number], default: () => props$1x.countTo.fontSize }, // 是否加粗字体 bold: { type: Boolean, default: () => props$1x.countTo.bold }, // 千位分隔符,类似金额的分割(¥23,321.05中的",") separator: { type: String, default: () => props$1x.countTo.separator } } }); const _sfc_main$1B = { name: "u-count-to", data() { return { localStartVal: this.startVal, displayValue: this.formatNumber(this.startVal), printVal: null, paused: false, // 是否暂停 localDuration: Number(this.duration), startTime: null, // 开始的时间 timestamp: null, // 时间戳 remaining: null, // 停留的时间 rAF: null, lastTime: 0 // 上一次的时间 }; }, mixins: [mpMixin, mixin, props$12], computed: { countDown() { return this.startVal > this.endVal; } }, watch: { startVal() { this.autoplay && this.start(); }, endVal() { this.autoplay && this.start(); } }, mounted() { this.autoplay && this.start(); }, emits: ["end"], methods: { addUnit, easingFn(t2, b2, c2, d2) { return c2 * (-Math.pow(2, -10 * t2 / d2) + 1) * 1024 / 1023 + b2; }, requestAnimationFrame(callback) { const currTime = (/* @__PURE__ */ new Date()).getTime(); const timeToCall = Math.max(0, 16 - (currTime - this.lastTime)); const id = setTimeout(() => { callback(currTime + timeToCall); }, timeToCall); this.lastTime = currTime + timeToCall; return id; }, cancelAnimationFrame(id) { clearTimeout(id); }, // 开始滚动数字 start() { this.localStartVal = this.startVal; this.startTime = null; this.localDuration = this.duration; this.paused = false; this.rAF = this.requestAnimationFrame(this.count); }, // 暂定状态,重新再开始滚动;或者滚动状态下,暂停 reStart() { if (this.paused) { this.resume(); this.paused = false; } else { this.stop(); this.paused = true; } }, // 暂停 stop() { this.cancelAnimationFrame(this.rAF); }, // 重新开始(暂停的情况下) resume() { if (!this.remaining) return; this.startTime = 0; this.localDuration = this.remaining; this.localStartVal = this.printVal; this.requestAnimationFrame(this.count); }, // 重置 reset() { this.startTime = null; this.cancelAnimationFrame(this.rAF); this.displayValue = this.formatNumber(this.startVal); }, count(timestamp) { if (!this.startTime) this.startTime = timestamp; this.timestamp = timestamp; const progress = timestamp - this.startTime; this.remaining = this.localDuration - progress; if (this.useEasing) { if (this.countDown) { this.printVal = this.localStartVal - this.easingFn(progress, 0, this.localStartVal - this.endVal, this.localDuration); } else { this.printVal = this.easingFn(progress, this.localStartVal, this.endVal - this.localStartVal, this.localDuration); } } else { if (this.countDown) { this.printVal = this.localStartVal - (this.localStartVal - this.endVal) * (progress / this.localDuration); } else { this.printVal = this.localStartVal + (this.endVal - this.localStartVal) * (progress / this.localDuration); } } if (this.countDown) { this.printVal = this.printVal < this.endVal ? this.endVal : this.printVal; } else { this.printVal = this.printVal > this.endVal ? this.endVal : this.printVal; } this.displayValue = this.formatNumber(this.printVal) || 0; if (progress < this.localDuration) { this.rAF = this.requestAnimationFrame(this.count); } else { this.$emit("end"); } }, // 判断是否数字 isNumber(val) { return !isNaN(parseFloat(val)); }, formatNumber(num) { num = Number(num); num = num.toFixed(Number(this.decimals)); num += ""; const x2 = num.split("."); let x1 = x2[0]; const x22 = x2.length > 1 ? this.decimal + x2[1] : ""; const rgx = /(\d+)(\d{3})/; if (this.separator && !this.isNumber(this.separator)) { while (rgx.test(x1)) { x1 = x1.replace(rgx, "$1" + this.separator + "$2"); } } return x1 + x22; }, destroyed() { this.cancelAnimationFrame(this.rAF); } } }; function _sfc_render$1A(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "text", { class: "u-count-num", style: vue.normalizeStyle({ fontSize: $options.addUnit(_ctx.fontSize), fontWeight: _ctx.bold ? "bold" : "normal", color: _ctx.color }) }, vue.toDisplayString($data.displayValue), 5 /* TEXT, STYLE */ ); } const uCountTo = /* @__PURE__ */ _export_sfc(_sfc_main$1B, [["render", _sfc_render$1A], ["__scopeId", "data-v-eb411063"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-count-to/u-count-to.vue"]]); const __vite_glob_0_31 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCountTo }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1A = { name: "up-coupon", props: { // 金额 amount: { type: [String, Number], default: "" }, // 金额单位 unit: { type: String, default: "¥" }, // 单位位置 unitPosition: { type: String, default: "left" }, // 使用限制 limit: { type: String, default: "" }, // 标题 title: { type: String, default: "优惠券" }, // 描述 desc: { type: String, default: "" }, // 有效期 time: { type: String, default: "" }, // 操作按钮文字 actionText: { type: String, default: "使用" }, // 形状:coupon-优惠券, envelope-红包, card-卡片 shape: { type: String, default: "coupon" }, // 尺寸:small, medium, large size: { type: String, default: "medium" }, // 是否圆形按钮 circle: { type: Boolean, default: false }, // 是否禁用 disabled: { type: Boolean, default: false }, // 背景颜色 bgColor: { type: String, default: "" }, // 文字颜色 color: { type: String, default: "" }, // 内置背景类型 type: { type: String, default: "" } }, computed: { couponStyle() { const style = {}; if (this.bgColor) style.background = this.bgColor; if (this.color) style.color = this.color; return style; }, dotCount() { const map = { small: 8, medium: 10, large: 12 }; return map[this.size] || 10; } }, methods: { handleClick() { if (this.disabled) return; this.$emit("click"); } } }; function _sfc_render$1z(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_tag = vue.resolveComponent("up-tag"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["up-coupon", [`up-coupon--${$props.shape}`, `up-coupon--${$props.type}`, `up-coupon--${$props.size}`, { "up-coupon--disabled": $props.disabled }]]), style: vue.normalizeStyle([$options.couponStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.handleClick && $options.handleClick(...args)) }, [ vue.createElementVNode("view", { class: "up-coupon__content" }, [ vue.createCommentVNode(" 左侧金额区域 "), vue.createElementVNode("view", { class: "up-coupon__amount" }, [ $props.unitPosition === "left" ? vue.renderSlot(_ctx.$slots, "unit", { key: 0, unit: $props.unit, unitPosition: $props.unitPosition }, () => [ $props.unitPosition === "left" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "up-coupon__amount-unit" }, vue.toDisplayString($props.unit), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "amount", { amount: $props.amount }, () => [ vue.createElementVNode( "text", { class: "up-coupon__amount-value" }, vue.toDisplayString($props.amount), 1 /* TEXT */ ) ], true), $props.unitPosition === "right" ? vue.renderSlot(_ctx.$slots, "unit", { key: 1, unit: $props.unit, unitPosition: $props.unitPosition }, () => [ $props.unitPosition === "right" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "up-coupon__amount-unit" }, vue.toDisplayString($props.unit), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "limit", { limit: $props.limit }, () => [ $props.limit ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "up-coupon__amount-limit" }, vue.toDisplayString($props.limit), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) ]), vue.createCommentVNode(" 中间描述区域 "), vue.createElementVNode("view", { class: "up-coupon__info" }, [ vue.renderSlot(_ctx.$slots, "title", { title: $props.title }, () => [ vue.createElementVNode( "text", { class: "up-coupon__info-title" }, vue.toDisplayString($props.title), 1 /* TEXT */ ) ], true), vue.renderSlot(_ctx.$slots, "desc", { desc: $props.desc }, () => [ $props.desc ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "up-coupon__info-desc" }, vue.toDisplayString($props.desc), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true), vue.renderSlot(_ctx.$slots, "time", { time: $props.time }, () => [ $props.time ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "up-coupon__info-time" }, vue.toDisplayString($props.time), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) ]), vue.createCommentVNode(" 右侧操作区域 "), vue.createElementVNode("view", { class: "up-coupon__action u-padding-right-20" }, [ vue.renderSlot(_ctx.$slots, "action", { actionText: $props.actionText, circle: $props.circle }, () => [ vue.createVNode(_component_up_tag, { type: "error", bgColor: $props.type ? "transparent" : "#eb433d", borderColor: $props.type ? "#eee" : "#eb433d", borderRadius: "6px", size: "medium", class: "up-coupon__action-text", shape: $props.circle ? "circle" : "circle" }, { default: vue.withCtx(() => [ vue.createTextVNode( vue.toDisplayString($props.actionText), 1 /* TEXT */ ) ]), _: 1 /* STABLE */ }, 8, ["bgColor", "borderColor", "shape"]) ], true) ]) ]), vue.createCommentVNode(" 红包绳子效果 "), $props.shape === "envelope" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "up-coupon__rope" })) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 默认插槽,可用于添加额外内容 "), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const uCoupon = /* @__PURE__ */ _export_sfc(_sfc_main$1A, [["render", _sfc_render$1z], ["__scopeId", "data-v-8013dcad"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-coupon/u-coupon.vue"]]); const __vite_glob_0_32 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCoupon }, Symbol.toStringTag, { value: "Module" })); const tabHeight = 50; const _sfc_main$1z = { name: "u-cropper", data() { return { // 添加实例ID用于区分不同实例 instanceId: Date.now() + "-" + Math.random().toString(36).substr(2, 9), cvsStyleHeight: "0px", styleDisplay: "none", styleTop: "-10000px", prvTop: "-10000px", imgStyle: {}, selStyle: {}, showOper: true, imgSrc: { imgSrc: "" }, btnWidth: "19%", btnDsp: "flex", // 裁剪区域宽度,用于设置选择区域的宽度 arWidth: "", // 裁剪区域高度,用于设置选择区域的高度 arHeight: "", // 导出图片宽度,用于设置最终导出图片的宽度 expWidth: "", // 导出图片高度,用于设置最终导出图片的高度 expHeight: "", // 是否允许调整裁剪框大小 letChangeSize: false }; }, watch: { avatarSrc() { this.imgSrc.imgSrc = this.avatarSrc; } }, emits: ["avtinit", "confirm"], props: { minScale: "", maxScale: "", canScale: true, canRotate: true, lockWidth: "", lockHeight: "", stretch: "", lock: "", noTab: true, inner: false, quality: "", index: "", canChangeSize: false, areaWidth: "300rpx", // 裁剪区域高度,用于设置选择区域的高度 areaHeight: "300rpx", // 导出图片宽度,用于设置最终导出图片的宽度 exportWidth: "260rpx", // 导出图片高度,用于设置最终导出图片的高度 exportHeight: "260rpx" }, created() { this.ctxCanvas = uni.createCanvasContext("avatar-canvas-" + this.instanceId, this); this.ctxCanvasOper = uni.createCanvasContext("oper-canvas-" + this.instanceId, this); this.ctxCanvasPrv = uni.createCanvasContext("prv-canvas-" + this.instanceId, this); this.qlty = parseInt(this.quality) || 0.9; this.imgSrc.imgSrc = this.imageSrc; this.letRotate = this.canRotate === false || this.inner === true ? 0 : 1; this.letScale = this.canScale === false ? 0 : 1; this.letChangeSize = this.canChangeSize; this.isin = this.inner === true ? 1 : 0; this.indx = this.index || void 0; this.mnScale = this.minScale || 0.3; this.mxScale = this.maxScale || 4; this.noBar = this.noTab === true ? 1 : 0; this.stc = this.stretch; this.lck = this.lock; if (this.isin) { this.btnWidth = "24%"; this.btnDsp = "none"; } else { this.btnWidth = "19%"; this.btnDsp = "flex"; } if (this.noBar) { this.moreHeight = 0; this.windowResize(); } else { uni.showTabBar({ complete: (res) => { this.moreHeight = res.errMsg === "showTabBar:ok" ? 50 : 0; this.windowResize(); } }); } }, methods: { t: t$1, windowResize() { let sysInfo = uni.getSystemInfoSync(); this.platform = sysInfo.platform; this.pixelRatio = sysInfo.pixelRatio; this.windowWidth = sysInfo.windowWidth; if (this.platform === "android") { this.windowHeight = sysInfo.screenHeight + sysInfo.statusBarHeight; this.cvsStyleHeight = this.windowHeight - tabHeight + "px"; } else { this.windowHeight = sysInfo.windowHeight + this.moreHeight; this.cvsStyleHeight = this.windowHeight - tabHeight + 6 + "px"; } this.pxRatio = this.windowWidth / 750; let style = this.avatarStyle; if (style && style !== true && (style = style.trim())) { style = style.split(";"); let obj = {}; for (let v2 of style) { if (!v2) continue; v2 = v2.trim().split(":"); if (v2[1].indexOf("rpx") >= 0) { let arr = v2[1].trim().split(" "); for (let k2 in arr) { if (!arr[k2]) continue; if (arr[k2].indexOf("rpx") >= 0) { arr[k2] = parseFloat(arr[k2]) * this.pxRatio + "px"; } } v2[1] = arr.join(" "); } obj[v2[0].trim()] = v2[1].trim(); } this.imgStyle = obj; } this.expWidth && (this.expWidth = this.expWidth.indexOf("rpx") >= 0 ? parseInt(this.expWidth) * this.pxRatio : parseInt(this.expWidth)); this.expHeight && (this.expHeight = this.expHeight.indexOf("rpx") >= 0 ? parseInt(this.expHeight) * this.pxRatio : parseInt(this.expHeight)); if (this.styleDisplay === "flex") { this.drawInit(true); } this.hideImg(); }, select() { if (this.fSelecting) return; this.fSelecting = true; setTimeout(() => { this.fSelecting = false; }, 500); uni.chooseImage({ count: 1, sizeType: ["original", "compressed"], sourceType: ["album", "camera"], success: (r2) => { uni.showLoading({ mask: true }); let path = this.imgPath = r2.tempFilePaths[0]; uni.getImageInfo({ src: path, success: (r3) => { this.imgWidth = r3.width; this.imgHeight = r3.height; this.path = path; if (!this.hasSel) { let style = this.selStyle || {}; if (this.arWidth && this.arHeight) { let areaWidth = this.arWidth.indexOf("rpx") >= 0 ? parseInt(this.arWidth) * this.pxRatio : parseInt(this.arWidth), areaHeight = this.arHeight.indexOf("rpx") >= 0 ? parseInt(this.arHeight) * this.pxRatio : parseInt(this.arHeight); style.width = areaWidth + "px"; style.height = areaHeight + "px"; style.top = (this.windowHeight - areaHeight - tabHeight) / 2 + "px"; style.left = (this.windowWidth - areaWidth) / 2 + "px"; } else { uni.showModal({ title: t$1("up.cropper.emptyWidhtOrHeight"), showCancel: false }); return; } this.selStyle = style; } if (this.noBar) { this.drawInit(true); } else { uni.hideTabBar({ complete: () => { this.drawInit(true); } }); } }, fail: () => { uni.showToast({ title: "error3", duration: 2e3 }); }, complete() { uni.hideLoading(); } }); } }); }, confirm() { if (this.fUploading) return; this.fUploading = true; setTimeout(() => { this.fUploading = false; }, 1e3); let style = this.selStyle, x2 = parseInt(style.left), y2 = parseInt(style.top), width = parseInt(style.width), height = parseInt(style.height), expWidth = this.expWidth || width, expHeight = this.expHeight || height; uni.showLoading({ mask: true }); this.styleDisplay = "none"; this.styleTop = "-10000px"; this.hasSel = false; this.hideImg(); uni.canvasToTempFilePath({ x: x2, y: y2, width, height, destWidth: expWidth, destHeight: expHeight, canvasId: "avatar-canvas-" + this.instanceId, fileType: "png", quality: this.qlty, success: (r2) => { r2 = r2.tempFilePath; this.$emit("confirm", { avatar: this.imgSrc, path: r2, index: this.indx, data: this.rtn }); }, fail: (res) => { uni.showToast({ title: "error1", duration: 2e3 }); }, complete: () => { uni.hideLoading(); this.noBar || uni.showTabBar(); } }, this); }, // 用户点击"预览"模式下的"确认"按钮时被调用,用于将预览的裁剪结果上传 prvUpload() { if (this.fPrvUploading) return; this.fPrvUploading = true; setTimeout(() => { this.fPrvUploading = false; }, 1e3); let style = this.selStyle; parseInt(style.width); parseInt(style.height); let prvX = this.prvX, prvY = this.prvY, prvWidth = this.prvWidth, prvHeight = this.prvHeight, expWidth = this.expWidth || prvWidth, expHeight = this.expHeight || prvHeight; uni.showLoading({ mask: true }); this.styleDisplay = "none"; this.styleTop = "-10000px"; this.hasSel = false; this.hideImg(); uni.canvasToTempFilePath({ x: prvX, y: prvY, width: prvWidth, height: prvHeight, destWidth: expWidth, destHeight: expHeight, canvasId: "prv-canvas-" + this.instanceId, fileType: "png", quality: this.qlty, success: (r2) => { r2 = r2.tempFilePath; this.$emit("confirm", { avatar: this.imgSrc, path: r2, index: this.indx, data: this.rtn }); }, fail: () => { uni.showToast({ title: "error_prv", duration: 2e3 }); }, complete: () => { uni.hideLoading(); this.noBar || uni.showTabBar(); } }, this); }, drawInit(ini = false) { let allWidth = this.windowWidth, allHeight = this.windowHeight, imgWidth = this.imgWidth, imgHeight = this.imgHeight, imgRadio = imgWidth / imgHeight, useWidth = allWidth - 40, useHeight = allHeight - tabHeight - 80; this.pixelRatio; let selWidth = parseInt(this.selStyle.width), selHeight = parseInt(this.selStyle.height); this.fixWidth = 0; this.fixHeight = 0; this.lckWidth = 0; this.lckHeight = 0; switch (this.stc) { case "x": this.fixWidth = 1; break; case "y": this.fixHeight = 1; break; case "long": if (imgRadio > 1) this.fixWidth = 1; else this.fixHeight = 1; break; case "short": if (imgRadio > 1) this.fixHeight = 1; else this.fixWidth = 1; break; case "longSel": if (selWidth > selHeight) this.fixWidth = 1; else this.fixHeight = 1; break; case "shortSel": if (selWidth > selHeight) this.fixHeight = 1; else this.fixWidth = 1; break; } switch (this.lck) { case "x": this.lckWidth = 1; break; case "y": this.lckHeight = 1; break; case "long": if (imgRadio > 1) this.lckWidth = 1; else this.lckHeight = 1; break; case "short": if (imgRadio > 1) this.lckHeight = 1; else this.lckWidth = 1; break; case "longSel": if (selWidth > selHeight) this.lckWidth = 1; else this.lckHeight = 1; break; case "shortSel": if (selWidth > selHeight) this.lckHeight = 1; else this.lckWidth = 1; break; } if (this.fixWidth) { useWidth = selWidth; useHeight = useWidth / imgRadio; } else if (this.fixHeight) { useHeight = selHeight; useWidth = useHeight * imgRadio; } else if (imgRadio < 1) { if (imgHeight < useHeight) { useWidth = imgWidth; useHeight = imgHeight; } else { useHeight = useHeight; useWidth = useHeight * imgRadio; } } else { if (imgWidth < useWidth) { useWidth = imgWidth; useHeight = imgHeight; } else { useWidth = useWidth; useHeight = useWidth / imgRadio; } } if (this.isin) { this.scaleWidth = 0; this.scaleHeight = 0; if (useWidth < selWidth) { useWidth = selWidth; useHeight = useWidth / imgRadio; this.lckHeight = 0; } if (useHeight < selHeight) { useHeight = selHeight; useWidth = useHeight * imgRadio; this.lckWidth = 0; } } this.scaleSize = 1; this.rotateDeg = 0; this.posWidth = (allWidth - useWidth) / 2; this.posHeight = (allHeight - useHeight - tabHeight) / 2; this.useWidth = useWidth; this.useHeight = useHeight; let style = this.selStyle, left = parseInt(style.left), top = parseInt(style.top), width = parseInt(style.width), height = parseInt(style.height); this.canvas; this.canvasOper; let ctxCanvas = this.ctxCanvas, ctxCanvasOper = this.ctxCanvasOper; ctxCanvasOper.setLineWidth(3); ctxCanvasOper.setStrokeStyle("grey"); ctxCanvasOper.setGlobalAlpha(0.4); ctxCanvasOper.setFillStyle("black"); ctxCanvasOper.strokeRect(left, top, width, height); ctxCanvasOper.fillRect(0, 0, this.windowWidth, top); ctxCanvasOper.fillRect(0, top, left, height); ctxCanvasOper.fillRect(0, top + height, this.windowWidth, this.windowHeight - height - top - tabHeight); ctxCanvasOper.fillRect(left + width, top, this.windowWidth - width - left, height); ctxCanvasOper.setStrokeStyle("red"); ctxCanvasOper.moveTo(left + 20, top); ctxCanvasOper.lineTo(left, top); ctxCanvasOper.lineTo(left, top + 20); ctxCanvasOper.moveTo(left + width - 20, top); ctxCanvasOper.lineTo(left + width, top); ctxCanvasOper.lineTo(left + width, top + 20); ctxCanvasOper.moveTo(left + 20, top + height); ctxCanvasOper.lineTo(left, top + height); ctxCanvasOper.lineTo(left, top + height - 20); ctxCanvasOper.moveTo(left + width - 20, top + height); ctxCanvasOper.lineTo(left + width, top + height); ctxCanvasOper.lineTo(left + width, top + height - 20); const controlPointSize = 10; ctxCanvasOper.setFillStyle("white"); ctxCanvasOper.setStrokeStyle("grey"); ctxCanvasOper.setLineWidth(1); ctxCanvasOper.fillRect(left - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize); ctxCanvasOper.strokeRect(left - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize); ctxCanvasOper.fillRect(left + width - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize); ctxCanvasOper.strokeRect(left + width - controlPointSize / 2, top - controlPointSize / 2, controlPointSize, controlPointSize); ctxCanvasOper.fillRect(left - controlPointSize / 2, top + height - controlPointSize / 2, controlPointSize, controlPointSize); ctxCanvasOper.strokeRect(left - controlPointSize / 2, top + height - controlPointSize / 2, controlPointSize, controlPointSize); ctxCanvasOper.fillRect(left + width - controlPointSize / 2, top + height - controlPointSize / 2, controlPointSize, controlPointSize); ctxCanvasOper.strokeRect(left + width - controlPointSize / 2, top + height - controlPointSize / 2, controlPointSize, controlPointSize); ctxCanvasOper.stroke(); ctxCanvasOper.draw(false, () => { if (ini) { this.styleDisplay = "flex"; this.styleTop = "0"; ctxCanvas.setFillStyle("black"); this.drawImage(); } }); this.$emit("avtinit"); }, drawImage() { let tm_now = Date.now(); if (tm_now - this.drawTm < 20) return; this.drawTm = tm_now; let ctxCanvas = this.ctxCanvas; ctxCanvas.fillRect(0, 0, this.windowWidth, this.windowHeight - tabHeight); ctxCanvas.translate(this.posWidth + this.useWidth / 2, this.posHeight + this.useHeight / 2); ctxCanvas.scale(this.scaleSize, this.scaleSize); ctxCanvas.rotate(this.rotateDeg * Math.PI / 180); ctxCanvas.drawImage(this.imgPath, -this.useWidth / 2, -this.useHeight / 2, this.useWidth, this.useHeight); ctxCanvas.draw(false); }, hideImg() { this.prvImg = ""; this.prvTop = "-10000px"; this.showOper = true; this.prvImgData = null; this.target = null; }, close() { this.styleDisplay = "none"; this.styleTop = "-10000px"; this.hasSel = false; this.hideImg(); this.noBar || uni.showTabBar(); }, preview() { if (this.fPreviewing) return; this.fPreviewing = true; setTimeout(() => { this.fPreviewing = false; }, 1e3); let style = this.selStyle, x2 = parseInt(style.left), y2 = parseInt(style.top), width = parseInt(style.width), height = parseInt(style.height); uni.showLoading({ mask: true }); uni.canvasToTempFilePath({ x: x2, y: y2, width, height, canvasId: "avatar-canvas-" + this.instanceId, fileType: "png", quality: this.qlty, success: (r2) => { this.prvImgTmp = r2 = r2.tempFilePath; let ctxCanvasPrv = this.ctxCanvasPrv, prvX = this.windowWidth, prvY = parseInt(this.cvsStyleHeight), prvWidth = parseInt(this.selStyle.width), prvHeight = parseInt(this.selStyle.height), useWidth = prvX - 40, useHeight = prvY - 80, radio = useWidth / prvWidth, rHeight = prvHeight * radio; if (rHeight < useHeight) { prvWidth = useWidth; prvHeight = rHeight; } else { radio = useHeight / prvHeight; prvWidth *= radio; prvHeight = useHeight; } ctxCanvasPrv.setFillStyle("black"); ctxCanvasPrv.fillRect(0, 0, prvX, prvY); ctxCanvasPrv.fillRect(x2, y2, width, height); this.prvX = prvX = (prvX - prvWidth) / 2; this.prvY = prvY = (prvY - prvHeight) / 2; this.prvWidth = prvWidth; this.prvHeight = prvHeight; ctxCanvasPrv.drawImage(r2, prvX, prvY, prvWidth, prvHeight); ctxCanvasPrv.draw(false, () => { if (this.platform != "android") { this.showOper = false; } this.prvTop = "0"; }); }, fail: () => { uni.showToast({ title: "error2", duration: 2e3 }); }, complete: () => { uni.hideLoading(); } }, this); }, chooseImage(index2 = void 0, params2 = void 0, data = void 0) { if (params2) { formatAppLog("log", "at uni_modules/uview-plus/components/u-cropper/u-cropper.vue:698", params2); let areaWidth = params2.areaWidth || this.areaWidth, areaHeight = params2.areaHeight || this.areaHeight, expWidth = params2.exportWidth || this.exportWidth, expHeight = params2.exportHeight || this.exportHeight, quality = params2.quality, canRotate = params2.canRotate, canScale = params2.canScale, canChangeSize = params2.canChangeSize, minScale = params2.minScale, maxScale = params2.maxScale, stretch = params2.stretch, inner = params2.inner, lock = params2.lock; formatAppLog("log", "at uni_modules/uview-plus/components/u-cropper/u-cropper.vue:712", "areaWidth", this.areaWidth); expWidth && (this.expWidth = expWidth.indexOf("rpx") >= 0 ? parseInt(expWidth) * this.pxRatio : parseInt(expWidth)); expHeight && (this.expHeight = expHeight.indexOf("rpx") >= 0 ? parseInt(expHeight) * this.pxRatio : parseInt(expHeight)); this.letRotate = canRotate === false ? 0 : 1; this.letScale = canScale === false ? 0 : 1; this.letChangeSize = canChangeSize || false; this.qlty = parseInt(quality) || 0.9; this.mnScale = minScale || 0.3; this.mxScale = maxScale || 4; this.stc = stretch; this.isin = inner === true ? 1 : 0; this.lck = lock; if (this.isin) { this.btnWidth = "24%"; this.btnDsp = "none"; } else { this.btnWidth = "19%"; this.btnDsp = "flex"; } if (areaWidth && areaHeight) { areaWidth = areaWidth.indexOf("rpx") >= 0 ? parseInt(areaWidth) * this.pxRatio : parseInt(areaWidth); areaHeight = areaHeight.indexOf("rpx") >= 0 ? parseInt(areaHeight) * this.pxRatio : parseInt(areaHeight); this.selStyle.width = areaWidth + "px"; this.selStyle.height = areaHeight + "px"; this.selStyle.top = (this.windowHeight - areaHeight - tabHeight) / 2 + "px"; this.selStyle.left = (this.windowWidth - areaWidth) / 2 + "px"; this.hasSel = true; } } this.rtn = data; this.indx = index2; this.select(); }, rotate() { if (this.platform === "android") { if (this.fRotateing) return; this.fRotateing = true; setTimeout(() => { this.fRotateing = false; }, 500); } this.rotateDeg += 90 - this.rotateDeg % 90; this.drawImage(); }, start(e2) { let touches = e2.touches, touch0 = touches[0], touch1 = touches[1]; this.touch0 = touch0; this.touch1 = touch1; if (touch1) { let x2 = touch1.x - touch0.x, y2 = touch1.y - touch0.y; this.fgDistance = Math.sqrt(x2 * x2 + y2 * y2); } else { if (this.letChangeSize) { const controlPointSize = 20; const x2 = touch0.x; const y2 = touch0.y; const style = this.selStyle; const left = parseInt(style.left); const top = parseInt(style.top); const width = parseInt(style.width); const height = parseInt(style.height); if (Math.abs(x2 - left) < controlPointSize && Math.abs(y2 - top) < controlPointSize) { this.resizeHandle = "top-left"; } else if (Math.abs(x2 - (left + width)) < controlPointSize && Math.abs(y2 - top) < controlPointSize) { this.resizeHandle = "top-right"; } else if (Math.abs(x2 - left) < controlPointSize && Math.abs(y2 - (top + height)) < controlPointSize) { this.resizeHandle = "bottom-left"; } else if (Math.abs(x2 - (left + width)) < controlPointSize && Math.abs(y2 - (top + height)) < controlPointSize) { this.resizeHandle = "bottom-right"; } else { this.resizeHandle = null; } } else { this.resizeHandle = null; } } }, move(e2) { let touches = e2.touches, touch0 = touches[0], touch1 = touches[1]; if (touch1) { let x2 = touch1.x - touch0.x, y2 = touch1.y - touch0.y, fgDistance = Math.sqrt(x2 * x2 + y2 * y2), scaleSize = 5e-3 * (fgDistance - this.fgDistance), beScaleSize = this.scaleSize + scaleSize; do { if (!this.letScale) break; if (beScaleSize < this.mnScale) break; if (beScaleSize > this.mxScale) break; if (this.isin) { let imgWidth = this.useWidth * beScaleSize, imgHeight = this.useHeight * beScaleSize, rx0 = this.posWidth + this.useWidth / 2, ry0 = this.posHeight + this.useHeight / 2, l2 = rx0 - imgWidth / 2, t2 = ry0 - imgHeight / 2, r2 = l2 + imgWidth, b2 = t2 + imgHeight, left = parseInt(this.selStyle.left), top = parseInt(this.selStyle.top), width = parseInt(this.selStyle.width), height = parseInt(this.selStyle.height); if (left < l2 || left + width > r2 || top < t2 || top + height > b2) break; this.scaleWidth = (this.useWidth - imgWidth) / 2; this.scaleHeight = (this.useHeight - imgHeight) / 2; } this.scaleSize = beScaleSize; } while (0); this.fgDistance = fgDistance; if (touch1.x !== touch0.x && this.letRotate) { x2 = (this.touch1.y - this.touch0.y) / (this.touch1.x - this.touch0.x); y2 = (touch1.y - touch0.y) / (touch1.x - touch0.x); this.rotateDeg += Math.atan((y2 - x2) / (1 + x2 * y2)) * 180 / Math.PI; this.touch0 = touch0; this.touch1 = touch1; } this.drawImage(); } else if (this.touch0) { if (this.resizeHandle && this.letChangeSize) { const style = { ...this.selStyle }; const left = parseInt(style.left); const top = parseInt(style.top); const width = parseInt(style.width); const height = parseInt(style.height); const minWidth = 50; const minHeight = 50; switch (this.resizeHandle) { case "top-left": style.left = touch0.x + "px"; style.top = touch0.y + "px"; style.width = left + width - touch0.x + "px"; style.height = top + height - touch0.y + "px"; break; case "top-right": style.top = touch0.y + "px"; style.width = touch0.x - left + "px"; style.height = top + height - touch0.y + "px"; break; case "bottom-left": style.left = touch0.x + "px"; style.width = left + width - touch0.x + "px"; style.height = touch0.y - top + "px"; break; case "bottom-right": style.width = touch0.x - left + "px"; style.height = touch0.y - top + "px"; break; } if (parseInt(style.width) >= minWidth && parseInt(style.height) >= minHeight) { if (parseInt(style.left) >= 0 && parseInt(style.top) >= 0 && parseInt(style.left) + parseInt(style.width) <= this.windowWidth && parseInt(style.top) + parseInt(style.height) <= this.windowHeight - tabHeight) { this.selStyle = style; this.drawInit(); } } } else { let x2 = touch0.x - this.touch0.x, y2 = touch0.y - this.touch0.y, beX = this.posWidth + x2, beY = this.posHeight + y2; if (this.isin) { let imgWidth = this.useWidth * this.scaleSize, imgHeight = this.useHeight * this.scaleSize, rx0 = beX + this.useWidth / 2, ry0 = beY + this.useHeight / 2, l2 = rx0 - imgWidth / 2, t2 = ry0 - imgHeight / 2, r2 = l2 + imgWidth, b2 = t2 + imgHeight, left = parseInt(this.selStyle.left), top = parseInt(this.selStyle.top), width = parseInt(this.selStyle.width), height = parseInt(this.selStyle.height); if (!this.lckWidth && Math.abs(x2) < 100) { if (left >= l2 && left + width <= r2) { this.posWidth = beX; } else if (left < l2) { this.posWidth = left - this.scaleWidth; } else if (left + width > r2) { this.posWidth = left - (imgWidth - width) - this.scaleWidth; } } if (!this.lckHeight && Math.abs(y2) < 100) { if (top >= t2 && top + height <= b2) { this.posHeight = beY; } else if (top < t2) { this.posHeight = top - this.scaleHeight; } else if (top + height > b2) { this.posHeight = top - (imgHeight - height) - this.scaleHeight; } } } else { if (Math.abs(x2) < 100 && !this.lckWidth) this.posWidth = beX; if (Math.abs(y2) < 100 && !this.lckHeight) this.posHeight = beY; } this.touch0 = touch0; this.drawImage(); } } }, end(e2) { let touches = e2.touches, touch0 = touches && touches[0]; touches && touches[1]; if (touch0) { this.touch0 = touch0; } else { this.touch0 = null; this.touch1 = null; this.resizeHandle = null; } }, getImgData() { return new Promise((resolve, reject) => { let prvX = this.prvX, prvY = this.prvY, prvWidth = this.prvWidth, prvHeight = this.prvHeight; prvX *= this.pixelRatio; prvY *= this.pixelRatio; prvWidth *= this.pixelRatio; prvHeight *= this.pixelRatio; uni.canvasGetImageData({ canvasId: "prv-canvas-" + this.instanceId, x: prvX, y: prvY, width: prvWidth, height: prvHeight, success(res) { resolve(res.data); }, fail(err) { reject(err); } }, this); }); }, async colorChange(e2) { let tm_now = Date.now(); if (tm_now - this.prvTm < 100) return; this.prvTm = tm_now; uni.showLoading({ mask: true }); if (!this.prvImgData) { if (!(this.prvImgData = await this.getImgData().catch((res) => { uni.showToast({ title: "error_read", duration: 2e3 }); }))) return; this.target = new Uint8ClampedArray(this.prvImgData.length); } let data = this.prvImgData, target = this.target, i2 = e2.detail.value, r2, g2, b2, a2, h2, s2, l2, d2, p2, q2, min, max, hK, tR, tG, tB; if (i2 === 0) { target = data; } else { i2 = (i2 + 100) / 200; if (i2 < 5e-3) i2 = 0; if (i2 > 0.995) i2 = 1; for (let n2 = data.length - 1; n2 >= 0; n2 -= 4) { r2 = data[n2 - 3] / 255; g2 = data[n2 - 2] / 255; b2 = data[n2 - 1] / 255; max = Math.max(r2, g2, b2); min = Math.min(r2, g2, b2); d2 = max - min; if (max === min) { h2 = 0; } else if (max === r2 && g2 >= b2) { h2 = 60 * ((g2 - b2) / d2); } else if (max === r2 && g2 < b2) { h2 = 60 * ((g2 - b2) / d2) + 360; } else if (max === g2) { h2 = 60 * ((b2 - r2) / d2) + 120; } else if (max === b2) { h2 = 60 * ((r2 - g2) / d2) + 240; } l2 = (max + min) / 2; if (l2 === 0 || max === min) { s2 = 0; } else if (0 < l2 && l2 <= 0.5) { s2 = d2 / (2 * l2); } else if (l2 > 0.5) { s2 = d2 / (2 - 2 * l2); } data[n2] && (a2 = data[n2]); if (i2 < 0.5) { s2 = s2 * i2 / 0.5; } else if (i2 > 0.5) { s2 = 2 * s2 + 2 * i2 - s2 * i2 / 0.5 - 1; } if (s2 === 0) { r2 = g2 = b2 = Math.round(l2 * 255); } else { if (l2 < 0.5) { q2 = l2 * (1 + s2); } else if (l2 >= 0.5) { q2 = l2 + s2 - l2 * s2; } p2 = 2 * l2 - q2; hK = h2 / 360; tR = hK + 1 / 3; tG = hK; tB = hK - 1 / 3; let correctRGB = (t2) => { if (t2 < 0) { return t2 + 1; } if (t2 > 1) { return t2 - 1; } return t2; }; let createRGB = (t2) => { if (t2 < 1 / 6) { return p2 + (q2 - p2) * 6 * t2; } else if (t2 >= 1 / 6 && t2 < 1 / 2) { return q2; } else if (t2 >= 1 / 2 && t2 < 2 / 3) { return p2 + (q2 - p2) * 6 * (2 / 3 - t2); } return p2; }; r2 = tR = Math.round(createRGB(correctRGB(tR)) * 255); g2 = tG = Math.round(createRGB(correctRGB(tG)) * 255); b2 = tB = Math.round(createRGB(correctRGB(tB)) * 255); } a2 && (target[n2] = a2); target[n2 - 3] = r2; target[n2 - 2] = g2; target[n2 - 1] = b2; } } let prvX = this.prvX, prvY = this.prvY, prvWidth = this.prvWidth, prvHeight = this.prvHeight; this.ctxCanvasPrv.setFillStyle("black"); this.ctxCanvasPrv.fillRect(prvX, prvY, prvWidth, prvHeight); this.ctxCanvasPrv.draw(true); prvX *= this.pixelRatio; prvY *= this.pixelRatio; prvWidth *= this.pixelRatio; prvHeight *= this.pixelRatio; uni.canvasPutImageData({ canvasId: "prv-canvas-" + this.instanceId, x: prvX, y: prvY, width: prvWidth, height: prvHeight, data: target, fail() { uni.showToast({ title: "error_put", duration: 2e3 }); }, complete() { uni.hideLoading(); } }, this); }, btop(base64) { return new Promise(function(resolve, reject) { var arr = base64.split(","), mime = arr[0].match(/:(.*?);/)[1], bstr = atob(arr[1]), n2 = bstr.length, u8arr = new Uint8Array(n2); while (n2--) { u8arr[n2] = bstr.charCodeAt(n2); } return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([u8arr], { type: mime }))); }); } } }; function _sfc_render$1y(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-cropper" }, [ vue.createCommentVNode(' '), vue.createElementVNode("canvas", { "canvas-id": "avatar-canvas-" + $data.instanceId, id: "avatar-canvas-" + $data.instanceId, class: "my-canvas", style: vue.normalizeStyle({ top: $data.styleTop, height: $data.cvsStyleHeight }), "disable-scroll": "false" }, null, 12, ["canvas-id", "id"]), vue.createElementVNode("canvas", { "canvas-id": "oper-canvas-" + $data.instanceId, id: "oper-canvas-" + $data.instanceId, class: "oper-canvas", style: vue.normalizeStyle({ top: $data.styleTop, height: $data.cvsStyleHeight }), "disable-scroll": "false", onTouchstart: _cache[0] || (_cache[0] = (...args) => $options.start && $options.start(...args)), onTouchmove: _cache[1] || (_cache[1] = (...args) => $options.move && $options.move(...args)), onTouchend: _cache[2] || (_cache[2] = (...args) => $options.end && $options.end(...args)) }, null, 44, ["canvas-id", "id"]), vue.createElementVNode("canvas", { "canvas-id": "prv-canvas-" + $data.instanceId, id: "prv-canvas-" + $data.instanceId, class: "prv-canvas", "disable-scroll": "false", onTouchstart: _cache[3] || (_cache[3] = (...args) => $options.hideImg && $options.hideImg(...args)), style: vue.normalizeStyle({ height: $data.cvsStyleHeight, top: $data.prvTop }) }, null, 44, ["canvas-id", "id"]), vue.createElementVNode( "view", { class: "oper-wrapper", style: vue.normalizeStyle({ display: $data.styleDisplay }) }, [ vue.createElementVNode("view", { class: "oper" }, [ $data.showOper ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "btn-wrapper" }, [ vue.createElementVNode( "view", { onClick: _cache[4] || (_cache[4] = (...args) => $options.select && $options.select(...args)), "hover-class": "hover", style: vue.normalizeStyle({ width: $data.btnWidth }) }, [ vue.createElementVNode( "text", null, vue.toDisplayString($options.t("up.common.re-select")), 1 /* TEXT */ ) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { onClick: _cache[5] || (_cache[5] = (...args) => $options.close && $options.close(...args)), "hover-class": "hover", style: vue.normalizeStyle({ width: $data.btnWidth }) }, [ vue.createElementVNode( "text", null, vue.toDisplayString($options.t("up.common.close")), 1 /* TEXT */ ) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { onClick: _cache[6] || (_cache[6] = (...args) => $options.rotate && $options.rotate(...args)), "hover-class": "hover", style: vue.normalizeStyle({ width: $data.btnWidth, display: $data.btnDsp }) }, [ vue.createElementVNode( "text", null, vue.toDisplayString($options.t("up.common.rotate")), 1 /* TEXT */ ) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { onClick: _cache[7] || (_cache[7] = (...args) => $options.preview && $options.preview(...args)), "hover-class": "hover", style: vue.normalizeStyle({ width: $data.btnWidth }) }, [ vue.createElementVNode( "text", null, vue.toDisplayString($options.t("up.common.preview")), 1 /* TEXT */ ) ], 4 /* STYLE */ ), vue.createElementVNode( "view", { onClick: _cache[8] || (_cache[8] = (...args) => $options.confirm && $options.confirm(...args)), "hover-class": "hover", style: vue.normalizeStyle({ width: $data.btnWidth }) }, [ vue.createElementVNode( "text", null, vue.toDisplayString($options.t("up.common.confirm")), 1 /* TEXT */ ) ], 4 /* STYLE */ ) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "clr-wrapper" }, [ vue.createElementVNode( "slider", { class: "my-slider", onChange: _cache[9] || (_cache[9] = (...args) => $options.colorChange && $options.colorChange(...args)), "block-size": "25", value: "0", min: "-100", max: "100", activeColor: "red", backgroundColor: "green", "block-color": "grey", "show-value": "" }, null, 32 /* NEED_HYDRATION */ ), vue.createElementVNode( "view", { onClick: _cache[10] || (_cache[10] = (...args) => $options.prvUpload && $options.prvUpload(...args)), "hover-class": "hover", style: vue.normalizeStyle({ width: $data.btnWidth }) }, [ vue.createElementVNode( "text", null, vue.toDisplayString($options.t("up.common.confirm")), 1 /* TEXT */ ) ], 4 /* STYLE */ ) ])) ]) ], 4 /* STYLE */ ), $data.styleDisplay == "none" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, onClick: _cache[11] || (_cache[11] = ($event) => $options.chooseImage(0, {})) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true) ]); } const uCropper = /* @__PURE__ */ _export_sfc(_sfc_main$1z, [["render", _sfc_render$1y], ["__scopeId", "data-v-4888bba5"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-cropper/u-cropper.vue"]]); const __vite_glob_0_33 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uCropper }, Symbol.toStringTag, { value: "Module" })); const props$11 = defineMixin({ props: { // 是否展示工具条 show: { type: Boolean, default: () => props$1x.toolbar.show }, // 取消按钮的文字 cancelText: { type: String, default: () => props$1x.toolbar.cancelText }, // 确认按钮的文字 confirmText: { type: String, default: () => props$1x.toolbar.confirmText }, // 取消按钮的颜色 cancelColor: { type: String, default: () => props$1x.toolbar.cancelColor }, // 确认按钮的颜色 confirmColor: { type: String, default: () => props$1x.toolbar.confirmColor }, // 标题文字 title: { type: String, default: () => props$1x.toolbar.title }, // 开启右侧插槽 rightSlot: { type: Boolean, default: false } } }); const _sfc_main$1y = { name: "u-toolbar", mixins: [mpMixin, mixin, props$11], emits: ["confirm", "cancel"], created() { }, methods: { // 点击取消按钮 cancel() { this.$emit("cancel"); }, // 点击确定按钮 confirm() { this.$emit("confirm"); } } }; function _sfc_render$1x(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-toolbar", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])) }, [ vue.createElementVNode("view", { class: "u-toolbar__left" }, [ vue.createElementVNode("view", { class: "u-toolbar__cancel__wrapper", "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-toolbar__wrapper__cancel", onClick: _cache[0] || (_cache[0] = (...args) => $options.cancel && $options.cancel(...args)), style: vue.normalizeStyle({ color: _ctx.cancelColor }) }, vue.toDisplayString(_ctx.cancelText), 5 /* TEXT, STYLE */ ) ]) ]), _ctx.title ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-toolbar__title u-line-1" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-toolbar__right" }, [ !_ctx.rightSlot ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-toolbar__confirm__wrapper", "hover-class": "u-hover-class" }, [ vue.createElementVNode( "text", { class: "u-toolbar__wrapper__confirm", onClick: _cache[1] || (_cache[1] = (...args) => $options.confirm && $options.confirm(...args)), style: vue.normalizeStyle({ color: _ctx.confirmColor }) }, vue.toDisplayString(_ctx.confirmText), 5 /* TEXT, STYLE */ ) ])) : vue.renderSlot(_ctx.$slots, "right", { key: 1 }, void 0, true) ]) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$5 = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["render", _sfc_render$1x], ["__scopeId", "data-v-eadae74e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-toolbar/u-toolbar.vue"]]); const __vite_glob_0_121 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$5 }, Symbol.toStringTag, { value: "Module" })); const props$10 = defineMixin({ props: { modelValue: { type: Array, default: () => [] }, hasInput: { type: Boolean, default: false }, inputProps: { type: Object, default: () => { return {}; } }, disabled: { type: Boolean, default: () => props$1x.picker.disabled }, disabledColor: { type: String, default: () => props$1x.picker.disabledColor }, placeholder: { type: String, default: () => props$1x.picker.placeholder }, // 是否展示picker弹窗 show: { type: Boolean, default: () => props$1x.picker.show }, // 弹出的方向,可选值为 top bottom right left center popupMode: { type: String, default: () => props$1x.picker.popupMode }, // 是否展示顶部的操作栏 showToolbar: { type: Boolean, default: () => props$1x.picker.showToolbar }, // 顶部标题 title: { type: String, default: () => props$1x.picker.title }, // 对象数组,设置每一列的数据 columns: { type: Array, default: () => props$1x.picker.columns }, // 是否显示加载中状态 loading: { type: Boolean, default: () => props$1x.picker.loading }, // 各列中,单个选项的高度 itemHeight: { type: [String, Number], default: () => props$1x.picker.itemHeight }, // 取消按钮的文字 cancelText: { type: String, default: () => props$1x.picker.cancelText }, // 确认按钮的文字 confirmText: { type: String, default: () => props$1x.picker.confirmText }, // 取消按钮的颜色 cancelColor: { type: String, default: () => props$1x.picker.cancelColor }, // 确认按钮的颜色 confirmColor: { type: String, default: () => props$1x.picker.confirmColor }, // 每列中可见选项的数量 visibleItemCount: { type: [String, Number], default: () => props$1x.picker.visibleItemCount }, // 选项对象中,需要展示的属性键名 keyName: { type: String, default: () => props$1x.picker.keyName }, // 选项对象中,需要获取的属性值键名 valueName: { type: String, default: () => props$1x.picker.valueName }, // 是否允许点击遮罩关闭选择器 closeOnClickOverlay: { type: Boolean, default: () => props$1x.picker.closeOnClickOverlay }, // 各列的默认索引 defaultIndex: { type: Array, default: () => props$1x.picker.defaultIndex }, // 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效 immediateChange: { type: Boolean, default: () => props$1x.picker.immediateChange }, // 工具栏右侧插槽是否开启 toolbarRightSlot: { type: Boolean, default: false }, // 层级 zIndex: { type: [String, Number], default: () => props$1x.picker.zIndex }, // 弹窗背景色,设置为transparent可去除白色背景 bgColor: { type: String, default: () => props$1x.picker.bgColor }, // 是否显示圆角 round: { type: [Boolean, String, Number], default: () => props$1x.picker.round }, // 动画时长,单位ms duration: { type: [String, Number], default: () => props$1x.picker.duration }, // 遮罩的透明度,0-1之间 overlayOpacity: { type: [Number, String], default: () => props$1x.picker.overlayOpacity }, // 是否页面内展示 pageInline: { type: Boolean, default: () => props$1x.picker.pageInline } } }); const _sfc_main$1x = { name: "u-picker", mixins: [mpMixin, mixin, props$10], data() { return { // 上一次选择的列索引 lastIndex: [], // 索引值 ,对应picker-view的value innerIndex: [], // 各列的值 innerColumns: [], // 上一次的变化列索引 columnIndex: 0, showByClickInput: false, currentActiveValue: [] //当前用户选中,但是还没确认的值,用户没做change操作时候,点击确认可以默认选中第一个 }; }, watch: { // 监听columns参数的变化 columns: { immediate: true, deep: true, handler(n2) { this.setColumns(n2); } }, // 监听默认索引的变化,重新设置对应的值 defaultIndex: { immediate: true, deep: true, handler(n2, o2) { if (!o2 || n2.join("/") != o2.join("/")) { this.setIndexs(n2, true); } } }, modelValue: { immediate: true, deep: true, handler(n2, o2) { if (!o2 || n2.join("/") != o2.join("/")) { let arr = []; if (n2 != null) { n2.forEach((element, index2) => { let currentCols = this.getColumnValues(index2); if (currentCols && Object.prototype.toString.call(currentCols) === "[object Object]") { currentCols.forEach((item, index22) => { if (item[this.keyName] == element) { arr.push(index22); } }); } else { currentCols.forEach((item, index22) => { if (item == element) { arr.push(index22); } }); } }); if (arr.length == 0 && this.defaultIndex) ; else { this.setIndexs(arr, true); } } } } } }, emits: ["close", "cancel", "confirm", "change", "update:modelValue", "update:show"], computed: { // input的props inputPropsInner() { return { border: this.inputBorder, placeholder: this.placeholder, disabled: this.disabled, disabledColor: this.disabledColor, ...this.inputProps }; }, //已选&&已确认的值显示在input上面的文案 inputLabel() { let firstItem = this.innerColumns[0] && this.innerColumns[0][0]; if (firstItem && Object.prototype.toString.call(firstItem) === "[object Object]") { let res = this.innerColumns[0].filter((item) => this.modelValue.includes(item["id"])); res = res.map((item) => item[this.keyName]); return res.join("/"); } else { return this.modelValue.join("/"); } }, //已选,待确认的值 inputValue() { let items = this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]); let res = []; if (items[0] && Object.prototype.toString.call(items[0]) === "[object Object]") { items.forEach((element) => { res.push(element && element[this.valueName]); }); } else { items.forEach((element, index2) => { res.push(element); }); } return res; } }, methods: { addUnit, testArray: test.array, onShowByClickInput() { if (!this.disabled) { this.showByClickInput = !this.showByClickInput; } }, // 获取item需要显示的文字,判别为对象还是文本 getItemText(item) { if (test.object(item)) { return item[this.keyName]; } else { return item; } }, // 关闭选择器 closeHandler() { if (this.closeOnClickOverlay) { if (this.hasInput) { this.showByClickInput = false; } this.setDefault(); this.$emit("update:show", false); this.$emit("close"); } }, // 点击工具栏的取消按钮 cancel() { if (this.hasInput) { this.showByClickInput = false; } this.setDefault(); this.$emit("update:show", false); this.$emit("cancel"); }, setDefault() { let arr = [0]; if (this.lastIndex.length == 0) { if (Array.isArray(this.defaultIndex) && this.defaultIndex.length == this.innerColumns.length) { arr = [...this.defaultIndex]; } else { arr = Array(this.innerColumns.length).fill(0); } } else { arr = deepClone(this.lastIndex); } this.setLastIndex(arr); this.setIndexs(arr); }, // 点击工具栏的确定按钮 confirm() { if (!this.currentActiveValue.length) { this.setDefault(); } this.$emit("update:modelValue", this.inputValue); if (this.hasInput) { this.showByClickInput = false; } this.setLastIndex(this.innerIndex); this.$emit("update:show", false); this.$emit("confirm", { indexs: this.innerIndex, value: this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]), values: this.innerColumns }); }, // 选择器某一列的数据发生变化时触发 changeHandler(e2) { const { value: value2 } = e2.detail; let index2 = 0, columnIndex = 0; this.currentActiveValue = value2; for (let i2 = 0; i2 < value2.length; i2++) { let item = value2[i2]; if (item !== (this.lastIndex[i2] || 0)) { columnIndex = i2; index2 = item; break; } } this.columnIndex = columnIndex; const values = this.innerColumns; this.setIndexs(value2); this.$emit("change", { // 微信小程序不能传递this,会因为循环引用而报错 // picker: this, value: this.innerColumns.map((item, index3) => item[value2[index3]]), index: index2, indexs: value2, // values为当前变化列的数组内容 values, columnIndex }); }, // 设置index索引,此方法可被外部调用设置 setIndexs(index2, setLastIndex) { this.innerIndex = deepClone(index2); if (setLastIndex) { this.setLastIndex(index2); } }, // 记录上一次的各列索引位置 setLastIndex(index2) { this.lastIndex = deepClone(index2); }, // 设置对应列选项的所有值 setColumnValues(columnIndex, values) { this.innerColumns.splice(columnIndex, 1, values); this.setLastIndex(this.innerIndex.slice(0, columnIndex)); let tmpIndex = deepClone(this.innerIndex); for (let i2 = 0; i2 < this.innerColumns.length; i2++) { if (i2 > this.columnIndex) { tmpIndex[i2] = 0; } } this.setIndexs(tmpIndex); }, // 获取对应列的所有选项 getColumnValues(columnIndex) { (async () => { await sleep(); })(); return this.innerColumns[columnIndex]; }, // 设置整体各列的columns的值 setColumns(columns) { this.innerColumns = deepClone(columns); if (this.innerIndex.length === 0) { this.innerIndex = new Array(columns.length).fill(0); } }, // 获取各列选中值对应的索引 getIndexs() { return this.innerIndex; }, // 获取各列选中的值 getValues() { (async () => { await sleep(); })(); return this.innerColumns.map((item, index2) => item[this.innerIndex[index2]]); } } }; function _sfc_render$1w(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_input = vue.resolveComponent("up-input"); const _component_u_toolbar = resolveEasycom(vue.resolveDynamicComponent("u-toolbar"), __easycom_0$5); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2); return vue.openBlock(), vue.createElementBlock("view", { class: "u-picker-wraper" }, [ _ctx.hasInput ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-picker-input cursor-pointer", onClick: _cache[1] || (_cache[1] = (...args) => $options.onShowByClickInput && $options.onShowByClickInput(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", { value: $options.inputLabel }, void 0, true), vue.renderSlot(_ctx.$slots, "trigger", { value: $options.inputLabel }, void 0, true), !_ctx.$slots["default"] && !_ctx.$slots["$default"] && !_ctx.$slots["trigger"] ? (vue.openBlock(), vue.createBlock(_component_up_input, vue.mergeProps({ key: 0, readonly: true, modelValue: $options.inputLabel, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $options.inputLabel = $event) }, $options.inputPropsInner), null, 16, ["modelValue"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "input-cover" }) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_popup, { show: _ctx.show || _ctx.hasInput && $data.showByClickInput, mode: _ctx.popupMode, zIndex: _ctx.zIndex, bgColor: _ctx.bgColor, round: _ctx.round, duration: _ctx.duration, pageInline: _ctx.pageInline, overlayOpacity: _ctx.overlayOpacity, onClose: $options.closeHandler }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-picker" }, [ _ctx.showToolbar ? (vue.openBlock(), vue.createBlock(_component_u_toolbar, { key: 0, cancelColor: _ctx.cancelColor, confirmColor: _ctx.confirmColor, cancelText: _ctx.cancelText, confirmText: _ctx.confirmText, title: _ctx.title, rightSlot: _ctx.toolbarRightSlot ? true : false, onCancel: $options.cancel, onConfirm: $options.confirm }, { right: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "toolbar-right", {}, void 0, true) ]), _: 3 /* FORWARDED */ }, 8, ["cancelColor", "confirmColor", "cancelText", "confirmText", "title", "rightSlot", "onCancel", "onConfirm"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "toolbar-bottom", {}, void 0, true), vue.createElementVNode("picker-view", { class: "u-picker__view", indicatorStyle: `height: ${$options.addUnit(_ctx.itemHeight, "px")}`, value: $data.innerIndex, immediateChange: _ctx.immediateChange, style: vue.normalizeStyle({ height: `${$options.addUnit(_ctx.visibleItemCount * _ctx.itemHeight, "px")}` }), onChange: _cache[2] || (_cache[2] = (...args) => $options.changeHandler && $options.changeHandler(...args)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.innerColumns, (item, index2) => { return vue.openBlock(), vue.createElementBlock("picker-view-column", { key: index2, class: "u-picker__view__column" }, [ $options.testArray(item) ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(item, (item1, index1) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-picker__view__column__item u-line-1", [index1 === $data.innerIndex[index2] && "u-picker__view__column__item--selected"]]), key: index1, style: vue.normalizeStyle({ height: $options.addUnit(_ctx.itemHeight, "px"), lineHeight: $options.addUnit(_ctx.itemHeight, "px"), fontWeight: index1 === $data.innerIndex[index2] ? "bold" : "normal", display: "block" }) }, vue.toDisplayString($options.getItemText(item1)), 7 /* TEXT, CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 44, ["indicatorStyle", "value", "immediateChange"]), _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-picker--loading" }, [ vue.createVNode(_component_u_loading_icon, { mode: "circle" }) ])) : vue.createCommentVNode("v-if", true) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show", "mode", "zIndex", "bgColor", "round", "duration", "pageInline", "overlayOpacity", "onClose"]) ]); } const __easycom_0$4 = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["render", _sfc_render$1w], ["__scopeId", "data-v-91b05052"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-picker/u-picker.vue"]]); const __vite_glob_0_78 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$4 }, Symbol.toStringTag, { value: "Module" })); const props$$ = defineMixin({ props: { // 是否显示input hasInput: { type: Boolean, default: false }, inputProps: { type: Object, default: () => { return {}; } }, inputBorder: { type: String, default: () => props$1x.input.inputBorder }, disabled: { type: Boolean, default: () => props$1x.input.disabled }, disabledColor: { type: String, default: () => props$1x.input.disabledColor }, placeholder: { type: String, default: () => props$1x.input.placeholder }, format: { type: String, default: () => "" }, // 是否打开组件 show: { type: Boolean, default: () => props$1x.datetimePicker.show }, // 弹出的方向,可选值为 top bottom right left center popupMode: { type: String, default: () => props$1x.picker.popupMode }, // 是否展示顶部的操作栏 showToolbar: { type: Boolean, default: () => props$1x.datetimePicker.showToolbar }, // 工具栏右侧内容 toolbarRightSlot: { type: Boolean, default: false }, // 绑定值 modelValue: { type: [String, Number], default: () => props$1x.datetimePicker.value }, // 顶部标题 title: { type: String, default: () => props$1x.datetimePicker.title }, // 展示格式,mode=date为日期选择,mode=time为时间选择,mode=year-month为年月选择,mode=datetime为日期时间选择 mode: { type: String, default: () => props$1x.datetimePicker.mode }, // 可选的最大时间 maxDate: { type: Number, // 最大默认值为后10年 default: () => props$1x.datetimePicker.maxDate }, // 可选的最小时间 minDate: { type: Number, // 最小默认值为前10年 default: () => props$1x.datetimePicker.minDate }, // 可选的最小小时,仅mode=time有效 minHour: { type: Number, default: () => props$1x.datetimePicker.minHour }, // 可选的最大小时,仅mode=time有效 maxHour: { type: Number, default: () => props$1x.datetimePicker.maxHour }, // 可选的最小分钟,仅mode=time有效 minMinute: { type: Number, default: () => props$1x.datetimePicker.minMinute }, // 可选的最大分钟,仅mode=time有效 maxMinute: { type: Number, default: () => props$1x.datetimePicker.maxMinute }, // 选项过滤函数 filter: { type: [Function, null], default: () => props$1x.datetimePicker.filter }, // 选项格式化函数 formatter: { type: [Function, null], default: () => props$1x.datetimePicker.formatter }, // 是否显示加载中状态 loading: { type: Boolean, default: () => props$1x.datetimePicker.loading }, // 各列中,单个选项的高度 itemHeight: { type: [String, Number], default: () => props$1x.datetimePicker.itemHeight }, // 取消按钮的文字 cancelText: { type: String, default: () => props$1x.datetimePicker.cancelText }, // 确认按钮的文字 confirmText: { type: String, default: () => props$1x.datetimePicker.confirmText }, // 取消按钮的颜色 cancelColor: { type: String, default: () => props$1x.datetimePicker.cancelColor }, // 确认按钮的颜色 confirmColor: { type: String, default: () => props$1x.datetimePicker.confirmColor }, // 每列中可见选项的数量 visibleItemCount: { type: [String, Number], default: () => props$1x.datetimePicker.visibleItemCount }, // 是否允许点击遮罩关闭选择器 closeOnClickOverlay: { type: Boolean, default: () => props$1x.datetimePicker.closeOnClickOverlay }, // 各列的默认索引 defaultIndex: { type: Array, default: () => props$1x.datetimePicker.defaultIndex }, // 是否页面内展示 pageInline: { type: Boolean, default: () => props$1x.datetimePicker.pageInline } } }); function times(n2, iteratee) { let index2 = -1; const result = Array(n2 < 0 ? 0 : n2); while (++index2 < n2) { result[index2] = iteratee(index2); } return result; } const _sfc_main$1w = { name: "up-datetime-picker", mixins: [mpMixin, mixin, props$$], data() { return { // 原来的日期选择器不方便,这里增加一个hasInput选项支持类似element的自带输入框的功能。 inputValue: "", // 表单显示值 showByClickInput: false, // 是否在hasInput模式下显示日期选择弹唱 columns: [], innerDefaultIndex: [], innerFormatter: (type2, value2) => value2 }; }, watch: { show(newValue, oldValue) { if (newValue) { this.innerValue = this.correctValue(this.modelValue); this.updateColumnValue(this.innerValue); } }, modelValue(newValue) { this.init(); }, propsChange() { this.init(); } }, computed: { // 如果以下这些变量发生了变化,意味着需要重新初始化各列的值 propsChange() { return [this.mode, this.maxDate, this.minDate, this.minHour, this.maxHour, this.minMinute, this.maxMinute, this.filter, this.modelValue]; }, // input的props inputPropsInner() { return { border: this.inputBorder, placeholder: this.placeholder, disabled: this.disabled, disabledColor: this.disabledColor, ...this.inputProps }; } }, mounted() { this.init(); }, emits: ["close", "cancel", "confirm", "change", "update:modelValue"], methods: { getInputValue(newValue) { if (newValue == "" || !newValue || newValue == void 0) { this.inputValue = ""; return; } if (this.mode == "time") { this.inputValue = newValue; } else { if (this.format) { this.inputValue = e$1(newValue).format(this.format); } else { let format2 = ""; switch (this.mode) { case "date": format2 = "YYYY-MM-DD"; break; case "year-month": format2 = "YYYY-MM"; break; case "datehour": format2 = "YYYY-MM-DD HH"; break; case "datetime": format2 = "YYYY-MM-DD HH:mm"; break; case "time": format2 = "HH:mm"; break; } this.inputValue = e$1(newValue).format(format2); } } }, init() { this.innerValue = this.correctValue(this.modelValue); this.updateColumnValue(this.innerValue); this.getInputValue(this.innerValue); }, // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 setFormatter(e2) { this.innerFormatter = e2; }, // 关闭选择器 close() { if (this.closeOnClickOverlay) { this.$emit("close"); } }, // 点击工具栏的取消按钮 cancel() { if (this.hasInput) { this.showByClickInput = false; } this.$emit("cancel"); }, // 点击工具栏的确定按钮 confirm() { this.$emit("update:modelValue", this.innerValue); if (this.hasInput) { this.getInputValue(this.innerValue); this.showByClickInput = false; } this.$emit("confirm", { value: this.innerValue, mode: this.mode }); }, //用正则截取输出值,当出现多组数字时,抛出错误 intercept(e2, type2) { let judge = e2.match(/\d+/g); if (judge.length > 1) { error("请勿在过滤或格式化函数时添加数字"); return 0; } else if (type2 && judge[0].length == 4) { return judge[0]; } else if (judge[0].length > 2) { error("请勿在过滤或格式化函数时添加数字"); return 0; } else { return judge[0]; } }, // 列发生变化时触发 change(e2) { const { indexs, values } = e2; let selectValue = ""; if (this.mode === "time") { selectValue = `${this.intercept(values[0][indexs[0]])}:${this.intercept(values[1][indexs[1]])}`; } else { const year = parseInt(this.intercept(values[0][indexs[0]], "year")); const month = parseInt(this.intercept(values[1][indexs[1]])); let date3 = parseInt(values[2] ? this.intercept(values[2][indexs[2]]) : 1); let hour = 0, minute = 0; const maxDate = e$1(`${year}-${month}`).daysInMonth(); if (this.mode === "year-month") { date3 = 1; } date3 = Math.min(maxDate, date3); if (this.mode === "datetime") { hour = parseInt(this.intercept(values[3][indexs[3]])); minute = parseInt(this.intercept(values[4][indexs[4]])); } selectValue = Number(new Date(year, month - 1, date3, hour, minute)); } selectValue = this.correctValue(selectValue); this.innerValue = selectValue; this.updateColumnValue(selectValue); this.$emit("change", { value: selectValue, // 微信小程序不能传递this实例,会因为循环引用而报错 // picker: this.$refs.picker, mode: this.mode }); }, // 更新各列的值,进行补0、格式化等操作 updateColumnValue(value2) { this.innerValue = value2; this.updateColumns(); setTimeout(() => { this.updateIndexs(value2); }, 0); }, // 更新索引 updateIndexs(value2) { let values = []; const formatter = this.formatter || this.innerFormatter; if (this.mode === "time") { const timeArr = value2.split(":"); values = [formatter("hour", timeArr[0]), formatter("minute", timeArr[1])]; } else { values = [ formatter("year", `${e$1(value2).year()}`), // 月份补0 formatter("month", padZero$1(e$1(value2).month() + 1)) ]; if (this.mode === "date") { values.push(formatter("day", padZero$1(e$1(value2).date()))); } if (this.mode === "datetime") { values.push(formatter("day", padZero$1(e$1(value2).date())), formatter("hour", padZero$1(e$1(value2).hour())), formatter("minute", padZero$1(e$1(value2).minute()))); } } const indexs = this.columns.map((column, index2) => { return Math.max(0, column.findIndex((item) => item === values[index2])); }); this.innerDefaultIndex = indexs; }, // 更新各列的值 updateColumns() { const formatter = this.formatter || this.innerFormatter; const results = this.getOriginColumns().map((column) => column.values.map((value2) => formatter(column.type, value2))); this.columns = results; }, getOriginColumns() { const results = this.getRanges().map(({ type: type2, range: range2 }) => { let values = times(range2[1] - range2[0] + 1, (index2) => { let value2 = range2[0] + index2; value2 = type2 === "year" ? `${value2}` : padZero$1(value2); return value2; }); if (this.filter) { values = this.filter(type2, values); if (!values || values && values.length == 0) { formatAppLog("log", "at uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue:366", "日期filter结果不能为空"); } } return { type: type2, values }; }); return results; }, // 通过最大值和最小值生成数组 generateArray(start, end) { return Array.from(new Array(end + 1).keys()).slice(start); }, // 得出合法的时间 correctValue(value2) { const isDateMode = this.mode !== "time"; if (isDateMode && !e$1.unix(value2).isValid()) { value2 = this.minDate; } else if (!isDateMode && !value2) { value2 = `${padZero$1(this.minHour)}:${padZero$1(this.minMinute)}`; } if (!isDateMode) { if (String(value2).indexOf(":") === -1) return error("时间错误,请传递如12:24的格式"); let [hour, minute] = value2.split(":"); hour = padZero$1(range$1(this.minHour, this.maxHour, Number(hour))); minute = padZero$1(range$1(this.minMinute, this.maxMinute, Number(minute))); return `${hour}:${minute}`; } else { value2 = e$1(value2).isBefore(e$1(this.minDate)) ? this.minDate : value2; value2 = e$1(value2).isAfter(e$1(this.maxDate)) ? this.maxDate : value2; return value2; } }, // 获取每列的最大和最小值 getRanges() { if (this.mode === "time") { return [ { type: "hour", range: [this.minHour, this.maxHour] }, { type: "minute", range: [this.minMinute, this.maxMinute] } ]; } const { maxYear, maxDate, maxMonth, maxHour, maxMinute } = this.getBoundary("max", this.innerValue); const { minYear, minDate, minMonth, minHour, minMinute } = this.getBoundary("min", this.innerValue); const result = [ { type: "year", range: [minYear, maxYear] }, { type: "month", range: [minMonth, maxMonth] }, { type: "day", range: [minDate, maxDate] }, { type: "hour", range: [minHour, maxHour] }, { type: "minute", range: [minMinute, maxMinute] } ]; if (this.mode === "date") result.splice(3, 2); if (this.mode === "year-month") result.splice(2, 3); return result; }, // 根据minDate、maxDate、minHour、maxHour等边界值,判断各列的开始和结束边界值 getBoundary(type2, innerValue) { let value2 = new Date(innerValue); if (isNaN(value2.getTime())) { value2 = /* @__PURE__ */ new Date(); } const boundary = new Date(this[`${type2}Date`]); const year = e$1(boundary).year(); let month = 1; let date3 = 1; let hour = 0; let minute = 0; if (type2 === "max") { month = 12; date3 = e$1(value2).daysInMonth(); hour = 23; minute = 59; } if (e$1(value2).year() === year) { month = e$1(boundary).month() + 1; if (e$1(value2).month() + 1 === month) { date3 = e$1(boundary).date(); if (e$1(value2).date() === date3) { hour = e$1(boundary).hour(); if (e$1(value2).hour() === hour) { minute = e$1(boundary).minute(); } } } } return { [`${type2}Year`]: year, [`${type2}Month`]: month, [`${type2}Date`]: date3, [`${type2}Hour`]: hour, [`${type2}Minute`]: minute }; }, onShowByClickInput() { if (!this.disabled) { this.showByClickInput = !this.showByClickInput; } } } }; function _sfc_render$1v(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_input = vue.resolveComponent("up-input"); const _component_u_picker = resolveEasycom(vue.resolveDynamicComponent("u-picker"), __easycom_0$4); return vue.openBlock(), vue.createElementBlock("view", { class: "u-datetime-picker" }, [ _ctx.hasInput ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-datetime-picker__has-input", onClick: _cache[1] || (_cache[1] = (...args) => $options.onShowByClickInput && $options.onShowByClickInput(...args)) }, [ vue.renderSlot(_ctx.$slots, "trigger", { value: $data.inputValue }, () => [ vue.createVNode(_component_up_input, vue.mergeProps({ readonly: !!$data.showByClickInput, modelValue: $data.inputValue, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $data.inputValue = $event) }, $options.inputPropsInner), null, 16, ["readonly", "modelValue"]), vue.createElementVNode("view", { class: "input-cover" }) ], true) ])) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_u_picker, { ref: "picker", show: _ctx.pageInline || _ctx.show || _ctx.hasInput && $data.showByClickInput, popupMode: _ctx.popupMode, closeOnClickOverlay: _ctx.closeOnClickOverlay, columns: $data.columns, title: _ctx.title, itemHeight: _ctx.itemHeight, showToolbar: _ctx.showToolbar, visibleItemCount: _ctx.visibleItemCount, defaultIndex: $data.innerDefaultIndex, cancelText: _ctx.cancelText, confirmText: _ctx.confirmText, cancelColor: _ctx.cancelColor, confirmColor: _ctx.confirmColor, toolbarRightSlot: _ctx.toolbarRightSlot, pageInline: _ctx.pageInline, onClose: $options.close, onCancel: $options.cancel, onConfirm: $options.confirm, onChange: $options.change }, { "toolbar-right": vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "toolbar-right", {}, void 0, true) ]), "toolbar-bottom": vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "toolbar-bottom", {}, void 0, true) ]), _: 3 /* FORWARDED */ }, 8, ["show", "popupMode", "closeOnClickOverlay", "columns", "title", "itemHeight", "showToolbar", "visibleItemCount", "defaultIndex", "cancelText", "confirmText", "cancelColor", "confirmColor", "toolbarRightSlot", "pageInline", "onClose", "onCancel", "onConfirm", "onChange"]) ]); } const uDatetimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["render", _sfc_render$1v], ["__scopeId", "data-v-e7a0f1eb"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-datetime-picker/u-datetime-picker.vue"]]); const __vite_glob_0_34 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uDatetimePicker }, Symbol.toStringTag, { value: "Module" })); const props$_ = defineMixin({ props: { // 是否虚线 dashed: { type: Boolean, default: () => props$1x.divider.dashed }, // 是否细线 hairline: { type: Boolean, default: () => props$1x.divider.hairline }, // 是否以点替代文字,优先于text字段起作用 dot: { type: Boolean, default: () => props$1x.divider.dot }, // 内容文本的位置,left-左边,center-中间,right-右边 textPosition: { type: String, default: () => props$1x.divider.textPosition }, // 文本内容 text: { type: [String, Number], default: () => props$1x.divider.text }, // 文本大小 textSize: { type: [String, Number], default: () => props$1x.divider.textSize }, // 文本颜色 textColor: { type: String, default: () => props$1x.divider.textColor }, // 线条颜色 lineColor: { type: String, default: () => props$1x.divider.lineColor } } }); const _sfc_main$1v = { name: "u-divider", mixins: [mpMixin, mixin, props$_], computed: { textStyle() { const style = {}; style.fontSize = addUnit(this.textSize); style.color = this.textColor; return style; }, // 左边线条的的样式 leftLineStyle() { const style = {}; if (this.textPosition === "left") { style.width = "80rpx"; } else { style.flex = 1; } return style; }, // 右边线条的的样式 rightLineStyle() { const style = {}; if (this.textPosition === "right") { style.width = "80rpx"; } else { style.flex = 1; } return style; } }, emits: ["click"], methods: { addStyle, // divider组件被点击时触发 click() { this.$emit("click"); } } }; function _sfc_render$1u(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-divider", style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]), onClick: _cache[0] || (_cache[0] = (...args) => $options.click && $options.click(...args)) }, [ vue.createVNode(_component_u_line, { color: _ctx.lineColor, customStyle: $options.leftLineStyle, hairline: _ctx.hairline, dashed: _ctx.dashed }, null, 8, ["color", "customStyle", "hairline", "dashed"]), _ctx.dot ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "u-divider__dot" }, "●")) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, () => [ !_ctx.dot && _ctx.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-divider__text", style: vue.normalizeStyle([$options.textStyle]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], true), vue.createVNode(_component_u_line, { color: _ctx.lineColor, customStyle: $options.rightLineStyle, hairline: _ctx.hairline, dashed: _ctx.dashed }, null, 8, ["color", "customStyle", "hairline", "dashed"]) ], 4 /* STYLE */ ); } const uDivider = /* @__PURE__ */ _export_sfc(_sfc_main$1v, [["render", _sfc_render$1u], ["__scopeId", "data-v-ea022cee"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-divider/u-divider.vue"]]); const __vite_glob_0_35 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uDivider }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1u = { name: "u-dragsort", mixins: [mixin], props: { initialList: { type: Array, required: true, default: () => [] }, draggable: { type: Boolean, default: true }, direction: { type: String, default: "vertical", validator: (value2) => ["vertical", "horizontal", "all"].includes(value2) }, // 新增列数属性,用于all模式 columns: { type: Number, default: 3 } }, data() { return { list: [], dragIndex: -1, itemHeight: 40, itemWidth: 80, areaWidth: 0, // 可拖动区域宽度 areaHeight: 0, // 可拖动区域高度 originalPositions: [], // 保存原始位置 currentPosition: { x: 0, y: 0 } }; }, computed: { movableAreaStyle() { if (this.direction === "vertical") { return { height: `${this.list.length * this.itemHeight}px`, width: "100%" }; } else if (this.direction === "horizontal") { return { height: "100%", width: `${this.list.length * this.itemWidth}px` }; } else { const rows = Math.ceil(this.list.length / this.columns); return { height: `${rows * this.itemHeight}px`, width: "100%" }; } } }, emits: ["drag-end"], async mounted() { await this.$nextTick(); this.initList(); this.calculateItemSize(); this.calculateAreaSize(); }, methods: { initList() { this.list = this.initialList.map((item, index2) => { let x2 = 0, y2 = 0; if (this.direction === "horizontal") { x2 = index2 * this.itemWidth; y2 = 0; } else if (this.direction === "vertical") { x2 = 0; y2 = index2 * this.itemHeight; } else { const col = index2 % this.columns; const row = Math.floor(index2 / this.columns); x2 = col * this.itemWidth; y2 = row * this.itemHeight; } return { ...item, x: x2, y: y2 }; }); this.saveOriginalPositions(); }, saveOriginalPositions() { this.originalPositions = this.list.map((item) => ({ x: item.x, y: item.y })); }, async calculateItemSize() { await sleep(30); return new Promise((resolve) => { uni.createSelectorQuery().in(this).select(".u-dragsort-item-content").boundingClientRect((res) => { if (res) { this.itemHeight = res.height || 40; this.itemWidth = res.width || 80; this.updatePositions(); this.saveOriginalPositions(); } resolve(res); }).exec(); }); }, async calculateAreaSize() { await sleep(30); return new Promise((resolve) => { uni.createSelectorQuery().in(this).select(".u-dragsort-area").boundingClientRect((res) => { if (res) { this.areaWidth = res.width || 300; this.areaHeight = res.height || 300; } resolve(res); }).exec(); }); }, updatePositions() { this.list.forEach((item, index2) => { if (this.direction === "vertical") { item.y = index2 * this.itemHeight; item.x = 0; } else if (this.direction === "horizontal") { item.x = index2 * this.itemWidth; item.y = 0; } else { const col = index2 % this.columns; const row = Math.floor(index2 / this.columns); item.x = col * this.itemWidth; item.y = row * this.itemHeight; } }); }, onTouchStart(index2) { this.dragIndex = index2; this.saveOriginalPositions(); }, onChange(index2, event) { if (!event.detail.source || event.detail.source !== "touch") return; this.currentPosition.x = event.detail.x; this.currentPosition.y = event.detail.y; if (this.direction === "all") { this.handleAllModeChange(index2); } else { let itemSize = 0; let targetIndex = -1; if (this.direction === "vertical") { itemSize = this.itemHeight; targetIndex = Math.max(0, Math.min( Math.round(this.currentPosition.y / itemSize), this.list.length - 1 )); } else if (this.direction === "horizontal") { itemSize = this.itemWidth; targetIndex = Math.max(0, Math.min( Math.round(this.currentPosition.x / itemSize), this.list.length - 1 )); } if (targetIndex !== index2) { this.reorderItems(index2, targetIndex); } } }, handleAllModeChange(index2) { const col = Math.max(0, Math.min(Math.round(this.currentPosition.x / this.itemWidth), this.columns - 1)); const row = Math.max(0, Math.round(this.currentPosition.y / this.itemHeight)); let targetIndex = row * this.columns + col; targetIndex = Math.max(0, Math.min(targetIndex, this.list.length - 1)); if (targetIndex !== index2) { this.reorderItems(index2, targetIndex); } }, reorderItems(fromIndex, toIndex) { const movedItem = this.list.splice(fromIndex, 1)[0]; this.list.splice(toIndex, 0, movedItem); if (uni.vibrateShort) { uni.vibrateShort(); } this.dragIndex = toIndex; this.updatePositions(); this.saveOriginalPositions(); }, onTouchEnd() { if (this.direction === "horizontal") { this.list[this.dragIndex].x = this.currentPosition.x + 1e-3; } else if (this.direction === "vertical" || this.direction === "all") { this.list[this.dragIndex].y = this.currentPosition.y + 1e-3; this.list[this.dragIndex].x = this.currentPosition.x + 1e-3; } sleep(50).then(() => { this.list.forEach((item, index2) => { item.x = this.originalPositions[index2].x; item.y = this.originalPositions[index2].y; }); this.dragIndex = -1; this.$emit("drag-end", [...this.list]); }); } }, watch: { initialList: { handler() { this.$nextTick(() => { this.initList(); }); }, deep: true }, direction: { handler() { this.$nextTick(() => { this.initList(); this.calculateItemSize(); this.calculateAreaSize(); }); } }, columns: { handler() { if (this.direction === "all") { this.$nextTick(() => { this.initList(); this.updatePositions(); this.saveOriginalPositions(); }); } } } } }; function _sfc_render$1t(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-dragsort", [$props.direction == "horizontal" ? "u-dragsort--horizontal" : "", $props.direction == "all" ? "u-dragsort--all" : ""]]) }, [ vue.createElementVNode( "movable-area", { class: "u-dragsort-area", style: vue.normalizeStyle($options.movableAreaStyle) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("movable-view", { key: item.id, id: `u-dragsort-item-${index2}`, class: vue.normalizeClass(["u-dragsort-item", { "dragging": $data.dragIndex === index2 }]), direction: $props.direction === "all" ? "all" : $props.direction, x: item.x, y: item.y, inertia: false, disabled: !$props.draggable || item.draggable === false, onChange: ($event) => $options.onChange(index2, $event), onTouchstart: ($event) => $options.onTouchStart(index2), onTouchend: _cache[0] || (_cache[0] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)), onTouchcancel: _cache[1] || (_cache[1] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)) }, [ vue.createElementVNode("view", { class: "u-dragsort-item-content" }, [ vue.renderSlot(_ctx.$slots, "default", { item, index: index2 }, () => [ vue.createTextVNode( vue.toDisplayString(item.label), 1 /* TEXT */ ) ], true) ]) ], 42, ["id", "direction", "x", "y", "disabled", "onChange", "onTouchstart"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ) ], 2 /* CLASS */ ); } const uDragsort = /* @__PURE__ */ _export_sfc(_sfc_main$1u, [["render", _sfc_render$1t], ["__scopeId", "data-v-09ad657e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-dragsort/u-dragsort.vue"]]); const __vite_glob_0_36 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uDragsort }, Symbol.toStringTag, { value: "Module" })); const props$Z = defineMixin({ props: { // 当前选中项的value值 modelValue: { type: [Number, String, Array], default: "" }, // 菜单项标题 title: { type: [String, Number], default: "" }, // 选项数据,如果传入了默认slot,此参数无效 options: { type: Array, default() { return []; } }, // 是否禁用此菜单项 disabled: { type: Boolean, default: false }, // 下拉弹窗的高度 height: { type: [Number, String], default: "auto" }, // 点击遮罩是否可以收起弹窗 closeOnClickOverlay: { type: Boolean, default: true } } }); const _sfc_main$1t = { name: "u-dropdown-item", mixins: [mpMixin, mixin, props$Z], options: { styleIsolation: "shared" }, data() { return { active: false, // 当前项是否处于展开状态 activeColor: "#2979ff", // 激活时左边文字和右边对勾图标的颜色 inactiveColor: "#606266" // 未激活时左边文字和右边对勾图标的颜色 }; }, computed: { // 监听props是否发生了变化,有些值需要传递给父组件u-dropdown,无法双向绑定 propsChange() { return `${this.title}-${this.disabled}`; } }, watch: { propsChange(n2) { if (this.parent) this.parent.init(); } }, created() { this.parent = false; }, emits: ["update:modelValue", "change"], methods: { addUnit, init() { let parent = $parent.call(this, "u-dropdown"); if (parent) { this.parent = parent; this.activeColor = parent.activeColor; this.inactiveColor = parent.inactiveColor; let exist = parent.children.find((val) => { return this === val; }); if (!exist) parent.children.push(this); if (parent.children.length == 1) this.active = true; parent.menuList.push({ title: this.title, disabled: this.disabled }); } }, // cell被点击 cellClick(value2) { this.$emit("update:modelValue", value2); this.parent.close(); this.$emit("change", value2); } }, mounted() { this.init(); } }; function _sfc_render$1s(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_up_cell = vue.resolveComponent("up-cell"); const _component_up_cell_group = vue.resolveComponent("up-cell-group"); return $data.active ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-dropdown-item", onTouchmove: vue.withModifiers(() => { }, ["stop", "prevent"]), onClick: vue.withModifiers(() => { }, ["stop", "prevent"]) }, [ !_ctx.$slots.default && !_ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock( "scroll-view", { key: 0, class: "u-dropdown-item__scroll", "scroll-y": "true", style: vue.normalizeStyle({ height: $options.addUnit(_ctx.height) }) }, [ vue.createElementVNode("view", { class: "u-dropdown-item__options" }, [ vue.createVNode(_component_up_cell_group, null, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.options, (item, index2) => { return vue.openBlock(), vue.createBlock(_component_up_cell, { onClick: ($event) => $options.cellClick(item.value), arrow: false, title: item.label, key: index2, "title-style": { color: _ctx.modelValue == item.value ? $data.activeColor : $data.inactiveColor } }, { default: vue.withCtx(() => [ _ctx.modelValue == item.value ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: "checkbox-mark", color: $data.activeColor, size: "32" }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true) ]), _: 2 /* DYNAMIC */ }, 1032, ["onClick", "title", "title-style"]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }) ]) ], 4 /* STYLE */ )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) ], 32 /* NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true); } const uDropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["render", _sfc_render$1s], ["__scopeId", "data-v-2ab01489"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-dropdown-item/u-dropdown-item.vue"]]); const __vite_glob_0_37 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uDropdownItem }, Symbol.toStringTag, { value: "Module" })); const props$Y = defineMixin({ props: { // 菜单标题和选项的激活态颜色 activeColor: { type: String, default: "#2979ff" }, // 菜单标题和选项的未激活态颜色 inactiveColor: { type: String, default: "#606266" }, // 点击遮罩是否关闭菜单 closeOnClickMask: { type: Boolean, default: true }, // 点击当前激活项标题是否关闭菜单 closeOnClickSelf: { type: Boolean, default: true }, // 过渡时间 duration: { type: [Number, String], default: 300 }, // 标题菜单的高度 height: { type: [Number, String], default: 40 }, // 是否显示下边框 borderBottom: { type: Boolean, default: false }, // 标题的字体大小 titleSize: { type: [Number, String], default: 14 }, // 下拉出来的内容部分的圆角值 borderRadius: { type: [Number, String], default: 0 }, // 菜单右侧的icon图标 menuIcon: { type: String, default: "arrow-down" }, // 菜单右侧图标的大小 menuIconSize: { type: [Number, String], default: 14 } } }); const _sfc_main$1s = { name: "u-dropdown", mixins: [mpMixin, mixin, props$Y], data() { return { showDropdown: true, // 是否打开下来菜单, menuList: [], // 显示的菜单 active: false, // 下拉菜单的状态 // 当前是第几个菜单处于激活状态,小程序中此处不能写成false或者"",否则后续将current赋值为0, // 无能的TX没有使用===而是使用==判断,导致程序认为前后二者没有变化,从而不会触发视图更新 current: 99999, // 外层内容的样式,初始时处于底层,且透明 contentStyle: { zIndex: -1, opacity: 0 }, // 让某些菜单保持高亮的状态 highlightIndexList: [], contentHeight: 0 }; }, computed: { // 下拉出来部分的样式 popupStyle() { let style = {}; style.transform = `translateY(${this.active ? 0 : "-100%"})`; style["transition-duration"] = this.duration / 1e3 + "s"; style.borderRadius = `0 0 ${addUnit(this.borderRadius)} ${addUnit(this.borderRadius)}`; return style; } }, created() { this.children = []; }, mounted() { this.getContentHeight(); }, emits: ["open", "close"], methods: { addUnit, init() { this.menuList = []; this.children.map((child) => { child.init(); }); }, // 点击菜单 menuClick(index2) { if (this.menuList[index2].disabled) return; if (index2 === this.current && this.closeOnClickSelf) { this.close(); setTimeout(() => { this.children[index2].active = false; }, this.duration); return; } this.open(index2); }, // 打开下拉菜单 open(index2) { if (this.contentHeight < 1) this.getContentHeight(); this.contentStyle = { zIndex: 11, height: this.contentHeight + "px" }; this.active = true; this.current = index2; this.children.map((val, idx) => { val.active = index2 == idx ? true : false; }); this.$emit("open", this.current); }, // 设置下拉菜单处于收起状态 close() { this.$emit("close", this.current); this.active = false; this.current = 99999; this.contentStyle.zIndex = -1; this.contentStyle.opacity = 0; setTimeout(() => { this.contentStyle.height = 0; }, this.duration); }, // 点击遮罩 maskClick() { if (!this.closeOnClickMask) return; this.close(); }, // 外部手动设置某些菜单高亮 highlight(indexParams = void 0) { if (Array.isArray(indexParams)) { this.highlightIndexList = [...indexParams]; return; } this.highlightIndexList = indexParams !== void 0 ? [indexParams] : []; }, // 获取下拉菜单内容的高度 getContentHeight() { let windowHeight = getWindowInfo().windowHeight; this.$uGetRect(".u-dropdown__menu").then((res) => { this.contentHeight = windowHeight - res.bottom; }); } } }; function _sfc_render$1r(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-dropdown" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-dropdown__menu", { "u-border-bottom": _ctx.borderBottom }]), style: vue.normalizeStyle({ height: $options.addUnit(_ctx.height) }) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.menuList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-dropdown__menu__item", key: index2, onClick: vue.withModifiers(($event) => $options.menuClick(index2), ["stop"]) }, [ vue.createElementVNode("view", { class: "u-flex u-flex-row" }, [ vue.createElementVNode( "text", { class: "u-dropdown__menu__item__text", style: vue.normalizeStyle({ color: item.disabled ? "#c0c4cc" : index2 === $data.current || $data.highlightIndexList.includes(index2) ? _ctx.activeColor : _ctx.inactiveColor, fontSize: $options.addUnit(_ctx.titleSize) }) }, vue.toDisplayString(item.title), 5 /* TEXT, STYLE */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-dropdown__menu__item__arrow", { "u-dropdown__menu__item__arrow--rotate": index2 === $data.current }]) }, [ vue.createVNode(_component_up_icon, { "custom-style": { display: "flex" }, name: _ctx.menuIcon, size: $options.addUnit(_ctx.menuIconSize), color: index2 === $data.current || $data.highlightIndexList.includes(index2) ? _ctx.activeColor : "#c0c4cc" }, null, 8, ["name", "size", "color"]) ], 2 /* CLASS */ ) ]) ], 8, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ ), vue.createElementVNode( "view", { class: "u-dropdown__content", style: vue.normalizeStyle([$data.contentStyle, { transition: `opacity ${_ctx.duration / 1e3}s, z-index ${_ctx.duration / 1e3}s linear`, top: $options.addUnit(_ctx.height) }]), onClick: _cache[1] || (_cache[1] = (...args) => $options.maskClick && $options.maskClick(...args)), onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers(() => { }, ["stop", "prevent"])) }, [ vue.createElementVNode( "view", { onClick: _cache[0] || (_cache[0] = vue.withModifiers(() => { }, ["stop", "prevent"])), class: "u-dropdown__content__popup", style: vue.normalizeStyle([$options.popupStyle, {}]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ), vue.createElementVNode("view", { class: "u-dropdown__content__mask" }) ], 36 /* STYLE, NEED_HYDRATION */ ) ]); } const uDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$1s, [["render", _sfc_render$1r], ["__scopeId", "data-v-029e9a16"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-dropdown/u-dropdown.vue"]]); const __vite_glob_0_38 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uDropdown }, Symbol.toStringTag, { value: "Module" })); const props$X = defineMixin({ props: { // 内置图标名称,或图片路径,建议绝对路径 icon: { type: String, default: () => props$1x.empty.icon }, // 提示文字 text: { type: String, default: () => props$1x.empty.text }, // 文字颜色 textColor: { type: String, default: () => props$1x.empty.textColor }, // 文字大小 textSize: { type: [String, Number], default: () => props$1x.empty.textSize }, // 图标的颜色 iconColor: { type: String, default: () => props$1x.empty.iconColor }, // 图标的大小 iconSize: { type: [String, Number], default: () => props$1x.empty.iconSize }, // 选择预置的图标类型 mode: { type: String, default: () => props$1x.empty.mode }, // 图标宽度,单位px width: { type: [String, Number], default: () => props$1x.empty.width }, // 图标高度,单位px height: { type: [String, Number], default: () => props$1x.empty.height }, // 是否显示组件 show: { type: Boolean, default: () => props$1x.empty.show }, // 组件距离上一个元素之间的距离,默认px单位 marginTop: { type: [String, Number], default: () => props$1x.empty.marginTop } } }); const _sfc_main$1r = { name: "u-empty", mixins: [mpMixin, mixin, props$X], data() { return { icons: { car: t$1("up.empty.car"), page: t$1("up.empty.page"), search: t$1("up.empty.search"), address: t$1("up.empty.address"), wifi: t$1("up.empty.wifi"), order: t$1("up.empty.order"), coupon: t$1("up.empty.coupon"), favor: t$1("up.empty.favor"), permission: t$1("up.empty.permission"), history: t$1("up.empty.history"), news: t$1("up.empty.news"), message: t$1("up.empty.message"), list: t$1("up.empty.list"), data: t$1("up.empty.data"), comment: t$1("up.empty.comment") } }; }, computed: { // 组件样式 emptyStyle() { const style = {}; style.marginTop = addUnit(this.marginTop); return deepMerge$1(addStyle(this.customStyle), style); }, // 文本样式 textStyle() { const style = {}; style.color = this.textColor; style.fontSize = addUnit(this.textSize); return style; }, // 判断icon是否图片路径 isSrc() { return this.icon.indexOf("/") >= 0; } }, methods: { addUnit } }; function _sfc_render$1q(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-empty", style: vue.normalizeStyle([$options.emptyStyle]) }, [ !$options.isSrc ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: _ctx.mode === "message" ? "chat" : `empty-${_ctx.mode}`, size: _ctx.iconSize, color: _ctx.iconColor, "margin-top": "14" }, null, 8, ["name", "size", "color"])) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, style: vue.normalizeStyle({ width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height) }), src: _ctx.icon, mode: "widthFix" }, null, 12, ["src"])), vue.createElementVNode( "text", { class: "u-empty__text", style: vue.normalizeStyle([$options.textStyle]) }, vue.toDisplayString(_ctx.text ? _ctx.text : $data.icons[_ctx.mode]), 5 /* TEXT, STYLE */ ), _ctx.$slots.default || _ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-empty__wrap" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true); } const uEmpty = /* @__PURE__ */ _export_sfc(_sfc_main$1r, [["render", _sfc_render$1q], ["__scopeId", "data-v-8dd5928e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-empty/u-empty.vue"]]); const __vite_glob_0_39 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uEmpty }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1q = { name: "u-float-button", mixins: [mpMixin, mixin], emits: ["click", "item-click"], computed: {}, props: { // 背景颜色 backgroundColor: { type: String, default: "#2979ff" }, // 文字颜色 color: { type: String, default: "#fff" }, // 宽度 width: { type: String, default: "50px" }, // 高度 height: { type: String, default: "50px" }, // 边框颜色,默认为空字符串表示无边框 borderColor: { type: String, default: "" }, // 右侧偏移量 right: { type: [String, Number], default: "30px" }, // 顶部偏移量,未提供默认值,可能需要根据具体情况设置 top: { type: [String, Number], default: "" }, // 底部偏移量 bottom: { type: String, default: "" }, // 是否为菜单项 isMenu: { type: Boolean, default: false }, list: { type: Array, default: () => { return []; } } }, data() { return { showList: false }; }, methods: { addStyle, clickHandler(e2) { if (this.isMenu) { this.showList = !this.showList; this.$emit("click", e2); } else { this.$emit("click", e2); } }, itemClick(item, index2) { this.$emit("item-click", { ...item, index: index2 }); } } }; function _sfc_render$1p(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-float-button", style: vue.normalizeStyle({ position: "fixed", top: $props.top, bottom: $props.bottom, right: $props.right }) }, [ vue.createElementVNode( "view", { class: "u-float-button__main", onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)), style: vue.normalizeStyle({ backgroundColor: $props.backgroundColor, color: $props.color, display: "flex", flexDirection: "row", justifyContent: "center", alignItems: "center", width: $props.width, height: $props.height, borderRadius: "50%", borderColor: $props.borderColor }) }, [ vue.renderSlot(_ctx.$slots, "default", { showList: $data.showList }, () => [ vue.createVNode(_component_up_icon, { class: vue.normalizeClass(["cursor-pointer", { "show-list": $data.showList }]), name: "plus", color: $props.color }, null, 8, ["class", "color"]) ], true), $data.showList ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-float-button__list", style: vue.normalizeStyle({ bottom: $props.height }) }, [ vue.renderSlot(_ctx.$slots, "list", {}, () => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "u-float-button__item", style: vue.normalizeStyle({ backgroundColor: (item == null ? void 0 : item.backgroundColor) ? item == null ? void 0 : item.backgroundColor : $props.backgroundColor, color: (item == null ? void 0 : item.color) ? item == null ? void 0 : item.color : $props.color, display: "flex", flexDirection: "row", justifyContent: "center", alignItems: "center", width: $props.width, height: $props.height, borderRadius: "50%", borderColor: (item == null ? void 0 : item.borderColor) ? item == null ? void 0 : item.borderColor : $props.borderColor }), onClick: ($event) => $options.itemClick(item, index2) }, [ vue.createVNode(_component_up_icon, { name: item.name, color: (item == null ? void 0 : item.color) ? item == null ? void 0 : item.color : $props.color }, null, 8, ["name", "color"]) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ ); } const uFloatButton = /* @__PURE__ */ _export_sfc(_sfc_main$1q, [["render", _sfc_render$1p], ["__scopeId", "data-v-8a662942"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-float-button/u-float-button.vue"]]); const __vite_glob_0_40 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uFloatButton }, Symbol.toStringTag, { value: "Module" })); const props$W = defineMixin({ props: { // input的label提示语 label: { type: String, default: () => props$1x.formItem.label }, // 绑定的值 prop: { type: String, default: () => props$1x.formItem.prop }, // 绑定的规则 rules: { type: Array, default: () => props$1x.formItem.rules }, // 是否显示表单域的下划线边框 borderBottom: { type: [String, Boolean], default: () => props$1x.formItem.borderBottom }, // label的位置,left-左边,top-上边 labelPosition: { type: String, default: () => props$1x.formItem.labelPosition }, // label的宽度,单位px labelWidth: { type: [String, Number], default: () => props$1x.formItem.labelWidth }, // 右侧图标 rightIcon: { type: String, default: () => props$1x.formItem.rightIcon }, // 左侧图标 leftIcon: { type: String, default: () => props$1x.formItem.leftIcon }, // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置 required: { type: Boolean, default: () => props$1x.formItem.required }, leftIconStyle: { type: [String, Object], default: () => props$1x.formItem.leftIconStyle } } }); const _sfc_main$1p = { name: "u-form-item", mixins: [mpMixin, mixin, props$W], data() { return { // 错误提示语 message: "", parentData: { // 提示文本的位置 labelPosition: "left", // 提示文本对齐方式 labelAlign: "left", // 提示文本的样式 labelStyle: {}, // 提示文本的宽度 labelWidth: 45, // 错误提示方式 errorType: "message" }, color: color$3, itemRules: [] }; }, // 组件创建完成时,将当前实例保存到u-form中 computed: { propsLine() { return props$1x.line; } }, mounted() { this.init(); }, emits: ["click"], watch: { // 监听规则的变化 rules: { immediate: true, handler(n2) { this.setRules(n2); } } }, methods: { addStyle, addUnit, init() { this.updateParentData(); if (!this.parent) { error("u-form-item需要结合u-form组件使用"); } }, // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则 setRules(rules2) { if (rules2.length === 0) { this.itemRules = []; return; } this.itemRules = rules2; }, // 获取父组件的参数 updateParentData() { this.getParentData("u-form"); }, // 移除u-form-item的校验结果 clearValidate() { this.message = null; }, // 清空当前的组件的校验结果,并重置为初始值 resetField() { const value2 = getProperty(this.parent.originalModel, this.prop); setProperty(this.parent.model, this.prop, value2); this.message = null; }, // 点击组件 clickHandler() { this.$emit("click"); } } }; function _sfc_render$1o(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-form-item", { "u-form-item--error": !!$data.message && $data.parentData.errorType === "message" }]) }, [ vue.createElementVNode( "view", { class: "u-form-item__body", onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)), style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle), { flexDirection: (_ctx.labelPosition || $data.parentData.labelPosition) === "left" ? "row" : "column" }]) }, [ vue.createCommentVNode(' 微信小程序中,将一个参数设置空字符串,结果会变成字符串"true" '), vue.renderSlot(_ctx.$slots, "label", {}, () => [ vue.createCommentVNode(" {{required}} "), _ctx.required || _ctx.leftIcon || _ctx.label ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-form-item__body__left", style: vue.normalizeStyle({ width: $options.addUnit(_ctx.labelWidth || $data.parentData.labelWidth), marginBottom: (_ctx.labelPosition || $data.parentData.labelPosition) === "left" ? 0 : "5px" }) }, [ vue.createCommentVNode(" 为了块对齐 "), vue.createElementVNode("view", { class: "u-form-item__body__left__content" }, [ vue.createCommentVNode(" nvue不支持伪元素before "), _ctx.required ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "u-form-item__body__left__content__required" }, "*")) : vue.createCommentVNode("v-if", true), _ctx.leftIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-form-item__body__left__content__icon" }, [ vue.createVNode(_component_up_icon, { name: _ctx.leftIcon, "custom-style": _ctx.leftIconStyle }, null, 8, ["name", "custom-style"]) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: "u-form-item__body__left__content__label", style: vue.normalizeStyle([$data.parentData.labelStyle, { justifyContent: $data.parentData.labelAlign === "left" ? "flex-start" : $data.parentData.labelAlign === "center" ? "center" : "flex-end" }]) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ ) ]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], true), vue.createElementVNode("view", { class: "u-form-item__body__right" }, [ vue.createElementVNode("view", { class: "u-form-item__body__right__content" }, [ vue.createElementVNode("view", { class: "u-form-item__body__right__content__slot" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), _ctx.$slots.right ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "item__body__right__content__icon" }, [ vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true) ]) ]) ], 4 /* STYLE */ ), vue.renderSlot(_ctx.$slots, "error", {}, () => [ !!$data.message && $data.parentData.errorType === "message" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-form-item__body__right__message", style: vue.normalizeStyle({ marginLeft: $options.addUnit((_ctx.labelPosition || $data.parentData.labelPosition) === "top" ? 0 : _ctx.labelWidth || $data.parentData.labelWidth) }) }, vue.toDisplayString($data.message), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], true), _ctx.borderBottom ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0, color: $data.message && $data.parentData.errorType === "border-bottom" ? $data.color.error : $options.propsLine.color, customStyle: `margin-top: ${$data.message && $data.parentData.errorType === "message" ? "5px" : 0}` }, null, 8, ["color", "customStyle"])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const uFormItem = /* @__PURE__ */ _export_sfc(_sfc_main$1p, [["render", _sfc_render$1o], ["__scopeId", "data-v-42bac3de"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-form-item/u-form-item.vue"]]); const __vite_glob_0_41 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uFormItem }, Symbol.toStringTag, { value: "Module" })); const props$V = defineMixin({ props: { // 当前form的需要验证字段的集合 model: { type: Object, default: () => props$1x.form.model }, // 验证规则 rules: { type: [Object, Function, Array], default: () => props$1x.form.rules }, // 有错误时的提示方式,message-提示信息,toast-进行toast提示 // border-bottom-下边框呈现红色,none-无提示 errorType: { type: String, default: () => props$1x.form.errorType }, // 是否显示表单域的下划线边框 borderBottom: { type: Boolean, default: () => props$1x.form.borderBottom }, // label的位置,left-左边,top-上边 labelPosition: { type: String, default: () => props$1x.form.labelPosition }, // label的宽度,单位px labelWidth: { type: [String, Number], default: () => props$1x.form.labelWidth }, // lable字体的对齐方式 labelAlign: { type: String, default: () => props$1x.form.labelAlign }, // lable的样式,对象形式 labelStyle: { type: Object, default: () => props$1x.form.labelStyle } } }); var define_process_env_default = {}; const formatRegExp = /%[sdj%]/g; let warning = function warning2() { }; if (typeof process !== "undefined" && define_process_env_default && true && typeof window !== "undefined" && typeof document !== "undefined") { warning = function warning3(type2, errors) { if (typeof console !== "undefined" && console.warn) { if (errors.every((e2) => typeof e2 === "string")) { formatAppLog("warn", "at uni_modules/uview-plus/libs/util/async-validator.js:28", type2, errors); } } }; } function convertFieldsError(errors) { if (!errors || !errors.length) return null; const fields = {}; errors.forEach((error2) => { const { field } = error2; fields[field] = fields[field] || []; fields[field].push(error2); }); return fields; } function format() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } let i2 = 1; const f2 = args[0]; const len = args.length; if (typeof f2 === "function") { return f2.apply(null, args.slice(1)); } if (typeof f2 === "string") { let str = String(f2).replace(formatRegExp, (x2) => { if (x2 === "%%") { return "%"; } if (i2 >= len) { return x2; } switch (x2) { case "%s": return String(args[i2++]); case "%d": return Number(args[i2++]); case "%j": try { return JSON.stringify(args[i2++]); } catch (_2) { return "[Circular]"; } break; default: return x2; } }); for (let arg = args[i2]; i2 < len; arg = args[++i2]) { str += ` ${arg}`; } return str; } return f2; } function isNativeStringType(type2) { return type2 === "string" || type2 === "url" || type2 === "hex" || type2 === "email" || type2 === "pattern"; } function isEmptyValue(value2, type2) { if (value2 === void 0 || value2 === null) { return true; } if (type2 === "array" && Array.isArray(value2) && !value2.length) { return true; } if (isNativeStringType(type2) && typeof value2 === "string" && !value2) { return true; } return false; } function asyncParallelArray(arr, func2, callback) { const results = []; let total = 0; const arrLength = arr.length; function count(errors) { results.push.apply(results, errors); total++; if (total === arrLength) { callback(results); } } arr.forEach((a2) => { func2(a2, count); }); } function asyncSerialArray(arr, func2, callback) { let index2 = 0; const arrLength = arr.length; function next(errors) { if (errors && errors.length) { callback(errors); return; } const original = index2; index2 += 1; if (original < arrLength) { func2(arr[original], next); } else { callback([]); } } next([]); } function flattenObjArr(objArr) { const ret = []; Object.keys(objArr).forEach((k2) => { ret.push.apply(ret, objArr[k2]); }); return ret; } function asyncMap(objArr, option, func2, callback) { if (option.first) { const _pending = new Promise((resolve, reject) => { const next = function next2(errors) { callback(errors); return errors.length ? reject({ errors, fields: convertFieldsError(errors) }) : resolve(); }; const flattenArr = flattenObjArr(objArr); asyncSerialArray(flattenArr, func2, next); }); _pending.catch((e2) => e2); return _pending; } let firstFields = option.firstFields || []; if (firstFields === true) { firstFields = Object.keys(objArr); } const objArrKeys = Object.keys(objArr); const objArrLength = objArrKeys.length; let total = 0; const results = []; const pending = new Promise((resolve, reject) => { const next = function next2(errors) { results.push.apply(results, errors); total++; if (total === objArrLength) { callback(results); return results.length ? reject({ errors: results, fields: convertFieldsError(results) }) : resolve(); } }; if (!objArrKeys.length) { callback(results); resolve(); } objArrKeys.forEach((key) => { const arr = objArr[key]; if (firstFields.indexOf(key) !== -1) { asyncSerialArray(arr, func2, next); } else { asyncParallelArray(arr, func2, next); } }); }); pending.catch((e2) => e2); return pending; } function complementError(rule) { return function(oe2) { if (oe2 && oe2.message) { oe2.field = oe2.field || rule.fullField; return oe2; } return { message: typeof oe2 === "function" ? oe2() : oe2, field: oe2.field || rule.fullField }; }; } function deepMerge(target, source) { if (source) { for (const s2 in source) { if (source.hasOwnProperty(s2)) { const value2 = source[s2]; if (typeof value2 === "object" && typeof target[s2] === "object") { target[s2] = { ...target[s2], ...value2 }; } else { target[s2] = value2; } } } } return target; } function required(rule, value2, source, errors, options2, type2) { if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value2, type2 || rule.type))) { errors.push(format(options2.messages.required, rule.fullField)); } } function whitespace(rule, value2, source, errors, options2) { if (/^\s+$/.test(value2) || value2 === "") { errors.push(format(options2.messages.whitespace, rule.fullField)); } } const pattern = { // http://emailregex.com/ email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, url: new RegExp( "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", "i" ), hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i }; var types = { integer: function integer(value2) { return /^(-)?\d+$/.test(value2); }, float: function float(value2) { return /^(-)?\d+(\.\d+)?$/.test(value2); }, array: function array3(value2) { return Array.isArray(value2); }, regexp: function regexp(value2) { if (value2 instanceof RegExp) { return true; } try { return !!new RegExp(value2); } catch (e2) { return false; } }, date: function date3(value2) { return typeof value2.getTime === "function" && typeof value2.getMonth === "function" && typeof value2.getYear === "function"; }, number: function number3(value2) { if (isNaN(value2)) { return false; } return typeof +value2 === "number"; }, object: function object3(value2) { return typeof value2 === "object" && !types.array(value2); }, method: function method(value2) { return typeof value2 === "function"; }, email: function email2(value2) { return typeof value2 === "string" && !!value2.match(pattern.email) && value2.length < 255; }, url: function url2(value2) { return typeof value2 === "string" && !!value2.match(pattern.url); }, hex: function hex(value2) { return typeof value2 === "string" && !!value2.match(pattern.hex); } }; function type(rule, value2, source, errors, options2) { if (rule.required && value2 === void 0) { required(rule, value2, source, errors, options2); return; } const custom = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"]; const ruleType = rule.type; if (custom.indexOf(ruleType) > -1) { if (!types[ruleType](value2)) { errors.push(format(options2.messages.types[ruleType], rule.fullField, rule.type)); } } else if (ruleType && typeof value2 !== rule.type) { errors.push(format(options2.messages.types[ruleType], rule.fullField, rule.type)); } } function range(rule, value2, source, errors, options2) { const len = typeof rule.len === "number"; const min = typeof rule.min === "number"; const max = typeof rule.max === "number"; const spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; let val = value2; let key = null; const num = typeof value2 === "number"; const str = typeof value2 === "string"; const arr = Array.isArray(value2); if (num) { key = "number"; } else if (str) { key = "string"; } else if (arr) { key = "array"; } if (!key) { return false; } if (arr) { val = value2.length; } if (str) { val = value2.replace(spRegexp, "_").length; } if (len) { if (val !== rule.len) { errors.push(format(options2.messages[key].len, rule.fullField, rule.len)); } } else if (min && !max && val < rule.min) { errors.push(format(options2.messages[key].min, rule.fullField, rule.min)); } else if (max && !min && val > rule.max) { errors.push(format(options2.messages[key].max, rule.fullField, rule.max)); } else if (min && max && (val < rule.min || val > rule.max)) { errors.push(format(options2.messages[key].range, rule.fullField, rule.min, rule.max)); } } const ENUM = "enum"; function enumerable(rule, value2, source, errors, options2) { rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : []; if (rule[ENUM].indexOf(value2) === -1) { errors.push(format(options2.messages[ENUM], rule.fullField, rule[ENUM].join(", "))); } } function pattern$1(rule, value2, source, errors, options2) { if (rule.pattern) { if (rule.pattern instanceof RegExp) { rule.pattern.lastIndex = 0; if (!rule.pattern.test(value2)) { errors.push(format(options2.messages.pattern.mismatch, rule.fullField, value2, rule.pattern)); } } else if (typeof rule.pattern === "string") { const _pattern = new RegExp(rule.pattern); if (!_pattern.test(value2)) { errors.push(format(options2.messages.pattern.mismatch, rule.fullField, value2, rule.pattern)); } } } } const rules = { required, whitespace, type, range, enum: enumerable, pattern: pattern$1 }; function string(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2, "string") && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2, "string"); if (!isEmptyValue(value2, "string")) { rules.type(rule, value2, source, errors, options2); rules.range(rule, value2, source, errors, options2); rules.pattern(rule, value2, source, errors, options2); if (rule.whitespace === true) { rules.whitespace(rule, value2, source, errors, options2); } } } callback(errors); } function method2(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options2); } } callback(errors); } function number2(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (value2 === "") { value2 = void 0; } if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options2); rules.range(rule, value2, source, errors, options2); } } callback(errors); } function _boolean(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options2); } } callback(errors); } function regexp2(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (!isEmptyValue(value2)) { rules.type(rule, value2, source, errors, options2); } } callback(errors); } function integer2(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options2); rules.range(rule, value2, source, errors, options2); } } callback(errors); } function floatFn(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options2); rules.range(rule, value2, source, errors, options2); } } callback(errors); } function array2(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2, "array") && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2, "array"); if (!isEmptyValue(value2, "array")) { rules.type(rule, value2, source, errors, options2); rules.range(rule, value2, source, errors, options2); } } callback(errors); } function object2(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (value2 !== void 0) { rules.type(rule, value2, source, errors, options2); } } callback(errors); } const ENUM$1 = "enum"; function enumerable$1(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (value2 !== void 0) { rules[ENUM$1](rule, value2, source, errors, options2); } } callback(errors); } function pattern$2(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2, "string") && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (!isEmptyValue(value2, "string")) { rules.pattern(rule, value2, source, errors, options2); } } callback(errors); } function date2(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); if (!isEmptyValue(value2)) { let dateObject; if (typeof value2 === "number") { dateObject = new Date(value2); } else { dateObject = value2; } rules.type(rule, dateObject, source, errors, options2); if (dateObject) { rules.range(rule, dateObject.getTime(), source, errors, options2); } } } callback(errors); } function required$1(rule, value2, callback, source, options2) { const errors = []; const type2 = Array.isArray(value2) ? "array" : typeof value2; rules.required(rule, value2, source, errors, options2, type2); callback(errors); } function type$1(rule, value2, callback, source, options2) { const ruleType = rule.type; const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2, ruleType) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2, ruleType); if (!isEmptyValue(value2, ruleType)) { rules.type(rule, value2, source, errors, options2); } } callback(errors); } function any(rule, value2, callback, source, options2) { const errors = []; const validate2 = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate2) { if (isEmptyValue(value2) && !rule.required) { return callback(); } rules.required(rule, value2, source, errors, options2); } callback(errors); } const validators = { string, method: method2, number: number2, boolean: _boolean, regexp: regexp2, integer: integer2, float: floatFn, array: array2, object: object2, enum: enumerable$1, pattern: pattern$2, date: date2, url: type$1, hex: type$1, email: type$1, required: required$1, any }; function newMessages() { return { default: "Validation error on field %s", required: "%s is required", enum: "%s must be one of %s", whitespace: "%s cannot be empty", date: { format: "%s date %s is invalid for format %s", parse: "%s date could not be parsed, %s is invalid ", invalid: "%s date %s is invalid" }, types: { string: "%s is not a %s", method: "%s is not a %s (function)", array: "%s is not an %s", object: "%s is not an %s", number: "%s is not a %s", date: "%s is not a %s", boolean: "%s is not a %s", integer: "%s is not an %s", float: "%s is not a %s", regexp: "%s is not a valid %s", email: "%s is not a valid %s", url: "%s is not a valid %s", hex: "%s is not a valid %s" }, string: { len: "%s must be exactly %s characters", min: "%s must be at least %s characters", max: "%s cannot be longer than %s characters", range: "%s must be between %s and %s characters" }, number: { len: "%s must equal %s", min: "%s cannot be less than %s", max: "%s cannot be greater than %s", range: "%s must be between %s and %s" }, array: { len: "%s must be exactly %s in length", min: "%s cannot be less than %s in length", max: "%s cannot be greater than %s in length", range: "%s must be between %s and %s in length" }, pattern: { mismatch: "%s value %s does not match pattern %s" }, clone: function clone2() { const cloned = JSON.parse(JSON.stringify(this)); cloned.clone = this.clone; return cloned; } }; } const messages = newMessages(); function Schema(descriptor) { this.rules = null; this._messages = messages; this.define(descriptor); } Schema.prototype = { messages: function messages2(_messages) { if (_messages) { this._messages = deepMerge(newMessages(), _messages); } return this._messages; }, define: function define(rules2) { if (!rules2) { throw new Error("Cannot configure a schema with no rules"); } if (typeof rules2 !== "object" || Array.isArray(rules2)) { throw new Error("Rules must be an object"); } this.rules = {}; let z2; let item; for (z2 in rules2) { if (rules2.hasOwnProperty(z2)) { item = rules2[z2]; this.rules[z2] = Array.isArray(item) ? item : [item]; } } }, validate: function validate(source_, o2, oc) { const _this = this; if (o2 === void 0) { o2 = {}; } if (oc === void 0) { oc = function oc2() { }; } let source = source_; let options2 = o2; let callback = oc; if (typeof options2 === "function") { callback = options2; options2 = {}; } if (!this.rules || Object.keys(this.rules).length === 0) { if (callback) { callback(); } return Promise.resolve(); } function complete(results) { let i2; let errors = []; let fields = {}; function add2(e2) { if (Array.isArray(e2)) { let _errors; errors = (_errors = errors).concat.apply(_errors, e2); } else { errors.push(e2); } } for (i2 = 0; i2 < results.length; i2++) { add2(results[i2]); } if (!errors.length) { errors = null; fields = null; } else { fields = convertFieldsError(errors); } callback(errors, fields); } if (options2.messages) { let messages$12 = this.messages(); if (messages$12 === messages) { messages$12 = newMessages(); } deepMerge(messages$12, options2.messages); options2.messages = messages$12; } else { options2.messages = this.messages(); } let arr; let value2; const series = {}; const keys = options2.keys || Object.keys(this.rules); keys.forEach((z2) => { arr = _this.rules[z2]; value2 = source[z2]; arr.forEach((r2) => { let rule = r2; if (typeof rule.transform === "function") { if (source === source_) { source = { ...source }; } value2 = source[z2] = rule.transform(value2); } if (typeof rule === "function") { rule = { validator: rule }; } else { rule = { ...rule }; } rule.validator = _this.getValidationMethod(rule); rule.field = z2; rule.fullField = rule.fullField || z2; rule.type = _this.getType(rule); if (!rule.validator) { return; } series[z2] = series[z2] || []; series[z2].push({ rule, value: value2, source, field: z2 }); }); }); const errorFields = {}; return asyncMap(series, options2, (data, doIt) => { const { rule } = data; let deep = (rule.type === "object" || rule.type === "array") && (typeof rule.fields === "object" || typeof rule.defaultField === "object"); deep = deep && (rule.required || !rule.required && data.value); rule.field = data.field; function addFullfield(key, schema) { return { ...schema, fullField: `${rule.fullField}.${key}` }; } function cb(e2) { if (e2 === void 0) { e2 = []; } let errors = e2; if (!Array.isArray(errors)) { errors = [errors]; } if (!options2.suppressWarning && errors.length) { Schema.warning("async-validator:", errors); } if (errors.length && rule.message) { errors = [].concat(rule.message); } errors = errors.map(complementError(rule)); if (options2.first && errors.length) { errorFields[rule.field] = 1; return doIt(errors); } if (!deep) { doIt(errors); } else { if (rule.required && !data.value) { if (rule.message) { errors = [].concat(rule.message).map(complementError(rule)); } else if (options2.error) { errors = [options2.error(rule, format(options2.messages.required, rule.field))]; } else { errors = []; } return doIt(errors); } let fieldsSchema = {}; if (rule.defaultField) { for (const k2 in data.value) { if (data.value.hasOwnProperty(k2)) { fieldsSchema[k2] = rule.defaultField; } } } fieldsSchema = { ...fieldsSchema, ...data.rule.fields }; for (const f2 in fieldsSchema) { if (fieldsSchema.hasOwnProperty(f2)) { const fieldSchema = Array.isArray(fieldsSchema[f2]) ? fieldsSchema[f2] : [fieldsSchema[f2]]; fieldsSchema[f2] = fieldSchema.map(addFullfield.bind(null, f2)); } } const schema = new Schema(fieldsSchema); schema.messages(options2.messages); if (data.rule.options) { data.rule.options.messages = options2.messages; data.rule.options.error = options2.error; } schema.validate(data.value, data.rule.options || options2, (errs) => { const finalErrors = []; if (errors && errors.length) { finalErrors.push.apply(finalErrors, errors); } if (errs && errs.length) { finalErrors.push.apply(finalErrors, errs); } doIt(finalErrors.length ? finalErrors : null); }); } } let res; if (rule.asyncValidator) { res = rule.asyncValidator(rule, data.value, cb, data.source, options2); } else if (rule.validator) { res = rule.validator(rule, data.value, cb, data.source, options2); if (res === true) { cb(); } else if (res === false) { cb(rule.message || `${rule.field} fails`); } else if (res instanceof Array) { cb(res); } else if (res instanceof Error) { cb(res.message); } } if (res && res.then) { res.then(() => cb(), (e2) => cb(e2)); } }, (results) => { complete(results); }); }, getType: function getType(rule) { if (rule.type === void 0 && rule.pattern instanceof RegExp) { rule.type = "pattern"; } if (typeof rule.validator !== "function" && rule.type && !validators.hasOwnProperty(rule.type)) { throw new Error(format("Unknown rule type %s", rule.type)); } return rule.type || "string"; }, getValidationMethod: function getValidationMethod(rule) { if (typeof rule.validator === "function") { return rule.validator; } const keys = Object.keys(rule); const messageIndex = keys.indexOf("message"); if (messageIndex !== -1) { keys.splice(messageIndex, 1); } if (keys.length === 1 && keys[0] === "required") { return validators.required; } return validators[this.getType(rule)] || false; } }; Schema.register = function register(type2, validator) { if (typeof validator !== "function") { throw new Error("Cannot register a validator by type, validator is not a function"); } validators[type2] = validator; }; Schema.warning = warning; Schema.messages = messages; Schema.warning = function() { }; const _sfc_main$1o = { name: "u-form", mixins: [mpMixin, mixin, props$V], provide() { return { uForm: this }; }, data() { return { formRules: {}, // 规则校验器 validator: {}, // 原始的model快照,用于resetFields方法重置表单时使用 originalModel: null }; }, watch: { // 监听规则的变化 rules: { immediate: true, handler(n2) { this.setRules(n2); } }, // 监听属性的变化,通知子组件u-form-item重新获取信息 propsChange(n2) { var _a2; if ((_a2 = this.children) == null ? void 0 : _a2.length) { this.children.map((child) => { typeof child.updateParentData == "function" && child.updateParentData(); }); } }, // 监听model的初始值作为重置表单的快照 model: { immediate: true, handler(n2) { if (!this.originalModel) { this.originalModel = deepClone(n2); } } } }, computed: { propsChange() { return [ this.errorType, this.borderBottom, this.labelPosition, this.labelWidth, this.labelAlign, this.labelStyle ]; } }, created() { this.children = []; }, methods: { // 手动设置校验的规则,如果规则中有函数的话,微信小程序中会过滤掉,所以只能手动调用设置规则 setRules(rules2) { if (Object.keys(rules2).length === 0) return; if (Object.keys(this.model).length === 0) { error("设置rules,model必须设置!如果已经设置,请刷新页面。"); return; } this.formRules = rules2; this.validator = new Schema(rules2); }, // 清空所有u-form-item组件的内容,本质上是调用了u-form-item组件中的resetField()方法 resetFields() { this.resetModel(); }, // 重置model为初始值的快照 resetModel(obj) { this.children.map((child) => { const prop = child == null ? void 0 : child.prop; const value2 = getProperty(this.originalModel, prop); setProperty(this.model, prop, value2); }); }, // 清空校验结果 clearValidate(props2) { props2 = [].concat(props2); this.children.map((child) => { if (props2[0] === void 0 || props2.includes(child.prop)) { child.message = null; } }); }, // 对部分表单字段进行校验 async validateField(value2, callback, event = null, options2) { this.$nextTick(() => { const errorsRes = []; value2 = [].concat(value2); let promises = this.children.map((child) => { return new Promise((resolve, reject) => { const childErrors = []; if (value2.includes(child.prop)) { const propertyVal = getProperty( this.model, child.prop ); const propertyChain = child.prop.split("."); const propertyName = propertyChain[propertyChain.length - 1]; let rule = []; if (child.itemRules && child.itemRules.length > 0) { rule = child.itemRules; } else { rule = this.formRules[child.prop]; } if (!rule) { resolve(); return; } const rules2 = [].concat(rule); if (!rules2.length) { resolve(); } for (let i2 = 0; i2 < rules2.length; i2++) { const ruleItem = rules2[i2]; const trigger = [].concat(ruleItem == null ? void 0 : ruleItem.trigger); if (event && !trigger.includes(event)) { resolve(); continue; } const validator = new Schema({ [propertyName]: ruleItem }); validator.validate( { [propertyName]: propertyVal }, (errors, fields) => { var _a2; if (test.array(errors)) { errors.forEach((element) => { element.prop = child.prop; }); errorsRes.push(...errors); childErrors.push(...errors); } if (!options2 || (options2 == null ? void 0 : options2.showErrorMsg) == true) { child.message = ((_a2 = childErrors[0]) == null ? void 0 : _a2.message) ? childErrors[0].message : null; } if (i2 == rules2.length - 1) { resolve(errorsRes); } } ); } } else { resolve({}); } }); }); Promise.all(promises).then((results) => { typeof callback === "function" && callback(errorsRes); }).catch((error2) => { formatAppLog("error", "at uni_modules/uview-plus/components/u-form/u-form.vue:218", "An error occurred:", error2); }); }); }, /** * 校验全部数据 * @param {Object} options * @param {Boolean} options.showErrorMsg -是否显示校验信息, */ validate(options2) { if (Object.keys(this.formRules).length === 0) { error("未设置rules,请看文档说明!如果已经设置,请刷新页面。"); return; } return new Promise((resolve, reject) => { this.$nextTick(() => { const formItemProps = this.children.map( (item) => item.prop ); this.validateField(formItemProps, (errors) => { if (errors.length) { this.errorType === "toast" && toast(errors[0].message); reject(errors); } else { resolve(true); } }, null, options2); }); }); } } }; function _sfc_render$1n(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-form" }, [ vue.renderSlot(_ctx.$slots, "default") ]); } const uForm = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["render", _sfc_render$1n], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-form/u-form.vue"]]); const __vite_glob_0_42 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uForm }, Symbol.toStringTag, { value: "Module" })); const props$U = defineMixin({ props: { // 宫格的name name: { type: [String, Number, null], default: () => props$1x.gridItem.name }, // 背景颜色 bgColor: { type: String, default: () => props$1x.gridItem.bgColor } } }); const _sfc_main$1n = { name: "u-grid-item", mixins: [mpMixin, mixin, props$U], data() { return { parentData: { col: 0, // 父组件划分的宫格数 border: true // 是否显示边框,根据父组件决定 }, classes: [] // 类名集合,用于判断是否显示右边和下边框 }; }, mounted() { this.init(); }, emits: ["click"], // 微信小程序中 options 选项 computed: { itemStyle() { const style = { background: this.bgColor }; style["width"] = "100%"; return deepMerge$1(style, addStyle(this.customStyle)); } }, methods: { init() { uni.$on("$uGridItem", () => { this.gridItemClasses(); }); this.updateParentData(); uni.$emit("$uGridItem"); this.gridItemClasses(); }, // 获取父组件的参数 updateParentData() { this.getParentData("u-grid"); }, clickHandler() { var _a2; let name2 = this.name; const children = (_a2 = this.parent) == null ? void 0 : _a2.children; if (children && this.name === null) { name2 = children.findIndex((child) => child === this); } this.parent && this.parent.childClick(name2); this.$emit("click", name2); }, async getItemWidth() { let width = 0; if (this.parent) { const parentWidth = await this.getParentWidth(); width = parentWidth / Number(this.parentData.col) + "px"; } this.width = width; }, // 获取父元素的尺寸 getParentWidth() { }, gridItemClasses() { if (this.parentData.border) { let classes = []; this.parent.children.map((child, index2) => { if (this === child) { const len = this.parent.children.length; if ((index2 + 1) % this.parentData.col !== 0 && index2 + 1 !== len) { classes.push("u-border-right"); } const lessNum = len % this.parentData.col === 0 ? this.parentData.col : len % this.parentData.col; if (index2 < len - lessNum) { classes.push("u-border-bottom"); } } }); this.classes = classes; } } }, beforeUnmount() { uni.$off("$uGridItem"); } }; function _sfc_render$1m(_ctx, _cache, $props, $setup, $data, $options) { return $data.parentData.col > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-grid-item", $data.classes]), "hover-class": "u-grid-item--hover-class", "hover-stay-time": 200, onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)), style: vue.normalizeStyle([$options.itemStyle]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const uGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$1n, [["render", _sfc_render$1m], ["__scopeId", "data-v-0a78094b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-grid-item/u-grid-item.vue"]]); const __vite_glob_0_44 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uGridItem }, Symbol.toStringTag, { value: "Module" })); const props$T = defineMixin({ props: { // 分成几列 col: { type: [String, Number], default: () => props$1x.grid.col }, // 是否显示边框 border: { type: Boolean, default: () => props$1x.grid.border }, // 宫格对齐方式,表现为数量少的时候,靠左,居中,还是靠右 align: { type: String, default: () => props$1x.grid.align }, // 间隔 gap: { type: String, default: "0px" } } }); const _sfc_main$1m = { name: "u-grid", mixins: [mpMixin, mixin, props$T], data() { return { index: 0, width: 0 }; }, watch: { // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 parentData() { if (this.children.length) { this.children.map((child) => { typeof child.updateParentData == "function" && child.updateParentData(); }); } } }, created() { this.children = []; }, computed: { // 计算父组件的值是否发生变化 parentData() { return [this.hoverClass, this.col, this.size, this.border]; }, // 宫格对齐方式 gridStyle() { let style = {}; switch (this.align) { case "left": style.justifyContent = "flex-start"; break; case "center": style.justifyContent = "center"; break; case "right": style.justifyContent = "flex-end"; break; default: style.justifyContent = "flex-start"; } return deepMerge$1(style, addStyle(this.customStyle)); } }, emits: ["click"], // 防止事件执行两次 // 20240409发现抖音小程序如果开启virtualHost会出现严重问题,几乎所有事件包括created等生命周期事件全部失效。 methods: { // 此方法由u-grid-item触发,用于在u-grid发出事件 childClick(name2) { this.$emit("click", name2); } } }; const __injectCSSVars__ = () => { vue.useCssVars((_ctx) => ({ "10b668c8-gap": _ctx.gap, "10b668c8-col": _ctx.col })); }; const __setup__ = _sfc_main$1m.setup; _sfc_main$1m.setup = __setup__ ? (props2, ctx) => { __injectCSSVars__(); return __setup__(props2, ctx); } : __injectCSSVars__; function _sfc_render$1l(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-grid", ref: "u-grid", style: vue.normalizeStyle([$options.gridStyle]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const uGrid = /* @__PURE__ */ _export_sfc(_sfc_main$1m, [["render", _sfc_render$1l], ["__scopeId", "data-v-10b668c8"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-grid/u-grid.vue"]]); const __vite_glob_0_45 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uGrid }, Symbol.toStringTag, { value: "Module" })); const icons = { "uicon-level": "", "uicon-column-line": "", "uicon-checkbox-mark": "", "uicon-folder": "", "uicon-movie": "", "uicon-star-fill": "", "uicon-star": "", "uicon-phone-fill": "", "uicon-phone": "", "uicon-apple-fill": "", "uicon-chrome-circle-fill": "", "uicon-backspace": "", "uicon-attach": "", "uicon-cut": "", "uicon-empty-car": "", "uicon-empty-coupon": "", "uicon-empty-address": "", "uicon-empty-favor": "", "uicon-empty-permission": "", "uicon-empty-news": "", "uicon-empty-search": "", "uicon-github-circle-fill": "", "uicon-rmb": "", "uicon-person-delete-fill": "", "uicon-reload": "", "uicon-order": "", "uicon-server-man": "", "uicon-search": "", "uicon-fingerprint": "", "uicon-more-dot-fill": "", "uicon-scan": "", "uicon-share-square": "", "uicon-map": "", "uicon-map-fill": "", "uicon-tags": "", "uicon-tags-fill": "", "uicon-bookmark-fill": "", "uicon-bookmark": "", "uicon-eye": "", "uicon-eye-fill": "", "uicon-mic": "", "uicon-mic-off": "", "uicon-calendar": "", "uicon-calendar-fill": "", "uicon-trash": "", "uicon-trash-fill": "", "uicon-play-left": "", "uicon-play-right": "", "uicon-minus": "", "uicon-plus": "", "uicon-info": "", "uicon-info-circle": "", "uicon-info-circle-fill": "", "uicon-question": "", "uicon-error": "", "uicon-close": "", "uicon-checkmark": "", "uicon-android-circle-fill": "", "uicon-android-fill": "", "uicon-ie": "", "uicon-IE-circle-fill": "", "uicon-google": "", "uicon-google-circle-fill": "", "uicon-setting-fill": "", "uicon-setting": "", "uicon-minus-square-fill": "", "uicon-plus-square-fill": "", "uicon-heart": "", "uicon-heart-fill": "", "uicon-camera": "", "uicon-camera-fill": "", "uicon-more-circle": "", "uicon-more-circle-fill": "", "uicon-chat": "", "uicon-chat-fill": "", "uicon-bag-fill": "", "uicon-bag": "", "uicon-error-circle-fill": "", "uicon-error-circle": "", "uicon-close-circle": "", "uicon-close-circle-fill": "", "uicon-checkmark-circle": "", "uicon-checkmark-circle-fill": "", "uicon-question-circle-fill": "", "uicon-question-circle": "", "uicon-share": "", "uicon-share-fill": "", "uicon-shopping-cart": "", "uicon-shopping-cart-fill": "", "uicon-bell": "", "uicon-bell-fill": "", "uicon-list": "", "uicon-list-dot": "", "uicon-zhihu": "", "uicon-zhihu-circle-fill": "", "uicon-zhifubao": "", "uicon-zhifubao-circle-fill": "", "uicon-weixin-circle-fill": "", "uicon-weixin-fill": "", "uicon-twitter-circle-fill": "", "uicon-twitter": "", "uicon-taobao-circle-fill": "", "uicon-taobao": "", "uicon-weibo-circle-fill": "", "uicon-weibo": "", "uicon-qq-fill": "", "uicon-qq-circle-fill": "", "uicon-moments-circel-fill": "", "uicon-moments": "", "uicon-qzone": "", "uicon-qzone-circle-fill": "", "uicon-baidu-circle-fill": "", "uicon-baidu": "", "uicon-facebook-circle-fill": "", "uicon-facebook": "", "uicon-car": "", "uicon-car-fill": "", "uicon-warning-fill": "", "uicon-warning": "", "uicon-clock-fill": "", "uicon-clock": "", "uicon-edit-pen": "", "uicon-edit-pen-fill": "", "uicon-email": "", "uicon-email-fill": "", "uicon-minus-circle": "", "uicon-minus-circle-fill": "", "uicon-plus-circle": "", "uicon-plus-circle-fill": "", "uicon-file-text": "", "uicon-file-text-fill": "", "uicon-pushpin": "", "uicon-pushpin-fill": "", "uicon-grid": "", "uicon-grid-fill": "", "uicon-play-circle": "", "uicon-play-circle-fill": "", "uicon-pause-circle-fill": "", "uicon-pause": "", "uicon-pause-circle": "", "uicon-eye-off": "", "uicon-eye-off-outline": "", "uicon-gift-fill": "", "uicon-gift": "", "uicon-rmb-circle-fill": "", "uicon-rmb-circle": "", "uicon-kefu-ermai": "", "uicon-server-fill": "", "uicon-coupon-fill": "", "uicon-coupon": "", "uicon-integral": "", "uicon-integral-fill": "", "uicon-home-fill": "", "uicon-home": "", "uicon-hourglass-half-fill": "", "uicon-hourglass": "", "uicon-account": "", "uicon-plus-people-fill": "", "uicon-minus-people-fill": "", "uicon-account-fill": "", "uicon-thumb-down-fill": "", "uicon-thumb-down": "", "uicon-thumb-up": "", "uicon-thumb-up-fill": "", "uicon-lock-fill": "", "uicon-lock-open": "", "uicon-lock-opened-fill": "", "uicon-lock": "", "uicon-red-packet-fill": "", "uicon-photo-fill": "", "uicon-photo": "", "uicon-volume-off-fill": "", "uicon-volume-off": "", "uicon-volume-fill": "", "uicon-volume": "", "uicon-red-packet": "", "uicon-download": "", "uicon-arrow-up-fill": "", "uicon-arrow-down-fill": "", "uicon-play-left-fill": "", "uicon-play-right-fill": "", "uicon-rewind-left-fill": "", "uicon-rewind-right-fill": "", "uicon-arrow-downward": "", "uicon-arrow-leftward": "", "uicon-arrow-rightward": "", "uicon-arrow-upward": "", "uicon-arrow-down": "", "uicon-arrow-right": "", "uicon-arrow-left": "", "uicon-arrow-up": "", "uicon-skip-back-left": "", "uicon-skip-forward-right": "", "uicon-rewind-right": "", "uicon-rewind-left": "", "uicon-arrow-right-double": "", "uicon-arrow-left-double": "", "uicon-wifi-off": "", "uicon-wifi": "", "uicon-empty-data": "", "uicon-empty-history": "", "uicon-empty-list": "", "uicon-empty-page": "", "uicon-empty-order": "", "uicon-man": "", "uicon-woman": "", "uicon-man-add": "", "uicon-man-add-fill": "", "uicon-man-delete": "", "uicon-man-delete-fill": "", "uicon-zh": "", "uicon-en": "" }; const props$S = defineMixin({ props: { // 图标类名 name: { type: String, default: () => props$1x.icon.name }, // 图标颜色,可接受主题色 color: { type: String, default: () => props$1x.icon.color }, // 字体大小,单位px size: { type: [String, Number], default: () => props$1x.icon.size }, // 是否显示粗体 bold: { type: Boolean, default: () => props$1x.icon.bold }, // 点击图标的时候传递事件出去的index(用于区分点击了哪一个) index: { type: [String, Number], default: () => props$1x.icon.index }, // 触摸图标时的类名 hoverClass: { type: String, default: () => props$1x.icon.hoverClass }, // 自定义扩展前缀,方便用户扩展自己的图标库 customPrefix: { type: String, default: () => props$1x.icon.customPrefix }, // 图标右边或者下面的文字 label: { type: [String, Number], default: () => props$1x.icon.label }, // label的位置,只能右边或者下边 labelPos: { type: String, default: () => props$1x.icon.labelPos }, // label的大小 labelSize: { type: [String, Number], default: () => props$1x.icon.labelSize }, // label的颜色 labelColor: { type: String, default: () => props$1x.icon.labelColor }, // label与图标的距离 space: { type: [String, Number], default: () => props$1x.icon.space }, // 图片的mode imgMode: { type: String, default: () => props$1x.icon.imgMode }, // 用于显示图片小图标时,图片的宽度 width: { type: [String, Number], default: () => props$1x.icon.width }, // 用于显示图片小图标时,图片的高度 height: { type: [String, Number], default: () => props$1x.icon.height }, // 用于解决某些情况下,让图标垂直居中的用途 top: { type: [String, Number], default: () => props$1x.icon.top }, // 是否阻止事件传播 stop: { type: Boolean, default: () => props$1x.icon.stop } } }); let params = { loaded: false }; const loadFont = () => { if (config$1.loadFontOnce) { params.loaded = true; } uni.loadFontFace({ global: true, // 是否全局生效。微信小程序 '2.10.0'起支持全局生效,需在 app.vue 中调用。 family: "uicon-iconfont", source: 'url("' + config$1.iconUrl + '")', success() { }, fail() { } }); if (config$1.customIcon.family) { uni.loadFontFace({ global: true, // 是否全局生效。微信小程序 '2.10.0'起支持全局生效,需在 app.vue 中调用。 family: config$1.customIcon.family, source: 'url("' + config$1.customIcon.url + '")', success() { }, fail() { } }); } return true; }; const fontUtil = { params, loadFont }; const _sfc_main$1l = { name: "u-icon", beforeCreate() { if (!fontUtil.params.loaded) { fontUtil.loadFont(); } }, data() { return {}; }, emits: ["click"], mixins: [mpMixin, mixin, props$S], computed: { uClasses() { let classes = []; classes.push(this.customPrefix + "-" + this.name); if (this.customPrefix == "uicon") { classes.push("u-iconfont"); } else { classes.push(this.customPrefix); } if (this.color && config$1.type.includes(this.color)) classes.push("u-icon__icon--" + this.color); return classes; }, iconStyle() { let style = {}; style = { fontSize: addUnit(this.size), lineHeight: addUnit(this.size), fontWeight: this.bold ? "bold" : "normal", // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中 top: addUnit(this.top) }; if (this.customPrefix !== "uicon") { style.fontFamily = this.customPrefix; } if (this.color && !config$1.type.includes(this.color)) style.color = this.color; return style; }, // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 isImg() { return this.name.indexOf("/") !== -1; }, imgStyle() { let style = {}; style.width = this.width ? addUnit(this.width) : addUnit(this.size); style.height = this.height ? addUnit(this.height) : addUnit(this.size); return style; }, // 通过图标名,查找对应的图标 icon() { if (this.customPrefix !== "uicon") { return config$1.customIcons[this.name] || this.name; } return icons["uicon-" + this.name] || this.name; } }, methods: { addStyle, addUnit, clickHandler(e2) { this.$emit("click", this.index, e2); this.stop && this.preventEvent(e2); } } }; function _sfc_render$1k(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-icon", ["u-icon--" + _ctx.labelPos]]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "u-icon__img", src: _ctx.name, mode: _ctx.imgMode, style: vue.normalizeStyle([$options.imgStyle, $options.addStyle(_ctx.customStyle)]) }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: vue.normalizeClass(["u-icon__icon", $options.uClasses]), style: vue.normalizeStyle([$options.iconStyle, $options.addStyle(_ctx.customStyle)]), "hover-class": _ctx.hoverClass }, vue.toDisplayString($options.icon), 15, ["hover-class"])), vue.createCommentVNode(' 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 '), _ctx.label !== "" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "u-icon__label", style: vue.normalizeStyle({ color: _ctx.labelColor, fontSize: $options.addUnit(_ctx.labelSize), marginLeft: _ctx.labelPos == "right" ? $options.addUnit(_ctx.space) : 0, marginTop: _ctx.labelPos == "bottom" ? $options.addUnit(_ctx.space) : 0, marginRight: _ctx.labelPos == "left" ? $options.addUnit(_ctx.space) : 0, marginBottom: _ctx.labelPos == "top" ? $options.addUnit(_ctx.space) : 0 }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const uIcon = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["render", _sfc_render$1k], ["__scopeId", "data-v-ac70166d"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-icon/u-icon.vue"]]); const __vite_glob_0_46 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uIcon }, Symbol.toStringTag, { value: "Module" })); const props$R = defineMixin({ props: { // 图片地址 src: { type: String, default: () => props$1x.image.src }, // 裁剪模式 mode: { type: String, default: () => props$1x.image.mode }, // 宽度,单位任意 width: { type: [String, Number], default: () => props$1x.image.width }, // 高度,单位任意 height: { type: [String, Number], default: () => props$1x.image.height }, // 图片形状,circle-圆形,square-方形 shape: { type: String, default: () => props$1x.image.shape }, // 圆角,单位任意 radius: { type: [String, Number], default: () => props$1x.image.radius }, // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序 lazyLoad: { type: Boolean, default: () => props$1x.image.lazyLoad }, // 开启长按图片显示识别微信小程序码菜单 showMenuByLongpress: { type: Boolean, default: () => props$1x.image.showMenuByLongpress }, // 加载中的图标,或者小图片 loadingIcon: { type: String, default: () => props$1x.image.loadingIcon }, // 加载失败的图标,或者小图片 errorIcon: { type: String, default: () => props$1x.image.errorIcon }, // 是否显示加载中的图标或者自定义的slot showLoading: { type: Boolean, default: () => props$1x.image.showLoading }, // 是否显示加载错误的图标或者自定义的slot showError: { type: Boolean, default: () => props$1x.image.showError }, // 是否需要淡入效果 fade: { type: Boolean, default: () => props$1x.image.fade }, // 只支持网络资源,只对微信小程序有效 webp: { type: Boolean, default: () => props$1x.image.webp }, // 过渡时间,单位ms duration: { type: [String, Number], default: () => props$1x.image.duration }, // 背景颜色,用于深色页面加载图片时,为了和背景色融合 bgColor: { type: String, default: () => props$1x.image.bgColor } } }); const _sfc_main$1k = { name: "u-image", mixins: [mpMixin, mixin, props$R], data() { return { // 图片是否加载错误,如果是,则显示错误占位图 isError: false, // 初始化组件时,默认为加载中状态 loading: true, // 不透明度,为了实现淡入淡出的效果 opacity: 1, // 过渡时间,因为props的值无法修改,故需要一个中间值 durationTime: this.duration, // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景 backgroundStyle: {}, // 用于fade模式的控制组件显示与否 show: false }; }, watch: { src: { immediate: true, handler(n2) { if (!n2) { this.isError = true; } else { this.isError = false; this.loading = true; } } } }, computed: { transStyle() { let style = {}; if (this.loading || this.isError || this.width == "100%" || this.mode != "heightFix") { style.width = addUnit(this.width); } else { style.width = "fit-content"; } if (this.loading || this.isError || this.height == "100%" || this.mode != "widthFix") { style.height = addUnit(this.height); } else { style.height = "fit-content"; } return style; }, wrapStyle() { let style = {}; if (this.loading || this.isError || this.width == "100%" || this.mode != "heightFix") { style.width = addUnit(this.width); } else { style.width = "fit-content"; } if (this.loading || this.isError || this.height == "100%" || this.mode != "widthFix") { style.height = addUnit(this.height); } else { style.height = "fit-content"; } style.borderRadius = this.shape == "circle" ? "10000px" : addUnit(this.radius); style.overflow = this.radius > 0 ? "hidden" : "visible"; return deepMerge$1(style, addStyle(this.customStyle)); } }, mounted() { this.show = true; }, emits: ["click", "error", "load"], methods: { addUnit, // 点击图片 onClick(e2) { this.$emit("click", e2); }, // 图片加载失败 onErrorHandler(err) { this.loading = false; this.isError = true; this.$emit("error", err); }, // 图片加载完成,标记loading结束 onLoadHandler(event) { this.loading = false; this.isError = false; this.$emit("load", event); this.removeBgColor(); }, // 移除图片的背景色 removeBgColor() { } } }; function _sfc_render$1j(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createBlock(_component_u_transition, { mode: "fade", show: $data.show, style: vue.normalizeStyle($options.transStyle), duration: _ctx.fade ? 1e3 : 0 }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "u-image box-border", onClick: _cache[2] || (_cache[2] = (...args) => $options.onClick && $options.onClick(...args)), style: vue.normalizeStyle([$options.wrapStyle, $data.backgroundStyle]) }, [ !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _ctx.src, mode: _ctx.mode, onError: _cache[0] || (_cache[0] = (...args) => $options.onErrorHandler && $options.onErrorHandler(...args)), onLoad: _cache[1] || (_cache[1] = (...args) => $options.onLoadHandler && $options.onLoadHandler(...args)), "show-menu-by-longpress": _ctx.showMenuByLongpress, "lazy-load": _ctx.lazyLoad, class: "u-image__image", style: vue.normalizeStyle({ width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height), borderRadius: _ctx.shape == "circle" ? "10000px" : $options.addUnit(_ctx.radius) }) }, null, 44, ["src", "mode", "show-menu-by-longpress", "lazy-load"])) : vue.createCommentVNode("v-if", true), _ctx.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-image__loading", style: vue.normalizeStyle({ borderRadius: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius), backgroundColor: this.bgColor, width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height) }) }, [ vue.renderSlot(_ctx.$slots, "loading", {}, () => [ vue.createVNode(_component_up_icon, { name: _ctx.loadingIcon }, null, 8, ["name"]) ], true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.showError && $data.isError && !$data.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "u-image__error", style: vue.normalizeStyle({ borderRadius: _ctx.shape == "circle" ? "50%" : $options.addUnit(_ctx.radius), backgroundColor: this.bgColor, width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height) }) }, [ vue.renderSlot(_ctx.$slots, "error", {}, () => [ vue.createVNode(_component_up_icon, { name: _ctx.errorIcon }, null, 8, ["name"]) ], true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["show", "style", "duration"]); } const uImage = /* @__PURE__ */ _export_sfc(_sfc_main$1k, [["render", _sfc_render$1j], ["__scopeId", "data-v-abebd402"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-image/u-image.vue"]]); const __vite_glob_0_47 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uImage }, Symbol.toStringTag, { value: "Module" })); const props$Q = defineMixin({ props: { // 列表锚点文本内容 text: { type: [String, Number], default: () => props$1x.indexAnchor.text }, // 列表锚点文字颜色 color: { type: String, default: () => props$1x.indexAnchor.color }, // 列表锚点文字大小,单位默认px size: { type: [String, Number], default: () => props$1x.indexAnchor.size }, // 列表锚点背景颜色 bgColor: { type: String, default: () => props$1x.indexAnchor.bgColor }, // 列表锚点高度,单位默认px height: { type: [String, Number], default: () => props$1x.indexAnchor.height } } }); const _sfc_main$1j = { name: "u-index-anchor", mixins: [mpMixin, mixin, props$Q], data() { return {}; }, mounted() { this.init(); }, methods: { addUnit, init() { const indexList2 = $parent.call(this, "u-index-list"); if (!indexList2) { return error("u-index-anchor必须要搭配u-index-list组件使用"); } indexList2.anchors.push(this); const indexListItem = $parent.call(this, "u-index-item"); if (!indexListItem) { return error("u-index-anchor必须要搭配u-index-item组件使用"); } if (typeof this.text == "string") { indexListItem.id = this.text.charCodeAt(0); } else { indexListItem.id = this.text.name.charCodeAt(0); } } }, computed: { parentSticky() { const indexList2 = $parent.call(this, "u-index-list"); return indexList2 ? indexList2.sticky : true; } } }; function _sfc_render$1i(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-index-anchor u-border-bottom", { "u-index-anchor--sticky": $options.parentSticky }]), ref: `u-index-anchor-${_ctx.text}`, style: vue.normalizeStyle({ height: $options.addUnit(_ctx.height), backgroundColor: _ctx.bgColor }) }, [ vue.createElementVNode( "text", { class: "u-index-anchor__text", style: vue.normalizeStyle({ fontSize: $options.addUnit(_ctx.size), color: _ctx.color }) }, vue.toDisplayString(_ctx.text.name || _ctx.text), 5 /* TEXT, STYLE */ ) ], 6 /* CLASS, STYLE */ ); } const uIndexAnchor = /* @__PURE__ */ _export_sfc(_sfc_main$1j, [["render", _sfc_render$1i], ["__scopeId", "data-v-20d39374"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-index-anchor/u-index-anchor.vue"]]); const __vite_glob_0_48 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uIndexAnchor }, Symbol.toStringTag, { value: "Module" })); const props$P = defineMixin({ props: {} }); const _sfc_main$1i = { name: "u-index-item", mixins: [mpMixin, mixin, props$P], data() { return { // 本组件到滚动条顶部的距离 top: 0, height: 0, id: "" }; }, created() { this.anchor = {}; }, mounted() { this.init(); }, methods: { init() { this.getParentData("u-index-list"); if (!this.parent) { return error("u-index-item必须要搭配u-index-list组件使用"); } sleep().then(() => { this.getIndexItemRect().then((size) => { this.top = Math.ceil(size.top); this.height = Math.ceil(size.height); }); }); }, getIndexItemRect() { return new Promise((resolve) => { this.$uGetRect(".u-index-item").then((size) => { resolve(size); }); }); } } }; function _sfc_render$1h(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-index-item", [`u-index-item-${$data.id}`]]), id: `u-index-item-${$data.id}` }, [ vue.renderSlot(_ctx.$slots, "default") ], 10, ["id"]); } const uIndexItem = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["render", _sfc_render$1h], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-index-item/u-index-item.vue"]]); const __vite_glob_0_49 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uIndexItem }, Symbol.toStringTag, { value: "Module" })); const props$O = defineMixin({ props: { // 右边锚点非激活的颜色 inactiveColor: { type: String, default: () => props$1x.indexList.inactiveColor }, // 右边锚点激活的颜色 activeColor: { type: String, default: () => props$1x.indexList.activeColor }, // 索引字符列表,数组形式 indexList: { type: Array, default: () => props$1x.indexList.indexList }, // 是否开启锚点自动吸顶 sticky: { type: Boolean, default: () => props$1x.indexList.sticky }, // 自定义导航栏的高度 customNavHeight: { type: [String, Number], default: () => props$1x.indexList.customNavHeight }, // 是否开启底部安全距离适配 safeBottomFix: { type: Boolean, default: () => props$1x.indexList.safeBottomFix } } }); const indexList = () => { const indexList2 = []; const charCodeOfA = "A".charCodeAt(0); for (let i2 = 0; i2 < 26; i2++) { indexList2.push(String.fromCharCode(charCodeOfA + i2)); } return indexList2; }; const _sfc_main$1h = { name: "u-index-list", mixins: [mpMixin, mixin, props$O], data() { return { // 当前正在被选中的字母索引 activeIndex: -1, touchmoveIndex: 1, // 索引字母的信息 letterInfo: { height: 0, itemHeight: 0, top: 0 }, // 设置字母指示器的高度,后面为了让指示器跟随字母,并将尖角部分指向字母的中部,需要依赖此值 indicatorHeight: 50, // 字母放大指示器的top值,为了让其指向当前激活的字母 // indicatorTop: 0 // 当前是否正在被触摸状态 touching: false, // 滚动条顶部top值 scrollTop: 0, // scroll-view的高度 scrollViewHeight: 0, // 系统信息 sys: {}, scrolling: false, scrollIntoView: "", pageY: 0, topOffset: 0 }; }, computed: { // 如果有传入外部的indexList锚点数组则使用,否则使用内部生成A-Z字母 uIndexList() { return this.indexList.length ? this.indexList : indexList(); }, // 字母放大指示器的top值,为了让其指向当前激活的字母 indicatorTop() { const { top, height, itemHeight } = this.letterInfo; return Math.floor(top - height / 2 + itemHeight * this.activeIndex + itemHeight - 70 / 2); } }, watch: { // 监听字母索引的变化,重新设置尺寸 uIndexList: { immediate: false, handler() { sleep(30).then(() => { this.setIndexListLetterInfo(); }); } } }, created() { this.children = []; this.anchors = []; this.sys = getWindowInfo(); }, mounted() { this.init(); sleep(50).then(() => { this.setIndexListLetterInfo(); }); }, methods: { addUnit, init() { let customNavHeight = getPx(this.customNavHeight); this.getIndexListRect().then(async (sizeScroll) => { this.scrollViewHeight = sizeScroll.height ? sizeScroll.height : this.sys.windowHeight - customNavHeight; this.topOffset = this.sys.windowHeight - this.scrollViewHeight; }); }, // 索引列表被触摸 touchStart(e2) { const touchStartData = e2.changedTouches[0]; if (!touchStartData) return; this.touching = true; const { pageY, screenY } = touchStartData; const currentIndex = this.getIndexListLetter(pageY); this.setValueForTouch(currentIndex); }, // 索引字母列表被触摸滑动中 touchMove(e2) { let touchMove = e2.changedTouches[0]; if (!touchMove) return; if (!this.touching) { this.touching = true; } const { pageY, screenY } = touchMove; const currentIndex = this.getIndexListLetter(pageY); this.setValueForTouch(currentIndex); }, // 触摸结束 touchEnd(e2) { sleep(300).then(() => { this.touching = false; }); }, // 获取索引列表的尺寸以及单个字符的尺寸信息 getIndexListLetterRect() { return new Promise((resolve) => { this.$uGetRect(".u-index-list__letter").then((size) => { resolve(size); }); }); }, getIndexListScrollViewRect() { return new Promise((resolve) => { this.$uGetRect(".u-index-list__scroll-view").then((size) => { resolve(size); }); }); }, getIndexListRect() { return new Promise((resolve) => { this.$uGetRect(".u-index-list").then((size) => { resolve(size); }); }); }, // 设置indexList索引的尺寸信息 setIndexListLetterInfo() { this.getIndexListLetterRect().then((size) => { const { height } = size; const sysData = getWindowInfo(); sysData.windowHeight; if (this.customNavHeight == 0) { -(sysData.statusBarHeight + 44); } else { getPx(this.customNavHeight); } this.getIndexListScrollViewRect().then((sizeScroll) => { this.letterInfo = { height, // 为了让字母列表对屏幕绝对居中,让其对导航栏进行修正,也即往上偏移导航栏的一半高度 top: sizeScroll.height / 2, // top: (this.scrollViewHeight - height) / 2 + customNavHeight / 2, itemHeight: Math.floor(height / this.uIndexList.length) }; }); }); }, // 获取当前被触摸的索引字母 getIndexListLetter(pageY) { this.pageY = pageY; let { top, height, itemHeight } = this.letterInfo; let index2 = this.currentIndex; top = top - height / 2; pageY = pageY - this.topOffset; if (pageY < top) { index2 = 0; } else if (pageY >= top + height) { index2 = this.uIndexList.length - 1; } else { index2 = Math.floor((pageY - top) / itemHeight); } return index2; }, // 设置各项由触摸而导致变化的值 async setValueForTouch(currentIndex) { if (currentIndex === this.activeIndex) return; this.activeIndex = currentIndex; this.$emit("select", this.uIndexList[currentIndex]); if (typeof this.uIndexList[currentIndex] == "string") { this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].charCodeAt(0)}`; } else { this.scrollIntoView = `u-index-item-${this.uIndexList[currentIndex].name.charCodeAt(0)}`; } }, getHeaderRect() { return new Promise((resolve) => { if (!this.$slots.header) { resolve({ width: 0, height: 0 }); } this.$uGetRect(".u-index-list__header").then((size) => { resolve(size); }); }); }, // scroll-view的滚动事件 async scrollHandler(e2) { if (this.touching || this.scrolling) return; this.scrolling = true; sleep(10).then(() => { this.scrolling = false; }); let scrollTop = 0; const len = this.children.length; let children = this.children; const header = await this.getHeaderRect(); let top = header.height; this.anchors; children = this.children.map((item, index2) => { const child = { height: item.height, top }; top = top + item.height; return child; }); scrollTop = e2.detail.scrollTop; scrollTop = scrollTop + getPx(this.customNavHeight); for (let i2 = 0; i2 < len; i2++) { const item = children[i2], nextItem = children[i2 + 1]; if (scrollTop <= children[0].top || scrollTop >= children[len - 1].top + children[len - 1].height) { this.activeIndex = -1; break; } else if (!nextItem) { this.activeIndex = len - 1; break; } else if (scrollTop > item.top && scrollTop < nextItem.top) { this.activeIndex = i2; break; } } } } }; function _sfc_render$1g(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createElementBlock( "view", { ref: "u-index-list", class: "u-index-list" }, [ vue.createElementVNode("scroll-view", { scrollTop: $data.scrollTop, scrollIntoView: $data.scrollIntoView, "offset-accuracy": 1, style: vue.normalizeStyle({ maxHeight: $options.addUnit($data.scrollViewHeight) }), "scroll-y": "", onScroll: _cache[0] || (_cache[0] = (...args) => $options.scrollHandler && $options.scrollHandler(...args)), ref: "u-index-list__scroll-view", class: "u-index-list__scroll-view" }, [ _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-index-list__header" }, [ vue.renderSlot(_ctx.$slots, "header", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-index-list__footer" }, [ vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true) ])) : vue.createCommentVNode("v-if", true) ], 44, ["scrollTop", "scrollIntoView"]), vue.createElementVNode( "view", { class: "u-index-list__letter", ref: "u-index-list__letter", style: vue.normalizeStyle({ top: $options.addUnit($data.letterInfo.top), transform: "translateY(-50%)" }), onTouchstart: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.touchStart && $options.touchStart(...args), ["prevent"])), onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.touchMove && $options.touchMove(...args), ["prevent"])), onTouchend: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["prevent"])), onTouchcancel: _cache[4] || (_cache[4] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["prevent"])) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.uIndexList, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-index-list__letter__item", key: index2, style: vue.normalizeStyle({ backgroundColor: $data.activeIndex === index2 ? _ctx.activeColor : "transparent" }) }, [ vue.createElementVNode( "text", { class: "u-index-list__letter__item__index", style: vue.normalizeStyle({ color: $data.activeIndex === index2 ? "#fff" : _ctx.inactiveColor }) }, vue.toDisplayString(item.key || item), 5 /* TEXT, STYLE */ ) ], 4 /* STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 36 /* STYLE, NEED_HYDRATION */ ), vue.createVNode(_component_u_transition, { mode: "fade", show: $data.touching, customStyle: { position: "absolute", right: "50px", top: $options.addUnit($options.indicatorTop, "px"), zIndex: 3 } }, { default: vue.withCtx(() => { var _a2; return [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-index-list__indicator", ["u-index-list__indicator--show"]]), style: vue.normalizeStyle({ height: $options.addUnit($data.indicatorHeight), width: $options.addUnit($data.indicatorHeight) }) }, [ vue.createElementVNode( "text", { class: "u-index-list__indicator__text" }, vue.toDisplayString(((_a2 = $options.uIndexList[$data.activeIndex]) == null ? void 0 : _a2.key) || $options.uIndexList[$data.activeIndex]), 1 /* TEXT */ ) ], 4 /* STYLE */ ) ]; }), _: 1 /* STABLE */ }, 8, ["show", "customStyle"]) ], 512 /* NEED_PATCH */ ); } const uIndexList = /* @__PURE__ */ _export_sfc(_sfc_main$1h, [["render", _sfc_render$1g], ["__scopeId", "data-v-dfefaad1"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-index-list/u-index-list.vue"]]); const __vite_glob_0_50 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uIndexList }, Symbol.toStringTag, { value: "Module" })); const props$N = defineMixin({ props: { // 绑定的值 modelValue: { type: [String, Number], default: () => props$1x.input.value }, // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数 // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序 // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序 // text-文本输入键盘 type: { type: String, default: () => props$1x.input.type }, // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true, // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序 fixed: { type: Boolean, default: () => props$1x.input.fixed }, // 是否禁用输入框 disabled: { type: Boolean, default: () => props$1x.input.disabled }, // 禁用状态时的背景色 disabledColor: { type: String, default: () => props$1x.input.disabledColor }, // 是否显示清除控件 clearable: { type: Boolean, default: false }, // 是否仅在聚焦时显示清除控件 onlyClearableOnFocused: { type: Boolean, default: true }, // 是否密码类型 password: { type: Boolean, default: () => props$1x.input.password }, // 最大输入长度,设置为 -1 的时候不限制最大长度 maxlength: { type: [String, Number], default: () => props$1x.input.maxlength }, // 输入框为空时的占位符 placeholder: { type: String, default: () => props$1x.input.placeholder }, // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ placeholderClass: { type: String, default: () => props$1x.input.placeholderClass }, // 指定placeholder的样式 placeholderStyle: { type: [String, Object], default: () => props$1x.input.placeholderStyle }, // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效 showWordLimit: { type: Boolean, default: () => props$1x.input.showWordLimit }, // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档 // https://uniapp.dcloud.io/component/input // https://uniapp.dcloud.io/component/textarea confirmType: { type: String, default: () => props$1x.input.confirmType }, // 点击键盘右下角按钮时是否保持键盘不收起,H5无效 confirmHold: { type: Boolean, default: () => props$1x.input.confirmHold }, // focus时,点击页面的时候不收起键盘,微信小程序有效 holdKeyboard: { type: Boolean, default: () => props$1x.input.holdKeyboard }, // 自动获取焦点 // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点 focus: { type: Boolean, default: () => props$1x.input.focus }, // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效 autoBlur: { type: Boolean, default: () => props$1x.input.autoBlur }, // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效 disableDefaultPadding: { type: Boolean, default: () => props$1x.input.disableDefaultPadding }, // 指定focus时光标的位置 cursor: { type: [String, Number], default: () => props$1x.input.cursor }, // 输入框聚焦时底部与键盘的距离 cursorSpacing: { type: [String, Number], default: () => props$1x.input.cursorSpacing }, // 光标起始位置,自动聚集时有效,需与selection-end搭配使用 selectionStart: { type: [String, Number], default: () => props$1x.input.selectionStart }, // 光标结束位置,自动聚集时有效,需与selection-start搭配使用 selectionEnd: { type: [String, Number], default: () => props$1x.input.selectionEnd }, // 键盘弹起时,是否自动上推页面 adjustPosition: { type: Boolean, default: () => props$1x.input.adjustPosition }, // 输入框内容对齐方式,可选值为:left|center|right inputAlign: { type: String, default: () => props$1x.input.inputAlign }, // 输入框字体的大小 fontSize: { type: [String, Number], default: () => props$1x.input.fontSize }, // 输入框字体颜色 color: { type: String, default: () => props$1x.input.color }, // 输入框前置图标 prefixIcon: { type: String, default: () => props$1x.input.prefixIcon }, // 前置图标样式,对象或字符串 prefixIconStyle: { type: [String, Object], default: () => props$1x.input.prefixIconStyle }, // 输入框后置图标 suffixIcon: { type: String, default: () => props$1x.input.suffixIcon }, // 后置图标样式,对象或字符串 suffixIconStyle: { type: [String, Object], default: () => props$1x.input.suffixIconStyle }, // 边框类型,surround-四周边框,bottom-底部边框,none-无边框 border: { type: String, default: () => props$1x.input.border }, // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 readonly: { type: Boolean, default: () => props$1x.input.readonly }, // 输入框形状,circle-圆形,square-方形 shape: { type: String, default: () => props$1x.input.shape }, // 用于处理或者过滤输入框内容的方法 formatter: { type: [Function, null], default: () => props$1x.input.formatter }, // 是否忽略组件内对文本合成系统事件的处理 ignoreCompositionEvent: { type: Boolean, default: true }, // 光标颜色 cursorColor: { type: String, default: () => props$1x.input.cursorColor }, // 密码类型可见性切换 passwordVisibilityToggle: { type: Boolean, default: () => props$1x.input.passwordVisibilityToggle } } }); let timeout = null; function debounce(func2, wait2 = 500, immediate = false) { if (timeout !== null) clearTimeout(timeout); if (immediate) { const callNow = !timeout; timeout = setTimeout(() => { timeout = null; }, wait2); if (callNow) typeof func2 === "function" && func2(); } else { timeout = setTimeout(() => { typeof func2 === "function" && func2(); }, wait2); } } const _sfc_main$1g = { name: "u-input", mixins: [mpMixin, mixin, props$N], data() { return { // 清除操作 clearInput: false, // 输入框的值 innerValue: "", // 是否处于获得焦点状态 focused: false, // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化 firstChange: true, // value绑定值的变化是由内部还是外部引起的 changeFromInner: false, // 过滤处理方法 innerFormatter: (value2) => value2, showPassword: false }; }, created() { if (this.formatter) { this.innerFormatter = this.formatter; } }, watch: { modelValue: { immediate: true, handler(newVal, oldVal) { if (this.changeFromInner || this.innerValue === newVal) { this.changeFromInner = false; return; } this.innerValue = newVal; if (this.firstChange === false && this.changeFromInner === false) { this.valueChange(this.innerValue, true); } else { if (!this.firstChange) formValidate(this, "change"); } this.firstChange = false; this.changeFromInner = false; } } }, computed: { // 是否密码 isPassword() { let ret = false; if (this.password) { ret = true; } else if (this.type == "password") { ret = true; } else { ret = false; } if (this.showPassword) { ret = false; } return ret; }, // 是否显示清除控件 isShowClear() { const { clearable, readonly, focused, innerValue, onlyClearableOnFocused } = this; if (!clearable || readonly) { return false; } if (onlyClearableOnFocused) { return !!focused && innerValue !== ""; } else { return innerValue !== ""; } }, // 组件的类名 inputClass() { let classes = [], { border, disabled, shape } = this; border === "surround" && (classes = classes.concat(["u-border", "u-input--radius"])); classes.push(`u-input--${shape}`); border === "bottom" && (classes = classes.concat([ "u-border-bottom", "u-input--no-radius" ])); return classes.join(" "); }, // 组件的样式 wrapperStyle() { const style = {}; if (this.disabled) { style.backgroundColor = this.disabledColor; } if (this.border === "none") { style.padding = "0"; } else { style.paddingTop = "6px"; style.paddingBottom = "6px"; style.paddingLeft = "9px"; style.paddingRight = "9px"; } return deepMerge$1(style, addStyle(this.customStyle)); }, // 输入框的样式 inputStyle() { const style = { color: this.color, fontSize: addUnit(this.fontSize), textAlign: this.inputAlign }; return style; } }, emits: ["update:modelValue", "focus", "blur", "change", "confirm", "clear", "keyboardheightchange", "nicknamereview"], methods: { // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 setFormatter(e2) { this.innerFormatter = e2; }, // 当键盘输入时,触发input事件 onInput(e2) { let { value: value2 = "" } = e2.detail || {}; this.innerValue = value2; this.$nextTick(() => { let formatValue = this.innerFormatter(value2); this.innerValue = formatValue; this.valueChange(formatValue); }); }, // 输入框失去焦点时触发 onBlur(event) { this.$emit("blur", event.detail.value); sleep(150).then(() => { this.focused = false; }); formValidate(this, "blur"); }, // 输入框聚焦时触发 onFocus(event) { this.focused = true; this.$emit("focus"); }, doFocus() { this.$refs["input-native"].focus(); }, doBlur() { this.$refs["input-native"].blur(); }, // 点击完成按钮时触发 onConfirm(event) { this.$emit("confirm", this.innerValue); }, // 键盘高度发生变化的时候触发此事件 // 兼容性:微信小程序2.7.0+、App 3.1.0+ onkeyboardheightchange(event) { this.$emit("keyboardheightchange", event); }, onnicknamereview(event) { this.$emit("nicknamereview", event); }, // 内容发生变化,进行处理 valueChange(value2, isOut = false) { if (this.clearInput) { this.innerValue = ""; this.clearInput = false; } this.$nextTick(() => { if (!isOut || this.clearInput) { this.changeFromInner = true; this.$emit("change", value2); this.$emit("update:modelValue", value2); } formValidate(this, "change"); }); }, // 点击清除控件 onClear() { this.clearInput = true; this.innerValue = ""; this.$nextTick(() => { this.valueChange(""); this.$emit("clear"); }); }, /** * 在安卓nvue上,事件无法冒泡 * 在某些时间,我们希望监听u-from-item的点击事件,此时会导致点击u-form-item内的u-input后 * 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发 */ clickHandler() { if (this.disabled || this.readonly) { uni.hideKeyboard(); } } } }; function _sfc_render$1f(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-input", $options.inputClass]), style: vue.normalizeStyle([$options.wrapperStyle]) }, [ vue.createElementVNode("view", { class: "u-input__content" }, [ _ctx.prefixIcon || _ctx.$slots.prefix ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-input__content__prefix-icon" }, [ vue.renderSlot(_ctx.$slots, "prefix", {}, () => [ vue.createVNode(_component_up_icon, { name: _ctx.prefixIcon, size: "18", customStyle: _ctx.prefixIconStyle }, null, 8, ["name", "customStyle"]) ], true) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-input__content__field-wrapper", onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.createCommentVNode(" 根据uni-app的input组件文档,H5和APP中只要声明了password参数(无论true还是false),type均失效,此时\n 为了防止type=number时,又存在password属性,type无效,此时需要设置password为undefined\n "), vue.createElementVNode("input", { ref: "input-native", class: "u-input__content__field-wrapper__field", style: vue.normalizeStyle([$options.inputStyle]), type: $data.showPassword && "password" == _ctx.type ? "text" : _ctx.type, focus: _ctx.focus, cursor: _ctx.cursor, value: $data.innerValue, "auto-blur": _ctx.autoBlur, disabled: _ctx.disabled || _ctx.readonly, maxlength: _ctx.maxlength, placeholder: _ctx.placeholder, "placeholder-style": _ctx.placeholderStyle, "placeholder-class": _ctx.placeholderClass, "confirm-type": _ctx.confirmType, "confirm-hold": _ctx.confirmHold, "hold-keyboard": _ctx.holdKeyboard, "cursor-color": _ctx.cursorColor, "cursor-spacing": _ctx.cursorSpacing, "adjust-position": _ctx.adjustPosition, "selection-end": _ctx.selectionEnd, "selection-start": _ctx.selectionStart, password: $options.isPassword, ignoreCompositionEvent: _ctx.ignoreCompositionEvent, onInput: _cache[0] || (_cache[0] = (...args) => $options.onInput && $options.onInput(...args)), onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)), onFocus: _cache[2] || (_cache[2] = (...args) => $options.onFocus && $options.onFocus(...args)), onConfirm: _cache[3] || (_cache[3] = (...args) => $options.onConfirm && $options.onConfirm(...args)), onKeyboardheightchange: _cache[4] || (_cache[4] = (...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args)), onNicknamereview: _cache[5] || (_cache[5] = (...args) => $options.onnicknamereview && $options.onnicknamereview(...args)) }, null, 44, ["type", "focus", "cursor", "value", "auto-blur", "disabled", "maxlength", "placeholder", "placeholder-style", "placeholder-class", "confirm-type", "confirm-hold", "hold-keyboard", "cursor-color", "cursor-spacing", "adjust-position", "selection-end", "selection-start", "password", "ignoreCompositionEvent"]) ]), $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-input__content__clear", onClick: _cache[7] || (_cache[7] = (...args) => $options.onClear && $options.onClear(...args)) }, [ vue.createVNode(_component_up_icon, { name: "close", size: "11", color: "#ffffff", customStyle: "line-height: 12px" }) ])) : vue.createCommentVNode("v-if", true), (_ctx.type == "password" || _ctx.password) && _ctx.passwordVisibilityToggle ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-input__content__subfix-password-shower" }, [ vue.createVNode(_component_up_icon, { onClick: _cache[8] || (_cache[8] = ($event) => $data.showPassword = !$data.showPassword), name: $data.showPassword ? "eye-off" : "eye-fill", size: "18" }, null, 8, ["name"]) ])) : vue.createCommentVNode("v-if", true), _ctx.suffixIcon || _ctx.$slots.suffix ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "u-input__content__subfix-icon" }, [ vue.renderSlot(_ctx.$slots, "suffix", {}, () => [ vue.createVNode(_component_up_icon, { name: _ctx.suffixIcon, size: "18", customStyle: _ctx.suffixIconStyle }, null, 8, ["name", "customStyle"]) ], true) ])) : vue.createCommentVNode("v-if", true) ]) ], 6 /* CLASS, STYLE */ ); } const uInput = /* @__PURE__ */ _export_sfc(_sfc_main$1g, [["render", _sfc_render$1f], ["__scopeId", "data-v-df79975b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-input/u-input.vue"]]); const __vite_glob_0_51 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uInput }, Symbol.toStringTag, { value: "Module" })); const props$M = defineMixin({ props: { // 键盘的类型,number-数字键盘,card-身份证键盘 mode: { type: String, default: () => props$1x.numberKeyboard.value }, // 是否显示键盘的"."符号 dotDisabled: { type: Boolean, default: () => props$1x.numberKeyboard.dotDisabled }, // 是否打乱键盘按键的顺序 random: { type: Boolean, default: () => props$1x.numberKeyboard.random } } }); const _sfc_main$1f = { name: "u-number-keyboard", mixins: [mpMixin, mixin, props$M], data() { return { backspace: "backspace", // 退格键内容 dot: ".", // 点 timer: null, // 长按多次删除的事件监听 cardX: "X" // 身份证的X符号 }; }, computed: { // 键盘需要显示的内容 numList() { if (this.dotDisabled && this.mode == "number") { if (!this.random) { return [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]; } else { return randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]); } } else if (!this.dotDisabled && this.mode == "number") { if (!this.random) { return [1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0]; } else { return randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.dot, 0]); } } else if (this.mode == "card") { if (!this.random) { return [1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0]; } else { return randomArray([1, 2, 3, 4, 5, 6, 7, 8, 9, this.cardX, 0]); } } }, // 按键的样式,在非乱序&&数字键盘&&不显示点按钮时,index为9时,按键占位两个空间 itemStyle() { return (index2) => { let style = {}; if (this.mode == "number" && this.dotDisabled && index2 == 9) style.width = "464rpx"; return style; }; }, // 是否让按键显示灰色,只在非乱序&&数字键盘&&且允许点按键的时候 btnBgGray() { return (index2) => { if (!this.random && index2 == 9 && (this.mode != "number" || this.mode == "number" && !this.dotDisabled)) return true; else return false; }; } }, created() { }, emits: ["backspace", "change"], methods: { // 点击退格键 backspaceClick() { this.$emit("backspace"); clearInterval(this.timer); this.timer = null; this.timer = setInterval(() => { this.$emit("backspace"); }, 250); }, clearTimer() { clearInterval(this.timer); this.timer = null; }, // 获取键盘显示的内容 keyboardClick(val) { if (!this.dotDisabled && val != this.dot && val != this.cardX) val = Number(val); this.$emit("change", val); } } }; function _sfc_render$1e(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-keyboard", onTouchmove: _cache[2] || (_cache[2] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.numList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-keyboard__button-wrapper", key: index2 }, [ vue.createElementVNode("view", { class: "u-keyboard__button-wrapper__button", style: vue.normalizeStyle([$options.itemStyle(index2)]), onClick: ($event) => $options.keyboardClick(item), "hover-class": "u-hover-class", "hover-stay-time": 200 }, [ vue.createElementVNode( "text", { class: "u-keyboard__button-wrapper__button__text" }, vue.toDisplayString(item), 1 /* TEXT */ ) ], 12, ["onClick"]) ]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode("view", { class: "u-keyboard__button-wrapper" }, [ vue.createElementVNode( "view", { class: "u-keyboard__button-wrapper__button u-keyboard__button-wrapper__button--gray", "hover-class": "u-hover-class", "hover-stay-time": 200, onTouchstart: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.backspaceClick && $options.backspaceClick(...args), ["stop"])), onTouchend: _cache[1] || (_cache[1] = (...args) => $options.clearTimer && $options.clearTimer(...args)) }, [ vue.createVNode(_component_up_icon, { name: "backspace", color: "#303133", size: "28" }) ], 32 /* NEED_HYDRATION */ ) ]) ], 32 /* NEED_HYDRATION */ ); } const __easycom_0$3 = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["render", _sfc_render$1e], ["__scopeId", "data-v-d73731be"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-number-keyboard/u-number-keyboard.vue"]]); const __vite_glob_0_71 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$3 }, Symbol.toStringTag, { value: "Module" })); const props$L = defineMixin({ props: { // 键盘的类型,number-数字键盘,card-身份证键盘,car-车牌号键盘 mode: { type: String, default: () => props$1x.keyboard.mode }, // 是否显示键盘的"."符号 dotDisabled: { type: Boolean, default: () => props$1x.keyboard.dotDisabled }, // 是否显示顶部工具条 tooltip: { type: Boolean, default: () => props$1x.keyboard.tooltip }, // 是否显示工具条中间的提示 showTips: { type: Boolean, default: () => props$1x.keyboard.showTips }, // 工具条中间的提示文字 tips: { type: String, default: () => props$1x.keyboard.tips }, // 是否显示工具条左边的"取消"按钮 showCancel: { type: Boolean, default: () => props$1x.keyboard.showCancel }, // 是否显示工具条右边的"完成"按钮 showConfirm: { type: Boolean, default: () => props$1x.keyboard.showConfirm }, // 是否打乱键盘按键的顺序 random: { type: Boolean, default: () => props$1x.keyboard.random }, // 是否开启底部安全区适配,开启的话,会在iPhoneX机型底部添加一定的内边距 safeAreaInsetBottom: { type: Boolean, default: () => props$1x.keyboard.safeAreaInsetBottom }, // 是否允许通过点击遮罩关闭键盘 closeOnClickOverlay: { type: Boolean, default: () => props$1x.keyboard.closeOnClickOverlay }, // 控制键盘的弹出与收起 show: { type: Boolean, default: () => props$1x.keyboard.show }, // 是否显示遮罩,某些时候数字键盘时,用户希望看到自己的数值,所以可能不想要遮罩 overlay: { type: Boolean, default: () => props$1x.keyboard.overlay }, // z-index值 zIndex: { type: [String, Number], default: () => props$1x.keyboard.zIndex }, // 取消按钮的文字 cancelText: { type: String, default: () => props$1x.keyboard.cancelText }, // 确认按钮的文字 confirmText: { type: String, default: () => props$1x.keyboard.confirmText }, // 输入一个中文后,是否自动切换到英文 autoChange: { type: Boolean, default: () => props$1x.keyboard.autoChange } } }); const _sfc_main$1e = { name: "u-keyboard", data() { return {}; }, mixins: [mpMixin, mixin, props$L], emits: ["change", "close", "confirm", "cancel", "backspace"], methods: { change(e2) { this.$emit("change", e2); }, // 键盘关闭 popupClose() { this.$emit("close"); }, // 输入完成 onConfirm() { this.$emit("confirm"); }, // 取消输入 onCancel() { this.$emit("cancel"); }, // 退格键 backspace() { this.$emit("backspace"); } } }; function _sfc_render$1d(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_number_keyboard = resolveEasycom(vue.resolveDynamicComponent("u-number-keyboard"), __easycom_0$3); const _component_u_car_keyboard = resolveEasycom(vue.resolveDynamicComponent("u-car-keyboard"), __easycom_1$2); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2); return vue.openBlock(), vue.createBlock(_component_u_popup, { overlay: _ctx.overlay, closeOnClickOverlay: _ctx.closeOnClickOverlay, mode: "bottom", popup: false, show: _ctx.show, safeAreaInsetBottom: _ctx.safeAreaInsetBottom, onClose: $options.popupClose, zIndex: _ctx.zIndex, customStyle: { backgroundColor: "rgb(214, 218, 220)" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-keyboard" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), _ctx.tooltip ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-keyboard__tooltip" }, [ vue.createElementVNode("view", { "hover-class": "u-hover-class", "hover-stay-time": 100 }, [ _ctx.showCancel ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-keyboard__tooltip__item u-keyboard__tooltip__cancel", onClick: _cache[0] || (_cache[0] = (...args) => $options.onCancel && $options.onCancel(...args)) }, vue.toDisplayString(_ctx.showCancel && _ctx.cancelText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", null, [ _ctx.showTips ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-keyboard__tooltip__item u-keyboard__tooltip__tips" }, vue.toDisplayString(_ctx.tips ? _ctx.tips : _ctx.mode == "number" ? "数字键盘" : _ctx.mode == "card" ? "身份证键盘" : "车牌号键盘"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { "hover-class": "u-hover-class", "hover-stay-time": 100 }, [ _ctx.showConfirm ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, onClick: _cache[1] || (_cache[1] = (...args) => $options.onConfirm && $options.onConfirm(...args)), class: "u-keyboard__tooltip__item u-keyboard__tooltip__submit", "hover-class": "u-hover-class" }, vue.toDisplayString(_ctx.showConfirm && _ctx.confirmText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ])) : vue.createCommentVNode("v-if", true), _ctx.mode == "number" || _ctx.mode == "card" ? (vue.openBlock(), vue.createBlock(_component_u_number_keyboard, { key: 1, random: _ctx.random, onBackspace: $options.backspace, onChange: $options.change, mode: _ctx.mode, dotDisabled: _ctx.dotDisabled }, null, 8, ["random", "onBackspace", "onChange", "mode", "dotDisabled"])) : (vue.openBlock(), vue.createBlock(_component_u_car_keyboard, { key: 2, random: _ctx.random, autoChange: _ctx.autoChange, onBackspace: $options.backspace, onChange: $options.change }, null, 8, ["random", "autoChange", "onBackspace", "onChange"])) ]) ]), _: 3 /* FORWARDED */ }, 8, ["overlay", "closeOnClickOverlay", "show", "safeAreaInsetBottom", "onClose", "zIndex", "customStyle"]); } const uKeyboard = /* @__PURE__ */ _export_sfc(_sfc_main$1e, [["render", _sfc_render$1d], ["__scopeId", "data-v-5c3a4793"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-keyboard/u-keyboard.vue"]]); const __vite_glob_0_52 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uKeyboard }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$1d = { name: "u-lazy-load", props: { index: { type: [Number, String] }, // 要显示的图片 image: { type: String, default: "" }, // 图片裁剪模式 imgMode: { type: String, default: "widthFix" }, // 占位图片路径 loadingImg: { type: String, default: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM0QjNBQjkyQUQ2MTFFQTlCNUQ4RTIzNDE5RUIxNjciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM0QjNBQkEyQUQ2MTFFQTlCNUQ4RTIzNDE5RUIxNjciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzRCM0FCNzJBRDYxMUVBOUI1RDhFMjM0MTlFQjE2NyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzRCM0FCODJBRDYxMUVBOUI1RDhFMjM0MTlFQjE2NyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtRHfPcAAAAzUExURZWVldfX18PDw62trZubm9zc3Li4uKGhoebm5tLS0uHh4c3Nzaenp729vcjIyLKysuvr6141L40AAAcXSURBVHja7NzZlqpGAEBR5lG0//9rIw7IJKJi4or7PGTdtN10wr5SVAEGf/qqArsAiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAIiIAAERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAgAgJEQIAICBABERAg+nmQFMi5Jis+sIniED23jSzIgLTtg2D//iYme/8QBM/9lQ+CAEhbNLM3N9hEHAThX7GPCiBfAxK1b51kD+R7QMLjXg7iCsgWIPUh7pfVozG791oeBPngm48G583uW5GkBvI+SBaM2xXDn1oqum423bX/mgF5FySc2cv93Voug9TdZotsggnkBZB2NzbhrSY5HnoG07jei8dvzsJB/c3W60SALILE46+WCztsbhPR7R2VJq0ukEcT49nyy8QhaKcRa3fYHZD4+ufqOJAcgDz8/59vtw1I3QP5K6JsOG0vm3hce4I8LQp/BaRZGJC3AAn7IKOKXbC+7EdA5vdmmVwOLksgRThqOqiH4XEGsht+peoPUE8U/jJIO5OLH4GEwUslV5G0PTBG5Uiw/Y2jyigO3l9HAHKv9PYb82LloH74dZBoBUgar+l48NsNvtD0fkez9iwrAvIYZDRCl+Xs149Hm/KZmQ+QjUCiO1ei4ru7EsgnQYrkznlQb7thCuRfAzlOAPN72427P4VA/i2Q/DKT/Ls/VR8fvIBsDZIuz7TPF6TCbnk4GJkB2RokejTjuE7/unlgCuSTIO0Cy+Plp6vDfnQlBchy8QtjSHVd3EgmK1bHLm+H6+nXYbz2DuQRSPnqoL7vvq0u70on4zvxgCyWD3b9UyDVdW24PaWaiGTnFZJwPIQAebDpIKheBIm7n124ZthMJipAlkqHO+IZkP1tbfzOJark/A7MgKyvvl60fRqkvXfhuow+t9+q00+0/yyBrK8ZngOtBzldhw2X9tvpNGty0gvkmbPeJ0Cy/r09s/stbmfo0yMWkEdjevgKyOn2t2pxv7UXoibTdCDLje9/Ww1ymqzn87dbp92242ZmMRjI8hASvwKSLq4udqN6ksw8nxXN3tszD9L8Gkg+2mFrQYql5az4tvFj5xOx4VwnSdeBtGdyPwUytxK77pBVlNHdO7OK3rh/eTPUvdutT3fO52tuHMqD4N7llv8pyOQQ//w19YVDfX27+Sfuby9/6nau4pdA8vEdOZuChEH/quHt0Jg+IRJ/5+PrHwKZXfjbDiS73Zo7mu5UkzX7uTsXe0e/7nC3ePf1O69+BUg2XDfZCqSqOu7rGVf8cHBe8zhC2b61dtUHXv0OkGo6ZL4JkpbRYXdUaFevivx2M/1GIOctNh949TtAoumQ+TpIHMX54CJu+8BDd8FkE5BqcZh/59XvAClmTvKfB0nDqIlHo3T70SftyW1eX9dXtgQJqs1f/Q6QaOa/7wmQKtxH8eiGoCRuovODIO3VxOMmruZbHrLyD7z6DSDtGyT7ew1kf9hNn07c986JTovzzem0Id9wUG+Vk/IDr34DSNR7huZJkMFT6vEhqrPx/j5cnlZML8N6/PAzh9Y99Flm5Yde/c9BquDOkvkKkMP58dA4qi9vivE8JOvGz/j8FokfPpr288+pH2ZPOZrLmeGD+7KOh6dqYWJ48ki7yUg0tz0go/fv/LLddfV3sgOLJyaGPY/zrSlh1a36Arkzoue9CyG35ze6E6/dzO2Ga0EGHqdRJIkfn9/8OEjTW8Vq91ZWh39FeehWA7Nu9ft8CpUEk1WWOyDF0OPyEU2Pnzf/bZC0P6IPzmAvu7KauQBVrgKpJ0tG2arHzX8e5Pb3PezNs/PrX+3JMyCLn9XXf37tPFHvt09WfCDDjx+yyn1/p1V11j7GnB/q3leLuVva79S/tzed+db08YpF4uOZtmz/9oXWMq6BCAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAERECACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiACAgQAQEiIEAEBIiAALELvqt/BBgACqVeUBXxcCkAAAAASUVORK5CYII=" }, // 加载失败的错误占位图 errorImg: { type: String, default: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdDMjhENDYyQUQ2MTFFQTlDQ0VBODgxQjFFOEEyMEMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdDMjhENDcyQUQ2MTFFQTlDQ0VBODgxQjFFOEEyMEMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0MyOEQ0NDJBRDYxMUVBOUNDRUE4ODFCMUU4QTIwQyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0MyOEQ0NTJBRDYxMUVBOUNDRUE4ODFCMUU4QTIwQyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhLwhikAAAAzUExURZWVldfX162trcPDw5ubm7i4uNzc3Obm5s3NzaGhoeHh4cjIyKenp9LS0r29vbKysuvr67sDMEkAAAlpSURBVHja7NzpYqMgAIVRUVHc8/5PO66R1WAbOzX97q+ZtDEpR0AWTR7kVyWhCAAhgABCAAGEAAIIAQQQAggBBBACCCAEEEAIIIAQQAgggBBAACGAAEIAAYQAQgABhAACCAEEEAIIIAQQAgggBBBACCCAEEAAIYAQQAAhgABCAAGEAAIIAYQAAggBBBACCCAEEEAIIAQQQAgggBBAACGAAEIAIYAAQgABhAACCAEEEAIIAQQQAgggBBBACCCAEEAAIYAQQAAhgABCAAGEAAIIAYQAAggBBBACCCAEEEAIIAQQQAgggBBAACGAAEIAIYAAQgABhAACCAEEEAIIAQQQAgggBBBACCCAEEAIIIAQQAAhgABCAAGEAEIAAYQAAggBBBACCCAEEAIIIAQQQAgggBBAACGAEEAAIYAAsqeX5QWHKIcs/Ptl03lfL4zDFPWfBGmSpPn+IZzSH5KkCL5B+n+oklwz6Iz//R2QzFOabzhEmiRirAmZt/bl0w/dpMbLqeeo4wEdpC7zR5WAPKziHKtO7ql+ReKvIa9BxgNaL5ZtEkpeAGIVp5jKJa09xVo9vgSSzQcszdYvmOqjQNSQ6pHK6rO1n1Xj32788miwHLaZz1Tl9i/yayDlYJ/60/+lp8GSY7OY1B8E4p55bWmfquFk22GLuUUxi78cX+m+BjL2GLkhMrV+/muS6Sfic0CEp5T1Yu2OQdTzsKV0MJV73KVjroyTffxfuv5Tf3fd6iLT9wz8YdVHgUzF2Is9/Xhi5sYJqP1w/GUpjOiHVbaI0w2L+pg3GZzvtokcgHxWDXHaiy78l3sPke01qphamT5c+dqyeAGSumdL/mkggauTam0e3L/mPEiqtzKDbl0Z1Wn8xOa4ySo8X/7TQIJnY/seEKWf12UmC72CKP9xYjr19RPT7NNA+oMO+R0gwmlotAry+C6I0f59ch8yXVQOr0BKYcXt1IUYRyCt+Ur9HGsrQKI79WY9sY9ARPKlzFOFdb41ioD8b5Bp+mqeeRKAxINkESBFGpOpKhgv9OuYpH8A8l4Qa3qp60Kl2/k+rG2sWafuuyCBafb2j4JkgZUob3nWcmicpkxEgmTLLGejTxnWSWCi8lPmsk6DlIHFJv24ojiYyYoGacwL8zXTLEAVaDI/Ybb3NIgKDSv2oXpmHkvNs+PTpMASEdlk7fOZeRk37fwJ6yGnQarQsGIfqqcvx43rTOXY6jf7uKXdRzdLDRPbjIrx1cIj3Kr4KyBFezzgUGuR5893qkOQ19fR2uVBaU+r16LphJNOiatK7PeBZK/Kb+tUn71rcQjSvARpghfH/yG/D2RetTuI3N5QrMWdP46brP7FmKZ//CGQ9At9SL01DLkzY/Vs8Z97fQZ7gelw7jHqCz+/Wile5J4g3Vc79eb5a6oLSue+Ve83gaSv2jp5PxCzjzwFUm9zw9MllSMil1kS4d2E9SaQ1xNo9wMxx0+nQNLnew/WDHvveMAHYm08mofl3TFI/8pD3Q6kMAv6DIi2jTCwRJUvNdDYrrJum9oHhusCbWALonwxBRk1vXMnEGWuT5wAmfYuVGUYpJ7fUZujCN92hvzwWlrFgxSfANKb10DxIMbShnfrynyZZV30imA7P43ArXXHbvBVkTCIuGy25AdBrHmNeBCpL214QdLp9LZarG3IMWrmW0ehtuO7F2PS09UcgqS3B7FKPhpknrStD0HGF/vQRne37LwLG8EbHT4WxN7/Fg0yD9Yr/3br4nnstA+0Il6QxzdBmg8A6a2/IRbkcK9h/uzV8zywF/oSkOyageCPglRWgcWClHnEzs9q/t/SENVXgFijlsq3VtXdCsRp4qObrLLLgjuzSq3fX89ZZW6AfxNIzF6X9FYgThN/fk093KkvHX/hbWd+DqS/FUhlf+G3gohEXzVs3g9iDluWoaW8fL73QhB34u+tIHIf19nLuF4Q98a09Eynnl56q+ePgEhnX+dbQOp6H5XnJ0ACd8dFgkwf12nTOTcEqd2pom+CFF02TIPw6dKmrLS5qOtBpo8b5quUtrwrSGbuqPkeSJqllTFHO02NPxdMrm+y5LKdWyWXjw4vA5nGEtnjuyCFyHqNYvEolzmASm3zK1Eg5zr13lhqV1tlksnVw8Pkwgri7O07AVKLJkutRYw87bPlRpBpNXE8xGb+fhBlvEGrGPLqViu5sILIx9dAmqF1705sxF4M8+R8P5dOdQwi12fMnATpjJ2JSt/POIvU9wPJEs/jduJAjLvU0yFT0i64Yb1bsVi79dA4pEy3TzoHMq2O7Re4vXm5O9+l290NpE4CU+YRIMNye2iaqbVS2AUnn2fsekthYKReVNutVedA5juttyIXrT38mOds+ps9DWhwL7GWc61/DVKPzVN9UHDarf1icU98IOU8tm6L031Iq63t1tKzj3fe/FCpO4F0/i0Z2+yvA1KeGBjqj1qYx8/zoxpKZ1Yl367I1k+sfcft/QPy9csXy/32qX1qLZsrryG5BGQaRj0vc/b7N54XXq293TCLB5HO42Fy517obW19b+qjl3CHp0fdLJcWvmdy1etESi/uAdJrs1hTaUklHuW8qSDdC3UfXVR5cnD3rAFSSqtFb7z7eapErx7rC739jCXfbK3aWiipjXo8UbmxXPa7QQq9R289j2Gr88N7Ag5AlHPRKc37pNZv0CZtX1tVMG6rm8qW1/KlCgQvcMss933ybwXZz3dReW5yce4ByZtHFIhwT9kmjxg8BzbKDUe1PB9edBJqSN7/KM1LmqyuMZ5BpeTUw1aD/uDI0relPfSHa/Wn8Pxq1BNfxy/h3IdwOJqIKumb9CHvTqMefyY82RoQAgggBBBACCCAEEAAIYAQQAAhgABCAAGEAAIIAYQAAggBBBACCCAEEEAIIAQQQAgggBBAACGAAEIAIYAAQgABhAACCAEEEAIIAQQQAgggBBBACCCAEEAIIIAQQAAhgABCAAGEAEIAAYQAAggBBBACCCAEEAIIIAQQQAgggBBAACGAEEAAIYAAQgABhAACCAEEEAIIAQQQAgggBBBACCCAEEAIIIAQQAAhgABCAAGEAEIAAYQAAggBBBACCCAEEAIIIAQQQAgggBBAACGAEEAAIYAAQgABhAACCAGEAAIIAQQQAgggBBBACCAEEEAIIIAQQAAhgABCACGAAEIAAYQAAggBBBACCAEEEAIIIAQQQAggfyL/BBgA8PgLdH0TBtkAAAAASUVORK5CYII=" }, // 图片进入可见区域前多少像素时,单位rpx,开始加载图片 // 负数为图片超出屏幕底部多少距离后触发懒加载,正数为图片顶部距离屏幕底部多少距离时触发(图片还没出现在屏幕上) threshold: { type: [Number, String], default: 100 }, // 淡入淡出动画的过渡时间 duration: { type: [Number, String], default: 500 }, // 渡效果的速度曲线,各个之间差别不大,因为这是淡入淡出,且时间很短,不是那些变形或者移动的情况,会明显 // linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n); effect: { type: String, default: "ease-in-out" }, // 是否使用过渡效果 isEffect: { type: Boolean, default: true }, // 圆角值 borderRadius: { type: [Number, String], default: 0 }, // 图片高度,单位rpx height: { type: [Number, String], default: "200" } }, data() { return { isShow: false, opacity: 1, time: this.duration, loadStatus: "", // 默认是懒加载中的状态 isError: false, // 图片加载失败 elIndex: guid() }; }, computed: { // 将threshold从rpx转为px getThreshold() { let thresholdPx = uni.upx2px(Math.abs(this.threshold)); return this.threshold < 0 ? -thresholdPx : thresholdPx; }, // 计算图片的高度,可能为auto,带%,或者直接数值 imgHeight() { return addUnit(this.height); } }, created() { this.observer = {}; }, watch: { isShow(nVal) { if (!this.isEffect) return; this.time = 0; this.opacity = 0; setTimeout(() => { this.time = this.duration; this.opacity = 1; }, 30); }, // 图片路径发生变化时,需要重新标记一些变量,否则会一直卡在某一个状态,比如isError image(n2) { if (!n2) { this.isError = true; } else { this.init(); this.isError = false; } } }, emits: ["click", "load", "error"], methods: { // 用于重新初始化 init() { this.isError = false; this.loadStatus = ""; }, // 点击图片触发的事件,loadlazy-还是懒加载中状态,loading-图片正在加载,loaded-图片加加载完成 clickImg() { if (this.isShow == false) ; else if (this.isError == true) ; else ; this.$emit("click", this.index); }, // 图片加载完成事件,可能是加载占位图时触发,也可能是加载真正的图片完成时触发,通过isShow区分 imgLoaded() { if (this.loadStatus == "") { this.loadStatus = "lazyed"; } else if (this.loadStatus == "lazyed") { this.loadStatus = "loaded"; this.$emit("load", this.index); } }, // 错误的图片加载完成 errorImgLoaded() { this.$emit("error", this.index); }, // 图片加载失败 loadError() { this.isError = true; }, disconnectObserver(observerName) { const observer = this[observerName]; observer && observer.disconnect(); } }, beforeUnmount() { }, mounted() { this.$nextTick(() => { uni.$once("uOnReachBottom", () => { if (!this.isShow) this.isShow = true; }); }); setTimeout(() => { const contentObserver = uni.createIntersectionObserver(this); contentObserver.relativeToViewport({ bottom: this.getThreshold }).observe(".u-lazy-item-" + this.elIndex, (res) => { if (res.intersectionRatio > 0) { this.isShow = true; if (!this.image) { this.loadError(); } this.disconnectObserver("contentObserver"); } }); this.contentObserver = contentObserver; }, 30); } }; function _sfc_render$1c(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-wrap", "u-lazy-item-" + $data.elIndex]), style: vue.normalizeStyle({ opacity: Number($data.opacity), borderRadius: $props.borderRadius + "rpx", // 因为time值需要改变,所以不直接用duration值(不能改变父组件prop传过来的值) transition: `opacity ${$data.time / 1e3}s ease-in-out` }) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass("u-lazy-item-" + $data.elIndex) }, [ !$data.isError ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, style: vue.normalizeStyle({ borderRadius: $props.borderRadius + "rpx", height: $options.imgHeight }), class: "u-lazy-item", src: $data.isShow ? $props.image : $props.loadingImg, mode: $props.imgMode, onLoad: _cache[0] || (_cache[0] = (...args) => $options.imgLoaded && $options.imgLoaded(...args)), onError: _cache[1] || (_cache[1] = (...args) => $options.loadError && $options.loadError(...args)), onClick: _cache[2] || (_cache[2] = (...args) => $options.clickImg && $options.clickImg(...args)) }, null, 44, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("image", { key: 1, style: vue.normalizeStyle({ borderRadius: $props.borderRadius + "rpx", height: $options.imgHeight }), class: "u-lazy-item error", src: $props.errorImg, mode: $props.imgMode, onLoad: _cache[3] || (_cache[3] = (...args) => $options.errorImgLoaded && $options.errorImgLoaded(...args)), onClick: _cache[4] || (_cache[4] = (...args) => $options.clickImg && $options.clickImg(...args)) }, null, 44, ["src", "mode"])) ], 2 /* CLASS */ ) ], 6 /* CLASS, STYLE */ ); } const uLazyLoad = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["render", _sfc_render$1c], ["__scopeId", "data-v-8b9e8d2e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-lazy-load/u-lazy-load.vue"]]); const __vite_glob_0_53 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uLazyLoad }, Symbol.toStringTag, { value: "Module" })); const props$K = defineMixin({ props: { // 激活部分的颜色 activeColor: { type: String, default: () => props$1x.lineProgress.activeColor }, inactiveColor: { type: String, default: () => props$1x.lineProgress.color }, // 进度百分比,数值 percentage: { type: [String, Number], default: () => props$1x.lineProgress.inactiveColor }, // 是否在进度条内部显示百分比的值 showText: { type: Boolean, default: () => props$1x.lineProgress.showText }, // 进度条的高度,单位px height: { type: [String, Number], default: () => props$1x.lineProgress.height }, // 是否从右往左加载 fromRight: { type: Boolean, default: () => props$1x.lineProgress.fromRight } } }); const _sfc_main$1c = { name: "u-line-progress", mixins: [mpMixin, mixin, props$K], data() { return { lineWidth: 0 }; }, watch: { percentage(n2) { this.resizeProgressWidth(); } }, computed: { progressStyle() { let style = {}; style.width = this.lineWidth; style.backgroundColor = this.activeColor; style.height = addUnit(this.height); if (this.fromRight) { style.right = 0; } else { style.left = 0; } return style; }, innserPercentage() { return range$1(0, 100, this.percentage); } }, mounted() { this.init(); }, methods: { addStyle, addUnit, init() { sleep(20).then(() => { this.resizeProgressWidth(); }); }, getProgressWidth() { return this.$uGetRect(".u-line-progress__background"); }, resizeProgressWidth() { this.getProgressWidth().then((size) => { const { width } = size; this.lineWidth = width * this.innserPercentage / 100 + "px"; }); } } }; function _sfc_render$1b(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-line-progress", style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode( "view", { class: "u-line-progress__background", ref: "u-line-progress__background", style: vue.normalizeStyle([{ backgroundColor: _ctx.inactiveColor, height: $options.addUnit(_ctx.height) }]) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: "u-line-progress__line", style: vue.normalizeStyle([$options.progressStyle]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ _ctx.showText && _ctx.percentage >= 10 ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-line-progress__text" }, vue.toDisplayString($options.innserPercentage + "%"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ ); } const uLineProgress = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["render", _sfc_render$1b], ["__scopeId", "data-v-eeee7090"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-line-progress/u-line-progress.vue"]]); const __vite_glob_0_54 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uLineProgress }, Symbol.toStringTag, { value: "Module" })); const props$J = defineMixin({ props: { // 文字颜色 color: { type: String, default: () => props$1x.link.color }, // 字体大小,单位px fontSize: { type: [String, Number], default: () => props$1x.link.fontSize }, // 是否显示下划线 underLine: { type: Boolean, default: () => props$1x.link.underLine }, // 要跳转的链接 href: { type: String, default: () => props$1x.link.href }, // 小程序中复制到粘贴板的提示语 mpTips: { type: String, default: () => props$1x.link.mpTips }, // 下划线颜色 lineColor: { type: String, default: () => props$1x.link.lineColor }, // 超链接的问题,不使用slot形式传入,是因为nvue下无法修改颜色 text: { type: String, default: () => props$1x.link.text } } }); const _sfc_main$1b = { name: "u-link", mixins: [mpMixin, mixin, props$J], computed: { linkStyle() { const style = { color: this.color, fontSize: addUnit(this.fontSize), // line-height设置为比字体大小多2px lineHeight: addUnit(getPx(this.fontSize) + 2), textDecoration: this.underLine ? "underline" : "none" }; return style; } }, emits: ["click"], methods: { addStyle, openLink() { plus.runtime.openURL(this.href); this.$emit("click"); } } }; function _sfc_render$1a(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "text", { class: "u-link", onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.openLink && $options.openLink(...args), ["stop"])), style: vue.normalizeStyle([$options.linkStyle, $options.addStyle(_ctx.customStyle)]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ ); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$1b, [["render", _sfc_render$1a], ["__scopeId", "data-v-12f6646d"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-link/u-link.vue"]]); const __vite_glob_0_56 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$2 }, Symbol.toStringTag, { value: "Module" })); const props$I = defineMixin({ props: { // 用于滚动到指定item anchor: { type: [String, Number], default: () => props$1x.listItem.anchor } } }); const _sfc_main$1a = { name: "u-list-item", mixins: [mpMixin, mixin, props$I], data() { return { // 节点信息 rect: {}, index: 0, show: true, sys: getWindowInfo() }; }, computed: {}, inject: ["uList"], watch: { "uList.innerScrollTop"(n2) { const preLoadScreen = this.uList.preLoadScreen; const windowHeight = this.sys.windowHeight; if (n2 <= windowHeight * preLoadScreen) { this.parent.updateOffsetFromChild(0); } else if (this.rect.top <= n2 - windowHeight * preLoadScreen) { this.parent.updateOffsetFromChild(this.rect.top); } } }, created() { this.parent = {}; }, mounted() { this.init(); }, methods: { init() { this.updateParentData(); this.index = this.parent.children.indexOf(this); this.resize(); }, updateParentData() { this.getParentData("u-list"); }, resize() { this.queryRect(`u-list-item-${this.anchor}`).then((size) => { const lastChild = this.parent.children[this.index - 1]; this.rect = size; const preLoadScreen = this.uList.preLoadScreen; const windowHeight = this.sys.windowHeight; if (lastChild) { this.rect.top = lastChild.rect.top + lastChild.rect.height; } if (size.top >= this.uList.innerScrollTop + (1 + preLoadScreen) * windowHeight) this.show = false; }); }, // 查询元素尺寸 queryRect(el) { return new Promise((resolve) => { this.$uGetRect(`.${el}`).then((size) => { resolve(size); }); }); } } }; function _sfc_render$19(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-list-item", [`u-list-item-${_ctx.anchor}`]]), ref: `u-list-item-${_ctx.anchor}`, anchor: `u-list-item-${_ctx.anchor}` }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 10, ["anchor"]); } const uListItem = /* @__PURE__ */ _export_sfc(_sfc_main$1a, [["render", _sfc_render$19], ["__scopeId", "data-v-0c3fc59c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-list-item/u-list-item.vue"]]); const __vite_glob_0_57 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uListItem }, Symbol.toStringTag, { value: "Module" })); const props$H = defineMixin({ props: { // 控制是否出现滚动条,仅nvue有效 showScrollbar: { type: Boolean, default: () => props$1x.list.showScrollbar }, // 距底部多少时触发scrolltolower事件 lowerThreshold: { type: [String, Number], default: () => props$1x.list.lowerThreshold }, // 距顶部多少时触发scrolltoupper事件,非nvue有效 upperThreshold: { type: [String, Number], default: () => props$1x.list.upperThreshold }, // 设置竖向滚动条位置 scrollTop: { type: [String, Number], default: () => props$1x.list.scrollTop }, // 控制 onscroll 事件触发的频率,仅nvue有效 offsetAccuracy: { type: [String, Number], default: () => props$1x.list.offsetAccuracy }, // 启用 flexbox 布局。开启后,当前节点声明了display: flex就会成为flex container,并作用于其孩子节点,仅微信小程序有效 enableFlex: { type: Boolean, default: () => props$1x.list.enableFlex }, // 是否按分页模式显示List,默认值false pagingEnabled: { type: Boolean, default: () => props$1x.list.pagingEnabled }, // 是否允许List滚动 scrollable: { type: Boolean, default: () => props$1x.list.scrollable }, // 值应为某子元素id(id不能以数字开头) scrollIntoView: { type: String, default: () => props$1x.list.scrollIntoView }, // 在设置滚动条位置时使用动画过渡 scrollWithAnimation: { type: Boolean, default: () => props$1x.list.scrollWithAnimation }, // iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只对微信小程序有效 enableBackToTop: { type: Boolean, default: () => props$1x.list.enableBackToTop }, // 列表的高度 height: { type: [String, Number], default: () => props$1x.list.height }, // 列表宽度 width: { type: [String, Number], default: () => props$1x.list.width }, // 列表前后预渲染的屏数,1代表一个屏幕的高度,1.5代表1个半屏幕高度 preLoadScreen: { type: [String, Number], default: () => props$1x.list.preLoadScreen }, // 开启自定义下拉刷新 refresherEnabled: { type: Boolean, default: () => false }, // 设置自定义下拉刷新阈值 refresherThreshold: { type: Number, default: () => 45 }, // 设置自定义下拉刷新默认样式,支持设置 black,white,none,none 表示不使用默认样式 refresherDefaultStyle: { type: String, default: () => "black" }, // 设置自定义下拉刷新区域背景颜色 refresherBackground: { type: String, default: () => "#FFF" }, // 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发 refresherTriggered: { type: Boolean, default: () => false } } }); const _sfc_main$19 = { name: "u-list", mixins: [mpMixin, mixin, props$H], watch: { scrollIntoView(n2) { this.scrollIntoViewById(n2); } }, data() { return { // 记录内部滚动的距离 innerScrollTop: 0, // vue下,scroll-view在上拉加载时的偏移值 offset: 0, sys: getWindowInfo() }; }, computed: { listStyle() { const style = {}; if (this.width != 0) style.width = addUnit(this.width); if (this.height != 0) style.height = addUnit(this.height); if (!style.height) style.height = addUnit(this.sys.windowHeight, "px"); return deepMerge$1(style, addStyle(this.customStyle)); } }, provide() { return { uList: this }; }, created() { this.refs = []; this.children = []; this.anchors = []; }, mounted() { }, emits: [ "scroll", "scrolltolower", "scrolltoupper", "refresherpulling", "refresherrefresh", "refresherrestore", "refresherabort" ], methods: { updateOffsetFromChild(top) { this.offset = top; }, onScroll(e2) { let scrollTop = 0; scrollTop = e2.detail.scrollTop; this.innerScrollTop = scrollTop; this.$emit("scroll", scrollTop); }, scrollIntoViewById(id) { }, // 滚动到底部触发事件 scrolltolower(e2) { sleep(30).then(() => { this.$emit("scrolltolower"); }); }, // 滚动到底部时触发,非nvue有效 scrolltoupper(e2) { sleep(30).then(() => { this.$emit("scrolltoupper"); this.offset = 0; }); }, refresherpulling(e2) { this.$emit("refresherpulling", e2); }, refresherrefresh(e2) { this.$emit("refresherrefresh", e2); }, refresherrestore(e2) { this.$emit("refresherrestore", e2); }, refresherabort(e2) { this.$emit("refresherabort", e2); } } }; function _sfc_render$18(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("scroll-view", { class: "u-list", "scroll-into-view": _ctx.scrollIntoView, style: vue.normalizeStyle([$options.listStyle]), "scroll-y": _ctx.scrollable, "scroll-top": Number(_ctx.scrollTop), "lower-threshold": Number(_ctx.lowerThreshold), "upper-threshold": Number(_ctx.upperThreshold), "show-scrollbar": _ctx.showScrollbar, "enable-back-to-top": _ctx.enableBackToTop, "scroll-with-animation": _ctx.scrollWithAnimation, onScroll: _cache[0] || (_cache[0] = (...args) => $options.onScroll && $options.onScroll(...args)), onScrolltolower: _cache[1] || (_cache[1] = (...args) => $options.scrolltolower && $options.scrolltolower(...args)), onScrolltoupper: _cache[2] || (_cache[2] = (...args) => $options.scrolltoupper && $options.scrolltoupper(...args)), "refresher-enabled": _ctx.refresherEnabled, "refresher-threshold": _ctx.refresherThreshold, "refresher-default-style": _ctx.refresherDefaultStyle, "refresher-background": _ctx.refresherBackground, "refresher-triggered": _ctx.refresherTriggered, onRefresherpulling: _cache[3] || (_cache[3] = (...args) => $options.refresherpulling && $options.refresherpulling(...args)), onRefresherrefresh: _cache[4] || (_cache[4] = (...args) => $options.refresherrefresh && $options.refresherrefresh(...args)), onRefresherrestore: _cache[5] || (_cache[5] = (...args) => $options.refresherrestore && $options.refresherrestore(...args)), onRefresherabort: _cache[6] || (_cache[6] = (...args) => $options.refresherabort && $options.refresherabort(...args)), "scroll-anchoring": true }, [ vue.createElementVNode("view", null, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]) ], 44, ["scroll-into-view", "scroll-y", "scroll-top", "lower-threshold", "upper-threshold", "show-scrollbar", "enable-back-to-top", "scroll-with-animation", "refresher-enabled", "refresher-threshold", "refresher-default-style", "refresher-background", "refresher-triggered"]); } const uList = /* @__PURE__ */ _export_sfc(_sfc_main$19, [["render", _sfc_render$18], ["__scopeId", "data-v-a7e78647"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-list/u-list.vue"]]); const __vite_glob_0_58 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uList }, Symbol.toStringTag, { value: "Module" })); const props$G = defineMixin({ props: { // 提示内容 loadingText: { type: [String, Number], default: () => props$1x.loadingPage.loadingText }, // 文字上方用于替换loading动画的图片 image: { type: String, default: () => props$1x.loadingPage.image }, // 加载动画的模式,circle-圆形,spinner-花朵形,semicircle-半圆形 loadingMode: { type: String, default: () => props$1x.loadingPage.loadingMode }, // 是否加载中 loading: { type: Boolean, default: () => props$1x.loadingPage.loading }, // 背景色 bgColor: { type: String, default: () => props$1x.loadingPage.bgColor }, // 文字颜色 color: { type: String, default: () => props$1x.loadingPage.color }, // 文字大小 fontSize: { type: [String, Number], default: () => props$1x.loadingPage.fontSize }, // 图标大小 iconSize: { type: [String, Number], default: () => props$1x.loadingPage.fontSize }, // 加载中图标的颜色,只能rgb或者十六进制颜色值 loadingColor: { type: String, default: () => props$1x.loadingPage.loadingColor }, // 层级 zIndex: { type: [Number], default: () => props$1x.loadingPage.zIndex } } }); const _sfc_main$18 = { name: "u-loading-page", mixins: [mpMixin, mixin, props$G], data() { return {}; }, methods: { addUnit } }; function _sfc_render$17(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createBlock(_component_u_transition, { show: _ctx.loading, "custom-style": { position: "fixed", top: 0, left: 0, right: 0, bottom: 0, backgroundColor: _ctx.bgColor, display: "flex", zIndex: _ctx.zIndex, ..._ctx.customStyle } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-loading-page" }, [ vue.createElementVNode("view", { class: "u-loading-page__warpper" }, [ vue.createElementVNode("view", { class: "u-loading-page__warpper__loading-icon" }, [ _ctx.image ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _ctx.image, class: "u-loading-page__warpper__loading-icon__img", mode: "widthFit", style: vue.normalizeStyle({ width: $options.addUnit(_ctx.iconSize), height: $options.addUnit(_ctx.iconSize) }) }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 1, mode: _ctx.loadingMode, size: $options.addUnit(_ctx.iconSize), color: _ctx.loadingColor }, null, 8, ["mode", "size", "color"])) ]), vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "u-loading-page__warpper__text", style: vue.normalizeStyle({ fontSize: $options.addUnit(_ctx.fontSize), color: _ctx.color }) }, vue.toDisplayString(_ctx.loadingText), 5 /* TEXT, STYLE */ ) ], true) ]) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show", "custom-style"]); } const uLoadingPage = /* @__PURE__ */ _export_sfc(_sfc_main$18, [["render", _sfc_render$17], ["__scopeId", "data-v-9c9e88a3"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-loading-page/u-loading-page.vue"]]); const __vite_glob_0_60 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uLoadingPage }, Symbol.toStringTag, { value: "Module" })); const props$F = defineMixin({ props: { // 组件状态,loadmore-加载前的状态,loading-加载中的状态,nomore-没有更多的状态 status: { type: String, default: () => props$1x.loadmore.status }, // 组件背景色 bgColor: { type: String, default: () => props$1x.loadmore.bgColor }, // 是否显示加载中的图标 icon: { type: Boolean, default: () => props$1x.loadmore.icon }, // 字体大小 fontSize: { type: [String, Number], default: () => props$1x.loadmore.fontSize }, // 图标大小 iconSize: { type: [String, Number], default: () => props$1x.loadmore.iconSize }, // 字体颜色 color: { type: String, default: () => props$1x.loadmore.color }, // 加载中状态的图标,spinner-花朵状图标,circle-圆圈状,semicircle-半圆 loadingIcon: { type: String, default: () => props$1x.loadmore.loadingIcon }, // 加载前的提示语 loadmoreText: { type: String, default: () => props$1x.loadmore.loadmoreText }, // 加载中提示语 loadingText: { type: String, default: () => props$1x.loadmore.loadingText }, // 没有更多的提示语 nomoreText: { type: String, default: () => props$1x.loadmore.nomoreText }, // 在“没有更多”状态下,是否显示粗点 isDot: { type: Boolean, default: () => props$1x.loadmore.isDot }, // 加载中图标的颜色 iconColor: { type: String, default: () => props$1x.loadmore.iconColor }, // 上边距 marginTop: { type: [String, Number], default: () => props$1x.loadmore.marginTop }, // 下边距 marginBottom: { type: [String, Number], default: () => props$1x.loadmore.marginBottom }, // 高度,单位px height: { type: [String, Number], default: () => props$1x.loadmore.height }, // 是否显示左边分割线 line: { type: Boolean, default: () => props$1x.loadmore.line }, // 线条颜色 lineColor: { type: String, default: () => props$1x.loadmore.lineColor }, // 是否虚线,true-虚线,false-实线 dashed: { type: Boolean, default: () => props$1x.loadmore.dashed } } }); const _sfc_main$17 = { name: "u-loadmore", mixins: [mpMixin, mixin, props$F], data() { return { // 粗点 dotText: "●" }; }, computed: { // 加载的文字显示的样式 loadTextStyle() { return { color: this.color, fontSize: addUnit(this.fontSize), lineHeight: addUnit(this.fontSize), backgroundColor: this.bgColor }; }, // 显示的提示文字 showText() { let text = ""; if (this.status == "loadmore") text = this.loadmoreText; else if (this.status == "loading") text = this.loadingText; else if (this.status == "nomore" && this.isDot) text = this.dotText; else text = this.nomoreText; return text; } }, emits: ["loadmore"], methods: { addStyle, addUnit, loadMore() { if (this.status == "loadmore") this.$emit("loadmore"); } } }; function _sfc_render$16(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-loadmore", style: vue.normalizeStyle([ $options.addStyle(_ctx.customStyle), { backgroundColor: _ctx.bgColor, marginBottom: $options.addUnit(_ctx.marginBottom), marginTop: $options.addUnit(_ctx.marginTop), height: $options.addUnit(_ctx.height) } ]) }, [ _ctx.line ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0, length: "140rpx", color: _ctx.lineColor, hairline: false, dashed: _ctx.dashed }, null, 8, ["color", "dashed"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 加载中和没有更多的状态才显示两边的横线 "), vue.createElementVNode( "view", { class: vue.normalizeClass([_ctx.status == "loadmore" || _ctx.status == "nomore" ? "u-more" : "", "u-loadmore__content"]) }, [ _ctx.status === "loading" && _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-loadmore__content__icon-wrap" }, [ vue.createVNode(_component_u_loading_icon, { color: _ctx.iconColor, size: _ctx.iconSize, mode: _ctx.loadingIcon }, null, 8, ["color", "size", "mode"]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 如果没有更多的状态下,显示内容为dot(粗点),加载特定样式 "), vue.createElementVNode( "text", { class: vue.normalizeClass(["u-line-1", [_ctx.status == "nomore" && _ctx.isDot == true ? "u-loadmore__content__dot-text" : "u-loadmore__content__text"]]), style: vue.normalizeStyle([$options.loadTextStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.loadMore && $options.loadMore(...args)) }, vue.toDisplayString($options.showText), 7 /* TEXT, CLASS, STYLE */ ) ], 2 /* CLASS */ ), _ctx.line ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 1, length: "140rpx", color: _ctx.lineColor, hairline: false, dashed: _ctx.dashed }, null, 8, ["color", "dashed"])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ); } const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$17, [["render", _sfc_render$16], ["__scopeId", "data-v-4ccc1478"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-loadmore/u-loadmore.vue"]]); const __vite_glob_0_61 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0$1 }, Symbol.toStringTag, { value: "Module" })); function e() { return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null }; } var t = { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null }; function n(e2) { t = e2; } var r = { exec: () => null }; function s(e2, t2 = "") { let n2 = "string" == typeof e2 ? e2 : e2.source, r2 = { replace: (e3, t3) => { let s2 = "string" == typeof t3 ? t3 : t3.source; return s2 = s2.replace(l.caret, "$1"), n2 = n2.replace(e3, s2), r2; }, getRegex: () => new RegExp(n2, t2) }; return r2; } var l = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[a-zA-Z0-9\u00C0-\u02AF\u0300-\u036F\u0400-\u04FF\u0500-\u052F\u1E00-\u1EFF]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e2) => new RegExp(`^( {0,3}${e2})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}#`), htmlBeginRegex: (e2) => new RegExp(`^ {0,${Math.min(3, e2 - 1)}}<(?:[a-z].*>|!--)`, "i") }, i = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, a = /(?:[*+-]|\d{1,9}[.)])/, o = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, c = s(o).replace(/bull/g, a).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), h = s(o).replace(/bull/g, a).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), p = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, u = /(?!\s*\])(?:\\.|[^\[\]\\])+/, g = s(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", u).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), k = s(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, a).getRegex(), d = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", f = /|$))/, x = s("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", f).replace("tag", d).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), b = s(p).replace("hr", i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", d).getRegex(), w = { blockquote: s(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", b).getRegex(), code: /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, def: g, fences: /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, heading: /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, hr: i, html: x, lheading: c, list: k, newline: /^(?:[ \t]*(?:\n|$))+/, paragraph: b, table: r, text: /^[^\n]+/ }, m = s("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", d).getRegex(), y = { ...w, lheading: h, table: m, paragraph: s(p).replace("hr", i).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", m).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", ")|<(?:script|pre|style|textarea|!--)").replace("tag", d).getRegex() }, $ = { ...w, html: s(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", f).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: r, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: s(p).replace("hr", i).replace("heading", " *#{1,6} *[^\n]").replace("lheading", c).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, R = /^( {2,}|\\)\n(?!\s*$)/, S = /[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~·!¥……()——《》「」『』【】、;:‘’“”,。、]/u, T = /[\s!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~·!¥……()——《》「」『』【】、;:‘’“”,。、]/, z = /[^a-zA-Z0-9\u4e00-\u9fa5\s!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~·!¥……()——《》「」『』【】、;:‘’“”,。、]/, A = s(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, T).getRegex(), _ = /[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}·!¥……()——《》「」『』【】、;:‘’“”,。、]/, P = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, I = s(P, "u").replace(/punct/g, S).getRegex(), L = s(P, "u").replace(/punct/g, _).getRegex(), B = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", C = s(B, "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, T).replace(/punct/g, S).getRegex(), q = s(B, "gu").replace(/notPunctSpace/g, /[a-zA-Z0-9\u4e00-\u9fa5~]/).replace(/punctSpace/g, /[\s!"#$%&'()*+,-./:;<=>?@[\]^_`{|}·!¥……()——《》「」『』【】、;:‘’“”,。、]/).replace(/punct/g, _).getRegex(), E = s("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, z).replace(/punctSpace/g, T).replace(/punct/g, S).getRegex(), v = s(/\\(punct)/, "gu").replace(/punct/g, S).getRegex(), Z = s(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), D = s(f).replace("(?:-->|$)", "-->").getRegex(), M = s("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", D).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), O = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Q = s(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", O).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), N = s(/^!?\[(label)\]\[(ref)\]/).replace("label", O).replace("ref", u).getRegex(), j = s(/^!?\[(ref)\](?:\[\])?/).replace("ref", u).getRegex(), G = { _backpedal: r, anyPunctuation: v, autolink: Z, blockSkip: /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, br: R, code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, del: r, emStrongLDelim: I, emStrongRDelimAst: C, emStrongRDelimUnd: E, escape: /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, link: Q, nolink: j, punctuation: A, reflink: N, reflinkSearch: s("reflink|nolink(?!\\()", "g").replace("reflink", N).replace("nolink", j).getRegex(), tag: M, text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\": ">", '"': """, "'": "'" }, K = (e2) => J[e2]; function V(e2, t2) { if (t2) { if (l.escapeTest.test(e2)) return e2.replace(l.escapeReplace, K); } else if (l.escapeTestNoEncode.test(e2)) return e2.replace(l.escapeReplaceNoEncode, K); return e2; } function Y(e2) { try { e2 = encodeURI(e2).replace(l.percentDecode, "%"); } catch { return null; } return e2; } function ee(e2, t2) { var _a2; let n2 = e2.replace(l.findPipe, (e3, t3, n3) => { let r3 = false, s2 = t3; for (; --s2 >= 0 && "\\" === n3[s2]; ) r3 = !r3; return r3 ? "|" : " |"; }).split(l.splitPipe), r2 = 0; if (n2[0].trim() || n2.shift(), n2.length > 0 && !((_a2 = n2.at(-1)) == null ? void 0 : _a2.trim()) && n2.pop(), t2) if (n2.length > t2) n2.splice(t2); else for (; n2.length < t2; ) n2.push(""); for (; r2 < n2.length; r2++) n2[r2] = n2[r2].trim().replace(l.slashPipe, "|"); return n2; } function te(e2, t2, n2) { let r2 = e2.length; if (0 === r2) return ""; let s2 = 0; for (; s2 < r2; ) { let l2 = e2.charAt(r2 - s2 - 1); if (l2 !== t2 || n2) { if (l2 === t2 || !n2) break; s2++; } else s2++; } return e2.slice(0, r2 - s2); } function ne(e2, t2, n2, r2, s2) { let l2 = t2.href, i2 = t2.title || null, a2 = e2[1].replace(s2.other.outputLinkReplace, "$1"); r2.state.inLink = true; let o2 = { type: "!" === e2[0].charAt(0) ? "image" : "link", raw: n2, href: l2, title: i2, text: a2, tokens: r2.inlineTokens(a2) }; return r2.state.inLink = false, o2; } var re = class { constructor(e2) { __publicField(this, "options"); __publicField(this, "rules"); __publicField(this, "lexer"); this.options = e2 || t; } space(e2) { let t2 = this.rules.block.newline.exec(e2); if (t2 && t2[0].length > 0) return { type: "space", raw: t2[0] }; } code(e2) { let t2 = this.rules.block.code.exec(e2); if (t2) { let e3 = t2[0].replace(this.rules.other.codeRemoveIndent, ""); return { type: "code", raw: t2[0], codeBlockStyle: "indented", text: this.options.pedantic ? e3 : te(e3, "\n") }; } } fences(e2) { let t2 = this.rules.block.fences.exec(e2); if (t2) { let e3 = t2[0], n2 = function(e4, t3, n3) { let r2 = e4.match(n3.other.indentCodeCompensation); if (null === r2) return t3; let s2 = r2[1]; return t3.split("\n").map((e5) => { let t4 = e5.match(n3.other.beginningSpace); if (null === t4) return e5; let [r3] = t4; return r3.length >= s2.length ? e5.slice(s2.length) : e5; }).join("\n"); }(e3, t2[3] || "", this.rules); return { type: "code", raw: e3, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: n2 }; } } heading(e2) { let t2 = this.rules.block.heading.exec(e2); if (t2) { let e3 = t2[2].trim(); if (this.rules.other.endingHash.test(e3)) { let t3 = te(e3, "#"); (this.options.pedantic || !t3 || this.rules.other.endingSpaceChar.test(t3)) && (e3 = t3.trim()); } return { type: "heading", raw: t2[0], depth: t2[1].length, text: e3, tokens: this.lexer.inline(e3) }; } } hr(e2) { let t2 = this.rules.block.hr.exec(e2); if (t2) return { type: "hr", raw: te(t2[0], "\n") }; } blockquote(e2) { let t2 = this.rules.block.blockquote.exec(e2); if (t2) { let e3 = te(t2[0], "\n").split("\n"), n2 = "", r2 = "", s2 = []; for (; e3.length > 0; ) { let t3, l2 = false, i2 = []; for (t3 = 0; t3 < e3.length; t3++) if (this.rules.other.blockquoteStart.test(e3[t3])) i2.push(e3[t3]), l2 = true; else { if (l2) break; i2.push(e3[t3]); } e3 = e3.slice(t3); let a2 = i2.join("\n"), o2 = a2.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, ""); n2 = n2 ? `${n2} ${a2}` : a2, r2 = r2 ? `${r2} ${o2}` : o2; let c2 = this.lexer.state.top; if (this.lexer.state.top = true, this.lexer.blockTokens(o2, s2, true), this.lexer.state.top = c2, 0 === e3.length) break; let h2 = s2.at(-1); if ("code" === (h2 == null ? void 0 : h2.type)) break; if ("blockquote" === (h2 == null ? void 0 : h2.type)) { let t4 = h2, l3 = t4.raw + "\n" + e3.join("\n"), i3 = this.blockquote(l3); s2[s2.length - 1] = i3, n2 = n2.substring(0, n2.length - t4.raw.length) + i3.raw, r2 = r2.substring(0, r2.length - t4.text.length) + i3.text; break; } if ("list" !== (h2 == null ? void 0 : h2.type)) ; else { let t4 = h2, l3 = t4.raw + "\n" + e3.join("\n"), i3 = this.list(l3); s2[s2.length - 1] = i3, n2 = n2.substring(0, n2.length - h2.raw.length) + i3.raw, r2 = r2.substring(0, r2.length - t4.raw.length) + i3.raw, e3 = l3.substring(s2.at(-1).raw.length).split("\n"); } } return { type: "blockquote", raw: n2, tokens: s2, text: r2 }; } } list(e2) { let t2 = this.rules.block.list.exec(e2); if (t2) { let n2 = t2[1].trim(), r2 = n2.length > 1, s2 = { type: "list", raw: "", ordered: r2, start: r2 ? +n2.slice(0, -1) : "", loose: false, items: [] }; n2 = r2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = r2 ? n2 : "[*+-]"); let l2 = this.rules.other.listItemRegex(n2), i2 = false; for (; e2; ) { let n3 = false, r3 = "", a3 = ""; if (!(t2 = l2.exec(e2)) || this.rules.block.hr.test(e2)) break; r3 = t2[0], e2 = e2.substring(r3.length); let o2 = t2[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (e3) => " ".repeat(3 * e3.length)), c2 = e2.split("\n", 1)[0], h2 = !o2.trim(), p2 = 0; if (this.options.pedantic ? (p2 = 2, a3 = o2.trimStart()) : h2 ? p2 = t2[1].length + 1 : (p2 = t2[2].search(this.rules.other.nonSpaceChar), p2 = p2 > 4 ? 1 : p2, a3 = o2.slice(p2), p2 += t2[1].length), h2 && this.rules.other.blankLine.test(c2) && (r3 += c2 + "\n", e2 = e2.substring(c2.length + 1), n3 = true), !n3) { let t3 = this.rules.other.nextBulletRegex(p2), n4 = this.rules.other.hrRegex(p2), s3 = this.rules.other.fencesBeginRegex(p2), l3 = this.rules.other.headingBeginRegex(p2), i3 = this.rules.other.htmlBeginRegex(p2); for (; e2; ) { let u3, g3 = e2.split("\n", 1)[0]; if (c2 = g3, this.options.pedantic ? (c2 = c2.replace(this.rules.other.listReplaceNesting, " "), u3 = c2) : u3 = c2.replace(this.rules.other.tabCharGlobal, " "), s3.test(c2) || l3.test(c2) || i3.test(c2) || t3.test(c2) || n4.test(c2)) break; if (u3.search(this.rules.other.nonSpaceChar) >= p2 || !c2.trim()) a3 += "\n" + u3.slice(p2); else { if (h2 || o2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || s3.test(o2) || l3.test(o2) || n4.test(o2)) break; a3 += "\n" + c2; } !h2 && !c2.trim() && (h2 = true), r3 += g3 + "\n", e2 = e2.substring(g3.length + 1), o2 = u3.slice(p2); } } s2.loose || (i2 ? s2.loose = true : this.rules.other.doubleBlankLine.test(r3) && (i2 = true)); let u2, g2 = null; this.options.gfm && (g2 = this.rules.other.listIsTask.exec(a3), g2 && (u2 = "[ ] " !== g2[0], a3 = a3.replace(this.rules.other.listReplaceTask, ""))), s2.items.push({ type: "list_item", raw: r3, task: !!g2, checked: u2, loose: false, text: a3, tokens: [] }), s2.raw += r3; } let a2 = s2.items.at(-1); if (!a2) return; a2.raw = a2.raw.trimEnd(), a2.text = a2.text.trimEnd(), s2.raw = s2.raw.trimEnd(); for (let e3 = 0; e3 < s2.items.length; e3++) if (this.lexer.state.top = false, s2.items[e3].tokens = this.lexer.blockTokens(s2.items[e3].text, []), !s2.loose) { let t3 = s2.items[e3].tokens.filter((e4) => "space" === e4.type), n3 = t3.length > 0 && t3.some((e4) => this.rules.other.anyLine.test(e4.raw)); s2.loose = n3; } if (s2.loose) for (let e3 = 0; e3 < s2.items.length; e3++) s2.items[e3].loose = true; return s2; } } html(e2) { let t2 = this.rules.block.html.exec(e2); if (t2) return { type: "html", block: true, raw: t2[0], pre: "pre" === t2[1] || "script" === t2[1] || "style" === t2[1], text: t2[0] }; } def(e2) { let t2 = this.rules.block.def.exec(e2); if (t2) { let e3 = t2[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n2 = t2[2] ? t2[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t2[3] ? t2[3].substring(1, t2[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t2[3]; return { type: "def", tag: e3, raw: t2[0], href: n2, title: r2 }; } } table(e2) { var _a2; let t2 = this.rules.block.table.exec(e2); if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return; let n2 = ee(t2[1]), r2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), s2 = ((_a2 = t2[3]) == null ? void 0 : _a2.trim()) ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], l2 = { type: "table", raw: t2[0], header: [], align: [], rows: [] }; if (n2.length === r2.length) { for (let e3 of r2) this.rules.other.tableAlignRight.test(e3) ? l2.align.push("right") : this.rules.other.tableAlignCenter.test(e3) ? l2.align.push("center") : this.rules.other.tableAlignLeft.test(e3) ? l2.align.push("left") : l2.align.push(null); for (let e3 = 0; e3 < n2.length; e3++) l2.header.push({ text: n2[e3], tokens: this.lexer.inline(n2[e3]), header: true, align: l2.align[e3] }); for (let e3 of s2) l2.rows.push(ee(e3, l2.header.length).map((e4, t3) => ({ text: e4, tokens: this.lexer.inline(e4), header: false, align: l2.align[t3] }))); return l2; } } lheading(e2) { let t2 = this.rules.block.lheading.exec(e2); if (t2) return { type: "heading", raw: t2[0], depth: "=" === t2[2].charAt(0) ? 1 : 2, text: t2[1], tokens: this.lexer.inline(t2[1]) }; } paragraph(e2) { let t2 = this.rules.block.paragraph.exec(e2); if (t2) { let e3 = "\n" === t2[1].charAt(t2[1].length - 1) ? t2[1].slice(0, -1) : t2[1]; return { type: "paragraph", raw: t2[0], text: e3, tokens: this.lexer.inline(e3) }; } } text(e2) { let t2 = this.rules.block.text.exec(e2); if (t2) return { type: "text", raw: t2[0], text: t2[0], tokens: this.lexer.inline(t2[0]) }; } escape(e2) { let t2 = this.rules.inline.escape.exec(e2); if (t2) return { type: "escape", raw: t2[0], text: t2[1] }; } tag(e2) { let t2 = this.rules.inline.tag.exec(e2); if (t2) return !this.lexer.state.inLink && this.rules.other.startATag.test(t2[0]) ? this.lexer.state.inLink = true : this.lexer.state.inLink && this.rules.other.endATag.test(t2[0]) && (this.lexer.state.inLink = false), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t2[0]) ? this.lexer.state.inRawBlock = true : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t2[0]) && (this.lexer.state.inRawBlock = false), { type: "html", raw: t2[0], inLink: this.lexer.state.inLink, inRawBlock: this.lexer.state.inRawBlock, block: false, text: t2[0] }; } link(e2) { let t2 = this.rules.inline.link.exec(e2); if (t2) { let e3 = t2[2].trim(); if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e3)) { if (!this.rules.other.endAngleBracket.test(e3)) return; let t3 = te(e3.slice(0, -1), "\\"); if ((e3.length - t3.length) % 2 == 0) return; } else { let e4 = function(e5, t3) { if (-1 === e5.indexOf(t3[1])) return -1; let n3 = 0; for (let r3 = 0; r3 < e5.length; r3++) if ("\\" === e5[r3]) r3++; else if (e5[r3] === t3[0]) n3++; else if (e5[r3] === t3[1] && (n3--, n3 < 0)) return r3; return n3 > 0 ? -2 : -1; }(t2[2], "()"); if (-2 === e4) return; if (e4 > -1) { let n3 = (0 === t2[0].indexOf("!") ? 5 : 4) + t2[1].length + e4; t2[2] = t2[2].substring(0, e4), t2[0] = t2[0].substring(0, n3).trim(), t2[3] = ""; } } let n2 = t2[2], r2 = ""; if (this.options.pedantic) { let e4 = this.rules.other.pedanticHrefTitle.exec(n2); e4 && (n2 = e4[1], r2 = e4[3]); } else r2 = t2[3] ? t2[3].slice(1, -1) : ""; return n2 = n2.trim(), this.rules.other.startAngleBracket.test(n2) && (n2 = this.options.pedantic && !this.rules.other.endAngleBracket.test(e3) ? n2.slice(1) : n2.slice(1, -1)), ne(t2, { href: n2 && n2.replace(this.rules.inline.anyPunctuation, "$1"), title: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules); } } reflink(e2, t2) { let n2; if ((n2 = this.rules.inline.reflink.exec(e2)) || (n2 = this.rules.inline.nolink.exec(e2))) { let e3 = t2[(n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()]; if (!e3) { let e4 = n2[0].charAt(0); return { type: "text", raw: e4, text: e4 }; } return ne(n2, e3, n2[0], this.lexer, this.rules); } } emStrong(e2, t2, n2 = "") { let r2 = this.rules.inline.emStrongLDelim.exec(e2); if (!(!r2 || r2[3] && n2.match(this.rules.other.unicodeAlphaNumeric)) && (!r2[1] && !r2[2] || !n2 || this.rules.inline.punctuation.exec(n2))) { let n3, s2, l2 = [...r2[0]].length - 1, i2 = l2, a2 = 0, o2 = "*" === r2[0][0] ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd; for (o2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + l2); null != (r2 = o2.exec(t2)); ) { if (n3 = r2[1] || r2[2] || r2[3] || r2[4] || r2[5] || r2[6], !n3) continue; if (s2 = [...n3].length, r2[3] || r2[4]) { i2 += s2; continue; } if ((r2[5] || r2[6]) && l2 % 3 && !((l2 + s2) % 3)) { a2 += s2; continue; } if (i2 -= s2, i2 > 0) continue; s2 = Math.min(s2, s2 + i2 + a2); let t3 = [...r2[0]][0].length, o3 = e2.slice(0, l2 + r2.index + t3 + s2); if (Math.min(l2, s2) % 2) { let e3 = o3.slice(1, -1); return { type: "em", raw: o3, text: e3, tokens: this.lexer.inlineTokens(e3) }; } let c2 = o3.slice(2, -2); return { type: "strong", raw: o3, text: c2, tokens: this.lexer.inlineTokens(c2) }; } } } codespan(e2) { let t2 = this.rules.inline.code.exec(e2); if (t2) { let e3 = t2[2].replace(this.rules.other.newLineCharGlobal, " "), n2 = this.rules.other.nonSpaceChar.test(e3), r2 = this.rules.other.startingSpaceChar.test(e3) && this.rules.other.endingSpaceChar.test(e3); return n2 && r2 && (e3 = e3.substring(1, e3.length - 1)), { type: "codespan", raw: t2[0], text: e3 }; } } br(e2) { let t2 = this.rules.inline.br.exec(e2); if (t2) return { type: "br", raw: t2[0] }; } del(e2) { let t2 = this.rules.inline.del.exec(e2); if (t2) return { type: "del", raw: t2[0], text: t2[2], tokens: this.lexer.inlineTokens(t2[2]) }; } autolink(e2) { let t2 = this.rules.inline.autolink.exec(e2); if (t2) { let e3, n2; return "@" === t2[2] ? (e3 = t2[1], n2 = "mailto:" + e3) : (e3 = t2[1], n2 = e3), { type: "link", raw: t2[0], text: e3, href: n2, tokens: [{ type: "text", raw: e3, text: e3 }] }; } } url(e2) { var _a2; let t2; if (t2 = this.rules.inline.url.exec(e2)) { let e3, n2; if ("@" === t2[2]) e3 = t2[0], n2 = "mailto:" + e3; else { let r2; do { r2 = t2[0], t2[0] = ((_a2 = this.rules.inline._backpedal.exec(t2[0])) == null ? void 0 : _a2[0]) ?? ""; } while (r2 !== t2[0]); e3 = t2[0], n2 = "www." === t2[1] ? "http://" + t2[0] : t2[0]; } return { type: "link", raw: t2[0], text: e3, href: n2, tokens: [{ type: "text", raw: e3, text: e3 }] }; } } inlineText(e2) { let t2 = this.rules.inline.text.exec(e2); if (t2) { let e3 = this.lexer.state.inRawBlock; return { type: "text", raw: t2[0], text: t2[0], escaped: e3 }; } } }, se = class e2 { constructor(e3) { __publicField(this, "tokens"); __publicField(this, "options"); __publicField(this, "state"); __publicField(this, "tokenizer"); __publicField(this, "inlineQueue"); this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e3 || t, this.options.tokenizer = this.options.tokenizer || new re(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, top: true }; let n2 = { other: l, block: F.normal, inline: U.normal }; this.options.pedantic ? (n2.block = F.pedantic, n2.inline = U.pedantic) : this.options.gfm && (n2.block = F.gfm, this.options.breaks ? n2.inline = U.breaks : n2.inline = U.gfm), this.tokenizer.rules = n2; } static get rules() { return { block: F, inline: U }; } static lex(t2, n2) { return new e2(n2).lex(t2); } static lexInline(t2, n2) { return new e2(n2).inlineTokens(t2); } lex(e3) { e3 = e3.replace(l.carriageReturn, "\n"), this.blockTokens(e3, this.tokens); for (let e4 = 0; e4 < this.inlineQueue.length; e4++) { let t2 = this.inlineQueue[e4]; this.inlineTokens(t2.src, t2.tokens); } return this.inlineQueue = [], this.tokens; } blockTokens(e3, t2 = [], n2 = false) { var _a2, _b, _c; for (this.options.pedantic && (e3 = e3.replace(l.tabCharGlobal, " ").replace(l.spaceLine, "")); e3; ) { let r2; if ((_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.block) == null ? void 0 : _b.some((n3) => !!(r2 = n3.call({ lexer: this }, e3, t2)) && (e3 = e3.substring(r2.raw.length), t2.push(r2), true))) continue; if (r2 = this.tokenizer.space(e3)) { e3 = e3.substring(r2.raw.length); let n3 = t2.at(-1); 1 === r2.raw.length && void 0 !== n3 ? n3.raw += "\n" : t2.push(r2); continue; } if (r2 = this.tokenizer.code(e3)) { e3 = e3.substring(r2.raw.length); let n3 = t2.at(-1); "paragraph" === (n3 == null ? void 0 : n3.type) || "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += (n3.raw.endsWith("\n") ? "" : "\n") + r2.raw, n3.text += "\n" + r2.text, this.inlineQueue.at(-1).src = n3.text) : t2.push(r2); continue; } if (r2 = this.tokenizer.fences(e3)) { e3 = e3.substring(r2.raw.length), t2.push(r2); continue; } if (r2 = this.tokenizer.heading(e3)) { e3 = e3.substring(r2.raw.length), t2.push(r2); continue; } if (r2 = this.tokenizer.hr(e3)) { e3 = e3.substring(r2.raw.length), t2.push(r2); continue; } if (r2 = this.tokenizer.blockquote(e3)) { e3 = e3.substring(r2.raw.length), t2.push(r2); continue; } if (r2 = this.tokenizer.list(e3)) { e3 = e3.substring(r2.raw.length), t2.push(r2); continue; } if (r2 = this.tokenizer.html(e3)) { e3 = e3.substring(r2.raw.length), t2.push(r2); continue; } if (r2 = this.tokenizer.def(e3)) { e3 = e3.substring(r2.raw.length); let n3 = t2.at(-1); "paragraph" === (n3 == null ? void 0 : n3.type) || "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += (n3.raw.endsWith("\n") ? "" : "\n") + r2.raw, n3.text += "\n" + r2.raw, this.inlineQueue.at(-1).src = n3.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }); continue; } if (r2 = this.tokenizer.table(e3)) { e3 = e3.substring(r2.raw.length), t2.push(r2); continue; } if (r2 = this.tokenizer.lheading(e3)) { e3 = e3.substring(r2.raw.length), t2.push(r2); continue; } let s2 = e3; if ((_c = this.options.extensions) == null ? void 0 : _c.startBlock) { let t3, n3 = 1 / 0, r3 = e3.slice(1); this.options.extensions.startBlock.forEach((e4) => { t3 = e4.call({ lexer: this }, r3), "number" == typeof t3 && t3 >= 0 && (n3 = Math.min(n3, t3)); }), n3 < 1 / 0 && n3 >= 0 && (s2 = e3.substring(0, n3 + 1)); } if (this.state.top && (r2 = this.tokenizer.paragraph(s2))) { let l2 = t2.at(-1); n2 && "paragraph" === (l2 == null ? void 0 : l2.type) ? (l2.raw += (l2.raw.endsWith("\n") ? "" : "\n") + r2.raw, l2.text += "\n" + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l2.text) : t2.push(r2), n2 = s2.length !== e3.length, e3 = e3.substring(r2.raw.length); } else if (r2 = this.tokenizer.text(e3)) { e3 = e3.substring(r2.raw.length); let n3 = t2.at(-1); "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += (n3.raw.endsWith("\n") ? "" : "\n") + r2.raw, n3.text += "\n" + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n3.text) : t2.push(r2); } else if (e3) { let t3 = "Infinite loop on byte: " + e3.charCodeAt(0); if (this.options.silent) { formatAppLog("error", "at uni_modules/uview-plus/components/u-markdown/marked.esm.js:7", t3); break; } throw new Error(t3); } } return this.state.top = true, t2; } inline(e3, t2 = []) { return this.inlineQueue.push({ src: e3, tokens: t2 }), t2; } inlineTokens(e3, t2 = []) { var _a2, _b, _c; let n2 = e3, r2 = null; if (this.tokens.links) { let e4 = Object.keys(this.tokens.links); if (e4.length > 0) for (; null != (r2 = this.tokenizer.rules.inline.reflinkSearch.exec(n2)); ) e4.includes(r2[0].slice(r2[0].lastIndexOf("[") + 1, -1)) && (n2 = n2.slice(0, r2.index) + "[" + "a".repeat(r2[0].length - 2) + "]" + n2.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex)); } for (; null != (r2 = this.tokenizer.rules.inline.anyPunctuation.exec(n2)); ) n2 = n2.slice(0, r2.index) + "++" + n2.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex); for (; null != (r2 = this.tokenizer.rules.inline.blockSkip.exec(n2)); ) n2 = n2.slice(0, r2.index) + "[" + "a".repeat(r2[0].length - 2) + "]" + n2.slice(this.tokenizer.rules.inline.blockSkip.lastIndex); let s2 = false, l2 = ""; for (; e3; ) { let r3; if (s2 || (l2 = ""), s2 = false, (_b = (_a2 = this.options.extensions) == null ? void 0 : _a2.inline) == null ? void 0 : _b.some((n3) => !!(r3 = n3.call({ lexer: this }, e3, t2)) && (e3 = e3.substring(r3.raw.length), t2.push(r3), true))) continue; if (r3 = this.tokenizer.escape(e3)) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } if (r3 = this.tokenizer.tag(e3)) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } if (r3 = this.tokenizer.link(e3)) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } if (r3 = this.tokenizer.reflink(e3, this.tokens.links)) { e3 = e3.substring(r3.raw.length); let n3 = t2.at(-1); "text" === r3.type && "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += r3.raw, n3.text += r3.text) : t2.push(r3); continue; } if (r3 = this.tokenizer.emStrong(e3, n2, l2)) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } if (r3 = this.tokenizer.codespan(e3)) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } if (r3 = this.tokenizer.br(e3)) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } if (r3 = this.tokenizer.del(e3)) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } if (r3 = this.tokenizer.autolink(e3)) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } if (!this.state.inLink && (r3 = this.tokenizer.url(e3))) { e3 = e3.substring(r3.raw.length), t2.push(r3); continue; } let i2 = e3; if ((_c = this.options.extensions) == null ? void 0 : _c.startInline) { let t3, n3 = 1 / 0, r4 = e3.slice(1); this.options.extensions.startInline.forEach((e4) => { t3 = e4.call({ lexer: this }, r4), "number" == typeof t3 && t3 >= 0 && (n3 = Math.min(n3, t3)); }), n3 < 1 / 0 && n3 >= 0 && (i2 = e3.substring(0, n3 + 1)); } if (r3 = this.tokenizer.inlineText(i2)) { e3 = e3.substring(r3.raw.length), "_" !== r3.raw.slice(-1) && (l2 = r3.raw.slice(-1)), s2 = true; let n3 = t2.at(-1); "text" === (n3 == null ? void 0 : n3.type) ? (n3.raw += r3.raw, n3.text += r3.text) : t2.push(r3); } else if (e3) { let t3 = "Infinite loop on byte: " + e3.charCodeAt(0); if (this.options.silent) { formatAppLog("error", "at uni_modules/uview-plus/components/u-markdown/marked.esm.js:7", t3); break; } throw new Error(t3); } } return t2; } }, le = class { constructor(e2) { __publicField(this, "options"); __publicField(this, "parser"); this.options = e2 || t; } space(e2) { return ""; } code({ text: e2, lang: t2, escaped: n2 }) { var _a2; let r2 = (_a2 = (t2 || "").match(l.notSpaceStart)) == null ? void 0 : _a2[0], s2 = e2.replace(l.endingNewline, "") + "\n"; return r2 ? '
' + (n2 ? s2 : V(s2, true)) + "
\n" : "
" + (n2 ? s2 : V(s2, true)) + "
\n"; } blockquote({ tokens: e2 }) { return `
${this.parser.parse(e2)}
`; } html({ text: e2 }) { return e2; } heading({ tokens: e2, depth: t2 }) { return `${this.parser.parseInline(e2)} `; } hr(e2) { return "
\n"; } list(e2) { let t2 = e2.ordered, n2 = e2.start, r2 = ""; for (let t3 = 0; t3 < e2.items.length; t3++) { let n3 = e2.items[t3]; r2 += this.listitem(n3); } let s2 = t2 ? "ol" : "ul"; return "<" + s2 + (t2 && 1 !== n2 ? ' start="' + n2 + '"' : "") + ">\n" + r2 + "\n"; } listitem(e2) { var _a2; let t2 = ""; if (e2.task) { let n2 = this.checkbox({ checked: !!e2.checked }); e2.loose ? "paragraph" === ((_a2 = e2.tokens[0]) == null ? void 0 : _a2.type) ? (e2.tokens[0].text = n2 + " " + e2.tokens[0].text, e2.tokens[0].tokens && e2.tokens[0].tokens.length > 0 && "text" === e2.tokens[0].tokens[0].type && (e2.tokens[0].tokens[0].text = n2 + " " + V(e2.tokens[0].tokens[0].text), e2.tokens[0].tokens[0].escaped = true)) : e2.tokens.unshift({ type: "text", raw: n2 + " ", text: n2 + " ", escaped: true }) : t2 += n2 + " "; } return t2 += this.parser.parse(e2.tokens, !!e2.loose), `
  • ${t2}
  • `; } checkbox({ checked: e2 }) { return "'; } paragraph({ tokens: e2 }) { return `

    ${this.parser.parseInline(e2)}

    `; } table(e2) { let t2 = "", n2 = ""; for (let t3 = 0; t3 < e2.header.length; t3++) n2 += this.tablecell(e2.header[t3]); t2 += this.tablerow({ text: n2 }); let r2 = ""; for (let t3 = 0; t3 < e2.rows.length; t3++) { let s2 = e2.rows[t3]; n2 = ""; for (let e3 = 0; e3 < s2.length; e3++) n2 += this.tablecell(s2[e3]); r2 += this.tablerow({ text: n2 }); } return r2 && (r2 = `${r2}`), "\n\n" + t2 + "\n" + r2 + "
    \n"; } tablerow({ text: e2 }) { return ` ${e2} `; } tablecell(e2) { let t2 = this.parser.parseInline(e2.tokens), n2 = e2.header ? "th" : "td"; return (e2.align ? `<${n2} align="${e2.align}">` : `<${n2}>`) + t2 + ` `; } strong({ tokens: e2 }) { return `${this.parser.parseInline(e2)}`; } em({ tokens: e2 }) { return `${this.parser.parseInline(e2)}`; } codespan({ text: e2 }) { return `${V(e2, true)}`; } br(e2) { return "
    "; } del({ tokens: e2 }) { return `${this.parser.parseInline(e2)}`; } link({ href: e2, title: t2, tokens: n2 }) { let r2 = this.parser.parseInline(n2), s2 = Y(e2); if (null === s2) return r2; let l2 = '
    ", l2; } image({ href: e2, title: t2, text: n2, tokens: r2 }) { r2 && (n2 = this.parser.parseInline(r2, this.parser.textRenderer)); let s2 = Y(e2); if (null === s2) return V(n2); let l2 = `${n2} { let s2 = e3[r3].flat(1 / 0); n2 = n2.concat(this.walkTokens(s2, t2)); }) : e3.tokens && (n2 = n2.concat(this.walkTokens(e3.tokens, t2))); } } return n2; } use(...e2) { let t2 = this.defaults.extensions || { renderers: {}, childTokens: {} }; return e2.forEach((e3) => { let n2 = { ...e3 }; if (n2.async = this.defaults.async || n2.async || false, e3.extensions && (e3.extensions.forEach((e4) => { if (!e4.name) throw new Error("extension name required"); if ("renderer" in e4) { let n3 = t2.renderers[e4.name]; t2.renderers[e4.name] = n3 ? function(...t3) { let r2 = e4.renderer.apply(this, t3); return false === r2 && (r2 = n3.apply(this, t3)), r2; } : e4.renderer; } if ("tokenizer" in e4) { if (!e4.level || "block" !== e4.level && "inline" !== e4.level) throw new Error("extension level must be 'block' or 'inline'"); let n3 = t2[e4.level]; n3 ? n3.unshift(e4.tokenizer) : t2[e4.level] = [e4.tokenizer], e4.start && ("block" === e4.level ? t2.startBlock ? t2.startBlock.push(e4.start) : t2.startBlock = [e4.start] : "inline" === e4.level && (t2.startInline ? t2.startInline.push(e4.start) : t2.startInline = [e4.start])); } "childTokens" in e4 && e4.childTokens && (t2.childTokens[e4.name] = e4.childTokens); }), n2.extensions = t2), e3.renderer) { let t3 = this.defaults.renderer || new le(this.defaults); for (let n3 in e3.renderer) { if (!(n3 in t3)) throw new Error(`renderer '${n3}' does not exist`); if (["options", "parser"].includes(n3)) continue; let r2 = n3, s2 = e3.renderer[r2], l2 = t3[r2]; t3[r2] = (...e4) => { let n4 = s2.apply(t3, e4); return false === n4 && (n4 = l2.apply(t3, e4)), n4 || ""; }; } n2.renderer = t3; } if (e3.tokenizer) { let t3 = this.defaults.tokenizer || new re(this.defaults); for (let n3 in e3.tokenizer) { if (!(n3 in t3)) throw new Error(`tokenizer '${n3}' does not exist`); if (["options", "rules", "lexer"].includes(n3)) continue; let r2 = n3, s2 = e3.tokenizer[r2], l2 = t3[r2]; t3[r2] = (...e4) => { let n4 = s2.apply(t3, e4); return false === n4 && (n4 = l2.apply(t3, e4)), n4; }; } n2.tokenizer = t3; } if (e3.hooks) { let t3 = this.defaults.hooks || new oe(); for (let n3 in e3.hooks) { if (!(n3 in t3)) throw new Error(`hook '${n3}' does not exist`); if (["options", "block"].includes(n3)) continue; let r2 = n3, s2 = e3.hooks[r2], l2 = t3[r2]; oe.passThroughHooks.has(n3) ? t3[r2] = (e4) => { if (this.defaults.async) return Promise.resolve(s2.call(t3, e4)).then((e5) => l2.call(t3, e5)); let n4 = s2.call(t3, e4); return l2.call(t3, n4); } : t3[r2] = (...e4) => { let n4 = s2.apply(t3, e4); return false === n4 && (n4 = l2.apply(t3, e4)), n4; }; } n2.hooks = t3; } if (e3.walkTokens) { let t3 = this.defaults.walkTokens, r2 = e3.walkTokens; n2.walkTokens = function(e4) { let n3 = []; return n3.push(r2.call(this, e4)), t3 && (n3 = n3.concat(t3.call(this, e4))), n3; }; } this.defaults = { ...this.defaults, ...n2 }; }), this; } setOptions(e2) { return this.defaults = { ...this.defaults, ...e2 }, this; } lexer(e2, t2) { return se.lex(e2, t2 ?? this.defaults); } parser(e2, t2) { return ae.parse(e2, t2 ?? this.defaults); } parseMarkdown(e2) { return (t2, n2) => { let r2 = { ...n2 }, s2 = { ...this.defaults, ...r2 }, l2 = this.onError(!!s2.silent, !!s2.async); if (true === this.defaults.async && false === r2.async) return l2(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.")); if (typeof t2 > "u" || null === t2) return l2(new Error("marked(): input parameter is undefined or null")); if ("string" != typeof t2) return l2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(t2) + ", string expected")); s2.hooks && (s2.hooks.options = s2, s2.hooks.block = e2); let i2 = s2.hooks ? s2.hooks.provideLexer() : e2 ? se.lex : se.lexInline, a2 = s2.hooks ? s2.hooks.provideParser() : e2 ? ae.parse : ae.parseInline; if (s2.async) return Promise.resolve(s2.hooks ? s2.hooks.preprocess(t2) : t2).then((e3) => i2(e3, s2)).then((e3) => s2.hooks ? s2.hooks.processAllTokens(e3) : e3).then((e3) => s2.walkTokens ? Promise.all(this.walkTokens(e3, s2.walkTokens)).then(() => e3) : e3).then((e3) => a2(e3, s2)).then((e3) => s2.hooks ? s2.hooks.postprocess(e3) : e3).catch(l2); try { s2.hooks && (t2 = s2.hooks.preprocess(t2)); let e3 = i2(t2, s2); s2.hooks && (e3 = s2.hooks.processAllTokens(e3)), s2.walkTokens && this.walkTokens(e3, s2.walkTokens); let n3 = a2(e3, s2); return s2.hooks && (n3 = s2.hooks.postprocess(n3)), n3; } catch (e3) { return l2(e3); } }; } onError(e2, t2) { return (n2) => { if (n2.message += "\nPlease report this to https://github.com/markedjs/marked.", e2) { let e3 = "

    An error occurred:

    " + V(n2.message + "", true) + "
    "; return t2 ? Promise.resolve(e3) : e3; } if (t2) return Promise.reject(n2); throw n2; }; } }, he = new ce(); function pe(e2, t2) { return he.parse(e2, t2); } pe.options = pe.setOptions = function(e2) { return he.setOptions(e2), pe.defaults = he.defaults, n(pe.defaults), pe; }, pe.getDefaults = e, pe.defaults = t, pe.use = function(...e2) { return he.use(...e2), pe.defaults = he.defaults, n(pe.defaults), pe; }, pe.walkTokens = function(e2, t2) { return he.walkTokens(e2, t2); }, pe.parseInline = he.parseInline, pe.Parser = ae, pe.parser = ae.parse, pe.Renderer = le, pe.TextRenderer = ie, pe.Lexer = se, pe.lexer = se.lex, pe.Tokenizer = re, pe.Hooks = oe, pe.parse = pe; pe.options; pe.setOptions; pe.use; pe.walkTokens; pe.parseInline; ae.parse; se.lex; const _sfc_main$16 = { name: "up-markdown", props: { // markdown内容 content: { type: String, default: "" }, // 是否启用图片预览 previewImg: { type: Boolean, default: true }, // 是否显示代码块行号 showLineNumber: { type: Boolean, default: false }, // 主题样式 'light' | 'dark' theme: { type: String, default: "light" } }, data() { return { parsedContent: "" }; }, watch: { content: { handler(newVal) { this.parseMarkdown(newVal); }, immediate: true } }, methods: { // 解析markdown内容 parseMarkdown(content) { if (!content) { this.parsedContent = ""; return; } let parsed = pe(content); parsed = this.handleCodeBlock(parsed); parsed = this.applyTheme(parsed); this.parsedContent = parsed; }, // 处理代码块 handleCodeBlock(html) { return html.replace(/
    ]*)>([^<]+)<\/code><\/pre>/g, (match, lang, code2) => {
              const language = lang.match(/class="language-([^"]+)"/);
              const langClass = language ? `language-${language[1]}` : "";
              let result = `
    `;
              if (this.showLineNumber) {
                const lines = code2.split("\n").filter((line) => line.trim() !== "");
                result += '';
                lines.push("");
                lines.forEach((_2, index2) => {
                  result += `${index2 + 1}`;
                });
                result += "";
              }
              result += `${code2}
    `; return result; }); }, // 应用主题样式 applyTheme(html) { return html; } } }; function _sfc_render$15(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_parse = vue.resolveComponent("up-parse"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["up-markdown", $props.theme]) }, [ vue.createVNode(_component_up_parse, { content: $data.parsedContent, previewImg: $props.previewImg }, null, 8, ["content", "previewImg"]) ], 2 /* CLASS */ ); } const uMarkdown = /* @__PURE__ */ _export_sfc(_sfc_main$16, [["render", _sfc_render$15], ["__scopeId", "data-v-9f53166f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-markdown/u-markdown.vue"]]); const __vite_glob_0_62 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uMarkdown }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$15 = { name: "u-message-input", props: { // 最大输入长度 maxlength: { type: [Number, String], default: 4 }, // 是否用圆点填充 dotFill: { type: Boolean, default: false }, // 显示模式,box-盒子模式,bottomLine-横线在底部模式,middleLine-横线在中部模式 mode: { type: String, default: "box" }, // 预置值 modelValue: { type: [String, Number], default: "" }, // 当前激活输入item,是否带有呼吸效果 breathe: { type: Boolean, default: true }, // 是否自动获取焦点 focus: { type: Boolean, default: false }, // 字体是否加粗 bold: { type: Boolean, default: false }, // 字体大小 fontSize: { type: [String, Number], default: 60 }, // 激活样式 activeColor: { type: String, default: "#2979ff" }, // 未激活的样式 inactiveColor: { type: String, default: "#606266" }, // 输入框的大小,单位rpx,宽等于高 width: { type: [Number, String], default: "80" }, // 是否隐藏原生键盘,如果想用自定义键盘的话,需设置此参数为true disabledKeyboard: { type: Boolean, default: false } }, watch: { // maxlength: { // // 此值设置为true,会在组件加载后无需maxlength变化就会执行一次本监听函数,无需再created生命周期中处理 // immediate: true, // handler(val) { // this.maxlength = Number(val); // } // }, modelValue: { immediate: true, handler(val) { val = String(val); this.valueModel = val.substring(0, this.maxlength); } } }, data() { return { valueModel: "" }; }, emits: ["change", "finish"], computed: { // 是否显示呼吸灯效果 animationClass() { return (index2) => { if (this.breathe && this.charArr.length == index2) return "u-breathe"; else return ""; }; }, // 用于显示字符 charArr() { return this.valueModel.split(""); }, charArrLength() { return this.charArr.length; }, // 根据长度,循环输入框的个数,因为头条小程序数值不能用于v-for loopCharArr() { return new Array(this.maxlength); } }, methods: { getVal(e2) { let { value: value2 } = e2.detail; this.valueModel = value2; if (String(value2).length > this.maxlength) return; this.$emit("change", value2); if (String(value2).length == this.maxlength) { this.$emit("finish", value2); } } } }; function _sfc_render$14(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-char-box" }, [ vue.createElementVNode("view", { class: "u-char-flex" }, [ vue.createElementVNode("input", { disabled: $props.disabledKeyboard, value: $data.valueModel, type: "number", focus: $props.focus, maxlength: $props.maxlength, class: "u-input", onInput: _cache[0] || (_cache[0] = (...args) => $options.getVal && $options.getVal(...args)) }, null, 40, ["disabled", "value", "focus", "maxlength"]), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.loopCharArr, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2 }, [ vue.createElementVNode( "view", { class: vue.normalizeClass([ $props.breathe && $options.charArrLength == index2 ? "u-breathe" : "", "u-char-item", $options.charArrLength === index2 && $props.mode == "box" ? "u-box-active" : "", $props.mode === "box" ? "u-box" : "" ]), style: vue.normalizeStyle({ fontWeight: $props.bold ? "bold" : "normal", fontSize: $props.fontSize + "rpx", width: $props.width + "rpx", height: $props.width + "rpx", color: $props.inactiveColor, borderColor: $options.charArrLength === index2 && $props.mode == "box" ? $props.activeColor : $props.inactiveColor }) }, [ $props.mode !== "middleLine" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-placeholder-line", style: vue.normalizeStyle({ display: $options.charArrLength === index2 ? "block" : "none", height: $props.width * 0.5 + "rpx" }) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), $props.mode === "middleLine" && $options.charArrLength <= index2 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass([[$props.breathe && $options.charArrLength == index2 ? "u-breathe" : "", $options.charArrLength === index2 ? "u-middle-line-active" : ""], "u-middle-line"]), style: vue.normalizeStyle({ height: $props.bold ? "4px" : "2px", background: $options.charArrLength === index2 ? $props.activeColor : $props.inactiveColor }) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), $props.mode === "bottomLine" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: vue.normalizeClass([[$props.breathe && $options.charArrLength == index2 ? "u-breathe" : "", $options.charArrLength === index2 ? "u-bottom-line-active" : ""], "u-bottom-line"]), style: vue.normalizeStyle({ height: $props.bold ? "4px" : "2px", background: $options.charArrLength === index2 ? $props.activeColor : $props.inactiveColor }) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), !$props.dotFill ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 3 }, [ vue.createTextVNode( vue.toDisplayString($options.charArr[index2] ? $options.charArr[index2] : ""), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 4, class: "u-dot" }, vue.toDisplayString($options.charArr[index2] ? "●" : ""), 1 /* TEXT */ )) ], 6 /* CLASS, STYLE */ ) ]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]); } const uMessageInput = /* @__PURE__ */ _export_sfc(_sfc_main$15, [["render", _sfc_render$14], ["__scopeId", "data-v-bf0cf2ff"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-message-input/u-message-input.vue"]]); const __vite_glob_0_63 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uMessageInput }, Symbol.toStringTag, { value: "Module" })); const props$E = defineMixin({ props: { // 是否展示modal show: { type: Boolean, default: () => props$1x.modal.show }, // 标题 title: { type: [String], default: () => props$1x.modal.title }, // 弹窗内容 content: { type: String, default: () => props$1x.modal.content }, // 确认文案 confirmText: { type: String, default: () => props$1x.modal.confirmText }, // 取消文案 cancelText: { type: String, default: () => props$1x.modal.cancelText }, // 是否显示确认按钮 showConfirmButton: { type: Boolean, default: () => props$1x.modal.showConfirmButton }, // 是否显示取消按钮 showCancelButton: { type: Boolean, default: () => props$1x.modal.showCancelButton }, // 确认按钮颜色 confirmColor: { type: String, default: () => props$1x.modal.confirmColor }, // 取消文字颜色 cancelColor: { type: String, default: () => props$1x.modal.cancelColor }, // 对调确认和取消的位置 buttonReverse: { type: Boolean, default: () => props$1x.modal.buttonReverse }, // 是否开启缩放效果 zoom: { type: Boolean, default: () => props$1x.modal.zoom }, // 是否异步关闭,只对确定按钮有效 asyncClose: { type: Boolean, default: () => props$1x.modal.asyncClose }, // 是否允许点击遮罩关闭modal closeOnClickOverlay: { type: Boolean, default: () => props$1x.modal.closeOnClickOverlay }, // 给一个负的margin-top,往上偏移,避免和键盘重合的情况 negativeTop: { type: [String, Number], default: () => props$1x.modal.negativeTop }, // modal宽度,不支持百分比,可以数值,px,rpx单位 width: { type: [String, Number], default: () => props$1x.modal.width }, // 确认按钮的样式,circle-圆形,square-方形,如设置,将不会显示取消按钮 confirmButtonShape: { type: String, default: () => props$1x.modal.confirmButtonShape }, // 弹窗动画过度时间 duration: { type: [Number], default: props$1x.modal.duration }, // 文案对齐方式 contentTextAlign: { type: String, default: () => props$1x.modal.contentTextAlign }, // 异步确定时如果点击了取消时候的提示文案 asyncCloseTip: { type: String, default: () => props$1x.modal.asyncCloseTip }, // 是否异步关闭,只对取消按钮有效 asyncCancelClose: { type: Boolean, default: () => props$1x.modal.asyncCancelClose }, // 内容样式 contentStyle: { type: Object, default: () => props$1x.modal.contentStyle } } }); const _sfc_main$14 = { name: "u-modal", mixins: [mpMixin, mixin, props$E], data() { return { loading: false }; }, watch: { show(n2) { if (n2 && this.loading) this.loading = false; } }, emits: ["confirm", "cancel", "close", "update:show", "cancelOnAsync"], computed: { contentStyleCpu() { let style = this.contentStyle; style.paddingTop = `${this.title ? 12 : 25}px`; return style; } }, methods: { addUnit, // 点击确定按钮 confirmHandler() { if (this.asyncClose) { this.loading = true; } else { this.$emit("update:show", false); } this.$emit("confirm"); }, // 点击取消按钮 cancelHandler() { if (this.asyncClose && this.loading) { if (this.asyncCloseTip) { uni.showToast({ title: this.asyncCloseTip, icon: "none" }); } this.$emit("cancelOnAsync"); } else { if (!this.asyncCancelClose) { this.$emit("update:show", false); } } this.$emit("cancel"); }, // 点击遮罩 // 从原理上来说,modal的遮罩点击,并不是真的点击到了遮罩 // 因为modal依赖于popup的中部弹窗类型,中部弹窗比较特殊,虽有然遮罩,但是为了让弹窗内容能flex居中 // 多了一个透明的遮罩,此透明的遮罩会覆盖在灰色的遮罩上,所以实际上是点击不到灰色遮罩的,popup内部在 // 透明遮罩的子元素做了.stop处理,所以点击内容区,也不会导致误触发 clickHandler() { if (this.closeOnClickOverlay) { this.$emit("update:show", false); this.$emit("close"); } } } }; function _sfc_render$13(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); const _component_u_popup = resolveEasycom(vue.resolveDynamicComponent("u-popup"), __easycom_2); return vue.openBlock(), vue.createBlock(_component_u_popup, { mode: "center", zoom: _ctx.zoom, show: _ctx.show, class: vue.normalizeClass([_ctx.customClass]), customStyle: { borderRadius: "6px", overflow: "hidden", marginTop: `-${$options.addUnit(_ctx.negativeTop)}` }, closeOnClickOverlay: _ctx.closeOnClickOverlay, safeAreaInsetBottom: false, duration: _ctx.duration, onClick: $options.clickHandler }, { bottom: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "popupBottom", {}, void 0, true) ]), default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "u-modal", style: vue.normalizeStyle({ width: $options.addUnit(_ctx.width) }) }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-modal__title" }, vue.toDisplayString(_ctx.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-modal__content", style: vue.normalizeStyle($options.contentStyleCpu) }, [ vue.renderSlot(_ctx.$slots, "default", {}, () => [ vue.createElementVNode( "text", { class: "u-modal__content__text", style: vue.normalizeStyle({ textAlign: _ctx.contentTextAlign }) }, vue.toDisplayString(_ctx.content), 5 /* TEXT, STYLE */ ) ], true) ], 4 /* STYLE */ ), _ctx.$slots.confirmButton ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-modal__button-group--confirm-button" }, [ vue.renderSlot(_ctx.$slots, "confirmButton", {}, void 0, true) ])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ vue.createVNode(_component_u_line), vue.createElementVNode( "view", { class: "u-modal__button-group", style: vue.normalizeStyle({ flexDirection: _ctx.buttonReverse ? "row-reverse" : "row" }) }, [ _ctx.showCancelButton ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--cancel", [_ctx.showCancelButton && !_ctx.showConfirmButton && "u-modal__button-group__wrapper--only-cancel"]]), "hover-stay-time": 150, "hover-class": "u-modal__button-group__wrapper--hover", onClick: _cache[0] || (_cache[0] = (...args) => $options.cancelHandler && $options.cancelHandler(...args)) }, [ vue.createElementVNode( "text", { class: "u-modal__button-group__wrapper__text", style: vue.normalizeStyle({ color: _ctx.cancelColor }) }, vue.toDisplayString(_ctx.cancelText), 5 /* TEXT, STYLE */ ) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true), _ctx.showConfirmButton && _ctx.showCancelButton ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 1, direction: "column" })) : vue.createCommentVNode("v-if", true), _ctx.showConfirmButton ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: vue.normalizeClass(["u-modal__button-group__wrapper u-modal__button-group__wrapper--confirm", [!_ctx.showCancelButton && _ctx.showConfirmButton && "u-modal__button-group__wrapper--only-confirm"]]), "hover-stay-time": 150, "hover-class": "u-modal__button-group__wrapper--hover", onClick: _cache[1] || (_cache[1] = (...args) => $options.confirmHandler && $options.confirmHandler(...args)) }, [ $data.loading ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0 })) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-modal__button-group__wrapper__text", style: vue.normalizeStyle({ color: _ctx.confirmColor }) }, vue.toDisplayString(_ctx.confirmText), 5 /* TEXT, STYLE */ )) ], 2 /* CLASS */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 64 /* STABLE_FRAGMENT */ )) ], 4 /* STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["zoom", "show", "class", "customStyle", "closeOnClickOverlay", "duration", "onClick"]); } const uModal = /* @__PURE__ */ _export_sfc(_sfc_main$14, [["render", _sfc_render$13], ["__scopeId", "data-v-f667648f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-modal/u-modal.vue"]]); const __vite_glob_0_64 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uModal }, Symbol.toStringTag, { value: "Module" })); const props$D = defineMixin({ props: { // 是否开启顶部安全区适配 safeAreaInsetTop: { type: Boolean, default: () => true }, // 是否固定在顶部 fixed: { type: Boolean, default: () => true }, // 左边的图标 leftIcon: { type: String, default: "arrow-leftward" }, // 背景颜色 bgColor: { type: String, default: () => "rgba(0,0,0,.15)" }, // 导航栏高度 height: { type: [String, Number], default: () => "32px" }, // 图标的大小 iconSize: { type: [String, Number], default: "20px" }, // 图标的颜色 iconColor: { type: String, default: "#fff" }, // 点击左侧区域(返回图标),是否自动返回上一页 autoBack: { type: Boolean, default: () => true }, // 首页路径 homeUrl: { type: [String], default: "" } } }); const _sfc_main$13 = { name: "u-navbar-mini", mixins: [mpMixin, mixin, props$D], data() { return {}; }, emits: ["leftClick", "homeClick"], created() { }, methods: { addStyle, addUnit, sys, getPx, // 点击左侧区域 leftClick() { this.$emit("leftClick"); if (this.autoBack) { uni.navigateBack(); } }, homeClick() { if (this.homeUrl) { uni.reLaunch({ url: this.homeUrl }); } } } }; function _sfc_render$12(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$c); const _component_up_icon = vue.resolveComponent("up-icon"); const _component_up_line = vue.resolveComponent("up-line"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-navbar-mini", [_ctx.customClass]]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-navbar-mini__inner", [_ctx.fixed && "u-navbar-mini--fixed"]]) }, [ _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-navbar-mini__content", style: vue.normalizeStyle({ height: $options.addUnit(_ctx.height), backgroundColor: _ctx.bgColor }) }, [ vue.createElementVNode("view", { class: "u-navbar-mini__content__left", "hover-class": "u-navbar-mini__content__left--hover", "hover-start-time": "150", onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "left", {}, () => [ vue.createVNode(_component_up_icon, { name: _ctx.leftIcon, size: _ctx.iconSize, color: _ctx.iconColor }, null, 8, ["name", "size", "color"]) ], true) ]), vue.createElementVNode("view", { style: { "padding": "10px 10px" } }, [ vue.createVNode(_component_up_line, { direction: "col", color: "#fff", length: "16px" }) ]), vue.createElementVNode("view", { class: "u-navbar-mini__content__center", onClick: _cache[1] || (_cache[1] = (...args) => $options.homeClick && $options.homeClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "center", {}, () => [ vue.createVNode(_component_up_icon, { name: "home", size: _ctx.iconSize, color: _ctx.iconColor }, null, 8, ["size", "color"]) ], true) ]) ], 4 /* STYLE */ ) ], 2 /* CLASS */ ) ], 2 /* CLASS */ ); } const uNavbarMini = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["render", _sfc_render$12], ["__scopeId", "data-v-dc7ccfda"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-navbar-mini/u-navbar-mini.vue"]]); const __vite_glob_0_65 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uNavbarMini }, Symbol.toStringTag, { value: "Module" })); const props$C = defineMixin({ props: { // 是否开启顶部安全区适配 safeAreaInsetTop: { type: Boolean, default: () => props$1x.navbar.safeAreaInsetTop }, // 固定在顶部时,是否生成一个等高元素,以防止塌陷 placeholder: { type: Boolean, default: () => props$1x.navbar.placeholder }, // 是否固定在顶部 fixed: { type: Boolean, default: () => props$1x.navbar.fixed }, // 是否显示下边框 border: { type: Boolean, default: () => props$1x.navbar.border }, // 左边的图标 leftIcon: { type: String, default: () => props$1x.navbar.leftIcon }, // 左边的提示文字 leftText: { type: String, default: () => props$1x.navbar.leftText }, // 左右的提示文字 rightText: { type: String, default: () => props$1x.navbar.rightText }, // 右边的图标 rightIcon: { type: String, default: () => props$1x.navbar.rightIcon }, // 标题 title: { type: [String, Number], default: () => props$1x.navbar.title }, // 标题颜色 titleColor: { type: String, default: () => props$1x.navbar.titleColor }, // 背景颜色 bgColor: { type: String, default: () => props$1x.navbar.bgColor }, // 状态栏背景颜色 不写会使用背景颜色bgColor statusBarBgColor: { type: String, default: () => "" }, // 标题的宽度 titleWidth: { type: [String, Number], default: () => props$1x.navbar.titleWidth }, // 导航栏高度 height: { type: [String, Number], default: () => props$1x.navbar.height }, // 左侧返回图标的大小 leftIconSize: { type: [String, Number], default: () => props$1x.navbar.leftIconSize }, // 左侧返回图标的颜色 leftIconColor: { type: String, default: () => props$1x.navbar.leftIconColor }, // 点击左侧区域(返回图标),是否自动返回上一页 autoBack: { type: Boolean, default: () => props$1x.navbar.autoBack }, // 标题的样式,对象或字符串 titleStyle: { type: [String, Object], default: () => props$1x.navbar.titleStyle } } }); const _sfc_main$12 = { name: "u-navbar", mixins: [mpMixin, mixin, props$C], data() { return {}; }, emits: ["leftClick", "rightClick"], methods: { addStyle, addUnit, getWindowInfo, getPx, // 点击左侧区域 leftClick() { this.$emit("leftClick"); if (config$1.interceptor.navbarLeftClick != null) { config$1.interceptor.navbarLeftClick(); } else { if (this.autoBack) { uni.navigateBack(); } } }, // 点击右侧区域 rightClick() { this.$emit("rightClick"); } } }; function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$c); const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-navbar", [_ctx.customClass]]) }, [ _ctx.fixed && _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-navbar__placeholder", style: vue.normalizeStyle({ height: $options.addUnit($options.getPx(_ctx.height) + $options.getWindowInfo().statusBarHeight, "px") }) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass([_ctx.fixed && "u-navbar--fixed"]) }, [ _ctx.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0, bgColor: _ctx.statusBarBgColor ? _ctx.statusBarBgColor : _ctx.bgColor }, null, 8, ["bgColor"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-navbar__content", [_ctx.border && "u-border-bottom"]]), style: vue.normalizeStyle({ height: $options.addUnit(_ctx.height), backgroundColor: _ctx.bgColor }) }, [ vue.createElementVNode("view", { class: "u-navbar__content__left", "hover-class": "u-navbar__content__left--hover", "hover-start-time": "150", onClick: _cache[0] || (_cache[0] = (...args) => $options.leftClick && $options.leftClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "left", {}, () => [ _ctx.leftIcon ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: _ctx.leftIcon, size: _ctx.leftIconSize, color: _ctx.leftIconColor }, null, 8, ["name", "size", "color"])) : vue.createCommentVNode("v-if", true), _ctx.leftText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, style: vue.normalizeStyle({ color: _ctx.leftIconColor }), class: "u-navbar__content__left__text" }, vue.toDisplayString(_ctx.leftText), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], true) ]), vue.renderSlot(_ctx.$slots, "center", {}, () => [ vue.createElementVNode( "text", { class: "u-line-1 u-navbar__content__title", style: vue.normalizeStyle([{ width: $options.addUnit(_ctx.titleWidth), color: _ctx.titleColor }, $options.addStyle(_ctx.titleStyle)]) }, vue.toDisplayString(_ctx.title), 5 /* TEXT, STYLE */ ) ], true), _ctx.$slots.right || _ctx.rightIcon || _ctx.rightText ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-navbar__content__right", onClick: _cache[1] || (_cache[1] = (...args) => $options.rightClick && $options.rightClick(...args)) }, [ vue.renderSlot(_ctx.$slots, "right", {}, () => [ _ctx.rightIcon ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: _ctx.rightIcon, size: "20" }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true), _ctx.rightText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-navbar__content__right__text" }, vue.toDisplayString(_ctx.rightText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], true) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ) ], 2 /* CLASS */ ) ], 2 /* CLASS */ ); } const uNavbar = /* @__PURE__ */ _export_sfc(_sfc_main$12, [["render", _sfc_render$11], ["__scopeId", "data-v-f631659b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-navbar/u-navbar.vue"]]); const __vite_glob_0_66 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uNavbar }, Symbol.toStringTag, { value: "Module" })); const props$B = defineMixin({ props: { // 页面文字提示 tips: { type: String, default: () => props$1x.noNetwork.tips }, // 一个z-index值,用于设置没有网络这个组件的层次,因为页面可能会有其他定位的元素层级过高,导致此组件被覆盖 zIndex: { type: [String, Number], default: () => props$1x.noNetwork.zIndex }, // image 没有网络的图片提示 image: { type: String, default: () => props$1x.noNetwork.image } } }); const _sfc_main$11 = { name: "u-no-network", mixins: [mpMixin, mixin, props$B], data() { return { isConnected: true, // 是否有网络连接 networkType: "none" // 网络类型 }; }, mounted() { this.isIOS = getDeviceInfo().platform === "ios"; uni.onNetworkStatusChange((res) => { this.isConnected = res.isConnected; this.networkType = res.networkType; this.emitEvent(this.networkType); }); uni.getNetworkType({ success: (res) => { this.networkType = res.networkType; this.emitEvent(this.networkType); if (res.networkType == "none") { this.isConnected = false; } else { this.isConnected = true; } } }); }, emits: ["disconnected", "connected"], methods: { t: t$1, retry() { uni.getNetworkType({ success: (res) => { this.networkType = res.networkType; this.emitEvent(this.networkType); if (res.networkType == "none") { toast(t$1("up.noNetwork.disconnect")); this.isConnected = false; } else { toast(t$1("up.noNetwork.connect")); this.isConnected = true; } } }); this.$emit("retry"); }, // 发出事件给父组件 emitEvent(networkType) { this.$emit(networkType === "none" ? "disconnected" : "connected"); }, async openSettings() { if (this.networkType == "none") { this.openSystemSettings(); return; } }, openAppSettings() { this.gotoAppSetting(); }, openSystemSettings() { if (this.isIOS) { this.gotoiOSSetting(); } else { this.gotoAndroidSetting(); } }, network() { var result = null; var cellularData = plus.ios.newObject("CTCellularData"); var state = cellularData.plusGetAttribute("restrictedState"); if (state == 0) { result = null; } else if (state == 2) { result = 1; } else if (state == 1) { result = 2; } plus.ios.deleteObject(cellularData); return result; }, gotoAppSetting() { if (this.isIOS) { var UIApplication = plus.ios.import("UIApplication"); var application2 = UIApplication.sharedApplication(); var NSURL2 = plus.ios.import("NSURL"); var setting2 = NSURL2.URLWithString("app-settings:"); application2.openURL(setting2); plus.ios.deleteObject(setting2); plus.ios.deleteObject(NSURL2); plus.ios.deleteObject(application2); } else { var Intent = plus.android.importClass("android.content.Intent"); var Settings = plus.android.importClass("android.provider.Settings"); var Uri = plus.android.importClass("android.net.Uri"); var mainActivity = plus.android.runtimeMainActivity(); var intent = new Intent(); intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); var uri = Uri.fromParts("package", mainActivity.getPackageName(), null); intent.setData(uri); mainActivity.startActivity(intent); } }, gotoiOSSetting() { var UIApplication = plus.ios.import("UIApplication"); var application2 = UIApplication.sharedApplication(); var NSURL2 = plus.ios.import("NSURL"); var setting2 = NSURL2.URLWithString("App-prefs:root=General"); application2.openURL(setting2); plus.ios.deleteObject(setting2); plus.ios.deleteObject(NSURL2); plus.ios.deleteObject(application2); }, gotoAndroidSetting() { var Intent = plus.android.importClass("android.content.Intent"); var Settings = plus.android.importClass("android.provider.Settings"); var mainActivity = plus.android.runtimeMainActivity(); var intent = new Intent(Settings.ACTION_SETTINGS); mainActivity.startActivity(intent); } } }; function _sfc_render$10(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_button = resolveEasycom(vue.resolveDynamicComponent("u-button"), __easycom_0$8); const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d); return vue.openBlock(), vue.createBlock(_component_u_overlay, { show: !$data.isConnected, zIndex: _ctx.zIndex, onTouchmove: vue.withModifiers(_ctx.noop, ["stop", "prevent"]), customStyle: { backgroundColor: "#fff", display: "flex", justifyContent: "center" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-no-network" }, [ vue.createVNode(_component_up_icon, { name: _ctx.image, size: "150", imgMode: "widthFit", class: "u-no-network__error-icon" }, null, 8, ["name"]), vue.createElementVNode( "text", { class: "u-no-network__tips" }, vue.toDisplayString(_ctx.tips), 1 /* TEXT */ ), vue.createCommentVNode(" 只有APP平台,才能跳转设置页,因为需要调用plus环境 "), vue.createElementVNode("view", { class: "u-no-network__app" }, [ vue.createElementVNode( "text", { class: "u-no-network__app__setting" }, vue.toDisplayString($options.t("up.noNetwork.pleaseCheck")), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "u-no-network__app__to-setting", onClick: _cache[0] || (_cache[0] = (...args) => $options.openSettings && $options.openSettings(...args)) }, vue.toDisplayString($options.t("up.common.settings")), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "u-no-network__retry" }, [ vue.createVNode(_component_u_button, { size: "mini", text: $options.t("up.common.retry"), type: "primary", plain: "", onClick: $options.retry }, null, 8, ["text", "onClick"]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show", "zIndex", "onTouchmove"]); } const uNoNetwork = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["render", _sfc_render$10], ["__scopeId", "data-v-12a0c5bd"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-no-network/u-no-network.vue"]]); const __vite_glob_0_67 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uNoNetwork }, Symbol.toStringTag, { value: "Module" })); const props$A = defineMixin({ props: { // 显示的内容,字符串 text: { type: String, default: () => props$1x.rowNotice.text }, // 是否显示左侧的音量图标 icon: { type: String, default: () => props$1x.rowNotice.icon }, // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 mode: { type: String, default: () => props$1x.rowNotice.mode }, // 文字颜色,各图标也会使用文字颜色 color: { type: String, default: () => props$1x.rowNotice.color }, // 背景颜色 bgColor: { type: String, default: () => props$1x.rowNotice.bgColor }, // 字体大小,单位px fontSize: { type: [String, Number], default: () => props$1x.rowNotice.fontSize }, // 水平滚动时的滚动速度,即每秒滚动多少px(rpx),这有利于控制文字无论多少时,都能有一个恒定的速度 speed: { type: [String, Number], default: () => props$1x.rowNotice.speed } } }); const _sfc_main$10 = { name: "u-row-notice", mixins: [mpMixin, mixin, props$A], data() { return { animationDuration: "0", // 动画执行时间 animationPlayState: "paused", // 动画的开始和结束执行 // nvue下,内容发生变化,导致滚动宽度也变化,需要标志为是否需要重新计算宽度 // 不能在内容变化时直接重新计算,因为nvue的animation模块上一次的滚动不是刚好结束,会有影响 nvueInit: true, show: true }; }, watch: { text: { immediate: true, handler(newValue, oldValue) { this.vue(); if (!test.string(newValue)) { error("noticebar组件direction为row时,要求text参数为字符串形式"); } } }, fontSize() { this.vue(); }, speed() { this.vue(); } }, computed: { // 文字内容的样式 textStyle() { let style = {}; style.whiteSpace = "nowrap !important"; style.color = this.color; style.fontSize = addUnit(this.fontSize); return style; }, animationStyle() { let style = {}; style.animationDuration = this.animationDuration; style.animationPlayState = this.animationPlayState; return style; }, // 内部对用户传入的数据进一步分割,放到多个text标签循环,否则如果用户传入的字符串很长(100个字符以上) // 放在一个text标签中进行滚动,在低端安卓机上,动画可能会出现抖动现象,需要分割到多个text中可解决此问题 innerText() { let result = [], len = 20; const textArr = this.text.split(""); for (let i2 = 0; i2 < textArr.length; i2 += len) { result.push(textArr.slice(i2, i2 + len).join("")); } return result; } }, mounted() { var pages2 = getCurrentPages(); var page2 = pages2[pages2.length - 1]; var currentWebview = page2.$getAppWebview(); currentWebview.addEventListener("hide", () => { this.webviewHide = true; }); currentWebview.addEventListener("show", () => { this.webviewHide = false; }); this.init(); }, emits: ["click", "close"], methods: { init() { this.vue(); if (!test.string(this.text)) { error("noticebar组件direction为row时,要求text参数为字符串形式"); } }, // vue版处理 async vue() { let textWidth = 0; await sleep(); textWidth = (await this.$uGetRect(".u-notice__content__text")).width; (await this.$uGetRect(".u-notice__content")).width; this.animationDuration = `${textWidth / getPx(this.speed)}s`; this.animationPlayState = "paused"; setTimeout(() => { this.animationPlayState = "running"; }, 10); }, // nvue版处理 async nvue() { }, loopAnimation(textWidth, boxWidth) { }, getNvueRect(el) { }, // 点击通告栏 clickHandler(index2) { this.$emit("click"); }, // 点击右侧按钮,需要判断点击的是关闭图标还是箭头图标 close() { this.$emit("close"); } }, beforeUnmount() { this.stopAnimation = true; } }; function _sfc_render$$(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-notice", onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-notice__left-icon" }, [ vue.createVNode(_component_up_icon, { name: _ctx.icon, color: _ctx.color, size: "19" }, null, 8, ["name", "color"]) ])) : vue.createCommentVNode("v-if", true) ], true), vue.createElementVNode( "view", { class: "u-notice__content", ref: "u-notice__content" }, [ vue.createElementVNode( "view", { ref: "u-notice__content__text", class: "u-notice__content__text", style: vue.normalizeStyle([$options.animationStyle]) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.innerText, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "text", { key: index2, style: vue.normalizeStyle([$options.textStyle]) }, vue.toDisplayString(item), 5 /* TEXT, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ) ], 512 /* NEED_PATCH */ ), ["link", "closable"].includes(_ctx.mode) ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-notice__right-icon" }, [ _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: "arrow-right", size: 17, color: _ctx.color }, null, 8, ["color"])) : vue.createCommentVNode("v-if", true), _ctx.mode === "closable" ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, onClick: $options.close, name: "close", size: 16, color: _ctx.color }, null, 8, ["onClick", "color"])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]); } const __easycom_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$10, [["render", _sfc_render$$], ["__scopeId", "data-v-ab8dee7b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-row-notice/u-row-notice.vue"]]); const __vite_glob_0_88 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_1$1 }, Symbol.toStringTag, { value: "Module" })); const props$z = defineMixin({ props: { // 显示的内容,数组 text: { type: [Array, String], default: () => props$1x.noticeBar.text }, // 通告滚动模式,row-横向滚动,column-竖向滚动 direction: { type: String, default: () => props$1x.noticeBar.direction }, // direction = row时,是否使用步进形式滚动 step: { type: Boolean, default: () => props$1x.noticeBar.step }, // 是否显示左侧的音量图标 icon: { type: String, default: () => props$1x.noticeBar.icon }, // 通告模式,link-显示右箭头,closable-显示右侧关闭图标 mode: { type: String, default: () => props$1x.noticeBar.mode }, // 文字颜色,各图标也会使用文字颜色 color: { type: String, default: () => props$1x.noticeBar.color }, // 背景颜色 bgColor: { type: String, default: () => props$1x.noticeBar.bgColor }, // 水平滚动时的滚动速度,即每秒滚动多少px(px),这有利于控制文字无论多少时,都能有一个恒定的速度 speed: { type: [String, Number], default: () => props$1x.noticeBar.speed }, // 字体大小 fontSize: { type: [String, Number], default: () => props$1x.noticeBar.fontSize }, // 滚动一个周期的时间长,单位ms duration: { type: [String, Number], default: () => props$1x.noticeBar.duration }, // 是否禁止用手滑动切换 // 目前HX2.6.11,只支持App 2.5.5+、H5 2.5.5+、支付宝小程序、字节跳动小程序 disableTouch: { type: Boolean, default: () => props$1x.noticeBar.disableTouch }, // 跳转的页面路径 url: { type: String, default: () => props$1x.noticeBar.url }, // 页面跳转的类型 linkType: { type: String, default: () => props$1x.noticeBar.linkType }, justifyContent: { type: String, default: () => props$1x.noticeBar.justifyContent } } }); const _sfc_main$$ = { name: "u-notice-bar", mixins: [mpMixin, mixin, props$z], data() { return { show: true }; }, emits: ["click", "close"], methods: { addStyle, // 点击通告栏 click(index2) { this.$emit("click", index2); if (this.url && this.linkType) { this.openPage(); } }, // 点击关闭按钮 close() { this.show = false; this.$emit("close"); } } }; function _sfc_render$_(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_column_notice = resolveEasycom(vue.resolveDynamicComponent("u-column-notice"), __easycom_0$6); const _component_u_row_notice = resolveEasycom(vue.resolveDynamicComponent("u-row-notice"), __easycom_1$1); return $data.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-notice-bar", style: vue.normalizeStyle([{ backgroundColor: _ctx.bgColor }, $options.addStyle(_ctx.customStyle)]) }, [ _ctx.direction === "column" || _ctx.direction === "row" && _ctx.step ? (vue.openBlock(), vue.createBlock(_component_u_column_notice, { key: 0, color: _ctx.color, bgColor: _ctx.bgColor, text: _ctx.text, mode: _ctx.mode, step: _ctx.step, icon: _ctx.icon, "disable-touch": _ctx.disableTouch, fontSize: _ctx.fontSize, duration: _ctx.duration, justifyContent: _ctx.justifyContent, onClose: $options.close, onClick: $options.click }, null, 8, ["color", "bgColor", "text", "mode", "step", "icon", "disable-touch", "fontSize", "duration", "justifyContent", "onClose", "onClick"])) : (vue.openBlock(), vue.createBlock(_component_u_row_notice, { key: 1, color: _ctx.color, bgColor: _ctx.bgColor, text: _ctx.text, mode: _ctx.mode, fontSize: _ctx.fontSize, speed: _ctx.speed, url: _ctx.url, linkType: _ctx.linkType, icon: _ctx.icon, onClose: $options.close, onClick: $options.click }, null, 8, ["color", "bgColor", "text", "mode", "fontSize", "speed", "url", "linkType", "icon", "onClose", "onClick"])) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true); } const uNoticeBar = /* @__PURE__ */ _export_sfc(_sfc_main$$, [["render", _sfc_render$_], ["__scopeId", "data-v-54bd9363"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-notice-bar/u-notice-bar.vue"]]); const __vite_glob_0_68 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uNoticeBar }, Symbol.toStringTag, { value: "Module" })); const props$y = defineMixin({ props: { // 到顶部的距离 top: { type: [String, Number], default: () => props$1x.notify.top }, // 是否展示组件 // show: { // type: Boolean, // default: () => defProps.notify.show // }, // type主题,primary,success,warning,error type: { type: String, default: () => props$1x.notify.type }, // 字体颜色 color: { type: String, default: () => props$1x.notify.color }, // 背景颜色 bgColor: { type: String, default: () => props$1x.notify.bgColor }, // 展示的文字内容 message: { type: String, default: () => props$1x.notify.message }, // 展示时长,为0时不消失,单位ms duration: { type: [String, Number], default: () => props$1x.notify.duration }, // 字体大小 fontSize: { type: [String, Number], default: () => props$1x.notify.fontSize }, // 是否留出顶部安全距离(状态栏高度) safeAreaInsetTop: { type: Boolean, default: () => props$1x.notify.safeAreaInsetTop } } }); const _sfc_main$_ = { name: "u-notify", mixins: [mpMixin, mixin, props$y], data() { return { // 是否展示组件 open: false, timer: null, config: { // 到顶部的距离 top: props$1x.notify.top, // type主题,primary,success,warning,error type: props$1x.notify.type, // 字体颜色 color: props$1x.notify.color, // 背景颜色 bgColor: props$1x.notify.bgColor, // 展示的文字内容 message: props$1x.notify.message, // 展示时长,为0时不消失,单位ms duration: props$1x.notify.duration, // 字体大小 fontSize: props$1x.notify.fontSize, // 是否留出顶部安全距离(状态栏高度) safeAreaInsetTop: props$1x.notify.safeAreaInsetTop }, // 合并后的配置,避免多次调用组件后,可能会复用之前使用的配置参数 tmpConfig: {} }; }, computed: { containerStyle() { let top = 0; if (this.tmpConfig.top === 0) ; const style = { top: addUnit(this.tmpConfig.top === 0 ? top : this.tmpConfig.top), // 因为组件底层为u-transition组件,必须将其设置为fixed定位 // 让其出现在导航栏底部 position: "fixed", left: 0, right: 0, zIndex: 10076 }; return style; }, // 组件背景颜色 backgroundColor() { const style = {}; if (this.tmpConfig.bgColor) { style.backgroundColor = this.tmpConfig.bgColor; } return style; }, // 默认主题下的图标 icon() { let icon; if (this.tmpConfig.type === "success") { icon = "checkmark-circle"; } else if (this.tmpConfig.type === "error") { icon = "close-circle"; } else if (this.tmpConfig.type === "warning") { icon = "error-circle"; } return icon; } }, created() { ["primary", "success", "error", "warning"].map((item) => { this[item] = (message) => this.show({ type: item, message }); }); }, methods: { addStyle, addUnit, show(options2) { this.tmpConfig = deepMerge$1(this.config, options2); this.clearTimer(); this.open = true; if (this.tmpConfig.duration > 0) { this.timer = setTimeout(() => { this.open = false; this.clearTimer(); typeof this.tmpConfig.complete === "function" && this.tmpConfig.complete(); }, this.tmpConfig.duration); } }, // 关闭notify close() { this.clearTimer(); }, clearTimer() { this.open = false; clearTimeout(this.timer); this.timer = null; } }, beforeUnmount() { this.clearTimer(); } }; function _sfc_render$Z(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_status_bar = resolveEasycom(vue.resolveDynamicComponent("u-status-bar"), __easycom_0$c); const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createBlock(_component_u_transition, { mode: "slide-down", customStyle: $options.containerStyle, show: $data.open }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-notify", [`u-notify--${$data.tmpConfig.type}`]]), style: vue.normalizeStyle([$options.backgroundColor, $options.addStyle(_ctx.customStyle)]) }, [ $data.tmpConfig.safeAreaInsetTop ? (vue.openBlock(), vue.createBlock(_component_u_status_bar, { key: 0 })) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-notify__warpper" }, [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ ["success", "warning", "error"].includes($data.tmpConfig.type) ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: $data.tmpConfig.icon, color: $data.tmpConfig.color, size: 1.3 * $data.tmpConfig.fontSize, customStyle: { marginRight: "4px" } }, null, 8, ["name", "color", "size"])) : vue.createCommentVNode("v-if", true) ], true), vue.createElementVNode( "text", { class: "u-notify__warpper__text", style: vue.normalizeStyle({ fontSize: $options.addUnit($data.tmpConfig.fontSize), color: $data.tmpConfig.color }) }, vue.toDisplayString($data.tmpConfig.message), 5 /* TEXT, STYLE */ ) ]) ], 6 /* CLASS, STYLE */ ) ]), _: 3 /* FORWARDED */ }, 8, ["customStyle", "show"]); } const uNotify = /* @__PURE__ */ _export_sfc(_sfc_main$_, [["render", _sfc_render$Z], ["__scopeId", "data-v-67836363"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-notify/u-notify.vue"]]); const __vite_glob_0_69 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uNotify }, Symbol.toStringTag, { value: "Module" })); const props$x = defineMixin({ props: { // 步进器标识符,在change回调返回 name: { type: [String, Number], default: () => props$1x.numberBox.name }, // 用于双向绑定的值,初始化时设置设为默认min值(最小值) modelValue: { type: [String, Number], default: () => props$1x.numberBox.value }, // 最小值 min: { type: [String, Number], default: () => props$1x.numberBox.min }, // 最大值 max: { type: [String, Number], default: () => props$1x.numberBox.max }, // 加减的步长,可为小数 step: { type: [String, Number], default: () => props$1x.numberBox.step }, // 是否只允许输入整数 integer: { type: Boolean, default: () => props$1x.numberBox.integer }, // 是否禁用,包括输入框,加减按钮 disabled: { type: Boolean, default: () => props$1x.numberBox.disabled }, // 是否禁用输入框 disabledInput: { type: Boolean, default: () => props$1x.numberBox.disabledInput }, // 是否开启异步变更,开启后需要手动控制输入值 asyncChange: { type: Boolean, default: () => props$1x.numberBox.asyncChange }, // 输入框宽度,单位为px inputWidth: { type: [String, Number], default: () => props$1x.numberBox.inputWidth }, // 是否显示减少按钮 showMinus: { type: Boolean, default: () => props$1x.numberBox.showMinus }, // 是否显示增加按钮 showPlus: { type: Boolean, default: () => props$1x.numberBox.showPlus }, // 显示的小数位数 decimalLength: { type: [String, Number, null], default: () => props$1x.numberBox.decimalLength }, // 是否开启长按加减手势 longPress: { type: Boolean, default: () => props$1x.numberBox.longPress }, // 输入框文字和加减按钮图标的颜色 color: { type: String, default: () => props$1x.numberBox.color }, // 按钮宽度 buttonWidth: { type: [String, Number], default: () => props$1x.numberBox.buttonWidth }, // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致 buttonSize: { type: [String, Number], default: () => props$1x.numberBox.buttonSize }, // 按钮圆角 buttonRadius: { type: [String], default: () => props$1x.numberBox.buttonRadius }, // 输入框和按钮的背景颜色 bgColor: { type: String, default: () => props$1x.numberBox.bgColor }, // 按钮禁用背景色 disabledBgColor: { type: String, default: () => props$1x.numberBox.disabledBgColor }, // 输入框背景颜色 inputBgColor: { type: String, default: () => props$1x.numberBox.inputBgColor }, // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px cursorSpacing: { type: [String, Number], default: () => props$1x.numberBox.cursorSpacing }, // 是否禁用增加按钮 disablePlus: { type: Boolean, default: () => props$1x.numberBox.disablePlus }, // 是否禁用减少按钮 disableMinus: { type: Boolean, default: () => props$1x.numberBox.disableMinus }, // 加减按钮图标的样式 iconStyle: { type: [Object, String], default: () => props$1x.numberBox.iconStyle }, // 迷你模式 miniMode: { type: Boolean, default: () => props$1x.numberBox.miniMode } } }); const _sfc_main$Z = { name: "u-number-box", mixins: [mpMixin, mixin, props$x], data() { return { // 输入框实际操作的值 currentValue: "", // 定时器 longPressTimer: null }; }, watch: { // 多个值之间,只要一个值发生变化,都要重新检查check()函数 watchChange(n2) { this.check(); }, // 监听v-mode的变化,重新初始化内部的值 modelValue: { handler: function(newV, oldV) { if (newV !== this.currentValue) { this.currentValue = this.format(this.modelValue); } }, immediate: true } }, computed: { hideMinus() { return this.currentValue == 0 && this.miniMode == true; }, getCursorSpacing() { return getPx(this.cursorSpacing); }, // 按钮的样式 buttonStyle() { return (type2) => { const style = { backgroundColor: this.bgColor, width: addUnit(this.buttonWidth), height: addUnit(this.buttonSize), color: this.color, borderRadius: this.buttonRadius }; if (this.isDisabled(type2)) { style.backgroundColor = this.disabledBgColor; } return style; }; }, // 输入框的样式 inputStyle() { this.disabled || this.disabledInput; const style = { color: this.color, backgroundColor: this.inputBgColor || this.bgColor, height: addUnit(this.buttonSize), width: addUnit(this.inputWidth) }; return style; }, // 用于监听多个值发生变化 watchChange() { return [this.integer, this.decimalLength, this.min, this.max]; }, isDisabled() { return (type2) => { if (type2 === "plus") { return this.disabled || this.disablePlus || this.currentValue >= this.max; } return this.disabled || this.disableMinus || this.currentValue <= this.min; }; } }, mounted() { this.init(); }, emits: ["update:modelValue", "focus", "blur", "overlimit", "change", "plus", "minus"], methods: { init() { this.currentValue = this.format(this.modelValue); }, // 格式化整理数据,限制范围 format(value2) { value2 = this.filter(value2); value2 = value2 === "" ? 0 : +value2; value2 = Math.max(Math.min(this.max, value2), this.min); if (this.decimalLength !== null) { value2 = value2.toFixed(this.decimalLength); } return value2; }, // 过滤非法的字符 filter(value2) { value2 = String(value2).replace(/[^0-9.-]/g, ""); if (this.integer && value2.indexOf(".") !== -1) { value2 = value2.split(".")[0]; } return value2; }, check() { const val = this.format(this.currentValue); if (val !== this.currentValue) { this.currentValue = val; this.emitChange(val); } }, // 判断是否出于禁止操作状态 // isDisabled(type) { // if (type === 'plus') { // // 在点击增加按钮情况下,判断整体的disabled,是否单独禁用增加按钮,以及当前值是否大于最大的允许值 // return ( // this.disabled || // this.disablePlus || // this.currentValue >= this.max // ) // } // // 点击减少按钮同理 // return ( // this.disabled || // this.disableMinus || // this.currentValue <= this.min // ) // }, // 输入框活动焦点 onFocus(event) { this.$emit("focus", { ...event.detail, name: this.name }); }, // 输入框失去焦点 onBlur(event) { this.format(event.detail.value); this.$emit( "blur", { ...event.detail, name: this.name } ); }, // 输入框值发生变化 onInput(e2) { const { value: value2 = "" } = e2.detail || {}; if (value2 === "") { this.emitChange(this.min); return; } let formatted = this.filter(value2); this.emitChange(value2); if (this.decimalLength !== null && formatted.indexOf(".") !== -1) { const pair = formatted.split("."); formatted = `${pair[0]}.${pair[1].slice(0, this.decimalLength)}`; } formatted = this.format(formatted); this.emitChange(formatted); }, // 发出change事件,type目前只支持点击时有值,手动输入不支持。 emitChange(value2, type2 = "") { if (!this.asyncChange) { this.$nextTick(() => { this.$emit("update:modelValue", value2); this.currentValue = value2; this.$forceUpdate(); }); } this.$emit("change", { value: value2, name: this.name, type: type2 // 当前变更类型 }); }, onChange() { const { type: type2 } = this; if (this.isDisabled(type2)) { return this.$emit("overlimit", type2); } const diff = type2 === "minus" ? -this.step : +this.step; const value2 = this.format(this.add(+this.currentValue, diff)); this.emitChange(value2, type2); this.$emit(type2); }, // 对值扩大后进行四舍五入,再除以扩大因子,避免出现浮点数操作的精度问题 add(num1, num2) { const cardinal = Math.pow(10, 10); return Math.round((num1 + num2) * cardinal) / cardinal; }, // 点击加减按钮 clickHandler(type2) { this.type = type2; this.onChange(); }, longPressStep() { this.clearTimeout(); this.longPressTimer = setTimeout(() => { this.onChange(); this.longPressStep(); }, 250); }, onTouchStart(type2) { if (!this.longPress) return; this.clearTimeout(); this.type = type2; this.longPressTimer = setTimeout(() => { this.onChange(); this.longPressStep(); }, 600); }, // 触摸结束,清除定时器,停止长按加减 onTouchEnd() { if (!this.longPress) return; this.clearTimeout(); }, // 清除定时器 clearTimeout() { clearTimeout(this.longPressTimer); this.longPressTimer = null; } } }; function _sfc_render$Y(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-number-box" }, [ _ctx.showMinus && !$options.hideMinus && _ctx.$slots.minus ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-number-box__slot cursor-pointer", onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])), onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart("minus")), onTouchend: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])) }, [ vue.renderSlot(_ctx.$slots, "minus", {}, void 0, true) ], 32 /* NEED_HYDRATION */ )) : _ctx.showMinus && !$options.hideMinus ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass(["u-number-box__minus cursor-pointer", { "u-number-box__minus--disabled": $options.isDisabled("minus") }]), onClick: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $options.clickHandler("minus"), ["stop"])), onTouchstart: _cache[4] || (_cache[4] = ($event) => $options.onTouchStart("minus")), onTouchend: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])), "hover-class": "u-number-box__minus--hover", "hover-stay-time": "150", style: vue.normalizeStyle([$options.buttonStyle("minus")]) }, [ vue.createVNode(_component_up_icon, { name: "minus", color: $options.isDisabled("minus") ? "#c8c9cc" : "#323233", size: "15", bold: "", customStyle: _ctx.iconStyle }, null, 8, ["color", "customStyle"]) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), !$options.hideMinus ? vue.renderSlot(_ctx.$slots, "input", { key: 2 }, () => [ vue.withDirectives(vue.createElementVNode("input", { disabled: _ctx.disabledInput || _ctx.disabled, "cursor-spacing": $options.getCursorSpacing, class: vue.normalizeClass([{ "u-number-box__input--disabled": _ctx.disabled || _ctx.disabledInput }, "u-number-box__input"]), "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.currentValue = $event), onBlur: _cache[7] || (_cache[7] = (...args) => $options.onBlur && $options.onBlur(...args)), onFocus: _cache[8] || (_cache[8] = (...args) => $options.onFocus && $options.onFocus(...args)), onInput: _cache[9] || (_cache[9] = (...args) => $options.onInput && $options.onInput(...args)), type: "number", style: vue.normalizeStyle([$options.inputStyle]) }, null, 46, ["disabled", "cursor-spacing"]), [ [vue.vModelText, $data.currentValue] ]) ], true) : vue.createCommentVNode("v-if", true), _ctx.showPlus && _ctx.$slots.plus ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "u-number-box__slot cursor-pointer", onClick: _cache[10] || (_cache[10] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])), onTouchstart: _cache[11] || (_cache[11] = ($event) => $options.onTouchStart("plus")), onTouchend: _cache[12] || (_cache[12] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])) }, [ vue.renderSlot(_ctx.$slots, "plus", {}, void 0, true) ], 32 /* NEED_HYDRATION */ )) : _ctx.showPlus ? (vue.openBlock(), vue.createElementBlock( "view", { key: 4, class: vue.normalizeClass(["u-number-box__plus cursor-pointer", { "u-number-box__minus--disabled": $options.isDisabled("plus") }]), onClick: _cache[13] || (_cache[13] = vue.withModifiers(($event) => $options.clickHandler("plus"), ["stop"])), onTouchstart: _cache[14] || (_cache[14] = ($event) => $options.onTouchStart("plus")), onTouchend: _cache[15] || (_cache[15] = vue.withModifiers((...args) => $options.clearTimeout && $options.clearTimeout(...args), ["stop"])), "hover-class": "u-number-box__plus--hover", "hover-stay-time": "150", style: vue.normalizeStyle([$options.buttonStyle("plus")]) }, [ vue.createVNode(_component_up_icon, { name: "plus", color: $options.isDisabled("plus") ? "#c8c9cc" : "#323233", size: "15", bold: "", customStyle: _ctx.iconStyle }, null, 8, ["color", "customStyle"]) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true) ]); } const uNumberBox = /* @__PURE__ */ _export_sfc(_sfc_main$Z, [["render", _sfc_render$Y], ["__scopeId", "data-v-eb6f6237"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-number-box/u-number-box.vue"]]); const __vite_glob_0_70 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uNumberBox }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$Y = { name: "u-pagination", props: { // 当前页码 currentPage: { type: Number, default: 1 }, // 每页条目数 pageSize: { type: Number, default: 10 }, // 总数据条目数 total: { type: Number, default: 0 }, // 上一页按钮文案 prevText: { type: String, default: "" }, // 下一页按钮文案 nextText: { type: String, default: "" }, buttonBgColor: { type: String, default: "#f5f7fa" }, buttonBorderColor: { type: String, default: "#dcdfe6" }, // 可选的每页条目数 pageSizes: { type: Array, default: () => [10, 20, 30, 40, 50] }, // 布局方式(类似 el-pagination) layout: { type: String, default: "prev, pager, next" }, // 是否隐藏只有一个页面时的分页控件 hideOnSinglePage: { type: Boolean, default: false } }, emits: ["update:currentPage", "update:pageSize", "current-change", "size-change"], data() { return { currentPageInput: this.currentPage + "" }; }, computed: { totalPages() { return Math.max(1, Math.ceil(this.total / this.pageSize)); }, pageSizeIndex() { const index2 = this.pageSizes.findIndex((size) => size.value === this.pageSize); return index2 >= 0 ? index2 : 0; }, pageSizeLabel() { const found = this.pageSizes.find((size) => size.value === this.pageSize); return (found == null ? void 0 : found.label) || this.pageSize; }, displayedPages() { const total = this.totalPages; const current = this.currentPage; if (total <= 4) { return Array.from({ length: total }, (_2, i2) => i2 + 1); } const pages2 = []; if (current <= 2) { for (let i2 = 1; i2 <= 4; i2++) { pages2.push(i2); } pages2.push("..."); pages2.push(total); } else if (current >= total - 1) { pages2.push(1); pages2.push("..."); for (let i2 = total - 3; i2 <= total; i2++) { pages2.push(i2); } } else { pages2.push(1); pages2.push("..."); pages2.push(current - 1); pages2.push(current); pages2.push(current + 1); pages2.push("..."); pages2.push(total); } return pages2; } // 控制是否隐藏 }, watch: { currentPage(val) { this.currentPageInput = val + ""; } }, methods: { t: t$1, handleSizeChange(e2) { var _a2; const selected = e2.detail.value; const size = ((_a2 = this.pageSizes[selected]) == null ? void 0 : _a2.value) || this.pageSizes[0].value; this.$emit("update:pageSize", size); this.$emit("size-change", size); }, prev() { if (this.currentPage > 1) { this.goTo(this.currentPage - 1); } }, next() { if (this.currentPage < this.totalPages) { this.goTo(this.currentPage + 1); } }, goTo(page2) { if (page2 === "..." || page2 === this.currentPage) return; this.$emit("update:currentPage", page2); this.$emit("current-change", page2); }, onInputPage(e2) { this.currentPageInput = e2.detail.value; }, onConfirmPage(e2) { const num = parseInt(e2.detail.value); if (!isNaN(num) && num >= 1 && num <= this.totalPages) { this.goTo(num); } } } }; function _sfc_render$X(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-pagination" }, [ vue.createCommentVNode(" 上一页按钮 "), vue.createElementVNode( "view", { class: vue.normalizeClass([ "u-pagination-btn", { disabled: $props.currentPage === 1 } ]), style: vue.normalizeStyle({ backgroundColor: $props.buttonBgColor, borderColor: $props.buttonBorderColor }), onClick: _cache[0] || (_cache[0] = (...args) => $options.prev && $options.prev(...args)) }, [ $props.prevText ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString($props.prevText), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, name: "arrow-left" })) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 页码列表 "), $props.layout.includes("pager") ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($options.displayedPages, (page2) => { return vue.openBlock(), vue.createElementBlock("view", { key: page2, class: vue.normalizeClass([ "u-pagination-item", { active: page2 === $props.currentPage } ]), onClick: ($event) => $options.goTo(page2) }, vue.toDisplayString(page2), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 总数显示 "), $props.total > 0 && $props.layout.includes("total") ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-pagination-total" }, vue.toDisplayString($props.currentPage) + " / " + vue.toDisplayString($options.totalPages), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 每页数量选择器 "), vue.createCommentVNode(` \r {{ pageSizeLabel }}\r `), vue.createCommentVNode(" 下一页按钮 "), vue.createElementVNode( "view", { class: vue.normalizeClass([ "u-pagination-btn", { disabled: $props.currentPage === $options.totalPages } ]), style: vue.normalizeStyle({ backgroundColor: $props.buttonBgColor, borderColor: $props.buttonBorderColor }), onClick: _cache[1] || (_cache[1] = (...args) => $options.next && $options.next(...args)) }, [ $props.nextText ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString($props.nextText), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, name: "arrow-right" })) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 跳转输入框 "), vue.createCommentVNode(` \r 前往\r \r \r `) ]); } const uPagination = /* @__PURE__ */ _export_sfc(_sfc_main$Y, [["render", _sfc_render$X], ["__scopeId", "data-v-c04d6295"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-pagination/u-pagination.vue"]]); const __vite_glob_0_73 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uPagination }, Symbol.toStringTag, { value: "Module" })); const block0$2 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("handler"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["handler"] = "155ce918"; }; const _sfc_main$X = { name: "node", options: {}, data() { return { ctrl: {} }; }, props: { name: String, attrs: { type: Object, default() { return {}; } }, childs: Array, opts: Array }, components: {}, mounted() { this.$nextTick(() => { var _a2, _b; for (this.root = this == null ? void 0 : this.$parent; this.root && ((_a2 = this.root) == null ? void 0 : _a2.$options.name) !== "mp-html"; this.root = (_b = this.root) == null ? void 0 : _b.$parent) ; }); if (this.opts[0]) { let i2; for (i2 = this.childs.length; i2--; ) { if (this.childs[i2].name === "img") break; } if (i2 !== -1) { this.observer = uni.createIntersectionObserver(this).relativeToViewport({ top: 500, bottom: 500 }); this.observer.observe("._img", (res) => { if (res.intersectionRatio) { this.$set(this.ctrl, "load", 1); this.observer.disconnect(); } }); } } }, beforeDestroy() { if (this.observer) { this.observer.disconnect(); } }, methods: { /** * @description 播放视频事件 * @param {Event} e */ play(e2) { const i2 = e2.currentTarget.dataset.i; const node2 = this.childs[i2]; this.root.$emit("play", { source: node2.name, attrs: { ...node2.attrs, src: node2.src[this.ctrl[i2] || 0] } }); }, /** * @description 图片点击事件 * @param {Event} e */ imgTap(e2) { const node2 = this.childs[e2.currentTarget.dataset.i]; if (node2.a) { this.linkTap(node2.a); return; } if (node2.attrs.ignore) return; node2.attrs.src = node2.attrs.src || node2.attrs["data-src"]; this.root.$emit("imgtap", node2.attrs); if (this.root.previewImg) { uni.previewImage({ current: parseInt(node2.attrs.i), urls: this.root.imgList }); } }, /** * @description 图片长按 */ imgLongTap(e2) { const attrs = this.childs[e2.currentTarget.dataset.i].attrs; if (this.opts[3] && !attrs.ignore) { uni.showActionSheet({ itemList: ["保存图片"], success: () => { const save = (path) => { uni.saveImageToPhotosAlbum({ filePath: path, success() { uni.showToast({ title: "保存成功" }); } }); }; if (this.root.imgList[attrs.i].startsWith("http")) { uni.downloadFile({ url: this.root.imgList[attrs.i], success: (res) => save(res.tempFilePath) }); } else { save(this.root.imgList[attrs.i]); } } }); } }, /** * @description 图片加载完成事件 * @param {Event} e */ imgLoad(e2) { const i2 = e2.currentTarget.dataset.i; if (!this.childs[i2].w) { this.$set(this.ctrl, i2, e2.detail.width); } else if (this.opts[1] && !this.ctrl[i2] || this.ctrl[i2] === -1) { this.$set(this.ctrl, i2, 1); } this.checkReady(); }, /** * @description 检查是否所有图片加载完毕 */ checkReady() { if (this.root && !this.root.lazyLoad) { this.root._unloadimgs -= 1; if (!this.root._unloadimgs) { setTimeout(() => { this.root.getRect().then((rect) => { this.root.$emit("ready", rect); }).catch(() => { this.root.$emit("ready", {}); }); }, 350); } } }, /** * @description 链接点击事件 * @param {Event} e */ linkTap(e2) { const node2 = e2.currentTarget ? this.childs[e2.currentTarget.dataset.i] : {}; const attrs = node2.attrs || e2; const href = attrs.href; this.root.$emit("linktap", Object.assign({ innerText: this.root.getText(node2.children || []) // 链接内的文本内容 }, attrs)); if (href) { if (href[0] === "#") { this.root.navigateTo(href.substring(1)).catch(() => { }); } else if (href.split("?")[0].includes("://")) { if (this.root.copyLink) { plus.runtime.openWeb(href); } } else { uni.navigateTo({ url: href, fail() { uni.switchTab({ url: href, fail() { } }); } }); } } }, /** * @description 错误事件 * @param {Event} e */ mediaError(e2) { const i2 = e2.currentTarget.dataset.i; const node2 = this.childs[i2]; if (node2.name === "video" || node2.name === "audio") { let index2 = (this.ctrl[i2] || 0) + 1; if (index2 > node2.src.length) { index2 = 0; } if (index2 < node2.src.length) { this.$set(this.ctrl, i2, index2); return; } } else if (node2.name === "img") { if (this.opts[2]) { this.$set(this.ctrl, i2, -1); } this.checkReady(); } if (this.root) { this.root.$emit("error", { source: node2.name, attrs: node2.attrs, errMsg: e2.detail.errMsg }); } } } }; function _sfc_render$W(_ctx, _cache, $props, $setup, $data, $options) { const _component_node = vue.resolveComponent("node", true); return vue.openBlock(), vue.createElementBlock("view", { id: $props.attrs.id, class: vue.normalizeClass("_block _" + $props.name + " " + $props.attrs.class), style: vue.normalizeStyle($props.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.childs, (n2, i2) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: i2 }, [ vue.createCommentVNode(" 图片 "), vue.createCommentVNode(" 占位图 "), n2.name === "img" && !n2.t && ($props.opts[1] && !$data.ctrl[i2] || $data.ctrl[i2] < 0) ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "_img", style: vue.normalizeStyle(n2.attrs.style), src: $data.ctrl[i2] < 0 ? $props.opts[2] : $props.opts[1], mode: "widthFix" }, null, 12, ["src"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 显示图片 "), vue.createCommentVNode(" 表格中的图片,使用 rich-text 防止大小不正确 "), n2.name === "img" && n2.t ? (vue.openBlock(), vue.createElementBlock("rich-text", { key: 1, style: vue.normalizeStyle("display:" + n2.t), nodes: [{ attrs: { style: n2.attrs.style || "", src: n2.attrs.src }, name: "img" }], "data-i": i2, onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])) }, null, 12, ["nodes", "data-i"])) : n2.name === "img" ? (vue.openBlock(), vue.createElementBlock("image", { key: 2, id: n2.attrs.id, class: vue.normalizeClass("_img " + n2.attrs.class), style: vue.normalizeStyle(($data.ctrl[i2] === -1 ? "display:none;" : "") + "width:" + ($data.ctrl[i2] || 1) + "px;" + n2.attrs.style), src: n2.attrs.src || ($data.ctrl.load ? n2.attrs["data-src"] : ""), mode: !n2.h ? "widthFix" : !n2.w ? "heightFix" : n2.m || "", "data-i": i2, onLoad: _cache[1] || (_cache[1] = (...args) => $options.imgLoad && $options.imgLoad(...args)), onError: _cache[2] || (_cache[2] = (...args) => $options.mediaError && $options.mediaError(...args)), onClick: _cache[3] || (_cache[3] = vue.withModifiers((...args) => $options.imgTap && $options.imgTap(...args), ["stop"])), onLongpress: _cache[4] || (_cache[4] = (...args) => $options.imgLongTap && $options.imgLongTap(...args)) }, null, 46, ["id", "src", "mode", "data-i"])) : n2.text ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 3 }, [ vue.createCommentVNode(" 文本 "), vue.createElementVNode( "text", { decode: "" }, vue.toDisplayString(n2.text), 1 /* TEXT */ ) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n2.name === "br" ? (vue.openBlock(), vue.createElementBlock("text", { key: 4 }, vue.toDisplayString("\n"))) : n2.name === "a" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 5 }, [ vue.createCommentVNode(" 链接 "), vue.createElementVNode("view", { id: n2.attrs.id, class: vue.normalizeClass((n2.attrs.href ? "_a " : "") + n2.attrs.class), "hover-class": "_hover", style: vue.normalizeStyle("display:inline;" + n2.attrs.style), "data-i": i2, onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.linkTap && $options.linkTap(...args), ["stop"])) }, [ vue.createVNode(_component_node, { name: "span", childs: n2.children, opts: $props.opts, style: { "display": "inherit" } }, null, 8, ["childs", "opts"]) ], 14, ["id", "data-i"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n2.html ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 6 }, [ vue.createCommentVNode(" 视频 "), vue.createElementVNode("view", { id: n2.attrs.id, class: vue.normalizeClass("_video " + n2.attrs.class), style: vue.normalizeStyle(n2.attrs.style), innerHTML: n2.html, "data-i": i2, onVplay: _cache[6] || (_cache[6] = vue.withModifiers((...args) => $options.play && $options.play(...args), ["stop"])) }, null, 46, ["id", "innerHTML", "data-i"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n2.name === "iframe" ? (vue.openBlock(), vue.createElementBlock("iframe", { key: 7, style: vue.normalizeStyle(n2.attrs.style), allowfullscreen: n2.attrs.allowfullscreen, frameborder: n2.attrs.frameborder, src: n2.attrs.src }, null, 12, ["allowfullscreen", "frameborder", "src"])) : n2.name === "embed" ? (vue.openBlock(), vue.createElementBlock("embed", { key: 8, style: vue.normalizeStyle(n2.attrs.style), src: n2.attrs.src }, null, 12, ["src"])) : n2.name === "table" && n2.c || n2.name === "li" ? (vue.openBlock(), vue.createElementBlock("view", { key: 9, id: n2.attrs.id, class: vue.normalizeClass("_" + n2.name + " " + n2.attrs.class), style: vue.normalizeStyle(n2.attrs.style) }, [ n2.name === "li" ? (vue.openBlock(), vue.createBlock(_component_node, { key: 0, childs: n2.children, opts: $props.opts }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(n2.children, (tbody, x2) => { return vue.openBlock(), vue.createElementBlock( "view", { key: x2, class: vue.normalizeClass("_" + tbody.name + " " + tbody.attrs.class), style: vue.normalizeStyle(tbody.attrs.style) }, [ tbody.name === "td" || tbody.name === "th" ? (vue.openBlock(), vue.createBlock(_component_node, { key: 0, childs: tbody.children, opts: $props.opts }, null, 8, ["childs", "opts"])) : (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 1 }, vue.renderList(tbody.children, (tr, y2) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: y2 }, [ tr.name === "td" || tr.name === "th" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class), style: vue.normalizeStyle(tr.attrs.style) }, [ vue.createVNode(_component_node, { childs: tr.children, opts: $props.opts }, null, 8, ["childs", "opts"]) ], 6 /* CLASS, STYLE */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass("_" + tr.name + " " + tr.attrs.class), style: vue.normalizeStyle(tr.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(tr.children, (td, z2) => { return vue.openBlock(), vue.createElementBlock( "view", { key: z2, class: vue.normalizeClass("_" + td.name + " " + td.attrs.class), style: vue.normalizeStyle(td.attrs.style) }, [ vue.createVNode(_component_node, { childs: td.children, opts: $props.opts }, null, 8, ["childs", "opts"]) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ )) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"])) : !n2.c ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 10 }, [ vue.createCommentVNode(" insert "), vue.createCommentVNode(" 富文本 "), vue.createElementVNode("rich-text", { id: n2.attrs.id, style: vue.normalizeStyle("display:inline;" + n2.f), preview: false, selectable: $props.opts[4], "user-select": $props.opts[4], nodes: [n2] }, null, 12, ["id", "selectable", "user-select", "nodes"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : n2.c === 2 ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 11 }, [ vue.createCommentVNode(" 继续递归 "), vue.createElementVNode("view", { id: n2.attrs.id, class: vue.normalizeClass("_block _" + n2.name + " " + n2.attrs.class), style: vue.normalizeStyle(n2.f + ";" + n2.attrs.style) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(n2.children, (n22, j2) => { return vue.openBlock(), vue.createBlock(_component_node, { key: j2, style: vue.normalizeStyle(n22.f), name: n22.name, attrs: n22.attrs, childs: n22.children, opts: $props.opts }, null, 8, ["style", "name", "attrs", "childs", "opts"]); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) : (vue.openBlock(), vue.createBlock(_component_node, { key: 12, style: vue.normalizeStyle(n2.f), name: n2.name, attrs: n2.attrs, childs: n2.children, opts: $props.opts }, null, 8, ["style", "name", "attrs", "childs", "opts"])) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 14, ["id"]); } if (typeof block0$2 === "function") block0$2(_sfc_main$X); const node = /* @__PURE__ */ _export_sfc(_sfc_main$X, [["render", _sfc_render$W], ["__scopeId", "data-v-1200d422"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-parse/node/node.vue"]]); const config = { // 信任的标签(保持标签名不变) trustTags: makeMap("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"), // 块级标签(转为 div,其他的非信任标签转为 span) blockTags: makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"), // 行内标签 inlineTags: makeMap("abbr,b,big,code,del,em,i,ins,label,q,small,span,strong,sub,sup"), // 要移除的标签 ignoreTags: makeMap("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"), // 自闭合的标签 voidTags: makeMap("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"), // html 实体 entities: { lt: "<", gt: ">", quot: '"', apos: "'", ensp: " ", emsp: " ", nbsp: " ", semi: ";", ndash: "–", mdash: "—", middot: "·", lsquo: "‘", rsquo: "’", ldquo: "“", rdquo: "”", bull: "•", hellip: "…", larr: "←", uarr: "↑", rarr: "→", darr: "↓" }, // 默认的标签样式 tagStyle: { address: "font-style:italic", big: "display:inline;font-size:1.2em", caption: "display:table-caption;text-align:center", center: "text-align:center", cite: "font-style:italic", dd: "margin-left:40px", mark: "background-color:yellow", pre: "font-family:monospace;white-space:pre", s: "text-decoration:line-through", small: "display:inline;font-size:0.8em", strike: "text-decoration:line-through", u: "text-decoration:underline" }, // svg 大小写对照表 svgDict: { animatetransform: "animateTransform", lineargradient: "linearGradient", viewbox: "viewBox", attributename: "attributeName", repeatcount: "repeatCount", repeatdur: "repeatDur", foreignobject: "foreignObject" } }; const tagSelector = {}; let windowWidth; const systemInfo = uni.getSystemInfoSync(); windowWidth = systemInfo.windowWidth; const blankChar = makeMap(" ,\r,\n, ,\f"); let idIndex = 0; config.ignoreTags.iframe = void 0; config.trustTags.iframe = true; config.ignoreTags.embed = void 0; config.trustTags.embed = true; function makeMap(str) { const map = /* @__PURE__ */ Object.create(null); const list = str.split(","); for (let i2 = list.length; i2--; ) { map[list[i2]] = true; } return map; } function decodeEntity(str, amp) { let i2 = str.indexOf("&"); while (i2 !== -1) { const j2 = str.indexOf(";", i2 + 3); let code2; if (j2 === -1) break; if (str[i2 + 1] === "#") { code2 = parseInt((str[i2 + 2] === "x" ? "0" : "") + str.substring(i2 + 2, j2)); if (!isNaN(code2)) { str = str.substr(0, i2) + String.fromCharCode(code2) + str.substr(j2 + 1); } } else { code2 = str.substring(i2 + 1, j2); if (config.entities[code2] || code2 === "amp" && amp) { str = str.substr(0, i2) + (config.entities[code2] || "&") + str.substr(j2 + 1); } } i2 = str.indexOf("&", i2 + 1); } return str; } function mergeNodes(nodes) { let i2 = nodes.length - 1; for (let j2 = i2; j2 >= -1; j2--) { if (j2 === -1 || nodes[j2].c || !nodes[j2].name || nodes[j2].name !== "div" && nodes[j2].name !== "p" && nodes[j2].name[0] !== "h" || (nodes[j2].attrs.style || "").includes("inline")) { if (i2 - j2 >= 5) { nodes.splice(j2 + 1, i2 - j2, { name: "div", attrs: {}, children: nodes.slice(j2 + 1, i2 + 1) }); } i2 = j2 - 1; } } } function Parser(vm) { this.options = vm || {}; this.tagStyle = Object.assign({}, config.tagStyle, this.options.tagStyle); this.imgList = vm.imgList || []; this.imgList._unloadimgs = 0; this.plugins = vm.plugins || []; this.attrs = /* @__PURE__ */ Object.create(null); this.stack = []; this.nodes = []; this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0; } Parser.prototype.parse = function(content) { for (let i2 = this.plugins.length; i2--; ) { if (this.plugins[i2].onUpdate) { content = this.plugins[i2].onUpdate(content, config) || content; } } new Lexer(this).parse(content); while (this.stack.length) { this.popNode(); } if (this.nodes.length > 50) { mergeNodes(this.nodes); } return this.nodes; }; Parser.prototype.expose = function() { for (let i2 = this.stack.length; i2--; ) { const item = this.stack[i2]; if (item.c || item.name === "a" || item.name === "video" || item.name === "audio") return; item.c = 1; } }; Parser.prototype.hook = function(node2) { for (let i2 = this.plugins.length; i2--; ) { if (this.plugins[i2].onParse && this.plugins[i2].onParse(node2, this) === false) { return false; } } return true; }; Parser.prototype.getUrl = function(url2) { const domain2 = this.options.domain; if (url2[0] === "/") { if (url2[1] === "/") { url2 = (domain2 ? domain2.split("://")[0] : "http") + ":" + url2; } else if (domain2) { url2 = domain2 + url2; } else { url2 = plus.io.convertLocalFileSystemURL(url2); } } else if (!url2.includes("data:") && !url2.includes("://")) { if (domain2) { url2 = domain2 + "/" + url2; } else { url2 = plus.io.convertLocalFileSystemURL(url2); } } return url2; }; Parser.prototype.parseStyle = function(node2) { const attrs = node2.attrs; const list = (this.tagStyle[node2.name] || "").split(";").concat((attrs.style || "").split(";")); const styleObj = {}; let tmp = ""; if (attrs.id && !this.xml) { if (this.options.useAnchor) { this.expose(); } else if (node2.name !== "img" && node2.name !== "a" && node2.name !== "video" && node2.name !== "audio") { attrs.id = void 0; } } if (attrs.width) { styleObj.width = parseFloat(attrs.width) + (attrs.width.includes("%") ? "%" : "px"); attrs.width = void 0; } if (attrs.height) { styleObj.height = parseFloat(attrs.height) + (attrs.height.includes("%") ? "%" : "px"); attrs.height = void 0; } for (let i2 = 0, len = list.length; i2 < len; i2++) { const info = list[i2].split(":"); if (info.length < 2) continue; const key = info.shift().trim().toLowerCase(); let value2 = info.join(":").trim(); if (value2[0] === "-" && value2.lastIndexOf("-") > 0 || value2.includes("safe")) { tmp += `;${key}:${value2}`; } else if (!styleObj[key] || value2.includes("import") || !styleObj[key].includes("import")) { if (value2.includes("url")) { let j2 = value2.indexOf("(") + 1; if (j2) { while (value2[j2] === '"' || value2[j2] === "'" || blankChar[value2[j2]]) { j2++; } value2 = value2.substr(0, j2) + this.getUrl(value2.substr(j2)); } } else if (value2.includes("rpx")) { value2 = value2.replace(/[0-9.]+\s*rpx/g, ($2) => parseFloat($2) * windowWidth / 750 + "px"); } styleObj[key] = value2; } } node2.attrs.style = tmp; return styleObj; }; Parser.prototype.onTagName = function(name2) { this.tagName = this.xml ? name2 : name2.toLowerCase(); if (this.tagName === "svg") { this.xml = (this.xml || 0) + 1; config.ignoreTags.style = void 0; } }; Parser.prototype.onAttrName = function(name2) { name2 = this.xml ? name2 : name2.toLowerCase(); if (name2.includes("?") || name2.includes(";")) { this.attrName = void 0; return; } if (name2.substr(0, 5) === "data-") { if (name2 === "data-src" && !this.attrs.src) { this.attrName = "src"; } else if (this.tagName === "img" || this.tagName === "a") { this.attrName = name2; } else { this.attrName = void 0; } } else { this.attrName = name2; this.attrs[name2] = "T"; } }; Parser.prototype.onAttrVal = function(val) { const name2 = this.attrName || ""; if (name2 === "style" || name2 === "href") { this.attrs[name2] = decodeEntity(val, true); } else if (name2.includes("src")) { this.attrs[name2] = this.getUrl(decodeEntity(val, true)); } else if (name2) { this.attrs[name2] = val; } }; Parser.prototype.onOpenTag = function(selfClose) { const node2 = /* @__PURE__ */ Object.create(null); node2.name = this.tagName; node2.attrs = this.attrs; if (this.options.nodes.length) { node2.type = "node"; } this.attrs = /* @__PURE__ */ Object.create(null); const attrs = node2.attrs; const parent = this.stack[this.stack.length - 1]; const siblings = parent ? parent.children : this.nodes; const close = this.xml ? selfClose : config.voidTags[node2.name]; if (tagSelector[node2.name]) { attrs.class = tagSelector[node2.name] + (attrs.class ? " " + attrs.class : ""); } if (node2.name === "embed") { this.expose(); } if (node2.name === "video" || node2.name === "audio") { if (node2.name === "video" && !attrs.id) { attrs.id = "v" + idIndex++; } if (!attrs.controls && !attrs.autoplay) { attrs.controls = "T"; } node2.src = []; if (attrs.src) { node2.src.push(attrs.src); attrs.src = void 0; } this.expose(); } if (close) { if (!this.hook(node2) || config.ignoreTags[node2.name]) { if (node2.name === "base" && !this.options.domain) { this.options.domain = attrs.href; } else if (node2.name === "source" && parent && (parent.name === "video" || parent.name === "audio") && attrs.src) { parent.src.push(attrs.src); } return; } const styleObj = this.parseStyle(node2); if (node2.name === "img") { if (attrs.src) { if (attrs.src.includes("webp")) { node2.webp = "T"; } if (attrs.src.includes("data:") && this.options.previewImg !== "all" && !attrs["original-src"]) { attrs.ignore = "T"; } if (!attrs.ignore || node2.webp || attrs.src.includes("cloud://")) { for (let i2 = this.stack.length; i2--; ) { const item = this.stack[i2]; if (item.name === "a") { node2.a = item.attrs; } if (item.name === "table" && !node2.webp && !attrs.src.includes("cloud://")) { if (!styleObj.display || styleObj.display.includes("inline")) { node2.t = "inline-block"; } else { node2.t = styleObj.display; } styleObj.display = void 0; } item.c = 1; } attrs.i = this.imgList.length.toString(); let src = attrs["original-src"] || attrs.src; this.imgList.push(src); if (!node2.t) { this.imgList._unloadimgs += 1; } if (this.options.lazyLoad) { attrs["data-src"] = attrs.src; attrs.src = void 0; } } } if (styleObj.display === "inline") { styleObj.display = ""; } if (attrs.ignore) { styleObj["max-width"] = styleObj["max-width"] || "100%"; attrs.style += ";-webkit-touch-callout:none"; } if (parseInt(styleObj.width) > windowWidth) { styleObj.height = void 0; } if (!isNaN(parseInt(styleObj.width))) { node2.w = "T"; } if (!isNaN(parseInt(styleObj.height)) && (!styleObj.height.includes("%") || parent && (parent.attrs.style || "").includes("height"))) { node2.h = "T"; } if (node2.w && node2.h && styleObj["object-fit"]) { if (styleObj["object-fit"] === "contain") { node2.m = "aspectFit"; } else if (styleObj["object-fit"] === "cover") { node2.m = "aspectFill"; } } } else if (node2.name === "svg") { siblings.push(node2); this.stack.push(node2); this.popNode(); return; } for (const key in styleObj) { if (styleObj[key]) { attrs.style += `;${key}:${styleObj[key].replace(" !important", "")}`; } } attrs.style = attrs.style.substr(1) || void 0; } else { if ((node2.name === "pre" || (attrs.style || "").includes("white-space") && attrs.style.includes("pre")) && this.pre !== 2) { this.pre = node2.pre = 1; } node2.children = []; this.stack.push(node2); } siblings.push(node2); }; Parser.prototype.onCloseTag = function(name2) { name2 = this.xml ? name2 : name2.toLowerCase(); let i2; for (i2 = this.stack.length; i2--; ) { if (this.stack[i2].name === name2) break; } if (i2 !== -1) { while (this.stack.length > i2) { this.popNode(); } } else if (name2 === "p" || name2 === "br") { const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; siblings.push({ name: name2, attrs: { class: tagSelector[name2] || "", style: this.tagStyle[name2] || "" } }); } }; Parser.prototype.popNode = function() { const node2 = this.stack.pop(); let attrs = node2.attrs; const children = node2.children; const parent = this.stack[this.stack.length - 1]; const siblings = parent ? parent.children : this.nodes; if (!this.hook(node2) || config.ignoreTags[node2.name]) { if (node2.name === "title" && children.length && children[0].type === "text" && this.options.setTitle) { uni.setNavigationBarTitle({ title: children[0].text }); } siblings.pop(); return; } if (node2.pre && this.pre !== 2) { this.pre = node2.pre = void 0; for (let i2 = this.stack.length; i2--; ) { if (this.stack[i2].pre) { this.pre = 1; } } } const styleObj = {}; if (node2.name === "svg") { if (this.xml > 1) { this.xml--; return; } let src = ""; const style = attrs.style; attrs.style = ""; attrs.xmlns = "http://www.w3.org/2000/svg"; (function traversal(node3) { if (node3.type === "text") { src += node3.text; return; } const name2 = config.svgDict[node3.name] || node3.name; if (name2 === "foreignObject") { for (const child of node3.children || []) { if (child.attrs && !child.attrs.xmlns) { child.attrs.xmlns = "http://www.w3.org/1999/xhtml"; break; } } } src += "<" + name2; for (const item in node3.attrs) { const val = node3.attrs[item]; if (val) { src += ` ${config.svgDict[item] || item}="${val.replace(/"/g, "")}"`; } } if (!node3.children) { src += "/>"; } else { src += ">"; for (let i2 = 0; i2 < node3.children.length; i2++) { traversal(node3.children[i2]); } src += ""; } })(node2); node2.name = "img"; node2.attrs = { src: "data:image/svg+xml;utf8," + src.replace(/#/g, "%23"), style, ignore: "T" }; node2.children = void 0; this.xml = false; config.ignoreTags.style = true; return; } if (attrs.align) { if (node2.name === "table") { if (attrs.align === "center") { styleObj["margin-inline-start"] = styleObj["margin-inline-end"] = "auto"; } else { styleObj.float = attrs.align; } } else { styleObj["text-align"] = attrs.align; } attrs.align = void 0; } if (attrs.dir) { styleObj.direction = attrs.dir; attrs.dir = void 0; } if (node2.name === "font") { if (attrs.color) { styleObj.color = attrs.color; attrs.color = void 0; } if (attrs.face) { styleObj["font-family"] = attrs.face; attrs.face = void 0; } if (attrs.size) { let size = parseInt(attrs.size); if (!isNaN(size)) { if (size < 1) { size = 1; } else if (size > 7) { size = 7; } styleObj["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][size - 1]; } attrs.size = void 0; } } if ((attrs.class || "").includes("align-center")) { styleObj["text-align"] = "center"; } Object.assign(styleObj, this.parseStyle(node2)); if (node2.name !== "table" && parseInt(styleObj.width) > windowWidth) { styleObj["max-width"] = "100%"; styleObj["box-sizing"] = "border-box"; } if (config.blockTags[node2.name]) { node2.name = "div"; } else if (!config.trustTags[node2.name] && !this.xml) { node2.name = "span"; } if (node2.name === "a" || node2.name === "ad" || node2.name === "iframe") { this.expose(); } else if (node2.name === "video") { if ((styleObj.height || "").includes("auto")) { styleObj.height = void 0; } let str = '"; node2.html = str; } else if ((node2.name === "ul" || node2.name === "ol") && node2.c) { const types2 = { a: "lower-alpha", A: "upper-alpha", i: "lower-roman", I: "upper-roman" }; if (types2[attrs.type]) { attrs.style += ";list-style-type:" + types2[attrs.type]; attrs.type = void 0; } for (let i2 = children.length; i2--; ) { if (children[i2].name === "li") { children[i2].c = 1; } } } else if (node2.name === "table") { let padding = parseFloat(attrs.cellpadding); let spacing = parseFloat(attrs.cellspacing); const border = parseFloat(attrs.border); const bordercolor = styleObj["border-color"]; const borderstyle = styleObj["border-style"]; if (node2.c) { if (isNaN(padding)) { padding = 2; } if (isNaN(spacing)) { spacing = 2; } } if (border) { attrs.style += `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}`; } if (node2.flag && node2.c) { styleObj.display = "grid"; if (styleObj["border-collapse"] === "collapse") { styleObj["border-collapse"] = void 0; spacing = 0; } if (spacing) { styleObj["grid-gap"] = spacing + "px"; styleObj.padding = spacing + "px"; } else if (border) { attrs.style += ";border-left:0;border-top:0"; } const width = []; const trList = []; const cells = []; const map = {}; (function traversal(nodes) { for (let i2 = 0; i2 < nodes.length; i2++) { if (nodes[i2].name === "tr") { trList.push(nodes[i2]); } else if (nodes[i2].name === "colgroup") { let colI = 1; for (const col of nodes[i2].children || []) { if (col.name === "col") { const style = col.attrs.style || ""; const start = style.indexOf("width") ? style.indexOf(";width") : 0; if (start !== -1) { let end = style.indexOf(";", start + 6); if (end === -1) { end = style.length; } width[colI] = style.substring(start ? start + 7 : 6, end); } colI += 1; } } } else { traversal(nodes[i2].children || []); } } })(children); for (let row = 1; row <= trList.length; row++) { let col = 1; for (let j2 = 0; j2 < trList[row - 1].children.length; j2++) { const td = trList[row - 1].children[j2]; if (td.name === "td" || td.name === "th") { while (map[row + "." + col]) { col++; } let style = td.attrs.style || ""; let start = style.indexOf("width") ? style.indexOf(";width") : 0; if (start !== -1) { let end = style.indexOf(";", start + 6); if (end === -1) { end = style.length; } if (!td.attrs.colspan) { width[col] = style.substring(start ? start + 7 : 6, end); } style = style.substr(0, start) + style.substr(end); } style += ";display:flex"; start = style.indexOf("vertical-align"); if (start !== -1) { const val = style.substr(start + 15, 10); if (val.includes("middle")) { style += ";align-items:center"; } else if (val.includes("bottom")) { style += ";align-items:flex-end"; } } else { style += ";align-items:center"; } start = style.indexOf("text-align"); if (start !== -1) { const val = style.substr(start + 11, 10); if (val.includes("center")) { style += ";justify-content: center"; } else if (val.includes("right")) { style += ";justify-content: right"; } } style = (border ? `;border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"}` + (spacing ? "" : ";border-right:0;border-bottom:0") : "") + (padding ? `;padding:${padding}px` : "") + ";" + style; if (td.attrs.colspan) { style += `;grid-column-start:${col};grid-column-end:${col + parseInt(td.attrs.colspan)}`; if (!td.attrs.rowspan) { style += `;grid-row-start:${row};grid-row-end:${row + 1}`; } col += parseInt(td.attrs.colspan) - 1; } if (td.attrs.rowspan) { style += `;grid-row-start:${row};grid-row-end:${row + parseInt(td.attrs.rowspan)}`; if (!td.attrs.colspan) { style += `;grid-column-start:${col};grid-column-end:${col + 1}`; } for (let rowspan = 1; rowspan < td.attrs.rowspan; rowspan++) { for (let colspan = 0; colspan < (td.attrs.colspan || 1); colspan++) { map[row + rowspan + "." + (col - colspan)] = 1; } } } if (style) { td.attrs.style = style; } cells.push(td); col++; } } if (row === 1) { let temp = ""; for (let i2 = 1; i2 < col; i2++) { temp += (width[i2] ? width[i2] : "auto") + " "; } styleObj["grid-template-columns"] = temp; } } node2.children = cells; } else { if (node2.c) { styleObj.display = "table"; } if (!isNaN(spacing)) { styleObj["border-spacing"] = spacing + "px"; } if (border || padding) { (function traversal(nodes) { for (let i2 = 0; i2 < nodes.length; i2++) { const td = nodes[i2]; if (td.name === "th" || td.name === "td") { if (border) { td.attrs.style = `border:${border}px ${borderstyle || "solid"} ${bordercolor || "gray"};${td.attrs.style || ""}`; } if (padding) { td.attrs.style = `padding:${padding}px;${td.attrs.style || ""}`; } } else if (td.children) { traversal(td.children); } } })(children); } } if (this.options.scrollTable && !(attrs.style || "").includes("inline")) { const table = Object.assign({}, node2); node2.name = "div"; node2.attrs = { style: "overflow:auto" }; node2.children = [table]; attrs = table.attrs; } } else if ((node2.name === "tbody" || node2.name === "tr") && node2.flag && node2.c) { node2.flag = void 0; (function traversal(nodes) { for (let i2 = 0; i2 < nodes.length; i2++) { if (nodes[i2].name === "td") { for (const style of ["color", "background", "background-color"]) { if (styleObj[style]) { nodes[i2].attrs.style = style + ":" + styleObj[style] + ";" + (nodes[i2].attrs.style || ""); } } } else { traversal(nodes[i2].children || []); } } })(children); } else if ((node2.name === "td" || node2.name === "th") && (attrs.colspan || attrs.rowspan)) { for (let i2 = this.stack.length; i2--; ) { if (this.stack[i2].name === "table" || this.stack[i2].name === "tbody" || this.stack[i2].name === "tr") { this.stack[i2].flag = 1; } } } else if (node2.name === "ruby") { node2.name = "span"; for (let i2 = 0; i2 < children.length - 1; i2++) { if (children[i2].type === "text" && children[i2 + 1].name === "rt") { children[i2] = { name: "div", attrs: { style: "display:inline-block;text-align:center" }, children: [{ name: "div", attrs: { style: "font-size:50%;" + (children[i2 + 1].attrs.style || "") }, children: children[i2 + 1].children }, children[i2]] }; children.splice(i2 + 1, 1); } } } else if (node2.c) { (function traversal(node3) { node3.c = 2; for (let i2 = node3.children.length; i2--; ) { const child = node3.children[i2]; if (child.name && (config.inlineTags[child.name] || (child.attrs.style || "").includes("inline") && child.children) && !child.c) { traversal(child); } if (!child.c || child.name === "table") { node3.c = 1; } } })(node2); } if ((styleObj.display || "").includes("flex") && !node2.c) { for (let i2 = children.length; i2--; ) { const item = children[i2]; if (item.f) { item.attrs.style = (item.attrs.style || "") + item.f; item.f = void 0; } } } const flex = parent && ((parent.attrs.style || "").includes("flex") || (parent.attrs.style || "").includes("grid")) && !node2.c; if (flex) { node2.f = ";max-width:100%"; } if (children.length >= 50 && node2.c && !(styleObj.display || "").includes("flex")) { mergeNodes(children); } for (const key in styleObj) { if (styleObj[key]) { const val = `;${key}:${styleObj[key].replace(" !important", "")}`; if (flex && (key.includes("flex") && key !== "flex-direction" || key === "align-self" || key.includes("grid") || styleObj[key][0] === "-" || key.includes("width") && val.includes("%"))) { node2.f += val; if (key === "width") { attrs.style += ";width:100%"; } } else { attrs.style += val; } } } attrs.style = attrs.style.substr(1) || void 0; }; Parser.prototype.onText = function(text) { if (!this.pre) { let trim2 = ""; let flag2; for (let i2 = 0, len = text.length; i2 < len; i2++) { if (!blankChar[text[i2]]) { trim2 += text[i2]; } else { if (trim2[trim2.length - 1] !== " ") { trim2 += " "; } if (text[i2] === "\n" && !flag2) { flag2 = true; } } } if (trim2 === " ") { if (flag2) return; else { const parent = this.stack[this.stack.length - 1]; if (parent && parent.name[0] === "t") return; } } text = trim2; } const node2 = /* @__PURE__ */ Object.create(null); node2.type = "text"; node2.text = decodeEntity(text); if (this.hook(node2)) { const siblings = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes; siblings.push(node2); } }; function Lexer(handler) { this.handler = handler; } Lexer.prototype.parse = function(content) { this.content = content || ""; this.i = 0; this.start = 0; this.state = this.text; for (let len = this.content.length; this.i !== -1 && this.i < len; ) { this.state(); } }; Lexer.prototype.checkClose = function(method) { const selfClose = this.content[this.i] === "/"; if (this.content[this.i] === ">" || selfClose && this.content[this.i + 1] === ">") { if (method) { this.handler[method](this.content.substring(this.start, this.i)); } this.i += selfClose ? 2 : 1; this.start = this.i; this.handler.onOpenTag(selfClose); if (this.handler.tagName === "script") { this.i = this.content.indexOf("= "a" && c2 <= "z" || c2 >= "A" && c2 <= "Z") { if (this.start !== this.i) { this.handler.onText(this.content.substring(this.start, this.i)); } this.start = ++this.i; this.state = this.tagName; } else if (c2 === "/" || c2 === "!" || c2 === "?") { if (this.start !== this.i) { this.handler.onText(this.content.substring(this.start, this.i)); } const next = this.content[this.i + 2]; if (c2 === "/" && (next >= "a" && next <= "z" || next >= "A" && next <= "Z")) { this.i += 2; this.start = this.i; this.state = this.endTag; return; } let end = "-->"; if (c2 !== "!" || this.content[this.i + 2] !== "-" || this.content[this.i + 3] !== "-") { end = ">"; } this.i = this.content.indexOf(end, this.i); if (this.i !== -1) { this.i += end.length; this.start = this.i; } } else { this.i++; } }; Lexer.prototype.tagName = function() { if (blankChar[this.content[this.i]]) { this.handler.onTagName(this.content.substring(this.start, this.i)); while (blankChar[this.content[++this.i]]) ; if (this.i < this.content.length && !this.checkClose()) { this.start = this.i; this.state = this.attrName; } } else if (!this.checkClose("onTagName")) { this.i++; } }; Lexer.prototype.attrName = function() { let c2 = this.content[this.i]; if (blankChar[c2] || c2 === "=") { this.handler.onAttrName(this.content.substring(this.start, this.i)); let needVal = c2 === "="; const len = this.content.length; while (++this.i < len) { c2 = this.content[this.i]; if (!blankChar[c2]) { if (this.checkClose()) return; if (needVal) { this.start = this.i; this.state = this.attrVal; return; } if (this.content[this.i] === "=") { needVal = true; } else { this.start = this.i; this.state = this.attrName; return; } } } } else if (!this.checkClose("onAttrName")) { this.i++; } }; Lexer.prototype.attrVal = function() { const c2 = this.content[this.i]; const len = this.content.length; if (c2 === '"' || c2 === "'") { this.start = ++this.i; this.i = this.content.indexOf(c2, this.i); if (this.i === -1) return; this.handler.onAttrVal(this.content.substring(this.start, this.i)); } else { for (; this.i < len; this.i++) { if (blankChar[this.content[this.i]]) { this.handler.onAttrVal(this.content.substring(this.start, this.i)); break; } else if (this.checkClose("onAttrVal")) return; } } while (blankChar[this.content[++this.i]]) ; if (this.i < len && !this.checkClose()) { this.start = this.i; this.state = this.attrName; } }; Lexer.prototype.endTag = function() { const c2 = this.content[this.i]; if (blankChar[c2] || c2 === ">" || c2 === "/") { this.handler.onCloseTag(this.content.substring(this.start, this.i)); if (c2 !== ">") { this.i = this.content.indexOf(">", this.i); if (this.i === -1) return; } this.start = ++this.i; this.state = this.text; } else { this.i++; } }; const plugins = []; const _sfc_main$W = { name: "u-parse", data() { return { nodes: [] }; }, props: { containerStyle: { type: String, default: "" }, content: { type: String, default: "" }, copyLink: { type: [Boolean, String], default: true }, domain: String, errorImg: { type: String, default: "" }, lazyLoad: { type: [Boolean, String], default: false }, loadingImg: { type: String, default: "" }, pauseVideo: { type: [Boolean, String], default: true }, previewImg: { type: [Boolean, String], default: true }, scrollTable: [Boolean, String], selectable: [Boolean, String], setTitle: { type: [Boolean, String], default: true }, showImgMenu: { type: [Boolean, String], default: true }, tagStyle: Object, useAnchor: [Boolean, Number] }, emits: ["load", "ready", "imgTap", "linkTap", "play", "error"], components: { node }, watch: { content(content) { this.setContent(content); } }, created() { this.plugins = []; for (let i2 = plugins.length; i2--; ) { this.plugins.push(new plugins[i2](this)); } }, mounted() { if (this.content && !this.nodes.length) { this.setContent(this.content); } }, beforeUnmount() { this._hook("onDetached"); }, methods: { /** * @description 将锚点跳转的范围限定在一个 scroll-view 内 * @param {Object} page scroll-view 所在页面的示例 * @param {String} selector scroll-view 的选择器 * @param {String} scrollTop scroll-view scroll-top 属性绑定的变量名 */ in(page2, selector, scrollTop) { if (page2 && selector && scrollTop) { this._in = { page: page2, selector, scrollTop }; } }, /** * @description 锚点跳转 * @param {String} id 要跳转的锚点 id * @param {Number} offset 跳转位置的偏移量 * @returns {Promise} */ navigateTo(id, offset) { return new Promise((resolve, reject) => { if (!this.useAnchor) { reject(Error("Anchor is disabled")); return; } offset = offset || parseInt(this.useAnchor) || 0; let deep = " "; const selector = uni.createSelectorQuery().in(this._in ? this._in.page : this).select((this._in ? this._in.selector : "._root") + (id ? `${deep}#${id}` : "")).boundingClientRect(); if (this._in) { selector.select(this._in.selector).scrollOffset().select(this._in.selector).boundingClientRect(); } else { selector.selectViewport().scrollOffset(); } selector.exec((res) => { if (!res[0]) { reject(Error("Label not found")); return; } const scrollTop = res[1].scrollTop + res[0].top - (res[2] ? res[2].top : 0) + offset; if (this._in) { this._in.page[this._in.scrollTop] = scrollTop; } else { uni.pageScrollTo({ scrollTop, duration: 300 }); } resolve(); }); }); }, /** * @description 获取文本内容 * @return {String} */ getText(nodes) { let text = ""; (function traversal(nodes2) { for (let i2 = 0; i2 < nodes2.length; i2++) { const node2 = nodes2[i2]; if (node2.type === "text") { text += node2.text.replace(/&/g, "&"); } else if (node2.name === "br") { text += "\n"; } else { const isBlock = node2.name === "p" || node2.name === "div" || node2.name === "tr" || node2.name === "li" || node2.name[0] === "h" && node2.name[1] > "0" && node2.name[1] < "7"; if (isBlock && text && text[text.length - 1] !== "\n") { text += "\n"; } if (node2.children) { traversal(node2.children); } if (isBlock && text[text.length - 1] !== "\n") { text += "\n"; } else if (node2.name === "td" || node2.name === "th") { text += " "; } } } })(nodes || this.nodes); return text; }, /** * @description 获取内容大小和位置 * @return {Promise} */ getRect() { return new Promise((resolve, reject) => { uni.createSelectorQuery().in(this).select("#_root").boundingClientRect().exec((res) => res[0] ? resolve(res[0]) : reject(Error("Root label not found"))); }); }, /** * @description 暂停播放媒体 */ pauseMedia() { for (let i2 = (this._videos || []).length; i2--; ) { this._videos[i2].pause(); } const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].pause()'; let page2 = this.$parent; while (!page2.$scope) page2 = page2.$parent; page2.$scope.$getAppWebview().evalJS(command); }, /** * @description 设置媒体播放速率 * @param {Number} rate 播放速率 */ setPlaybackRate(rate) { this.playbackRate = rate; for (let i2 = (this._videos || []).length; i2--; ) { this._videos[i2].playbackRate(rate); } const command = 'for(var e=document.getElementsByTagName("video"),i=e.length;i--;)e[i].playbackRate=' + rate; let page2 = this.$parent; while (!page2.$scope) page2 = page2.$parent; page2.$scope.$getAppWebview().evalJS(command); }, /** * @description 设置内容 * @param {String} content html 内容 * @param {Boolean} append 是否在尾部追加 */ setContent(content, append) { if (!append || !this.imgList) { this.imgList = []; } const nodes = new Parser(this).parse(content); this.$set(this, "nodes", append ? (this.nodes || []).concat(nodes) : nodes); this._videos = []; this.$nextTick(() => { this._hook("onLoad"); this.$emit("load"); }); if (this.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) { let height = 0; const callback = (rect) => { if (!rect || !rect.height) rect = {}; if (rect.height === height) { this.$emit("ready", rect); } else { height = rect.height; setTimeout(() => { this.getRect().then(callback).catch(callback); }, 350); } }; this.getRect().then(callback).catch(callback); } else { if (!this.imgList._unloadimgs) { this.getRect().then((rect) => { this.$emit("ready", rect); }).catch(() => { this.$emit("ready", {}); }); } } }, /** * @description 调用插件钩子函数 */ _hook(name2) { for (let i2 = plugins.length; i2--; ) { if (this.plugins[i2][name2]) { this.plugins[i2][name2](); } } } } }; function _sfc_render$V(_ctx, _cache, $props, $setup, $data, $options) { const _component_node = vue.resolveComponent("node"); return vue.openBlock(), vue.createElementBlock( "view", { id: "_root", class: vue.normalizeClass(($props.selectable ? "_select " : "") + "_root"), style: vue.normalizeStyle($props.containerStyle) }, [ !$data.nodes[0] ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createBlock(_component_node, { key: 1, childs: $data.nodes, opts: [$props.lazyLoad, $props.loadingImg, $props.errorImg, $props.showImgMenu, $props.selectable], name: "span" }, null, 8, ["childs", "opts"])) ], 6 /* CLASS, STYLE */ ); } const uParse = /* @__PURE__ */ _export_sfc(_sfc_main$W, [["render", _sfc_render$V], ["__scopeId", "data-v-cd79d006"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-parse/u-parse.vue"]]); const __vite_glob_0_74 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uParse }, Symbol.toStringTag, { value: "Module" })); const props$w = { props: { // PDF文件地址 src: { type: String, default: "" }, // 组件高度 height: { type: String, default: "700px" }, // pdfjs资源域名 baseUrl: { type: String, default: "https://uview-plus.jiangruyi.com/h5" } } }; const _sfc_main$V = { name: "up-pdf-reader", mixins: [props$w], data() { return { baseUrlInner: "https://uview-plus.jiangruyi.com/h5", viewerUrl: "" }; }, watch: { baseUrl: function(val) { this.baseUrl = val; }, src: function(val) { this.viewerUrl = `${this.baseUrlInner}/static/pdfjs/web/viewer.html?file=` + encodeURIComponent(val); } }, mounted() { if (this.baseUrl) { this.baseUrlInner = this.baseUrl; } this.viewerUrl = `${this.baseUrlInner}/static/pdfjs/web/viewer.html?file=` + encodeURIComponent(this.src); } }; function _sfc_render$U(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "up-pdf-reader", style: vue.normalizeStyle({ height: _ctx.height }) }, [ vue.createElementVNode("web-view", { fullscreen: false, src: $data.viewerUrl, style: vue.normalizeStyle({ width: "750rpx", height: _ctx.height }), "webview-styles": { width: "750rpx", height: _ctx.height }, frameborder: "0" }, null, 12, ["src", "webview-styles"]) ], 4 /* STYLE */ ); } const uPdfReader = /* @__PURE__ */ _export_sfc(_sfc_main$V, [["render", _sfc_render$U], ["__scopeId", "data-v-2149504b"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-pdf-reader/u-pdf-reader.vue"]]); const __vite_glob_0_75 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uPdfReader }, Symbol.toStringTag, { value: "Module" })); const props$v = defineMixin({ props: {} }); const _sfc_main$U = { name: "u-picker-column", mixins: [mpMixin, mixin, props$v] }; function _sfc_render$T(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("picker-view-column", null, [ vue.createElementVNode("view", { class: "u-picker-column" }) ]); } const uPickerColumn = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$T], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-picker-column/u-picker-column.vue"]]); const __vite_glob_0_76 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uPickerColumn }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$T = { name: "u-picker-data", props: { modelValue: { type: [String, Number], default: "" }, title: { type: String, default: "" }, description: { type: String, default: "" }, options: { type: Array, default: () => { return []; } }, valueKey: { type: String, default: "id" }, labelKey: { type: String, default: "name" } }, data() { return { show: false, current: "", defaultIndex: [] }; }, created() { if (this.modelValue) { this.options.forEach((ele, index2) => { if (ele[this.valueKey] == this.modelValue) { this.current = ele[this.labelKey]; this.defaultIndex = [index2]; } }); } }, watch: { modelValue() { if (this.modelValue) { this.options.forEach((ele, index2) => { if (ele[this.valueKey] == this.modelValue) { this.current = ele[this.labelKey]; this.defaultIndex = [index2]; } }); } } }, computed: { optionsInner() { return [this.options]; } }, emits: ["update:modelValue", "cancel", "close", "confirm"], methods: { hideKeyboard() { uni.hideKeyboard(); }, cancel() { this.show = false; this.$emit("cancel"); }, close() { this.$emit("close"); }, confirm(e2) { const { columnIndex, index: index2, value: value2 } = e2; this.show = false; this.$emit("update:modelValue", value2[0][this.valueKey]); this.defaultIndex = columnIndex; this.current = value2[0][this.labelKey]; this.$emit("confirm"); } } }; function _sfc_render$S(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_input = vue.resolveComponent("up-input"); const _component_up_picker = vue.resolveComponent("up-picker"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-picker-data" }, [ vue.createElementVNode("view", { class: "u-picker-data__trigger" }, [ vue.renderSlot(_ctx.$slots, "trigger", { current: $data.current }, void 0, true), !_ctx.$slots["trigger"] ? (vue.openBlock(), vue.createBlock(_component_up_input, { key: 0, modelValue: $data.current, disabled: "", disabledColor: "#ffffff", placeholder: $props.title, border: "none" }, null, 8, ["modelValue", "placeholder"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { onClick: _cache[0] || (_cache[0] = ($event) => $data.show = true), class: "u-picker-data__trigger__cover" }) ]), vue.createVNode(_component_up_picker, { show: $data.show, columns: $options.optionsInner, keyName: $props.labelKey, defaultIndex: $data.defaultIndex, onConfirm: $options.confirm, onCancel: $options.cancel, onClose: $options.close }, null, 8, ["show", "columns", "keyName", "defaultIndex", "onConfirm", "onCancel", "onClose"]) ]); } const uPickerData = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["render", _sfc_render$S], ["__scopeId", "data-v-cdfa3c95"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-picker-data/u-picker-data.vue"]]); const __vite_glob_0_77 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uPickerData }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$S = { name: "up-poster", props: { json: { type: Object, default: () => ({}) } }, data() { return { canvasId: "u-poster-canvas-" + Date.now(), showCanvas: false, canvasWidth: 0, canvasHeight: 0, // 二维码相关数据 qrCodeValue: "", qrCodeSize: 200, qrCodeShow: false, // 存储多个二维码的数据 qrCodeMap: /* @__PURE__ */ new Map() }; }, computed: { // 根据传入的css生成文本样式 getTextStyle() { return (css) => { const style = {}; if (css.color) style.color = css.color; if (css.fontSize) style.fontSize = css.fontSize; if (css.fontWeight) style.fontWeight = css.fontWeight; if (css.lineHeight) style.lineHeight = css.lineHeight; if (css.textAlign) style.textAlign = css.textAlign; return style; }; } }, methods: { /** * 导出海报图片 * @description 根据json配置生成海报并导出为临时图片路径 * @returns {Promise} 返回包含图片信息的对象 * @author jry ijry@qq.com */ async exportImage() { return new Promise(async (resolve, reject) => { try { const posterSize = this.json.css; const width = this.convertRpxToPx(posterSize.width || "750rpx"); const height = this.convertRpxToPx(posterSize.height || "1114rpx"); this.canvasWidth = width; this.canvasHeight = height; this.showCanvas = true; await this.$nextTick(); const ctx = uni.createCanvasContext(this.canvasId, this); if (posterSize.background) { if (posterSize.background.includes("linear-gradient") || posterSize.background.includes("radial-gradient")) { this.drawGradientBackground(ctx, posterSize, 0, 0, width, height); } else { ctx.setFillStyle(posterSize.background); ctx.fillRect(0, 0, width, height); } } for (const item of this.json.views) { await this.drawItem(ctx, item, width, height); } ctx.draw(false, () => { setTimeout(() => { uni.canvasToTempFilePath({ canvasId: this.canvasId, success: (res) => { this.showCanvas = false; resolve({ width, height, path: res.tempFilePath, // H5下添加blob格式 blob: this.dataURLToBlob(res.tempFilePath) }); }, fail: (err) => { this.showCanvas = false; reject(new Error("导出图片失败: " + JSON.stringify(err))); } }, this); }, 300); }); setTimeout(() => { this.showCanvas = false; reject(new Error("导出图片超时")); }, 1e4); } catch (error2) { this.showCanvas = false; reject(error2); } }); }, /** * 绘制单个元素 * @description 根据元素类型绘制文本、图片、矩形或二维码到canvas * @param {Object} ctx canvas上下文 * @param {Object} item 元素配置信息 * @param {Number} canvasWidth canvas宽度 * @param {Number} canvasHeight canvas高度 * @returns {Promise} 绘制完成的Promise * @author jry ijry@qq.com */ async drawItem(ctx, item, canvasWidth, canvasHeight) { const css = item.css || {}; const left = this.convertRpxToPx(css.left || "0rpx"); const top = this.convertRpxToPx(css.top || "0rpx"); const width = this.convertRpxToPx(css.width || "0rpx"); const height = this.convertRpxToPx(css.height || "0rpx"); switch (item.type) { case "view": if (css.background) { if (css.background.includes("linear-gradient") || css.background.includes("radial-gradient")) { this.drawGradientBackground(ctx, css, left, top, width, height); } else { ctx.setFillStyle(css.background); if (css.radius) { const radius = this.convertRpxToPx(css.radius); this.drawRoundRect(ctx, left, top, width, height, radius, css.background); } else { ctx.fillRect(left, top, width, height); } } } break; case "text": if (css.color) ctx.setFillStyle(css.color); if (css.fontSize) { const fontSize = this.convertRpxToPx(css.fontSize); ctx.setFontSize(fontSize); } if (css.fontWeight) { ctx.setLineWidth(css.fontWeight === "bold" ? 2 : 1); } if (css.lineClamp) { this.drawTextWithLineClamp(ctx, item.text, left, top, width, css); } else { const textBaseLine = css.fontSize ? this.convertRpxToPx(css.fontSize) / 2 : 10; ctx.fillText(item.text, left, top + textBaseLine); } break; case "image": return new Promise((resolve) => { uni.getImageInfo({ src: item.src, success: (res) => { if (css.radius) { const radius = this.convertRpxToPx(css.radius); this.clipRoundRect(ctx, left, top, width, height, radius); } ctx.drawImage(item.src, left, top, width, height); ctx.restore(); resolve(); }, fail: () => { ctx.setFillStyle("#f5f5f5"); ctx.fillRect(left, top, width, height); resolve(); } }); }); case "qrcode": if (item.text) { const qrCodeImageUrl = await this.generateQRCode(item.text, width, height); return new Promise((resolve) => { uni.getImageInfo({ src: qrCodeImageUrl, success: (res) => { ctx.drawImage(res.path, left, top, width, height); resolve(); }, fail: () => { ctx.setFillStyle("#f5f5f5"); ctx.fillRect(left, top, width, height); ctx.setFillStyle("#999"); ctx.setFontSize(12); ctx.setTextAlign("center"); ctx.fillText("QR", left + width / 2, top + height / 2); ctx.setTextAlign("left"); resolve(); } }); }); } else { ctx.setFillStyle("#f5f5f5"); ctx.fillRect(left, top, width, height); ctx.setFillStyle("#999"); ctx.setFontSize(12); ctx.setTextAlign("center"); ctx.fillText("QR", left + width / 2, top + height / 2); ctx.setTextAlign("left"); } break; } }, /** * 绘制圆角矩形 * @description 绘制指定位置和尺寸的圆角矩形 * @param {Object} ctx canvas上下文 * @param {Number} x x坐标 * @param {Number} y y坐标 * @param {Number} width 宽度 * @param {Number} height 高度 * @param {Number} radius 圆角半径 * @param {String} fillColor 填充颜色 * @author jry ijry@qq.com */ drawRoundRect(ctx, x2, y2, width, height, radius, fillColor) { ctx.save(); ctx.beginPath(); ctx.moveTo(x2 + radius, y2); ctx.lineTo(x2 + width - radius, y2); ctx.quadraticCurveTo(x2 + width, y2, x2 + width, y2 + radius); ctx.lineTo(x2 + width, y2 + height - radius); ctx.quadraticCurveTo(x2 + width, y2 + height, x2 + width - radius, y2 + height); ctx.lineTo(x2 + radius, y2 + height); ctx.quadraticCurveTo(x2, y2 + height, x2, y2 + height - radius); ctx.lineTo(x2, y2 + radius); ctx.quadraticCurveTo(x2, y2, x2 + radius, y2); ctx.closePath(); if (fillColor) { ctx.setFillStyle(fillColor); ctx.fill(); } ctx.restore(); }, /** * 裁剪圆角矩形区域 * @description 在canvas上创建圆角矩形裁剪区域 * @param {Object} ctx canvas上下文 * @param {Number} x x坐标 * @param {Number} y y坐标 * @param {Number} width 宽度 * @param {Number} height 高度 * @param {Number} radius 圆角半径 * @author jry ijry@qq.com */ clipRoundRect(ctx, x2, y2, width, height, radius) { ctx.save(); ctx.beginPath(); ctx.arc(x2 + radius, y2 + radius, radius, Math.PI, Math.PI * 1.5); ctx.lineTo(x2 + width - radius, y2); ctx.arc(x2 + width - radius, y2 + radius, radius, Math.PI * 1.5, Math.PI * 2); ctx.lineTo(x2 + width, y2 + height - radius); ctx.arc(x2 + width - radius, y2 + height - radius, radius, 0, Math.PI * 0.5); ctx.lineTo(x2 + radius, y2 + height); ctx.arc(x2 + radius, y2 + height - radius, radius, Math.PI * 0.5, Math.PI); ctx.closePath(); ctx.clip(); }, /** * 绘制带行数限制的文本 * @description 绘制可控制最大行数的文本,超出部分显示省略号 * @param {Object} ctx canvas上下文 * @param {String} text 文本内容 * @param {Number} x x坐标 * @param {Number} y y坐标 * @param {Number} maxWidth 最大宽度 * @param {Object} css 样式配置 * @author jry ijry@qq.com */ drawTextWithLineClamp(ctx, text, x2, y2, maxWidth, css) { const lineClamp = parseInt(css.lineClamp) || 1; const lineHeight = css.lineHeight ? this.convertRpxToPx(css.lineHeight) : 20; const lines = []; let currentLine = ""; for (let i2 = 0; i2 < text.length; i2++) { const char = text[i2]; const testLine = currentLine + char; const metrics = ctx.measureText(testLine); if (metrics.width > maxWidth && currentLine !== "") { lines.push(currentLine); currentLine = char; if (lines.length === lineClamp) { if (metrics.width > maxWidth) { let fitLine = currentLine.substring(0, currentLine.length - 1); while (ctx.measureText(fitLine + "...").width > maxWidth && fitLine.length > 0) { fitLine = fitLine.substring(0, fitLine.length - 1); } lines[lines.length - 1] = fitLine + "..."; } break; } } else { currentLine = testLine; } if (i2 === text.length - 1 && lines.length < lineClamp) { lines.push(currentLine); } } for (let i2 = 0; i2 < lines.length; i2++) { const textBaseLine = css.fontSize ? this.convertRpxToPx(css.fontSize) / 2 : 10; ctx.fillText(lines[i2], x2, y2 + i2 * lineHeight + textBaseLine); } }, /** * 生成二维码图片 * @description 根据文本内容生成二维码图片URL * @param {String} text 二维码内容 * @param {Number} width 二维码宽度 * @param {Number} height 二维码高度 * @returns {Promise} 二维码图片URL * @author jry ijry@qq.com */ generateQRCode(text, width, height) { return new Promise((resolve) => { const qrCodeKey = `${text}_${width}_${height}`; if (this.qrCodeMap.has(qrCodeKey)) { resolve(this.qrCodeMap.get(qrCodeKey)); return; } try { this.qrCodeValue = text; this.qrCodeSize = Math.max(width, height); this.qrCodeShow = true; this.$nextTick(() => { if (this.$refs.qrCode) { setTimeout(() => { this.$refs.qrCode.toTempFilePath({ success: (res) => { this.qrCodeMap.set(qrCodeKey, res.tempFilePath); this.qrCodeShow = false; resolve(res.tempFilePath); }, fail: (err) => { formatAppLog("error", "at uni_modules/uview-plus/components/u-poster/u-poster.vue:437", "二维码生成失败:", err); this.qrCodeShow = false; } }); }, 300); } else { this.qrCodeShow = false; } }); } catch (error2) { formatAppLog("error", "at uni_modules/uview-plus/components/u-poster/u-poster.vue:448", "生成二维码出错:", error2); this.qrCodeShow = false; } }); }, /** * 将rpx单位转换为px * @description 根据屏幕密度将rpx单位转换为px单位 * @param {String|Number} rpxValue rpx值 * @returns {Number} 转换后的px值 * @author jry ijry@qq.com */ convertRpxToPx(rpxValue) { if (typeof rpxValue === "number") return rpxValue; if (typeof rpxValue === "string" && rpxValue.endsWith("rpx")) { const value2 = parseFloat(rpxValue); return uni.rpx2px(value2); } return parseFloat(rpxValue) || 0; }, /** * 绘制渐变背景 * @description 绘制线性渐变或径向渐变背景 * @param {Object} ctx canvas上下文 * @param {Object} css 样式配置 * @param {Number} left 左边距 * @param {Number} top 上边距 * @param {Number} width 宽度 * @param {Number} height 高度 * @author jry ijry@qq.com */ drawGradientBackground(ctx, css, left, top, width, height) { const background = css.background; let gradient = null; if (background.includes("linear-gradient")) { const angleMatch = background.match(/linear-gradient\((\d+)deg/); const angle = angleMatch ? parseInt(angleMatch[1]) : 135; let startX = left, startY = top, endX = left + width, endY = top + height; if (angle === 0) { startX = left; startY = top + height; endX = left; endY = top; } else if (angle === 90) { startX = left; startY = top; endX = left + width; endY = top; } else if (angle === 180) { startX = left; startY = top; endX = left; endY = top + height; } else if (angle === 270) { startX = left + width; startY = top; endX = left; endY = top; } gradient = ctx.createLinearGradient(startX, startY, endX, endY); const colorMatches = background.match(/#[0-9a-fA-F]+|rgba?\([^)]+\)/g); if (colorMatches && colorMatches.length >= 2) { colorMatches.forEach((color2, index2) => { const stop = index2 / (colorMatches.length - 1); gradient.addColorStop(stop, color2); }); } } else if (background.includes("radial-gradient")) { const centerX = left + width / 2; const centerY = top + height / 2; const radius = Math.min(width, height) / 2; gradient = ctx.createRadialGradient(centerX, centerY, 0, centerX, centerY, radius); const colorMatches = background.match(/#[0-9a-fA-F]+|rgba?\([^)]+\)/g); if (colorMatches && colorMatches.length >= 2) { colorMatches.forEach((color2, index2) => { const stop = index2 / (colorMatches.length - 1); gradient.addColorStop(stop, color2); }); } } if (gradient) { ctx.setFillStyle(gradient); if (css.radius) { const radius = this.convertRpxToPx(css.radius); this.drawRoundRect(ctx, left, top, width, height, radius, gradient); } else { ctx.fillRect(left, top, width, height); } } }, /** * 将dataURL转换为Blob * @description H5环境下将base64格式的dataURL转换为Blob对象 * @param {String} dataURL base64格式的图片数据 * @returns {Blob} Blob对象 * @author jry ijry@qq.com */ dataURLToBlob(dataURL) { return null; } } }; function _sfc_render$R(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_qrcode = vue.resolveComponent("up-qrcode"); return vue.openBlock(), vue.createElementBlock("view", { class: "up-poster" }, [ vue.createCommentVNode(" canvas用于绘制海报 "), $data.showCanvas ? (vue.openBlock(), vue.createElementBlock("canvas", { key: 0, class: "up-poster__hidden-canvas", "canvas-id": $data.canvasId, id: $data.canvasId, style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px" }) }, null, 12, ["canvas-id", "id"])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 隐藏的二维码组件,用于生成二维码图片 "), vue.createVNode(_component_up_qrcode, { ref: "qrCode", val: $data.qrCodeValue, size: $data.qrCodeSize, margin: 0, loadMake: false, background: "#ffffff", foreground: "#000000", class: vue.normalizeClass(["up-poster__hidden-qrcode", $data.qrCodeShow ? "" : "up-poster__hidden-qrcode--hidden"]) }, null, 8, ["val", "size", "class"]) ]); } const uPoster = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$R], ["__scopeId", "data-v-79cfe3ab"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-poster/u-poster.vue"]]); const __vite_glob_0_80 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uPoster }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$R = { name: "u-pull-refresh", props: { // 是否正在刷新 refreshing: { type: Boolean, default: false }, // 下拉刷新阈值 threshold: { type: Number, default: 80 }, // 阻尼系数 damping: { type: Number, default: 0.4 }, // 最大下拉距离 maxDistance: { type: Number, default: 120 }, // 是否显示加载更多 showLoadmore: { type: Boolean, default: false }, // u-loadmore 组件的 props 配置 loadmoreProps: { type: Object, default: () => ({ status: "loadmore" // loadmoreText: '加载更多', // loadingText: '正在加载...', // nomoreText: '没有更多了' }) }, // 是否使用 scroll-view 包装内容 useScrollView: { type: Boolean, default: true }, // scroll-view 相关属性 enableBackToTop: { type: Boolean, default: false }, lowerThreshold: { type: [Number, String], default: 50 }, scrollTop: { type: [Number, String], default: 0 } }, data() { return { // 下拉刷新相关 isRefreshing: false, refreshStatus: "pull", // pull, release, refreshing refreshDistance: 0, startY: 0, currentY: 0, touching: false, // 动画相关 contentTranslateY: 0 }; }, emits: ["refresh", "loadmore", "scroll"], watch: { refreshing: { handler(newVal) { if (!newVal) { this.finishRefresh(); } else { this.startRefresh(); } } } }, methods: { t: t$1, // 触摸开始 onTouchStart(e2) { if (this.isRefreshing) return; this.touching = true; this.startY = e2.touches[0].pageY; this.currentY = this.startY; this.refreshStatus = "pull"; }, // 触摸移动 onTouchMove(e2) { if (!this.touching || this.isRefreshing) return; this.currentY = e2.touches[0].pageY; const diff = this.currentY - this.startY; if (diff > 0 && this.isScrollViewAtTop()) { this.refreshDistance = Math.min(diff * this.damping, this.maxDistance); this.contentTranslateY = this.refreshDistance; if (this.refreshDistance >= this.threshold) { this.refreshStatus = "release"; } else { this.refreshStatus = "pull"; } e2.preventDefault(); e2.stopPropagation(); } }, // 触摸结束 onTouchEnd() { if (!this.touching) return; this.touching = false; if (this.refreshDistance >= this.threshold && !this.isRefreshing) { this.startRefresh(); this.$emit("refresh"); } else { this.resetRefresh(); } }, // 开始刷新 startRefresh() { this.isRefreshing = true; this.refreshStatus = "refreshing"; this.refreshDistance = this.threshold; this.contentTranslateY = this.threshold; }, // 完成刷新 finishRefresh() { this.isRefreshing = false; this.refreshStatus = "pull"; this.resetRefresh(); }, // 重置刷新状态 resetRefresh() { this.refreshDistance = 0; this.contentTranslateY = 0; }, // 检查 scroll-view 是否在顶部 isScrollViewAtTop() { return true; }, // 处理滚动事件 handleScroll(e2) { this.$emit("scroll", e2); }, // 处理滚动到底部事件 handleScrollToLower(e2) { if (this.showLoadmore && this.loadmoreProps.status === "loadmore") { this.$emit("loadmore"); } } } }; function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_loadmore = resolveEasycom(vue.resolveDynamicComponent("u-loadmore"), __easycom_0$1); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-pull-refresh", onTouchstart: _cache[2] || (_cache[2] = (...args) => $options.onTouchStart && $options.onTouchStart(...args)), onTouchmove: _cache[3] || (_cache[3] = (...args) => $options.onTouchMove && $options.onTouchMove(...args)), onTouchend: _cache[4] || (_cache[4] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)), onTouchcancel: _cache[5] || (_cache[5] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)) }, [ vue.createCommentVNode(" 下拉刷新区域 "), vue.createElementVNode( "view", { class: vue.normalizeClass(["refresh-area", { refreshing: $data.isRefreshing }]), style: vue.normalizeStyle({ height: $data.refreshDistance + "px" }) }, [ vue.createCommentVNode(" 不同状态的插槽 "), $data.refreshStatus === "pull" ? vue.renderSlot(_ctx.$slots, "pull", { key: 0, distance: $data.refreshDistance, threshold: $props.threshold }, () => [ vue.createCommentVNode(" 默认下拉状态 "), vue.createElementVNode("view", { class: "refresh-content" }, [ vue.createElementVNode("view", { class: "refresh-indicator" }, [ vue.createVNode(_component_up_icon, { name: "arrow-downward", size: "26px" }) ]), vue.createElementVNode( "text", { class: "refresh-text" }, vue.toDisplayString($options.t("up.pullRefresh.pull")), 1 /* TEXT */ ) ]) ], true) : $data.refreshStatus === "release" ? vue.renderSlot(_ctx.$slots, "release", { key: 1, distance: $data.refreshDistance, threshold: $props.threshold }, () => [ vue.createCommentVNode(" 默认释放状态 "), vue.createElementVNode("view", { class: "refresh-content" }, [ vue.createElementVNode("view", { class: "refresh-indicator" }, [ vue.createVNode(_component_up_icon, { name: "arrow-upward", size: "26px" }) ]), vue.createElementVNode( "text", { class: "refresh-text" }, vue.toDisplayString($options.t("up.pullRefresh.release")), 1 /* TEXT */ ) ]) ], true) : $data.refreshStatus === "refreshing" ? vue.renderSlot(_ctx.$slots, "refreshing", { key: 2 }, () => [ vue.createCommentVNode(" 默认刷新中状态 "), vue.createElementVNode("view", { class: "refresh-content" }, [ vue.createElementVNode("view", { class: "refresh-indicator" }, [ vue.createElementVNode("view", { class: "spinner" }) ]), vue.createElementVNode( "text", { class: "refresh-text" }, vue.toDisplayString($options.t("up.pullRefresh.refreshing")) + "...", 1 /* TEXT */ ) ]) ], true) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 内容区域 "), vue.createElementVNode( "view", { class: "refresh-content-wrapper", style: vue.normalizeStyle({ transform: `translateY(${$data.contentTranslateY}px)` }) }, [ $props.useScrollView ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, class: "scroll-wrapper", "scroll-y": true, "enable-back-to-top": $props.enableBackToTop, "scroll-top": $props.scrollTop, "lower-threshold": $props.lowerThreshold, onScroll: _cache[0] || (_cache[0] = (...args) => $options.handleScroll && $options.handleScroll(...args)), onScrolltolower: _cache[1] || (_cache[1] = (...args) => $options.handleScrollToLower && $options.handleScrollToLower(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), vue.createCommentVNode(" 使用 u-loadmore 组件实现上拉加载更多 "), $props.showLoadmore ? (vue.openBlock(), vue.createBlock( _component_u_loadmore, vue.normalizeProps(vue.mergeProps({ key: 0 }, $props.loadmoreProps)), null, 16 /* FULL_PROPS */ )) : vue.createCommentVNode("v-if", true) ], 40, ["enable-back-to-top", "scroll-top", "lower-threshold"])) : (vue.openBlock(), vue.createElementBlock("view", { key: 1 }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true), vue.createCommentVNode(" 使用 u-loadmore 组件实现上拉加载更多 "), $props.showLoadmore ? (vue.openBlock(), vue.createBlock( _component_u_loadmore, vue.normalizeProps(vue.mergeProps({ key: 0 }, $props.loadmoreProps)), null, 16 /* FULL_PROPS */ )) : vue.createCommentVNode("v-if", true) ])) ], 4 /* STYLE */ ) ], 32 /* NEED_HYDRATION */ ); } const __easycom_1 = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["render", _sfc_render$Q], ["__scopeId", "data-v-34a6b4c5"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-pull-refresh/u-pull-refresh.vue"]]); const __vite_glob_0_81 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_1 }, Symbol.toStringTag, { value: "Module" })); let QRCode = {}; (function() { function unicodeFormat8(code2) { var c0, c1, c2; if (code2 < 128) { return [code2]; } else if (code2 < 2048) { c0 = 192 + (code2 >> 6); c1 = 128 + (code2 & 63); return [c0, c1]; } else { c0 = 224 + (code2 >> 12); c1 = 128 + (code2 >> 6 & 63); c2 = 128 + (code2 & 63); return [c0, c1, c2]; } } function getUTF8Bytes(string2) { var utf8codes = []; for (var i3 = 0; i3 < string2.length; i3++) { var code2 = string2.charCodeAt(i3); var utf8 = unicodeFormat8(code2); for (var j2 = 0; j2 < utf8.length; j2++) { utf8codes.push(utf8[j2]); } } return utf8codes; } function QRCodeAlg(data, errorCorrectLevel) { this.typeNumber = -1; this.errorCorrectLevel = errorCorrectLevel; this.modules = null; this.moduleCount = 0; this.dataCache = null; this.rsBlocks = null; this.totalDataCount = -1; this.data = data; this.utf8bytes = getUTF8Bytes(data); this.make(); } QRCodeAlg.prototype = { constructor: QRCodeAlg, /** * 获取二维码矩阵大小 * @return {num} 矩阵大小 */ getModuleCount: function() { return this.moduleCount; }, /** * 编码 */ make: function() { this.getRightType(); this.dataCache = this.createData(); this.createQrcode(); }, /** * 设置二位矩阵功能图形 * @param {bool} test 表示是否在寻找最好掩膜阶段 * @param {num} maskPattern 掩膜的版本 */ makeImpl: function(maskPattern) { this.moduleCount = this.typeNumber * 4 + 17; this.modules = new Array(this.moduleCount); for (var row = 0; row < this.moduleCount; row++) { this.modules[row] = new Array(this.moduleCount); } this.setupPositionProbePattern(0, 0); this.setupPositionProbePattern(this.moduleCount - 7, 0); this.setupPositionProbePattern(0, this.moduleCount - 7); this.setupPositionAdjustPattern(); this.setupTimingPattern(); this.setupTypeInfo(true, maskPattern); if (this.typeNumber >= 7) { this.setupTypeNumber(true); } this.mapData(this.dataCache, maskPattern); }, /** * 设置二维码的位置探测图形 * @param {num} row 探测图形的中心横坐标 * @param {num} col 探测图形的中心纵坐标 */ setupPositionProbePattern: function(row, col) { for (var r2 = -1; r2 <= 7; r2++) { if (row + r2 <= -1 || this.moduleCount <= row + r2) continue; for (var c2 = -1; c2 <= 7; c2++) { if (col + c2 <= -1 || this.moduleCount <= col + c2) continue; if (0 <= r2 && r2 <= 6 && (c2 == 0 || c2 == 6) || 0 <= c2 && c2 <= 6 && (r2 == 0 || r2 == 6) || 2 <= r2 && r2 <= 4 && 2 <= c2 && c2 <= 4) { this.modules[row + r2][col + c2] = true; } else { this.modules[row + r2][col + c2] = false; } } } }, /** * 创建二维码 * @return {[type]} [description] */ createQrcode: function() { var minLostPoint = 0; var pattern2 = 0; var bestModules = null; for (var i3 = 0; i3 < 8; i3++) { this.makeImpl(i3); var lostPoint = QRUtil.getLostPoint(this); if (i3 == 0 || minLostPoint > lostPoint) { minLostPoint = lostPoint; pattern2 = i3; bestModules = this.modules; } } this.modules = bestModules; this.setupTypeInfo(false, pattern2); if (this.typeNumber >= 7) { this.setupTypeNumber(false); } }, /** * 设置定位图形 * @return {[type]} [description] */ setupTimingPattern: function() { for (var r2 = 8; r2 < this.moduleCount - 8; r2++) { if (this.modules[r2][6] != null) { continue; } this.modules[r2][6] = r2 % 2 == 0; if (this.modules[6][r2] != null) { continue; } this.modules[6][r2] = r2 % 2 == 0; } }, /** * 设置矫正图形 * @return {[type]} [description] */ setupPositionAdjustPattern: function() { var pos = QRUtil.getPatternPosition(this.typeNumber); for (var i3 = 0; i3 < pos.length; i3++) { for (var j2 = 0; j2 < pos.length; j2++) { var row = pos[i3]; var col = pos[j2]; if (this.modules[row][col] != null) { continue; } for (var r2 = -2; r2 <= 2; r2++) { for (var c2 = -2; c2 <= 2; c2++) { if (r2 == -2 || r2 == 2 || c2 == -2 || c2 == 2 || r2 == 0 && c2 == 0) { this.modules[row + r2][col + c2] = true; } else { this.modules[row + r2][col + c2] = false; } } } } } }, /** * 设置版本信息(7以上版本才有) * @param {bool} test 是否处于判断最佳掩膜阶段 * @return {[type]} [description] */ setupTypeNumber: function(test2) { var bits = QRUtil.getBCHTypeNumber(this.typeNumber); for (var i3 = 0; i3 < 18; i3++) { var mod = !test2 && (bits >> i3 & 1) == 1; this.modules[Math.floor(i3 / 3)][i3 % 3 + this.moduleCount - 8 - 3] = mod; this.modules[i3 % 3 + this.moduleCount - 8 - 3][Math.floor(i3 / 3)] = mod; } }, /** * 设置格式信息(纠错等级和掩膜版本) * @param {bool} test * @param {num} maskPattern 掩膜版本 * @return {} */ setupTypeInfo: function(test2, maskPattern) { var data = QRErrorCorrectLevel[this.errorCorrectLevel] << 3 | maskPattern; var bits = QRUtil.getBCHTypeInfo(data); for (var i3 = 0; i3 < 15; i3++) { var mod = !test2 && (bits >> i3 & 1) == 1; if (i3 < 6) { this.modules[i3][8] = mod; } else if (i3 < 8) { this.modules[i3 + 1][8] = mod; } else { this.modules[this.moduleCount - 15 + i3][8] = mod; } var mod = !test2 && (bits >> i3 & 1) == 1; if (i3 < 8) { this.modules[8][this.moduleCount - i3 - 1] = mod; } else if (i3 < 9) { this.modules[8][15 - i3 - 1 + 1] = mod; } else { this.modules[8][15 - i3 - 1] = mod; } } this.modules[this.moduleCount - 8][8] = !test2; }, /** * 数据编码 * @return {[type]} [description] */ createData: function() { var buffer = new QRBitBuffer(); var lengthBits = this.typeNumber > 9 ? 16 : 8; buffer.put(4, 4); buffer.put(this.utf8bytes.length, lengthBits); for (var i3 = 0, l2 = this.utf8bytes.length; i3 < l2; i3++) { buffer.put(this.utf8bytes[i3], 8); } if (buffer.length + 4 <= this.totalDataCount * 8) { buffer.put(0, 4); } while (buffer.length % 8 != 0) { buffer.putBit(false); } while (true) { if (buffer.length >= this.totalDataCount * 8) { break; } buffer.put(QRCodeAlg.PAD0, 8); if (buffer.length >= this.totalDataCount * 8) { break; } buffer.put(QRCodeAlg.PAD1, 8); } return this.createBytes(buffer); }, /** * 纠错码编码 * @param {buffer} buffer 数据编码 * @return {[type]} */ createBytes: function(buffer) { var offset = 0; var maxDcCount = 0; var maxEcCount = 0; var length = this.rsBlock.length / 3; var rsBlocks = new Array(); for (var i3 = 0; i3 < length; i3++) { var count = this.rsBlock[i3 * 3 + 0]; var totalCount = this.rsBlock[i3 * 3 + 1]; var dataCount = this.rsBlock[i3 * 3 + 2]; for (var j2 = 0; j2 < count; j2++) { rsBlocks.push([dataCount, totalCount]); } } var dcdata = new Array(rsBlocks.length); var ecdata = new Array(rsBlocks.length); for (var r2 = 0; r2 < rsBlocks.length; r2++) { var dcCount = rsBlocks[r2][0]; var ecCount = rsBlocks[r2][1] - dcCount; maxDcCount = Math.max(maxDcCount, dcCount); maxEcCount = Math.max(maxEcCount, ecCount); dcdata[r2] = new Array(dcCount); for (var i3 = 0; i3 < dcdata[r2].length; i3++) { dcdata[r2][i3] = 255 & buffer.buffer[i3 + offset]; } offset += dcCount; var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); var rawPoly = new QRPolynomial(dcdata[r2], rsPoly.getLength() - 1); var modPoly = rawPoly.mod(rsPoly); ecdata[r2] = new Array(rsPoly.getLength() - 1); for (var i3 = 0; i3 < ecdata[r2].length; i3++) { var modIndex = i3 + modPoly.getLength() - ecdata[r2].length; ecdata[r2][i3] = modIndex >= 0 ? modPoly.get(modIndex) : 0; } } var data = new Array(this.totalDataCount); var index2 = 0; for (var i3 = 0; i3 < maxDcCount; i3++) { for (var r2 = 0; r2 < rsBlocks.length; r2++) { if (i3 < dcdata[r2].length) { data[index2++] = dcdata[r2][i3]; } } } for (var i3 = 0; i3 < maxEcCount; i3++) { for (var r2 = 0; r2 < rsBlocks.length; r2++) { if (i3 < ecdata[r2].length) { data[index2++] = ecdata[r2][i3]; } } } return data; }, /** * 布置模块,构建最终信息 * @param {} data * @param {} maskPattern * @return {} */ mapData: function(data, maskPattern) { var inc = -1; var row = this.moduleCount - 1; var bitIndex = 7; var byteIndex = 0; for (var col = this.moduleCount - 1; col > 0; col -= 2) { if (col == 6) col--; while (true) { for (var c2 = 0; c2 < 2; c2++) { if (this.modules[row][col - c2] == null) { var dark = false; if (byteIndex < data.length) { dark = (data[byteIndex] >>> bitIndex & 1) == 1; } var mask = QRUtil.getMask(maskPattern, row, col - c2); if (mask) { dark = !dark; } this.modules[row][col - c2] = dark; bitIndex--; if (bitIndex == -1) { byteIndex++; bitIndex = 7; } } } row += inc; if (row < 0 || this.moduleCount <= row) { row -= inc; inc = -inc; break; } } } } }; QRCodeAlg.PAD0 = 236; QRCodeAlg.PAD1 = 17; var QRErrorCorrectLevel = [1, 0, 3, 2]; var QRMaskPattern = { PATTERN000: 0, PATTERN001: 1, PATTERN010: 2, PATTERN011: 3, PATTERN100: 4, PATTERN101: 5, PATTERN110: 6, PATTERN111: 7 }; var QRUtil = { /* 每个版本矫正图形的位置 */ PATTERN_POSITION_TABLE: [ [], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170] ], G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0, G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0, G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1, /* BCH编码格式信息 */ getBCHTypeInfo: function(data) { var d2 = data << 10; while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { d2 ^= QRUtil.G15 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G15); } return (data << 10 | d2) ^ QRUtil.G15_MASK; }, /* BCH编码版本信息 */ getBCHTypeNumber: function(data) { var d2 = data << 12; while (QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { d2 ^= QRUtil.G18 << QRUtil.getBCHDigit(d2) - QRUtil.getBCHDigit(QRUtil.G18); } return data << 12 | d2; }, /* 获取BCH位信息 */ getBCHDigit: function(data) { var digit = 0; while (data != 0) { digit++; data >>>= 1; } return digit; }, /* 获取版本对应的矫正图形位置 */ getPatternPosition: function(typeNumber) { return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; }, /* 掩膜算法 */ getMask: function(maskPattern, i3, j2) { switch (maskPattern) { case QRMaskPattern.PATTERN000: return (i3 + j2) % 2 == 0; case QRMaskPattern.PATTERN001: return i3 % 2 == 0; case QRMaskPattern.PATTERN010: return j2 % 3 == 0; case QRMaskPattern.PATTERN011: return (i3 + j2) % 3 == 0; case QRMaskPattern.PATTERN100: return (Math.floor(i3 / 2) + Math.floor(j2 / 3)) % 2 == 0; case QRMaskPattern.PATTERN101: return i3 * j2 % 2 + i3 * j2 % 3 == 0; case QRMaskPattern.PATTERN110: return (i3 * j2 % 2 + i3 * j2 % 3) % 2 == 0; case QRMaskPattern.PATTERN111: return (i3 * j2 % 3 + (i3 + j2) % 2) % 2 == 0; default: throw new Error("bad maskPattern:" + maskPattern); } }, /* 获取RS的纠错多项式 */ getErrorCorrectPolynomial: function(errorCorrectLength) { var a2 = new QRPolynomial([1], 0); for (var i3 = 0; i3 < errorCorrectLength; i3++) { a2 = a2.multiply(new QRPolynomial([1, QRMath.gexp(i3)], 0)); } return a2; }, /* 获取评价 */ getLostPoint: function(qrCode) { var moduleCount = qrCode.getModuleCount(), lostPoint = 0, darkCount = 0; for (var row = 0; row < moduleCount; row++) { var sameCount = 0; var head = qrCode.modules[row][0]; for (var col = 0; col < moduleCount; col++) { var current = qrCode.modules[row][col]; if (col < moduleCount - 6) { if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) { if (col < moduleCount - 10) { if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) { lostPoint += 40; } } else if (col > 3) { if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) { lostPoint += 40; } } } } if (row < moduleCount - 1 && col < moduleCount - 1) { var count = 0; if (current) count++; if (qrCode.modules[row + 1][col]) count++; if (qrCode.modules[row][col + 1]) count++; if (qrCode.modules[row + 1][col + 1]) count++; if (count == 0 || count == 4) { lostPoint += 3; } } if (head ^ current) { sameCount++; } else { head = current; if (sameCount >= 5) { lostPoint += 3 + sameCount - 5; } sameCount = 1; } if (current) { darkCount++; } } } for (var col = 0; col < moduleCount; col++) { var sameCount = 0; var head = qrCode.modules[0][col]; for (var row = 0; row < moduleCount; row++) { var current = qrCode.modules[row][col]; if (row < moduleCount - 6) { if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) { if (row < moduleCount - 10) { if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) { lostPoint += 40; } } else if (row > 3) { if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) { lostPoint += 40; } } } } if (head ^ current) { sameCount++; } else { head = current; if (sameCount >= 5) { lostPoint += 3 + sameCount - 5; } sameCount = 1; } } } var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; lostPoint += ratio * 10; return lostPoint; } }; var QRMath = { /* 将n转化为a^m */ glog: function(n2) { if (n2 < 1) { throw new Error("glog(" + n2 + ")"); } return QRMath.LOG_TABLE[n2]; }, /* 将a^m转化为n */ gexp: function(n2) { while (n2 < 0) { n2 += 255; } while (n2 >= 256) { n2 -= 255; } return QRMath.EXP_TABLE[n2]; }, EXP_TABLE: new Array(256), LOG_TABLE: new Array(256) }; for (var i2 = 0; i2 < 8; i2++) { QRMath.EXP_TABLE[i2] = 1 << i2; } for (var i2 = 8; i2 < 256; i2++) { QRMath.EXP_TABLE[i2] = QRMath.EXP_TABLE[i2 - 4] ^ QRMath.EXP_TABLE[i2 - 5] ^ QRMath.EXP_TABLE[i2 - 6] ^ QRMath.EXP_TABLE[i2 - 8]; } for (var i2 = 0; i2 < 255; i2++) { QRMath.LOG_TABLE[QRMath.EXP_TABLE[i2]] = i2; } function QRPolynomial(num, shift) { if (num.length == void 0) { throw new Error(num.length + "/" + shift); } var offset = 0; while (offset < num.length && num[offset] == 0) { offset++; } this.num = new Array(num.length - offset + shift); for (var i3 = 0; i3 < num.length - offset; i3++) { this.num[i3] = num[i3 + offset]; } } QRPolynomial.prototype = { get: function(index2) { return this.num[index2]; }, getLength: function() { return this.num.length; }, /** * 多项式乘法 * @param {QRPolynomial} e 被乘多项式 * @return {[type]} [description] */ multiply: function(e2) { var num = new Array(this.getLength() + e2.getLength() - 1); for (var i3 = 0; i3 < this.getLength(); i3++) { for (var j2 = 0; j2 < e2.getLength(); j2++) { num[i3 + j2] ^= QRMath.gexp(QRMath.glog(this.get(i3)) + QRMath.glog(e2.get(j2))); } } return new QRPolynomial(num, 0); }, /** * 多项式模运算 * @param {QRPolynomial} e 模多项式 * @return {} */ mod: function(e2) { var tl = this.getLength(), el = e2.getLength(); if (tl - el < 0) { return this; } var num = new Array(tl); for (var i3 = 0; i3 < tl; i3++) { num[i3] = this.get(i3); } while (num.length >= el) { var ratio = QRMath.glog(num[0]) - QRMath.glog(e2.get(0)); for (var i3 = 0; i3 < e2.getLength(); i3++) { num[i3] ^= QRMath.gexp(QRMath.glog(e2.get(i3)) + ratio); } while (num[0] == 0) { num.shift(); } } return new QRPolynomial(num, 0); } }; var RS_BLOCK_TABLE = [ // L // M // Q // H // 1 [1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], // 2 [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], // 3 [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], // 4 [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], // 5 [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], // 6 [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], // 7 [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], // 8 [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], // 9 [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], // 10 [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], // 11 [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], // 12 [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], // 13 [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], // 14 [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], // 15 [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], // 16 [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], // 17 [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], // 18 [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], // 19 [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], // 20 [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], // 21 [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], // 22 [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], // 23 [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], // 24 [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], // 25 [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], // 26 [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], // 27 [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], // 28 [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], // 29 [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], // 30 [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], // 31 [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], // 32 [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], // 33 [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], // 34 [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], // 35 [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], // 36 [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], // 37 [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], // 38 [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], // 39 [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], // 40 [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16] ]; QRCodeAlg.prototype.getRightType = function() { for (var typeNumber = 1; typeNumber < 41; typeNumber++) { var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel]; if (rsBlock == void 0) { throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel); } var length = rsBlock.length / 3; var totalDataCount = 0; for (var i3 = 0; i3 < length; i3++) { var count = rsBlock[i3 * 3 + 0]; var dataCount = rsBlock[i3 * 3 + 2]; totalDataCount += dataCount * count; } var lengthBytes = typeNumber > 9 ? 2 : 1; if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) { this.typeNumber = typeNumber; this.rsBlock = rsBlock; this.totalDataCount = totalDataCount; break; } } }; function QRBitBuffer() { this.buffer = new Array(); this.length = 0; } QRBitBuffer.prototype = { get: function(index2) { var bufIndex = Math.floor(index2 / 8); return this.buffer[bufIndex] >>> 7 - index2 % 8 & 1; }, put: function(num, length) { for (var i3 = 0; i3 < length; i3++) { this.putBit(num >>> length - i3 - 1 & 1); } }, putBit: function(bit) { var bufIndex = Math.floor(this.length / 8); if (this.buffer.length <= bufIndex) { this.buffer.push(0); } if (bit) { this.buffer[bufIndex] |= 128 >>> this.length % 8; } this.length++; } }; let qrcodeAlgObjCache = []; QRCode = function(opt) { this.options = { text: "", size: 256, correctLevel: 3, background: "#ffffff", foreground: "#000000", pdground: "#000000", image: "", imageSize: 30, canvasId: opt.canvasId, nvueContext: opt.nvueContext, context: opt.context, usingComponents: opt.usingComponents, showLoading: opt.showLoading, loadingText: opt.loadingText }; let canvas = null; if (typeof opt === "string") { opt = { text: opt }; } if (opt) { for (var i3 in opt) { this.options[i3] = opt[i3]; } } var qrCodeAlg = null; for (var i3 = 0, l2 = qrcodeAlgObjCache.length; i3 < l2; i3++) { if (qrcodeAlgObjCache[i3].text == this.options.text && qrcodeAlgObjCache[i3].text.correctLevel == this.options.correctLevel) { qrCodeAlg = qrcodeAlgObjCache[i3].obj; break; } } if (i3 == l2) { qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel); qrcodeAlgObjCache.push({ text: this.options.text, correctLevel: this.options.correctLevel, obj: qrCodeAlg }); } let getForeGround = function(config2) { var options2 = config2.options; if (options2.pdground && (config2.row > 1 && config2.row < 5 && config2.col > 1 && config2.col < 5 || config2.row > config2.count - 6 && config2.row < config2.count - 2 && config2.col > 1 && config2.col < 5 || config2.row > 1 && config2.row < 5 && config2.col > config2.count - 6 && config2.col < config2.count - 2)) { return options2.pdground; } return options2.foreground; }; let getCanvas = async (id) => { return new Promise((resolve, reject) => { try { const query = uni.createSelectorQuery().in(this.options.context); query.select(`#${id}`).fields({ node: true, size: true }).exec((res) => { resolve(res[0].node); }); } catch (e2) { formatAppLog("error", "at uni_modules/uview-plus/components/u-qrcode/qrcode.js:1101", "createCanvasContextFail", e2); } }); }; let createCanvas = async function(options2) { let isApp = false; isApp = true; if (options2.showLoading) { uni.showLoading({ title: options2.loadingText, mask: true }); } var ctx = ""; if (options2.nvueContext) { ctx = options2.nvueContext; } else { canvas = await getCanvas(options2.canvasId); ctx = uni.createCanvasContext(options2.canvasId, options2.context); } options2.context.ctx = ctx; options2.context.canvas = canvas; var count = qrCodeAlg.getModuleCount(); var ratioSize = options2.size; var ratioImgSize = options2.imageSize; var tileW = (ratioSize / count).toPrecision(4); var tileH = (ratioSize / count).toPrecision(4); for (var row = 0; row < count; row++) { for (var col = 0; col < count; col++) { var w2 = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW); var h2 = Math.ceil((row + 1) * tileH) - Math.floor(row * tileH); var foreground = getForeGround({ row, col, count, options: options2 }); if (options2.nvueContext) { ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options2.background); } else { ctx.fillStyle = qrCodeAlg.modules[row][col] ? foreground : options2.background; } ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w2, h2); } } if (options2.image) { let drawRoundedRect = function(ctxi, x3, y3, width, height, r2, lineWidth, fill, stroke) { if (options2.nvueContext || isApp) { ctxi.setLineWidth(lineWidth); ctxi.setFillStyle(options2.background); ctxi.setStrokeStyle(options2.background); } else { ctxi.lineWidth = lineWidth; ctxi.fillStyle = options2.background; ctxi.strokeStyle = options2.background; } ctxi.beginPath(); ctxi.moveTo(x3 + r2, y3); ctxi.lineTo(x3 + width, y3); ctxi.arc(x3 + width - r2, y3 + r2, r2, -Math.PI / 2, 0); ctxi.lineTo(x3 + width, y3 + height - r2); ctxi.arc(x3 + width - r2, y3 + height - r2, r2, 0, Math.PI / 2); ctxi.lineTo(x3 + r2, y3 + height); ctxi.arc(x3 + r2, y3 + height - r2, r2, Math.PI / 2, Math.PI); ctxi.lineTo(x3, y3 + r2); ctxi.arc(x3 + r2, y3 + r2, r2, Math.PI, Math.PI * 3 / 2); ctxi.closePath(); if (fill) { ctxi.fill(); } if (stroke) { ctxi.stroke(); } }; var x2 = Number(((ratioSize - ratioImgSize) / 2).toFixed(2)); var y2 = Number(((ratioSize - ratioImgSize) / 2).toFixed(2)); drawRoundedRect(ctx, x2, y2, ratioImgSize, ratioImgSize, 2, 6, true, true); if (options2.nvueContext) { ctx.drawImage(options2.image, x2, y2, ratioImgSize, ratioImgSize); } else { const img = new Image(); img.onload = () => { ctx.drawImage(img, x2, y2, ratioImgSize, ratioImgSize); }; img.src = options2.image; } } setTimeout(() => { if (options2.nvueContext || isApp) { ctx.draw(true, () => { setTimeout(() => { if (options2.nvueContext) { ctx.toTempFilePath( 0, 0, options2.width, options2.height, options2.width, options2.height, "", 1, function(res) { if (options2.cbResult) { options2.cbResult(res.tempFilePath); } } ); } else { uni.canvasToTempFilePath({ width: options2.width, height: options2.height, destWidth: options2.width, destHeight: options2.height, canvasId: options2.canvasId, quality: Number(1), success: function(res) { if (options2.cbResult) { if (!empty2(res.tempFilePath)) { options2.cbResult(res.tempFilePath); } else if (!empty2(res.apFilePath)) { options2.cbResult(res.apFilePath); } else { options2.cbResult(res.tempFilePath); } } }, fail: function(res) { if (options2.cbResult) { options2.cbResult(res); } }, complete: function() { uni.hideLoading(); } }, options2.context); } }, options2.text.length + 100); }); } else { options2.cbResult(""); } }, options2.usingComponents ? 0 : 150); }; createCanvas(this.options); let empty2 = function(v2) { let tp = typeof v2, rt = false; if (tp == "number" && String(v2) == "") { rt = true; } else if (tp == "undefined") { rt = true; } else if (tp == "object") { if (JSON.stringify(v2) == "{}" || JSON.stringify(v2) == "[]" || v2 == null) rt = true; } else if (tp == "string") { if (v2 == "" || v2 == "undefined" || v2 == "null" || v2 == "{}" || v2 == "[]") rt = true; } else if (tp == "function") { rt = false; } return rt; }; }; QRCode.prototype.clear = function(fn) { var ctx = ""; if (options.nvueContext) { ctx = options.nvueContext; } else { uni.createCanvasContext(this.options.canvasId, this.options.context); } ctx.clearRect(0, 0, this.options.size, this.options.size); ctx.draw(false, () => { if (fn) { fn(); } }); }; })(); const QRCode$1 = QRCode; let qrcode; const _sfc_main$Q = { name: "u-qrcode", props: { cid: { type: String, default: () => `u-qrcode-canvas${Math.floor(Math.random() * 1e6)}` }, size: { type: Number, default: 200 }, unit: { type: String, default: "px" }, show: { type: Boolean, default: true }, val: { type: String, default: "" }, background: { type: String, default: "#ffffff" }, foreground: { type: String, default: "#000000" }, pdground: { type: String, default: "#000000" }, icon: { type: String, default: "" }, iconSize: { type: Number, default: 40 }, lv: { type: Number, default: 3 }, onval: { type: Boolean, default: true }, loadMake: { type: Boolean, default: true }, usingComponents: { type: Boolean, default: true }, showLoading: { type: Boolean, default: true }, loadingText: { type: String, default: "生成中" }, allowPreview: { type: Boolean, default: false }, // 是否使用根节点宽高 useRootHeightAndWidth: { type: Boolean, default: () => false } }, emits: ["result", "longpressCallback"], data() { return { loading: false, result: "", popupShow: false, list: [ { name: "保存二维码" } ], rootId: `rootId${Number(Math.random() * 100).toFixed(0)}`, ganvas: null, context: "", canvasObj: {}, sizeLocal: this.size, ctx: null, // ctx 在new Qrcode 时js文件内部设置 canvas: null // ctx 在new Qrcode 时js文件内部设置 }; }, async mounted() { if (this.useRootHeightAndWidth) { await this.setNewSize(); } if (this.loadMake) { if (!this._empty(this.val)) { setTimeout(() => { setTimeout(() => { this._makeCode(); }); }, 0); } } }, methods: { _makeCode() { let that2 = this; if (!this._empty(this.val)) { this.loading = true; qrcode = new QRCode$1({ context: that2, // 上下文环境 canvasId: that2.cid, // canvas-id nvueContext: that2.context, usingComponents: that2.usingComponents, // 是否是自定义组件 showLoading: false, // 是否显示loading loadingText: that2.loadingText, // loading文字 text: that2.val, // 生成内容 size: that2.sizeLocal, // 二维码大小 background: that2.background, // 背景色 foreground: that2.foreground, // 前景色 pdground: that2.pdground, // 定位角点颜色 correctLevel: that2.lv, // 容错级别 image: that2.icon, // 二维码图标 imageSize: that2.iconSize, // 二维码图标大小 cbResult: function(res) { that2._result(res); } }); } else { uni.showToast({ title: "二维码内容不能为空", icon: "none", duration: 2e3 }); } }, _clearCode() { this._result(""); qrcode.clear(); }, _saveCode() { let that2 = this; if (this.result != "") { uni.saveImageToPhotosAlbum({ filePath: that2.result, success: function() { uni.showToast({ title: "二维码保存成功", icon: "success", duration: 2e3 }); } }); } }, preview(e2) { if (this.allowPreview) { uni.previewImage({ urls: [this.result], longPressActions: { itemList: ["保存二维码图片"], success: function(data) { switch (data.tapIndex) { case 0: that._saveCode(); break; } }, fail: function(err) { formatAppLog("log", "at uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue:254", err.errMsg); } } }); } this.$emit("preview", { url: this.result }, e2); }, async toTempFilePath({ success, fail }) { if (this.context) { this.ctx.toTempFilePath( 0, 0, this.sizeLocal, this.sizeLocal, this.sizeLocal, this.sizeLocal, "", 1, (res) => { success(res); } ); } else { uni.canvasToTempFilePath( { canvasId: this.cid, success: (res) => { success(res); }, fail }, this ); } }, async longpress() { this.toTempFilePath({ success: (res) => { this.$emit("longpressCallback", res.tempFilePath); }, fail: (err) => { } }); }, /** * 使用根节点宽高 设置新的size * @return {Promise} */ async setNewSize() { const rootNode = await this.getNode(this.rootId, false); const { width, height } = rootNode; if (width > height) { this.sizeLocal = height; } else { this.sizeLocal = width; } }, /** * 获取节点 * @param id 节点id * @param isCanvas 是否为Canvas节点 * @return {Promise} */ async getNode(id, isCanvas) { return new Promise((resolve, reject) => { try { const query = uni.createSelectorQuery().in(this); query.select(`#${id}`).fields({ node: true, size: true }).exec((res) => { if (isCanvas) { resolve(res[0].node); } else { resolve(res[0]); } }); } catch (e2) { formatAppLog("error", "at uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue:361", "获取节点失败", e2); } }); }, selectClick(index2) { switch (index2) { case 0: alert("保存二维码"); this._saveCode(); break; } }, _result(res) { this.loading = false; this.result = res; this.$emit("result", res); }, _empty(v2) { let tp = typeof v2, rt = false; if (tp == "number" && String(v2) == "") { rt = true; } else if (tp == "undefined") { rt = true; } else if (tp == "object") { if (JSON.stringify(v2) == "{}" || JSON.stringify(v2) == "[]" || v2 == null) rt = true; } else if (tp == "string") { if (v2 == "" || v2 == "undefined" || v2 == "null" || v2 == "{}" || v2 == "[]") rt = true; } else if (tp == "function") { rt = false; } return rt; } }, watch: { size: function(n2, o2) { if (n2 != o2 && !this._empty(n2)) { this.cSize = n2; if (!this._empty(this.val)) { setTimeout(() => { this._makeCode(); }, 100); } } }, val: function(n2, o2) { if (this.onval) { if (n2 != o2 && !this._empty(n2)) { setTimeout(() => { this._makeCode(); }, 0); } } } }, computed: {} }; function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_loading_icon = vue.resolveComponent("up-loading-icon"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-qrcode", id: $data.rootId, style: vue.normalizeStyle({ width: $props.useRootHeightAndWidth ? "100%" : "auto", height: $props.useRootHeightAndWidth ? "100%" : "auto" }), onLongpress: _cache[1] || (_cache[1] = (...args) => $options.longpress && $options.longpress(...args)) }, [ vue.createElementVNode("view", { class: "u-qrcode__content", onClick: _cache[0] || (_cache[0] = (...args) => $options.preview && $options.preview(...args)) }, [ vue.createElementVNode("canvas", { class: "u-qrcode__canvas", id: $props.cid, "canvas-id": $props.cid, style: vue.normalizeStyle({ width: $data.sizeLocal + $props.unit, height: $data.sizeLocal + $props.unit }) }, null, 12, ["id", "canvas-id"]), vue.createElementVNode("canvas", { class: "u-qrcode__canvas", id: $props.cid, "canvas-id": $props.cid, style: vue.normalizeStyle({ width: $data.sizeLocal + $props.unit, height: $data.sizeLocal + $props.unit }) }, null, 12, ["id", "canvas-id"]), $props.showLoading && $data.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-qrcode__loading", style: vue.normalizeStyle({ width: $data.sizeLocal + $props.unit, height: $data.sizeLocal + $props.unit }) }, [ vue.createVNode(_component_up_loading_icon, { vertical: "", text: $props.loadingText, textSize: "14px" }, null, 8, ["text"]) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ], 44, ["id"]); } const uQrcode = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["render", _sfc_render$P], ["__scopeId", "data-v-44e78b4f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-qrcode/u-qrcode.vue"]]); const __vite_glob_0_82 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uQrcode }, Symbol.toStringTag, { value: "Module" })); const props$u = defineMixin({ props: { // 绑定的值 modelValue: { type: [String, Number, Boolean], default: () => props$1x.radioGroup.value }, // 是否禁用全部radio disabled: { type: Boolean, default: () => props$1x.radioGroup.disabled }, // 形状,circle-圆形,square-方形 shape: { type: String, default: () => props$1x.radioGroup.shape }, // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 activeColor: { type: String, default: () => props$1x.radioGroup.activeColor }, // 未选中的颜色 inactiveColor: { type: String, default: () => props$1x.radioGroup.inactiveColor }, // 标识符 name: { type: String, default: () => props$1x.radioGroup.name }, // 整个组件的尺寸,默认px size: { type: [String, Number], default: () => props$1x.radioGroup.size }, // 布局方式,row-横向,column-纵向 placement: { type: String, default: () => props$1x.radioGroup.placement }, // label的文本 label: { type: [String], default: () => props$1x.radioGroup.label }, // label的颜色 (默认 '#303133' ) labelColor: { type: [String], default: () => props$1x.radioGroup.labelColor }, // label的字体大小,px单位 labelSize: { type: [String, Number], default: () => props$1x.radioGroup.labelSize }, // 是否禁止点击文本操作checkbox(默认 false ) labelDisabled: { type: Boolean, default: () => props$1x.radioGroup.labelDisabled }, // 图标颜色 iconColor: { type: String, default: () => props$1x.radioGroup.iconColor }, // 图标的大小,单位px iconSize: { type: [String, Number], default: () => props$1x.radioGroup.iconSize }, // 竖向配列时,是否显示下划线 borderBottom: { type: Boolean, default: () => props$1x.radioGroup.borderBottom }, // 图标与文字的对齐方式 iconPlacement: { type: String, default: () => props$1x.radio.iconPlacement }, // item 之间的间距 gap: { type: [String, Number], default: () => props$1x.radioGroup.gap } } }); const _sfc_main$P = { name: "u-radio-group", mixins: [mpMixin, mixin, props$u], computed: { // 这里computed的变量,都是子组件u-radio需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化 // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-radio-group) // 拉取父组件新的变化后的参数 parentData() { return [ this.modelValue, this.disabled, this.inactiveColor, this.activeColor, this.size, this.labelDisabled, this.shape, this.iconSize, this.borderBottom, this.placement ]; }, bemClass() { return this.bem("radio-group", ["placement"]); }, radioGroupStyle() { const style = { gap: addUnit(this.gap) }; return deepMerge$1(style, addStyle(this.customStyle)); } }, watch: { // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 parentData() { if (this.children.length) { this.children.map((child) => { typeof child.init === "function" && child.init(); }); } } }, data() { return {}; }, created() { this.children = []; }, emits: ["update:modelValue", "change"], methods: { // 将其他的radio设置为未选中的状态 unCheckedOther(childInstance) { this.children.map((child) => { if (childInstance !== child) { child.checked = false; } }); const { name: name2 } = childInstance; this.$emit("update:modelValue", name2); this.$emit("change", name2); } } }; function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-radio-group", $options.bemClass]), style: vue.normalizeStyle($options.radioGroupStyle) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ ); } const uRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$P, [["render", _sfc_render$O], ["__scopeId", "data-v-cbc8bf70"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-radio-group/u-radio-group.vue"]]); const __vite_glob_0_83 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uRadioGroup }, Symbol.toStringTag, { value: "Module" })); const props$t = defineMixin({ props: { // radio的名称 name: { type: [String, Number, Boolean], default: () => props$1x.radio.name }, // 形状,square为方形,circle为圆型 shape: { type: String, default: () => props$1x.radio.shape }, // 是否禁用 disabled: { type: [String, Boolean], default: () => props$1x.radio.disabled }, // 是否禁止点击提示语选中单选框 labelDisabled: { type: [String, Boolean], default: () => props$1x.radio.labelDisabled }, // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值 activeColor: { type: String, default: () => props$1x.radio.activeColor }, // 未选中的颜色 inactiveColor: { type: String, default: () => props$1x.radio.inactiveColor }, // 图标的大小,单位px iconSize: { type: [String, Number], default: () => props$1x.radio.iconSize }, // label的字体大小,px单位 labelSize: { type: [String, Number], default: () => props$1x.radio.labelSize }, // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式 label: { type: [String, Number], default: () => props$1x.radio.label }, // 整体的大小 size: { type: [String, Number], default: () => props$1x.radio.size }, // 图标颜色 color: { type: String, default: () => props$1x.radio.color }, // label的颜色 labelColor: { type: String, default: () => props$1x.radio.labelColor }, // 图标颜色 iconColor: { type: String, default: () => props$1x.radio.iconColor } } }); const _sfc_main$O = { name: "u-radio", mixins: [mpMixin, mixin, props$t], data() { return { checked: false, // 当你看到这段代码的时候, // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式 // 故只能使用如此方法 parentData: { iconSize: 12, labelDisabled: null, disabled: null, shape: null, activeColor: null, inactiveColor: null, size: 18, value: null, modelValue: null, iconColor: null, placement: "row", borderBottom: false, iconPlacement: "left" } }; }, computed: { // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置 elDisabled() { return this.disabled !== "" ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false; }, // 是否禁用label点击 elLabelDisabled() { return this.labelDisabled !== "" ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false; }, // 组件尺寸,对应size的值,默认值为21px elSize() { return this.size ? this.size : this.parentData.size ? this.parentData.size : 21; }, // 组件的勾选图标的尺寸,默认12px elIconSize() { return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12; }, // 组件选中激活时的颜色 elActiveColor() { return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : "#2979ff"; }, // 组件选未中激活时的颜色 elInactiveColor() { return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : "#c8c9cc"; }, // label的颜色 elLabelColor() { return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : "#606266"; }, // 组件的形状 elShape() { return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : "circle"; }, // label大小 elLabelSize() { return addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : "15"); }, elIconColor() { const iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : "#ffffff"; if (this.elDisabled) { return this.checked ? this.elInactiveColor : "transparent"; } else { return this.checked ? iconColor : "transparent"; } }, iconClasses() { let classes = []; classes.push("u-radio__icon-wrap--" + this.elShape); if (this.elDisabled) { classes.push("u-radio__icon-wrap--disabled"); } if (this.checked && this.elDisabled) { classes.push("u-radio__icon-wrap--disabled--checked"); } return classes; }, iconWrapStyle() { const style = {}; style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : "#ffffff"; style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor; style.width = addUnit(this.elSize); style.height = addUnit(this.elSize); if (this.parentData.iconPlacement === "right") { style.marginRight = 0; } return style; }, radioStyle() { const style = {}; if (this.parentData.borderBottom && this.parentData.placement === "row") { error("检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效"); } if (this.parentData.borderBottom && this.parentData.placement === "column") { style.paddingBottom = os() === "ios" ? "12px" : "8px"; } return deepMerge$1(style, addStyle(this.customStyle)); } }, mounted() { this.init(); }, emits: ["change"], methods: { init() { this.updateParentData(); if (!this.parent) { error("u-radio必须搭配u-radio-group组件使用"); } this.checked = this.name === this.parentData.modelValue; }, updateParentData() { this.getParentData("u-radio-group"); }, // 点击图标 iconClickHandler(e2) { this.preventEvent(e2); if (!this.elDisabled) { this.setRadioCheckedStatus(); } }, // 横向两端排列时,点击组件即可触发选中事件 wrapperClickHandler(e2) { this.parentData.iconPlacement === "right" && this.iconClickHandler(e2); }, // 点击label labelClickHandler(e2) { this.preventEvent(e2); if (!this.elLabelDisabled && !this.elDisabled) { this.setRadioCheckedStatus(); } }, emitEvent() { if (!this.checked) { this.$emit("change", this.name); this.$nextTick(() => { formValidate(this, "change"); }); } }, // 改变组件选中状态 // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例 // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态 setRadioCheckedStatus() { this.emitEvent(); this.checked = true; typeof this.parent.unCheckedOther === "function" && this.parent.unCheckedOther(this); } } }; function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-radio cursor-pointer", [`u-radio-label--${$data.parentData.iconPlacement}`, $data.parentData.borderBottom && $data.parentData.placement === "column" && "u-border-bottom"]]), onClick: _cache[2] || (_cache[2] = vue.withModifiers((...args) => $options.wrapperClickHandler && $options.wrapperClickHandler(...args), ["stop"])), style: vue.normalizeStyle([$options.radioStyle]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-radio__icon-wrap cursor-pointer", $options.iconClasses]), onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.iconClickHandler && $options.iconClickHandler(...args), ["stop"])), style: vue.normalizeStyle([$options.iconWrapStyle]) }, [ vue.renderSlot(_ctx.$slots, "icon", { elIconSize: $options.elIconSize, elIconColor: $options.elIconColor }, () => [ vue.createVNode(_component_up_icon, { class: "u-radio__icon-wrap__icon", name: "checkbox-mark", size: $options.elIconSize, color: $options.elIconColor }, null, 8, ["size", "color"]) ], true) ], 6 /* CLASS, STYLE */ ), vue.createElementVNode("view", { class: "u-radio__label-wrap cursor-pointer", onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.labelClickHandler && $options.labelClickHandler(...args), ["stop"])) }, [ vue.renderSlot(_ctx.$slots, "label", { label: _ctx.label, elDisabled: $options.elDisabled }, () => [ vue.createElementVNode( "text", { class: "u-radio__text", style: vue.normalizeStyle({ color: $options.elDisabled ? $options.elInactiveColor : $options.elLabelColor, fontSize: $options.elLabelSize, lineHeight: $options.elLabelSize }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ ) ], true) ]) ], 6 /* CLASS, STYLE */ ); } const uRadio = /* @__PURE__ */ _export_sfc(_sfc_main$O, [["render", _sfc_render$N], ["__scopeId", "data-v-83036558"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-radio/u-radio.vue"]]); const __vite_glob_0_84 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uRadio }, Symbol.toStringTag, { value: "Module" })); const props$s = defineMixin({ props: { // 用于v-model双向绑定选中的星星数量 modelValue: { type: [String, Number], default: () => props$1x.rate.value }, // 要显示的星星数量 count: { type: [String, Number], default: () => props$1x.rate.count }, // 是否不可选中 disabled: { type: Boolean, default: () => props$1x.rate.disabled }, // 是否只读 readonly: { type: Boolean, default: () => props$1x.rate.readonly }, // 星星的大小,单位px size: { type: [String, Number], default: () => props$1x.rate.size }, // 未选中时的颜色 inactiveColor: { type: String, default: () => props$1x.rate.inactiveColor }, // 选中的颜色 activeColor: { type: String, default: () => props$1x.rate.activeColor }, // 星星之间的间距,单位px gutter: { type: [String, Number], default: () => props$1x.rate.gutter }, // 最少能选择的星星个数 minCount: { type: [String, Number], default: () => props$1x.rate.minCount }, // 是否允许半星 allowHalf: { type: Boolean, default: () => props$1x.rate.allowHalf }, // 选中时的图标(星星) activeIcon: { type: String, default: () => props$1x.rate.activeIcon }, // 未选中时的图标(星星) inactiveIcon: { type: String, default: () => props$1x.rate.inactiveIcon }, // 是否可以通过滑动手势选择评分 touchable: { type: Boolean, default: () => props$1x.rate.touchable } } }); const _sfc_main$N = { name: "u-rate", mixins: [mpMixin, mixin, props$s], data() { return { // 生成一个唯一id,否则一个页面多个评分组件,会造成冲突 elId: guid(), elClass: guid(), rateBoxLeft: 0, // 评分盒子左边到屏幕左边的距离,用于滑动选择时计算距离 activeIndex: this.modelValue, rateWidth: 0, // 每个星星的宽度 // 标识是否正在滑动,由于iOS事件上touch比click先触发,导致快速滑动结束后,接着触发click,导致事件混乱而出错 moving: false }; }, watch: { modelValue(val) { this.activeIndex = val; }, activeIndex: "emitEvent" }, emits: ["update:modelValue", "change"], methods: { addStyle, addUnit, init() { sleep().then(() => { this.getRateItemRect(); this.getRateIconWrapRect(); }); }, // 获取评分组件盒子的布局信息 async getRateItemRect() { await sleep(); this.$uGetRect("#" + this.elId).then((res) => { this.rateBoxLeft = res.left; }); }, // 获取单个星星的尺寸 getRateIconWrapRect() { this.$uGetRect("." + this.elClass).then((res) => { this.rateWidth = res.width; }); }, // 手指滑动 touchMove(e2) { if (!this.touchable) { return; } this.preventEvent(e2); const x2 = e2.changedTouches[0].pageX; this.getActiveIndex(x2); }, // 停止滑动 touchEnd(e2) { if (!this.touchable) { return; } this.preventEvent(e2); const x2 = e2.changedTouches[0].pageX; this.getActiveIndex(x2); }, // 通过点击,直接选中 clickHandler(e2, index2) { if (os() === "ios" && this.moving) { return; } this.preventEvent(e2); let x2 = 0; x2 = e2.changedTouches[0].pageX; this.getActiveIndex(x2, true); }, // 发出事件 emitEvent() { this.$emit("change", this.activeIndex); this.$emit("update:modelValue", this.activeIndex); }, // 获取当前激活的评分图标 getActiveIndex(x2, isClick = false) { if (this.disabled || this.readonly) { return; } const allRateWidth = this.rateWidth * this.count + this.rateBoxLeft; x2 = range$1(this.rateBoxLeft, allRateWidth, x2) - this.rateBoxLeft; const distance = x2; let index2; if (this.allowHalf) { index2 = Math.floor(distance / this.rateWidth); const decimal = distance % this.rateWidth; if (decimal <= this.rateWidth / 2 && decimal > 0) { index2 += 0.5; } else if (decimal > this.rateWidth / 2) { index2++; } } else { index2 = Math.floor(distance / this.rateWidth); const decimal = distance % this.rateWidth; if (isClick) { if (decimal > 0) index2++; } else { if (decimal > this.rateWidth / 2) index2++; } } this.activeIndex = Math.min(index2, this.count); if (this.activeIndex < this.minCount) { this.activeIndex = this.minCount; } setTimeout(() => { this.moving = true; }, 10); setTimeout(() => { this.moving = false; }, 10); } }, mounted() { this.init(); } }; function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-rate", id: $data.elId, ref: "u-rate", style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode( "view", { class: "u-rate__content", onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.touchMove && $options.touchMove(...args), ["stop"])), onTouchend: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.touchEnd && $options.touchEnd(...args), ["stop"])) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(Number(_ctx.count), (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-rate__content__item cursor-pointer", [$data.elClass]]), key: index2 }, [ vue.createElementVNode("view", { class: "u-rate__content__item__icon-wrap", ref_for: true, ref: "u-rate__content__item__icon-wrap", onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"]) }, [ vue.createVNode(_component_up_icon, { name: Math.floor($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon, color: _ctx.disabled ? "#c8c9cc" : Math.floor($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor, "custom-style": { padding: `0 ${$options.addUnit(_ctx.gutter / 2)}` }, size: _ctx.size }, null, 8, ["name", "color", "custom-style", "size"]) ], 8, ["onClick"]), _ctx.allowHalf ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, onClick: vue.withModifiers(($event) => $options.clickHandler($event, index2 + 1), ["stop"]), class: "u-rate__content__item__icon-wrap u-rate__content__item__icon-wrap--half", style: vue.normalizeStyle([{ width: $options.addUnit($data.rateWidth / 2) }]), ref_for: true, ref: "u-rate__content__item__icon-wrap" }, [ vue.createVNode(_component_up_icon, { name: Math.ceil($data.activeIndex) > index2 ? _ctx.activeIcon : _ctx.inactiveIcon, color: _ctx.disabled ? "#c8c9cc" : Math.ceil($data.activeIndex) > index2 ? _ctx.activeColor : _ctx.inactiveColor, "custom-style": { padding: `0 ${$options.addUnit(_ctx.gutter / 2)}` }, size: _ctx.size }, null, 8, ["name", "color", "custom-style", "size"]) ], 12, ["onClick"])) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 32 /* NEED_HYDRATION */ ) ], 12, ["id"]); } const uRate = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["render", _sfc_render$M], ["__scopeId", "data-v-69a384ee"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-rate/u-rate.vue"]]); const __vite_glob_0_85 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uRate }, Symbol.toStringTag, { value: "Module" })); const props$r = defineMixin({ props: { // 默认的显示占位高度 showHeight: { type: [String, Number], default: () => props$1x.readMore.showHeight }, // 展开后是否显示"收起"按钮 toggle: { type: Boolean, default: () => props$1x.readMore.toggle }, // 关闭时的提示文字 closeText: { type: String, default: () => props$1x.readMore.closeText }, // 展开时的提示文字 openText: { type: String, default: () => props$1x.readMore.openText }, // 提示的文字颜色 color: { type: String, default: () => props$1x.readMore.color }, // 提示文字的大小 fontSize: { type: [String, Number], default: () => props$1x.readMore.fontSize }, // 是否显示阴影 // 此参数不能写在props/readMore.js中进行默认配置,因为使用了条件编译,在外部js中 // uni无法准确识别当前是否处于nvue还是非nvue下 shadowStyle: { type: Object, default: () => ({ backgroundImage: "linear-gradient(-180deg, rgba(255, 255, 255, 0) 0%, #fff 80%)", paddingTop: "100px", marginTop: "-100px" }) }, // 段落首行缩进的字符个数 textIndent: { type: String, default: () => props$1x.readMore.textIndent }, // open和close事件时,将此参数返回在回调参数中 name: { type: [String, Number], default: () => props$1x.readMore.name } } }); const _sfc_main$M = { name: "u-read-more", mixins: [mpMixin, mixin, props$r], data() { return { isLongContent: false, // 是否需要隐藏一部分内容 status: "close", // 当前隐藏与显示的状态,close-收起状态,open-展开状态 elId: guid(), // 生成唯一class contentHeight: 100 // 内容高度 }; }, computed: { // 展开后无需阴影,收起时才需要阴影样式 innerShadowStyle() { if (this.status === "open") return {}; else return this.shadowStyle; } }, mounted() { this.init(); }, emits: ["open", "close"], methods: { addUnit, async init() { this.getContentHeight().then((height) => { this.contentHeight = height; if (height > getPx(this.showHeight)) { this.isLongContent = true; this.status = "close"; } else { this.isLongContent = false; this.status = "close"; } }); }, // 获取内容的高度 async getContentHeight() { await sleep(30); return new Promise((resolve) => { this.$uGetRect("." + this.elId).then((res) => { resolve(res.height); }); }); }, // 展开或者收起 toggleReadMore() { this.status = this.status === "close" ? "open" : "close"; if (this.toggle == false) this.isLongContent = false; this.$emit(this.status, this.name); } } }; function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_text = vue.resolveComponent("up-text"); const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-read-more" }, [ vue.createElementVNode( "view", { class: "u-read-more__content", style: vue.normalizeStyle({ height: $data.isLongContent && $data.status === "close" ? $options.addUnit(_ctx.showHeight) : $options.addUnit($data.contentHeight), textIndent: _ctx.textIndent }) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-read-more__content__inner", [$data.elId]]), ref: "u-read-more__content__inner" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 2 /* CLASS */ ) ], 4 /* STYLE */ ), $data.isLongContent ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-read-more__toggle", style: vue.normalizeStyle([$options.innerShadowStyle]) }, [ vue.renderSlot(_ctx.$slots, "toggle", {}, () => [ vue.createElementVNode("view", { class: "u-read-more__toggle__text", onClick: _cache[0] || (_cache[0] = (...args) => $options.toggleReadMore && $options.toggleReadMore(...args)) }, [ vue.createVNode(_component_up_text, { text: $data.status === "close" ? _ctx.closeText : _ctx.openText, color: _ctx.color, size: _ctx.fontSize, lineHeight: _ctx.fontSize, margin: "0 5px 0 0" }, null, 8, ["text", "color", "size", "lineHeight"]), vue.createElementVNode("view", { class: "u-read-more__toggle__icon" }, [ vue.createVNode(_component_up_icon, { color: _ctx.color, size: _ctx.fontSize + 2, name: $data.status === "close" ? "arrow-down" : "arrow-up" }, null, 8, ["color", "size", "name"]) ]) ]) ], true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const uReadMore = /* @__PURE__ */ _export_sfc(_sfc_main$M, [["render", _sfc_render$L], ["__scopeId", "data-v-4bc7fe29"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-read-more/u-read-more.vue"]]); const __vite_glob_0_86 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uReadMore }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$L = { name: "u-virtual-list", props: { // 数据源 listData: { type: Array, default: () => [] }, // 每项高度(固定高度模式) itemHeight: { type: Number, default: 50 }, // 容器高度 height: { type: [String, Number], default: "100%" }, // 缓冲区项数 buffer: { type: Number, default: 4 }, // 索引键名 keyField: { type: String, default: "id" }, // 当前滚动位置 scrollTop: { type: Number, default: 0 } }, data() { return { // 起始索引 startIndex: 0, // 容器实际高度 containerHeight: 0 }; }, computed: { // 可视区域显示的项数(根据容器实际高度自动计算) remain() { if (this.containerHeight <= 0) { return Math.ceil(500 / this.itemHeight) || 10; } const calculated = Math.ceil(this.containerHeight / this.itemHeight); return Math.max(1, calculated); }, // 可视项数量 visibleCount() { return this.remain + this.buffer; }, // 可视项 visibleItems() { const start = Math.max(0, this.startIndex - Math.floor(this.buffer / 2)); const end = Math.min(this.listData.length, start + this.visibleCount); return this.listData.slice(start, end).map((item, index2) => { return { ...item, _virtualIndex: start + index2 }; }); }, // 顶部占位高度 topPlaceholderHeight() { const start = Math.max(0, this.startIndex - Math.floor(this.buffer / 2)); return start * this.itemHeight; }, // 底部占位高度 bottomPlaceholderHeight() { const start = Math.max(0, this.startIndex - Math.floor(this.buffer / 2)); const end = Math.min(this.listData.length, start + this.visibleCount); return (this.listData.length - end) * this.itemHeight; } }, emits: ["update:scrollTop", "scroll"], watch: { listData: { handler() { this.updateVisibleItems(); }, immediate: true }, scrollTop: { handler(newVal) { this.updateVisibleItems(); } } }, mounted() { this.measureContainerHeight(); }, methods: { addUnit, // 测量容器高度 measureContainerHeight() { this.$nextTick(() => { const query = uni.createSelectorQuery().in(this); query.select(".u-virtual-list").boundingClientRect((rect) => { if (rect) { this.containerHeight = rect.height || 500; } else { this.containerHeight = this.calculateDefaultHeight(); } }).exec(); }); }, // 计算默认高度 calculateDefaultHeight() { const height = this.height; if (typeof height === "number") { return height; } if (typeof height === "string") { if (height.includes("px")) { return parseInt(height) || 500; } else if (height.includes("vh")) { const vh = parseInt(height); return isNaN(vh) ? 500 : vh / 100 * this.getViewportHeight(); } else if (height.includes("%")) { return 500; } else { const num = parseInt(height); return isNaN(num) ? 500 : num; } } return 500; }, // 获取视口高度 getViewportHeight() { try { const res = uni.getSystemInfoSync(); return res.windowHeight; } catch (e2) { return 600; } }, getItemKey(item) { return item[this.keyField] !== void 0 ? item[this.keyField] : item._virtualIndex; }, // 更新可视项 updateVisibleItems() { const index2 = Math.floor(this.scrollTop / this.itemHeight); this.startIndex = Math.max(0, index2); }, // 处理滚动 handleScroll(e2) { const scrollTop = e2.detail.scrollTop; this.$emit("update:scrollTop", scrollTop); this.$emit("scroll", scrollTop); }, // 处理触摸移动,阻止事件冒泡 handleTouchMove(e2) { e2.stopPropagation(); }, // 获取可见项范围 getVisibleRange() { const start = Math.max(0, this.startIndex - Math.floor(this.buffer / 2)); const end = Math.min(this.listData.length, start + this.visibleCount); return { start, end }; } } }; function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-virtual-list", style: vue.normalizeStyle({ height: $options.addUnit($props.height) }), ref: "container" }, [ vue.createElementVNode("scroll-view", { class: "virtual-scroll-container", "scroll-y": true, "scroll-top": $props.scrollTop, style: { height: "100%" }, onScroll: _cache[0] || (_cache[0] = (...args) => $options.handleScroll && $options.handleScroll(...args)) }, [ vue.createCommentVNode(' @touchmove.stop.prevent="handleTouchMove" '), vue.createElementVNode("view", { class: "scroll-content" }, [ vue.createCommentVNode(" 顶部占位 "), vue.createElementVNode( "view", { style: vue.normalizeStyle({ height: $options.topPlaceholderHeight + "px" }) }, null, 4 /* STYLE */ ), vue.createCommentVNode(" 可见项 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.visibleItems, (item) => { return vue.openBlock(), vue.createElementBlock( "view", { key: $options.getItemKey(item), class: "list-item", style: vue.normalizeStyle({ height: $props.itemHeight + "px" }) }, [ vue.renderSlot(_ctx.$slots, "default", { item, index: item._virtualIndex }, void 0, true) ], 4 /* STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )), vue.createCommentVNode(" 底部占位 "), vue.createElementVNode( "view", { style: vue.normalizeStyle({ height: $options.bottomPlaceholderHeight + "px" }) }, null, 4 /* STYLE */ ) ]) ], 40, ["scroll-top"]) ], 4 /* STYLE */ ); } const __easycom_0 = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$K], ["__scopeId", "data-v-2f4c3fe0"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-virtual-list/u-virtual-list.vue"]]); const __vite_glob_0_128 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: __easycom_0 }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$K = { name: "u-refresh-virtual-list", props: { // 数据源 listData: { type: Array, default: () => [] }, // 每项高度(固定高度模式) itemHeight: { type: Number, default: 50 }, // 容器高度 height: { type: [String, Number], default: "100%" }, // 缓冲区项数 buffer: { type: Number, default: 4 }, // 索引键名 keyField: { type: String, default: "id" } }, data() { return { refreshing: false, scrollTop: 0 }; }, methods: { handleRefresh() { this.refreshing = true; this.$emit("refresh"); }, handleScroll(scrollTop) { this.scrollTop = scrollTop; this.$emit("scroll", scrollTop); }, finishRefresh() { this.refreshing = false; }, scrollTo(top) { this.scrollTop = top; }, scrollToTop() { this.scrollTo(0); } } }; function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_virtual_list = resolveEasycom(vue.resolveDynamicComponent("u-virtual-list"), __easycom_0); const _component_u_pull_refresh = resolveEasycom(vue.resolveDynamicComponent("u-pull-refresh"), __easycom_1); return vue.openBlock(), vue.createBlock(_component_u_pull_refresh, { refreshing: $data.refreshing, threshold: 50, onRefresh: $options.handleRefresh }, { default: vue.withCtx(() => [ vue.createVNode(_component_u_virtual_list, { ref: "virtualList", "list-data": $props.listData, "item-height": $props.itemHeight, height: $props.height, buffer: $props.buffer, "key-field": $props.keyField, "scroll-top": $data.scrollTop, onScroll: $options.handleScroll }, { default: vue.withCtx(({ item, index: index2 }) => [ vue.renderSlot(_ctx.$slots, "default", { item, index: index2 }) ]), _: 3 /* FORWARDED */ }, 8, ["list-data", "item-height", "height", "buffer", "key-field", "scroll-top", "onScroll"]) ]), _: 3 /* FORWARDED */ }, 8, ["refreshing", "onRefresh"]); } const uRefreshVirtualList = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$J], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-refresh-virtual-list/u-refresh-virtual-list.vue"]]); const __vite_glob_0_87 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uRefreshVirtualList }, Symbol.toStringTag, { value: "Module" })); const props$q = defineMixin({ props: { // 给col添加间距,左右边距各占一半 gutter: { type: [String, Number], default: () => props$1x.row.gutter }, // 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`) justify: { type: String, default: () => props$1x.row.justify }, // 垂直对齐方式,可选值为top、center、bottom align: { type: String, default: () => props$1x.row.align } } }); const _sfc_main$J = { name: "u-row", mixins: [mpMixin, mixin, props$q], data() { return {}; }, computed: { uJustify() { if (this.justify == "end" || this.justify == "start") return "flex-" + this.justify; else if (this.justify == "around" || this.justify == "between") return "space-" + this.justify; else return this.justify; }, uAlignItem() { if (this.align == "top") return "flex-start"; if (this.align == "bottom") return "flex-end"; else return this.align; }, rowStyle() { const style = { alignItems: this.uAlignItem, justifyContent: this.uJustify }; if (this.gutter) { style.marginLeft = addUnit(-Number(this.gutter) / 2); style.marginRight = addUnit(-Number(this.gutter) / 2); } return deepMerge$1(style, addStyle(this.customStyle)); } }, emits: ["click"], methods: { clickHandler(e2) { this.$emit("click"); }, async getComponentWidth() { await sleep(); return new Promise((resolve) => { this.$uGetRect(".u-row").then((res) => { resolve(res.width); }); }); } } }; function _sfc_render$I(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-row", ref: "u-row", style: vue.normalizeStyle([$options.rowStyle]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const uRow = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["render", _sfc_render$I], ["__scopeId", "data-v-a2f99026"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-row/u-row.vue"]]); const __vite_glob_0_89 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uRow }, Symbol.toStringTag, { value: "Module" })); const props$p = defineMixin({ props: { // 指示器的整体宽度 indicatorWidth: { type: [String, Number], default: () => props$1x.scrollList.indicatorWidth }, // 滑块的宽度 indicatorBarWidth: { type: [String, Number], default: () => props$1x.scrollList.indicatorBarWidth }, // 是否显示面板指示器 indicator: { type: Boolean, default: () => props$1x.scrollList.indicator }, // 指示器非激活颜色 indicatorColor: { type: String, default: () => props$1x.scrollList.indicatorColor }, // 指示器的激活颜色 indicatorActiveColor: { type: String, default: () => props$1x.scrollList.indicatorActiveColor }, // 指示器样式,可通过bottom,left,right进行定位 indicatorStyle: { type: [String, Object], default: () => props$1x.scrollList.indicatorStyle } } }); const block0$1 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("wxs"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "0c1bc38e"; }; const _sfc_main$I = { name: "u-scroll-list", mixins: [mpMixin, mixin, props$p], data() { return { scrollInfo: { scrollLeft: 0, scrollWidth: 0 }, scrollWidth: 0 }; }, computed: { // 指示器为线型的样式 barStyle() { const style = {}; style.width = addUnit(this.indicatorBarWidth); style.backgroundColor = this.indicatorActiveColor; return style; }, lineStyle() { const style = {}; style.width = addUnit(this.indicatorWidth); style.backgroundColor = this.indicatorColor; return style; } }, mounted() { this.init(); }, emits: ["left", "right"], methods: { addStyle, getPx, init() { this.getComponentWidth(); }, // scrollEvent(status) { this.$emit(status); }, // 获取组件的宽度 async getComponentWidth() { await sleep(30); this.$uGetRect(".u-scroll-list").then((size) => { this.scrollWidth = size.width; }); } } }; function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-scroll-list", ref: "u-scroll-list" }, [ vue.createCommentVNode(" 以上平台,支持wxs "), vue.createElementVNode("scroll-view", { class: "u-scroll-list__scroll-view scroll-view-native", "scroll-x": "", "enable-flex": "", onScroll: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.scroll && _ctx.wxs.scroll(...args)), onScrolltoupper: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.scrolltoupper && _ctx.wxs.scrolltoupper(...args)), onScrolltolower: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.scrolltolower && _ctx.wxs.scrolltolower(...args)), "data-scrollWidth": $data.scrollWidth, "data-barWidth": $options.getPx(_ctx.indicatorBarWidth), "data-indicatorWidth": $options.getPx(_ctx.indicatorWidth), "show-scrollbar": false, "upper-threshold": 0, "lower-threshold": 0 }, [ vue.createElementVNode("view", { class: "u-scroll-list__scroll-view__content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]) ], 40, ["data-scrollWidth", "data-barWidth", "data-indicatorWidth"]), _ctx.indicator ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-scroll-list__indicator", style: vue.normalizeStyle([$options.addStyle(_ctx.indicatorStyle)]) }, [ vue.createElementVNode( "view", { class: "u-scroll-list__indicator__line", style: vue.normalizeStyle([$options.lineStyle]) }, [ vue.createElementVNode( "view", { class: "u-scroll-list__indicator__line__bar", style: vue.normalizeStyle([$options.barStyle]), ref: "u-scroll-list__indicator__line__bar" }, null, 4 /* STYLE */ ) ], 4 /* STYLE */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 512 /* NEED_PATCH */ ); } if (typeof block0$1 === "function") block0$1(_sfc_main$I); const uScrollList = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$H], ["__scopeId", "data-v-75b0f429"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-scroll-list/u-scroll-list.vue"]]); const __vite_glob_0_91 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uScrollList }, Symbol.toStringTag, { value: "Module" })); const props$o = defineMixin({ props: { // 绑定的值 modelValue: { type: [String, Number], default: () => props$1x.search.value }, // 搜索框形状,round-圆形,square-方形 shape: { type: String, default: () => props$1x.search.shape }, // 搜索框背景色 bgColor: { type: String, default: () => props$1x.search.bgColor }, // 占位提示文字 placeholder: { type: String, default: () => props$1x.search.placeholder }, // 是否启用清除控件 clearabled: { type: Boolean, default: () => props$1x.search.clearabled }, // 是否仅聚焦时显示清除控件 onlyClearableOnFocused: { type: Boolean, default: true }, // 是否自动聚焦 focus: { type: Boolean, default: () => props$1x.search.focus }, // 是否在搜索框右侧显示取消按钮 showAction: { type: Boolean, default: () => props$1x.search.showAction }, // 右侧取消按钮文字 actionText: { type: String, default: () => props$1x.search.actionText }, // 搜索框左侧文本 label: { type: [String, Number, null], default: () => props$1x.search.label }, // 输入框内容对齐方式,可选值为:left|center|right inputAlign: { type: String, default: () => props$1x.search.inputAlign }, // 是否启用输入框 disabled: { type: Boolean, default: () => props$1x.search.disabled }, // 开启showAction时,是否在input获取焦点时才显示 animation: { type: Boolean, default: () => props$1x.search.animation }, // 边框颜色,只要配置了颜色,才会有边框 borderColor: { type: String, default: () => props$1x.search.borderColor }, // 搜索图标的颜色,默认同输入框字体颜色 searchIconColor: { type: String, default: () => props$1x.search.searchIconColor }, // 搜索图标的大小 searchIconSize: { type: [Number, String], default: () => props$1x.search.searchIconSize }, // 输入框字体颜色 color: { type: String, default: () => props$1x.search.color }, // placeholder的颜色 placeholderColor: { type: String, default: () => props$1x.search.placeholderColor }, // 左边输入框的图标,可以为uView图标名称或图片路径 searchIcon: { type: String, default: () => props$1x.search.searchIcon }, // 组件与其他上下左右元素之间的距离,带单位的字符串形式,如"30px" margin: { type: String, default: () => props$1x.search.margin }, // 应该是uView-plus版本新增的,用于控制搜索图标的插槽位置 iconPosition: { type: String, default: () => props$1x.search.iconPosition }, // 输入框最大能输入的长度,-1为不限制长度 maxlength: { type: [String, Number], default: () => props$1x.search.maxlength }, // 输入框高度,单位px height: { type: [String, Number], default: () => props$1x.search.height }, // 键盘弹起时,是否自动上推页面 adjustPosition: { type: Boolean, default: () => props$1x.search.adjustPosition }, // 键盘收起时,是否自动失去焦点 autoBlur: { type: Boolean, default: () => props$1x.search.autoBlur }, // 输入框的样式,对象形式 inputStyle: { type: Object, default: () => props$1x.search.inputStyle }, // 右侧控件的样式,对象形式 actionStyle: { type: Object, default: () => props$1x.search.actionStyle }, // 自定义样式,对象形式 customStyle: { type: Object, default: () => props$1x.search.customStyle } } }); const _sfc_main$H = { name: "u-search", mixins: [mpMixin, mixin, props$o], data() { return { keyword: "", show: false, // 标记input当前状态是否处于聚焦中,如果是,才会显示右侧的清除控件 focused: this.focus // 绑定输入框的值 // inputValue: this.value }; }, watch: { keyword(nVal) { this.$emit("update:modelValue", nVal); this.$emit("change", nVal); }, modelValue: { immediate: true, handler(nVal) { this.keyword = nVal; } } }, computed: { showActionBtn() { return !this.animation && this.showAction; }, // 是否显示清除控件 isShowClear() { const { clearabled, focused, keyword, onlyClearableOnFocused } = this; if (!clearabled) { return false; } if (onlyClearableOnFocused) { return !!focused && keyword !== ""; } else { return keyword !== ""; } } }, emits: ["clear", "search", "custom", "focus", "blur", "click", "clickIcon", "update:modelValue", "change"], methods: { addStyle, addUnit, // 目前HX2.6.9 v-model双向绑定无效,故监听input事件获取输入框内容的变化 inputChange(e2) { this.keyword = e2.detail.value; }, // 清空输入 // 也可以作为用户通过this.$refs形式调用清空输入框内容 clear() { this.keyword = ""; this.$nextTick(() => { this.$emit("clear"); }); }, // 确定搜索 search(e2) { this.$emit("search", e2.detail.value); try { uni.hideKeyboard(); } catch (e3) { } }, // 点击右边自定义按钮的事件 custom() { this.$emit("custom", this.keyword); try { uni.hideKeyboard(); } catch (e2) { } }, // 获取焦点 getFocus() { this.focused = true; if (this.animation && this.showAction) this.show = true; this.$emit("focus", this.keyword); }, // 失去焦点 blur() { setTimeout(() => { this.focused = false; }, 100); this.show = false; this.$emit("blur", this.keyword); }, // 点击搜索框,只有disabled=true时才发出事件,因为禁止了输入,意味着是想跳转真正的搜索页 clickHandler() { if (this.disabled) this.$emit("click"); }, // 点击左边图标 clickIcon(e2) { this.$emit("clickIcon", this.keyword); try { uni.hideKeyboard(); } catch (e3) { } } } }; function _sfc_render$G(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-search", [_ctx.iconPosition === "right" && "u-search__reverse"]]), onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)), style: vue.normalizeStyle([{ margin: _ctx.margin }, $options.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode( "view", { class: "u-search__content", style: vue.normalizeStyle({ backgroundColor: _ctx.bgColor, borderRadius: _ctx.shape == "round" ? "100px" : "4px", borderColor: _ctx.borderColor }) }, [ _ctx.$slots.label || _ctx.label !== null ? vue.renderSlot(_ctx.$slots, "label", { key: 0 }, () => [ vue.createElementVNode( "text", { class: "u-search__content__label" }, vue.toDisplayString(_ctx.label), 1 /* TEXT */ ) ], true) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "u-search__content__icon" }, [ vue.createVNode(_component_up_icon, { onClick: $options.clickIcon, size: _ctx.searchIconSize, name: _ctx.searchIcon, color: _ctx.searchIconColor ? _ctx.searchIconColor : _ctx.color }, null, 8, ["onClick", "size", "name", "color"]) ]), vue.createElementVNode("input", { "confirm-type": "search", onBlur: _cache[0] || (_cache[0] = (...args) => $options.blur && $options.blur(...args)), value: $data.keyword, onConfirm: _cache[1] || (_cache[1] = (...args) => $options.search && $options.search(...args)), onInput: _cache[2] || (_cache[2] = (...args) => $options.inputChange && $options.inputChange(...args)), disabled: _ctx.disabled, onFocus: _cache[3] || (_cache[3] = (...args) => $options.getFocus && $options.getFocus(...args)), focus: _ctx.focus, maxlength: _ctx.maxlength, "adjust-position": _ctx.adjustPosition, "auto-blur": _ctx.autoBlur, "placeholder-class": "u-search__content__input--placeholder", placeholder: _ctx.placeholder, "placeholder-style": `color: ${_ctx.placeholderColor}`, class: "u-search__content__input", type: "text", style: vue.normalizeStyle([{ pointerEvents: _ctx.disabled ? "none" : "auto", textAlign: _ctx.inputAlign, color: _ctx.color, backgroundColor: _ctx.bgColor, height: $options.addUnit(_ctx.height) }, _ctx.inputStyle]) }, null, 44, ["value", "disabled", "focus", "maxlength", "adjust-position", "auto-blur", "placeholder", "placeholder-style"]), $options.isShowClear ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-search__content__icon u-search__content__close", onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args)) }, [ vue.createVNode(_component_up_icon, { name: "close", size: "11", color: "#ffffff", customStyle: "line-height: 12px" }) ])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "inputRight", {}, void 0, true) ], 4 /* STYLE */ ), vue.createElementVNode( "text", { style: vue.normalizeStyle([_ctx.actionStyle]), class: vue.normalizeClass(["u-search__action", [($options.showActionBtn || $data.show) && "u-search__action--active"]]), onClick: _cache[5] || (_cache[5] = vue.withModifiers((...args) => $options.custom && $options.custom(...args), ["stop", "prevent"])) }, vue.toDisplayString(_ctx.actionText), 7 /* TEXT, CLASS, STYLE */ ) ], 6 /* CLASS, STYLE */ ); } const uSearch = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$G], ["__scopeId", "data-v-e082a34a"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-search/u-search.vue"]]); const __vite_glob_0_92 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSearch }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$G = { name: "up-select", emits: ["update:current", "select"], props: { maxHeight: { type: String, default: "90vh" }, overlay: { type: Boolean, default: true }, overlayOpacity: { type: Number, default: 0.01 }, overlayStyle: { type: Object, default: () => { return {}; } }, duration: { type: Number, default: 300 }, label: { type: String, default: "选项" }, options: { type: Array, default: () => { return []; } }, keyName: { type: String, default: "id" }, labelName: { type: String, default: "name" }, showOptionsLabel: { type: Boolean, default: false }, current: { type: [String, Number], default: "" }, zIndex: { type: Number, default: 11e3 }, itemColor: { type: String, default: "#333333" }, iconColor: { type: String, default: "" }, iconSize: { type: [String], default: "13px" } }, data() { return { isOpen: false, optionsWrapLeft: "auto", optionsWrapRight: "auto" }; }, computed: { currentLabel() { let name2 = ""; this.options.forEach((ele) => { if (ele[this.keyName] === this.current) { name2 = ele[this.labelName]; } }); return name2; } }, methods: { openSelect() { this.isOpen = true; this.$nextTick(() => { if (this.isOpen) { this.adjustOptionsWrapPosition(); } }); }, overlayClick() { this.isOpen = false; }, selectItem(item) { this.isOpen = false; this.$emit("update:current", item[this.keyName]); this.$emit("select", item); }, adjustOptionsWrapPosition() { let wi = getWindowInfo(); let windowWidth2 = wi.windowWidth; this.$uGetRect(".u-select__options__wrap").then((rect) => { formatAppLog("log", "at uni_modules/uview-plus/components/u-select/u-select.vue:158", rect); if (rect.left + rect.width > windowWidth2) { this.optionsWrapLeft = "auto"; this.optionsWrapRight = `0px`; } }); } } }; function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d); return vue.openBlock(), vue.createElementBlock("view", { class: "u-select" }, [ vue.createElementVNode("view", { class: "u-select__content" }, [ vue.createElementVNode("view", { class: "u-select__label", onClick: _cache[0] || (_cache[0] = (...args) => $options.openSelect && $options.openSelect(...args)) }, [ vue.renderSlot(_ctx.$slots, "text", { currentLabel: $options.currentLabel }, () => [ $props.showOptionsLabel ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-select__text" }, vue.toDisplayString($options.currentLabel), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-select__text" }, vue.toDisplayString($props.label), 1 /* TEXT */ )) ], true), vue.renderSlot(_ctx.$slots, "icon", {}, () => [ vue.createVNode(_component_up_icon, { name: "arrow-down", size: $props.iconSize, color: $props.iconColor }, null, 8, ["size", "color"]) ], true) ]), $props.overlay ? (vue.openBlock(), vue.createBlock(_component_u_overlay, { key: 0, show: $data.isOpen, onClick: $options.overlayClick, zIndex: $props.zIndex, duration: $props.duration + 50, customStyle: $props.overlayStyle, opacity: $props.overlayOpacity, onTouchmove: vue.withModifiers(_ctx.noop, ["stop", "prevent"]) }, null, 8, ["show", "onClick", "zIndex", "duration", "customStyle", "opacity", "onTouchmove"])) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-select__options__wrap", style: vue.normalizeStyle({ overflowY: "auto", zIndex: $props.zIndex + 1, left: $data.optionsWrapLeft, right: $data.optionsWrapRight, maxHeight: $props.maxHeight }) }, [ $data.isOpen ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-select__options" }, [ vue.renderSlot(_ctx.$slots, "options", {}, () => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.options, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-select__options_item", $props.current == item[$props.keyName] ? "active" : ""]), key: index2, onClick: ($event) => $options.selectItem(item) }, [ vue.renderSlot(_ctx.$slots, "optionItem", { item }, () => [ vue.createElementVNode( "text", { class: "u-select__item_text", style: vue.normalizeStyle({ color: $props.itemColor }) }, vue.toDisplayString(item[$props.labelName]), 5 /* TEXT, STYLE */ ) ], true) ], 10, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], true) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ]) ]); } const uSelect = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$F], ["__scopeId", "data-v-791c325c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-select/u-select.vue"]]); const __vite_glob_0_93 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSelect }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$F = { name: "u-short-video", props: { // tabs标签列表 tabsList: { type: Array, default: () => [ { name: "推荐" }, { name: "关注" }, { name: "朋友" }, { name: "本地" } ] }, // 视频列表数据 videoList: { type: Array, default: () => [] }, // 当前选中的tab索引 currentTab: { type: Number, default: 0 }, // 当前播放的视频索引 currentVideo: { type: Number, default: 0 } }, data() { return { progressValue: 0, showSpeedSheet: false, currentSpeedVideoIndex: 0, speedOptions: [ { name: "0.5x", value: 0.5 }, { name: "0.75x", value: 0.75 }, { name: "1.0x", value: 1 }, { name: "1.25x", value: 1.25 }, { name: "1.5x", value: 1.5 }, { name: "2.0x", value: 2 } ] }; }, methods: { // 处理tab切换 handleTabChange(index2) { this.$emit("tabChange", index2); }, // 处理swiper切换 handleSwiperChange(e2) { const currentIndex = e2.detail.current; this.pauseCurrentVideo(); this.$nextTick(() => { this.playVideo(currentIndex); }); this.$emit("videoChange", currentIndex); }, // 处理点赞 handleLike(item, index2) { this.$emit("like", { item, index: index2 }); }, // 处理评论 handleComment(item, index2) { this.$emit("comment", { item, index: index2 }); }, // 处理分享 handleShare(item, index2) { this.$emit("share", { item, index: index2 }); }, // 处理收藏 handleCollect(item, index2) { this.$emit("collect", { item, index: index2 }); }, // 进度条拖动中 onProgressChanging(value2) { if (this.videoList[this.currentVideo]) { this.videoList[this.currentVideo]["progressValue"] = value2.detail.value; } this.$emit("progressChanging", { progress: value2.detail.value, index: this.currentVideo }); }, // 进度条值改变 onProgressChange(value2) { if (this.videoList[this.currentVideo]) { this.$set(this.videoList[this.currentVideo], "progressValue", value2.detail.value); } this.$emit("progressChange", { progress: value2.detail.value, index: this.currentVideo }); }, // 显示倍速选项 showSpeedOptions(index2) { this.currentSpeedVideoIndex = index2; this.showSpeedSheet = true; }, // 选择倍速 selectSpeed(action) { const videoContext = uni.createVideoContext("video-" + this.currentSpeedVideoIndex, this); videoContext.playbackRate(action.value); this.$set(this.videoList[this.currentSpeedVideoIndex], "playbackRate", action.value); this.showSpeedSheet = false; }, // 播放指定索引的视频 playVideo(index2) { const videoContext = uni.createVideoContext("video-" + index2, this); videoContext.play(); }, // 暂停当前视频 pauseCurrentVideo() { const videoContext = uni.createVideoContext("video-" + this.currentVideo, this); videoContext.pause(); }, // 视频播放事件 onVideoPlay(e2) { this.$emit("videoPlay", { index: this.currentVideo, event: e2 }); }, // 视频暂停事件 onVideoPause(e2) { this.$emit("videoPause", { index: this.currentVideo, event: e2 }); }, // 视频结束事件 onVideoEnded(e2) { this.$emit("videoEnded", { index: this.currentVideo, event: e2 }); }, // 视频时间更新事件 onTimeUpdate(e2) { const progress = e2.detail.currentTime / e2.detail.duration * 100; if (this.videoList[this.currentVideo]) { this.$set(this.videoList[this.currentVideo], "progress", progress); } this.$emit("timeUpdate", { index: this.currentVideo, event: e2 }); }, // 视频元数据加载完成事件 onLoadedMetadata(e2) { this.$emit("loadedMetadata", { index: this.currentVideo, event: e2 }); } } }; function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) { var _a2; const _component_up_icon = vue.resolveComponent("up-icon"); const _component_up_tabs = vue.resolveComponent("up-tabs"); const _component_u_avatar = resolveEasycom(vue.resolveDynamicComponent("u-avatar"), __easycom_0$a); const _component_up_button = vue.resolveComponent("up-button"); const _component_up_action_sheet = vue.resolveComponent("up-action-sheet"); const _component_up_slider = vue.resolveComponent("up-slider"); const _component_up_tabbar_item = vue.resolveComponent("up-tabbar-item"); const _component_up_tabbar = vue.resolveComponent("up-tabbar"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-short-video" }, [ vue.createCommentVNode(" 顶部导航区域 "), vue.createElementVNode("view", { class: "u-short-video__header" }, [ vue.renderSlot(_ctx.$slots, "menu", {}, () => [ vue.createElementVNode("view", { class: "u-short-video__header__menu" }, [ vue.createVNode(_component_up_icon, { name: "grid", size: "24" }) ]) ], true), vue.createVNode(_component_up_tabs, { list: $props.tabsList, current: $props.currentTab, lineColor: "#ddd", activeStyle: { color: "#ddd", fontWeight: 400, transform: "scale(1)" }, inactiveStyle: { color: "#bbb", transform: "scale(1)" }, onChange: $options.handleTabChange, class: "u-short-video__header__tabs" }, null, 8, ["list", "current", "activeStyle", "inactiveStyle", "onChange"]), vue.renderSlot(_ctx.$slots, "search", {}, () => [ vue.createElementVNode("view", { class: "u-short-video__header__search" }, [ vue.createVNode(_component_up_icon, { name: "search", size: "24" }) ]) ], true) ]), vue.createCommentVNode(" 视频内容区域 "), vue.createElementVNode("swiper", { vertical: true, autoplay: false, onChange: _cache[5] || (_cache[5] = (...args) => $options.handleSwiperChange && $options.handleSwiperChange(...args)), current: $props.currentVideo, class: "u-short-video__content" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.videoList, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index2 }, [ vue.createElementVNode("view", { class: "u-short-video__content__item" }, [ vue.createCommentVNode(" 视频播放区域 "), vue.createElementVNode("view", { class: "u-short-video__content__video" }, [ vue.createElementVNode("video", { id: "video-" + index2, src: item.videoUrl, autoplay: index2 === $props.currentVideo, controls: false, "show-fullscreen-btn": false, "show-play-btn": false, "show-center-play-btn": false, "enable-progress-gesture": true, loop: true, "playback-rate": item.playbackRate || 1, onPlay: _cache[0] || (_cache[0] = (...args) => $options.onVideoPlay && $options.onVideoPlay(...args)), onPause: _cache[1] || (_cache[1] = (...args) => $options.onVideoPause && $options.onVideoPause(...args)), onEnded: _cache[2] || (_cache[2] = (...args) => $options.onVideoEnded && $options.onVideoEnded(...args)), onTimeupdate: _cache[3] || (_cache[3] = (...args) => $options.onTimeUpdate && $options.onTimeUpdate(...args)), onLoadedmetadata: _cache[4] || (_cache[4] = (...args) => $options.onLoadedMetadata && $options.onLoadedMetadata(...args)), style: { "width": "100%", "height": "100%" } }, null, 40, ["id", "src", "autoplay", "playback-rate"]), vue.createCommentVNode(" 倍速设置按钮 "), vue.createCommentVNode(' \n {{ item.playbackRate || 1.0 }}x\n \n ') ]), vue.createCommentVNode(" 作者信息 "), vue.createElementVNode("view", { class: "u-short-video__content__author" }, [ vue.createElementVNode("view", { class: "u-short-video__content__author__avatar" }, [ vue.createVNode(_component_u_avatar, { src: item.author.avatar, size: "50px" }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "u-short-video__content__author__info" }, [ vue.createElementVNode( "text", { class: "u-short-video__content__author__name" }, vue.toDisplayString(item.author.name), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "u-short-video__content__author__desc" }, vue.toDisplayString(item.author.desc), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "u-short-video__content__author__follow" }, [ vue.createVNode(_component_up_button, { type: "primary", size: "mini" }, { default: vue.withCtx(() => [ vue.createTextVNode("关注") ]), _: 1 /* STABLE */ }) ]) ]), vue.createCommentVNode(" 右侧操作区域 "), vue.createElementVNode("view", { class: "u-short-video__content__actions" }, [ vue.renderSlot(_ctx.$slots, "actions", { item, index: index2 }, () => [ vue.createElementVNode("view", { class: "u-short-video__content__actions__item", onClick: ($event) => $options.handleLike(item, index2) }, [ vue.createVNode(_component_up_icon, { color: "#eee", name: item.isLiked ? "thumb-up-fill" : "thumb-up", size: "32px" }, null, 8, ["name"]), vue.createElementVNode( "text", { class: "u-short-video__content__actions__text" }, vue.toDisplayString(item.likeCount), 1 /* TEXT */ ) ], 8, ["onClick"]), vue.createElementVNode("view", { class: "u-short-video__content__actions__item", onClick: ($event) => $options.handleComment(item, index2) }, [ vue.createVNode(_component_up_icon, { color: "#eee", name: "chat", size: "32px" }), vue.createElementVNode( "text", { class: "u-short-video__content__actions__text" }, vue.toDisplayString(item.commentCount), 1 /* TEXT */ ) ], 8, ["onClick"]), vue.createElementVNode("view", { class: "u-short-video__content__actions__item", onClick: ($event) => $options.handleShare(item, index2) }, [ vue.createVNode(_component_up_icon, { color: "#eee", name: "share", size: "32px" }), vue.createElementVNode( "text", { class: "u-short-video__content__actions__text" }, vue.toDisplayString(item.shareCount), 1 /* TEXT */ ) ], 8, ["onClick"]), vue.createElementVNode("view", { class: "u-short-video__content__actions__item", onClick: ($event) => $options.handleCollect(item, index2) }, [ vue.createVNode(_component_up_icon, { color: "#eee", name: item.isCollected ? "bookmark-fill" : "bookmark", size: "32px" }, null, 8, ["name"]), vue.createElementVNode( "text", { class: "u-short-video__content__actions__text" }, vue.toDisplayString(item.collectCount), 1 /* TEXT */ ) ], 8, ["onClick"]) ], true) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 40, ["current"]), vue.createCommentVNode(" 倍速选择弹窗 "), vue.createVNode(_component_up_action_sheet, { show: $data.showSpeedSheet, actions: $data.speedOptions, title: "播放速度", onClose: _cache[6] || (_cache[6] = ($event) => $data.showSpeedSheet = false), onSelect: $options.selectSpeed }, null, 8, ["show", "actions", "onSelect"]), vue.createCommentVNode(" 底部导航栏 "), vue.createElementVNode("view", { class: "u-short-video__footer" }, [ vue.createCommentVNode(" 进度条 "), vue.createElementVNode("view", { class: "u-short-video__progress", style: { "z-index": "999" } }, [ vue.createVNode(_component_up_slider, { value: (_a2 = $props.videoList[$props.currentVideo]) == null ? void 0 : _a2.progress, min: 0, max: 100, step: 1, "show-value": false, innerStyle: { padding: 0 }, activeColor: "rgba(255,255,255,0.32)", "inactive-color": "rgba(255,255,255,0.3)", "block-size": "6px", "block-color": "rgba(255,255,255,0.5)", height: "1px", onChanging: $options.onProgressChanging, onChange: $options.onProgressChange }, null, 8, ["value", "onChanging", "onChange"]) ]), vue.renderSlot(_ctx.$slots, "tabbar", {}, () => [ vue.createVNode(_component_up_tabbar, { fixed: true, placeholder: true, safeAreaInsetBottom: true, borderColor: "rgba(255,255,255,0.25) !important", backgroundColor: "rgba(255,255,255,0.05)" }, { default: vue.withCtx(() => [ vue.createVNode(_component_up_tabbar_item, { onClick: _ctx.goNext, text: "首页", icon: "home" }, null, 8, ["onClick"]), vue.createVNode(_component_up_tabbar_item, { text: "放映厅", icon: "photo" }), vue.createVNode(_component_up_tabbar_item, { text: "直播", icon: "play-right" }), vue.createVNode(_component_up_tabbar_item, { text: "我的", icon: "account" }) ]), _: 1 /* STABLE */ }) ], true) ]) ]); } const uShortVideo = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$E], ["__scopeId", "data-v-577dd224"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-short-video/u-short-video.vue"]]); const __vite_glob_0_94 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uShortVideo }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$E = { name: "u-signature", props: { // 画布宽度 width: { type: [String, Number], default: 300 }, // 画布高度 height: { type: [String, Number], default: 200 }, // 背景颜色 bgColor: { type: String, default: "#ffffff" }, // 默认笔画颜色 color: { type: String, default: "#000000" }, // 默认笔画粗细 thickness: { type: [String, Number], default: 3 }, // 是否显示工具栏 showToolbar: { type: Boolean, default: true } }, data() { return { canvasId: "u-signature-" + Math.random().toString(36).substr(2, 9), canvasWidth: 300, canvasHeight: 200, lineColor: "#000000", lineWidth: 3, isDrawing: false, pathStack: [], // 存储绘制路径用于回退 currentPath: [], // 当前绘制路径 ctx: null, isEmpty: true, presetColors: [ "#000000", // 黑色 "#ff0000", // 红色 "#00ff00", // 绿色 "#0000ff", // 蓝色 "#ffff00", // 黄色 "#00ffff", // 青色 "#ff00ff", // 紫色 "#ffffff" // 白色 ], showBrushSettings: false, showColorSettings: false, lastPoint: null // 保存上一个点的坐标 }; }, mounted() { this.initCanvas(); }, watch: { width: { handler(newVal) { this.canvasWidth = Number(newVal); }, immediate: true }, height: { handler(newVal) { this.canvasHeight = Number(newVal); }, immediate: true }, color: { handler(newVal) { this.lineColor = newVal; }, immediate: true }, thickness: { handler(newVal) { this.lineWidth = Number(newVal); }, immediate: true } }, methods: { initCanvas() { const ctx = uni.createCanvasContext(this.canvasId, this); this.ctx = ctx; this.clearCanvas(); }, touchStart(e2) { if (!this.ctx) return; this.isDrawing = true; this.isEmpty = false; this.currentPath = []; const { x: x2, y: y2 } = this.getCanvasPoint(e2); this.ctx.beginPath(); this.ctx.moveTo(x2, y2); this.ctx.setLineCap("round"); this.ctx.setLineJoin("round"); this.ctx.setStrokeStyle(this.lineColor); this.ctx.setLineWidth(this.lineWidth); this.currentPath.push({ x: x2, y: y2, type: "start", color: this.lineColor, width: this.lineWidth }); this.lastPoint = { x: x2, y: y2 }; e2.preventDefault(); }, touchMove(e2) { if (!this.isDrawing || !this.ctx) return; e2.preventDefault(); const { x: x2, y: y2 } = this.getCanvasPoint(e2); if (this.lastPoint) { const distance = Math.sqrt(Math.pow(x2 - this.lastPoint.x, 2) + Math.pow(y2 - this.lastPoint.y, 2)); const steps = Math.max(1, Math.floor(distance / 1)); for (let i2 = 1; i2 <= steps; i2++) { const t2 = i2 / steps; const midX = this.lastPoint.x + (x2 - this.lastPoint.x) * t2; const midY = this.lastPoint.y + (y2 - this.lastPoint.y) * t2; this.ctx.lineTo(midX, midY); this.ctx.stroke(); this.currentPath.push({ x: midX, y: midY, type: "move" }); } } else { this.ctx.lineTo(x2, y2); this.ctx.stroke(); this.currentPath.push({ x: x2, y: y2, type: "move" }); } this.ctx.draw(true); this.lastPoint = { x: x2, y: y2 }; }, touchEnd(e2) { if (!this.isDrawing || !this.ctx) return; this.isDrawing = false; this.ctx.closePath(); this.lastPoint = null; if (this.currentPath.length > 0) { this.pathStack.push([...this.currentPath]); } }, // 同步获取canvas坐标点(兼容处理) getCanvasPoint(e2) { const touch = e2.touches[0]; uni.createSelectorQuery().in(this).select(".u-signature__canvas"); return { x: touch.x, y: touch.y }; }, // 选择颜色 selectColor(color2) { this.lineColor = color2; }, // 回退操作 undo() { if (this.pathStack.length === 0) return; this.pathStack.pop(); this.redraw(); }, // 重新绘制所有路径 redraw() { this.clearCanvas(); if (this.pathStack.length === 0) { this.isEmpty = true; return; } this.isEmpty = false; this.pathStack.forEach((path) => { if (path.length === 0) return; this.ctx.beginPath(); this.ctx.setLineCap("round"); this.ctx.setLineJoin("round"); path.forEach((point, index2) => { if (index2 === 0 && point.type === "start") { this.ctx.setStrokeStyle(point.color); this.ctx.setLineWidth(point.width); this.ctx.moveTo(point.x, point.y); ({ x: point.x, y: point.y }); } else if (point.type === "move") { this.ctx.lineTo(point.x, point.y); ({ x: point.x, y: point.y }); } }); this.ctx.stroke(); this.ctx.draw(true); }); }, // 清空画布 clear() { this.pathStack = []; this.currentPath = []; this.isEmpty = true; this.lastPoint = null; this.clearCanvas(); }, // 清空画布内容 clearCanvas() { if (!this.ctx) return; this.ctx.setFillStyle(this.bgColor); this.ctx.fillRect(0, 0, this.canvasWidth, this.canvasHeight); this.ctx.draw(); }, // 导出签名图片 exportSignature() { if (this.isEmpty) return; uni.canvasToTempFilePath({ canvasId: this.canvasId, fileType: "png", quality: 1, success: (res) => { this.$emit("confirm", res.tempFilePath); }, fail: (err) => { this.$emit("error", err); } }, this); }, // 切换笔画设置显示 toggleBrushSettings() { this.showBrushSettings = !this.showBrushSettings; if (this.showBrushSettings) { this.showColorSettings = false; } }, // 切换颜色设置显示 toggleColorSettings() { this.showColorSettings = !this.showColorSettings; if (this.showColorSettings) { this.showBrushSettings = false; } } } }; function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_up_slider = vue.resolveComponent("up-slider"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-signature" }, [ vue.createElementVNode("view", { class: "u-signature__canvas-wrap" }, [ vue.createElementVNode("canvas", { class: "u-signature__canvas", "canvas-id": $data.canvasId, "disable-scroll": true, onTouchstart: _cache[0] || (_cache[0] = (...args) => $options.touchStart && $options.touchStart(...args)), onTouchmove: _cache[1] || (_cache[1] = (...args) => $options.touchMove && $options.touchMove(...args)), onTouchend: _cache[2] || (_cache[2] = (...args) => $options.touchEnd && $options.touchEnd(...args)), style: vue.normalizeStyle({ width: $data.canvasWidth + "px", height: $data.canvasHeight + "px", background: $props.bgColor }) }, null, 44, ["canvas-id"]) ]), $props.showToolbar ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-signature__toolbar" }, [ vue.createElementVNode("view", { class: "u-signature__toolbar-icons u-flex u-flex-x" }, [ vue.createElementVNode("view", { class: "u-signature__toolbar-icon", onClick: _cache[3] || (_cache[3] = (...args) => $options.undo && $options.undo(...args)) }, [ vue.createVNode(_component_up_icon, { name: "arrow-left", size: "22", color: $data.pathStack.length === 0 ? "#ccc" : "#999" }, null, 8, ["color"]) ]), vue.createElementVNode("view", { class: "u-signature__toolbar-icon", onClick: _cache[4] || (_cache[4] = (...args) => $options.clear && $options.clear(...args)) }, [ vue.createVNode(_component_up_icon, { name: "trash", size: "25", color: "#999" }) ]), vue.createElementVNode("view", { class: "u-signature__toolbar-icon", onClick: _cache[5] || (_cache[5] = (...args) => $options.toggleBrushSettings && $options.toggleBrushSettings(...args)) }, [ vue.createVNode(_component_up_icon, { name: "edit-pen", size: "25", color: "#999" }) ]), vue.createElementVNode("view", { class: "u-signature__toolbar-icon", onClick: _cache[6] || (_cache[6] = (...args) => $options.toggleColorSettings && $options.toggleColorSettings(...args)) }, [ vue.createVNode(_component_up_icon, { name: "grid", size: "24", color: "#999" }) ]), vue.createElementVNode("view", { class: "u-signature__toolbar-icon", onClick: _cache[7] || (_cache[7] = (...args) => $options.exportSignature && $options.exportSignature(...args)) }, [ vue.createVNode(_component_up_icon, { name: "checkmark", size: "25", color: $data.isEmpty ? "#ccc" : "#999" }, null, 8, ["color"]) ]) ]), vue.createCommentVNode(" 笔画设置 "), $data.showBrushSettings ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-signature__brush-settings" }, [ vue.createElementVNode("view", { class: "u-signature__progress" }, [ vue.createElementVNode( "text", { class: "u-signature__progress-label" }, vue.toDisplayString(_ctx.t("up.signature.penSize")) + ":", 1 /* TEXT */ ), vue.createVNode(_component_up_slider, { modelValue: $data.lineWidth, "onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.lineWidth = $event), min: 1, max: 20, step: 1, onShowValue: ($event) => true, "value-show": $data.lineWidth }, null, 8, ["modelValue", "value-show"]) ]) ])) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 颜色设置 "), $data.showColorSettings ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-signature__color-settings" }, [ vue.createElementVNode("view", { class: "u-signature__color-picker" }, [ vue.createElementVNode( "text", { class: "u-signature__color-label" }, vue.toDisplayString(_ctx.t("up.signature.penColor")) + ":", 1 /* TEXT */ ), vue.createElementVNode("view", { class: "u-signature__colors" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.presetColors, (color2, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: vue.normalizeClass(["u-signature__color-item", { "u-signature__color-item--active": $data.lineColor === color2 }]), style: vue.normalizeStyle({ backgroundColor: color2 }), onClick: ($event) => $options.selectColor(color2) }, null, 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]) ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]); } const uSignature = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$D], ["__scopeId", "data-v-374dbb3e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-signature/u-signature.vue"]]); const __vite_glob_0_95 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSignature }, Symbol.toStringTag, { value: "Module" })); const props$n = defineMixin({ props: { // 是否展示骨架组件 loading: { type: Boolean, default: () => props$1x.skeleton.loading }, // 是否开启动画效果 animate: { type: Boolean, default: () => props$1x.skeleton.animate }, // 段落占位图行数 rows: { type: [String, Number], default: () => props$1x.skeleton.rows }, // 段落占位图的宽度 rowsWidth: { type: [String, Number, Array], default: () => props$1x.skeleton.rowsWidth }, // 段落占位图的高度 rowsHeight: { type: [String, Number, Array], default: () => props$1x.skeleton.rowsHeight }, // 是否展示标题占位图 title: { type: Boolean, default: () => props$1x.skeleton.title }, // 段落标题的宽度 titleWidth: { type: [String, Number], default: () => props$1x.skeleton.titleWidth }, // 段落标题的高度 titleHeight: { type: [String, Number], default: () => props$1x.skeleton.titleHeight }, // 是否展示头像占位图 avatar: { type: Boolean, default: () => props$1x.skeleton.avatar }, // 头像占位图大小 avatarSize: { type: [String, Number], default: () => props$1x.skeleton.avatarSize }, // 头像占位图的形状,circle-圆形,square-方形 avatarShape: { type: String, default: () => props$1x.skeleton.avatarShape } } }); const _sfc_main$D = { name: "u-skeleton", mixins: [mpMixin, mixin, props$n], data() { return { width: 0 }; }, watch: { loading() { this.getComponentWidth(); } }, computed: { rowsArray() { if (/%$/.test(this.rowsHeight)) { error("rowsHeight参数不支持百分比单位"); } const rows = []; for (let i2 = 0; i2 < this.rows; i2++) { let item = {}, rowWidth = test.array(this.rowsWidth) ? this.rowsWidth[i2] || (i2 === this.rows - 1 ? "70%" : "100%") : i2 === this.rows - 1 ? "70%" : this.rowsWidth, rowHeight = test.array(this.rowsHeight) ? this.rowsHeight[i2] || "18px" : this.rowsHeight; item.marginTop = !this.title && i2 === 0 ? 0 : this.title && i2 === 0 ? "20px" : "12px"; if (/%$/.test(rowWidth)) { item.width = addUnit(this.width * parseInt(rowWidth) / 100); } else { item.width = addUnit(rowWidth); } item.height = addUnit(rowHeight); rows.push(item); } return rows; }, uTitleWidth() { let tWidth = 0; if (/%$/.test(this.titleWidth)) { tWidth = addUnit(this.width * parseInt(this.titleWidth) / 100); } else { tWidth = addUnit(this.titleWidth); } return addUnit(tWidth); } }, mounted() { this.init(); }, methods: { addUnit, init() { this.getComponentWidth(); }, async setNvueAnimation() { }, // 获取组件的宽度 async getComponentWidth() { await sleep(20); this.$uGetRect(".u-skeleton__wrapper__content").then((size) => { this.width = size.width; }); } } }; function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-skeleton" }, [ _ctx.loading ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-skeleton__wrapper", ref: "u-skeleton__wrapper", style: { "display": "flex", "flex-direction": "row" } }, [ _ctx.avatar ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-skeleton__wrapper__avatar", [`u-skeleton__wrapper__avatar--${_ctx.avatarShape}`, _ctx.animate && "animate"]]), style: vue.normalizeStyle({ height: $options.addUnit(_ctx.avatarSize), width: $options.addUnit(_ctx.avatarSize) }) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-skeleton__wrapper__content", ref: "u-skeleton__wrapper__content", style: { "flex": "1" } }, [ _ctx.title ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-skeleton__wrapper__content__title", [_ctx.animate && "animate"]]), style: vue.normalizeStyle({ width: $options.uTitleWidth, height: $options.addUnit(_ctx.titleHeight) }) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.rowsArray, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-skeleton__wrapper__content__rows", [_ctx.animate && "animate"]]), key: index2, style: vue.normalizeStyle({ width: item.width, height: item.height, marginTop: item.marginTop }) }, null, 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 512 /* NEED_PATCH */ ) ], 512 /* NEED_PATCH */ )) : vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) ]); } const uSkeleton = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$C], ["__scopeId", "data-v-b376446f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-skeleton/u-skeleton.vue"]]); const __vite_glob_0_96 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSkeleton }, Symbol.toStringTag, { value: "Module" })); const props$m = defineMixin({ props: { // 最小可选值 min: { type: [Number, String], default: () => props$1x.slider.min }, // 最大可选值 max: { type: [Number, String], default: () => props$1x.slider.max }, // 步长,取值必须大于 0,并且可被(max - min)整除 step: { type: [Number, String], default: () => props$1x.slider.step }, // 当前取值 modelValue: { type: [String, Number], default: () => props$1x.slider.value }, // 是否区间模式 isRange: { type: Boolean, default: false }, // 双滑块时值 rangeValue: { type: [Array], default: [0, 0] }, // 滑块右侧已选择部分的背景色 activeColor: { type: String, default: () => props$1x.slider.activeColor }, // 滑块左侧未选择部分的背景色 inactiveColor: { type: String, default: () => props$1x.slider.inactiveColor }, // 滑块的大小,取值范围为 12 - 28 blockSize: { type: [Number, String], default: () => props$1x.slider.blockSize }, // 滑块的颜色 blockColor: { type: String, default: () => props$1x.slider.blockColor }, // 用户对滑块的自定义颜色 blockStyle: { type: Object, default: () => props$1x.slider.blockStyle }, // 禁用状态 disabled: { type: Boolean, default: () => props$1x.slider.disabled }, // 是否显示当前的选择值 showValue: { type: Boolean, default: () => props$1x.slider.showValue }, // 是否渲染uni-app框架内置组件 useNative: { type: Boolean, default: () => props$1x.slider.useNative }, // 滑块高度 height: { type: String, default: () => props$1x.slider.height }, innerStyle: { type: Object, default: () => props$1x.slider.innerStyle } } }); const _sfc_main$C = { name: "u-slider", mixins: [mpMixin, mixin, props$m], emits: ["start", "changing", "change", "update:modelValue"], data() { return { startX: 0, status: "end", newValue: 0, distanceX: 0, startValue0: 0, startValue: 0, barStyle0: {}, barStyle: {}, sliderRect: { left: 0, width: 0 } }; }, watch: { modelValue(n2) { if (this.status == "end") { const $crtFmtValue = this.updateValue(this.modelValue, false); this.$emit("change", $crtFmtValue); } }, rangeValue: { handler(n2) { if (this.status == "end") { this.updateValue(this.rangeValue[0], false, 0); this.updateValue(this.rangeValue[1], false, 1); this.$emit("change", this.rangeValue); } }, deep: true } }, created() { }, computed: { innerStyleCpu() { let style = this.innerStyle; style.height = this.isRange && this.showValue ? getPx(this.blockSize) + 24 + "px" : getPx(this.blockSize) + "px"; return style; } }, async mounted() { if (!this.useNative) { this.$uGetRect(".u-slider__base").then((rect) => { this.sliderRect = rect; if (this.sliderRect.width == 0) { formatAppLog("info", "at uni_modules/uview-plus/components/u-slider/u-slider.vue:193", "如在弹窗等元素中使用,请使用v-if来显示滑块,否则无法计算长度。"); } this.init(); }); } }, methods: { addStyle, getPx, init() { if (this.isRange) { this.updateValue(this.rangeValue[0], false, 0); this.updateValue(this.rangeValue[1], false, 1); } else { this.updateValue(this.modelValue, false); } }, // native拖动过程中触发 changingHandler(e2) { const { value: value2 } = e2.detail; this.$emit("update:modelValue", value2); this.$emit("changing", value2); }, // native滑动结束时触发 changeHandler(e2) { const { value: value2 } = e2.detail; this.$emit("update:modelValue", value2); this.$emit("change", value2); }, onTouchStart(event, index2 = 1) { if (this.disabled) return; this.startX = 0; let touches = event.touches[0]; this.startX = touches.clientX; if (this.isRange) { this.startValue0 = this.format(this.rangeValue[0], 0); this.startValue = this.format(this.rangeValue[1], 1); } else { this.startValue = this.format(this.modelValue); } this.status = "start"; let clientX = 0; clientX = touches.clientX; this.distanceX = clientX - this.sliderRect.left; this.newValue = this.distanceX / this.sliderRect.width * (this.max - this.min) + parseFloat(this.min); this.status = "moving"; let $crtFmtValue = this.updateValue(this.newValue, true, index2); this.$emit("changing", $crtFmtValue); }, onTouchMove(event, index2 = 1) { if (this.disabled) return; if (this.status == "start") this.$emit("start"); let touches = event.touches[0]; let clientX = 0; clientX = touches.clientX; this.distanceX = clientX - this.sliderRect.left; this.newValue = this.distanceX / this.sliderRect.width * (this.max - this.min) + parseFloat(this.min); this.status = "moving"; let $crtFmtValue = this.updateValue(this.newValue, true, index2); this.$emit("changing", $crtFmtValue); }, onTouchEnd(event, index2 = 1) { if (this.disabled) return; if (this.status === "moving") { let $crtFmtValue = this.updateValue(this.newValue, false, index2); this.$emit("change", $crtFmtValue); } this.status = "end"; }, onTouchStart2(event, index2 = 1) { if (!this.isRange) ; }, onTouchMove2(event, index2 = 1) { if (!this.isRange) ; }, onTouchEnd2(event, index2 = 1) { if (!this.isRange) ; }, onClick(event) { if (this.disabled) return; let clientX = event.detail.x - this.sliderRect.left; this.newValue = clientX / this.sliderRect.width * (this.max - this.min) + parseFloat(this.min); this.updateValue(this.newValue, false, 1); }, updateValue(value2, drag, index2 = 1) { let valueFormat = this.format(value2, index2); if (valueFormat > this.max) { valueFormat = this.max; } let width = Math.min((valueFormat - this.min) / (this.max - this.min) * this.sliderRect.width, this.sliderRect.width); let barStyle = { width: width + "px" }; if (drag == true) { barStyle.transition = "none"; } else { delete barStyle.transition; } if (this.isRange) { this.rangeValue[index2] = valueFormat; this.$emit("update:modelValue", this.rangeValue); } else { this.$emit("update:modelValue", valueFormat); } switch (index2) { case 0: this.barStyle0 = { ...barStyle }; break; case 1: this.barStyle = { ...barStyle }; break; } if (this.isRange) { return this.rangeValue; } else { return valueFormat; } }, format(value2, index2 = 1) { if (this.isRange) { switch (index2) { case 0: return Math.round( Math.max(this.min, Math.min(value2, this.rangeValue[1] - parseInt(this.step), this.max)) / parseInt(this.step) ) * parseInt(this.step); case 1: return Math.round( Math.max(this.min, this.rangeValue[0] + parseInt(this.step), Math.min(value2, this.max)) / parseInt(this.step) ) * parseInt(this.step); } } else { return Math.round( Math.max(this.min, Math.min(value2, this.max)) / parseInt(this.step) ) * parseInt(this.step); } } } }; function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-slider", style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]) }, [ !_ctx.useNative || _ctx.isRange ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode( "view", { ref: "u-slider-inner", class: vue.normalizeClass(["u-slider-inner", [_ctx.disabled ? "u-slider--disabled" : ""]]), onClick: _cache[9] || (_cache[9] = (...args) => $options.onClick && $options.onClick(...args)), "on:onTouchStart": _cache[10] || (_cache[10] = ($event) => $options.onTouchStart2($event, 1)), onTouchmove: _cache[11] || (_cache[11] = ($event) => $options.onTouchMove2($event, 1)), onTouchend: _cache[12] || (_cache[12] = ($event) => $options.onTouchEnd2($event, 1)), onTouchcancel: _cache[13] || (_cache[13] = ($event) => $options.onTouchEnd2($event, 1)), style: vue.normalizeStyle($options.innerStyleCpu) }, [ vue.createElementVNode( "view", { ref: "u-slider__base", class: "u-slider__base", style: vue.normalizeStyle([ { height: _ctx.height, backgroundColor: _ctx.inactiveColor } ]) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { onClick: _cache[0] || (_cache[0] = (...args) => $options.onClick && $options.onClick(...args)), class: "u-slider__gap", style: vue.normalizeStyle([ $data.barStyle, { height: _ctx.height, marginTop: "-" + _ctx.height, backgroundColor: _ctx.activeColor } ]) }, null, 4 /* STYLE */ ), _ctx.isRange ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-slider__gap u-slider__gap-0", style: vue.normalizeStyle([ $data.barStyle0, { height: _ctx.height, marginTop: "-" + _ctx.height, backgroundColor: _ctx.inactiveColor } ]) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.isRange && _ctx.showValue ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-slider__show-range-value", style: vue.normalizeStyle({ left: $options.getPx($data.barStyle0.width) + $options.getPx(_ctx.blockSize) / 2 + "px" }) }, vue.toDisplayString(this.rangeValue[0]), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.isRange && _ctx.showValue ? (vue.openBlock(), vue.createElementBlock( "text", { key: 2, class: "u-slider__show-range-value", style: vue.normalizeStyle({ left: $options.getPx($data.barStyle.width) + $options.getPx(_ctx.blockSize) / 2 + "px" }) }, vue.toDisplayString(this.rangeValue[1]), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.isRange ? (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "u-slider__button-wrap u-slider__button-wrap-0", onTouchstart: _cache[1] || (_cache[1] = ($event) => $options.onTouchStart($event, 0)), onTouchmove: _cache[2] || (_cache[2] = ($event) => $options.onTouchMove($event, 0)), onTouchend: _cache[3] || (_cache[3] = ($event) => $options.onTouchEnd($event, 0)), onTouchcancel: _cache[4] || (_cache[4] = ($event) => $options.onTouchEnd($event, 0)), style: vue.normalizeStyle({ left: $options.getPx($data.barStyle0.width) + $options.getPx(_ctx.blockSize) / 2 + "px" }) }, [ _ctx.$slots.min || _ctx.$slots.$min ? vue.renderSlot(_ctx.$slots, "min", { key: 0 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-slider__button", style: vue.normalizeStyle([_ctx.blockStyle, { height: $options.getPx(_ctx.blockSize, true), width: $options.getPx(_ctx.blockSize, true), backgroundColor: _ctx.blockColor }]) }, null, 4 /* STYLE */ )) ], 36 /* STYLE, NEED_HYDRATION */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-slider__button-wrap", onTouchstart: _cache[5] || (_cache[5] = (...args) => $options.onTouchStart && $options.onTouchStart(...args)), onTouchmove: _cache[6] || (_cache[6] = (...args) => $options.onTouchMove && $options.onTouchMove(...args)), onTouchend: _cache[7] || (_cache[7] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)), onTouchcancel: _cache[8] || (_cache[8] = (...args) => $options.onTouchEnd && $options.onTouchEnd(...args)), style: vue.normalizeStyle({ left: $options.getPx($data.barStyle.width) + $options.getPx(_ctx.blockSize) / 2 + "px" }) }, [ _ctx.isRange && (_ctx.$slots.max || _ctx.$slots.$max) ? vue.renderSlot(_ctx.$slots, "max", { key: 0 }, void 0, true) : _ctx.$slots.default || _ctx.$slots.$default ? vue.renderSlot(_ctx.$slots, "default", { key: 1 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "u-slider__button", style: vue.normalizeStyle([_ctx.blockStyle, { height: $options.getPx(_ctx.blockSize, true), width: $options.getPx(_ctx.blockSize, true), backgroundColor: _ctx.blockColor }]) }, null, 4 /* STYLE */ )) ], 36 /* STYLE, NEED_HYDRATION */ ) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ ), _ctx.showValue && !_ctx.isRange ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-slider__show-value" }, vue.toDisplayString(_ctx.modelValue), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock("slider", { key: 1, class: "u-slider__native", min: _ctx.min, max: _ctx.max, step: _ctx.step, value: _ctx.modelValue, activeColor: _ctx.activeColor, backgroundColor: _ctx.inactiveColor, blockSize: $options.getPx(_ctx.blockSize), blockColor: _ctx.blockColor, showValue: _ctx.showValue, disabled: _ctx.disabled, onChanging: _cache[14] || (_cache[14] = (...args) => $options.changingHandler && $options.changingHandler(...args)), onChange: _cache[15] || (_cache[15] = (...args) => $options.changeHandler && $options.changeHandler(...args)) }, null, 40, ["min", "max", "step", "value", "activeColor", "backgroundColor", "blockSize", "blockColor", "showValue", "disabled"])) ], 4 /* STYLE */ ); } const uSlider = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$B], ["__scopeId", "data-v-7b84e269"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-slider/u-slider.vue"]]); const __vite_glob_0_97 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSlider }, Symbol.toStringTag, { value: "Module" })); const props$l = defineMixin({ props: { // 标题 title: { type: [String, Number], default: () => props$1x.stepsItem.title }, // 描述文本 desc: { type: [String, Number], default: () => props$1x.stepsItem.desc }, // 图标大小 iconSize: { type: [String, Number], default: () => props$1x.stepsItem.iconSize }, // 当前步骤是否处于失败状态 error: { type: Boolean, default: () => props$1x.stepsItem.error }, // 自定义样式 itemStyle: { type: [Object], default: {} } } }); const _sfc_main$B = { name: "u-steps-item", mixins: [mpMixin, mixin, props$l], data() { return { index: 0, childLength: 0, showLine: false, size: { height: 0, width: 0 }, parentData: { direction: "row", current: 0, activeColor: "", inactiveColor: "", activeIcon: "", inactiveIcon: "", dot: false } }; }, watch: { "parentData"(newValue, oldValue) { } }, created() { this.init(); }, computed: { lineStyle() { var _a2, _b; const style = {}; if (this.parentData.direction === "row") { style.width = this.size.width + "px"; style.left = this.size.width / 2 + "px"; } else { style.height = this.size.height + "px"; } style.backgroundColor = ((_b = (_a2 = this.parent.children) == null ? void 0 : _a2[this.index + 1]) == null ? void 0 : _b.error) ? color$3.error : this.index < this.parentData.current ? this.parentData.activeColor : this.parentData.inactiveColor; return style; }, itemStyleInner() { return { ...this.itemStyle }; }, statusClass() { const { index: index2, error: error2 } = this; const { current } = this.parentData; if (current == index2) { return error2 === true ? "error" : "process"; } else if (error2) { return "error"; } else if (current > index2) { return "finish"; } else { return "wait"; } }, statusColor() { let colorTmp = ""; switch (this.statusClass) { case "finish": colorTmp = this.parentData.activeColor; break; case "error": colorTmp = color$3.error; break; case "process": colorTmp = this.parentData.dot ? this.parentData.activeColor : "transparent"; break; default: colorTmp = this.parentData.inactiveColor; break; } return colorTmp; }, contentStyle() { const style = {}; if (this.parentData.direction === "column") { style.marginLeft = this.parentData.dot ? "2px" : "6px"; style.marginTop = this.parentData.dot ? "0px" : "6px"; } else { style.marginTop = this.parentData.dot ? "2px" : "6px"; style.marginLeft = this.parentData.dot ? "2px" : "6px"; } return style; } }, mounted() { this.parent && this.parent.updateFromChild(); sleep().then(() => { this.getStepsItemRect(); }); }, methods: { init() { this.updateParentData(); if (!this.parent) { return error("u-steps-item必须要搭配u-steps组件使用"); } this.index = this.parent.children.indexOf(this); this.childLength = this.parent.children.length; }, updateParentData() { this.getParentData("u-steps"); }, // 父组件数据发生变化 updateFromParent() { this.init(); }, // 获取组件的尺寸,用于设置横线的位置 getStepsItemRect() { this.$uGetRect(".u-steps-item").then((size) => { this.size = size; }); } } }; function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_up_text = vue.resolveComponent("up-text"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-steps-item", [`u-steps-item--${$data.parentData.direction}`]]), ref: "u-steps-item" }, [ $data.index + 1 < $data.childLength ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-steps-item__line", [`u-steps-item__line--${$data.parentData.direction}`]]), style: vue.normalizeStyle([$options.lineStyle]) }, null, 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-steps-item__wrapper", [`u-steps-item__wrapper--${$data.parentData.direction}`, $data.parentData.dot && `u-steps-item__wrapper--${$data.parentData.direction}--dot`]]), style: vue.normalizeStyle([$options.itemStyleInner]) }, [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ $data.parentData.dot ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-steps-item__wrapper__dot", style: vue.normalizeStyle({ backgroundColor: $options.statusColor }) }, null, 4 /* STYLE */ )) : $data.parentData.activeIcon || $data.parentData.inactiveIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-steps-item__wrapper__icon" }, [ vue.createVNode(_component_up_icon, { name: $data.index <= $data.parentData.current ? $data.parentData.activeIcon : $data.parentData.inactiveIcon, size: _ctx.iconSize, color: $data.index <= $data.parentData.current ? $data.parentData.activeColor : $data.parentData.inactiveColor }, null, 8, ["name", "size", "color"]) ])) : (vue.openBlock(), vue.createElementBlock( "view", { key: 2, style: vue.normalizeStyle({ backgroundColor: $options.statusClass === "process" ? $data.parentData.activeColor : "transparent", borderColor: $options.statusColor }), class: "u-steps-item__wrapper__circle" }, [ $options.statusClass === "process" || $options.statusClass === "wait" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-steps-item__wrapper__circle__text", style: vue.normalizeStyle({ color: $data.index == $data.parentData.current ? "#ffffff" : $data.parentData.inactiveColor }) }, vue.toDisplayString($data.index + 1), 5 /* TEXT, STYLE */ )) : (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, color: $options.statusClass === "error" ? "error" : $data.parentData.activeColor, size: "12", name: $options.statusClass === "error" ? "close" : "checkmark" }, null, 8, ["color", "name"])) ], 4 /* STYLE */ )) ], true) ], 6 /* CLASS, STYLE */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-steps-item__content", [ `u-steps-item__content--${$data.parentData.direction}`, $data.parentData.current == $data.index ? "u-steps-item__content--current" : "" ]]), style: vue.normalizeStyle([$options.contentStyle]) }, [ vue.renderSlot(_ctx.$slots, "content", { index: $data.index }, void 0, true), !_ctx.$slots["content"] ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createElementVNode("view", { class: "u-steps-item__content__title" }, [ vue.renderSlot(_ctx.$slots, "title", {}, void 0, true), !_ctx.$slots["title"] ? (vue.openBlock(), vue.createBlock(_component_up_text, { key: 0, text: _ctx.title, type: $data.parentData.current == $data.index ? "main" : "content", lineHeight: "20px", size: $data.parentData.current == $data.index ? 14 : 13 }, null, 8, ["text", "type", "size"])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "u-steps-item__content__desc" }, [ vue.renderSlot(_ctx.$slots, "desc", {}, void 0, true), !_ctx.$slots["desc"] ? (vue.openBlock(), vue.createBlock(_component_up_text, { key: 0, text: _ctx.desc, type: "tips", size: "12" }, null, 8, ["text"])) : vue.createCommentVNode("v-if", true) ]) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(' ') ], 2 /* CLASS */ ); } const uStepsItem = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$A], ["__scopeId", "data-v-3c8d19a1"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-steps-item/u-steps-item.vue"]]); const __vite_glob_0_99 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uStepsItem }, Symbol.toStringTag, { value: "Module" })); const props$k = defineMixin({ props: { // 排列方向 direction: { type: String, default: () => props$1x.steps.direction }, // 设置第几个步骤 current: { type: [String, Number], default: () => props$1x.steps.current }, // 激活状态颜色 activeColor: { type: String, default: () => props$1x.steps.activeColor }, // 未激活状态颜色 inactiveColor: { type: String, default: () => props$1x.steps.inactiveColor }, // 激活状态的图标 activeIcon: { type: String, default: () => props$1x.steps.activeIcon }, // 未激活状态图标 inactiveIcon: { type: String, default: () => props$1x.steps.inactiveIcon }, // 是否显示点类型 dot: { type: Boolean, default: () => props$1x.steps.dot } } }); const _sfc_main$A = { name: "u-steps", mixins: [mpMixin, mixin, props$k], data() { return {}; }, watch: { children() { this.updateChildData(); }, parentData() { this.updateChildData(); } }, computed: { // 监听参数的变化,通过watch中,手动去更新子组件的数据,否则子组件不会自动变化 parentData() { return [this.current, this.direction, this.activeColor, this.inactiveColor, this.activeIcon, this.inactiveIcon, this.dot]; } }, methods: { // 更新子组件的数据 updateChildData() { this.children.map((child) => { test.func((child || {}).updateFromParent()) && child.updateFromParent(); }); }, // 接受子组件的通知,去修改其他子组件的数据 updateFromChild() { this.updateChildData(); } }, created() { this.children = []; }, options: { virtualHost: false } }; function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-steps", [`u-steps--${_ctx.direction}`]]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 2 /* CLASS */ ); } const uSteps = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z], ["__scopeId", "data-v-504c0814"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-steps/u-steps.vue"]]); const __vite_glob_0_100 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSteps }, Symbol.toStringTag, { value: "Module" })); const props$j = defineMixin({ props: { // 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px offsetTop: { type: [String, Number], default: () => props$1x.sticky.offsetTop }, // 自定义导航栏的高度 customNavHeight: { type: [String, Number], default: () => props$1x.sticky.customNavHeight }, // 是否开启吸顶功能 disabled: { type: Boolean, default: () => props$1x.sticky.disabled }, // 吸顶区域的背景颜色 bgColor: { type: String, default: () => props$1x.sticky.bgColor }, // z-index值 zIndex: { type: [String, Number], default: () => props$1x.sticky.zIndex }, // 列表中的索引值 index: { type: [String, Number], default: () => props$1x.sticky.index } } }); const _sfc_main$z = { name: "u-sticky", mixins: [mpMixin, mixin, props$j], data() { return { cssSticky: false, // 是否使用css的sticky实现 stickyTop: 0, // 吸顶的top值,因为可能受自定义导航栏影响,最终的吸顶值非offsetTop值 elId: guid(), left: 0, // js模式时,吸顶的内容因为处于postition: fixed模式,为了和原来保持一致的样式,需要记录并重新设置它的left,height,width属性 width: "auto", height: "auto", fixed: false // js模式时,是否处于吸顶模式 }; }, computed: { style() { const style = {}; if (!this.disabled) { if (this.cssSticky) { style.position = "sticky"; style.zIndex = this.uZindex; style.top = addUnit(this.stickyTop); } else { style.height = this.fixed ? this.height + "px" : "auto"; } } else { style.position = "static"; } style.backgroundColor = this.bgColor; return deepMerge$1(addStyle(this.customStyle), style); }, // 吸顶内容的样式 stickyContent() { const style = {}; if (!this.cssSticky) { style.position = this.fixed ? "fixed" : "static"; style.top = this.stickyTop + "px"; style.left = this.left + "px"; style.width = this.width == "auto" ? "auto" : this.width + "px"; style.zIndex = this.uZindex; } return style; }, uZindex() { return this.zIndex ? this.zIndex : zIndex.sticky; } }, mounted() { this.init(); }, watch: { offsetTop(nval) { this.getStickyTop(); } }, methods: { init() { this.getStickyTop(); this.checkSupportCssSticky(); if (!this.cssSticky) { !this.disabled && this.initObserveContent(); } }, initObserveContent() { this.$uGetRect("#" + this.elId).then((res) => { this.height = res.height; this.left = res.left; this.width = res.width; this.$nextTick(() => { this.observeContent(); }); }); }, observeContent() { this.disconnectObserver("contentObserver"); const contentObserver = uni.createIntersectionObserver(this, { // 检测的区间范围 thresholds: [0.95, 0.98, 1] }); contentObserver.relativeToViewport({ top: -this.stickyTop }); contentObserver.observe(`#${this.elId}`, (res) => { this.setFixed(res.boundingClientRect.top); }); this.contentObserver = contentObserver; }, setFixed(top) { const fixed = top <= this.stickyTop; this.fixed = fixed; }, disconnectObserver(observerName) { const observer = this[observerName]; observer && observer.disconnect(); }, getStickyTop() { this.stickyTop = getPx(this.offsetTop) + getPx(this.customNavHeight); }, async checkSupportCssSticky() { if (os() === "android" && Number(getDeviceInfo().system) > 8) { this.cssSticky = true; } this.cssSticky = await this.checkComputedStyle(); if (os() === "ios") { this.cssSticky = true; } }, // 在APP和微信小程序上,通过uni.createSelectorQuery可以判断是否支持css sticky checkComputedStyle() { return new Promise((resolve) => { uni.createSelectorQuery().in(this).select(".u-sticky").fields({ computedStyle: ["position"] }).exec((e2) => { resolve("sticky" === e2[0].position); }); }); }, // H5通过创建元素的形式嗅探是否支持css sticky // 判断浏览器是否支持sticky属性 checkCssStickyForH5() { } }, beforeUnmount() { this.disconnectObserver("contentObserver"); } }; function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-sticky", style: vue.normalizeStyle([$options.style]) }, [ vue.createElementVNode("view", { id: $data.elId, style: vue.normalizeStyle([$options.stickyContent]), class: "u-sticky__content" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 12, ["id"]) ], 4 /* STYLE */ ); } const uSticky = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$y], ["__scopeId", "data-v-8b303089"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-sticky/u-sticky.vue"]]); const __vite_glob_0_101 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSticky }, Symbol.toStringTag, { value: "Module" })); const props$i = defineMixin({ props: { // tab的数据 list: { type: Array, default: () => props$1x.subsection.list }, // 当前活动的tab的index current: { type: [String, Number], default: () => props$1x.subsection.current }, // 激活的颜色 activeColor: { type: String, default: () => props$1x.subsection.activeColor }, // 未激活的颜色 inactiveColor: { type: String, default: () => props$1x.subsection.inactiveColor }, // 模式选择,mode=button为按钮形式,mode=subsection时为分段模式 mode: { type: String, default: () => props$1x.subsection.mode }, // 字体大小 fontSize: { type: [String, Number], default: () => props$1x.subsection.fontSize }, // 激活tab的字体是否加粗 bold: { type: Boolean, default: () => props$1x.subsection.bold }, // mode = button时,组件背景颜色 bgColor: { type: String, default: () => props$1x.subsection.bgColor }, // 从list元素对象中读取的键名 keyName: { type: String, default: () => props$1x.subsection.keyName }, // 从`list`元素对象中读取激活时的颜色 如果存在字段 优先级大于 activeColor activeColorKeyName: { type: String, default: () => props$1x.subsection.activeColorKeyName }, // 从`list`元素对象中读取未激活时的颜色 如果存在字段 优先级大于 inactiveColor inactiveColorKeyName: { type: String, default: () => props$1x.subsection.inactiveColorKeyName }, // 是否禁用 disabled: { type: Boolean, default: () => props$1x.subsection.disabled } } }); const _sfc_main$y = { name: "u-subsection", mixins: [mpMixin, mixin, props$i], data() { return { // 组件尺寸 itemRect: { width: 0, height: 0 }, innerCurrent: "", windowResizeCallback: {} }; }, watch: { list(newValue, oldValue) { this.init(); }, current: { immediate: true, handler(n2) { if (n2 !== this.innerCurrent) { this.innerCurrent = n2; } } } }, computed: { wrapperStyle() { const style = {}; if (this.mode === "button") { style.backgroundColor = this.bgColor; } return style; }, // 滑块的样式 barStyle() { const style = {}; style.width = `${this.itemRect.width}px`; style.height = `${this.itemRect.height}px`; style.transform = `translateX(${this.innerCurrent * this.itemRect.width}px)`; if (this.mode === "subsection") { style.backgroundColor = this.activeColor; } return style; }, // 分段器item的样式 itemStyle(index2) { return (index3) => { const style = {}; if (this.mode === "subsection") { style.borderColor = this.activeColor; style.borderWidth = "1px"; style.borderStyle = "solid"; } return style; }; }, // 分段器文字颜色 textStyle(index2, item) { return (index3, item2) => { const style = {}; style.fontWeight = this.bold && this.innerCurrent === index3 ? "bold" : "normal"; style.fontSize = addUnit(this.fontSize); let activeColorTemp = null; let inactiveColorTemp = null; if (typeof item2 === "object" && item2[this.activeColorKeyName]) { activeColorTemp = item2[this.activeColorKeyName]; } if (typeof item2 === "object" && item2[this.inactiveColorKeyName]) { inactiveColorTemp = item2[this.inactiveColorKeyName]; } if (this.mode === "subsection") { if (this.innerCurrent === index3) { style.color = activeColorTemp ? activeColorTemp : "#FFF"; } else { style.color = inactiveColorTemp ? inactiveColorTemp : this.inactiveColor; } } else { if (this.innerCurrent === index3) { style.color = activeColorTemp ? activeColorTemp : this.activeColor; } else { style.color = inactiveColorTemp ? inactiveColorTemp : this.inactiveColor; } } return style; }; } }, mounted() { this.init(); }, beforeUnmount() { }, emits: ["change", "update:current"], methods: { addStyle, init() { this.innerCurrent = this.current; sleep().then(() => this.getRect()); }, // 判断展示文本 getText(item) { return typeof item === "object" ? item[this.keyName] : item; }, // 获取组件的尺寸 getRect() { this.$uGetRect(".u-subsection__item--0").then((size) => { this.itemRect = size; }); }, clickHandler(index2) { if (this.disabled) { return; } this.innerCurrent = index2; this.$emit("update:current", index2); this.$emit("change", index2); }, /** * 获取当前文字区域的 class禁用样式 * @param index */ getTextViewDisableClass(index2) { if (this.disabled) { if (this.mode === "button") { return "item-button--disabled"; } else { return "item-subsection--disabled"; } } return ""; } } }; function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-subsection", [`u-subsection--${_ctx.mode}`]]), ref: "u-subsection", style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle), $options.wrapperStyle]) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-subsection__bar cursor-pointer", [ _ctx.mode === "button" && "u-subsection--button__bar", $data.innerCurrent === 0 && _ctx.mode === "subsection" && "u-subsection__bar--first", $data.innerCurrent > 0 && $data.innerCurrent < _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--center", $data.innerCurrent === _ctx.list.length - 1 && _ctx.mode === "subsection" && "u-subsection__bar--last" ]]), ref: "u-subsection__bar", style: vue.normalizeStyle([$options.barStyle]) }, null, 6 /* CLASS, STYLE */ ), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-subsection__item cursor-pointer", [ `u-subsection__item--${index2}`, index2 < _ctx.list.length - 1 && "u-subsection__item--no-border-right", index2 === 0 && "u-subsection__item--first", index2 === _ctx.list.length - 1 && "u-subsection__item--last", $options.getTextViewDisableClass(index2) ]]), ref_for: true, ref: `u-subsection__item--${index2}`, style: vue.normalizeStyle([$options.itemStyle(index2)]), onClick: ($event) => $options.clickHandler(index2), key: index2 }, [ vue.createElementVNode( "text", { class: vue.normalizeClass(["u-subsection__item__text", [_ctx.disabled ? "u-subsection--disabled" : ""]]), style: vue.normalizeStyle([$options.textStyle(index2, item)]) }, vue.toDisplayString($options.getText(item)), 7 /* TEXT, CLASS, STYLE */ ) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ ); } const uSubsection = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$x], ["__scopeId", "data-v-b5ccb67e"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-subsection/u-subsection.vue"]]); const __vite_glob_0_102 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSubsection }, Symbol.toStringTag, { value: "Module" })); const MIN_DISTANCE = 10; function getDirection(x2, y2) { if (x2 > y2 && x2 > MIN_DISTANCE) { return "horizontal"; } if (y2 > x2 && y2 > MIN_DISTANCE) { return "vertical"; } return ""; } const touchMixin = defineMixin({ methods: { getTouchPoint(e2) { if (!e2) { return { x: 0, y: 0 }; } if (e2.touches && e2.touches[0]) { return { x: e2.touches[0].pageX, y: e2.touches[0].pageY }; } if (e2.changedTouches && e2.changedTouches[0]) { return { x: e2.changedTouches[0].pageX, y: e2.changedTouches[0].pageY }; } return { x: e2.clientX || 0, y: e2.clientY || 0 }; }, resetTouchStatus() { this.direction = ""; this.deltaX = 0; this.deltaY = 0; this.offsetX = 0; this.offsetY = 0; }, touchStart(event) { this.resetTouchStatus(); const touch = this.getTouchPoint(event); this.startX = touch.x; this.startY = touch.y; }, touchMove(event) { const touch = this.getTouchPoint(event); this.deltaX = touch.x - this.startX; this.deltaY = touch.y - this.startY; this.offsetX = Math.abs(this.deltaX); this.offsetY = Math.abs(this.deltaY); this.direction = this.direction || getDirection(this.offsetX, this.offsetY); } } }); const props$h = defineMixin({ props: { // 控制打开或者关闭 show: { type: Boolean, default: () => props$1x.swipeActionItem.show }, closeOnClick: { type: Boolean, default: () => props$1x.swipeActionItem.closeOnClick }, // 标识符,如果是v-for,可用index索引值 name: { type: [String, Number], default: () => props$1x.swipeActionItem.name }, // 是否禁用 disabled: { type: Boolean, default: () => props$1x.swipeActionItem.disabled }, // 是否自动关闭其他swipe按钮组 autoClose: { type: Boolean, default: () => props$1x.swipeActionItem.autoClose }, // 滑动距离阈值,只有大于此值,才被认为是要打开菜单 threshold: { type: Number, default: () => props$1x.swipeActionItem.threshold }, // 右侧按钮内容 options: { type: Array, default() { return props$1x.swipeActionItem.rightOptions; } }, // 动画过渡时间,单位ms duration: { type: [String, Number], default: () => props$1x.swipeActionItem.duration } } }); const wxs = { methods: { // 关闭时执行 closeHandler() { this.status = "close"; }, setState(status) { this.status = status; }, closeOther() { this.parent && this.parent.closeOther(this); } } }; const block0 = (Comp) => { (Comp.$wxs || (Comp.$wxs = [])).push("wxs"); (Comp.$wxsModules || (Comp.$wxsModules = {}))["wxs"] = "f1d6d7d8"; }; const _sfc_main$x = { name: "u-swipe-action-item", emits: ["click", "update:show"], mixins: [ mpMixin, mixin, touchMixin, wxs, props$h ], data() { return { // 按钮的尺寸信息 size: {}, // 父组件u-swipe-action的参数 parentData: { autoClose: true }, // 当前状态,open-打开,close-关闭 status: "", sliderStyle: {} }; }, watch: { // 由于wxs无法直接读取外部的值,需要在外部值变化时,重新执行赋值逻辑 wxsInit(newValue, oldValue) { this.queryRect(); }, status(newValue) { if (newValue === "open") { this.$emit("update:show", true); this.parent && this.parent.setOpendItem(this); } else { this.$emit("update:show", false); } }, show(newValue) { if (newValue) { this.status = "open"; } else { this.status = "close"; } } }, computed: { wxsInit() { return [this.disabled, this.autoClose, this.threshold, this.options, this.duration]; } }, mounted() { this.init(); }, beforeUmount() { this.closeHandler(); }, methods: { addUnit, getPx, init() { this.updateParentData(); sleep().then(() => { this.queryRect(); }); }, updateParentData() { this.getParentData("u-swipe-action"); }, // 查询节点 queryRect() { this.$uGetRect(".u-swipe-action-item__right__button", true).then((buttons) => { this.size = { buttons, show: this.show, disabled: this.disabled, threshold: this.threshold, duration: this.duration }; }); }, // 按钮被点击 buttonClickHandler(item, index2) { this.$emit("click", { index: index2, name: this.name }, () => { }); if (this.closeOnClick) { this.closeHandler(); } } } }; function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-swipe-action-item", ref: "u-swipe-action-item" }, [ vue.createElementVNode("view", { class: "u-swipe-action-item__right" }, [ vue.renderSlot(_ctx.$slots, "button", {}, () => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.options, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, class: "u-swipe-action-item__right__button", ref_for: true, ref: `u-swipe-action-item__right__button-${index2}`, style: vue.normalizeStyle([{ alignItems: item.style && item.style.borderRadius ? "center" : "stretch" }]), onClick: ($event) => $options.buttonClickHandler(item, index2) }, [ vue.createElementVNode( "view", { class: "u-swipe-action-item__right__button__wrapper", style: vue.normalizeStyle([{ backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : "#C7C6CD", borderRadius: item.style && item.style.borderRadius ? item.style.borderRadius : "0", padding: item.style && item.style.borderRadius ? "0" : "0 15px" }, item.style]) }, [ item.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: item.icon, color: item.style && item.style.color ? item.style.color : "#ffffff", size: item.iconSize ? $options.addUnit(item.iconSize) : item.style && item.style.fontSize ? $options.getPx(item.style.fontSize) * 1.2 : 17, customStyle: { marginRight: item.text ? "2px" : 0 } }, null, 8, ["name", "color", "size", "customStyle"])) : vue.createCommentVNode("v-if", true), item.text ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "u-swipe-action-item__right__button__wrapper__text u-line-1", style: vue.normalizeStyle([{ color: item.style && item.style.color ? item.style.color : "#ffffff", fontSize: item.style && item.style.fontSize ? item.style.fontSize : "16px", lineHeight: item.style && item.style.fontSize ? item.style.fontSize : "16px" }]) }, vue.toDisplayString(item.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 12, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], true) ]), vue.createElementVNode("view", { class: "u-swipe-action-item__content", onTouchstart: _cache[0] || (_cache[0] = (...args) => _ctx.wxs.touchstart && _ctx.wxs.touchstart(...args)), onTouchmove: _cache[1] || (_cache[1] = (...args) => _ctx.wxs.touchmove && _ctx.wxs.touchmove(...args)), onTouchend: _cache[2] || (_cache[2] = (...args) => _ctx.wxs.touchend && _ctx.wxs.touchend(...args)), status: vue.wp($data.status), "change:status": _ctx.wxs.statusChange, size: vue.wp($data.size), "change:size": _ctx.wxs.sizeChange }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 40, ["status", "change:status", "size", "change:size"]) ], 512 /* NEED_PATCH */ ); } if (typeof block0 === "function") block0(_sfc_main$x); const uSwipeActionItem = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$w], ["__scopeId", "data-v-ed3ce04a"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-swipe-action-item/u-swipe-action-item.vue"]]); const __vite_glob_0_103 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSwipeActionItem }, Symbol.toStringTag, { value: "Module" })); const props$g = defineMixin({ props: { // 是否自动关闭其他swipe按钮组 autoClose: { type: Boolean, default: () => props$1x.swipeAction.autoClose }, // 是否存在打开的按钮组 opendItem: { type: Boolean, default: false } } }); const _sfc_main$w = { name: "u-swipe-action", mixins: [mpMixin, mixin, props$g], data() { return {}; }, provide() { return { swipeAction: this }; }, computed: { // 这里computed的变量,都是子组件u-swipe-action-item需要用到的,由于头条小程序的兼容性差异,子组件无法实时监听父组件参数的变化 // 所以需要手动通知子组件,这里返回一个parentData变量,供watch监听,在其中去通知每一个子组件重新从父组件(u-swipe-action-item) // 拉取父组件新的变化后的参数 parentData() { return [this.autoClose]; } }, emits: ["opendItem:update"], watch: { // 当父组件需要子组件需要共享的参数发生了变化,手动通知子组件 parentData() { if (this.children.length) { this.children.map((child) => { typeof child.updateParentData === "function" && child.updateParentData(); }); } }, opendItem(val) { if (val == false) { this.closeAll(); } } }, created() { this.children = []; }, methods: { closeOther(child) { if (this.autoClose) { this.children.map((item, index2) => { if (child !== item) { item.closeHandler(); } }); } }, closeAll() { this.children.map((item, index2) => { item.closeHandler(); }); }, setOpendItem(ins) { this.$emit("opendItem:update", true); } } }; function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-swipe-action" }, [ vue.renderSlot(_ctx.$slots, "default") ]); } const uSwipeAction = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$v], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-swipe-action/u-swipe-action.vue"]]); const __vite_glob_0_104 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSwipeAction }, Symbol.toStringTag, { value: "Module" })); const props$f = defineMixin({ props: { // 轮播的长度 length: { type: [String, Number], default: () => props$1x.swiperIndicator.length }, // 当前处于活动状态的轮播的索引 current: { type: [String, Number], default: () => props$1x.swiperIndicator.current }, // 指示器非激活颜色 indicatorActiveColor: { type: String, default: () => props$1x.swiperIndicator.indicatorActiveColor }, // 指示器的激活颜色 indicatorInactiveColor: { type: String, default: () => props$1x.swiperIndicator.indicatorInactiveColor }, // 指示器模式,line-线型,dot-点型 indicatorMode: { type: String, default: () => props$1x.swiperIndicator.indicatorMode } } }); const _sfc_main$v = { name: "u-swiper-indicator", mixins: [mpMixin, mixin, props$f], data() { return { lineWidth: 22 }; }, computed: { // 指示器为线型的样式 lineStyle() { let style = {}; style.width = addUnit(this.lineWidth); style.transform = `translateX(${addUnit(this.current * this.lineWidth)})`; style.backgroundColor = this.indicatorActiveColor; return style; }, // 指示器为点型的样式 dotStyle() { return (index2) => { let style = {}; style.backgroundColor = index2 === this.current ? this.indicatorActiveColor : this.indicatorInactiveColor; return style; }; } }, methods: { addUnit } }; function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-swiper-indicator" }, [ _ctx.indicatorMode === "line" ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-swiper-indicator__wrapper", [`u-swiper-indicator__wrapper--${_ctx.indicatorMode}`]]), style: vue.normalizeStyle({ width: $options.addUnit($data.lineWidth * _ctx.length), backgroundColor: _ctx.indicatorInactiveColor }) }, [ vue.createElementVNode( "view", { class: "u-swiper-indicator__wrapper--line__bar", style: vue.normalizeStyle([$options.lineStyle]) }, null, 4 /* STYLE */ ) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.indicatorMode === "dot" ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-swiper-indicator__wrapper" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.length, (item, index2) => { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-swiper-indicator__wrapper__dot", [index2 === _ctx.current && "u-swiper-indicator__wrapper__dot--active"]]), key: index2, style: vue.normalizeStyle([$options.dotStyle(index2)]) }, null, 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ])) : vue.createCommentVNode("v-if", true) ]); } const uSwiperIndicator = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$u], ["__scopeId", "data-v-7b7c7ea6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-swiper-indicator/u-swiper-indicator.vue"]]); const __vite_glob_0_105 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSwiperIndicator }, Symbol.toStringTag, { value: "Module" })); const props$e = defineMixin({ props: { // 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名 list: { type: Array, default: () => props$1x.swiper.list }, // 是否显示面板指示器 indicator: { type: Boolean, default: () => props$1x.swiper.indicator }, // 指示器非激活颜色 indicatorActiveColor: { type: String, default: () => props$1x.swiper.indicatorActiveColor }, // 指示器的激活颜色 indicatorInactiveColor: { type: String, default: () => props$1x.swiper.indicatorInactiveColor }, // 指示器样式,可通过bottom,left,right进行定位 indicatorStyle: { type: [String, Object], default: () => props$1x.swiper.indicatorStyle }, // 指示器模式,line-线型,dot-点型 indicatorMode: { type: String, default: () => props$1x.swiper.indicatorMode }, // 是否自动切换 autoplay: { type: Boolean, default: () => props$1x.swiper.autoplay }, // 当前所在滑块的 index current: { type: [String, Number], default: () => props$1x.swiper.current }, // 当前所在滑块的 item-id ,不能与 current 被同时指定 currentItemId: { type: String, default: () => props$1x.swiper.currentItemId }, // 滑块自动切换时间间隔 interval: { type: [String, Number], default: () => props$1x.swiper.interval }, // 滑块切换过程所需时间 duration: { type: [String, Number], default: () => props$1x.swiper.duration }, // 播放到末尾后是否重新回到开头 circular: { type: Boolean, default: () => props$1x.swiper.circular }, // 前边距,可用于露出前一项的一小部分,nvue和支付宝不支持 previousMargin: { type: [String, Number], default: () => props$1x.swiper.previousMargin }, // 后边距,可用于露出后一项的一小部分,nvue和支付宝不支持 nextMargin: { type: [String, Number], default: () => props$1x.swiper.nextMargin }, // 当开启时,会根据滑动速度,连续滑动多屏,支付宝不支持 acceleration: { type: Boolean, default: () => props$1x.swiper.acceleration }, // 同时显示的滑块数量,nvue、支付宝小程序不支持 displayMultipleItems: { type: Number, default: () => props$1x.swiper.displayMultipleItems }, // 指定swiper切换缓动动画类型,有效值:default、linear、easeInCubic、easeOutCubic、easeInOutCubic // 只对微信小程序有效 easingFunction: { type: String, default: () => props$1x.swiper.easingFunction }, // list数组中指定对象的目标属性名 keyName: { type: String, default: () => props$1x.swiper.keyName }, // 图片的裁剪模式 imgMode: { type: String, default: () => props$1x.swiper.imgMode }, // 组件高度 height: { type: [String, Number], default: () => props$1x.swiper.height }, // 背景颜色 bgColor: { type: String, default: () => props$1x.swiper.bgColor }, // 组件圆角,数值或带单位的字符串 radius: { type: [String, Number], default: () => props$1x.swiper.radius }, // 是否加载中 loading: { type: Boolean, default: () => props$1x.swiper.loading }, // 是否显示标题,要求数组对象中有title属性 showTitle: { type: Boolean, default: () => props$1x.swiper.showTitle } } }); const _sfc_main$u = { name: "u-swiper", mixins: [mpMixin, mixin, props$e], data() { return { currentIndex: 0 }; }, watch: { current(val, preVal) { if (val === preVal) return; this.currentIndex = val; } }, emits: ["click", "change", "update:current"], computed: { itemStyle() { return (index2) => { const style = {}; if (this.nextMargin && this.previousMargin) { style.borderRadius = addUnit(this.radius); if (index2 !== this.currentIndex) style.transform = "scale(0.92)"; } return style; }; } }, methods: { addStyle, addUnit, testObject: test.object, testImage: test.image, getItemType(item) { if (typeof item === "string") return test.video(this.getSource(item)) ? "video" : "image"; if (typeof item === "object" && this.keyName) { if (!item.type) return test.video(this.getSource(item)) ? "video" : "image"; if (item.type === "image") return "image"; if (item.type === "video") return "video"; return "image"; } }, // 获取目标路径,可能数组中为字符串,对象的形式,额外可指定对象的目标属性名keyName getSource(item) { if (typeof item === "string") return item; if (typeof item === "object" && this.keyName) return item[this.keyName]; else error("请按格式传递列表参数"); return ""; }, // 轮播切换事件 change(e2) { const { current } = e2.detail; this.pauseVideo(this.currentIndex); this.currentIndex = current; this.$emit("update:current", this.currentIndex); this.$emit("change", e2.detail); }, // 切换轮播时,暂停视频播放 pauseVideo(index2) { const lastItem = this.getSource(this.list[index2]); if (test.video(lastItem)) { const video2 = uni.createVideoContext(`video-${index2}`, this); video2.pause(); } }, // 当一个轮播item为视频时,获取它的视频海报 getPoster(item) { return typeof item === "object" && item.poster ? item.poster : ""; }, // 点击某个item clickHandler(index2) { this.$emit("click", index2); } } }; function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_loading_icon = vue.resolveComponent("up-loading-icon"); const _component_up_swiper_indicator = vue.resolveComponent("up-swiper-indicator"); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-swiper", style: vue.normalizeStyle({ backgroundColor: _ctx.bgColor, height: $options.addUnit(_ctx.height), borderRadius: $options.addUnit(_ctx.radius) }) }, [ _ctx.loading ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-swiper__loading" }, [ vue.createVNode(_component_up_loading_icon, { mode: "circle" }) ])) : (vue.openBlock(), vue.createElementBlock("swiper", { key: 1, class: "u-swiper__wrapper", style: vue.normalizeStyle({ flex: "1", height: $options.addUnit(_ctx.height) }), onChange: _cache[0] || (_cache[0] = (...args) => $options.change && $options.change(...args)), circular: _ctx.circular, interval: _ctx.interval, duration: _ctx.duration, autoplay: _ctx.autoplay, current: _ctx.current, currentItemId: _ctx.currentItemId, previousMargin: $options.addUnit(_ctx.previousMargin), nextMargin: $options.addUnit(_ctx.nextMargin), acceleration: _ctx.acceleration, displayMultipleItems: _ctx.list.length > 0 ? _ctx.displayMultipleItems : 0, easingFunction: _ctx.easingFunction }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { class: "u-swiper__wrapper__item", key: index2 }, [ vue.renderSlot(_ctx.$slots, "default", { item, index: index2 }, () => [ vue.createElementVNode( "view", { class: "u-swiper__wrapper__item__wrapper", style: vue.normalizeStyle([$options.itemStyle(index2)]) }, [ vue.createCommentVNode(" 在nvue中,image图片的宽度默认为屏幕宽度,需要通过flex:1撑开,另外必须设置高度才能显示图片 "), $options.getItemType(item) === "image" ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "u-swiper__wrapper__item__wrapper__image", src: $options.getSource(item), mode: _ctx.imgMode, onClick: ($event) => $options.clickHandler(index2), style: vue.normalizeStyle({ height: $options.addUnit(_ctx.height), borderRadius: $options.addUnit(_ctx.radius) }) }, null, 12, ["src", "mode", "onClick"])) : vue.createCommentVNode("v-if", true), $options.getItemType(item) === "video" ? (vue.openBlock(), vue.createElementBlock("video", { key: 1, class: "u-swiper__wrapper__item__wrapper__video", id: `video-${index2}`, "enable-progress-gesture": false, src: $options.getSource(item), poster: $options.getPoster(item), title: _ctx.showTitle && $options.testObject(item) && item.title ? item.title : "", style: vue.normalizeStyle({ height: $options.addUnit(_ctx.height) }), controls: "", onClick: ($event) => $options.clickHandler(index2) }, null, 12, ["id", "src", "poster", "title", "onClick"])) : vue.createCommentVNode("v-if", true), _ctx.showTitle && $options.testObject(item) && item.title && $options.testImage($options.getSource(item)) ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-swiper__wrapper__item__wrapper__title" }, [ vue.createElementVNode( "text", { class: "u-line-1" }, vue.toDisplayString(item.title), 1 /* TEXT */ ) ])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], true) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 44, ["circular", "interval", "duration", "autoplay", "current", "currentItemId", "previousMargin", "nextMargin", "acceleration", "displayMultipleItems", "easingFunction"])), vue.createElementVNode( "view", { class: "u-swiper__indicator", style: vue.normalizeStyle([$options.addStyle(_ctx.indicatorStyle)]) }, [ vue.renderSlot(_ctx.$slots, "indicator", {}, () => [ !_ctx.loading && _ctx.indicator && !_ctx.showTitle ? (vue.openBlock(), vue.createBlock(_component_up_swiper_indicator, { key: 0, indicatorActiveColor: _ctx.indicatorActiveColor, indicatorInactiveColor: _ctx.indicatorInactiveColor, length: _ctx.list.length, current: $data.currentIndex, indicatorMode: _ctx.indicatorMode }, null, 8, ["indicatorActiveColor", "indicatorInactiveColor", "length", "current", "indicatorMode"])) : vue.createCommentVNode("v-if", true) ], true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ ); } const uSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$t], ["__scopeId", "data-v-4e7d0c90"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-swiper/u-swiper.vue"]]); const __vite_glob_0_106 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSwiper }, Symbol.toStringTag, { value: "Module" })); const props$d = defineMixin({ props: { // 是否为加载中状态 loading: { type: Boolean, default: () => props$1x.switch.loading }, // 是否为禁用装填 disabled: { type: Boolean, default: () => props$1x.switch.disabled }, // 开关尺寸,单位px size: { type: [String, Number], default: () => props$1x.switch.size }, // 打开时的背景颜色 activeColor: { type: String, default: () => props$1x.switch.activeColor }, // 关闭时的背景颜色 inactiveColor: { type: String, default: () => props$1x.switch.inactiveColor }, // 通过v-model双向绑定的值 modelValue: { type: [Boolean, String, Number], default: () => props$1x.switch.value }, // switch打开时的值 activeValue: { type: [String, Number, Boolean], default: () => props$1x.switch.activeValue }, // switch关闭时的值 inactiveValue: { type: [String, Number, Boolean], default: () => props$1x.switch.inactiveValue }, // 是否开启异步变更,开启后需要手动控制输入值 asyncChange: { type: Boolean, default: () => props$1x.switch.asyncChange }, // 圆点与外边框的距离 space: { type: [String, Number], default: () => props$1x.switch.space } } }); const _sfc_main$t = { name: "u-switch", mixins: [mpMixin, mixin, props$d], watch: { modelValue: { immediate: true, handler(n2) { if (n2 !== this.inactiveValue && n2 !== this.activeValue) { error("v-model绑定的值必须为inactiveValue、activeValue二者之一"); } } } }, data() { return { bgColor: "#ffffff" }; }, computed: { isActive() { return this.modelValue === this.activeValue; }, switchStyle() { let style = {}; style.width = addUnit(this.size * 2 + 2); style.height = addUnit(Number(this.size) + 2); if (this.customInactiveColor) { style.borderColor = "rgba(0, 0, 0, 0)"; } style.backgroundColor = this.isActive ? this.activeColor : this.inactiveColor; return style; }, nodeStyle() { let style = {}; style.width = addUnit(this.size - this.space); style.height = addUnit(this.size - this.space); const translateX = this.isActive ? addUnit(this.space) : addUnit(this.size); style.transform = `translateX(-${translateX})`; return style; }, bgStyle() { let style = {}; style.width = addUnit(Number(this.size) * 2 - this.size / 2); style.height = addUnit(this.size); style.backgroundColor = this.inactiveColor; style.transform = `scale(${this.isActive ? 0 : 1})`; return style; }, customInactiveColor() { return this.inactiveColor !== "#fff" && this.inactiveColor !== "#ffffff"; } }, emits: ["update:modelValue", "change"], methods: { addStyle, clickHandler() { if (!this.disabled && !this.loading) { const oldValue = this.isActive ? this.inactiveValue : this.activeValue; if (!this.asyncChange) { this.$emit("update:modelValue", oldValue); } this.$nextTick(() => { this.$emit("change", oldValue); }); } } } }; function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-switch cursor-pointer", [_ctx.disabled && "u-switch--disabled"]]), style: vue.normalizeStyle([$options.switchStyle, $options.addStyle(_ctx.customStyle)]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.createElementVNode( "view", { class: "u-switch__bg", style: vue.normalizeStyle([$options.bgStyle]) }, null, 4 /* STYLE */ ), vue.createElementVNode( "view", { class: vue.normalizeClass(["u-switch__node", [_ctx.modelValue && "u-switch__node--on"]]), style: vue.normalizeStyle([$options.nodeStyle]), ref: "u-switch__node" }, [ vue.createVNode(_component_u_loading_icon, { show: _ctx.loading, mode: "circle", timingFunction: "linear", color: _ctx.modelValue ? _ctx.activeColor : "#AAABAD", size: _ctx.size * 0.6 }, null, 8, ["show", "color", "size"]) ], 6 /* CLASS, STYLE */ ) ], 6 /* CLASS, STYLE */ ); } const uSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$s], ["__scopeId", "data-v-6ab257b3"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-switch/u-switch.vue"]]); const __vite_glob_0_107 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uSwitch }, Symbol.toStringTag, { value: "Module" })); const props$c = defineMixin({ props: { // item标签的名称,作为与u-tabbar的value参数匹配的标识符 name: { type: [String, Number, null], default: () => props$1x.tabbarItem.name }, // uview-plus内置图标或者绝对路径的图片 icon: { icon: String, default: () => props$1x.tabbarItem.icon }, // 右上角的角标提示信息 badge: { type: [String, Number, null], default: () => props$1x.tabbarItem.badge }, // 是否显示圆点,将会覆盖badge参数 dot: { type: Boolean, default: () => props$1x.tabbarItem.dot }, // 描述文本 text: { type: String, default: () => props$1x.tabbarItem.text }, // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性 badgeStyle: { type: [Object, String], default: () => props$1x.tabbarItem.badgeStyle }, // 模式,默认普通模式,midButton中间按钮模式 mode: { type: String, default: () => props$1x.tabbarItem.mode } } }); const _sfc_main$s = { name: "u-tabbar-item", mixins: [mpMixin, mixin, props$c], data() { return { isActive: false, // 是否处于激活状态 parentData: { value: null, activeColor: "", inactiveColor: "" } }; }, // 微信小程序中 options 选项 options: { virtualHost: true //将自定义节点设置成虚拟的,更加接近Vue组件的表现。我们不希望自定义组件的这个节点本身可以设置样式、响应 flex 布局等 }, computed: { // 计算是否为中间按钮 isMidButton() { return this.mode === "midButton"; } }, created() { this.init(); }, emits: ["click", "change"], methods: { addStyle, init() { this.updateParentData(); if (!this.parent) { error("up-tabbar-item必须搭配up-tabbar组件使用"); } const index2 = this.parent.children.indexOf(this); this.isActive = (this.name || index2) === this.parentData.value; }, updateParentData() { this.getParentData("u-tabbar"); }, // 此方法将会被父组件u-tabbar调用 updateFromParent() { this.init(); }, clickHandler() { this.$nextTick(() => { const index2 = this.parent.children.indexOf(this); const name2 = this.name || index2; if (name2 !== this.parent.value) { this.parent.$emit("change", name2); } this.$emit("click", name2); }); } } }; function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$9); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-tabbar-item", [$options.isMidButton ? "u-tabbar-item--mid-button" : ""]]), style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-tabbar-item__icon", [$options.isMidButton ? "u-tabbar-item__icon--mid-button" : ""]]) }, [ $options.isMidButton ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-tabbar-item--mid-button-cover" })) : vue.createCommentVNode("v-if", true), _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, name: _ctx.icon, color: $data.isActive ? $data.parentData.activeColor : $data.parentData.inactiveColor, size: $options.isMidButton ? 26 : 20 }, null, 8, ["name", "color", "size"])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 2 }, [ $data.isActive ? vue.renderSlot(_ctx.$slots, "active-icon", { key: 0 }, void 0, true) : vue.renderSlot(_ctx.$slots, "inactive-icon", { key: 1 }, void 0, true) ], 64 /* STABLE_FRAGMENT */ )), vue.createVNode(_component_u_badge, { absolute: "", offset: [0, _ctx.dot ? "34rpx" : _ctx.badge > 9 ? "14rpx" : "20rpx"], customStyle: _ctx.badgeStyle, isDot: _ctx.dot, value: _ctx.badge || (_ctx.dot ? 1 : null), show: _ctx.dot || _ctx.badge > 0 }, null, 8, ["offset", "customStyle", "isDot", "value", "show"]) ], 2 /* CLASS */ ), vue.renderSlot(_ctx.$slots, "text", {}, () => [ vue.createElementVNode( "text", { class: "u-tabbar-item__text", style: vue.normalizeStyle({ color: $data.isActive ? $data.parentData.activeColor : $data.parentData.inactiveColor }) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ ) ], true) ], 6 /* CLASS, STYLE */ ); } const uTabbarItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$r], ["__scopeId", "data-v-e01cdc2c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tabbar-item/u-tabbar-item.vue"]]); const __vite_glob_0_108 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTabbarItem }, Symbol.toStringTag, { value: "Module" })); const props$b = defineMixin({ props: { // 当前匹配项的name value: { type: [String, Number, null], default: () => props$1x.tabbar.value }, // 是否为iPhoneX留出底部安全距离 safeAreaInsetBottom: { type: Boolean, default: () => props$1x.tabbar.safeAreaInsetBottom }, // 是否显示上方边框 border: { type: Boolean, default: () => props$1x.tabbar.border }, // 上方边框颜色 borderColor: { type: Boolean, default: () => props$1x.tabbar.borderColor }, // 元素层级z-index zIndex: { type: [String, Number], default: () => props$1x.tabbar.zIndex }, // 选中标签的颜色 activeColor: { type: String, default: () => props$1x.tabbar.activeColor }, // 未选中标签的颜色 inactiveColor: { type: String, default: () => props$1x.tabbar.inactiveColor }, // 是否固定在底部 fixed: { type: Boolean, default: () => props$1x.tabbar.fixed }, // fixed定位固定在底部时,是否生成一个等高元素防止塌陷 placeholder: { type: Boolean, default: () => props$1x.tabbar.placeholder }, // 背景色 backgroundColor: { type: String, default: () => props$1x.tabbar.backgroundColor } } }); const _sfc_main$r = { name: "u-tabbar", mixins: [mpMixin, mixin, props$b], data() { return { placeholderHeight: 0 }; }, computed: { tabbarStyle() { const style = { zIndex: this.zIndex }; if (this.borderColor) { style.borderColor = this.borderColor; } if (this.backgroundColor) { style.backgroundColor = this.backgroundColor; } return deepMerge$1(style, addStyle(this.customStyle)); }, // 监听多个参数的变化,通过在computed执行对应的操作 updateChild() { return [this.value, this.activeColor, this.inactiveColor]; }, updatePlaceholder() { return [this.fixed, this.placeholder]; } }, watch: { updateChild() { this.updateChildren(); }, updatePlaceholder() { this.setPlaceholderHeight(); } }, created() { this.children = []; }, mounted() { this.setPlaceholderHeight(); }, methods: { updateChildren() { this.children.length && this.children.map((child) => child.updateFromParent()); }, // 设置用于防止塌陷元素的高度 async setPlaceholderHeight() { if (!this.fixed || !this.placeholder) return; await sleep(20); this.$uGetRect(".u-tabbar__content").then(({ height = 50 }) => { this.placeholderHeight = height; }); } } }; function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_safe_bottom = resolveEasycom(vue.resolveDynamicComponent("u-safe-bottom"), __easycom_0$b); return vue.openBlock(), vue.createElementBlock("view", { class: "u-tabbar" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-tabbar__content", [_ctx.border && "u-border-top", _ctx.fixed && "u-tabbar--fixed"]]), ref: "u-tabbar__content", onTouchmove: _cache[0] || (_cache[0] = vue.withModifiers((...args) => _ctx.noop && _ctx.noop(...args), ["stop", "prevent"])), style: vue.normalizeStyle([$options.tabbarStyle]) }, [ vue.createElementVNode("view", { class: "u-tabbar__content__item-wrapper" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]), _ctx.safeAreaInsetBottom ? (vue.openBlock(), vue.createBlock(_component_u_safe_bottom, { key: 0 })) : vue.createCommentVNode("v-if", true) ], 38 /* CLASS, STYLE, NEED_HYDRATION */ ), _ctx.placeholder ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-tabbar__placeholder", style: vue.normalizeStyle({ height: $data.placeholderHeight + "px" }) }, null, 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ]); } const uTabbar = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$q], ["__scopeId", "data-v-b9276d10"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tabbar/u-tabbar.vue"]]); const __vite_glob_0_109 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTabbar }, Symbol.toStringTag, { value: "Module" })); const props$a = defineMixin({ props: {} }); const _sfc_main$q = { name: "u-table", mixins: [mpMixin, mixin, props$a], props: { borderColor: { type: String, default: "#e4e7ed" }, align: { type: String, default: "center" }, // td的内边距 padding: { type: String, default: "5px 3px" }, // 字体大小 fontSize: { type: [String], default: "14px" }, // 字体颜色 color: { type: String, default: "#606266" }, // th的自定义样式 thStyle: { type: Object, default() { return {}; } }, // table的背景颜色 bgColor: { type: String, default: "#ffffff" } }, data() { return { show: true }; }, watch: { align() { this.change(); }, borderColor() { this.change(); } }, computed: { tableStyle() { let style = {}; style.borderLeft = `solid 1px ${this.borderColor}`; style.borderTop = `solid 1px ${this.borderColor}`; style.backgroundColor = this.bgColor; return style; } }, methods: { change() { this.show = false; this.$nextTick(() => { this.show = true; }); } } }; function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-table", style: vue.normalizeStyle([$options.tableStyle]) }, [ $data.show ? vue.renderSlot(_ctx.$slots, "default", { key: 0 }) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ); } const uTable = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$p], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-table/u-table.vue"]]); const __vite_glob_0_110 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTable }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$p = { name: "tableRow", props: { row: { type: Object, required: true }, rowIndex: { type: Number, required: true }, parentRow: { type: Object, default: null }, columns: { type: Array, required: true }, treeProps: { type: Object, required: true }, rowKey: { type: String, required: true }, expandedKeys: { type: Array, required: true }, cellStyleInner: { type: Function, required: true }, isExpanded: { type: Function, required: true }, rowClassName: { type: Function, default: null }, stripe: { type: Boolean, default: false }, cellClassName: { type: Function, default: null }, getFixedClass: { type: Function, required: true }, highlightCurrentRow: { type: Boolean, default: false }, currentRow: { type: Object, default: null }, handleRowClick: { type: Function, required: true }, toggleExpand: { type: Function, required: true }, level: { type: Number, required: true }, // 添加computedMainCol属性 computedMainCol: { type: String, required: true }, expandWidth: { type: String, required: true }, hasTree: { type: Boolean, required: false }, selectedRows: { type: Array, required: false }, rowHeight: { type: String, required: true } }, emits: ["rowClick", "toggleExpand", "toggleSelect"], methods: { isSelected(row) { return this.selectedRows.some((r2) => r2[this.rowKey] === row[this.rowKey]); } } }; function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) { const _component_table_row = vue.resolveComponent("table-row", true); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-table-row u-table-row-child", [ $props.highlightCurrentRow && $props.currentRow === $props.row ? "u-table-row-highlight" : "", $props.rowClassName ? $props.rowClassName($props.row, $props.rowIndex) : "", $props.stripe && $props.rowIndex % 2 === 1 ? "u-table-row-zebra" : "" ]]), style: vue.normalizeStyle({ height: $props.rowHeight }), onClick: _cache[2] || (_cache[2] = ($event) => $props.handleRowClick($props.row)) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.columns, (col, colIndex) => { return vue.openBlock(), vue.createElementBlock( "view", { key: col.key, class: vue.normalizeClass(["u-table-cell", [ col.align ? "u-text-" + col.align : "", $props.cellClassName ? $props.cellClassName($props.row, col) : "", $props.getFixedClass(col) ]]), style: vue.normalizeStyle($props.cellStyleInner({ row: $props.row, column: col, rowIndex: $props.rowIndex, columnIndex: colIndex, level: $props.level })) }, [ vue.createCommentVNode(" 复选框列 "), col.type === "selection" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0 }, [ vue.createElementVNode("checkbox", { checked: $options.isSelected($props.row), onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => _ctx.$emit("toggleSelect", $props.row), ["stop"])) }, null, 8, ["checked"]) ])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 在mainCol列显示展开图标 "), col.key === $props.computedMainCol && $props.hasTree ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, onClick: _cache[1] || (_cache[1] = vue.withModifiers(($event) => $props.toggleExpand($props.row), ["stop"])), style: vue.normalizeStyle({ width: $props.expandWidth }) }, [ $props.row.children && $props.row.children.length > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString($props.isExpanded($props.row) ? "▼" : "▶"), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "cellChild", { row: $props.row, column: col, prow: $props.parentRow, rowIndex: $props.rowIndex, columnIndex: colIndex, level: $props.level }, () => [ vue.createElementVNode( "view", { class: "u-table-cell_content" }, vue.toDisplayString($props.row[col.key]), 1 /* TEXT */ ) ], true) ], 64 /* STABLE_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 递归渲染更深层的子级 "), $props.isExpanded($props.row) && $props.row[$props.treeProps.children] && $props.row[$props.treeProps.children].length ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($props.row[$props.treeProps.children], (rowChild, childIndex) => { return vue.openBlock(), vue.createBlock(_component_table_row, { key: rowChild[$props.rowKey] || childIndex, row: rowChild, rowIndex: childIndex, "parent-row": $props.row, columns: $props.columns, "tree-props": $props.treeProps, "row-key": $props.rowKey, "expanded-keys": $props.expandedKeys, "cell-style-inner": $props.cellStyleInner, "is-expanded": $props.isExpanded, "row-class-name": $props.rowClassName, stripe: $props.stripe, "cell-class-name": $props.cellClassName, "get-fixed-class": $props.getFixedClass, "highlight-current-row": $props.highlightCurrentRow, "current-row": $props.currentRow, "handle-row-click": $props.handleRowClick, "toggle-expand": $props.toggleExpand, level: $props.level + 1, rowHeight: $props.rowHeight, hasTree: $props.hasTree, selectedRows: $props.selectedRows, expandWidth: $props.expandWidth, "computed-main-col": $props.computedMainCol, onToggleSelect: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("toggleSelect", $event)), onRowClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("rowClick", $event)), onToggleExpand: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("toggleExpand", $event)) }, { cellChild: vue.withCtx((scope) => [ vue.renderSlot(_ctx.$slots, "cellChild", { row: scope.row, column: scope.column, prow: scope.prow, rowIndex: scope.rowIndex, columnIndex: scope.columnIndex, level: $props.level }, void 0, true) ]), _: 2 /* DYNAMIC */ }, 1032, ["row", "rowIndex", "parent-row", "columns", "tree-props", "row-key", "expanded-keys", "cell-style-inner", "is-expanded", "row-class-name", "stripe", "cell-class-name", "get-fixed-class", "highlight-current-row", "current-row", "handle-row-click", "toggle-expand", "level", "rowHeight", "hasTree", "selectedRows", "expandWidth", "computed-main-col"]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ ); } const tableRow = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$o], ["__scopeId", "data-v-0ba90776"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-table2/tableRow.vue"]]); const _sfc_main$o = { name: "u-table2", components: { tableRow // 注册递归组件 }, props: { data: { type: Array, required: true, default: () => { return []; } }, columns: { type: Array, required: true, default: () => { return []; }, validator: (cols) => cols.every( (col) => ["default", "selection", "expand"].includes(col.type || "default") ) }, stripe: { type: Boolean, default: false }, border: { type: Boolean, default: false }, height: { type: [String, Number], default: null }, maxHeight: { type: [String, Number], default: null }, showHeader: { type: Boolean, default: true }, highlightCurrentRow: { type: Boolean, default: false }, rowKey: { type: String, default: "id" }, currentRowKey: { type: [String, Number], default: null }, rowStyle: { type: Object, default: () => ({}) }, cellClassName: { type: Function, default: null }, cellStyle: { type: Function, default: null }, headerCellClassName: { type: Function, default: null }, rowClassName: { type: Function, default: null }, context: { type: Object, default: null }, showOverflowTooltip: { type: Boolean, default: false }, lazy: { type: Boolean, default: false }, load: { type: Function, default: null }, treeProps: { type: Object, default: () => ({ children: "children", hasChildren: "hasChildren" }) }, defaultExpandAll: { type: Boolean, default: false }, expandRowKeys: { type: Array, default: () => [] }, sortOrders: { type: Array, default: () => ["ascending", "descending"] }, sortable: { type: [Boolean, String], default: false }, multiSort: { type: Boolean, default: false }, sortBy: { type: String, default: null }, sortMethod: { type: Function, default: null }, filters: { type: Object, default: () => ({}) }, fixedHeader: { type: Boolean, default: true }, emptyText: { type: String, default: "暂无数据" }, // 添加mainCol属性,用于指定树形结构展开控制图标所在的列 mainCol: { type: String, default: "" }, expandWidth: { type: String, default: "25px" }, rowHeight: { String, default: "40px" } }, emits: [ "select", "select-all", "selection-change", "cell-click", "row-click", "row-dblclick", "header-click", "sort-change", "filter-change", "current-change", "expand-change" ], data() { return { scrollWidth: "auto", // 将setup中的ref转换为data属性 expandedKeys: [...this.expandRowKeys], selectedRows: [], sortConditions: [], currentRow: null, scrollLeft: 0, // 新增滚动位置数据 showFixedColumnShadow: false, // 是否显示固定列阴影 fixedLeftColumns: [], // 左侧固定列 tableHeight: "auto", // 表格高度 headerHeight: "auto", // 新增表头高度属性 hasTree: false // 新增属性,用于判断是否存在树形结构 }; }, mounted() { this.getComponentWidth(); if (this.currentRowKey !== null) { const found = this.data.find((item) => item[this.rowKey] === this.currentRowKey); if (found) { this.currentRow = found; } } this.fixedLeftColumns = this.columns.filter((col) => col.fixed === "left"); }, computed: { // 将setup中的computed转换为computed属性 filteredData() { return this.data.filter((row) => { return Object.keys(this.filters).every((key) => { var _a2; const filter = this.filters[key]; if (!filter) return true; return (_a2 = row[key]) == null ? void 0 : _a2.toString().includes(filter.toString()); }); }); }, sortedData() { if (!this.sortConditions.length) return this.filteredData; const data = [...this.filteredData]; return data.sort((a2, b2) => { for (const condition of this.sortConditions) { const { field, order } = condition; let valA = a2[field]; let valB = b2[field]; if (this.sortMethod) { const result = this.sortMethod(a2, b2, field); if (result !== 0) return result * (order === "ascending" ? 1 : -1); } if (valA < valB) return order === "ascending" ? -1 : 1; if (valA > valB) return order === "ascending" ? 1 : -1; } return 0; }); }, // 计算当前应该显示的固定左侧列 visibleFixedLeftColumns() { if (this.scrollLeft <= 0) { return []; } let totalWidth = 0; let fixedWidth = 0; const visibleColumns = []; for (let i2 = 0; i2 < this.columns.length; i2++) { const col = this.columns[i2]; const colWidth = col.width ? parseInt(col.width) : 100; if (col.fixed === "left" && this.scrollLeft > totalWidth - fixedWidth) { visibleColumns.push(col); fixedWidth += colWidth; } totalWidth += colWidth; } return visibleColumns; }, // 获取mainCol的值,如果未设置则默认为第一列的key computedMainCol() { if (this.mainCol) { return this.mainCol; } const validColumns = this.columns.filter((col) => !col.type); let mainCol = validColumns && validColumns.length > 0 ? validColumns[0].key : ""; return mainCol; } }, watch: { // 将setup中的watch转换为watch属性 expandRowKeys: { handler(newVal) { this.expandedKeys = [...newVal]; }, immediate: true }, currentRowKey: { handler(newVal) { const found = this.data.find((item) => item[this.rowKey] === newVal); if (found) { this.currentRow = found; } }, immediate: true }, columns: { handler() { }, deep: true, immediate: false } }, methods: { addUnit, onScroll(e2) { this.scrollLeft = e2.detail.scrollLeft; this.fixedLeftColumns = this.columns.filter((col) => col.fixed === "left"); if (this.fixedLeftColumns.length > 0) { this.showFixedColumnShadow = this.scrollLeft > 0; } }, getFixedShadowStyle(col, index2) { let style = { width: col.width ? addUnit(col.width) : "auto" }; if (col == null ? void 0 : col.style) { style = { ...style, ...col == null ? void 0 : col.style }; } return style; }, getFixedClass(col) { return ""; }, headerColStyle(col) { let style = { width: col.width ? addUnit(col.width) : "auto", flex: col.width ? "none" : 1 }; if (col == null ? void 0 : col.style) { style = { ...style, ...col == null ? void 0 : col.style }; } return style; }, setCellStyle(e2) { this.cellStyle = e2; }, cellStyleInner(scope) { var _a2, _b; let style = { width: ((_a2 = scope.column) == null ? void 0 : _a2.width) ? addUnit(scope.column.width) : "auto", flex: ((_b = scope.column) == null ? void 0 : _b.width) ? "none" : 1 }; if (scope.column.key == this.computedMainCol) { style.paddingLeft = 16 * (scope.level - 1) + 2 + "px"; } if (this.cellStyle != null) { let styleCalc = this.cellStyle(scope); if (styleCalc != null) { style = { ...style, ...styleCalc }; } } return style; }, // 获取组件的宽度 async getComponentWidth() { await sleep(30); this.$uGetRect(".u-table-row").then((size) => { this.scrollWidth = size.width + "px"; }); this.$uGetRect(".u-table-header").then((size) => { if (size.height) { this.headerHeight = size.height + "px"; } }); this.hasTree = this.sortedData.some((item) => { return item[this.treeProps.children] && item[this.treeProps.children].length > 0; }); }, // 将setup中的函数转换为methods handleRowClick(row) { if (this.highlightCurrentRow) { const oldRow = this.currentRow; this.currentRow = row; this.$emit("current-change", row, oldRow); } this.$emit("row-click", row); }, handleHeaderClick(column) { if (!column.sortable) return; const index2 = this.sortConditions.findIndex((c2) => c2.field === column.key); let newOrder = "ascending"; if (index2 >= 0) { if (this.sortConditions[index2].order === "ascending") { newOrder = "descending"; } else { this.sortConditions.splice(index2, 1); this.$emit("sort-change", this.sortConditions); return; } } if (!this.multiSort) { this.sortConditions = [{ field: column.key, order: newOrder }]; } else { if (index2 >= 0) { this.sortConditions[index2].order = newOrder; } else { this.sortConditions.push({ field: column.key, order: newOrder }); } } this.$emit("sort-change", this.sortConditions); }, getSortIcon(field) { const cond = this.sortConditions.find((c2) => c2.field === field); if (!cond) return ""; return cond.order === "ascending" ? "↑" : "↓"; }, getSortValue(field) { const cond = this.sortConditions.find((c2) => c2.field === field); if (!cond) return ""; return cond.order === "ascending"; }, toggleSelect(row) { const index2 = this.selectedRows.findIndex((r2) => r2[this.rowKey] === row[this.rowKey]); if (index2 >= 0) { this.selectedRows.splice(index2, 1); this.unselectChildren(row); } else { this.selectedRows.push(row); this.selectChildren(row); } formatAppLog("log", "at uni_modules/uview-plus/components/u-table2/u-table2.vue:574", this.selectedRows); this.$emit("selection-change", this.selectedRows); this.$emit("select", row); }, toggleExpand(row) { const key = row[this.rowKey]; const index2 = this.expandedKeys.indexOf(key); if (index2 === -1) { this.expandedKeys.push(key); } else { this.expandedKeys.splice(index2, 1); } this.$emit("expand-change", this.expandedKeys); }, isExpanded(row) { if (!row) { return false; } return this.expandedKeys.includes(row[this.rowKey]); }, // 新增方法:递归选中所有子节点 selectChildren(row) { const children = row[this.treeProps.children]; if (children && children.length > 0) { children.forEach((child) => { const childIndex = this.selectedRows.findIndex((r2) => r2[this.rowKey] === child[this.rowKey]); if (childIndex === -1) { this.selectedRows.push(child); } this.selectChildren(child); }); } }, // 新增方法:递归取消选中所有子节点 unselectChildren(row) { const children = row[this.treeProps.children]; if (children && children.length > 0) { children.forEach((child) => { const childIndex = this.selectedRows.findIndex((r2) => r2[this.rowKey] === child[this.rowKey]); if (childIndex >= 0) { this.selectedRows.splice(childIndex, 1); } this.unselectChildren(child); }); } } } }; function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) { const _component_table_row = vue.resolveComponent("table-row"); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-table2", { "u-table-border": $props.border }]) }, [ vue.createElementVNode( "scroll-view", { "scroll-x": "", class: "u-table2-content", style: vue.normalizeStyle({ height: $props.height ? $props.height + "px" : "auto" }), onScroll: _cache[0] || (_cache[0] = (...args) => $options.onScroll && $options.onScroll(...args)) }, [ vue.createCommentVNode(" 表头 "), $props.showHeader ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-table-header", { "u-table-sticky": $props.fixedHeader }]), style: vue.normalizeStyle({ minWidth: $data.scrollWidth }) }, [ vue.createElementVNode("view", { class: "u-table-row" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.columns, (col, colIndex) => { return vue.openBlock(), vue.createElementBlock("view", { key: col.key, class: vue.normalizeClass(["u-table-cell", [ col.align ? "u-text-" + col.align : "", $props.headerCellClassName ? $props.headerCellClassName(col) : "", $options.getFixedClass(col) ]]), style: vue.normalizeStyle($options.headerColStyle(col)), onClick: ($event) => $options.handleHeaderClick(col) }, [ vue.renderSlot(_ctx.$slots, "header", { column: col, columnIndex: colIndex, level: 1 }, void 0, true), !_ctx.$slots["header"] ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, vue.toDisplayString(col.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), col.sortable ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.renderSlot(_ctx.$slots, "headerSort", { sortStatus: $options.getSortValue(col.key), column: col, columnIndex: colIndex, level: 1 }, void 0, true), !_ctx.$slots["headerSort"] ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString($options.getSortIcon(col.key)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 表体 "), vue.createElementVNode( "view", { class: "u-table-body", style: vue.normalizeStyle({ minWidth: $data.scrollWidth, maxHeight: $props.maxHeight ? $props.maxHeight + "px" : "none" }) }, [ $props.data && $props.data.length > 0 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($options.sortedData, (row, rowIndex) => { return vue.openBlock(), vue.createBlock(_component_table_row, { key: row[$props.rowKey] || rowIndex, row, rowIndex, "parent-row": null, columns: $props.columns, "tree-props": $props.treeProps, "row-key": $props.rowKey, "expanded-keys": $data.expandedKeys, "cell-style-inner": $options.cellStyleInner, "is-expanded": $options.isExpanded, "row-class-name": $props.rowClassName, stripe: $props.stripe, "cell-class-name": $props.cellClassName, "get-fixed-class": $options.getFixedClass, "highlight-current-row": $props.highlightCurrentRow, "current-row": $data.currentRow, "handle-row-click": $options.handleRowClick, "toggle-expand": $options.toggleExpand, level: 1, rowHeight: $props.rowHeight, hasTree: $data.hasTree, selectedRows: $data.selectedRows, expandWidth: $props.expandWidth, computedMainCol: $options.computedMainCol, onToggleSelect: $options.toggleSelect, onRowClick: $options.handleRowClick, onToggleExpand: $options.toggleExpand }, { cellChild: vue.withCtx((scope) => [ vue.renderSlot(_ctx.$slots, "cell", { row: scope.row, column: scope.column, prow: scope.prow, rowIndex: scope.rowIndex, columnIndex: scope.columnIndex, level: scope.level }, void 0, true) ]), _: 2 /* DYNAMIC */ }, 1032, ["row", "rowIndex", "columns", "tree-props", "row-key", "expanded-keys", "cell-style-inner", "is-expanded", "row-class-name", "stripe", "cell-class-name", "get-fixed-class", "highlight-current-row", "current-row", "handle-row-click", "toggle-expand", "rowHeight", "hasTree", "selectedRows", "expandWidth", "computedMainCol", "onToggleSelect", "onRowClick", "onToggleExpand"]); }), 128 /* KEYED_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.renderSlot(_ctx.$slots, "empty", {}, void 0, true), !_ctx.$slots["empty"] ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-table-empty" }, vue.toDisplayString($props.emptyText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) ], 4 /* STYLE */ ) ], 36 /* STYLE, NEED_HYDRATION */ ), vue.createCommentVNode(" 固定列浮动视图 "), $data.showFixedColumnShadow ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-table-fixed-shadow", style: vue.normalizeStyle({ height: $data.tableHeight }) }, [ vue.createCommentVNode(" 表头 "), $props.showHeader ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-table-header", { "u-table-sticky": $props.fixedHeader }]), style: vue.normalizeStyle({ minWidth: $data.scrollWidth }) }, [ vue.createElementVNode( "view", { class: "u-table-row", style: vue.normalizeStyle({ height: $data.headerHeight }) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($options.visibleFixedLeftColumns, (col, colIndex) => { return vue.openBlock(), vue.createElementBlock("view", { key: col.key, class: vue.normalizeClass(["u-table-cell", [ col.align ? "u-text-" + col.align : "", $props.headerCellClassName ? $props.headerCellClassName(col) : "", $options.getFixedClass(col) ]]), style: vue.normalizeStyle($options.headerColStyle(col)), onClick: ($event) => $options.handleHeaderClick(col) }, [ vue.renderSlot(_ctx.$slots, "header", { column: col, columnIndex: colIndex, level: 1 }, void 0, true), !_ctx.$slots["header"] ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0 }, vue.toDisplayString(col.title), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), col.sortable ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.renderSlot(_ctx.$slots, "headerSort", { sortStatus: $options.getSortValue(col.key), column: col, columnIndex: colIndex, level: 1 }, void 0, true), !_ctx.$slots["headerSort"] ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, vue.toDisplayString($options.getSortIcon(col.key)), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 14, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ ) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createCommentVNode(" 表体 "), vue.createElementVNode( "view", { class: "u-table-body", style: vue.normalizeStyle({ minWidth: $data.scrollWidth, maxHeight: $props.maxHeight ? $props.maxHeight + "px" : "none" }) }, [ $props.data && $props.data.length > 0 ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($options.sortedData, (row, rowIndex) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: row[$props.rowKey] || rowIndex }, [ vue.createCommentVNode(" 子级渲染 (递归组件) "), vue.createVNode(_component_table_row, { row, rowIndex, "parent-row": null, columns: $options.visibleFixedLeftColumns, "tree-props": $props.treeProps, "row-key": $props.rowKey, "expanded-keys": $data.expandedKeys, "cell-style-inner": $options.cellStyleInner, "is-expanded": $options.isExpanded, "row-class-name": $props.rowClassName, stripe: $props.stripe, "cell-class-name": $props.cellClassName, "get-fixed-class": $options.getFixedClass, "highlight-current-row": $props.highlightCurrentRow, "current-row": $data.currentRow, "handle-row-click": $options.handleRowClick, "toggle-expand": $options.toggleExpand, level: 1, rowHeight: $props.rowHeight, hasTree: $data.hasTree, selectedRows: $data.selectedRows, expandWidth: $props.expandWidth, computedMainCol: $options.computedMainCol, onToggleSelect: $options.toggleSelect, onRowClick: $options.handleRowClick, onToggleExpand: $options.toggleExpand }, { cellChild: vue.withCtx((scope) => [ vue.renderSlot(_ctx.$slots, "cell", { row: scope.row, column: scope.column, prow: scope.prow, rowIndex: scope.rowIndex, columnIndex: scope.columnIndex, level: scope.level }, void 0, true) ]), _: 2 /* DYNAMIC */ }, 1032, ["row", "rowIndex", "columns", "tree-props", "row-key", "expanded-keys", "cell-style-inner", "is-expanded", "row-class-name", "stripe", "cell-class-name", "get-fixed-class", "highlight-current-row", "current-row", "handle-row-click", "toggle-expand", "rowHeight", "hasTree", "selectedRows", "expandWidth", "computedMainCol", "onToggleSelect", "onRowClick", "onToggleExpand"]) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const uTable2 = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$n], ["__scopeId", "data-v-ae8e3747"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-table2/u-table2.vue"]]); const __vite_glob_0_111 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTable2 }, Symbol.toStringTag, { value: "Module" })); const props$9 = defineMixin({ props: {} }); const _sfc_main$n = { name: "u-tabs-item", mixins: [mpMixin, mixin, props$9], data() { return {}; } }; function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("swiper-item", null, [ vue.renderSlot(_ctx.$slots, "default") ]); } const uTabsItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$m], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tabs-item/u-tabs-item.vue"]]); const __vite_glob_0_112 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTabsItem }, Symbol.toStringTag, { value: "Module" })); const props$8 = defineMixin({ props: { // 滑块的移动过渡时间,单位ms duration: { type: Number, default: () => props$1x.tabs.duration }, // tabs标签数组 list: { type: Array, default: () => props$1x.tabs.list }, // 滑块颜色 lineColor: { type: String, default: () => props$1x.tabs.lineColor }, // 菜单选择中时的样式 activeStyle: { type: [String, Object], default: () => props$1x.tabs.activeStyle }, // 菜单非选中时的样式 inactiveStyle: { type: [String, Object], default: () => props$1x.tabs.inactiveStyle }, // 滑块长度 lineWidth: { type: [String, Number], default: () => props$1x.tabs.lineWidth }, // 滑块高度 lineHeight: { type: [String, Number], default: () => props$1x.tabs.lineHeight }, // 滑块背景显示大小,当滑块背景设置为图片时使用 lineBgSize: { type: String, default: () => props$1x.tabs.lineBgSize }, // 菜单item的样式 itemStyle: { type: [String, Object], default: () => props$1x.tabs.itemStyle }, // 菜单是否可滚动 scrollable: { type: Boolean, default: () => props$1x.tabs.scrollable }, // 当前选中标签的索引 current: { type: [Number, String], default: () => props$1x.tabs.current }, // 默认读取的键名 keyName: { type: String, default: () => props$1x.tabs.keyName }, // 左侧图标样式 iconStyle: { type: [String, Object], default: () => props$1x.tabs.iconStyle } } }); const _sfc_main$m = { name: "u-tabs", mixins: [mpMixin, mixin, props$8], data() { return { firstTime: true, scrollLeft: 0, scrollViewWidth: 0, lineOffsetLeft: 0, tabsRect: { left: 0 }, innerCurrent: 0, moving: false }; }, watch: { current: { immediate: true, handler(newValue, oldValue) { if (newValue !== this.innerCurrent) { if (typeof newValue == "string") { this.innerCurrent = parseInt(newValue); } else { this.innerCurrent = newValue; } this.$nextTick(() => { this.resize(); }); } } }, // list变化时,重新渲染list各项信息 list() { this.$nextTick(() => { this.resize(); }); } }, computed: { textStyle() { return (index2) => { const style = {}; const customeStyle = index2 == this.innerCurrent ? addStyle(this.activeStyle) : addStyle(this.inactiveStyle); if (this.list[index2].disabled) { style.color = "#c8c9cc"; } return deepMerge$1(customeStyle, style); }; }, propsBadge() { return props$1x.badge; } }, async mounted() { this.init(); this.windowResizeCallback = (res) => { this.init(); }; uni.onWindowResize(this.windowResizeCallback); }, beforeUnmount() { uni.offWindowResize(this.windowResizeCallback); }, emits: ["click", "longPress", "change", "update:current"], methods: { addStyle, addUnit, setLineLeft() { const tabItem = this.list[this.innerCurrent]; if (!tabItem) { return; } let lineOffsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => total + curr.rect.width, 0); const lineWidth = getPx(this.lineWidth); this.lineOffsetLeft = lineOffsetLeft + (tabItem.rect.width - lineWidth) / 2; if (this.firstTime) { setTimeout(() => { this.firstTime = false; }, 10); } }, // nvue下设置滑块的位置 animation(x2, duration = 0) { }, // 点击某一个标签 clickHandler(item, index2) { this.$emit("click", { ...item, index: index2 }, index2); if (item.disabled) return; if (this.innerCurrent == index2) return; this.innerCurrent = index2; this.resize(); this.$emit("update:current", index2); this.$emit("change", { ...item, index: index2 }, index2); }, // 长按事件 longPressHandler(item, index2) { this.$emit("longPress", { ...item, index: index2 }); }, init() { sleep().then(() => { this.resize(); }); }, setScrollLeft() { if (this.innerCurrent < 0) { this.innerCurrent = 0; } const tabRect = this.list[this.innerCurrent]; const offsetLeft = this.list.slice(0, this.innerCurrent).reduce((total, curr) => { return total + curr.rect.width; }, 0); const windowWidth2 = getWindowInfo().windowWidth; let scrollLeft = offsetLeft - (this.tabsRect.width - tabRect.rect.width) / 2 - (windowWidth2 - this.tabsRect.right) / 2 + this.tabsRect.left / 2; scrollLeft = Math.min(scrollLeft, this.scrollViewWidth - this.tabsRect.width); this.scrollLeft = Math.max(0, scrollLeft); }, // 获取所有标签的尺寸 resize() { if (this.list.length === 0) { return; } Promise.all([this.getTabsRect(), this.getAllItemRect()]).then(([tabsRect, itemRect = []]) => { if (tabsRect.left > tabsRect.width) { tabsRect.right = tabsRect.right - Math.floor(tabsRect.left / tabsRect.width) * tabsRect.width; tabsRect.left = tabsRect.left % tabsRect.width; } this.tabsRect = tabsRect; this.scrollViewWidth = 0; itemRect.map((item, index2) => { this.scrollViewWidth += item.width; this.list[index2].rect = item; }); this.setLineLeft(); this.setScrollLeft(); }); }, // 获取导航菜单的尺寸 getTabsRect() { return new Promise((resolve) => { this.queryRect("u-tabs__wrapper__scroll-view").then((size) => resolve(size)); }); }, // 获取所有标签的尺寸 getAllItemRect() { return new Promise((resolve) => { const promiseAllArr = this.list.map((item, index2) => this.queryRect( `u-tabs__wrapper__nav__item-${index2}`, true )); Promise.all(promiseAllArr).then((sizes) => resolve(sizes)); }); }, // 获取各个标签的尺寸 queryRect(el, item) { return new Promise((resolve) => { this.$uGetRect(`.${el}`).then((size) => { resolve(size); }); }); } } }; function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_badge = resolveEasycom(vue.resolveDynamicComponent("u-badge"), __easycom_0$9); return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-tabs", [_ctx.customClass]]) }, [ vue.createElementVNode("view", { class: "u-tabs__wrapper" }, [ vue.renderSlot(_ctx.$slots, "left", {}, void 0, true), vue.createElementVNode("view", { class: "u-tabs__wrapper__scroll-view-wrapper" }, [ vue.createElementVNode("scroll-view", { "scroll-x": _ctx.scrollable, "scroll-left": $data.scrollLeft, "scroll-with-animation": "", class: "u-tabs__wrapper__scroll-view", "show-scrollbar": false, ref: "u-tabs__wrapper__scroll-view" }, [ vue.createElementVNode( "view", { class: "u-tabs__wrapper__nav", ref: "u-tabs__wrapper__nav" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["u-tabs__wrapper__nav__item", [ `u-tabs__wrapper__nav__item-${index2}`, item.disabled && "u-tabs__wrapper__nav__item--disabled", $data.innerCurrent == index2 ? "u-tabs__wrapper__nav__item-active" : "" ]]), key: index2, onClick: ($event) => $options.clickHandler(item, index2), onLongpress: ($event) => $options.longPressHandler(item, index2), ref_for: true, ref: `u-tabs__wrapper__nav__item-${index2}`, style: vue.normalizeStyle([$options.addStyle(_ctx.itemStyle), { flex: _ctx.scrollable ? "" : 1 }]) }, [ _ctx.$slots.icon ? vue.renderSlot(_ctx.$slots, "icon", { key: 0, item, keyName: _ctx.keyName, index: index2 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ item.icon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-tabs__wrapper__nav__item__prefix-icon" }, [ vue.createVNode(_component_up_icon, { name: item.icon, customStyle: $options.addStyle(_ctx.iconStyle) }, null, 8, ["name", "customStyle"]) ])) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ )), _ctx.$slots.content ? vue.renderSlot(_ctx.$slots, "content", { key: 2, item, keyName: _ctx.keyName, index: index2 }, void 0, true) : !_ctx.$slots.content && (_ctx.$slots.default || _ctx.$slots.$default) ? vue.renderSlot(_ctx.$slots, "default", { key: 3, item, keyName: _ctx.keyName, index: index2 }, void 0, true) : (vue.openBlock(), vue.createElementBlock( "text", { key: 4, class: vue.normalizeClass([[item.disabled && "u-tabs__wrapper__nav__item__text--disabled"], "u-tabs__wrapper__nav__item__text"]), style: vue.normalizeStyle([$options.textStyle(index2)]) }, vue.toDisplayString(item[_ctx.keyName]), 7 /* TEXT, CLASS, STYLE */ )), vue.createVNode(_component_u_badge, { show: !!(item.badge && (item.badge.show || item.badge.isDot || item.badge.value)), isDot: item.badge && item.badge.isDot || $options.propsBadge.isDot, value: item.badge && item.badge.value || $options.propsBadge.value, max: item.badge && item.badge.max || $options.propsBadge.max, type: item.badge && item.badge.type || $options.propsBadge.type, showZero: item.badge && item.badge.showZero || $options.propsBadge.showZero, bgColor: item.badge && item.badge.bgColor || $options.propsBadge.bgColor, color: item.badge && item.badge.color || $options.propsBadge.color, shape: item.badge && item.badge.shape || $options.propsBadge.shape, numberType: item.badge && item.badge.numberType || $options.propsBadge.numberType, inverted: item.badge && item.badge.inverted || $options.propsBadge.inverted, customStyle: "margin-left: 4px;" }, null, 8, ["show", "isDot", "value", "max", "type", "showZero", "bgColor", "color", "shape", "numberType", "inverted"]) ], 46, ["onClick", "onLongpress"]); }), 128 /* KEYED_FRAGMENT */ )), vue.createElementVNode( "view", { class: "u-tabs__wrapper__nav__line", ref: "u-tabs__wrapper__nav__line", style: vue.normalizeStyle([{ width: $options.addUnit(_ctx.lineWidth), transform: `translate(${$data.lineOffsetLeft}px)`, transitionDuration: `${$data.firstTime ? 0 : _ctx.duration}ms`, height: $options.addUnit(_ctx.lineHeight), background: _ctx.lineColor, backgroundSize: _ctx.lineBgSize }]) }, null, 4 /* STYLE */ ) ], 512 /* NEED_PATCH */ ) ], 8, ["scroll-x", "scroll-left"]) ]), vue.renderSlot(_ctx.$slots, "right", {}, void 0, true) ]) ], 2 /* CLASS */ ); } const uTabs = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$l], ["__scopeId", "data-v-02b0c54f"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tabs/u-tabs.vue"]]); const __vite_glob_0_113 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTabs }, Symbol.toStringTag, { value: "Module" })); const props$7 = defineMixin({ props: { // 标签类型info、primary、success、warning、error type: { type: String, default: () => props$1x.tag.type }, // 不可用 disabled: { type: [Boolean, String], default: () => props$1x.tag.disabled }, // 标签的大小,large,medium,mini size: { type: String, default: () => props$1x.tag.size }, // tag的形状,circle(两边半圆形), square(方形,带圆角) shape: { type: String, default: () => props$1x.tag.shape }, // 标签文字 text: { type: [String, Number], default: () => props$1x.tag.text }, // 背景颜色,默认为空字符串,即不处理 bgColor: { type: String, default: () => props$1x.tag.bgColor }, // 标签字体颜色,默认为空字符串,即不处理 color: { type: String, default: () => props$1x.tag.color }, // 标签的边框颜色 borderColor: { type: String, default: () => props$1x.tag.borderColor }, // 关闭按钮图标的颜色 closeColor: { type: String, default: () => props$1x.tag.closeColor }, // 点击时返回的索引值,用于区分例遍的数组哪个元素被点击了 name: { type: [String, Number], default: () => props$1x.tag.name }, // // 模式选择,dark|light|plain // mode: { // type: String, // default: 'light' // }, // 镂空时是否填充背景色 plainFill: { type: Boolean, default: () => props$1x.tag.plainFill }, // 是否镂空 plain: { type: Boolean, default: () => props$1x.tag.plain }, // 是否可关闭 closable: { type: Boolean, default: () => props$1x.tag.closable }, // 是否显示 show: { type: Boolean, default: () => props$1x.tag.show }, // 内置图标,或绝对路径的图片 icon: { type: String, default: () => props$1x.tag.icon }, // 图标颜色 iconColor: { type: String, default: () => props$1x.tag.iconColor }, // 自定义尺寸字体大小 textSize: { type: String, default: () => props$1x.tag.textSize }, // 自定义尺寸高度 height: { type: String, default: () => props$1x.tag.height }, // 自定义尺寸padding padding: { type: String, default: () => props$1x.tag.padding }, // 自定义尺寸 borderRadius: { type: String, default: () => props$1x.tag.borderRadius }, // 自动计算背景色 autoBgColor: { type: Number, default: () => props$1x.tag.autoBgColor } } }); const _sfc_main$l = { name: "u-tag", mixins: [mpMixin, mixin, props$7], data() { return {}; }, computed: { style() { const style = {}; if (this.bgColor) { style.backgroundColor = this.bgColor; } if (this.color) { style.color = this.color; } if (this.borderColor) { style.borderColor = this.borderColor; } if (this.height) { style.height = addUnit(this.height); style.lineHeight = addUnit(this.height); } if (this.padding) { style.padding = this.padding; } if (this.borderRadius) { style.borderRadius = addUnit(this.borderRadius); } if (this.autoBgColor > 0 && this.color) { style.backgroundColor = this.getBagColor(this.color); } return style; }, // nvue下,文本颜色无法继承父元素 textColor() { const style = {}; if (this.color) { style.color = this.color; } if (this.textSize) { style.textSize = addUnit(this.textSize); } return style; }, imgStyle() { const width = this.size === "large" ? "17px" : this.size === "medium" ? "15px" : "13px"; return { width, height: width }; }, // 文本的样式 closeSize() { const size = this.size === "large" ? 15 : this.size === "medium" ? 13 : 12; return size; }, // 图标大小 iconSize() { const size = this.size === "large" ? 21 : this.size === "medium" ? 19 : 16; return size; }, // 图标颜色 elIconColor() { return this.iconColor ? this.iconColor : this.plain ? this.type : "#ffffff"; } }, emits: ["click", "close"], methods: { testImage: test.image, // 点击关闭按钮 closeHandler() { this.$emit("close", this.name); }, // 点击标签 clickHandler() { this.$emit("click", this.name); }, // 根据颜色计算浅色作为背景 getBagColor(darkColor) { return genLightColor(darkColor, this.autoBgColor); } } }; function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createBlock(_component_u_transition, { mode: "fade", show: _ctx.show, style: { "display": "inline-flex" } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-tag-wrapper cursor-pointer" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-tag", [`u-tag--${_ctx.shape}`, !_ctx.plain && `u-tag--${_ctx.type}`, _ctx.plain && `u-tag--${_ctx.type}--plain`, `u-tag--${_ctx.size}`, _ctx.plain && _ctx.plainFill && `u-tag--${_ctx.type}--plain--fill`]]), onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHandler && $options.clickHandler(...args), ["stop"])), style: vue.normalizeStyle([{ marginRight: _ctx.closable ? "10px" : 0, marginTop: _ctx.closable ? "10px" : 0 }, $options.style]) }, [ vue.renderSlot(_ctx.$slots, "icon", {}, () => [ _ctx.icon ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-tag__icon" }, [ $options.testImage(_ctx.icon) ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: _ctx.icon, style: vue.normalizeStyle([$options.imgStyle]) }, null, 12, ["src"])) : (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, color: $options.elIconColor, name: _ctx.icon, size: $options.iconSize }, null, 8, ["color", "name", "size"])) ])) : vue.createCommentVNode("v-if", true) ], true), vue.createElementVNode("view", { class: "u-tag__content" }, [ vue.renderSlot(_ctx.$slots, "content", {}, void 0, true), !_ctx.$slots.content ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ !_ctx.$slots.default && !_ctx.$slots.$default ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]), style: vue.normalizeStyle([$options.textColor]) }, vue.toDisplayString(_ctx.text), 7 /* TEXT, CLASS, STYLE */ )) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: vue.normalizeClass(["u-tag__text", [`u-tag__text--${_ctx.type}`, _ctx.plain && `u-tag__text--${_ctx.type}--plain`, `u-tag__text--${_ctx.size}`]]), style: vue.normalizeStyle([$options.textColor]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 6 /* CLASS, STYLE */ )) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]) ], 6 /* CLASS, STYLE */ ), _ctx.closable ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-tag__close", [`u-tag__close--${_ctx.size}`]]), onClick: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.closeHandler && $options.closeHandler(...args), ["stop"])), style: vue.normalizeStyle({ backgroundColor: _ctx.closeColor }) }, [ vue.createVNode(_component_up_icon, { name: "close", size: $options.closeSize, color: "#ffffff" }, null, 8, ["size"]) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true) ]) ]), _: 3 /* FORWARDED */ }, 8, ["show"]); } const uTag = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$k], ["__scopeId", "data-v-2fd891bb"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tag/u-tag.vue"]]); const __vite_glob_0_114 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTag }, Symbol.toStringTag, { value: "Module" })); const props$6 = defineMixin({ props: {} }); const _sfc_main$k = { name: "u-td", mixins: [mpMixin, mixin, props$6], props: { // 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比 width: { type: [String], default: "auto" }, textAlign: { type: String, default: "" }, fontSize: { type: String, default: "" }, borderColor: { type: String, default: "" }, color: { type: String, default: "" } }, data() { return { tdStyle: {} }; }, created() { this.parent = false; }, mounted() { this.parent = $parent.call(this, "u-table"); if (this.parent) { let style = {}; if (this.width != "auto") style.flex = `0 0 ${this.width}`; style.textAlign = this.parent.align; style.fontSize = addUnit(this.parent.fontSize); style.padding = this.parent.padding; style.borderBottom = `solid 1px ${this.parent.borderColor}`; style.borderRight = `solid 1px ${this.parent.borderColor}`; style.color = this.parent.color; if (this.textAlign != "") { style.textAlign = this.textAlign; } if (this.fontSize != "") { style.fontSize = this.fontSize; } if (this.borderColor != "") { style.borderColor = this.borderColor; } if (this.color != "") { style.color = this.color; } this.tdStyle = style; } } }; function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-td", style: vue.normalizeStyle([$data.tdStyle]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const uTd = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$j], ["__scopeId", "data-v-0c19b389"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-td/u-td.vue"]]); const __vite_glob_0_115 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTd }, Symbol.toStringTag, { value: "Module" })); const props$5 = defineMixin({ props: { // 主题颜色 type: { type: String, default: () => props$1x.text.type }, // 是否显示 show: { type: Boolean, default: () => props$1x.text.show }, // 显示的值 text: { type: [String, Number], default: () => props$1x.text.text }, // 前置图标 prefixIcon: { type: String, default: () => props$1x.text.prefixIcon }, // 后置图标 suffixIcon: { type: String, default: () => props$1x.text.suffixIcon }, // 文本处理的匹配模式 // text-普通文本,price-价格,phone-手机号,name-姓名,date-日期,link-超链接 mode: { type: String, default: () => props$1x.text.mode }, // mode=link下,配置的链接 href: { type: String, default: () => props$1x.text.href }, // 格式化规则 format: { type: [String, Function], default: () => props$1x.text.format }, // mode=phone时,点击文本是否拨打电话 call: { type: Boolean, default: () => props$1x.text.call }, // 小程序的打开方式 openType: { type: String, default: () => props$1x.text.openType }, // 是否粗体,默认normal bold: { type: Boolean, default: () => props$1x.text.bold }, // 是否块状 block: { type: Boolean, default: () => props$1x.text.block }, // 文本显示的行数,如果设置,超出此行数,将会显示省略号 lines: { type: [String, Number], default: () => props$1x.text.lines }, // 文本颜色 color: { type: String, default: () => props$1x.text.color }, // 字体大小 size: { type: [String, Number], default: () => props$1x.text.size }, // 图标的样式 iconStyle: { type: [Object, String], default: () => props$1x.text.iconStyle }, // 文字装饰,下划线,中划线等,可选值 none|underline|line-through decoration: { tepe: String, default: () => props$1x.text.decoration }, // 外边距,对象、字符串,数值形式均可 margin: { type: [Object, String, Number], default: () => props$1x.text.margin }, // 文本行高 lineHeight: { type: [String, Number], default: () => props$1x.text.lineHeight }, // 文本对齐方式,可选值left|center|right align: { type: String, default: () => props$1x.text.align }, // 文字换行,可选值break-word|normal|anywhere wordWrap: { type: String, default: () => props$1x.text.wordWrap }, // 占满剩余空间 flex1: { type: Boolean, default: () => props$1x.text.flex1 } } }); const value = { computed: { // 经处理后需要显示的值 value() { const { text, mode, format: format2, href } = this; if (mode === "price") { if (!/^\d+(\.\d+)?$/.test(text)) { error("金额模式下,text参数需要为金额格式"); } if (test.func(format2)) { return format2(text); } return priceFormat(text, 2); } if (mode === "date") { !test.date(text) && error("日期模式下,text参数需要为日期或时间戳格式"); if (test.func(format2)) { return format2(text); } if (format2) { return timeFormat(text, format2); } return timeFormat(text, "yyyy-mm-dd"); } if (mode === "phone") { if (test.func(format2)) { return format2(text); } if (format2 === "encrypt") { return `${text.substr(0, 3)}****${text.substr(7)}`; } return text; } if (mode === "name") { !(typeof text === "string") && error("姓名模式下,text参数需要为字符串格式"); if (test.func(format2)) { return format2(text); } if (format2 === "encrypt") { return this.formatName(text); } return text; } if (mode === "link") { !test.url(href) && error("超链接模式下,href参数需要为URL格式"); return text; } return text; } }, methods: { // 默认的姓名脱敏规则 formatName(name2) { let value2 = ""; if (name2.length === 2) { value2 = name2.substr(0, 1) + "*"; } else if (name2.length > 2) { let char = ""; for (let i2 = 0, len = name2.length - 2; i2 < len; i2++) { char += "*"; } value2 = name2.substr(0, 1) + char + name2.substr(-1, 1); } else { value2 = name2; } return value2; } } }; const _sfc_main$j = { name: "up-text", mixins: [mpMixin, mixin, value, props$5], emits: ["click"], computed: { wrapStyle() { let style = { margin: this.margin, justifyContent: this.align === "left" ? "flex-start" : this.align === "center" ? "center" : "flex-end" }; if (this.flex1) { style.flex = 1; style.width = "100%"; } return style; }, valueStyle() { const style = { textDecoration: this.decoration, fontWeight: this.bold ? "bold" : "normal", wordWrap: this.wordWrap, fontSize: addUnit(this.size) }; !this.type && (style.color = this.color); this.isNvue && this.lines && (style.lines = this.lines); this.lineHeight && (style.lineHeight = addUnit(this.lineHeight)); !this.isNvue && this.block && (style.display = "block"); return deepMerge$1(style, addStyle(this.customStyle)); }, isNvue() { let nvue = false; return nvue; }, isMp() { let mp = false; return mp; } }, data() { return {}; }, methods: { addStyle, clickHandler(e2) { if (this.call && this.mode === "phone") { uni.makePhoneCall({ phoneNumber: this.text }); } this.$emit("click", e2); } } }; function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_link = resolveEasycom(vue.resolveDynamicComponent("u-link"), __easycom_0$2); return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["u-text", [_ctx.customClass]]), style: vue.normalizeStyle($options.wrapStyle), onClick: _cache[6] || (_cache[6] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ _ctx.mode === "price" ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: vue.normalizeClass(["u-text__price", _ctx.type && `u-text__value--${_ctx.type}`]), style: vue.normalizeStyle([$options.valueStyle]) }, "¥", 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.prefixIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, class: "u-text__prefix-icon" }, [ vue.createVNode(_component_up_icon, { name: _ctx.prefixIcon, customStyle: $options.addStyle(_ctx.iconStyle) }, null, 8, ["name", "customStyle"]) ])) : vue.createCommentVNode("v-if", true), _ctx.mode === "link" ? (vue.openBlock(), vue.createBlock(_component_u_link, { key: 2, class: vue.normalizeClass(["u-text__value", [_ctx.type && `u-text__value--${_ctx.type}`, _ctx.lines && `u-line-${_ctx.lines}`]]), style: vue.normalizeStyle({ fontWeight: $options.valueStyle.fontWeight, wordWrap: $options.valueStyle.wordWrap, fontSize: $options.valueStyle.fontSize }), text: _ctx.value, href: _ctx.href, underLine: "" }, null, 8, ["style", "class", "text", "href"])) : _ctx.openType && $options.isMp ? (vue.openBlock(), vue.createElementBlock("button", { key: 3, class: "u-reset-button u-text__value", style: vue.normalizeStyle([$options.valueStyle]), "data-index": _ctx.index, openType: _ctx.openType, onGetuserinfo: _cache[0] || (_cache[0] = (...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args)), onContact: _cache[1] || (_cache[1] = (...args) => _ctx.onContact && _ctx.onContact(...args)), onGetphonenumber: _cache[2] || (_cache[2] = (...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args)), onError: _cache[3] || (_cache[3] = (...args) => _ctx.onError && _ctx.onError(...args)), onLaunchapp: _cache[4] || (_cache[4] = (...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args)), onOpensetting: _cache[5] || (_cache[5] = (...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args)), lang: _ctx.lang, "session-from": _ctx.sessionFrom, "send-message-title": _ctx.sendMessageTitle, "send-message-path": _ctx.sendMessagePath, "send-message-img": _ctx.sendMessageImg, "show-message-card": _ctx.showMessageCard, "app-parameter": _ctx.appParameter }, vue.toDisplayString(_ctx.value), 45, ["data-index", "openType", "lang", "session-from", "send-message-title", "send-message-path", "send-message-img", "show-message-card", "app-parameter"])) : (vue.openBlock(), vue.createElementBlock( "text", { key: 4, class: vue.normalizeClass(["u-text__value", [ _ctx.type && `u-text__value--${_ctx.type}`, _ctx.lines && `u-line-${_ctx.lines}` ]]), style: vue.normalizeStyle([$options.valueStyle]) }, vue.toDisplayString(_ctx.value), 7 /* TEXT, CLASS, STYLE */ )), _ctx.suffixIcon ? (vue.openBlock(), vue.createElementBlock("view", { key: 5, class: "u-text__suffix-icon" }, [ vue.createVNode(_component_up_icon, { name: _ctx.suffixIcon, customStyle: $options.addStyle(_ctx.iconStyle) }, null, 8, ["name", "customStyle"]) ])) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const uText = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$i], ["__scopeId", "data-v-0a574502"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-text/u-text.vue"]]); const __vite_glob_0_116 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uText }, Symbol.toStringTag, { value: "Module" })); const props$4 = defineMixin({ props: { // 输入框的内容 value: { type: [String, Number], default: () => props$1x.textarea.value }, // 输入框的内容 modelValue: { type: [String, Number], default: () => props$1x.textarea.value }, // 输入框为空时占位符 placeholder: { type: [String, Number], default: () => props$1x.textarea.placeholder }, // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/ placeholderClass: { type: String, default: () => props$1x.input.placeholderClass }, // 指定placeholder的样式 placeholderStyle: { type: [String, Object], default: () => props$1x.input.placeholderStyle }, // 输入框高度 height: { type: [String, Number], default: () => props$1x.textarea.height }, // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效 confirmType: { type: String, default: () => props$1x.textarea.confirmType }, // 是否禁用 disabled: { type: Boolean, default: () => props$1x.textarea.disabled }, // 是否显示统计字数 count: { type: Boolean, default: () => props$1x.textarea.count }, // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现 focus: { type: Boolean, default: () => props$1x.textarea.focus }, // 是否自动增加高度 autoHeight: { type: Boolean, default: () => props$1x.textarea.autoHeight }, // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true fixed: { type: Boolean, default: () => props$1x.textarea.fixed }, // 指定光标与键盘的距离 cursorSpacing: { type: Number, default: () => props$1x.textarea.cursorSpacing }, // 指定focus时的光标位置 cursor: { type: [String, Number], default: () => props$1x.textarea.cursor }, // 是否显示键盘上方带有”完成“按钮那一栏, showConfirmBar: { type: Boolean, default: () => props$1x.textarea.showConfirmBar }, // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用 selectionStart: { type: Number, default: () => props$1x.textarea.selectionStart }, // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用 selectionEnd: { type: Number, default: () => props$1x.textarea.selectionEnd }, // 键盘弹起时,是否自动上推页面 adjustPosition: { type: Boolean, default: () => props$1x.textarea.adjustPosition }, // 是否去掉 iOS 下的默认内边距,只微信小程序有效 disableDefaultPadding: { type: Boolean, default: () => props$1x.textarea.disableDefaultPadding }, // focus时,点击页面的时候不收起键盘,只微信小程序有效 holdKeyboard: { type: Boolean, default: () => props$1x.textarea.holdKeyboard }, // 最大输入长度,设置为 -1 的时候不限制最大长度 maxlength: { type: [String, Number], default: () => props$1x.textarea.maxlength }, // 边框类型,surround-四周边框,bottom-底部边框 border: { type: String, default: () => props$1x.textarea.border }, // 用于处理或者过滤输入框内容的方法 formatter: { type: [Function, null], default: () => props$1x.textarea.formatter }, // 是否忽略组件内对文本合成系统事件的处理 ignoreCompositionEvent: { type: Boolean, default: true } } }); const _sfc_main$i = { name: "u-textarea", mixins: [mpMixin, mixin, props$4], data() { return { // 输入框的值 innerValue: "", // 是否处于获得焦点状态 focused: false, // value是否第一次变化,在watch中,由于加入immediate属性,会在第一次触发,此时不应该认为value发生了变化 firstChange: true, // value绑定值的变化是由内部还是外部引起的 changeFromInner: false, // 过滤处理方法 innerFormatter: (value2) => value2 }; }, created() { }, watch: { modelValue: { immediate: true, handler(newVal, oldVal) { this.innerValue = newVal; this.firstChange = false; this.changeFromInner = false; } } }, computed: { fieldStyle() { let style = {}; style["height"] = addUnit(this.height); if (this.autoHeight) { style["height"] = "auto"; style["minHeight"] = addUnit(this.height); } return style; }, // 组件的类名 textareaClass() { let classes = [], { border, disabled } = this; border === "surround" && (classes = classes.concat(["u-border", "u-textarea--radius"])); border === "bottom" && (classes = classes.concat([ "u-border-bottom", "u-textarea--no-radius" ])); disabled && classes.push("u-textarea--disabled"); return classes.join(" "); }, // 组件的样式 textareaStyle() { const style = {}; return deepMerge$1(style, addStyle(this.customStyle)); } }, emits: ["update:modelValue", "linechange", "focus", "blur", "change", "confirm", "keyboardheightchange"], methods: { addStyle, addUnit, // 在微信小程序中,不支持将函数当做props参数,故只能通过ref形式调用 setFormatter(e2) { this.innerFormatter = e2; }, onFocus(e2) { this.$emit("focus", e2); }, onBlur(e2) { this.$emit("blur", e2); formValidate(this, "blur"); }, onLinechange(e2) { this.$emit("linechange", e2); }, onInput(e2) { let { value: value2 = "" } = e2.detail || {}; const formatter = this.formatter || this.innerFormatter; const formatValue = formatter(value2); this.innerValue = value2; this.$nextTick(() => { this.innerValue = formatValue; this.valueChange(); }); }, // 内容发生变化,进行处理 valueChange() { const value2 = this.innerValue; this.$nextTick(() => { this.$emit("update:modelValue", value2); this.changeFromInner = true; this.$emit("change", value2); formValidate(this, "change"); }); }, onConfirm(e2) { this.$emit("confirm", e2); }, onKeyboardheightchange(e2) { this.$emit("keyboardheightchange", e2); } } }; function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-textarea", $options.textareaClass]), style: vue.normalizeStyle([$options.textareaStyle]) }, [ vue.createElementVNode("textarea", { class: "u-textarea__field", value: $data.innerValue, style: vue.normalizeStyle($options.fieldStyle), placeholder: _ctx.placeholder, "placeholder-style": $options.addStyle(_ctx.placeholderStyle, typeof _ctx.placeholderStyle === "string" ? "string" : "object"), "placeholder-class": _ctx.placeholderClass, disabled: _ctx.disabled, focus: _ctx.focus, autoHeight: _ctx.autoHeight, fixed: _ctx.fixed, cursorSpacing: _ctx.cursorSpacing, cursor: _ctx.cursor, showConfirmBar: _ctx.showConfirmBar, selectionStart: _ctx.selectionStart, selectionEnd: _ctx.selectionEnd, adjustPosition: _ctx.adjustPosition, disableDefaultPadding: _ctx.disableDefaultPadding, holdKeyboard: _ctx.holdKeyboard, maxlength: _ctx.maxlength, "confirm-type": _ctx.confirmType, ignoreCompositionEvent: _ctx.ignoreCompositionEvent, onFocus: _cache[0] || (_cache[0] = (...args) => $options.onFocus && $options.onFocus(...args)), onBlur: _cache[1] || (_cache[1] = (...args) => $options.onBlur && $options.onBlur(...args)), onLinechange: _cache[2] || (_cache[2] = (...args) => $options.onLinechange && $options.onLinechange(...args)), onInput: _cache[3] || (_cache[3] = (...args) => $options.onInput && $options.onInput(...args)), onConfirm: _cache[4] || (_cache[4] = (...args) => $options.onConfirm && $options.onConfirm(...args)), onKeyboardheightchange: _cache[5] || (_cache[5] = (...args) => $options.onKeyboardheightchange && $options.onKeyboardheightchange(...args)) }, null, 44, ["value", "placeholder", "placeholder-style", "placeholder-class", "disabled", "focus", "autoHeight", "fixed", "cursorSpacing", "cursor", "showConfirmBar", "selectionStart", "selectionEnd", "adjustPosition", "disableDefaultPadding", "holdKeyboard", "maxlength", "confirm-type", "ignoreCompositionEvent"]), _ctx.count ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-textarea__count", style: vue.normalizeStyle({ "background-color": _ctx.disabled ? "transparent" : "#fff" }) }, vue.toDisplayString($data.innerValue.length) + "/" + vue.toDisplayString(_ctx.maxlength), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ ); } const uTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h], ["__scopeId", "data-v-b6c174a6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-textarea/u-textarea.vue"]]); const __vite_glob_0_117 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTextarea }, Symbol.toStringTag, { value: "Module" })); const props$3 = defineMixin({ props: {} }); const _sfc_main$h = { name: "u-th", mixins: [mpMixin, mixin, props$3], props: { // 宽度,百分比或者具体带单位的值,如30%, 200rpx等,一般使用百分比 width: { type: [String], default: "" } }, data() { return { thStyle: {} }; }, created() { this.parent = false; }, mounted() { this.parent = $parent.call(this, "u-table"); if (this.parent) { let style = {}; if (this.width) style.flex = `0 0 ${this.width}`; style.textAlign = this.parent.align; style.padding = this.parent.padding; style.borderBottom = `solid 1px ${this.parent.borderColor}`; style.borderRight = `solid 1px ${this.parent.borderColor}`; Object.assign(style, this.parent.thStyle); this.thStyle = style; } } }; function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: "u-th", style: vue.normalizeStyle([$data.thStyle]) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ], 4 /* STYLE */ ); } const uTh = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g], ["__scopeId", "data-v-67643fa0"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-th/u-th.vue"]]); const __vite_glob_0_118 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTh }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$g = { name: "u-title", props: {}, data() { return {}; }, created: function() { }, methods: {} }; function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-title u-flex-row u-flex-y-center" }, [ vue.renderSlot(_ctx.$slots, "prefix", {}, () => [ vue.createElementVNode("view", { class: "u-title-prefix" }) ], true), vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]); } const uTitle = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f], ["__scopeId", "data-v-018ff1f0"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-title/u-title.vue"]]); const __vite_glob_0_119 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTitle }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$f = { name: "u-toast", mixins: [mpMixin, mixin], data() { return { isShow: false, timer: null, // 定时器 config: { message: "", // 显示文本 type: "", // 主题类型,primary,success,error,warning,black zIndex: 10090, // 层级 duration: 2e3, // 显示的时间,毫秒 icon: true, // 显示的图标 position: "center", // toast出现的位置 complete: null, // 执行完后的回调函数 overlay: true, // 是否防止触摸穿透 loading: false // 是否加载中状态 }, tmpConfig: {} // 将用户配置和内置配置合并后的临时配置变量 }; }, computed: { iconName() { if (!this.tmpConfig.icon || this.tmpConfig.icon == "none") { return ""; } if (this.tmpConfig.icon === true) { if (["error", "warning", "success", "primary"].includes(this.tmpConfig.type)) { return type2icon(this.tmpConfig.type); } else { return ""; } } else { return this.tmpConfig.icon; } }, overlayStyle() { const style = { justifyContent: "center", alignItems: "center", display: "flex" }; style.backgroundColor = "rgba(0, 0, 0, 0)"; return style; }, iconStyle() { const style = {}; style.marginRight = "4px"; return style; }, loadingIconColor() { let colorTmp = "rgb(255, 255, 255)"; if (["error", "warning", "success", "primary"].includes(this.tmpConfig.type)) { colorTmp = hexToRgb(color$3[this.tmpConfig.type]); } return colorTmp; }, // 内容盒子的样式 contentStyle() { const windowHeight = getWindowInfo().windowHeight, style = {}; let value2 = 0; if (this.tmpConfig.position === "top") { value2 = -windowHeight * 0.25; } else if (this.tmpConfig.position === "bottom") { value2 = windowHeight * 0.25; } style.transform = `translateY(${value2}px)`; return style; } }, created() { ["primary", "success", "error", "warning", "default", "loading"].map((item) => { this[item] = (message) => this.show({ type: item, message }); }); }, methods: { // 显示toast组件,由父组件通过this.$refs.xxx.show(options)形式调用 show(options2) { this.tmpConfig = deepMerge$1(this.config, options2); this.clearTimer(); this.isShow = true; if (this.tmpConfig.duration !== -1) { this.timer = setTimeout(() => { this.clearTimer(); typeof this.tmpConfig.complete === "function" && this.tmpConfig.complete(); }, this.tmpConfig.duration); } }, // 隐藏toast组件,由父组件通过this.$refs.xxx.hide()形式调用 hide() { this.clearTimer(); }, clearTimer() { this.isShow = false; clearTimeout(this.timer); this.timer = null; } }, beforeUnmount() { this.clearTimer(); } }; function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_gap = resolveEasycom(vue.resolveDynamicComponent("u-gap"), __easycom_1$3); const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d); return vue.openBlock(), vue.createElementBlock("view", { class: "u-toast" }, [ vue.createVNode(_component_u_overlay, { show: $data.isShow, zIndex: $data.tmpConfig.overlay ? $data.tmpConfig.zIndex : -1, "custom-style": $options.overlayStyle }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["u-toast__content", ["u-type-" + $data.tmpConfig.type, $data.tmpConfig.type === "loading" || $data.tmpConfig.loading ? "u-toast__content--loading" : ""]]), style: vue.normalizeStyle([$options.contentStyle]) }, [ $data.tmpConfig.type === "loading" ? (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 0, mode: "circle", color: "rgb(255, 255, 255)", inactiveColor: "rgb(120, 120, 120)", size: "25" })) : $data.tmpConfig.type !== "defalut" && $options.iconName ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, name: $options.iconName, size: "17", color: $data.tmpConfig.type, customStyle: $options.iconStyle }, null, 8, ["name", "color", "customStyle"])) : vue.createCommentVNode("v-if", true), $data.tmpConfig.type === "loading" || $data.tmpConfig.loading ? (vue.openBlock(), vue.createBlock(_component_u_gap, { key: 2, height: "12", bgColor: "transparent" })) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "text", { class: vue.normalizeClass(["u-toast__content__text", ["u-toast__content__text--" + $data.tmpConfig.type]]), style: { "max-width": "400rpx" } }, vue.toDisplayString($data.tmpConfig.message), 3 /* TEXT, CLASS */ ) ], 6 /* CLASS, STYLE */ ) ]), _: 1 /* STABLE */ }, 8, ["show", "zIndex", "custom-style"]) ]); } const uToast = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-e61e8fb9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-toast/u-toast.vue"]]); const __vite_glob_0_120 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uToast }, Symbol.toStringTag, { value: "Module" })); const props$2 = defineMixin({ props: { // 需要显示的提示文字 text: { type: [String, Number], default: () => props$1x.tooltip.text }, // 点击复制按钮时,复制的文本,为空则使用text值 copyText: { type: [String, Number], default: () => props$1x.tooltip.copyText }, // 文本大小 size: { type: [String, Number], default: () => props$1x.tooltip.size }, // 字体颜色 color: { type: String, default: () => props$1x.tooltip.color }, // 弹出提示框时,文本的背景色 bgColor: { type: String, default: () => props$1x.tooltip.bgColor }, // 弹出提示框的背景色 popupBgColor: { type: String, default: () => props$1x.tooltip.popupBgColor }, // 弹出提示的方向,top-上方,bottom-下方,left-左方,right-右方 direction: { type: String, default: () => props$1x.tooltip.direction }, // 弹出提示的z-index,nvue无效 zIndex: { type: [String, Number], default: () => props$1x.tooltip.zIndex }, // 是否显示复制按钮 showCopy: { type: Boolean, default: () => props$1x.tooltip.showCopy }, // 扩展的按钮组 buttons: { type: Array, default: () => props$1x.tooltip.buttons }, // 是否显示透明遮罩以防止触摸穿透 overlay: { type: Boolean, default: () => props$1x.tooltip.overlay }, // 是否显示复制成功或者失败的toast showToast: { type: Boolean, default: () => props$1x.tooltip.showToast }, // 触发方式,可选值:longpress/click triggerMode: { type: String, default: () => props$1x.tooltip.triggerMode } } }); const _sfc_main$e = { name: "u-tooltip", mixins: [mpMixin, mixin, props$2], data() { return { // 是否展示气泡 showTooltip: true, // 生成唯一id,防止一个页面多个组件,造成干扰 textId: guid(), tooltipId: guid(), // 初始时甚至为很大的值,让其移到屏幕外面,为了计算元素的尺寸 tooltipTop: -1e4, // 气泡的位置信息 tooltipInfo: { width: 0, left: 0 }, // 文本的位置信息 textInfo: { width: 0, left: 0 }, // 三角形指示器的样式 indicatorStyle: {}, // 气泡在可能超出屏幕边沿范围时,重新定位后,距离屏幕边沿的距离 screenGap: 12, // 三角形指示器的宽高,由于对元素进行了角度旋转,精确计算指示器位置时,需要用到其尺寸信息 indicatorWidth: 14, tooltipStyle: {} }; }, watch: { async propsChange() { await this.getElRect(); this.getTooltipStyle(); } }, computed: { // 特别处理H5的复制,因为H5浏览器是自带系统复制功能的,在H5环境 // 当一些依赖参数变化时,需要重新计算气泡和指示器的位置信息 propsChange() { return [this.text, this.buttons]; } }, mounted() { this.init(); }, emits: ["click"], methods: { addStyle, addUnit, async init() { await this.getElRect(); this.getTooltipStyle(); }, // 计算气泡和指示器的位置信息 getTooltipStyle() { const style = {}, sysInfo = getWindowInfo(); if (this.direction === "left") { style.transform = ``; style.top = "-" + addUnit((this.tooltipInfo.height - this.indicatorWidth) / 2, "px"); style.right = addUnit(this.textInfo.width + this.indicatorWidth, "px"); this.indicatorStyle = {}; this.indicatorStyle.right = "-4px"; this.indicatorStyle.top = addUnit((this.tooltipInfo.height - this.indicatorWidth) / 2, "px"); } else if (this.direction === "right") { style.transform = ``; style.top = addUnit((this.textInfo.height - this.tooltipInfo.height) / 2, "px"); style.left = addUnit(this.textInfo.width + this.indicatorWidth, "px"); this.indicatorStyle = {}; this.indicatorStyle.left = "-4px"; this.indicatorStyle.top = addUnit((this.textInfo.height - this.indicatorWidth) / 2, "px"); } else if (this.direction === "top" || this.direction === "bottom") { style.transform = `translateY(${this.direction === "top" ? "-100%" : "100%"})`; if (this.tooltipInfo.width / 2 > this.textInfo.left + this.textInfo.width / 2 - this.screenGap) { this.indicatorStyle = {}; style.left = `-${addUnit(this.textInfo.left - this.screenGap)}`; this.indicatorStyle.left = addUnit(this.textInfo.width / 2 - getPx(style.left) - this.indicatorWidth / 2, "px"); } else if (this.tooltipInfo.width / 2 > sysInfo.windowWidth - this.textInfo.right + this.textInfo.width / 2 - this.screenGap) { this.indicatorStyle = {}; style.right = `-${addUnit(sysInfo.windowWidth - this.textInfo.right - this.screenGap)}`; this.indicatorStyle.right = addUnit(this.textInfo.width / 2 - getPx(style.right) - this.indicatorWidth / 2); } else { const left = Math.abs(this.textInfo.width / 2 - this.tooltipInfo.width / 2); style.left = this.textInfo.width > this.tooltipInfo.width ? addUnit(left) : -addUnit(left); this.indicatorStyle = {}; } if (this.direction === "top") { style.marginTop = "-10px"; this.indicatorStyle.bottom = "-4px"; } else { style.marginBottom = "-10px"; this.indicatorStyle.top = "-4px"; } } this.tooltipStyle = style; return style; }, // 点击触发事件 async clickHander() { if (this.triggerMode == "click") { this.tooltipTop = 0; this.showTooltip = true; } }, // 长按触发事件 async longpressHandler() { if (this.triggerMode == "longpress") { this.tooltipTop = 0; this.showTooltip = true; } }, // 点击透明遮罩 overlayClickHandler() { this.showTooltip = false; }, // 点击弹出按钮 btnClickHandler(index2) { this.showTooltip = false; this.$emit("click", this.showCopy ? index2 + 1 : index2); }, // 查询内容高度 queryRect(ref) { return new Promise((resolve) => { this.$uGetRect(`#${ref}`).then((size) => { resolve(size); }); }); }, // 元素尺寸 getElRect() { return new Promise(async (resolve) => { this.showTooltip = true; this.tooltipTop = -1e4; sleep(500).then(async () => { this.tooltipInfo = await this.queryRect(this.tooltipId); this.showTooltip = false; this.textInfo = await this.queryRect(this.textId); resolve(); }); }); }, // 复制文本到粘贴板 setClipboardData() { this.showTooltip = false; this.$emit("click", 0); uni.setClipboardData({ // 优先使用copyText字段,如果没有,则默认使用text字段当做复制的内容 data: this.copyText || this.text, success: () => { this.showToast && toast("复制成功"); }, fail: () => { this.showToast && toast("复制失败"); }, complete: () => { this.showTooltip = false; } }); } } }; function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) { const _component_u_overlay = resolveEasycom(vue.resolveDynamicComponent("u-overlay"), __easycom_0$d); const _component_u_line = resolveEasycom(vue.resolveDynamicComponent("u-line"), __easycom_1$4); const _component_u_transition = resolveEasycom(vue.resolveDynamicComponent("u-transition"), __easycom_2$1); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-tooltip", style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]) }, [ vue.createVNode(_component_u_overlay, { show: $data.showTooltip && $data.tooltipTop !== -1e4 && _ctx.overlay, customStyle: "backgroundColor: rgba(0, 0, 0, 0)", onClick: $options.overlayClickHandler }, null, 8, ["show", "onClick"]), vue.createElementVNode("view", { class: "u-tooltip__wrapper" }, [ vue.createElementVNode("view", { class: "u-tooltip__trigger", id: $data.textId, ref: $data.textId, onClick: _cache[0] || (_cache[0] = vue.withModifiers((...args) => $options.clickHander && $options.clickHander(...args), ["stop"])), onLongpress: _cache[1] || (_cache[1] = vue.withModifiers((...args) => $options.longpressHandler && $options.longpressHandler(...args), ["stop"])) }, [ vue.renderSlot(_ctx.$slots, "trigger", {}, void 0, true), !_ctx.$slots["trigger"] ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-tooltip__wrapper__text", userSelect: false, selectable: false, style: vue.normalizeStyle({ color: _ctx.color, backgroundColor: _ctx.bgColor && $data.showTooltip && $data.tooltipTop !== -1e4 ? _ctx.bgColor : "transparent" }) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 40, ["id"]), vue.createVNode(_component_u_transition, { mode: "fade", show: $data.showTooltip, duration: "300", customStyle: { position: "absolute", top: $options.addUnit($data.tooltipTop), zIndex: _ctx.zIndex, ...$data.tooltipStyle } }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "u-tooltip__wrapper__popup", id: $data.tooltipId, ref: $data.tooltipId }, [ _ctx.showCopy || _ctx.buttons.length ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-tooltip__wrapper__popup__indicator", "hover-class": "u-tooltip__wrapper__popup__indicator--hover", style: vue.normalizeStyle([$data.indicatorStyle, { width: $options.addUnit($data.indicatorWidth), height: $options.addUnit($data.indicatorWidth), backgroundColor: _ctx.popupBgColor }]) }, [ vue.createCommentVNode(" 由于nvue不支持三角形绘制,这里就做一个四方形,再旋转45deg,得到露出的一个三角 ") ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode( "view", { class: "u-tooltip__wrapper__popup__list", style: vue.normalizeStyle({ backgroundColor: _ctx.popupBgColor, color: _ctx.color }) }, [ vue.renderSlot(_ctx.$slots, "content", {}, void 0, true), !_ctx.$slots["content"] ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ _ctx.showCopy ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-tooltip__wrapper__popup__list__btn", "hover-class": "u-tooltip__wrapper__popup__list__btn--hover", style: vue.normalizeStyle({ backgroundColor: _ctx.popupBgColor }), onClick: _cache[2] || (_cache[2] = (...args) => $options.setClipboardData && $options.setClipboardData(...args)) }, [ vue.createElementVNode("text", { class: "u-tooltip__wrapper__popup__list__btn__text" }, "复制") ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true), _ctx.showCopy && _ctx.buttons.length > 0 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 1, direction: "column", color: "#8d8e90", length: "18" })) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(_ctx.buttons, (item, index2) => { return vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: index2 }, [ vue.createElementVNode("view", { class: "u-tooltip__wrapper__popup__list__btn", "hover-class": "u-tooltip__wrapper__popup__list__btn--hover" }, [ vue.createElementVNode("text", { class: "u-tooltip__wrapper__popup__list__btn__text", onClick: ($event) => $options.btnClickHandler(index2) }, vue.toDisplayString(item), 9, ["onClick"]) ]), index2 < _ctx.buttons.length - 1 ? (vue.openBlock(), vue.createBlock(_component_u_line, { key: 0, direction: "column", color: "#8d8e90", length: "18" })) : vue.createCommentVNode("v-if", true) ], 64 /* STABLE_FRAGMENT */ ); }), 128 /* KEYED_FRAGMENT */ )) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ) ], 8, ["id"]) ]), _: 3 /* FORWARDED */ }, 8, ["show", "customStyle"]) ]) ], 4 /* STYLE */ ); } const uTooltip = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d], ["__scopeId", "data-v-92dedddb"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tooltip/u-tooltip.vue"]]); const __vite_glob_0_122 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTooltip }, Symbol.toStringTag, { value: "Module" })); const props$1 = defineMixin({ props: {} }); const _sfc_main$d = { name: "u-tr", mixins: [mpMixin, mixin, props$1], data() { return {}; } }; function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-tr" }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ]); } const uTr = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c], ["__scopeId", "data-v-1c6ea6f9"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tr/u-tr.vue"]]); const __vite_glob_0_123 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTr }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$c = { name: "tree-node", props: { node: { type: Object, required: true }, props: { type: Object, required: true }, showCheckbox: { type: Boolean, default: false }, checkStrictly: { type: Boolean, default: false }, expandOnClickNode: { type: Boolean, default: true }, depth: { type: Number, default: 0 } }, computed: { hasChildren() { return this.node[this.props.children] && this.node[this.props.children].length > 0; }, isExpanded() { return this.node.expanded === void 0 ? false : this.node.expanded; } }, emits: ["node-click", "check-change"], methods: { toggle() { if (this.expandOnClickNode && this.hasChildren) { this.node.expanded = !this.node.expanded; } this.$emit("node-click", this.node); }, toggleCheck(checked) { this.node.checked = checked; if (!this.checkStrictly) { this.updateChildCheckStatus(this.node, checked); this.updateParentCheckStatus(this.node); } this.$emit("check-change", this.node); }, updateChildCheckStatus(node2, checked) { if (node2[this.props.children]) { node2[this.props.children].forEach((child) => { child.checked = checked; this.updateChildCheckStatus(child, checked); }); } }, updateParentCheckStatus(node2) { let parent = this.$parent; while (parent && parent.node) { const allChecked = parent.node[this.props.children].every( (child) => child.checked ); parent.node.checked = allChecked; parent = parent.$parent; } } } }; function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_up_checkbox = vue.resolveComponent("up-checkbox"); const _component_tree_node = vue.resolveComponent("tree-node", true); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-tree-node", style: vue.normalizeStyle({ paddingLeft: $props.depth * 20 + "px" }) }, [ vue.createElementVNode("view", { class: "u-tree-node-content", onClick: _cache[0] || (_cache[0] = (...args) => $options.toggle && $options.toggle(...args)) }, [ vue.createCommentVNode(` {{ node.expanded ? '▼' : '▶' }} `), $options.hasChildren ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, class: "u-tree-node-toggle", name: $props.node.expanded ? "arrow-down-fill" : "play-right-fill", size: "12" }, null, 8, ["name"])) : vue.createCommentVNode("v-if", true), $props.showCheckbox ? (vue.openBlock(), vue.createBlock(_component_up_checkbox, { key: 1, usedAlone: "", size: 12, checked: $props.node.checked, onChange: $options.toggleCheck, style: { "margin-right": "10px" } }, null, 8, ["checked", "onChange"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "default", { nodeData: $props.node, level: $props.depth + 1 }, () => [ vue.createTextVNode( vue.toDisplayString($props.node[$props.props.label]), 1 /* TEXT */ ) ], true) ]), $options.hasChildren && ($props.node.expanded === void 0 ? true : $props.node.expanded) ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: "u-tree-node-children", style: vue.normalizeStyle({ paddingLeft: ($props.depth + 1) * 20 + "px" }) }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.node[$props.props.children], (child) => { return vue.openBlock(), vue.createBlock(_component_tree_node, { key: child[$props.props.nodeKey], node: child, props: $props.props, "show-checkbox": $props.showCheckbox, "check-strictly": $props.checkStrictly, "expand-on-click-node": $props.expandOnClickNode, depth: $props.depth + 1, onNodeClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("node-click", $event)), onCheckChange: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("check-change", $event)) }, { default: vue.withCtx(({ nodeData, level }) => [ vue.renderSlot(_ctx.$slots, "default", { nodeData, level }, void 0, true) ]), _: 2 /* DYNAMIC */ }, 1032, ["node", "props", "show-checkbox", "check-strictly", "expand-on-click-node", "depth"]); }), 128 /* KEYED_FRAGMENT */ )) ], 4 /* STYLE */ )) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ ); } const TreeNode = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b], ["__scopeId", "data-v-469fe828"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tree/tree-node.vue"]]); const _sfc_main$b = { name: "u-tree", components: { TreeNode }, props: { data: { type: Array, required: true }, props: { type: Object, default: () => ({ label: "label", children: "children", nodeKey: "id" }) }, showCheckbox: { type: Boolean, default: false }, defaultExpandAll: { type: Boolean, default: false }, expandOnClickNode: { type: Boolean, default: true }, checkStrictly: { type: Boolean, default: false } }, data() { return { treeData: [] }; }, created() { this.initTree(); }, watch: { data: { handler(newVal) { this.treeData = JSON.parse(JSON.stringify(newVal)); this.initExpandedState(this.treeData, this.defaultExpandAll); }, deep: true, immediate: true } }, emits: ["node-click", "check-change"], methods: { initTree() { this.treeData = JSON.parse(JSON.stringify(this.data)); this.initExpandedState(this.treeData, this.defaultExpandAll); }, initExpandedState(nodes, expanded) { nodes.forEach((node2) => { node2.expanded = expanded; if (node2[this.props.children]) { this.initExpandedState(node2[this.props.children], expanded); } }); }, handleNodeClick(node2) { this.$emit("node-click", node2); }, /** * 直接递归 treeData 获取所有 checked 的节点 */ getCheckedNodes() { const traverse = (nodes) => { let result = []; nodes.forEach((node2) => { if (node2.checked) { result.push(node2); } if (node2[this.props.children] && node2[this.props.children].length > 0) { result = result.concat(traverse(node2[this.props.children])); } }); return result; }; return traverse(this.treeData); } } }; function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) { const _component_tree_node = vue.resolveComponent("tree-node"); return vue.openBlock(), vue.createElementBlock("view", { class: "u-tree" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.treeData, (node2) => { return vue.openBlock(), vue.createBlock(_component_tree_node, { key: node2[$props.props.nodeKey], node: node2, props: $props.props, "show-checkbox": $props.showCheckbox, "check-strictly": $props.checkStrictly, "expand-on-click-node": $props.expandOnClickNode, onNodeClick: $options.handleNodeClick, onCheckChange: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("check-change", $event)) }, { default: vue.withCtx(({ nodeData, level }) => [ vue.renderSlot(_ctx.$slots, "default", { node: nodeData, level }, void 0, true) ]), _: 2 /* DYNAMIC */ }, 1032, ["node", "props", "show-checkbox", "check-strictly", "expand-on-click-node", "onNodeClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]); } const uTree = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a], ["__scopeId", "data-v-35158cdb"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-tree/u-tree.vue"]]); const __vite_glob_0_125 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uTree }, Symbol.toStringTag, { value: "Module" })); function pickExclude(obj, keys) { if (!["[object Object]", "[object File]"].includes(Object.prototype.toString.call(obj))) { return {}; } return Object.keys(obj).reduce((prev, key) => { if (!keys.includes(key)) { prev[key] = obj[key]; } return prev; }, {}); } function formatImage(res) { return res.tempFiles.map((item) => ({ ...pickExclude(item, ["path"]), type: "image", url: item.path, thumb: item.path, size: item.size, name: item.path.split("/").pop() + ".png" })); } function formatVideo(res) { return [ { ...pickExclude(res, ["tempFilePath", "thumbTempFilePath", "errMsg"]), type: "video", url: res.tempFilePath, thumb: res.thumbTempFilePath, size: res.size, width: res.width || 0, // APP 2.1.0+、H5、微信小程序、京东小程序 height: res.height || 0, // APP 2.1.0+、H5、微信小程序、京东小程序 name: res.tempFilePath.split("/").pop() + ".mp4" } ]; } function chooseFile({ accept, multiple, capture, compressed, maxDuration, sizeType, camera, maxCount, extension }) { try { capture = test.array(capture) ? capture : capture.split(","); } catch (e2) { capture = []; } return new Promise((resolve, reject) => { switch (accept) { case "image": uni.chooseImage({ count: multiple ? Math.min(maxCount, 9) : 1, sourceType: capture, sizeType, success: (res) => resolve(formatImage(res)), fail: reject }); break; case "video": uni.chooseVideo({ sourceType: capture, compressed, maxDuration, camera, success: (res) => resolve(formatVideo(res)), fail: reject }); break; } }); } const mixinUpload = { watch: { // 监听accept的变化,判断是否符合个平台要求 // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示 accept: { immediate: true, handler(val) { if (val === "all" || val === "media") { error("只有微信小程序才支持把accept配置为all、media之一"); } if (val === "file") { error("只有微信小程序和H5(HX2.9.9)才支持把accept配置为file"); } } } } }; const props = defineMixin({ props: { // 接受的文件类型, 可选值为all media image file video accept: { type: String, default: () => props$1x.upload.accept }, extension: { type: Array, default: () => props$1x.upload.extension }, // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头 capture: { type: [String, Array], default: () => props$1x.upload.capture }, // 当accept为video时生效,是否压缩视频,默认为true compressed: { type: Boolean, default: () => props$1x.upload.compressed }, // 当accept为video时生效,可选值为back或front camera: { type: String, default: () => props$1x.upload.camera }, // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒 maxDuration: { type: Number, default: () => props$1x.upload.maxDuration }, // 上传区域的图标,只能内置图标 uploadIcon: { type: String, default: () => props$1x.upload.uploadIcon }, // 上传区域的图标的颜色,默认 uploadIconColor: { type: String, default: () => props$1x.upload.uploadIconColor }, // 是否开启文件读取前事件 useBeforeRead: { type: Boolean, default: () => props$1x.upload.useBeforeRead }, // 读取后的处理函数 afterRead: { type: Function, default: null }, // 读取前的处理函数 beforeRead: { type: Function, default: null }, // 是否显示组件自带的图片&视频预览功能 previewFullImage: { type: Boolean, default: () => props$1x.upload.previewFullImage }, // 最大上传数量 maxCount: { type: [String, Number], default: () => props$1x.upload.maxCount }, // 是否启用 disabled: { type: Boolean, default: () => props$1x.upload.disabled }, // 预览上传的图片时的裁剪模式,和image组件mode属性一致 imageMode: { type: String, default: () => props$1x.upload.imageMode }, // 标识符,可以在回调函数的第二项参数中获取 name: { type: String, default: () => props$1x.upload.name }, // 所选的图片的尺寸, 可选值为original compressed sizeType: { type: Array, default: () => props$1x.upload.sizeType }, // 是否开启图片多选,部分安卓机型不支持 multiple: { type: Boolean, default: () => props$1x.upload.multiple }, // 是否展示删除按钮 deletable: { type: Boolean, default: () => props$1x.upload.deletable }, // 文件大小限制,单位为byte maxSize: { type: [String, Number], default: () => props$1x.upload.maxSize }, // 显示已上传的文件列表 fileList: { type: Array, default: () => props$1x.upload.fileList }, // 上传区域的提示文字 uploadText: { type: String, default: () => props$1x.upload.uploadText }, // 内部预览图片区域和选择图片按钮的区域宽度 width: { type: [String, Number], default: () => props$1x.upload.width }, // 内部预览图片区域和选择图片按钮的区域高度 height: { type: [String, Number], default: () => props$1x.upload.height }, // 是否在上传完成后展示预览图 previewImage: { type: Boolean, default: () => props$1x.upload.previewImage }, // 是否自动删除 autoDelete: { type: Boolean, default: () => props$1x.upload.autoDelete }, // 是否自动上传需要传递action指定地址 autoUpload: { type: Boolean, default: () => props$1x.upload.autoUpload }, // 自动上传接口地址 autoUploadApi: { type: String, default: () => props$1x.upload.autoUploadApi }, // 自动上传驱动,local/oss/cos/kodo autoUploadDriver: { type: String, default: () => props$1x.upload.autoUploadDriver }, // 自动上传授权接口,比如oss的签名接口。 autoUploadAuthUrl: { type: String, default: () => props$1x.upload.autoUploadAuthUrl }, // 自动上传携带的header autoUploadHeader: { type: Object, default: () => { return props$1x.upload.autoUploadHeader; } }, // 本地计算视频封面 getVideoThumb: { type: Boolean, default: () => props$1x.upload.getVideoThumb }, // 自定义自动上传后处理 customAfterAutoUpload: { type: Boolean, default: () => props$1x.upload.customAfterAutoUpload }, videoPreviewObjectFit: { type: String, default: () => props$1x.upload.videoPreviewObjectFit } } }); const _sfc_main$a = { name: "u-upload", mixins: [mpMixin, mixin, mixinUpload, props], data() { return { lists: [], isInCount: true, popupShow: false, currentItemIndex: -1 }; }, watch: { // 监听文件列表的变化,重新整理内部数据 fileList: { handler() { this.formatFileList(); }, immediate: true, deep: true }, deletable(newVal) { this.formatFileList(); }, maxCount(newVal) { this.formatFileList(); }, accept(newVal) { this.formatFileList(); }, popupShow(newVal) { if (!newVal) { this.currentItemIndex = -1; } } }, emits: ["error", "beforeRead", "oversize", "afterRead", "delete", "clickPreview", "update:fileList", "afterAutoUpload"], methods: { t: t$1, addUnit, addStyle, videoErrorCallback() { }, loadedVideoMetadata(e2) { if (this.currentItemIndex < 0) { return; } if (this.autoUploadDriver != "local") { return; } if (!this.getVideoThumb) { return; } let w2 = this.lists[this.currentItemIndex].width; let h2 = this.lists[this.currentItemIndex].height; const dpr = uni.getSystemInfoSync().pixelRatio; uni.createSelectorQuery().select("#myVideo").context((res) => { formatAppLog("log", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:293", "select video", res); const myVideo = res.context; uni.createSelectorQuery().select("#myCanvas").fields({ node: true, size: true }).exec(([res2]) => { formatAppLog("log", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:299", "select canvas", res2); const ctx1 = res2[0].node.getContext("2d"); res2[0].node.width = w2 * dpr; res2[0].node.height = h2 * dpr; setTimeout(() => { captureFirstFrame(); }, 500); const captureFirstFrame = () => { ctx1.drawImage(myVideo, 0, 0, w2 * dpr, h2 * dpr); wx.canvasToTempFilePath({ canvas: res2[0].node, success: (result) => { formatAppLog("log", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:314", "First frame image path:", result.tempFilePath); this.fileList["currentItemIndex"].thumb = result.tempFilePath; }, fail: (err) => { formatAppLog("error", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:320", "Failed to export image:", err); } }); }; setInterval(() => { ctx1.drawImage(myVideo, 0, 0, w2 * dpr, h2 * dpr); }, 1e3 / 24); }).exec(); }).exec(); }, formatFileList() { const { fileList = [], maxCount } = this; const lists = fileList.map((item) => { const name2 = item.name || item.url || item.thumb; return Object.assign(Object.assign({}, item), { // 如果item.url为本地选择的blob文件的话,无法判断其为video还是image,此处优先通过accept做判断处理 isImage: item.name ? test.image(item.name) : this.accept === "image" || test.image(name2), isVideo: item.name ? test.video(item.name) : this.accept === "video" || test.video(name2), deletable: typeof item.deletable === "boolean" ? item.deletable : this.deletable }); }); this.lists = lists; this.isInCount = lists.length < maxCount; }, chooseFile(params2) { const { maxCount, multiple, lists, disabled } = this; if (disabled) return Promise.reject(); const chooseParams = Object.assign({ accept: this.accept, extension: this.extension, multiple: this.multiple, capture: this.capture, compressed: this.compressed, maxDuration: this.maxDuration, sizeType: this.sizeType, camera: this.camera }, { maxCount: maxCount - lists.length, ...params2 }); return chooseFile(chooseParams).then((res) => { const result = chooseParams.multiple ? res : res[0]; this.onBeforeRead(result); return result; }).catch((error2) => { this.$emit("error", error2); }); }, // 文件读取之前 onBeforeRead(file) { const { beforeRead, useBeforeRead } = this; let res = file; if (test.func(beforeRead)) { res = beforeRead(file, this.getDetail()); } if (useBeforeRead) { res = new Promise((resolve, reject) => { this.$emit( "beforeRead", Object.assign(Object.assign({ file }, this.getDetail()), { callback: (ok) => { ok ? resolve() : reject(); } }) ); }); } if (test.promise(res)) { res.then((data) => this.onAfterRead(data || file)); } else { this.onAfterRead(res || file); } }, getDetail(index2) { return { name: this.name, index: index2 == null ? this.fileList.length : index2 }; }, async onAfterRead(file) { const { maxSize, afterRead } = this; const oversize = Array.isArray(file) ? file.some((item) => item.size > maxSize) : file.size > maxSize; if (oversize) { uni.showToast({ title: t$1("up.upload.sizeExceed") }); this.$emit("oversize", Object.assign({ file }, this.getDetail())); return; } let len = this.fileList.length; if (this.autoUpload) { let lists = [].concat(file); this.fileList.length; lists.map((item) => { this.fileList.push({ ...item, status: "uploading", message: t$1("up.upload.uploading"), progress: 0 }); }); let that2 = this; this.$emit("update:fileList", this.fileList); for (let i2 = 0; i2 < lists.length; i2++) { let j2 = i2; let result = ""; switch (this.autoUploadDriver) { case "cos": break; case "kodo": break; case "oss": case "upload_oss": console.log(); let formData = {}; let ret = await uni.request({ url: this.autoUploadAuthUrl, method: "get", header: this.autoUploadHeader, data: { filename: lists[j2].name } }); let res0 = ret.data; if (res0.code == 200) { formData = res0.data.params; } else { uni.showToast({ title: res0.msg, duration: 1500 }); return; } var uploadTask = uni.uploadFile({ url: res0.data.params.host, filePath: lists[j2].url, name: "file", // fileType: 'video', // 仅支付宝小程序,且必填。 // header: header, formData, success: (uploadFileRes) => { let thumb = ""; let afterPromise = ""; if (that2.customAfterAutoUpload) { afterPromise = new Promise((resolve, reject) => { that2.$emit( "afterAutoUpload", Object.assign(res0, { callback: (r2) => { r2.url ? resolve(r2) : reject(); } }) ); }); } if (test.promise(afterPromise)) { afterPromise.then((data) => that2.succcessUpload(len + j2, data.url, data.thumb)); } else { result = res0.data.params.host + "/" + res0.data.params.key; if (that2.accept === "video" || test.video(result)) { thumb = result + "?x-oss-process=video/snapshot,t_10000,m_fast"; } that2.succcessUpload(len + j2, result, thumb); } } }); uploadTask.onProgressUpdate((res) => { that2.updateUpload(len + j2, { progress: res.progress }); }); break; case "local": default: var uploadTask = uni.uploadFile({ url: this.autoUploadApi, filePath: lists[j2].url, name: "file", // fileType: 'video', // 仅支付宝小程序,且必填。 header: this.autoUploadHeader, success: (uploadFileRes) => { let res02 = uploadFileRes.data; let afterPromise = ""; if (that2.customAfterAutoUpload) { afterPromise = new Promise((resolve, reject) => { that2.$emit( "afterAutoUpload", Object.assign(res02, { callback: (r2) => { r2.url ? resolve(r2) : reject(); } }) ); }); } if (test.promise(afterPromise)) { afterPromise.then((data) => that2.succcessUpload(len + j2, data.url)); } else { if (res02.code != 200) { uni.showToast({ title: res02.msg }); } else { result = res02.data.url; that2.succcessUpload(len + j2, result); } } } }); uploadTask.onProgressUpdate((res) => { that2.updateUpload(len + j2, { progress: res.progress }); }); break; } } } else { if (typeof afterRead === "function") { afterRead(file, this.getDetail()); } this.$emit("afterRead", Object.assign({ file }, this.getDetail())); } }, updateUpload(index2, param) { let item = this.fileList[index2]; this.fileList.splice(index2, 1, { ...item, // 注意这里不判断会出现succcessUpload先执行又被覆盖的问题 status: param.progress == 100 ? "success" : "uploading", message: "", progress: param.progress }); this.$emit("update:fileList", this.fileList); }, succcessUpload(index2, url2, thumb = "") { let item = this.fileList[index2]; this.fileList.splice(index2, 1, { ...item, status: "success", message: "", url: url2, progress: 100, thumb }); this.$emit("update:fileList", this.fileList); }, deleteItem(index2) { if (this.autoDelete) { this.fileList.splice(index2, 1); this.$emit("update:fileList", this.fileList); } else { this.$emit( "delete", Object.assign(Object.assign({}, this.getDetail(index2)), { file: this.fileList[index2] }) ); } }, // 预览图片 onPreviewImage(previewItem, index2) { if (!previewItem.isImage || !this.previewFullImage) return; let current = 0; const urls = []; let imageIndex = 0; for (var i2 = 0; i2 < this.lists.length; i2++) { const item = this.lists[i2]; if (item.isImage || item.type && item.type === "image") { urls.push(item.url || item.thumb); if (i2 === index2) { current = imageIndex; } imageIndex += 1; } } if (urls.length < 1) { return; } uni.previewImage({ urls, current, fail() { toast(t$1("up.upload.previewImageFail")); } }); }, onPreviewVideo(previewItem, index2) { if (!this.previewFullImage) return; const sources = []; for (var i2 = 0; i2 < this.lists.length; i2++) { const item = this.lists[i2]; if (item.isVideo || item.type && item.type === "video") { sources.push(Object.assign(Object.assign({}, item), { type: "video" })); } } if (sources.length < 1) { return; } this.popupShow = true; this.currentItemIndex = index2; formatAppLog("log", "at uni_modules/uview-plus/components/u-upload/u-upload.vue:671", this.lists[this.currentItemIndex]); }, onClickPreview(item, index2) { if (this.previewFullImage) { switch (item.type) { case "image": this.onPreviewImage(item, index2); break; case "video": this.onPreviewVideo(item, index2); break; } } this.$emit( "clickPreview", Object.assign(Object.assign({}, item), this.getDetail(index2)) ); } } }; function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_icon = vue.resolveComponent("up-icon"); const _component_u_loading_icon = resolveEasycom(vue.resolveDynamicComponent("u-loading-icon"), __easycom_0$e); const _component_up_gap = vue.resolveComponent("up-gap"); const _component_up_popup = vue.resolveComponent("up-popup"); return vue.openBlock(), vue.createElementBlock( "view", { class: "u-upload", style: vue.normalizeStyle([$options.addStyle(_ctx.customStyle)]) }, [ vue.createElementVNode("view", { class: "u-upload__wrap" }, [ _ctx.previewImage ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList($data.lists, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "u-upload__wrap__preview", key: index2 }, [ item.isImage || item.type && item.type === "image" ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: item.thumb || item.url, mode: _ctx.imageMode, class: "u-upload__wrap__preview__image", onClick: ($event) => $options.onClickPreview(item, index2), style: vue.normalizeStyle([{ width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height) }]) }, null, 12, ["src", "mode", "onClick"])) : (item.isVideo || item.type && item.type === "video") && _ctx.getVideoThumb ? (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: "u-upload__wrap__preview__video", style: vue.normalizeStyle({ width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height) }) }, [ item.thumb ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, src: item.thumb, mode: _ctx.imageMode, class: "u-upload__wrap__preview__image", onClick: ($event) => $options.onClickPreview(item, index2), style: vue.normalizeStyle([{ width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height) }]) }, null, 12, ["src", "mode", "onClick"])) : (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 1, color: "#80CBF9", size: "26", name: item.isVideo || item.type && item.type === "video" ? "movie" : "file-text" }, null, 8, ["name"])), item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-upload__wrap__play", onClick: ($event) => $options.onClickPreview(item, index2) }, [ vue.renderSlot(_ctx.$slots, "playIcon", {}, void 0, true), !_ctx.$slots["playIcon"] ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, class: "u-upload__wrap__play__icon", name: "play-right", size: "22px" })) : vue.createCommentVNode("v-if", true) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true) ], 4 /* STYLE */ )) : (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: "u-upload__wrap__preview__other", onClick: ($event) => $options.onClickPreview(item, index2), style: vue.normalizeStyle([{ width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height) }]) }, [ vue.createVNode(_component_up_icon, { color: "#80CBF9", size: "26", name: item.isVideo || item.type && item.type === "video" ? "movie" : "folder" }, null, 8, ["name"]), vue.createElementVNode( "text", { class: "u-upload__wrap__preview__other__text" }, vue.toDisplayString(item.isVideo || item.type && item.type === "video" ? item.name || $options.t("up.common.video") : item.name || $options.t("up.common.file")), 1 /* TEXT */ ) ], 12, ["onClick"])), item.status === "uploading" || item.status === "failed" ? (vue.openBlock(), vue.createElementBlock("view", { key: 3, class: "u-upload__status" }, [ vue.createElementVNode("view", { class: "u-upload__status__icon" }, [ item.status === "failed" ? (vue.openBlock(), vue.createBlock(_component_up_icon, { key: 0, name: "close-circle", color: "#ffffff", size: "25" })) : (vue.openBlock(), vue.createBlock(_component_u_loading_icon, { key: 1, size: "22", mode: "circle" })) ]), item.message ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-upload__status__message" }, vue.toDisplayString(item.message), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), vue.createVNode(_component_up_gap, { class: "u-upload__progress", height: "3px", style: vue.normalizeStyle({ width: item.progress + "%" }) }, null, 8, ["style"]) ])) : vue.createCommentVNode("v-if", true), item.status !== "uploading" && (_ctx.deletable || item.deletable) ? (vue.openBlock(), vue.createElementBlock("view", { key: 4, class: "u-upload__deletable", onClick: vue.withModifiers(($event) => $options.deleteItem(index2), ["stop"]) }, [ vue.createElementVNode("view", { class: "u-upload__deletable__icon" }, [ vue.createVNode(_component_up_icon, { name: "close", color: "#ffffff", size: "10" }) ]) ], 8, ["onClick"])) : vue.createCommentVNode("v-if", true), vue.renderSlot(_ctx.$slots, "success", {}, () => [ item.status === "success" ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "u-upload__success" }, [ vue.createElementVNode("view", { class: "u-upload__success__icon" }, [ vue.createVNode(_component_up_icon, { name: "checkmark", color: "#ffffff", size: "12" }) ]) ])) : vue.createCommentVNode("v-if", true) ], true) ]); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true), vue.createElementVNode("canvas", { id: "myCanvas", type: "2d", style: { "width": "100px", "height": "150px", "display": "none" } }), $data.isInCount ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ _ctx.$slots.trigger ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, onClick: _cache[0] || (_cache[0] = (...args) => $options.chooseFile && $options.chooseFile(...args)) }, [ vue.renderSlot(_ctx.$slots, "trigger", {}, void 0, true) ])) : !_ctx.$slots.trigger && (_ctx.$slots.default || _ctx.$slots.$default) ? (vue.openBlock(), vue.createElementBlock("view", { key: 1, onClick: _cache[1] || (_cache[1] = (...args) => $options.chooseFile && $options.chooseFile(...args)) }, [ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true) ])) : (vue.openBlock(), vue.createElementBlock("view", { key: 2, class: vue.normalizeClass(["u-upload__button", [_ctx.disabled && "u-upload__button--disabled"]]), "hover-class": !_ctx.disabled ? "u-upload__button--hover" : "", "hover-stay-time": "150", onClick: _cache[2] || (_cache[2] = (...args) => $options.chooseFile && $options.chooseFile(...args)), style: vue.normalizeStyle([{ width: $options.addUnit(_ctx.width), height: $options.addUnit(_ctx.height) }]) }, [ vue.createVNode(_component_up_icon, { name: _ctx.uploadIcon, size: "26", color: _ctx.uploadIconColor }, null, 8, ["name", "color"]), _ctx.uploadText ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "u-upload__button__text" }, vue.toDisplayString(_ctx.uploadText), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ], 14, ["hover-class"])) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ]), vue.createVNode(_component_up_popup, { mode: "center", show: $data.popupShow, "onUpdate:show": _cache[5] || (_cache[5] = ($event) => $data.popupShow = $event) }, { default: vue.withCtx(() => [ $data.popupShow ? (vue.openBlock(), vue.createElementBlock("video", { key: 0, id: "myVideo", src: $data.currentItemIndex >= 0 ? $data.lists[$data.currentItemIndex].url : "", onError: _cache[3] || (_cache[3] = (...args) => $options.videoErrorCallback && $options.videoErrorCallback(...args)), "show-center-play-btn": "", "object-fit": _ctx.videoPreviewObjectFit, "show-fullscreen-btn": "true", "enable-play-gesture": "", controls: "", autoplay: true, "auto-pause-if-open-native": "", onLoadedmetadata: _cache[4] || (_cache[4] = (...args) => $options.loadedVideoMetadata && $options.loadedVideoMetadata(...args)), "initial-time": 0.1 }, null, 40, ["src", "object-fit"])) : vue.createCommentVNode("v-if", true) ]), _: 1 /* STABLE */ }, 8, ["show"]) ], 4 /* STYLE */ ); } const uUpload = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9], ["__scopeId", "data-v-c8491d64"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-upload/u-upload.vue"]]); const __vite_glob_0_126 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uUpload }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$9 = { name: "up-view", mixins: [mpMixin, mixin], emits: ["click"], computed: { valueStyle() { } }, props: { backgroundColor: "", color: "", flexDirection: "", justifyContent: "", alignItems: "", flex1: "", width: "", height: "", padding: "", margin: "", borderColor: "" }, data() { return {}; }, methods: { addStyle, clickHandler() { this.$emit("click"); } } }; function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["u-view", _ctx.class]), style: vue.normalizeStyle({ backgroundColor: $props.backgroundColor, color: $props.color, flexDirection: $props.flexDirection, justifyContent: $props.justifyContent, alignItems: $props.alignItems, flex1: $props.flex1, width: $props.width, height: $props.height, padding: $props.padding, margin: $props.margin, borderColor: $props.borderColor }) }, null, 6 /* CLASS, STYLE */ ); } const uView = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-02d480a7"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-view/u-view.vue"]]); const __vite_glob_0_127 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uView }, Symbol.toStringTag, { value: "Module" })); const _sfc_main$8 = { name: "u-waterfall", props: { modelValue: { // 瀑布流数据 type: Array, required: true, default: function() { return []; } }, // 每次向结构插入数据的时间间隔,单位ms // 单位ms addTime: { type: [Number, String], default: 200 }, // id值,用于清除某一条数据时,根据此idKey名称找到并移除,如数据为{idx: 22, name: 'lisa'} // 那么该把idKey设置为idx idKey: { type: String, default: "id" }, // 瀑布流列数 columns: { type: [Number, String], default: 2 }, // 瀑布流最小列数 columnsMin: { type: [Number, String], default: 2 }, // 最小列宽 minColumnWidth: { type: Number, default: 230 } }, mixins: [mpMixin, mixin], data() { return { columnList: [[]], // 存储每列的数据 children: [], // 用于标记是否已经初始化 initialized: false, windowWidth: 375, windowHeight: 0 }; }, watch: { copyFlowList: { handler(nVal, oVal) { if (!nVal || nVal.length == 0) { this.clear(false); } else { if (this.columnList.length == 1) { this.initColumnList(); } let startIndex = Array.isArray(oVal) && oVal.length > 0 ? oVal.length : 0; this.handleData(nVal.slice(startIndex)); } }, immediate: true }, columns: { handler() { this.initColumnList(); if (this.copyFlowList.length > 0) { this.redistributeData(); } }, immediate: false } }, created() { this.initColumnList(); }, mounted() { this.initialized = true; }, // 添加beforeUnmount生命周期清理事件监听 beforeUnmount() { }, computed: { // 破坏flowList变量的引用,否则watch的结果新旧值是一样的 copyFlowList() { if (!this.modelValue || this.modelValue.length == 0) { return []; } else { return this.cloneData(this.modelValue); } } }, emits: ["update:modelValue"], methods: { // 初始化列数据数组 initColumnList() { this.windowWidth = uni.getSystemInfoSync().windowWidth; const cols = this.getColumnsCount(); this.columnList = Array.from({ length: cols }, () => []); }, // 获取列数,支持auto模式 getColumnsCount() { if (this.columns === "auto") { const columnGap = 7; let columnCount = Math.max(1, Math.floor(this.windowWidth / (this.minColumnWidth + columnGap))); if (columnCount < this.columnsMin) { columnCount = this.columnsMin; } return columnCount; } return parseInt(this.columns) || 2; }, // 窗口大小变化处理函数 handleWindowResize(res) { this.windowWidth = res.size.windowWidth; this.windowHeight = res.size.windowHeight; if (this.resizeTimer) { clearTimeout(this.resizeTimer); } this.resizeTimer = setTimeout(() => { const newColumnsCount = this.getColumnsCount(); const oldColumnsCount = this.columnList.length; if (newColumnsCount !== oldColumnsCount) { this.redistributeData(); } }, 300); }, // 重新分配所有数据 async redistributeData() { this.initColumnList(); const allData = this.cloneData(this.copyFlowList); this.handleData(allData); }, // 处理新增数据 async handleData(newData) { if (!newData || newData.length === 0) return; const columnHeights = new Array(this.columnList.length).fill(0); for (let i2 = 0; i2 < this.columnList.length; i2++) { try { const rect = await this.$uGetRect(`#u-column-${i2}`); columnHeights[i2] = rect.height || 0; } catch (e2) { columnHeights[i2] = 0; } } for (let item of newData) { const minHeightIndex = columnHeights.indexOf(Math.min(...columnHeights)); this.columnList[minHeightIndex].push(item); await sleep(30); this.$nextTick(async () => { try { const rect = await this.$uGetRect(`#u-column-${minHeightIndex}`); if (rect.height) { columnHeights[minHeightIndex] = rect.height; } } catch (e2) { } }); } }, // 复制而不是引用对象和数组 cloneData(data) { return JSON.parse(JSON.stringify(data)); }, // 清空数据列表 clear(bak = true) { this.initColumnList(); if (bak) { this.$emit("update:modelValue", []); } }, // 清除某一条指定的数据,根据id实现 remove(id) { for (let i2 = 0; i2 < this.columnList.length; i2++) { const index2 = this.columnList[i2].findIndex((val) => val[this.idKey] == id); if (index2 !== -1) { this.columnList[i2].splice(index2, 1); break; } } const modelValueIndex = this.modelValue.findIndex((val) => val[this.idKey] == id); if (modelValueIndex !== -1) { const newModelValue = this.cloneData(this.modelValue); newModelValue.splice(modelValueIndex, 1); this.$emit("update:modelValue", newModelValue); } }, // 修改某条数据的某个属性 modify(id, key, value2) { let found = false; let targetItem = null; for (let i2 = 0; i2 < this.columnList.length; i2++) { const index2 = this.columnList[i2].findIndex((val) => val[this.idKey] == id); if (index2 !== -1) { this.columnList[i2][index2][key] = value2; targetItem = this.columnList[i2][index2]; found = true; break; } } if (found && targetItem) { const modelValueIndex = this.modelValue.findIndex((val) => val[this.idKey] == id); if (modelValueIndex !== -1) { let data = this.cloneData(this.modelValue); data[modelValueIndex][key] = value2; this.$emit("update:modelValue", data); } } } } }; function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "u-waterfall" }, [ vue.createCommentVNode(" 新增支持多列布局 "), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($data.columnList, (column, index2) => { return vue.openBlock(), vue.createElementBlock("view", { key: index2, ref_for: true, ref: `u-column-${index2}`, id: `u-column-${index2}`, class: "u-column" }, [ vue.renderSlot(_ctx.$slots, "column", { colIndex: index2, colList: column }, void 0, true), vue.renderSlot(_ctx.$slots, "left", { colIndex: index2, leftList: column }, void 0, true), !_ctx.$slots["left"] && !_ctx.$slots["column"] ? (vue.openBlock(true), vue.createElementBlock( vue.Fragment, { key: 0 }, vue.renderList(column, (item, itemIndex) => { return vue.renderSlot(_ctx.$slots, "default", { key: itemIndex, item, itemIndex }, void 0, true); }), 128 /* KEYED_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ], 8, ["id"]); }), 128 /* KEYED_FRAGMENT */ )) ]); } const uWaterfall = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-366bbda3"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/uni_modules/uview-plus/components/u-waterfall/u-waterfall.vue"]]); const __vite_glob_0_129 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: uWaterfall }, Symbol.toStringTag, { value: "Module" })); function add(arg1, arg2) { var r1, r2, m2; try { r1 = arg1.toString().split(".")[1].length; } catch (e2) { r1 = 0; } try { r2 = arg2.toString().split(".")[1].length; } catch (e2) { r2 = 0; } m2 = Math.pow(10, Math.max(r1, r2)); return (arg1 * m2 + arg2 * m2) / m2; } function sub(arg1, arg2) { var r1, r2, m2, n2; try { r1 = arg1.toString().split(".")[1].length; } catch (e2) { r1 = 0; } try { r2 = arg2.toString().split(".")[1].length; } catch (e2) { r2 = 0; } m2 = Math.pow(10, Math.max(r1, r2)); n2 = r1 >= r2 ? r1 : r2; return Math.abs(((arg1 * m2 - arg2 * m2) / m2).toFixed(n2)); } function mul(a2, b2) { var c2 = 0, d2 = a2.toString(), e2 = b2.toString(); try { c2 += d2.split(".")[1].length; } catch (f2) { } try { c2 += e2.split(".")[1].length; } catch (f2) { } return Number(d2.replace(".", "")) * Number(e2.replace(".", "")) / Math.pow(10, c2); } function div(a2, b2) { var c2, d2, e2 = 0, f2 = 0; try { e2 = a2.toString().split(".")[1].length; } catch (g2) { } try { f2 = b2.toString().split(".")[1].length; } catch (g2) { } return c2 = Number(a2.toString().replace(".", "")), d2 = Number(b2.toString().replace(".", "")), xyutil.mul(c2 / d2, Math.pow(10, f2 - e2)); } const calc = { add, sub, mul, div }; let platform = "none"; platform = "vue3"; platform = "plus"; const platform$1 = platform; let themeType = ["primary", "success", "error", "warning", "info"]; function setConfig(configs) { index.shallowMerge(config$1, configs.config || {}); index.shallowMerge(props$1x, configs.props || {}); index.shallowMerge(color$3, configs.color || {}); index.shallowMerge(zIndex, configs.zIndex || {}); } index.setConfig = setConfig; const $u = { route, date: index.timeFormat, // 另名date colorGradient: colorGradient$1.colorGradient, hexToRgb: colorGradient$1.hexToRgb, rgbToHex: colorGradient$1.rgbToHex, colorToRgba: colorGradient$1.colorToRgba, test, type: themeType, http, config: config$1, // uview-plus配置信息相关,比如版本号 zIndex, debounce, throttle, calc, mixin, mpMixin, // props, ...index, color: color$3, platform: platform$1 }; const importFn = /* @__PURE__ */ Object.assign({ "./components/u-action-sheet-data/u-action-sheet-data.vue": __vite_glob_0_0, "./components/u-action-sheet/u-action-sheet.vue": __vite_glob_0_1, "./components/u-agreement/u-agreement.vue": __vite_glob_0_2, "./components/u-album/u-album.vue": __vite_glob_0_3, "./components/u-alert/u-alert.vue": __vite_glob_0_4, "./components/u-avatar-group/u-avatar-group.vue": __vite_glob_0_5, "./components/u-avatar/u-avatar.vue": __vite_glob_0_6, "./components/u-back-top/u-back-top.vue": __vite_glob_0_7, "./components/u-badge/u-badge.vue": __vite_glob_0_8, "./components/u-barcode/u-barcode.vue": __vite_glob_0_9, "./components/u-box/u-box.vue": __vite_glob_0_10, "./components/u-button/u-button.vue": __vite_glob_0_11, "./components/u-calendar/u-calendar.vue": __vite_glob_0_12, "./components/u-car-keyboard/u-car-keyboard.vue": __vite_glob_0_13, "./components/u-card/u-card.vue": __vite_glob_0_14, "./components/u-cate-tab/u-cate-tab.vue": __vite_glob_0_15, "./components/u-cell-group/u-cell-group.vue": __vite_glob_0_16, "./components/u-cell/u-cell.vue": __vite_glob_0_17, "./components/u-checkbox-group/u-checkbox-group.vue": __vite_glob_0_18, "./components/u-checkbox/u-checkbox.vue": __vite_glob_0_19, "./components/u-circle-progress/u-circle-progress.vue": __vite_glob_0_20, "./components/u-city-locate/u-city-locate.vue": __vite_glob_0_21, "./components/u-code-input/u-code-input.vue": __vite_glob_0_22, "./components/u-code/u-code.vue": __vite_glob_0_23, "./components/u-col/u-col.vue": __vite_glob_0_24, "./components/u-collapse-item/u-collapse-item.vue": __vite_glob_0_25, "./components/u-collapse/u-collapse.vue": __vite_glob_0_26, "./components/u-color-picker/u-color-picker.vue": __vite_glob_0_27, "./components/u-column-notice/u-column-notice.vue": __vite_glob_0_28, "./components/u-copy/u-copy.vue": __vite_glob_0_29, "./components/u-count-down/u-count-down.vue": __vite_glob_0_30, "./components/u-count-to/u-count-to.vue": __vite_glob_0_31, "./components/u-coupon/u-coupon.vue": __vite_glob_0_32, "./components/u-cropper/u-cropper.vue": __vite_glob_0_33, "./components/u-datetime-picker/u-datetime-picker.vue": __vite_glob_0_34, "./components/u-divider/u-divider.vue": __vite_glob_0_35, "./components/u-dragsort/u-dragsort.vue": __vite_glob_0_36, "./components/u-dropdown-item/u-dropdown-item.vue": __vite_glob_0_37, "./components/u-dropdown/u-dropdown.vue": __vite_glob_0_38, "./components/u-empty/u-empty.vue": __vite_glob_0_39, "./components/u-float-button/u-float-button.vue": __vite_glob_0_40, "./components/u-form-item/u-form-item.vue": __vite_glob_0_41, "./components/u-form/u-form.vue": __vite_glob_0_42, "./components/u-gap/u-gap.vue": __vite_glob_0_43, "./components/u-grid-item/u-grid-item.vue": __vite_glob_0_44, "./components/u-grid/u-grid.vue": __vite_glob_0_45, "./components/u-icon/u-icon.vue": __vite_glob_0_46, "./components/u-image/u-image.vue": __vite_glob_0_47, "./components/u-index-anchor/u-index-anchor.vue": __vite_glob_0_48, "./components/u-index-item/u-index-item.vue": __vite_glob_0_49, "./components/u-index-list/u-index-list.vue": __vite_glob_0_50, "./components/u-input/u-input.vue": __vite_glob_0_51, "./components/u-keyboard/u-keyboard.vue": __vite_glob_0_52, "./components/u-lazy-load/u-lazy-load.vue": __vite_glob_0_53, "./components/u-line-progress/u-line-progress.vue": __vite_glob_0_54, "./components/u-line/u-line.vue": __vite_glob_0_55, "./components/u-link/u-link.vue": __vite_glob_0_56, "./components/u-list-item/u-list-item.vue": __vite_glob_0_57, "./components/u-list/u-list.vue": __vite_glob_0_58, "./components/u-loading-icon/u-loading-icon.vue": __vite_glob_0_59, "./components/u-loading-page/u-loading-page.vue": __vite_glob_0_60, "./components/u-loadmore/u-loadmore.vue": __vite_glob_0_61, "./components/u-markdown/u-markdown.vue": __vite_glob_0_62, "./components/u-message-input/u-message-input.vue": __vite_glob_0_63, "./components/u-modal/u-modal.vue": __vite_glob_0_64, "./components/u-navbar-mini/u-navbar-mini.vue": __vite_glob_0_65, "./components/u-navbar/u-navbar.vue": __vite_glob_0_66, "./components/u-no-network/u-no-network.vue": __vite_glob_0_67, "./components/u-notice-bar/u-notice-bar.vue": __vite_glob_0_68, "./components/u-notify/u-notify.vue": __vite_glob_0_69, "./components/u-number-box/u-number-box.vue": __vite_glob_0_70, "./components/u-number-keyboard/u-number-keyboard.vue": __vite_glob_0_71, "./components/u-overlay/u-overlay.vue": __vite_glob_0_72, "./components/u-pagination/u-pagination.vue": __vite_glob_0_73, "./components/u-parse/u-parse.vue": __vite_glob_0_74, "./components/u-pdf-reader/u-pdf-reader.vue": __vite_glob_0_75, "./components/u-picker-column/u-picker-column.vue": __vite_glob_0_76, "./components/u-picker-data/u-picker-data.vue": __vite_glob_0_77, "./components/u-picker/u-picker.vue": __vite_glob_0_78, "./components/u-popup/u-popup.vue": __vite_glob_0_79, "./components/u-poster/u-poster.vue": __vite_glob_0_80, "./components/u-pull-refresh/u-pull-refresh.vue": __vite_glob_0_81, "./components/u-qrcode/u-qrcode.vue": __vite_glob_0_82, "./components/u-radio-group/u-radio-group.vue": __vite_glob_0_83, "./components/u-radio/u-radio.vue": __vite_glob_0_84, "./components/u-rate/u-rate.vue": __vite_glob_0_85, "./components/u-read-more/u-read-more.vue": __vite_glob_0_86, "./components/u-refresh-virtual-list/u-refresh-virtual-list.vue": __vite_glob_0_87, "./components/u-row-notice/u-row-notice.vue": __vite_glob_0_88, "./components/u-row/u-row.vue": __vite_glob_0_89, "./components/u-safe-bottom/u-safe-bottom.vue": __vite_glob_0_90, "./components/u-scroll-list/u-scroll-list.vue": __vite_glob_0_91, "./components/u-search/u-search.vue": __vite_glob_0_92, "./components/u-select/u-select.vue": __vite_glob_0_93, "./components/u-short-video/u-short-video.vue": __vite_glob_0_94, "./components/u-signature/u-signature.vue": __vite_glob_0_95, "./components/u-skeleton/u-skeleton.vue": __vite_glob_0_96, "./components/u-slider/u-slider.vue": __vite_glob_0_97, "./components/u-status-bar/u-status-bar.vue": __vite_glob_0_98, "./components/u-steps-item/u-steps-item.vue": __vite_glob_0_99, "./components/u-steps/u-steps.vue": __vite_glob_0_100, "./components/u-sticky/u-sticky.vue": __vite_glob_0_101, "./components/u-subsection/u-subsection.vue": __vite_glob_0_102, "./components/u-swipe-action-item/u-swipe-action-item.vue": __vite_glob_0_103, "./components/u-swipe-action/u-swipe-action.vue": __vite_glob_0_104, "./components/u-swiper-indicator/u-swiper-indicator.vue": __vite_glob_0_105, "./components/u-swiper/u-swiper.vue": __vite_glob_0_106, "./components/u-switch/u-switch.vue": __vite_glob_0_107, "./components/u-tabbar-item/u-tabbar-item.vue": __vite_glob_0_108, "./components/u-tabbar/u-tabbar.vue": __vite_glob_0_109, "./components/u-table/u-table.vue": __vite_glob_0_110, "./components/u-table2/u-table2.vue": __vite_glob_0_111, "./components/u-tabs-item/u-tabs-item.vue": __vite_glob_0_112, "./components/u-tabs/u-tabs.vue": __vite_glob_0_113, "./components/u-tag/u-tag.vue": __vite_glob_0_114, "./components/u-td/u-td.vue": __vite_glob_0_115, "./components/u-text/u-text.vue": __vite_glob_0_116, "./components/u-textarea/u-textarea.vue": __vite_glob_0_117, "./components/u-th/u-th.vue": __vite_glob_0_118, "./components/u-title/u-title.vue": __vite_glob_0_119, "./components/u-toast/u-toast.vue": __vite_glob_0_120, "./components/u-toolbar/u-toolbar.vue": __vite_glob_0_121, "./components/u-tooltip/u-tooltip.vue": __vite_glob_0_122, "./components/u-tr/u-tr.vue": __vite_glob_0_123, "./components/u-transition/u-transition.vue": __vite_glob_0_124, "./components/u-tree/u-tree.vue": __vite_glob_0_125, "./components/u-upload/u-upload.vue": __vite_glob_0_126, "./components/u-view/u-view.vue": __vite_glob_0_127, "./components/u-virtual-list/u-virtual-list.vue": __vite_glob_0_128, "./components/u-waterfall/u-waterfall.vue": __vite_glob_0_129 }); let components = []; for (const key in importFn) { let component = importFn[key].default; if (component.name && component.name.indexOf("u--") !== 0) { component.install = function(Vue2) { Vue2.component(name, component); }; components.push(component); } } const install = (Vue2, upuiParams = "") => { components.forEach(function(component) { const name2 = component.name.replace(/u-([a-zA-Z0-9-_]+)/g, "up-$1"); if (name2 != component.name) { Vue2.component(component.name, component); } Vue2.component(name2, component); }); if (upuiParams) { uni.upuiParams = upuiParams; let temp = upuiParams(); if (temp.httpIns) { temp.httpIns(http); } if (temp.options) { setConfig(temp.options); } } uni.$u = $u; Vue2.config.globalProperties.$u = $u; Vue2.mixin(mixin); }; const uviewPlus = { install }; const _sfc_main$7 = { __name: "index", props: { /** * @param add 新增评论 * @param reply 回复评论 */ commentType: { type: String, default: "add" } }, emits: ["clickComment", "moveMessageTop", "inputDone"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const { Toast: Toast2 } = useToast(); const emit = __emit; const props2 = __props; const showActionSheet = vue.ref(false); function closeActionSheet() { showActionSheet.value = false; } function clickActionSheet(item) { if (item.value === 0) { handleDeleteComment(); } else if (item.value === 1) { let comment = null; if (pressTwoLevelId.value !== 0) { const result = findCommentById(pressTwoLevelId.value, "two"); if (result && result.twoItem) { comment = result.twoItem; } } else if (pressOneLevelId.value !== 0) { comment = findCommentById(pressOneLevelId.value, "one"); } if (comment) { handleClickComment(comment); } } showActionSheet.value = false; } async function handleDeleteComment() { try { await deleteComment(deleteId.value); Toast2({ title: "删除成功" }); removeItemComment(); } catch (error2) { formatAppLog("error", "at components/comment/index.vue:236", "deleteComment", error2); } finally { pressOneLevelId.value = pressTwoLevelId.value = deleteId.value = 0; } } function removeItemComment() { if (pressOneLevelId.value !== 0 && pressTwoLevelId.value === 0) { const oneItem = findCommentById(pressOneLevelId.value, "one"); if (oneItem) { const itemIndex = oneCommentList.value.findIndex( (v2) => v2.id === oneItem.id ); if (itemIndex !== -1) { oneCommentList.value.splice(itemIndex, 1); } } } else if (pressTwoLevelId.value !== 0) { const result = findCommentById(pressTwoLevelId.value, "two"); if (result && result.oneItem && result.twoItem) { const twoIndex = result.oneItem.replyList.findIndex( (two) => two.id === result.twoItem.id ); if (twoIndex !== -1) { result.oneItem.replyList.splice(twoIndex, 1); } } } } function findCommentById(id, type2 = "one") { if (type2 === "one") { return oneCommentList.value.find((item) => item.id === id) || null; } else if (type2 === "two") { for (const oneItem of oneCommentList.value) { if (Array.isArray(oneItem.replyList)) { const twoItem = oneItem.replyList.find((two) => two.id === id); if (twoItem) { return { oneItem, twoItem }; } } } return null; } return null; } const deleteId = vue.ref(0); const pressOneLevelId = vue.ref(0); const pressTwoLevelId = vue.ref(0); function longpress(event) { var _a2, _b, _c; if ((_a2 = event.currentTarget.dataset) == null ? void 0 : _a2.twoLevelId) { deleteId.value = pressTwoLevelId.value = event.currentTarget.dataset.twoLevelId; } else if ((_b = event.currentTarget.dataset) == null ? void 0 : _b.oneLevelId) { deleteId.value = pressOneLevelId.value = (_c = event.currentTarget.dataset) == null ? void 0 : _c.oneLevelId; } showActionSheet.value = true; } const actionList = vue.computed(() => { return [ { name: "删除", value: 0 }, { name: "回复", value: 1 } ]; }); const articleId = vue.ref(""); onLoad((options2) => { if (!options2.id) return; articleId.value = options2.id; }); const oneCommentList = vue.ref([]); const parentId = vue.ref(0); const currentReplyId = vue.ref(0); const replyId = vue.ref(0); const oneLevelId = vue.ref(0); function handleClickComment(comment) { if (comment.parentId === 0) { currentReplyId.value = comment.id; parentId.value = comment.id; oneLevelId.value = comment.id; } else { currentReplyId.value = comment.id; parentId.value = comment.parentId; oneLevelId.value = comment.oneLevelId; } replyId.value = comment.userId; emit("clickComment", comment); } function closeF2() { } const paging = vue.ref(null); useZPaging(paging); function queryList(page2, pageSize) { } const likeLoading = vue.ref(false); const likeAnimationIds = vue.ref([]); function toUserPage(id) { uni.navigateTo({ url: `/pages/user/personal?id=${id}` }); } const __returned__ = { Toast: Toast2, emit, props: props2, showActionSheet, closeActionSheet, clickActionSheet, handleDeleteComment, removeItemComment, findCommentById, deleteId, pressOneLevelId, pressTwoLevelId, longpress, actionList, articleId, oneCommentList, parentId, currentReplyId, replyId, oneLevelId, handleClickComment, closeF2, paging, queryList, likeLoading, likeAnimationIds, toUserPage, ref: vue.ref, computed: vue.computed, get useZPaging() { return useZPaging; }, get onLoad() { return onLoad; }, get timeFormat() { return timeFormat; }, get useToast() { return useToast; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_avatar = vue.resolveComponent("up-avatar"); const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$g); const _component_z_paging = resolveEasycom(vue.resolveDynamicComponent("z-paging"), __easycom_1$5); const _component_up_action_sheet = vue.resolveComponent("up-action-sheet"); return vue.openBlock(), vue.createElementBlock( vue.Fragment, null, [ vue.createVNode(_component_z_paging, { ref: "paging", "use-page-scroll": "", onCloseF2: $setup.closeF2, modelValue: $setup.oneCommentList, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.oneCommentList = $event), onQuery: $setup.queryList, class: "comment-paging" }, { default: vue.withCtx(() => [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($setup.oneCommentList, (oneItem) => { return vue.openBlock(), vue.createElementBlock("view", { class: "comment-box", key: oneItem.id }, [ vue.createCommentVNode(" 一级评论 "), vue.createElementVNode( "view", { class: vue.normalizeClass([ "item-comment", oneItem.replyList && oneItem.replyList.length > 0 ? "child" : "" ]) }, [ vue.createElementVNode("view", { class: "avatar" }, [ vue.createVNode(_component_up_avatar, { onClick: ($event) => $setup.toUserPage(oneItem.userId), shape: "circle", src: oneItem.usePicture }, null, 8, ["onClick", "src"]) ]), vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "user-box", onClick: ($event) => $setup.toUserPage(oneItem.userId) }, [ vue.createElementVNode( "text", { class: "username" }, vue.toDisplayString(oneItem.userName), 1 /* TEXT */ ), oneItem.authorMark ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "author-tag" }, "作者")) : vue.createCommentVNode("v-if", true) ], 8, ["onClick"]), vue.createElementVNode("view", { onLongpress: $setup.longpress, "data-one-level-id": oneItem.id, class: "reply-box", onClick: ($event) => $setup.handleClickComment(oneItem) }, [ vue.createElementVNode( "text", { class: "text" }, vue.toDisplayString(oneItem.content), 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString($setup.timeFormat(oneItem.createTime, "yyyy-mm-dd")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "reply-tip" }, "回复") ], 40, ["data-one-level-id", "onClick"]) ]), vue.createElementVNode("view", { class: "right-box" }, [ vue.withDirectives(vue.createVNode(_component_uni_icons, { customPrefix: "iconfont", size: "18", color: "#2E2E2E", class: vue.normalizeClass(["icon-state icon-dianzan", { animated: $setup.likeAnimationIds.includes(oneItem.id), heartBeat: $setup.likeAnimationIds.includes(oneItem.id) }]) }, null, 8, ["class"]), [ [vue.vShow, !oneItem.likeMark] ]), vue.withDirectives(vue.createVNode(_component_uni_icons, { customPrefix: "iconfont", size: "18", color: "#FF2442", class: vue.normalizeClass(["icon-state icon-dianzanxuanzhong", { animated: $setup.likeAnimationIds.includes(oneItem.id), heartBeat: $setup.likeAnimationIds.includes(oneItem.id) }]) }, null, 8, ["class"]), [ [vue.vShow, oneItem.likeMark] ]), vue.createElementVNode( "text", { class: "count" }, vue.toDisplayString(oneItem.likeCount), 1 /* TEXT */ ) ]) ], 2 /* CLASS */ ), vue.createCommentVNode(" 二级评论 "), oneItem.replyList && oneItem.replyList.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", { key: 0, class: "child-comment-box" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(oneItem.replyList, (twoItem, idx) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item-comment sub-comment", key: idx }, [ vue.createElementVNode("view", { class: "avatar" }, [ vue.createVNode(_component_up_avatar, { class: "sub-avatar", shape: "circle", size: "25", src: twoItem.usePicture }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "content" }, [ vue.createElementVNode("view", { class: "user-box" }, [ vue.createElementVNode( "text", { class: "username" }, vue.toDisplayString(twoItem.userName), 1 /* TEXT */ ), twoItem.authorMark ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "author-tag" }, "作者")) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { onLongpress: $setup.longpress, "data-one-level-id": oneItem.id, "data-two-level-id": twoItem.id, class: "reply-box" }, [ twoItem.replyMark ? (vue.openBlock(), vue.createElementBlock("text", { key: 0, class: "text" }, [ vue.createTextVNode("回复"), vue.createElementVNode( "text", null, vue.toDisplayString(twoItem.replyName) + ": ", 1 /* TEXT */ ), vue.createTextVNode( vue.toDisplayString(twoItem.content), 1 /* TEXT */ ) ])) : (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "text" }, vue.toDisplayString(twoItem.content), 1 /* TEXT */ )), vue.createElementVNode( "text", { class: "time" }, vue.toDisplayString($setup.timeFormat(twoItem.createTime, "yyyy-mm-dd")), 1 /* TEXT */ ), vue.createElementVNode("text", { class: "reply-tip" }, "回复") ], 40, ["data-one-level-id", "data-two-level-id"]) ]), vue.createElementVNode("view", { class: "right-box" }, [ vue.withDirectives(vue.createVNode(_component_uni_icons, { customPrefix: "iconfont", size: "18", color: "#2E2E2E", class: vue.normalizeClass(["icon-state icon-dianzan", { animated: $setup.likeAnimationIds.includes(twoItem.id), heartBeat: $setup.likeAnimationIds.includes(twoItem.id) }]) }, null, 8, ["class"]), [ [vue.vShow, !twoItem.likeMark] ]), vue.withDirectives(vue.createVNode(_component_uni_icons, { customPrefix: "iconfont", size: "18", color: "#FF2442", class: vue.normalizeClass(["icon-state icon-dianzanxuanzhong", { animated: $setup.likeAnimationIds.includes(twoItem.id), heartBeat: $setup.likeAnimationIds.includes(twoItem.id) }]) }, null, 8, ["class"]), [ [vue.vShow, twoItem.likeMark] ]), vue.createElementVNode( "text", { class: "count" }, vue.toDisplayString(twoItem.likeCount), 1 /* TEXT */ ) ]) ]); }), 128 /* KEYED_FRAGMENT */ )), oneItem.replyList && oneItem.replyList.length > 0 && oneItem.replyPage.hasMore && oneItem.replyCount > 1 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "load-more" }, [ vue.createCommentVNode(" 展示{{ twoItem.allReply }}条回复 "), vue.createElementVNode("text", null, "展开更多回复") ])) : vue.createCommentVNode("v-if", true) ])) : vue.createCommentVNode("v-if", true) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), _: 1 /* STABLE */ }, 8, ["modelValue"]), vue.createVNode(_component_up_action_sheet, { actions: $setup.actionList, closeOnClickOverlay: true, cancelText: "取消", show: $setup.showActionSheet, onClose: $setup.closeActionSheet, onSelect: $setup.clickActionSheet }, null, 8, ["actions", "show"]) ], 64 /* STABLE_FRAGMENT */ ); } const Comment = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-05fcfa07"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/comment/index.vue"]]); const _sfc_main$6 = { __name: "index", props: { // 是否已关注 followed: { type: Boolean, default: false }, // 被关注用户ID followedId: { type: [String, Number], required: true }, textType: { type: String, default: "default" // 可选值 fans }, showBtn: { type: Boolean, default: true }, activeStyle: { type: Object, default: () => ({}) }, inactiveStyle: { type: Object, default: () => ({}) } }, emits: ["update:followed", "follow-change"], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const defaultActiveStyle = { border: "1px solid #999", color: "#333" }; const defaultInactiveStyle = { border: "1px solid #ff2442", color: "#ff2442" }; const { Toast: Toast2 } = useToast(); const props2 = __props; const isOwner = vue.computed(() => { }); const currentStyle = vue.computed(() => { if (isFollowed.value) { return { ...defaultActiveStyle, ...props2.activeStyle || {} }; } else { return { ...defaultInactiveStyle, ...props2.inactiveStyle || {} }; } }); const emit = __emit; const isFollowed = vue.ref(props2.followed); const showFollowModal = vue.ref(false); const followLoading = vue.ref(false); vue.watch( () => props2.followed, (newVal) => { isFollowed.value = newVal; } ); async function handleFollow() { formatAppLog("log", "at components/followBtn/index.vue:114", "点击关注按钮"); if (isFollowed.value) { showFollowModal.value = true; } } function confirmFollowModal() { showFollowModal.value = false; } function cancelFollowModal() { showFollowModal.value = false; } const __returned__ = { defaultActiveStyle, defaultInactiveStyle, Toast: Toast2, props: props2, isOwner, currentStyle, emit, isFollowed, showFollowModal, followLoading, handleFollow, confirmFollowModal, cancelFollowModal, ref: vue.ref, watch: vue.watch, computed: vue.computed, onMounted: vue.onMounted, get useToast() { return useToast; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_modal = vue.resolveComponent("up-modal"); return vue.withDirectives((vue.openBlock(), vue.createElementBlock( "view", { class: "follow-container" }, [ vue.createCommentVNode(" 关注按钮 "), vue.createElementVNode( "view", { onClick: $setup.handleFollow, class: vue.normalizeClass(["follow-box", $setup.isFollowed ? "follow" : "", $setup.currentStyle]), style: vue.normalizeStyle($setup.currentStyle) }, [ vue.createElementVNode("text", null, [ $props.textType === "default" ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode( vue.toDisplayString($setup.isFollowed ? "已关注" : "关注"), 1 /* TEXT */ ) ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 粉丝列表展示文案不一样 "), $setup.isFollowed ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createTextVNode("互相关注") ], 64 /* STABLE_FRAGMENT */ )) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createTextVNode("回关") ], 64 /* STABLE_FRAGMENT */ )) ], 64 /* STABLE_FRAGMENT */ )) ]) ], 6 /* CLASS, STYLE */ ), vue.createCommentVNode(" 取关确认弹窗 "), vue.createVNode(_component_up_modal, { showCancelButton: true, confirmText: "不再关注", cancelText: "取消", onConfirm: $setup.confirmFollowModal, onCancel: $setup.cancelFollowModal, show: $setup.showFollowModal, title: "不再关注该作者?" }, null, 8, ["show"]) ], 512 /* NEED_PATCH */ )), [ [vue.vShow, !$setup.isOwner] ]); } const FollowBtn = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5], ["__scopeId", "data-v-ca095d49"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/followBtn/index.vue"]]); const _sfc_main$5 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { Toast: Toast2 } = useToast(); const goShuiBei = () => { { window.location.href = "weixin://dl/business/?t=HZ2gBmGKRzp"; } }; const instance = vue.getCurrentInstance(); const articleId = vue.ref(""); const detail = vue.ref(null); const isOwner = vue.computed(() => { }); onLoad((options2) => { articleId.value = options2.id || "101"; fetchArticleDetail(); }); onReady(() => { uni.onKeyboardHeightChange && uni.onKeyboardHeightChange(listenerKeybord); }); onShow(() => { uni.$on("followStateChanged", handleFollowStateChanged); }); onHide(() => { uni.offKeyboardHeightChange && uni.offKeyboardHeightChange(listenerKeybord); uni.$off("followStateChanged", handleFollowStateChanged); }); function clickSwiper(index2) { var _a2; formatAppLog("log", "at pages/article_details/index.vue:225", "index", index2); uni.previewImage({ current: index2, urls: ((_a2 = detail.value) == null ? void 0 : _a2.imageUrlList) || [] }); } function listenerKeybord(res) { if (res.height === 0) { keybordHeight.value = 0; } else { uni.getSystemInfo({ success(systemRes) { const screenHeight = systemRes.screenHeight; const windowHeight = systemRes.windowHeight; const disHeight = screenHeight - windowHeight; keybordHeight.value = res.height - disHeight; } }); } } async function fetchArticleDetail() { try { uni.showLoading({ title: "加载中", mask: true }); const { data } = await getGoodDetailId(articleId.value); detail.value = data; uni.hideLoading(); } catch (error2) { formatAppLog("error", "at pages/article_details/index.vue:261", "fetchArticleDetail", error2); uni.hideLoading(); } } const commentText = vue.ref(""); function rightClick() { } const goBack = () => { const pages2 = getCurrentPages(); if (pages2.length > 1) { uni.navigateBack(); } else { uni.switchTab({ url: "/pages/index/index" }); } }; const showActionPopup = vue.ref(false); function handleActions() { showActionPopup.value = true; } function handleDelete() { showActionPopup.value = false; uni.showModal({ title: "提示", content: "确认删除?", success: async function(res) { if (res.confirm) ; } }); } function toUserPage() { uni.navigateTo({ url: `/pages/user/personal?id=${detail.value.userId}` }); } const commentType = vue.ref("add"); const commentInputPl = vue.ref("说点什么..."); function clickComment(comment) { const username = comment.userName; commentType.value = "reply"; commentInputPl.value = `回复 @${username}`; keybordFocus.value = true; } const confirmHold = vue.ref(true); const commentRef = vue.ref(); function handleInputConfirm(event) { var _a2; if (((_a2 = commentText.value) == null ? void 0 : _a2.trim()) === "") { confirmHold.value = true; return Toast2({ title: "有内容才能发送哦" }); } confirmHold.value = false; commentRef.value.handleAddComment(commentText.value); } function inputDone() { commentText.value = ""; } const commentSection = vue.ref(); const commentOffsetTop = vue.ref(0); vue.watch( () => detail.value, async (val, oldVal) => { if (val && !oldVal) { await vue.nextTick(); const query = uni.createSelectorQuery().in(instance.proxy); query.select(".comment-section").boundingClientRect((data) => { if (data.top) { commentOffsetTop.value = data.top - 60; } }).exec(); } } ); function clickMessageIcon() { uni.pageScrollTo({ scrollTop: commentOffsetTop.value, // selector: ".fixed-view", success() { formatAppLog("log", "at pages/article_details/index.vue:374", "success"); }, fail(e2) { formatAppLog("error", "at pages/article_details/index.vue:377", `scrollTo error ${e2}`); } }); } const collectionLoading = vue.ref(false); async function handleCollection() { try { if (collectionLoading.value) return; collectionLoading.value = true; await setUserState({ type: 1, bookId: detail.value.id }); detail.value.collectMark = !detail.value.collectMark; if (detail.value.collectMark) { detail.value.collectCount += 1; } else { detail.value.collectCount -= 1; } collectionLoading.value = false; } catch (error2) { formatAppLog("error", "at pages/article_details/index.vue:402", "collection error", error2); collectionLoading.value = false; } } const likeLoading = vue.ref(false); const likeAnimation = vue.ref(false); async function handleLike() { try { if (likeLoading.value) return; likeLoading.value = true; await setUserState({ type: 0, bookId: detail.value.id }); detail.value.likeMark = !detail.value.likeMark; if (detail.value.likeMark) { likeAnimation.value = true; detail.value.likeCount += 1; } else { likeAnimation.value = false; detail.value.likeCount -= 1; } likeLoading.value = false; } catch (error2) { likeLoading.value = false; Toast2({ title: "点赞失败" }); formatAppLog("error", "at pages/article_details/index.vue:435", "handleLike", error2); } } const keybordHeight = vue.ref(0); const keybordOverlay = vue.ref(true); const keybordFocus = vue.ref(false); function commentInputFocus(event) { } function commentInputBlur() { keybordHeight.value = 0; keybordFocus.value = false; } function clickFooterInput() { formatAppLog("log", "at pages/article_details/index.vue:463", "点击了底部Input"); commentInputPl.value = "说点什么..."; commentType.value = "add"; keybordFocus.value = true; } function handleFollowStateChanged(data) { var _a2; if (Number(data.userId) === Number((_a2 = detail.value) == null ? void 0 : _a2.userId)) { detail.value.followMark = data.followMark; } } const __returned__ = { Toast: Toast2, goShuiBei, instance, articleId, detail, isOwner, clickSwiper, listenerKeybord, fetchArticleDetail, commentText, rightClick, goBack, showActionPopup, handleActions, handleDelete, toUserPage, commentType, commentInputPl, clickComment, confirmHold, commentRef, handleInputConfirm, inputDone, commentSection, commentOffsetTop, clickMessageIcon, collectionLoading, handleCollection, likeLoading, likeAnimation, handleLike, keybordHeight, keybordOverlay, keybordFocus, commentInputFocus, commentInputBlur, clickFooterInput, handleFollowStateChanged, ref: vue.ref, watch: vue.watch, getCurrentInstance: vue.getCurrentInstance, nextTick: vue.nextTick, computed: vue.computed, get onLoad() { return onLoad; }, get onReady() { return onReady; }, get onHide() { return onHide; }, get onShow() { return onShow; }, get useToast() { return useToast; }, get getArticleDetailId() { return getArticleDetailId; }, get getGoodDetailId() { return getGoodDetailId; }, get Comment() { return Comment; }, get FollowBtn() { return FollowBtn; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_overlay = vue.resolveComponent("up-overlay"); const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$g); const _component_up_tabbar = vue.resolveComponent("up-tabbar"); const _component_up_popup = vue.resolveComponent("up-popup"); return $setup.detail ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "page-container" }, [ vue.createCommentVNode(" 自定义导航栏 "), vue.createCommentVNode(` \r \r \r \r `), vue.createCommentVNode(" 内容区域 "), vue.createElementVNode("view", { class: "content-box" }, [ vue.createElementVNode("view", { class: "content-container" }, [ vue.createCommentVNode(" 主体内容 "), vue.createElementVNode("view", { class: "post-content" }, [ vue.createElementVNode("view", { class: "post-image" }, [ vue.createElementVNode("view", { class: "image-list-box" }, [ vue.createElementVNode("image", { src: $setup.detail.coverImage, mode: "", class: "coverImage" }, null, 8, ["src"]), vue.createCommentVNode(' ') ]), vue.createCommentVNode(' \r\n \r\n ') ]), vue.createElementVNode("view", { class: "post-box" }, [ vue.createElementVNode("view", { class: "post-title" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.detail.title), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "post-text" }, [ vue.createElementVNode( "text", null, vue.toDisplayString($setup.detail.content), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "post-info" }, [ vue.createElementVNode( "text", { class: "post-time" }, vue.toDisplayString($setup.detail.publishTime), 1 /* TEXT */ ), vue.createCommentVNode(' 共{{ detail.commentCount }}条评论 ') ]) ]) ]), vue.createElementVNode("view", { class: "fixed-view" }), vue.createCommentVNode(" 评论区 "), vue.createElementVNode( "view", { class: "comment-section", ref: "commentSection" }, [ vue.createElementVNode("view", { class: "comment-title" }, [ vue.createElementVNode( "text", null, "全部评论 (" + vue.toDisplayString($setup.detail.commentCount) + ")", 1 /* TEXT */ ) ]), vue.createCommentVNode(" 评论列表 "), vue.createVNode($setup["Comment"], { commentType: $setup.commentType, ref: "commentRef", onClickComment: $setup.clickComment, onMoveMessageTop: $setup.clickMessageIcon, onInputDone: $setup.inputDone }, null, 8, ["commentType"]) ], 512 /* NEED_PATCH */ ) ]) ]), vue.createCommentVNode(" 这里是底部input聚焦弹窗键盘时,真实输入框 "), vue.createElementVNode( "view", { class: vue.normalizeClass(["keybord-input-box", $setup.keybordHeight > 0 ? "keybord-fixed" : ""]) }, [ vue.createVNode(_component_up_overlay, { show: $setup.keybordOverlay, onClick: _cache[1] || (_cache[1] = ($event) => $setup.keybordHeight = 0) }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: "overlay-input-box", style: vue.normalizeStyle( $setup.keybordHeight > 0 ? "--tabbar-bottom:" + $setup.keybordHeight + "px" : "" ) }, [ vue.createElementVNode("view", { class: "comment-input-container" }, [ vue.withDirectives(vue.createElementVNode("input", { focus: $setup.keybordFocus, border: "none", adjustPosition: false, class: "comment-input", type: "text", "confirm-type": "send", "auto-blur": true, "confirm-hold": $setup.confirmHold, "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.commentText = $event), placeholder: $setup.commentInputPl, onFocus: $setup.commentInputFocus, onBlur: $setup.commentInputBlur, onConfirm: $setup.handleInputConfirm }, null, 40, ["focus", "confirm-hold", "placeholder"]), [ [vue.vModelText, $setup.commentText] ]) ]), vue.createElementVNode("view", { class: "right-box", onClick: $setup.handleInputConfirm }, [ vue.createElementVNode("button", { type: "default" }, "发送") ]) ], 4 /* STYLE */ ) ]), _: 1 /* STABLE */ }, 8, ["show"]) ], 2 /* CLASS */ ), vue.createCommentVNode(" 底部互动栏 "), vue.createVNode(_component_up_tabbar, { class: "u-bottom-tabbar" }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "toAPP" }, [ vue.createElementVNode("button", { type: "default", class: "storeAPP", onClick: $setup.goShuiBei }, "打开水贝商城") ]), vue.createElementVNode("view", { class: "bottom-bar" }, [ vue.createElementVNode("view", { onClick: vue.withModifiers($setup.clickFooterInput, ["stop"]), class: "comment-input-container" }, [ vue.createElementVNode("input", { border: "none", adjustPosition: false, class: "comment-input", type: "text", readonly: true, disabled: true, "confirm-type": "发送", "auto-blur": true, placeholder: "说点什么..." }) ]), vue.createElementVNode("view", { class: "right-box" }, [ vue.createElementVNode("view", { class: "item", onClick: $setup.handleLike }, [ vue.createVNode(_component_uni_icons, { type: "heart", size: "24" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.detail.likeCount), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item", onClick: $setup.handleCollection }, [ vue.createVNode(_component_uni_icons, { type: "star", size: "24" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.detail.collectCount), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "item", onClick: $setup.clickMessageIcon }, [ vue.createVNode(_component_uni_icons, { type: "chat", size: "24" }), vue.createElementVNode( "text", null, vue.toDisplayString($setup.detail.commentCount), 1 /* TEXT */ ) ]) ]) ]) ]), _: 1 /* STABLE */ }), vue.createCommentVNode(" 右上角操作popup "), vue.createVNode(_component_up_popup, { show: $setup.showActionPopup, onClose: _cache[3] || (_cache[3] = ($event) => $setup.showActionPopup = false) }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "popup-box" }, [ vue.createElementVNode("view", { class: "close-box", onClick: _cache[2] || (_cache[2] = ($event) => $setup.showActionPopup = false) }, [ vue.createVNode(_component_uni_icons, { type: "closeempty", size: "28" }) ]), vue.createElementVNode("view", { class: "header" }, [ vue.createElementVNode("view", { class: "title" }, "更多操作") ]), vue.createElementVNode("view", { class: "actions-menu" }, [ vue.createElementVNode("view", { onClick: $setup.handleDelete, class: "item-action" }, [ vue.createElementVNode("view", { class: "icon-box" }, [ vue.createVNode(_component_uni_icons, { type: "trash", size: "28" }) ]), vue.createElementVNode("view", { class: "icon-name" }, "删除") ]) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show"]) ])) : vue.createCommentVNode("v-if", true); } const PagesArticleDetailsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-04f1b7e6"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/pages/article_details/index.vue"]]); const wechat = {}; const _imports_0$1 = "/static/images/stop.png"; const _sfc_main$4 = { __name: "index", props: { imgUrls: { type: Array, default: () => [] }, videoline: { type: String, default: "" } }, setup(__props, { expose: __expose }) { __expose(); const props2 = __props; const indicatorDots = vue.ref(true); const circular = vue.ref(true); const autoplay = vue.ref(true); const interval = vue.ref(3e3); const duration = vue.ref(500); const currents = vue.ref("1"); const controls = vue.ref(true); const isPlay = vue.ref(true); const videoContext = vue.ref(""); vue.onMounted(() => { if (props2.videoline) { props2.imgUrls.shift(); } }); const bindPause = () => { videoContext.value.play(); controls.value = false; autoplay.value = false; }; const change = (e2) => { currents.value = e2.detail.current + 1; }; const videoPause = (e2) => { }; const __returned__ = { props: props2, indicatorDots, circular, autoplay, interval, duration, currents, controls, isPlay, videoContext, bindPause, change, videoPause, ref: vue.ref, onMounted: vue.onMounted }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock("view", { class: "product-bg" }, [ vue.createElementVNode("swiper", { "indicator-dots": $setup.indicatorDots, "indicator-active-color": "#e93323", autoplay: $setup.autoplay, circular: $setup.circular, interval: $setup.interval, duration: $setup.duration, onChange: $setup.change }, [ $props.videoline ? (vue.openBlock(), vue.createElementBlock("swiper-item", { key: 0 }, [ vue.createElementVNode("view", { class: "item" }, [ vue.withDirectives(vue.createElementVNode( "view", { style: { "width": "100%", "height": "100%" } }, [ vue.createElementVNode("video", { id: "myVideo", src: $props.videoline, objectFit: "cover", controls: "", style: { "width": "100%", "height": "100%" }, "show-center-play-btn": "", "show-mute-btn": "true", "auto-pause-if-navigate": "", "custom-cache": false, "enable-progress-gesture": false, poster: $props.imgUrls[0], onPause: $setup.videoPause }, null, 40, ["src", "poster"]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, !$setup.controls] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "poster" }, [ vue.createElementVNode("image", { class: "image", src: $props.imgUrls[0] }, null, 8, ["src"]) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.controls] ]), vue.withDirectives(vue.createElementVNode( "view", { class: "stop", onClick: $setup.bindPause }, [ vue.createElementVNode("image", { class: "image", src: _imports_0$1 }) ], 512 /* NEED_PATCH */ ), [ [vue.vShow, $setup.controls] ]) ]) ])) : vue.createCommentVNode("v-if", true), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.imgUrls, (item, index2) => { return vue.openBlock(), vue.createElementBlock("swiper-item", { key: index2 }, [ vue.createElementVNode("image", { src: item, class: "slide-image" }, null, 8, ["src"]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 40, ["indicator-dots", "autoplay", "circular", "interval", "duration"]) ]); } const productConSwiper = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3], ["__scopeId", "data-v-afea8b02"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/productConSwiper/index.vue"]]); const _imports_0 = "/static/images/noCoupon.png"; const _sfc_main$3 = { __name: "index", props: { showPopup: { type: Boolean, default: false }, openType: { type: Number, default: 0 }, coupon: { type: Object, default: () => ({}) }, orderShow: { type: String, default: "" } }, emits: [ "close", "ChangCouponsUseState", "ChangCoupons", "tabCouponType" ], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props2 = __props; const { Toast: Toast2 } = useToast(); const emit = __emit; const type2 = vue.ref(1); function close() { type2.value = 1; emit("close"); } function setType(val) { type2.value = val; emit("tabCouponType", val); } const __returned__ = { props: props2, Toast: Toast2, emit, type: type2, close, setType, ref: vue.ref, get useToast() { return useToast; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_popup = vue.resolveComponent("up-popup"); return vue.openBlock(), vue.createBlock(_component_up_popup, { show: $props.showPopup, closeOnClickOverlay: true, onClose: $setup.close }, { default: vue.withCtx(() => [ vue.createElementVNode("view", { class: "coupon-list-window" }, [ !$props.orderShow ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "nav acea-row row-around" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["acea-row", "row-middle", $setup.type === 1 ? "on" : ""]), onClick: _cache[0] || (_cache[0] = ($event) => $setup.setType(1)) }, "通用券", 2 /* CLASS */ ), vue.createCommentVNode(` 商品券\r 品类券 `) ])) : vue.createCommentVNode("v-if", true), vue.createElementVNode("view", { class: "coupon-box" }, [ vue.createElementVNode( "view", { class: "coupon-list", style: vue.normalizeStyle({ "margin-top": !$props.orderShow ? "0" : "50rpx" }) }, [ $props.coupon.list.length ? (vue.openBlock(), vue.createElementBlock("scroll-view", { key: 0, class: "scroll-box", "scroll-y": "true" }, [ $props.coupon.list.length ? (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 0 }, [ vue.createCommentVNode(` `), (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.coupon.list, (item, index2) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item acea-row row-center-wrapper", key: index2 }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["money acea-row row-column row-center-wrapper", item.isUse ? "moneyGray" : ""]) }, [ vue.createElementVNode("view", null, [ vue.createTextVNode("¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString(item.money ? Number(item.money) : ""), 1 /* TEXT */ ) ]), vue.createElementVNode( "view", { class: "pic-num" }, "满" + vue.toDisplayString(item.minPrice) + "元可用", 1 /* TEXT */ ) ], 2 /* CLASS */ ), vue.createElementVNode("view", { class: "text" }, [ vue.createElementVNode("view", { class: "condition line2" }, [ item.useType === 1 ? (vue.openBlock(), vue.createElementBlock( "span", { key: 0, class: vue.normalizeClass(["line-title", item.isUse ? "gray" : ""]) }, "通用", 2 /* CLASS */ )) : item.useType === 3 ? (vue.openBlock(), vue.createElementBlock( "span", { key: 1, class: vue.normalizeClass(["line-title", item.isUse ? "gray" : ""]) }, "品类", 2 /* CLASS */ )) : (vue.openBlock(), vue.createElementBlock( "span", { key: 2, class: vue.normalizeClass(["line-title", item.isUse ? "gray" : ""]) }, "商品", 2 /* CLASS */ )), vue.createElementVNode( "span", null, vue.toDisplayString(item.name), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "tip-row" }, "注: 工费一次性抵扣"), vue.createElementVNode("view", { class: "data acea-row row-between-wrapper" }, [ item.day > 0 ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0 }, "领取后" + vue.toDisplayString(item.day) + "天内可用", 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1 }, vue.toDisplayString(item.useStartTimeStr && item.useEndTimeStr ? item.useStartTimeStr + " - " + item.useEndTimeStr : ""), 1 /* TEXT */ )), item.isUse ? (vue.openBlock(), vue.createElementBlock( "view", { key: 2, class: "bnt gray" }, vue.toDisplayString(item.use_title || "已领取"), 1 /* TEXT */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 3, class: "bnt bg-color" }, vue.toDisplayString($props.coupon.statusTile || "立即领取"), 1 /* TEXT */ )) ]) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ], 64 /* STABLE_FRAGMENT */ )) : vue.createCommentVNode("v-if", true) ])) : (vue.openBlock(), vue.createElementBlock( vue.Fragment, { key: 1 }, [ vue.createCommentVNode(" 无优惠券 "), vue.createElementVNode("view", { class: "pictrue" }, [ vue.createElementVNode("image", { src: _imports_0 }) ]) ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */ )) ], 4 /* STYLE */ ) ]) ]) ]), _: 1 /* STABLE */ }, 8, ["show"]); } const couponListWindow = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2], ["__scopeId", "data-v-915a5452"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/couponListWindow/index.vue"]]); const _sfc_main$2 = { __name: "index", props: { attr: { type: Object, default: () => ({}) }, showPopup: { type: Boolean, default: false }, limitNum: { type: Number, default: 0 }, isShow: { type: Number, default: 0 }, iSbnt: { type: Number, default: 0 }, iSplus: { type: Number, default: 0 }, iScart: { type: Number, default: 0 } }, emits: [ "goCat", "iptCartNum", "myevent", "ChangeCartNum", "attrVal", "ChangeAttr", "submit", "closePopup" ], setup(__props, { expose: __expose, emit: __emit }) { __expose(); const props2 = __props; const emit = __emit; const calcNumPrice = vue.computed(() => { var _a2; if (!((_a2 = props2.attr) == null ? void 0 : _a2.productSelect)) { return "0.00"; } const { storePrice, cart_num } = props2.attr.productSelect; if (!storePrice || !cart_num) { return "0.00"; } const price = Number(storePrice); const quantity = Number(cart_num); if (isNaN(price) || isNaN(quantity)) { return "0.00"; } if (price < 0 || quantity < 0) { return "0.00"; } const total = price * quantity; return total.toFixed(2); }); function goCat() { emit("goCat"); } function bindCode() { emit("iptCartNum", props2.attr.productSelect.cart_num); } function close() { emit("closePopup"); } function submit() { emit("submit"); } function CartNumDes() { emit("ChangeCartNum", false); } function CartNumAdd() { emit("ChangeCartNum", true); } function tapAttr(indexw, indexn) { emit("attrVal", { indexw, indexn }); if (props2.attr.productAttr && props2.attr.productAttr[indexw]) { props2.attr.productAttr[indexw].index = props2.attr.productAttr[indexw].attrValues[indexn]; } const value2 = getCheckedValue().join(","); emit("ChangeAttr", value2); } function getCheckedValue() { const productAttr = props2.attr.productAttr || []; const value2 = []; for (let i2 = 0; i2 < productAttr.length; i2++) { for (let j2 = 0; j2 < productAttr[i2].attrValues.length; j2++) { if (productAttr[i2].index === productAttr[i2].attrValues[j2]) { value2.push(productAttr[i2].attrValues[j2]); } } } return value2; } const __returned__ = { props: props2, emit, calcNumPrice, goCat, bindCode, close, submit, CartNumDes, CartNumAdd, tapAttr, getCheckedValue, computed: vue.computed }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) { const _component_up_button = vue.resolveComponent("up-button"); const _component_up_popup = vue.resolveComponent("up-popup"); return vue.openBlock(), vue.createBlock(_component_up_popup, { show: $props.showPopup, closeOnClickOverlay: true, onClose: $setup.close }, { default: vue.withCtx(() => [ vue.createElementVNode( "view", { class: vue.normalizeClass(["product-window", ($props.iSbnt ? "join" : "") + " " + ($props.iScart ? "joinCart" : "")]) }, [ vue.createElementVNode("view", { class: "textpic acea-row row-between-wrapper" }, [ vue.createElementVNode("view", { class: "pictrue" }, [ vue.createElementVNode("image", { src: $props.attr.productSelect.image }, null, 8, ["src"]) ]), vue.createElementVNode("view", { class: "text" }, [ vue.createElementVNode( "view", { class: "line1" }, vue.toDisplayString($props.attr.productSelect.storeName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "money font-color" }, [ vue.createTextVNode(" ¥"), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($setup.calcNumPrice), 1 /* TEXT */ ), $props.isShow ? (vue.openBlock(), vue.createElementBlock( "text", { key: 0, class: "stock" }, "库存: " + vue.toDisplayString($props.attr.productSelect.stock), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true), $props.limitNum ? (vue.openBlock(), vue.createElementBlock( "text", { key: 1, class: "stock" }, "限量: " + vue.toDisplayString($props.attr.productSelect.quota), 1 /* TEXT */ )) : vue.createCommentVNode("v-if", true) ]) ]), vue.createElementVNode("view", { class: "iconfont icon-guanbi", onClick: $setup.close }) ]), vue.createElementVNode("view", { class: "rollTop" }, [ vue.createElementVNode("view", { class: "productWinList" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList($props.attr.productAttr, (item, indexw) => { return vue.openBlock(), vue.createElementBlock("view", { class: "item", key: indexw }, [ vue.createElementVNode( "view", { class: "title" }, vue.toDisplayString(item.attrName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "listn acea-row row-middle" }, [ (vue.openBlock(true), vue.createElementBlock( vue.Fragment, null, vue.renderList(item.attrValues, (itemn, indexn) => { return vue.openBlock(), vue.createElementBlock("view", { class: vue.normalizeClass(["itemn", item.index === itemn ? "on" : ""]), onClick: ($event) => $setup.tapAttr(indexw, indexn), key: indexn }, vue.toDisplayString(itemn), 11, ["onClick"]); }), 128 /* KEYED_FRAGMENT */ )) ]) ]); }), 128 /* KEYED_FRAGMENT */ )) ]), vue.createElementVNode("view", { class: "cart acea-row row-between-wrapper" }, [ vue.createElementVNode("view", { class: "title" }, "数量"), vue.createElementVNode("view", { class: "carnum acea-row row-left" }, [ vue.createElementVNode( "view", { class: vue.normalizeClass(["item reduce", $props.attr.productSelect.cart_num <= 1 ? "on" : ""]), onClick: $setup.CartNumDes }, " - ", 2 /* CLASS */ ), vue.createElementVNode("view", { class: "item num" }, [ vue.withDirectives(vue.createElementVNode( "input", { type: "number", "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $props.attr.productSelect.cart_num = $event), "data-name": "productSelect.cart_num", onInput: _cache[1] || (_cache[1] = ($event) => $setup.bindCode($props.attr.productSelect.cart_num)) }, null, 544 /* NEED_HYDRATION, NEED_PATCH */ ), [ [vue.vModelText, $props.attr.productSelect.cart_num] ]) ]), $props.iSplus ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass([ "item plus", $props.attr.productSelect.cart_num >= $props.attr.productSelect.stock ? "on" : "" ]), onClick: $setup.CartNumAdd }, " + ", 2 /* CLASS */ )) : (vue.openBlock(), vue.createElementBlock( "view", { key: 1, class: vue.normalizeClass([ "item plus", $props.attr.productSelect.cart_num >= $props.attr.productSelect.quota || $props.attr.productSelect.cart_num >= $props.attr.productSelect.stock || $props.attr.productSelect.cart_num >= $props.attr.productSelect.num ? "on" : "" ]), onClick: $setup.CartNumAdd }, "+", 2 /* CLASS */ )) ]) ]) ]), vue.createElementVNode("view", { class: "footer-box" }, [ $props.attr.productSelect.stock > 0 ? (vue.openBlock(), vue.createBlock(_component_up_button, { key: 0, class: "confirm-btn", onClick: $setup.submit, type: "primary", text: "确定" })) : (vue.openBlock(), vue.createBlock(_component_up_button, { key: 1, class: "confirm-btn", onClick: $setup.submit, type: "primary", text: "已售罄" })) ]) ], 2 /* CLASS */ ) ]), _: 1 /* STABLE */ }, 8, ["show"]); } const productWindow = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1], ["__scopeId", "data-v-2914200c"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/components/productWindow/index.vue"]]); const _sfc_main$1 = { __name: "index", setup(__props, { expose: __expose }) { __expose(); const { Toast: Toast2 } = useToast(); const instance = vue.getCurrentInstance(); const coupon = vue.ref({ coupon: false, type: 1, list: [], count: [] }); const attrTxt = vue.ref("请选择"); const attrValue = vue.ref(""); const animated = vue.ref(false); const id = vue.ref(0); const productInfo = vue.ref({}); const productValue = vue.ref([]); const couponList = vue.ref([]); const cart_num = vue.ref(1); const isOpen = vue.ref(false); const storeImage = vue.ref(""); const PromotionCode = vue.ref(""); const posterbackgd = vue.ref("/static/images/posterbackgd.png"); const sharePacket = vue.ref({ isState: true }); const clientHeight = vue.ref(""); const good_list = vue.ref([]); const CartCount = vue.ref(0); const posters = vue.ref(false); const attr = vue.ref({ cartAttr: false, productAttr: [], productSelect: {} }); const description = vue.ref(""); const navActive = vue.ref(0); const activityH5 = vue.ref([]); const retunTop = vue.ref(true); const navH = vue.ref(""); const opacity = vue.ref(0); const scrollY = vue.ref(0); const topArr = vue.ref([]); const height = vue.ref(0); const heightArr = vue.ref([]); const lock = vue.ref(false); const scrollTop = vue.ref(0); const sliderImage = vue.ref([]); const canvasStatus = vue.ref(false); const imagePath = vue.ref(""); const imgTop = vue.ref(""); const errT = vue.ref(""); const homeTop = vue.ref(20); const userCollect = vue.ref(false); const returnShow = vue.ref(true); const type2 = vue.ref(""); const showProductPopup = vue.ref(false); const showCouponPopup = vue.ref(false); const handleBtnTpe = vue.ref(""); onLoad((options2) => { const pages2 = getCurrentPages(); returnShow.value = pages2.length > 1; retunTop.value = pages2.length > 1; setTimeout(() => { if (options2.spread) { spread(options2.spread).catch(() => { }); } }, 2e3); uni.getSystemInfo({ success(res) { height.value = res.windowHeight; } }); if (options2.id || options2.scene) { if (options2.scene) { const qrCodeValue = $util.getUrlParams(decodeURIComponent(options2.scene)); const mapeMpQrCodeValue = $util.formatMpQrCodeData(qrCodeValue); id.value = mapeMpQrCodeValue.id; setTimeout(() => { spread(mapeMpQrCodeValue.spread).catch(() => { }); }, 2e3); } else { id.value = options2.id; } type2.value = options2.type ?? "normal"; } getGoodsDetails(); }); onShow(() => { getCartCount(); }); onReady(() => { }); const iptCartNum = (e2) => { attr.value.productSelect.cart_num = e2 || 1; }; const handleScroll = (e2) => { const scrollYVal = e2.detail.scrollTop; const opacityVal = scrollYVal / 350 > 1 ? 1 : scrollYVal / 350; opacity.value = opacityVal; scrollY.value = scrollYVal; if (lock.value) { lock.value = false; return; } }; const closeCouponPopup = () => { showCouponPopup.value = false; }; const ChangeCartNum = (changeValue) => { formatAppLog("log", "at pages/goods_details/index.vue:379", "changeValue", changeValue); let productSelect = productValue.value[attrValue.value] || (attr.value.productAttr.length ? void 0 : attr.value.productSelect); if (!productSelect) return; const stock = productSelect.stock || 0; let num = attr.value.productSelect; num.cart_num = changeValue ? Math.min(num.cart_num + 1, stock) : Math.max(num.cart_num - 1, 1); attr.value.productSelect.cart_num = num.cart_num; cart_num.value = num.cart_num; }; const attrVal = (val) => { attr.value.productAttr[val.indexw].index = attr.value.productAttr[val.indexw].attrValues[val.indexn]; }; const ChangeAttr = (res) => { const productSelect = productValue.value[res]; if (productSelect) { attr.value.productSelect = { ...attr.value.productSelect, image: productSelect.image, sales: productSelect.sales, weight: productSelect.weight, price: productSelect.price, storePrice: productSelect.storePrice, stock: productSelect.stock, unique: productSelect.id, cart_num: 1 }; attrValue.value = res; attrTxt.value = "已选择"; } else { attr.value.productSelect = { ...attr.value.productSelect, image: productInfo.value.image, weight: productSelect.weight, price: productInfo.value.price, storePrice: productSelect.storePrice, stock: 0, unique: productInfo.value.id, cart_num: 1 }; attrValue.value = ""; attrTxt.value = "请选择"; } }; const ChangCoupons = (coupon2) => { couponList.value = couponList.value.filter((item) => item.id !== coupon2.id); getCouponList(); }; const setClientHeight = () => { if (!good_list.value.length) return; const query = uni.createSelectorQuery().in(instance.proxy); query.select("#list0").fields({ size: true }, (data) => { clientHeight.value = data.height + 20; }).exec(); }; const getGoodsDetails = async () => { try { const res = await getArticleDetailId("34"); const product = res.data.productInfo; sliderImage.value = [product.image]; formatAppLog("log", "at pages/goods_details/index.vue:453", "sliderImage.value", sliderImage.value); productInfo.value = product; formatAppLog("log", "at pages/goods_details/index.vue:455", "productInfo.value", productInfo.value); description.value = product.content; formatAppLog("log", "at pages/goods_details/index.vue:457", "description.value", description.value); userCollect.value = res.data.userCollect; attr.value.productAttr = res.data.productAttr; formatAppLog("log", "at pages/goods_details/index.vue:460", "res.data.productValue", res.data); productValue.value = res.data.productValue; sharePacket.value.priceName = res.data.priceName; sharePacket.value.isState = Math.floor(res.data.priceName) !== 0; activityH5.value = res.data.activityAllH5 || []; uni.setNavigationBarTitle({ title: product.storeName.substring(0, 7) + "..." }); attr.value.productAttr = attr.value.productAttr.map((item) => ({ attrName: item.attrName, attrValues: item.attrValues.split(","), id: item.id, isDel: item.isDel, productId: item.productId, type: item.type })); downloadFilestoreImage(); DefaultSelect(); } catch (err) { Toast2({ title: err.toString(), icon: "none" }); } }; const DefaultSelect = () => { let value2 = []; formatAppLog("log", "at pages/goods_details/index.vue:523", "productValue.value", vue.toRaw(productValue.value)); const keys = Object.keys(productValue.value); formatAppLog("log", "at pages/goods_details/index.vue:525", "keys", keys); for (let i2 = 0; i2 < keys.length; i2++) { const key = keys[i2]; formatAppLog("log", "at pages/goods_details/index.vue:528", "key", key); value2 = attr.value.productAttr.length ? key.split(",") : []; } formatAppLog("log", "at pages/goods_details/index.vue:534", "value", value2); attr.value.productAttr.forEach((item, i2) => { item.index = value2[i2]; }); const productSelect = productValue.value[value2.join(",")]; formatAppLog("log", "at pages/goods_details/index.vue:539", { productSelect }); formatAppLog("log", "at pages/goods_details/index.vue:542", { attr }); if (productSelect && attr.value.productAttr.length) { attr.value.productSelect = { ...attr.value.productSelect, storeName: productInfo.value.storeName, image: productSelect.image, sales: productSelect.sales, weight: productSelect.weight, price: productSelect.price, storePrice: productSelect.storePrice, stock: productSelect.stock, unique: productSelect.id, cart_num: 1 }; attrValue.value = value2.join(","); attrTxt.value = "已选择"; } else if (!productSelect && attr.value.productAttr.length) { attr.value.productSelect = { ...attr.value.productSelect, storeName: productInfo.value.storeName, image: productInfo.value.image, sales: productSelect.sales, weight: productSelect.weight, price: productInfo.value.price, storePrice: productSelect.storePrice, stock: 0, unique: productInfo.value.id, cart_num: 1 }; attrValue.value = ""; attrTxt.value = "请选择"; } else if (!productSelect && !attr.value.productAttr.length) { attr.value.productSelect = { ...attr.value.productSelect, storeName: productInfo.value.storeName, image: productInfo.value.image, sales: productSelect.sales, weight: productSelect.weight, price: productInfo.value.price, storePrice: productSelect.storePrice, stock: productInfo.value.stock, unique: productInfo.value.id || "", cart_num: 1 }; attrValue.value = ""; attrTxt.value = "请选择"; } }; const getCouponList = async (type3 = "") => { try { const obj = { page: 1, limit: 20, productId: id.value, type: type3 }; const { data } = await getCoupons(obj); coupon.value.list = data; } catch (err) { formatAppLog("error", "at pages/goods_details/index.vue:606", "getCouponList", err); } }; const tabCouponType = (type3) => { coupon.value.type = type3; getCouponList(type3); }; const ChangCouponsUseState = (index2) => { coupon.value.list[index2].isUse = true; coupon.value.coupon = false; }; const selecAttr = () => { showProductPopup.value = true; handleBtnTpe.value = "buy"; }; const handleSubmit = async () => { var _a2; const productSelect = productValue.value[attrValue.value]; if (attr.value.productAttr.length && (productSelect == null ? void 0 : productSelect.stock) === 0 && isOpen.value) { return Toast2({ title: "产品库存不足,请选择其它", icon: "none" }); } if (handleBtnTpe.value === "buy") { showProductPopup.value = false; getPreOrderFn(); } else if (handleBtnTpe.value === "cart") { try { const params2 = { productId: parseFloat(id.value), cartNum: parseFloat(attr.value.productSelect.cart_num), isNew: false, productAttrUnique: ((_a2 = attr.value.productSelect) == null ? void 0 : _a2.unique) ?? productInfo.value.id }; Toast2({ title: "添加购物车成功", icon: "success", success: () => getCartCount(true) }); showProductPopup.value = false; } catch (res) { showProductPopup.value = false; Toast2({ title: res.message, icon: "none" }); } } }; const handleCoupon = () => { }; const onMyEvent = () => { attr.value.cartAttr = false; isOpen.value = false; }; const closeProductPopup = () => { showProductPopup.value = false; attr.value.cartAttr = false; isOpen.value = false; }; const goBuy = () => { }; const joinCart = (e2) => { }; const toShopCart = () => { }; const getCartCount = async (isAnima = false) => { }; const getPreOrderFn = () => { ({ mallType: 0, preOrderType: type2.value === "normal" ? "buyNow" : "video", orderDetails: [{ attrValueId: parseFloat(attr.value.productSelect.unique), productId: parseFloat(id.value), productNum: parseFloat(attr.value.productSelect.cart_num) }] }); }; const closePosters = () => { posters.value = false; }; const posterImageClose = () => { canvasStatus.value = false; }; const setDomain = (url2) => { url2 = url2 ? url2.toString() : ""; return url2.includes("https://") ? url2 : url2.replace("http://", "https://"); }; const downloadFilestoreImage = async () => { try { const res = await uni.downloadFile({ url: setDomain(productInfo.value.image) }); storeImage.value = res.tempFilePath; } catch { storeImage.value = ""; } }; const goFriend = () => { posters.value = false; }; const getQrcodeFn = async () => { }; const getImageBase64 = async (images) => { try { const res = await imageBase64({ url: images }); imgTop.value = res.data.code; } catch (err) { formatAppLog("error", "at pages/goods_details/index.vue:842", err); } }; const goPoster = async () => { uni.showLoading({ title: "海报生成中", mask: true }); posters.value = false; if (!PromotionCode.value) { uni.hideLoading(); Toast2({ title: errT.value, icon: "none" }); return; } setTimeout(() => { if (!imgTop.value) { uni.hideLoading(); Toast2({ title: "无法生成商品海报!", icon: "none" }); return; } }, 1e3); try { const res = await uni.downloadFile({ url: imgTop.value }); const arrImages = [ posterbackgd.value, res.tempFilePath, PromotionCode.value ]; const storeName = productInfo.value.storeName; const price = productInfo.value.storePrice; setTimeout(() => { $util.PosterCanvas( arrImages, storeName, price, productInfo.value.otPrice, (tempFilePath) => { imagePath.value = tempFilePath; canvasStatus.value = true; uni.hideLoading(); } ); }, 500); } catch { uni.hideLoading(); } }; const ShareInfo = async () => { }; const goBack = () => { const pages2 = getCurrentPages(); if (pages2.length > 1) { uni.navigateBack(); } else { uni.switchTab({ url: "/pages/mall/index" }); } }; const goHome = () => { uni.switchTab({ url: "/pages/index/index" }); }; function toMessagePage() { uni.navigateTo({ url: "/pages/message_create/message_create" }); } const __returned__ = { Toast: Toast2, instance, coupon, attrTxt, attrValue, animated, id, productInfo, productValue, couponList, cart_num, isOpen, storeImage, PromotionCode, posterbackgd, sharePacket, clientHeight, good_list, CartCount, posters, attr, description, navActive, activityH5, retunTop, navH, opacity, scrollY, topArr, height, heightArr, lock, scrollTop, sliderImage, canvasStatus, imagePath, imgTop, errT, homeTop, userCollect, returnShow, type: type2, showProductPopup, showCouponPopup, handleBtnTpe, iptCartNum, handleScroll, closeCouponPopup, ChangeCartNum, attrVal, ChangeAttr, ChangCoupons, setClientHeight, getGoodsDetails, DefaultSelect, getCouponList, tabCouponType, ChangCouponsUseState, selecAttr, handleSubmit, handleCoupon, onMyEvent, closeProductPopup, goBuy, joinCart, toShopCart, getCartCount, getPreOrderFn, closePosters, posterImageClose, setDomain, downloadFilestoreImage, goFriend, getQrcodeFn, getImageBase64, goPoster, ShareInfo, goBack, goHome, toMessagePage, get onReady() { return onReady; }, get onLoad() { return onLoad; }, get onShow() { return onShow; }, ref: vue.ref, computed: vue.computed, watch: vue.watch, getCurrentInstance: vue.getCurrentInstance, toRaw: vue.toRaw, get useToast() { return useToast; }, get wechat() { return wechat; }, get productConSwiper() { return productConSwiper; }, get couponListWindow() { return couponListWindow; }, get productWindow() { return productWindow; }, get getArticleDetailId() { return getArticleDetailId; }, get getGoodDetailId() { return getGoodDetailId; } }; Object.defineProperty(__returned__, "__isScriptSetup", { enumerable: false, value: true }); return __returned__; } }; function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { var _a2; const _component_uni_icons = resolveEasycom(vue.resolveDynamicComponent("uni-icons"), __easycom_0$g); const _component_up_line = vue.resolveComponent("up-line"); return vue.openBlock(), vue.createElementBlock("view", { class: "product-con" }, [ vue.createCommentVNode(' \r\n \r\n '), vue.createCommentVNode(` `), vue.createElementVNode("view", null, [ vue.createElementVNode("scroll-view", { "scroll-top": $setup.scrollTop, "scroll-y": "true", "scroll-with-animation": "true", style: vue.normalizeStyle("height:" + $setup.height + "px;"), onScroll: $setup.handleScroll }, [ vue.createElementVNode("view", { id: "past0" }, [ vue.createVNode($setup["productConSwiper"], { "indicator-dots": false, imgUrls: $setup.sliderImage }, null, 8, ["imgUrls"]), vue.createCommentVNode(' '), vue.createElementVNode("view", { class: "pad30" }, [ vue.createElementVNode("view", { class: "wrapper mb30 borRadius14" }, [ vue.createElementVNode( "view", { class: "introduce" }, vue.toDisplayString($setup.productInfo.storeName), 1 /* TEXT */ ), vue.createElementVNode("view", { class: "label acea-row row-between-wrapper" }, [ vue.createElementVNode( "view", null, "工费: " + vue.toDisplayString($setup.attr.productSelect.price || 0) + "元/克", 1 /* TEXT */ ), vue.createElementVNode( "view", null, "重量: " + vue.toDisplayString($setup.attr.productSelect.weight) + "克", 1 /* TEXT */ ), vue.createElementVNode( "view", null, " 销量:" + vue.toDisplayString(Number(((_a2 = $setup.attr.productSelect) == null ? void 0 : _a2.sales) || 0)) + vue.toDisplayString($setup.productInfo.unitName || ""), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "share acea-row row-between row-bottom" }, [ vue.createElementVNode("view", { class: "money font-color" }, [ vue.createTextVNode(" ¥ "), vue.createElementVNode( "text", { class: "num" }, vue.toDisplayString($setup.attr.productSelect.storePrice), 1 /* TEXT */ ), vue.createCommentVNode(' ¥{{ productInfo.vipPrice }} '), vue.createCommentVNode(' ') ]) ]), vue.createCommentVNode(` \r \r 赠积分:\r 赠送 {{productInfo.give_integral}} 积分\r \r `), $setup.coupon.list.length > 0 ? (vue.openBlock(), vue.createElementBlock("view", { key: 0, class: "coupon acea-row row-between-wrapper", onClick: $setup.handleCoupon }, [ vue.createElementVNode("view", { class: "hide line1 acea-row" }, [ vue.createTextVNode(" 优惠券: "), vue.createElementVNode( "view", { class: "activity" }, " 满" + vue.toDisplayString($setup.coupon.list[0].minPrice) + "减" + vue.toDisplayString($setup.coupon.list[0].money), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "iconfont icon-jiantou" }) ])) : vue.createCommentVNode("v-if", true) ]), vue.createElementVNode("view", { class: "attribute acea-row row-between-wrapper mb30 borRadius14", onClick: $setup.selecAttr }, [ vue.createElementVNode("view", { class: "line1" }, [ vue.createTextVNode( vue.toDisplayString($setup.attrTxt) + ": ", 1 /* TEXT */ ), vue.createElementVNode( "text", { class: "atterTxt" }, vue.toDisplayString($setup.attrValue), 1 /* TEXT */ ) ]), vue.createElementVNode("view", { class: "iconfont icon-jiantou" }) ]), vue.createElementVNode("view", { class: "row-block mb30 borRadius14" }, [ vue.createElementVNode("view", { class: "row-express" }, [ vue.createElementVNode("view", { class: "left-box" }, [ vue.createVNode(_component_uni_icons, { class: "icon", type: "cart", size: "24" }), vue.createElementVNode("text", { class: "text" }, "48小时送达") ]), vue.createElementVNode("view", { class: "express-price" }, [ vue.createElementVNode("text", { class: "express-place" }, "广东深圳"), vue.createCommentVNode(' '), vue.createCommentVNode(' 快递费:8元 ') ]) ]), vue.createVNode(_component_up_line, { color: "#ccc", length: "100%", margin: "10px 0" }), vue.createElementVNode("view", { class: "tip-text" }, [ vue.createVNode(_component_uni_icons, { size: "24", type: "hand-up" }), vue.createElementVNode("view", { class: "text" }, [ vue.createElementVNode("text", { class: "t1" }, "买的放心,用的称心"), vue.createElementVNode("text", { class: "t2" }, "平台有保障") ]) ]) ]) ]) ]) ], 44, ["scroll-top"]) ]), vue.createElementVNode("view", { class: "footer acea-row row-between-wrapper" }, [ vue.createElementVNode("view", { class: "toAPP" }, [ vue.createElementVNode("button", { type: "default", class: "storeAPP" }, "打开水贝商城") ]), vue.createElementVNode("navigator", { "open-type": "switchTab", class: "animated item bounceIn", "hover-class": "none" }, [ vue.createVNode(_component_uni_icons, { size: "22", color: "#666", customPrefix: "iconfont", type: "icon-shouye" }), vue.createElementVNode("view", null, "首页") ]), vue.createElementVNode("button", { onClick: $setup.toMessagePage, "open-type": "contact", "hover-class": "none", class: "item" }, [ vue.createVNode(_component_uni_icons, { size: "22", color: "#666", customPrefix: "iconfont", type: "icon-kefu1" }), vue.createElementVNode("view", null, "客服") ]), vue.createElementVNode("view", { class: "animated item bounceIn", "hover-class": "none", onClick: $setup.toShopCart }, [ vue.createVNode(_component_uni_icons, { size: "22", color: "#666", customPrefix: "iconfont", type: "icon-gouwuche", class: "icon-item" }), vue.createCommentVNode(' \r\n {{\r\n CartCount\r\n }}\r\n '), vue.createElementVNode("view", null, "购物车") ]), vue.createElementVNode("view", { class: "bnt acea-row" }, [ vue.createElementVNode("form", { "report-submit": "true" }, [ vue.createElementVNode("button", { class: "joinCart bnts", "form-type": "submit" }, "加入购物车") ]), vue.createElementVNode("form", { "report-submit": "true" }, [ vue.createElementVNode("button", { class: "buy bnts", "form-type": "submit" }, "立即购买") ]) ]), vue.createCommentVNode(` \r \r \r \r \r \r
    \r \r
    \r `) ]), vue.createCommentVNode(" 组件 "), vue.createVNode($setup["productWindow"], { attr: $setup.attr, isShow: 1, iSplus: 1, showPopup: $setup.showProductPopup, id: "product-window" }, null, 8, ["attr", "showPopup"]), vue.createVNode($setup["couponListWindow"], { coupon: $setup.coupon, showPopup: $setup.showCouponPopup }, null, 8, ["coupon", "showPopup"]) ]); } const PagesGoodsDetailsIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-c5c6bbf1"], ["__file", "C:/Users/EDY/Desktop/项目/shuibei/pages/goods_details/index.vue"]]); __definePage("pages/index/index", PagesIndexIndex); __definePage("pages/article_details/index", PagesArticleDetailsIndex); __definePage("pages/goods_details/index", PagesGoodsDetailsIndex); const _sfc_main = { onLaunch: function() { formatAppLog("log", "at App.vue:4", "App Launch"); }, onShow: function() { formatAppLog("log", "at App.vue:7", "App Show"); }, onHide: function() { formatAppLog("log", "at App.vue:10", "App Hide"); } }; const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "C:/Users/EDY/Desktop/项目/shuibei/App.vue"]]); function createApp() { const app = vue.createVueApp(App); app.use(uviewPlus, () => { return { options: { // 修改$u.config对象的属性 config: { // 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx' unit: "rpx" // customIcon: { // family: 'iconfont', // url: '//at.alicdn.com/t/c/font_4946742_e8oa3t01rkk.css' // } } } }; }); return { app }; } const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp(); uni.Vuex = __Vuex__; uni.Pinia = __Pinia__; __app__.provide("__globalStyles", __uniConfig.styles); __app__._component.mpType = "app"; __app__._component.render = () => { }; __app__.mount("#app"); })(Vue);