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 global = uni.requireGlobal(); ArrayBuffer = global.ArrayBuffer; Int8Array = global.Int8Array; Uint8Array = global.Uint8Array; Uint8ClampedArray = global.Uint8ClampedArray; Int16Array = global.Int16Array; Uint16Array = global.Uint16Array; Int32Array = global.Int32Array; Uint32Array = global.Uint32Array; Float32Array = global.Float32Array; Float64Array = global.Float64Array; BigInt64Array = global.BigInt64Array; BigUint64Array = global.BigUint64Array; } ; if (uni.restoreGlobal) { uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval); } (function(vue) { "use strict"; var _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n; const ON_EXIT = "onExit"; function formatAppLog(type, filename, ...args) { if (uni.__log__) { uni.__log__(type, filename, ...args); } else { console[type].apply(console, [...args, filename]); } } function resolveEasycom(component, easycom) { return typeof component === "string" ? easycom : component; } const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => { !vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target); }; const onExit = /* @__PURE__ */ createHook(ON_EXIT); const env = "dev"; const configs = { LocalTest: { apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", h5Url: "http://192.168.88.51:8080/#/" }, dev: { apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", h5Url: "http://192.168.88.56:8080/#/" }, test: { apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", h5Url: "http://114.218.158.24:8042/#/" }, prod: { apiBaseUrl: "https://oa-a.szjixun.cn/api", h5Url: "https://oa-a.szjixun.cn/#/" } }; const config = configs[env]; class Communication { constructor() { this.webViewObj = null; this.messageHandlers = {}; } setWebView(webView) { this.webViewObj = webView; } sendToH5(action, data = {}) { if (!this.webViewObj) { formatAppLog("error", "at utils/communication.js:13", "webViewObj is not initialized"); return; } const message = JSON.stringify({ action, data }); this.webViewObj.evalJS(`window.handleMessage(${JSON.stringify(message)})`); } registerHandler(action, handler) { this.messageHandlers[action] = handler; } handleMessage(message) { const { action, data = {} } = message; if (this.messageHandlers[action]) { this.messageHandlers[action](data); } else { formatAppLog("warn", "at utils/communication.js:30", "Unknown action:", action); } } } const _export_sfc = (sfc, props2) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props2) { target[key] = val; } return target; }; const _sfc_main$8 = { __name: "index", setup(__props) { const commun = new Communication(); const permissionListener = uni.createRequestPermissionListener(); onExit(() => { permissionListener.stop(); }); function initializeWebView() { const currentWebview = getCurrentPages().pop().$getAppWebview(); commun.setWebView(currentWebview.children()[0]); } commun.registerHandler("load-complete", () => { initializeWebView(); const { statusBarHeight } = uni.getSystemInfoSync(); commun.webViewObj.setStyle({ top: statusBarHeight, bottom: 0 }); permissionListener.onRequest((e2) => { commun.sendToH5("permission-application", e2); }); permissionListener.onConfirm((e2) => { }); permissionListener.onComplete((e2) => { formatAppLog("log", "at pages/index/index.vue:31", "APP执行onComplete", e2); commun.sendToH5("permission-complete", e2); }); }); const webLoad = (e2) => { var _a; const message = ((_a = e2.detail.data) == null ? void 0 : _a[0]) || ""; commun.handleMessage(message); }; return (_ctx, _cache) => { return vue.openBlock(), vue.createElementBlock("web-view", { class: "webview", onMessage: webLoad, style: { "flex": "1" }, src: vue.unref(config).h5Url }, null, 40, ["src"]); }; } }; const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "D:/WebstormProjects/oa-base/pages/index/index.vue"]]); const mpMixin = {}; function email(value) { return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value); } function mobile(value) { return /^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(value); } function url(value) { 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(value); } function date(value) { if (!value) return false; if (number(value)) value = +value; return !/Invalid|NaN/.test(new Date(value).toString()); } function dateISO(value) { return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value); } function number(value) { return /^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(value); } function string(value) { return typeof value === "string"; } function digits(value) { return /^\d+$/.test(value); } function idCard(value) { 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( value ); } function carNo(value) { 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 (value.length === 7) { return creg.test(value); } if (value.length === 8) { return xreg.test(value); } return false; } function amount(value) { return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value); } function chinese(value) { const reg = /^[\u4e00-\u9fa5]+$/gi; return reg.test(value); } function letter(value) { return /^[a-zA-Z]*$/.test(value); } function enOrNum(value) { const reg = /^[0-9a-zA-Z]*$/g; return reg.test(value); } function contains(value, param) { return value.indexOf(param) >= 0; } function range$1(value, param) { return value >= param[0] && value <= param[1]; } function rangeLength(value, param) { return value.length >= param[0] && value.length <= param[1]; } function landline(value) { const reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/; return reg.test(value); } function empty(value) { switch (typeof value) { case "undefined": return true; case "string": if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, "").length == 0) return true; break; case "boolean": if (!value) return true; break; case "number": if (value === 0 || isNaN(value)) return true; break; case "object": if (value === null || value.length === 0) return true; for (const i2 in value) { return false; } return true; } return false; } function jsonString(value) { if (typeof value === "string") { try { const obj = JSON.parse(value); if (typeof obj === "object" && obj) { return true; } return false; } catch (e2) { return false; } } return false; } function array(value) { if (typeof Array.isArray === "function") { return Array.isArray(value); } return Object.prototype.toString.call(value) === "[object Array]"; } function object(value) { return Object.prototype.toString.call(value) === "[object Object]"; } function code(value, len = 6) { return new RegExp(`^\\d{${len}}$`).test(value); } function func(value) { return typeof value === "function"; } function promise(value) { return object(value) && func(value.then) && func(value.catch); } function image(value) { const newValue = value.split("?")[0]; const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; return IMAGE_REGEXP.test(newValue); } function video(value) { const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|m3u8)/i; return VIDEO_REGEXP.test(value); } function regExp(o2) { return o2 && Object.prototype.toString.call(o2) === "[object RegExp]"; } const test = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, amount, array, carNo, chinese, code, contains, date, dateISO, digits, email, empty, enOrNum, func, idCard, image, jsonString, landline, letter, mobile, number, object, promise, range: range$1, rangeLength, regExp, string, url, video }, Symbol.toStringTag, { value: "Module" })); 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/uv-ui-tools/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(...nums) { if (nums.length > 2) { return iteratorOperation(nums, times); } 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(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(num, base))), base); if (num < 0 && result !== 0) { result = times(result, -1); } return result; } function range(min = 0, max = 0, value = 0) { return Math.max(min, Math.min(max, Number(value))); } function getPx(value, unit = false) { if (number(value)) { return unit ? `${value}px` : Number(value); } if (/(rpx|upx)$/.test(value)) { return unit ? `${uni.upx2px(parseInt(value))}px` : Number(uni.upx2px(parseInt(value))); } return unit ? `${parseInt(value)}px` : parseInt(value); } function sleep(value = 30) { return new Promise((resolve) => { setTimeout(() => { resolve(); }, value); }); } function os$1() { return uni.getSystemInfoSync().platform.toLowerCase(); } function sys() { return uni.getSystemInfoSync(); } 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(name = void 0) { let parent = this.$parent; while (parent) { if (parent.$options && parent.$options.name !== name) { 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 = ""; for (const i2 in customStyle) { const key = i2.replace(/([A-Z])/g, "-$1").toLowerCase(); string2 += `${key}:${customStyle[i2]};`; } return trim(string2); } function addUnit(value = "auto", unit = ((_b) => (_b = ((_a) => (_a = uni == null ? void 0 : uni.$uv) == null ? void 0 : _a.config)()) == null ? void 0 : _b.unit)() ? ((_d) => (_d = ((_c) => (_c = uni == null ? void 0 : uni.$uv) == null ? void 0 : _c.config)()) == null ? void 0 : _d.unit)() : "px") { value = String(value); return number(value) ? `${value}${unit}` : value; } function deepClone(obj, cache = /* @__PURE__ */ new WeakMap()) { if (obj === null || typeof obj !== "object") return obj; if (cache.has(obj)) return cache.get(obj); let clone; if (obj instanceof Date) { clone = new Date(obj.getTime()); } else if (obj instanceof RegExp) { clone = new RegExp(obj); } else if (obj instanceof Map) { clone = new Map(Array.from(obj, ([key, value]) => [key, deepClone(value, cache)])); } else if (obj instanceof Set) { clone = new Set(Array.from(obj, (value) => deepClone(value, cache))); } else if (Array.isArray(obj)) { clone = obj.map((value) => deepClone(value, cache)); } else if (Object.prototype.toString.call(obj) === "[object Object]") { clone = Object.create(Object.getPrototypeOf(obj)); cache.set(obj, clone); for (const [key, value] of Object.entries(obj)) { clone[key] = deepClone(value, cache); } } else { clone = Object.assign({}, obj); } cache.set(obj, clone); return clone; } function deepMerge(target = {}, source = {}) { target = deepClone(target); if (typeof target !== "object" || target === null || typeof source !== "object" || source === null) return target; const merged = Array.isArray(target) ? target.slice() : Object.assign({}, target); for (const prop in source) { if (!source.hasOwnProperty(prop)) continue; const sourceValue = source[prop]; const targetValue = merged[prop]; if (sourceValue instanceof Date) { merged[prop] = new Date(sourceValue); } else if (sourceValue instanceof RegExp) { merged[prop] = new RegExp(sourceValue); } else if (sourceValue instanceof Map) { merged[prop] = new Map(sourceValue); } else if (sourceValue instanceof Set) { merged[prop] = new Set(sourceValue); } else if (typeof sourceValue === "object" && sourceValue !== null) { merged[prop] = deepMerge(targetValue, sourceValue); } else { merged[prop] = sourceValue; } } return merged; } function error(err) { { formatAppLog("error", "at uni_modules/uv-ui-tools/libs/function/index.js:250", `uvui提示:${err}`); } } function randomArray(array2 = []) { return array2.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 date2; if (!dateTime) { date2 = /* @__PURE__ */ new Date(); } else if (/^\d{10}$/.test(dateTime == null ? void 0 : dateTime.toString().trim())) { date2 = new Date(dateTime * 1e3); } else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) { date2 = new Date(Number(dateTime)); } else if (typeof dateTime === "string" && dateTime.includes("-") && !dateTime.includes("T")) { date2 = new Date(dateTime.replace(/-/g, "/")); } else { date2 = new Date(dateTime); } const timeSource = { "y": date2.getFullYear().toString(), // 年 "m": (date2.getMonth() + 1).toString().padStart(2, "0"), // 月 "d": date2.getDate().toString().padStart(2, "0"), // 日 "h": date2.getHours().toString().padStart(2, "0"), // 时 "M": date2.getMinutes().toString().padStart(2, "0"), // 分 "s": date2.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, format = "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 (format === false) { if (timer >= 2592e3 && timer < 365 * 86400) { tips = `${parseInt(timer / (86400 * 30))}个月前`; } else { tips = `${parseInt(timer / (86400 * 365))}年前`; } } else { tips = timeFormat(timestamp, format); } } 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 value = data[key]; if (["", void 0, null].indexOf(value) >= 0) { continue; } if (value.constructor === Array) { switch (arrayFormat) { case "indices": for (let i2 = 0; i2 < value.length; i2++) { _result.push(`${key}[${i2}]=${value[i2]}`); } break; case "brackets": value.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); break; case "repeat": value.forEach((_value) => { _result.push(`${key}=${_value}`); }); break; case "comma": let commaStr = ""; value.forEach((_value) => { commaStr += (commaStr ? "," : "") + _value; }); _result.push(`${key}=${commaStr}`); break; default: value.forEach((_value) => { _result.push(`${key}[]=${_value}`); }); } } else { _result.push(`${key}=${value}`); } } return _result.length ? prefix + _result.join("&") : ""; } function toast(title, duration = 2e3) { uni.showToast({ title: String(title), icon: "none", duration }); } function type2icon(type = "success", fill = false) { if (["primary", "info", "error", "warning", "success"].indexOf(type) == -1) type = "success"; let iconName = ""; switch (type) { 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(number2, decimals = 0, decimalPoint = ".", thousandsSeparator = ",") { number2 = `${number2}`.replace(/[^0-9+-Ee.]/g, ""); const n2 = !isFinite(+number2) ? 0 : +number2; 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(value, unit = true) { const valueNum = parseInt(value); if (unit) { if (/s$/.test(value)) return value; return value > 30 ? `${value}ms` : `${value}s`; } if (/ms$/.test(value)) return valueNum; if (/s$/.test(value)) return valueNum > 30 ? valueNum : valueNum * 1e3; return valueNum; } function padZero(value) { return `00${value}`.slice(-2); } function formValidate(instance, event) { const formItem = $parent.call(instance, "uv-form-item"); const form = $parent.call(instance, "uv-form"); if (formItem && form) { form.validateField(formItem.prop, () => { }, event); } } function getProperty(obj, key) { if (!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, value) { if (!obj) { return; } const inFn = function(_obj, keys, v2) { if (keys.length === 1) { _obj[keys[0]] = v2; return; } while (keys.length > 1) { const k = keys[0]; if (!_obj[k] || typeof _obj[k] !== "object") { _obj[k] = {}; } keys.shift(); inFn(_obj[k], keys, v2); } }; if (typeof key !== "string" || key === "") ; else if (key.indexOf(".") !== -1) { const keys = key.split("."); inFn(obj, keys, value); } else { obj[key] = value; } } function page() { var _a; const pages2 = getCurrentPages(); const route2 = (_a = pages2[pages2.length - 1]) == null ? void 0 : _a.route; return `/${route2 ? route2 : ""}`; } function pages$1() { const pages2 = getCurrentPages(); return pages2; } function getHistoryPage(back = 0) { const pages2 = getCurrentPages(); const len = pages2.length; return pages2[len - 1 + back]; } function setConfig({ props: props2 = {}, config: config2 = {}, color = {}, zIndex = {} }) { const { deepMerge: deepMerge2 } = uni.$uv; uni.$uv.config = deepMerge2(uni.$uv.config, config2); uni.$uv.props = deepMerge2(uni.$uv.props, props2); uni.$uv.color = deepMerge2(uni.$uv.color, color); uni.$uv.zIndex = deepMerge2(uni.$uv.zIndex, zIndex); } const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, $parent, addStyle, addUnit, deepClone, deepMerge, error, formValidate, getDuration, getHistoryPage, getProperty, getPx, guid, os: os$1, padZero, page, pages: pages$1, priceFormat, queryParams, random, randomArray, range, setConfig, setProperty, sleep, sys, timeFormat, timeFrom, toast, trim, type2icon }, Symbol.toStringTag, { value: "Module" })); class Router { constructor() { this.config = { type: "navigateTo", url: "", delta: 1, // navigateBack页面后退时,回退的层数 params: {}, // 传递的参数 animationType: "pop-in", // 窗口动画,只在APP有效 animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效 intercept: false, // 是否需要拦截 events: {} // 页面间通信接口,用于监听被打开页面发送到当前页面的数据。hbuilderx 2.8.9+ 开始支持。 }; this.route = this.route.bind(this); } // 判断url前面是否有"/",如果没有则加上,否则无法跳转 addRootPath(url2) { return url2[0] === "/" ? url2 : `/${url2}`; } // 整合路由参数 mixinParam(url2, params) { url2 = url2 && this.addRootPath(url2); let query = ""; if (/.*\/.*\?.*=.*/.test(url2)) { query = queryParams(params, false); return url2 += `&${query}`; } query = queryParams(params); return url2 += query; } // 对外的方法名称 async route(options = {}, params = {}) { let mergeConfig = {}; if (typeof options === "string") { mergeConfig.url = this.mixinParam(options, params); mergeConfig.type = "navigateTo"; } else { mergeConfig = deepMerge(this.config, options); mergeConfig.url = this.mixinParam(options.url, options.params); } if (mergeConfig.url === page()) return; if (params.intercept) { mergeConfig.intercept = params.intercept; } mergeConfig.params = params; mergeConfig = deepMerge(this.config, mergeConfig); if (typeof mergeConfig.intercept === "function") { const isNext = await new Promise((resolve, reject) => { mergeConfig.intercept(mergeConfig, resolve); }); isNext && this.openPage(mergeConfig); } else { this.openPage(mergeConfig); } } // 执行路由跳转 openPage(config2) { const { url: url2, type, delta, animationType, animationDuration, events } = config2; if (config2.type == "navigateTo" || config2.type == "to") { uni.navigateTo({ url: url2, animationType, animationDuration, events }); } 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; let timeout = null; function debounce(func2, wait = 500, immediate = false) { if (timeout !== null) clearTimeout(timeout); if (immediate) { const callNow = !timeout; timeout = setTimeout(() => { timeout = null; }, wait); if (callNow) typeof func2 === "function" && func2(); } else { timeout = setTimeout(() => { typeof func2 === "function" && func2(); }, wait); } } let flag; function throttle(func2, wait = 500, immediate = true) { if (immediate) { if (!flag) { flag = true; typeof func2 === "function" && func2(); setTimeout(() => { flag = false; }, wait); } } else if (!flag) { flag = true; setTimeout(() => { flag = false; typeof func2 === "function" && func2(); }, wait); } } const mixin = { // 定义每个组件都可能需要用到的外部样式以及类名 props: { // 每个组件都有的父组件传递的样式,可以为字符串或者对象形式 customStyle: { type: [Object, String], default: () => ({}) }, customClass: { type: String, default: "" }, // 跳转的页面路径 url: { type: String, default: "" }, // 页面跳转的类型 linkType: { type: String, default: "navigateTo" } }, data() { return {}; }, onLoad() { this.$uv.getRect = this.$uvGetRect; }, created() { this.$uv.getRect = this.$uvGetRect; }, computed: { $uv() { var _a, _b; return { ...index, test, route, debounce, throttle, unit: (_b = (_a = uni == null ? void 0 : uni.$uv) == null ? void 0 : _a.config) == null ? void 0 : _b.unit }; }, /** * 生成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(name, fixed, change) { const prefix = `uv-${name}--`; 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) { uni[this.linkType]({ url: url2 }); } }, // 查询节点信息 // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21) // 解决办法为在组件根部再套一个没有任何作用的view元素 $uvGetRect(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 = this.$uv.$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("uvOnReachBottom"); }, beforeDestroy() { if (this.parent && array(this.parent.children)) { const childrenList = this.parent.children; childrenList.map((child, index2) => { if (child === this) { childrenList.splice(index2, 1); } }); } }, // 兼容vue3 unmounted() { if (this.parent && array(this.parent.children)) { const childrenList = this.parent.children; childrenList.map((child, index2) => { if (child === this) { childrenList.splice(index2, 1); } }); } } }; const icons = { "uvicon-level": "e68f", "uvicon-checkbox-mark": "e659", "uvicon-folder": "e694", "uvicon-movie": "e67c", "uvicon-star-fill": "e61e", "uvicon-star": "e618", "uvicon-phone-fill": "e6ac", "uvicon-phone": "e6ba", "uvicon-apple-fill": "e635", "uvicon-backspace": "e64d", "uvicon-attach": "e640", "uvicon-empty-data": "e671", "uvicon-empty-address": "e68a", "uvicon-empty-favor": "e662", "uvicon-empty-car": "e657", "uvicon-empty-order": "e66b", "uvicon-empty-list": "e672", "uvicon-empty-search": "e677", "uvicon-empty-permission": "e67d", "uvicon-empty-news": "e67e", "uvicon-empty-history": "e685", "uvicon-empty-coupon": "e69b", "uvicon-empty-page": "e60e", "uvicon-empty-wifi-off": "e6cc", "uvicon-reload": "e627", "uvicon-order": "e695", "uvicon-server-man": "e601", "uvicon-search": "e632", "uvicon-more-dot-fill": "e66f", "uvicon-scan": "e631", "uvicon-map": "e665", "uvicon-map-fill": "e6a8", "uvicon-tags": "e621", "uvicon-tags-fill": "e613", "uvicon-eye": "e664", "uvicon-eye-fill": "e697", "uvicon-eye-off": "e69c", "uvicon-eye-off-outline": "e688", "uvicon-mic": "e66d", "uvicon-mic-off": "e691", "uvicon-calendar": "e65c", "uvicon-trash": "e623", "uvicon-trash-fill": "e6ce", "uvicon-play-left": "e6bf", "uvicon-play-right": "e6b3", "uvicon-minus": "e614", "uvicon-plus": "e625", "uvicon-info-circle": "e69f", "uvicon-info-circle-fill": "e6a7", "uvicon-question-circle": "e622", "uvicon-question-circle-fill": "e6bc", "uvicon-close": "e65a", "uvicon-checkmark": "e64a", "uvicon-checkmark-circle": "e643", "uvicon-checkmark-circle-fill": "e668", "uvicon-setting": "e602", "uvicon-setting-fill": "e6d0", "uvicon-heart": "e6a2", "uvicon-heart-fill": "e68b", "uvicon-camera": "e642", "uvicon-camera-fill": "e650", "uvicon-more-circle": "e69e", "uvicon-more-circle-fill": "e684", "uvicon-chat": "e656", "uvicon-chat-fill": "e63f", "uvicon-bag": "e647", "uvicon-error-circle": "e66e", "uvicon-error-circle-fill": "e655", "uvicon-close-circle": "e64e", "uvicon-close-circle-fill": "e666", "uvicon-share": "e629", "uvicon-share-fill": "e6bb", "uvicon-share-square": "e6c4", "uvicon-shopping-cart": "e6cb", "uvicon-shopping-cart-fill": "e630", "uvicon-bell": "e651", "uvicon-bell-fill": "e604", "uvicon-list": "e690", "uvicon-list-dot": "e6a9", "uvicon-zhifubao-circle-fill": "e617", "uvicon-weixin-circle-fill": "e6cd", "uvicon-weixin-fill": "e620", "uvicon-qq-fill": "e608", "uvicon-qq-circle-fill": "e6b9", "uvicon-moments-circel-fill": "e6c2", "uvicon-moments": "e6a0", "uvicon-car": "e64f", "uvicon-car-fill": "e648", "uvicon-warning-fill": "e6c7", "uvicon-warning": "e6c1", "uvicon-clock-fill": "e64b", "uvicon-clock": "e66c", "uvicon-edit-pen": "e65d", "uvicon-edit-pen-fill": "e679", "uvicon-email": "e673", "uvicon-email-fill": "e683", "uvicon-minus-circle": "e6a5", "uvicon-plus-circle": "e603", "uvicon-plus-circle-fill": "e611", "uvicon-file-text": "e687", "uvicon-file-text-fill": "e67f", "uvicon-pushpin": "e6d1", "uvicon-pushpin-fill": "e6b6", "uvicon-grid": "e68c", "uvicon-grid-fill": "e698", "uvicon-play-circle": "e6af", "uvicon-play-circle-fill": "e62a", "uvicon-pause-circle-fill": "e60c", "uvicon-pause": "e61c", "uvicon-pause-circle": "e696", "uvicon-gift-fill": "e6b0", "uvicon-gift": "e680", "uvicon-kefu-ermai": "e660", "uvicon-server-fill": "e610", "uvicon-coupon-fill": "e64c", "uvicon-coupon": "e65f", "uvicon-integral": "e693", "uvicon-integral-fill": "e6b1", "uvicon-home-fill": "e68e", "uvicon-home": "e67b", "uvicon-account": "e63a", "uvicon-account-fill": "e653", "uvicon-thumb-down-fill": "e628", "uvicon-thumb-down": "e60a", "uvicon-thumb-up": "e612", "uvicon-thumb-up-fill": "e62c", "uvicon-lock-fill": "e6a6", "uvicon-lock-open": "e68d", "uvicon-lock-opened-fill": "e6a1", "uvicon-lock": "e69d", "uvicon-red-packet": "e6c3", "uvicon-photo-fill": "e6b4", "uvicon-photo": "e60d", "uvicon-volume-off-fill": "e6c8", "uvicon-volume-off": "e6bd", "uvicon-volume-fill": "e624", "uvicon-volume": "e605", "uvicon-download": "e670", "uvicon-arrow-up-fill": "e636", "uvicon-arrow-down-fill": "e638", "uvicon-play-left-fill": "e6ae", "uvicon-play-right-fill": "e6ad", "uvicon-arrow-downward": "e634", "uvicon-arrow-leftward": "e63b", "uvicon-arrow-rightward": "e644", "uvicon-arrow-upward": "e641", "uvicon-arrow-down": "e63e", "uvicon-arrow-right": "e63c", "uvicon-arrow-left": "e646", "uvicon-arrow-up": "e633", "uvicon-skip-back-left": "e6c5", "uvicon-skip-forward-right": "e61f", "uvicon-arrow-left-double": "e637", "uvicon-man": "e675", "uvicon-woman": "e626", "uvicon-en": "e6b8", "uvicon-twitte": "e607", "uvicon-twitter-circle-fill": "e6cf" }; const props$4 = { props: { // 图标类名 name: { type: String, default: "" }, // 图标颜色,可接受主题色 color: { type: String, default: "#606266" }, // 字体大小,单位px size: { type: [String, Number], default: "16px" }, // 是否显示粗体 bold: { type: Boolean, default: false }, // 点击图标的时候传递事件出去的index(用于区分点击了哪一个) index: { type: [String, Number], default: null }, // 触摸图标时的类名 hoverClass: { type: String, default: "" }, // 自定义扩展前缀,方便用户扩展自己的图标库 customPrefix: { type: String, default: "uvicon" }, // 图标右边或者下面的文字 label: { type: [String, Number], default: "" }, // label的位置,只能右边或者下边 labelPos: { type: String, default: "right" }, // label的大小 labelSize: { type: [String, Number], default: "15px" }, // label的颜色 labelColor: { type: String, default: "#606266" }, // label与图标的距离 space: { type: [String, Number], default: "3px" }, // 图片的mode imgMode: { type: String, default: "aspectFit" }, // 用于显示图片小图标时,图片的宽度 width: { type: [String, Number], default: "" }, // 用于显示图片小图标时,图片的高度 height: { type: [String, Number], default: "" }, // 用于解决某些情况下,让图标垂直居中的用途 top: { type: [String, Number], default: 0 }, // 是否阻止事件传播 stop: { type: Boolean, default: false }, ...(_f = (_e2 = uni.$uv) == null ? void 0 : _e2.props) == null ? void 0 : _f.icon } }; const _sfc_main$7 = { name: "uv-icon", emits: ["click"], mixins: [mpMixin, mixin, props$4], data() { return { colorType: [ "primary", "success", "info", "error", "warning" ] }; }, computed: { uClasses() { let classes = []; classes.push(this.customPrefix); classes.push(this.customPrefix + "-" + this.name); if (this.color && this.colorType.includes(this.color)) classes.push("uv-icon__icon--" + this.color); return classes; }, iconStyle() { let style = {}; style = { fontSize: this.$uv.addUnit(this.size), lineHeight: this.$uv.addUnit(this.size), fontWeight: this.bold ? "bold" : "normal", // 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中 top: this.$uv.addUnit(this.top) }; if (this.color && !this.colorType.includes(this.color)) style.color = this.color; return style; }, // 判断传入的name属性,是否图片路径,只要带有"/"均认为是图片形式 isImg() { const isBase64 = this.name.indexOf("data:") > -1 && this.name.indexOf("base64") > -1; return this.name.indexOf("/") !== -1 || isBase64; }, imgStyle() { let style = {}; style.width = this.width ? this.$uv.addUnit(this.width) : this.$uv.addUnit(this.size); style.height = this.height ? this.$uv.addUnit(this.height) : this.$uv.addUnit(this.size); return style; }, // 通过图标名,查找对应的图标 icon() { const code2 = icons["uvicon-" + this.name]; return code2 ? unescape(`%u${code2}`) : ["uvicon"].indexOf(this.customPrefix) > -1 ? this.name : ""; } }, methods: { clickHandler(e2) { this.$emit("click", this.index); this.stop && this.preventEvent(e2); } } }; function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) { return vue.openBlock(), vue.createElementBlock( "view", { class: vue.normalizeClass(["uv-icon", ["uv-icon--" + _ctx.labelPos]]), onClick: _cache[0] || (_cache[0] = (...args) => $options.clickHandler && $options.clickHandler(...args)) }, [ $options.isImg ? (vue.openBlock(), vue.createElementBlock("image", { key: 0, class: "uv-icon__img", src: _ctx.name, mode: _ctx.imgMode, style: vue.normalizeStyle([$options.imgStyle, _ctx.$uv.addStyle(_ctx.customStyle)]) }, null, 12, ["src", "mode"])) : (vue.openBlock(), vue.createElementBlock("text", { key: 1, class: vue.normalizeClass(["uv-icon__icon", $options.uClasses]), style: vue.normalizeStyle([$options.iconStyle, _ctx.$uv.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: "uv-icon__label", style: vue.normalizeStyle({ color: _ctx.labelColor, fontSize: _ctx.$uv.addUnit(_ctx.labelSize), marginLeft: _ctx.labelPos == "right" ? _ctx.$uv.addUnit(_ctx.space) : 0, marginTop: _ctx.labelPos == "bottom" ? _ctx.$uv.addUnit(_ctx.space) : 0, marginRight: _ctx.labelPos == "left" ? _ctx.$uv.addUnit(_ctx.space) : 0, marginBottom: _ctx.labelPos == "top" ? _ctx.$uv.addUnit(_ctx.space) : 0 }) }, vue.toDisplayString(_ctx.label), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 2 /* CLASS */ ); } const __easycom_0$2 = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$5], ["__scopeId", "data-v-b7a6dd5d"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-icon/components/uv-icon/uv-icon.vue"]]); 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; } } const props$3 = { props: { // 是否显示组件 show: { type: Boolean, default: true }, // 颜色 color: { type: String, default: "#909193" }, // 提示文字颜色 textColor: { type: String, default: "#909193" }, // 文字和图标是否垂直排列 vertical: { type: Boolean, default: false }, // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 mode: { type: String, default: "spinner" }, // 图标大小,单位默认px size: { type: [String, Number], default: 24 }, // 文字大小 textSize: { type: [String, Number], default: 15 }, // 文字样式 textStyle: { type: Object, default() { return {}; } }, // 文字内容 text: { type: [String, Number], default: "" }, // 动画模式 https://www.runoob.com/cssref/css3-pr-animation-timing-function.html timingFunction: { type: String, default: "linear" }, // 动画执行周期时间 duration: { type: [String, Number], default: 1200 }, // mode=circle时的暗边颜色 inactiveColor: { type: String, default: "" }, ...(_h = (_g = uni.$uv) == null ? void 0 : _g.props) == null ? void 0 : _h.loadingIcon } }; const _sfc_main$6 = { name: "uv-loading-icon", mixins: [mpMixin, mixin, props$3], 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: { 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$4(_ctx, _cache, $props, $setup, $data, $options) { return _ctx.show ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uv-loading-icon", [_ctx.vertical && "uv-loading-icon--vertical"]]), style: vue.normalizeStyle([_ctx.$uv.addStyle(_ctx.customStyle)]) }, [ !$data.webviewHide ? (vue.openBlock(), vue.createElementBlock( "view", { key: 0, class: vue.normalizeClass(["uv-loading-icon__spinner", [`uv-loading-icon__spinner--${_ctx.mode}`]]), ref: "ani", style: vue.normalizeStyle({ color: _ctx.color, width: _ctx.$uv.addUnit(_ctx.size), height: _ctx.$uv.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: "uv-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: "uv-loading-icon__text", style: vue.normalizeStyle([{ fontSize: _ctx.$uv.addUnit(_ctx.textSize), color: _ctx.textColor }, _ctx.$uv.addStyle(_ctx.textStyle)]) }, vue.toDisplayString(_ctx.text), 5 /* TEXT, STYLE */ )) : vue.createCommentVNode("v-if", true) ], 6 /* CLASS, STYLE */ )) : vue.createCommentVNode("v-if", true); } const __easycom_0$1 = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$4], ["__scopeId", "data-v-29b619ea"], ["__file", "D:/WebstormProjects/oa-base/uni_modules/uv-loading-icon/components/uv-loading-icon/uv-loading-icon.vue"]]); const props$2 = { props: { // 是否细边框 hairline: { type: Boolean, default: true }, // 按钮的预置样式,info,primary,error,warning,success type: { type: String, default: "info" }, // 按钮尺寸,large,normal,small,mini size: { type: String, default: "normal" }, // 按钮形状,circle(两边为半圆),square(带圆角) shape: { type: String, default: "square" }, // 按钮是否镂空 plain: { type: Boolean, default: false }, // 是否禁止状态 disabled: { type: Boolean, default: false }, // 是否加载中 loading: { type: Boolean, default: false }, // 加载中提示文字 loadingText: { type: [String, Number], default: "" }, // 加载状态图标类型 loadingMode: { type: String, default: "spinner" }, // 加载图标大小 loadingSize: { type: [String, Number], default: 14 }, // 开放能力,具体请看uniapp稳定关于button组件部分说明 // https://uniapp.dcloud.io/component/button openType: { type: String, default: "" }, // 用于