This commit is contained in:
2026-01-05 12:47:14 +08:00
commit 1fc846fae3
1614 changed files with 162035 additions and 0 deletions

View File

@@ -0,0 +1 @@
{"version":3,"file":"config.js","sources":["api/config.ts"],"sourcesContent":["import { request } from './request';\r\n\r\n\r\n\r\n// 获取配置\r\nexport function fetchGetConfig() {\r\n\treturn request({\r\n\t\turl: '/config/get', // id : number\r\n\t});\r\n}\r\n\r\n\r\n// 设置配置\r\nexport function fetchSetConfig(data : {}) {\r\n\treturn request({\r\n\t\turl: '/config/set',\r\n\t\tdata: data,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\n\n// 设置价格规则\r\nexport function fetchSetPriceRules(data : {}) {\r\n\treturn request({\r\n\t\turl: '/config/setPriceRules',\r\n\t\tdata: data,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\n\n\n// 获取价格规则\r\nexport function fetchGetPriceRules() {\r\n\treturn request({\r\n\t\turl: '/config/getPriceRules', // id : number\r\n\t});\r\n}\r\n"],"names":["request"],"mappings":";;AAKO,SAAS,iBAAiB;AAChC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA;AAAA,EAAA,CACL;AACF;AAIO,SAAS,eAAe,MAAW;AACzC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,mBAAmB,MAAW;AAC7C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAIO,SAAS,qBAAqB;AACpC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA;AAAA,EAAA,CACL;AACF;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"control.js","sources":["api/control.ts"],"sourcesContent":["import { request } from \"./request\";\n// import { EditGoodsParams } from \"../types/contorl\";\n\n\n// 根据串号搜索列表\nexport function fetchGoodsListByGoodsNo(goods_no: string) {\n\treturn request({\n\t\turl: '/store.control/goodsListByGoodsNo',\n\t\tdata: {\n\t\t\tgoods_no: goods_no,\n\t\t},\n\t});\n}\n\n// 编辑商品\nexport function fetchControlEditGoods(form:{}) {\n\treturn request({\n\t\turl: '/store.control/editGoods',\n\t\tdata: form,\n\t\tmethod: 'POST'\n\t})\n} \n\n\n// 工作台商品详情\nexport function fetchControlGoodsDetail(id:number) {\n\treturn request({\n\t\turl: '/store.control/goodsDetail',\n\t\tdata: {id:id}\n\t})\n}\n\n// // 获取配件详情\n// export function fetchControlPartsGoodsDetail(id:number) {\n// \treturn request({\n// \t\turl: '/parts.goods/detail',\n// \t\tdata: {id:id}\n// \t})\n// }\n// // 获取配件所属机型-机型选项\n// export function fetchControlPartsProducts() {\n// \treturn request({\n// \t\turl: '/parts.goods/products',\n// \t\t// data: {id:id}\n// \t})\n// }\n// // 获取配件所属分类-分类选项\n// export function fetchControlPartsTypes() {\n// \treturn request({\n// \t\turl: '/parts.goods/types',\n// \t\t// data: {id:id}\n// \t})\n// }\n// // 获取配件所属分类的子类\n// export function fetchControlPartsDegree(id:number) {\n// \treturn request({\n// \t\turl: '/parts.goods/filterDegree',\n// \t\tdata: {type_id:id}\n// \t})\n// }\n\n// // 根据 分类 子类 机型 筛选配件\n// export function fetchControlPartsFilterGoods(params: {type_id: number;product_id?: number;degree_id?: number;}) {\n// // 验证必填参数\n// if (params.type_id === undefined || params.type_id === null) {\n// return Promise.reject(new Error('type_id 是必填参数'));\n// }\n// // 构建请求数据,只包含有值的字段\n// const requestData: Record<string, any> = {\n// type_id: params.type_id\n// };\n// if (params.product_id !== undefined && params.product_id !== null) {\n// requestData.product_id = params.product_id;\n// }\n// if (params.degree_id !== undefined && params.degree_id !== null) {\n// requestData.degree_id = params.degree_id;\n// }\n// return request({\n// url: '/parts.goods/filterGoods',\n// data: requestData\n// });\n// }\n\n\n// // 配件工作台-修改配件\n// export function editGoods(params:EditGoodsParams) {\n// \treturn request({\n// \t\turl: '/parts.goods/editGoods',\n// \t\tdata: params,\n// \t\tmethod: 'POST'\n// \t})\n// }"],"names":["request"],"mappings":";;AAeO,SAAS,sBAAsB,MAAS;AAC9C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAIO,SAAS,wBAAwB,IAAW;AAClD,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAC,GAAK;AAAA,EAAA,CACZ;AACF;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"goods.js","sources":["api/goods.ts"],"sourcesContent":["import { request } from './request';\r\n\r\n\n\n\n\n// 编辑商品\nexport function fetchGoodsEdit(form:{}) {\n\treturn request({\n\t\turl: '/goods/edit',\n\t\tdata: form,\n\t\tmethod: 'POST'\n\t})\n} \n\n\n// 商品详情\nexport function fetchGoodsDetail(id:number) {\n\treturn request({\n\t\turl: '/goods/detail',\n\t\tdata: {goods_id:id}\n\t})\n}\n\n\n\n\n\n// 新增商品\nexport function fetchGoodsAdd(form:{}) {\n\treturn request({\n\t\turl: '/goods/add',\n\t\tdata: form,\n\t\tmethod: 'POST'\n\t})\n} \n\n\n\n// 筛选\nexport function fetchFilterParmas(is_origin : number = 0) {\n\treturn request({\n\t\turl: '/goods/filterParams',\n\t\tdata: {\n\t\t\tis_origin: is_origin\n\t\t}\n\t})\n}\n\n\n// 管理端机器列表\nexport function fetchSysGoodsList(data : {}) {\n\treturn request({\n\t\turl: '/goods/list',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}\n\n\n// 首页机器列表\nexport function fetchGoodsList(data : {}) {\n\treturn request({\n\t\turl: '/goods/lists',\n\t\tdata: data,\n\t\tmethod: 'POST'\n\t});\n}"],"names":["request"],"mappings":";;AAOO,SAAS,eAAe,MAAS;AACvC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAIO,SAAS,iBAAiB,IAAW;AAC3C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAC,UAAS,GAAE;AAAA,EAAA,CAClB;AACF;AAOO,SAAS,cAAc,MAAS;AACtC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAKgB,SAAA,kBAAkB,YAAqB,GAAG;AACzD,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,MACL;AAAA,IACD;AAAA,EAAA,CACA;AACF;AAIO,SAAS,kBAAkB,MAAW;AAC5C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAIO,SAAS,eAAe,MAAW;AACzC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"house_goods.js","sources":["api/house_goods.ts"],"sourcesContent":["import { request } from './request';\nimport { houseRequest } from './house_request';\n\n// 仓库筛选\nexport function houseFetchFilterParmas(is_origin : number = 0) {\n\treturn houseRequest({\n\t\turl: '/store.goods/filterParams',\n\t\tdata: {\n\t\t\tis_origin: is_origin\n\t\t}\n\t})\n}\n\nexport interface goodsListParams {\n\tpage ?: string;\n\tpageSize ?: string;\n\tprice_sort ?: string;\n\tdegree_ids ?: string[]; // 新增的 ID 数组字段(假设是字符串数组)\n\tproduct_ids ?: string[];\n\tsearch ?: string;\n\ttype_id ?: number;\n\tbrand_id ?: number;\n\t[property : string] : any;\n}\n\n\n// 仓库机器列表\nexport function houseFetchGoodsList(filter : goodsListParams) {\n\treturn houseRequest({\n\t\turl: '/store.goods/lists',\n\t\tdata: filter,\n\t\tmethod: 'POST',\n\t});\n}\n\n\n// 仓库商品详情\nexport function houseFetchGoodsDetail(id : number) {\n\treturn houseRequest({\n\t\turl: '/store.goods/detail',\n\t\tdata: { id: id },\n\t});\n}\n\n// 获取购物车商品列表\nexport function houseFetchCartGoodsIds() {\n\treturn houseRequest({\n\t\turl: '/store.goods/cartGoodsIds',\n\t});\n}\n\n\n// 检测报告树\nexport function fetchGoodsReportTags () {\n\treturn houseRequest({\n\t\turl:'/store.goods/reportTags',\n\t})\n}\n\n\n\n\n\n// 添加购物车\nexport function fetchAddCart(goods_id : number) {\n\treturn request({\n\t\turl: '/store.goods/addCart',\n\t\tdata: { goods_id: goods_id },\n\t});\n}\n\n// 删除购物车\nexport function fetchDelCart(goods_id : number) {\n\treturn request({\n\t\turl: '/store.goods/delCart',\n\t\tdata: { goods_id: goods_id },\n\t});\n}\n\n// 获取购物车商品\nexport function fetchCartList() {\n\treturn request({\n\t\turl: '/store.goods/cartList',\n\t});\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// export interface PartsListParams {\n// \t/**\n// \t * 子类id\n// \t */\n// \tdegree_id ?: string;\n// \tpage ?: string;\n// \tpageSize ?: string;\n// \t/**\n// \t * 配件机型id\n// \t */\n// \tproduct_id ?: string;\n// \t/**\n// \t * 配件id\n// \t */\n// \ttype_id ?: string;\n// \t[property : string] : any;\n// }\n// export function fetcPartsList(filter : PartsListParams) {\n// \treturn request({\n// \t\turl: '/parts.goods/filtergoodslist',\n// \t\tdata: filter,\n// \t\tmethod: 'POST',\n// \t});\n// }\n\n// export function fetchPartsDetail(id: number) {\n// return request({\n// url: '/goods/detail',\n// data: { id: id },\n// });\n// }\n\n// export function addPartsCart(goods_id : number) {\n// \treturn request({\n// \t\turl: '/parts.cart/addCart',\n// \t\tdata: { goods_id },\n// \t});\n// }\n// export function incPartsCartNum(goods_id : number) {\n// \treturn request({\n// \t\turl: '/parts.cart/incNum',\n// \t\tdata: { goods_id },\n// \t});\n// }\n// export function decPartsCartNum(goods_id : number) {\n// \treturn request({\n// \t\turl: '/parts.cart/decNum',\n// \t\tdata: { goods_id },\n// \t});\n// }\n// export function setPartsCartNum(goods_id : number, quantity : number) {\n// \treturn request({\n// \t\turl: '/parts.cart/setNum',\n// \t\tdata: { goods_id, quantity },\n// \t});\n// }\n\n// export function delPartsCart(goods_id : number) {\n// \treturn request({\n// \t\turl: '/parts.cart/delCart',\n// \t\tdata: { goods_id },\n// \t});\n// }\n// export function fetchPartsCartList() {\n// \treturn request({\n// \t\turl: '/parts.cart/cartList',\n// \t});\n// }"],"names":["houseRequest"],"mappings":";;;AAIgB,SAAA,uBAAuB,YAAqB,GAAG;AAC9D,SAAOA,+BAAa;AAAA,IACnB,KAAK;AAAA,IACL,MAAM;AAAA,MACL;AAAA,IACD;AAAA,EAAA,CACA;AACF;AAgBO,SAAS,oBAAoB,QAA0B;AAC7D,SAAOA,+BAAa;AAAA,IACnB,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAIO,SAAS,sBAAsB,IAAa;AAClD,SAAOA,+BAAa;AAAA,IACnB,KAAK;AAAA,IACL,MAAM,EAAE,GAAO;AAAA,EAAA,CACf;AACF;AAGO,SAAS,yBAAyB;AACxC,SAAOA,+BAAa;AAAA,IACnB,KAAK;AAAA,EAAA,CACL;AACF;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"house_order.js","sources":["api/house_order.ts"],"sourcesContent":["import config from '@/config';\r\n\r\nimport { houseRequest } from \"./house_request\";\r\n\r\n// 保存远程收货地址\r\nexport function houseFetchUpdateAddress(form : {}) {\r\n\t// 设置默认参数\r\n\tconst defaultParams = {\r\n\t\tagent_id: config.wxapp_id,\r\n\t\taddress: {},\r\n\t};\r\n\tconsole.log(defaultParams);\r\n\tconsole.log(form);\r\n\tconst requestParams = {\r\n\t\t...defaultParams,\r\n\t\t...form\r\n\t};\r\n\treturn houseRequest({\r\n\t\turl: '/store.api/updateAddress',\r\n\t\tdata: requestParams,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\n\r\n\r\n// 仓库商品状态校验\r\nexport function houseFetchCheckGoods(form : {}) {\r\n\t// 设置默认参数\r\n\tconst defaultParams = {\r\n\t\tagent_id: config.wxapp_id,\r\n\t\tgoods_id: 0,\r\n\t};\r\n\tconsole.log(defaultParams);\r\n\tconsole.log(form);\r\n\tconst requestParams = {\r\n\t\t...defaultParams,\r\n\t\t...form\r\n\t};\r\n\treturn houseRequest({\r\n\t\turl: '/store.api/checkGoods',\r\n\t\tdata: requestParams,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\n\n\n// 仓库订单预览\r\nexport function houseFetchGoodsPreview(form : {}) {\r\n\t// 设置默认参数\r\n\tconst defaultParams = {\r\n\t\tagent_id: config.wxapp_id,\r\n\t\tgoods_id: 0,\r\n\t};\r\n\tconsole.log(defaultParams);\r\n\tconsole.log(form);\r\n\tconst requestParams = {\r\n\t\t...defaultParams,\r\n\t\t...form\r\n\t};\r\n\treturn houseRequest({\r\n\t\turl: '/store.api/preview',\r\n\t\tdata: requestParams,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\r\n\r\n\r\n\r\n// 订单下单\r\nexport function fetchOrderbuyNow(data : {}) {\r\n\treturn houseRequest({\r\n\t\turl: '/order/buyNow',\r\n\t\tdata: data,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\r\n\r\n\r\n\r\n// // 订单详情\r\n// export function fetchOrderDetail(id : Number) {\r\n// \treturn request({\r\n// \t\turl: '/order/detail',\r\n// \t\tdata: { id: id },\r\n// \t})\r\n// }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// // 订单统计\r\n// export function fetchOrderTotalCount() {\r\n// \treturn request({\r\n// \t\turl: '/order/totalCount'\r\n// \t})\r\n// }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// // 获取订单列表\r\n// interface orderListParams {\r\n// \tpage ?: number;\r\n// \tpageSize ?: number;\r\n// \tstatus ?: 'all' | 'payment' | 'delivery' | 'received' | 'finish';\r\n// \tgoods_no ?: string;\r\n// \t[key : string] : any; // 允许其他扩展参数\r\n// }\r\n\r\n// /**\r\n// * 获取订单列表\r\n// * @param params 请求参数对象\r\n// * @returns Promise\r\n// */\r\n// export function fetchOrderList(params : orderListParams = {}) {\r\n// \t// 设置默认参数\r\n// \tconst defaultParams = {\r\n// \t\tpage: 1,\r\n// \t\tpageSize: 10,\r\n// \t\tstatus: 'all',\r\n// \t\tgoods_no: '',\r\n// \t};\r\n\r\n// \tconst requestParams = {\r\n// \t\t...defaultParams,\r\n// \t\t...params\r\n// \t};\r\n// \treturn request({\r\n// \t\turl: '/order/getList',\r\n// \t\tmethod: 'GET', // 或 'POST' 根据实际需求\r\n// \t\tdata: requestParams\r\n// \t});\r\n// }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// // 取消订单\r\n// export function fetchCancelOrder(id : Number) {\r\n// \treturn request({\r\n// \t\turl: '/order/cancel',\r\n// \t\tdata: { id: id },\r\n// \t})\r\n// }\r\n\r\n// // 标记付款\r\n// export function fetchPayOrder(id : Number) {\r\n// \treturn request({\r\n// \t\turl: '/order/paid',\r\n// \t\tdata: { id: id },\r\n// \t})\r\n// }\r\n\r\n// // 标记发货\r\n// export function fetchDeliveryOrder(form : {}) {\r\n// \treturn request({\r\n// \t\turl: '/order/delivery',\r\n// \t\tdata: form,\r\n// \t\tmethod: 'POST'\r\n// \t})\r\n// }\r\n\r\n\r\n\r\n\r\n// // 确认收货\r\n// export function fetchReceiptOrder(id : Number) {\r\n// \treturn request({\r\n// \t\turl: '/order/receipt',\r\n// \t\tdata: { id: id },\r\n// \t})\r\n// }"],"names":["config","houseRequest"],"mappings":";;;;AAKO,SAAS,wBAAwB,MAAW;AAElD,QAAM,gBAAgB;AAAA,IACrB,UAAUA,OAAO,OAAA;AAAA,IACjB,SAAS,CAAC;AAAA,EAAA;+DAEC,aAAa;+DACb,IAAI;AAChB,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH,GAAG;AAAA,EAAA;AAEJ,SAAOC,+BAAa;AAAA,IACnB,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAIO,SAAS,qBAAqB,MAAW;AAE/C,QAAM,gBAAgB;AAAA,IACrB,UAAUD,OAAO,OAAA;AAAA,IACjB,UAAU;AAAA,EAAA;+DAEC,aAAa;+DACb,IAAI;AAChB,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH,GAAG;AAAA,EAAA;AAEJ,SAAOC,+BAAa;AAAA,IACnB,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAIO,SAAS,uBAAuB,MAAW;AAEjD,QAAM,gBAAgB;AAAA,IACrB,UAAUD,OAAO,OAAA;AAAA,IACjB,UAAU;AAAA,EAAA;+DAEC,aAAa;+DACb,IAAI;AAChB,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH,GAAG;AAAA,EAAA;AAEJ,SAAOC,+BAAa;AAAA,IACnB,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAKO,SAAS,iBAAiB,MAAW;AAC3C,SAAOA,+BAAa;AAAA,IACnB,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"house_request.js","sources":["api/house_request.ts"],"sourcesContent":["// 针对仓库的Api接口\n\n\n\nimport config from '@/config';\nimport { goToLoginPage } from '@/utils/helper';\n\n// 定义请求参数接口\ninterface Options {\n\turl : string; // 请求路径不包含基础URL\n\tmethod ?: 'GET' | 'POST'; // 请求方法默认为GET\n\tdata ?: any; // POST请求体数据\n\tparams ?: any; // GET请求参数与data二选一\n\tdataType ?: string; // 返回数据格式默认json\n\tresponseType ?: string; // 响应数据类型默认text\n}\n\n// 定义响应数据结构接口\ninterface Response {\n\tcode : number;\n\tmsg ?: string;\n\tdata : any;\n}\n\n// /**\n// * 获取图片上传的完整URL\n// * @returns {string} 完整的图片上传URL包含基础URL、wxapp_id和token参数\n// */\n// export const getUploadImageUrl = () => {\n// \treturn config.api_base_url + '/store.upload/image' + '&wxapp_id=10001&token=' + uni.getStorageSync('token');\n// };\n\n/**\n * 封装uni.request的通用请求方法\n * @param {Options} options 请求配置项\n * @returns {Promise} 返回Promise对象\n *\n * 功能说明:\n * 1. 自动拼接基础URL和认证参数\n * 2. 统一处理登录状态code=-1跳转登录页\n * 3. 统一处理错误提示code=0显示Toast\n * 4. 成功时返回data字段code=1\n */\nexport const houseRequest = (options : Options) => {\n\treturn new Promise((resolve, reject) => {\n\t\tuni.request({\n\t\t\t// 拼接完整请求URL基础URL + 路径 + 固定参数)\n\t\t\turl: config.house_api_base_url + options.url + '&wxapp_id=10001&token=' + uni.getStorageSync('token'),\n\n\t\t\tmethod: options.method || 'GET', // 默认GET方法\n\t\t\tdata: options.data || options.params || {}, // 兼容data/params传参\n\t\t\tdataType: options.dataType || 'json', // 默认json格式\n\t\t\tresponseType: options.responseType || 'text', // 默认text类型\n\n\t\t\t// 请求成功回调\n\t\t\tsuccess(res) {\n\t\t\t\tconst ret : Response = res.data;\n\t\t\t\t// console.log(ret);\n\n\t\t\t\t// 状态码处理\n\t\t\t\tswitch (ret.code) {\n\t\t\t\t\tcase -1: // 未登录状态\n\t\t\t\t\t\tgoToLoginPage();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1: // 成功状态\n\t\t\t\t\t\t// console.log(options.url);\n\t\t\t\t\t\t// if (options.url === '/parts.order/preview') {\n\t\t\t\t\t\t// \tconsole.log('ressss', ret);\n\t\t\t\t\t\t// \tresolve(ret);\n\t\t\t\t\t\t// \tbreak;\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tresolve(ret.data); // 返回data字段\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 0: // 失败状态\n\t\t\t\t\t\t// console.log(options.url);\n\t\t\t\t\t\t// if (options.url === '/parts.order/preview') {\n\t\t\t\t\t\t// \tconsole.log('ressss', ret);\n\t\t\t\t\t\t// \tresolve(ret);\n\t\t\t\t\t\t// \tbreak;\n\t\t\t\t\t\t// }\n\t\t\t\t\t\tuni.showToast({\n\t\t\t\t\t\t\ttitle: ret.msg || '操作失败', // 显示错误信息\n\t\t\t\t\t\t\ticon: 'none', // 不显示图标\n\t\t\t\t\t\t});\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// 请求失败回调\n\t\t\tfail(err) {\n\t\t\t\tuni.$emit('z-paging-error-emit');\n\t\t\t\treject(err); // 返回错误对象\n\t\t\t\tuni.showToast({\n\t\t\t\t\ttitle: '网络请求失败',\n\t\t\t\t\ticon: 'none',\n\t\t\t\t});\n\t\t\t},\n\t\t});\n\t});\n};"],"names":["uni","config","goToLoginPage"],"mappings":";;;;AA2Ca,MAAA,eAAe,CAAC,YAAsB;AAClD,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACvCA,kBAAAA,MAAI,QAAQ;AAAA;AAAA,MAEX,KAAKC,OAAAA,OAAO,qBAAqB,QAAQ,MAAM,2BAA2BD,cAAAA,MAAI,eAAe,OAAO;AAAA,MAEpG,QAAQ,QAAQ,UAAU;AAAA;AAAA,MAC1B,MAAM,QAAQ,QAAQ,QAAQ,UAAU,CAAC;AAAA;AAAA,MACzC,UAAU,QAAQ,YAAY;AAAA;AAAA,MAC9B,cAAc,QAAQ,gBAAgB;AAAA;AAAA;AAAA,MAGtC,QAAQ,KAAK;AACZ,cAAM,MAAiB,IAAI;AAI3B,gBAAQ,IAAI,MAAM;AAAA,UACjB,KAAK;AACUE,yBAAAA;AACd;AAAA,UACD,KAAK;AAOJ,oBAAQ,IAAI,IAAI;AAChB;AAAA,UACD,KAAK;AAOJF,0BAAAA,MAAI,UAAU;AAAA,cACb,OAAO,IAAI,OAAO;AAAA;AAAA,cAClB,MAAM;AAAA;AAAA,YAAA,CACN;AACD;AAAA,QACF;AAAA,MACD;AAAA;AAAA,MAGA,KAAK,KAAK;AACTA,4BAAI,MAAM,qBAAqB;AAC/B,eAAO,GAAG;AACVA,sBAAAA,MAAI,UAAU;AAAA,UACb,OAAO;AAAA,UACP,MAAM;AAAA,QAAA,CACN;AAAA,MACF;AAAA,IAAA,CACA;AAAA,EAAA,CACD;AACF;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"order.js","sources":["api/order.ts"],"sourcesContent":["import { request } from \"./request\";\r\n\r\n\r\n\r\n// 订单预览\r\nexport function fetchOrderPreview(form : {}) {\r\n\treturn request({\r\n\t\turl: '/order/preview',\r\n\t\tdata: form,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\r\n\r\n\r\n// 订单下单\r\nexport function fetchOrderbuyNow(data : {}) {\r\n\treturn request({\r\n\t\turl: '/order/buyNow',\r\n\t\tdata: data,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\r\n\r\n\r\n\r\n// 订单详情\r\nexport function fetchOrderDetail(id : Number) {\r\n\treturn request({\r\n\t\turl: '/order/detail',\r\n\t\tdata: { id: id },\r\n\t})\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// 订单统计\r\nexport function fetchOrderTotalCount() {\r\n\treturn request({\r\n\t\turl: '/order/totalCount'\r\n\t})\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// 获取订单列表\r\ninterface orderListParams {\r\n\tpage ?: number;\r\n\tpageSize ?: number;\r\n\tstatus ?: 'all' | 'payment' | 'delivery' | 'received' | 'finish';\r\n\tgoods_no ?: string;\r\n\t[key : string] : any; // 允许其他扩展参数\r\n}\r\n\r\n/**\r\n * 获取订单列表\r\n * @param params 请求参数对象\r\n * @returns Promise\r\n */\r\nexport function fetchOrderList(params : orderListParams = {}) {\r\n\t// 设置默认参数\r\n\tconst defaultParams = {\r\n\t\tpage: 1,\r\n\t\tpageSize: 10,\r\n\t\tstatus: 'all',\r\n\t\tgoods_no: '',\r\n\t};\r\n\r\n\tconst requestParams = {\r\n\t\t...defaultParams,\r\n\t\t...params\r\n\t};\r\n\treturn request({\r\n\t\turl: '/order/getList',\r\n\t\tmethod: 'GET', // 或 'POST' 根据实际需求\r\n\t\tdata: requestParams\r\n\t});\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// 取消订单\r\nexport function fetchCancelOrder(id : Number) {\r\n\treturn request({\r\n\t\turl: '/order/cancel',\r\n\t\tdata: { id: id },\r\n\t})\r\n}\r\n\r\n// 标记付款\r\nexport function fetchPayOrder(id : Number) {\r\n\treturn request({\r\n\t\turl: '/order/paid',\r\n\t\tdata: { id: id },\r\n\t})\r\n}\r\n\r\n// 标记发货\r\nexport function fetchDeliveryOrder(form : {}) {\r\n\treturn request({\r\n\t\turl: '/order/delivery',\r\n\t\tdata: form,\r\n\t\tmethod: 'POST'\r\n\t})\r\n}\r\n\r\n\r\n\r\n\r\n// 确认收货\r\nexport function fetchReceiptOrder(id : Number) {\r\n\treturn request({\r\n\t\turl: '/order/receipt',\r\n\t\tdata: { id: id },\r\n\t})\r\n}"],"names":["request"],"mappings":";;AAKO,SAAS,kBAAkB,MAAW;AAC5C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAIO,SAAS,iBAAiB,MAAW;AAC3C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAKO,SAAS,iBAAiB,IAAa;AAC7C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAE,GAAO;AAAA,EAAA,CACf;AACF;AASO,SAAS,uBAAuB;AACtC,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,EAAA,CACL;AACF;AAuBgB,SAAA,eAAe,SAA2B,IAAI;AAE7D,QAAM,gBAAgB;AAAA,IACrB,MAAM;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,UAAU;AAAA,EAAA;AAGX,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH,GAAG;AAAA,EAAA;AAEJ,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,QAAQ;AAAA;AAAA,IACR,MAAM;AAAA,EAAA,CACN;AACF;AAUO,SAAS,iBAAiB,IAAa;AAC7C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAE,GAAO;AAAA,EAAA,CACf;AACF;AAGO,SAAS,cAAc,IAAa;AAC1C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAE,GAAO;AAAA,EAAA,CACf;AACF;AAGO,SAAS,mBAAmB,MAAW;AAC7C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA,CACR;AACF;AAMO,SAAS,kBAAkB,IAAa;AAC9C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM,EAAE,GAAO;AAAA,EAAA,CACf;AACF;;;;;;;;;;"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"user.js","sources":["api/user.ts"],"sourcesContent":["import { request } from \"./request\";\n\n// 用户登录\n\nexport function login(code : number, user_info : {}) {\n\treturn request({\n\t\turl: '/user/login',\n\t\tdata: {\n\t\t\tcode: code,\n\t\t\tuser_info: user_info\n\t\t},\n\t\tmethod: 'POST'\n\t})\n}\n\n// 获取用户信息\nexport function fetchUserInfo() {\n\treturn request({\n\t\turl: '/user/info'\n\t})\n}\n\n// 绑定手机号\nexport function fetchUserPhone(code:string) {\n\treturn request({\n\t\turl: '/store.user/bindPhone',\n\t\tdata: {\n\t\t\tcode: code,\n\t\t},\n\t})\n}"],"names":["request"],"mappings":";;AAIgB,SAAA,MAAM,MAAe,WAAgB;AACpD,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,MACL;AAAA,MACA;AAAA,IACD;AAAA,IACA,QAAQ;AAAA,EAAA,CACR;AACF;AAGO,SAAS,gBAAgB;AAC/B,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,EAAA,CACL;AACF;AAGO,SAAS,eAAe,MAAa;AAC3C,SAAOA,oBAAQ;AAAA,IACd,KAAK;AAAA,IACL,MAAM;AAAA,MACL;AAAA,IACD;AAAA,EAAA,CACA;AACF;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"app.js","sources":["App.vue","main.js"],"sourcesContent":["<script>\n\t// import {ShoppingCartType} from '@/common/constants';\n\texport default {\n\tonLaunch: function () {\n\t\t\t// const shoppingCartType = uni.getStorageSync('SHOPPING_CART_TYPE');\n\t\t\t// if (!shoppingCartType) {\n\t\t\t// \tuni.setStorageSync('SHOPPING_CART_TYPE', ShoppingCartType.PHONE)\n\t\t\t// }\n\n\t\t\t// uni.hideTabBar()\n\t\t\tconsole.log('App Launch')\n\t\t},\n\t\tonShow: function() {\n\t\t\t// uni.hideTabBar()\n\t\t\tconsole.log('App Show')\n\t\t},\n\t\tonHide: function() {\n\t\t\tconsole.log('App Hide')\n\t\t}\n\t}\n</script>\n\n<style lang=\"scss\">\n\t@import \"@/uni_modules/nutui-uni/styles/index.scss\";\n</style>\n","import App from './App'\n\n// #ifndef VUE3\nimport Vue from 'vue'\nimport './uni.promisify.adaptor'\nVue.config.productionTip = false\nApp.mpType = 'app'\nconst app = new Vue({\n ...App\n})\napp.$mount()\n// #endif\n\n// #ifdef VUE3\nimport { createSSRApp } from 'vue'\nexport function createApp() {\n const app = createSSRApp(App)\n return {\n app\n }\n}\n// #endif"],"names":["uni","createSSRApp","App"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEC,MAAK,YAAU;AAAA,EACf,UAAU,WAAY;AAOpBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,YAAY;AAAA,EACxB;AAAA,EACD,QAAQ,WAAW;AAElBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACtB;AAAA,EACD,QAAQ,WAAW;AAClBA,kBAAAA,MAAY,MAAA,OAAA,iBAAA,UAAU;AAAA,EACvB;AACD;ACJM,SAAS,YAAY;AAC1B,QAAM,MAAMC,cAAY,aAACC,SAAG;AAC5B,SAAO;AAAA,IACL;AAAA,EACD;AACH;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"assets.js","sources":["static/iconfont/parts-icon.svg"],"sourcesContent":["export default \"__VITE_ASSET__7adc675f__\""],"names":[],"mappings":";AAAA,MAAe,aAAA;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sources":["components/da-tree/utils.ts"],"sourcesContent":["/** 未选 */\nexport const unCheckedStatus = 0\n/** 半选 */\nexport const halfCheckedStatus = 1\n/** 选中 */\nexport const isCheckedStatus = 2\n\n/**\n * 深拷贝内容\n * @param originData 拷贝对象\n * @author crlang(https://crlang.com)\n */\nexport function deepClone(originData) {\n const type = Object.prototype.toString.call(originData)\n let data\n if (type === '[object Array]') {\n data = []\n for (let i = 0; i < originData.length; i++) {\n data.push(deepClone(originData[i]))\n }\n } else if (type === '[object Object]') {\n data = {}\n for (const prop in originData) {\n // eslint-disable-next-line no-prototype-builtins\n if (originData.hasOwnProperty(prop)) { // 非继承属性\n data[prop] = deepClone(originData[prop])\n }\n }\n } else {\n data = originData\n }\n return data\n}\n\n/**\n * 获取所有指定的节点\n * @param type\n * @param value\n * @author crlang(https://crlang.com)\n */\nexport function getAllNodes(list, type, value, packDisabledkey = true) {\n if (!list || list.length === 0) {\n return []\n }\n\n const res = []\n for (let i = 0; i < list.length; i++) {\n const item = list[i]\n if (item[type] === value) {\n if ((packDisabledkey && item.disabled) || !item.disabled) {\n res.push(item)\n }\n }\n }\n\n return res\n}\n\n/**\n * 获取所有指定的key值\n * @param type\n * @param value\n * @author crlang(https://crlang.com)\n */\nexport function getAllNodeKeys(list, type, value, packDisabledkey = true) {\n if (!list || list.length === 0) {\n return null\n }\n\n const res = []\n for (let i = 0; i < list.length; i++) {\n const item = list[i]\n if (item[type] === value) {\n if ((packDisabledkey && item.disabled) || !item.disabled) {\n res.push(item.key)\n }\n }\n }\n\n return res.length ? res : null\n}\n\n/**\n * 错误输出\n *\n * @param msg\n */\nexport function logError(msg, ...args) {\n console.error(`DaTree: ${msg}`, ...args)\n}\n\nconst toString = Object.prototype.toString\n\nexport function is(val, type) {\n return toString.call(val) === `[object ${type}]`\n}\n\n/**\n * 是否对象(Object)\n * @param val\n\n */\nexport function isObject(val) {\n return val !== null && is(val, 'Object')\n}\n\n/**\n * 是否数字(Number)\n * @param val\n\n */\nexport function isNumber(val) {\n return is(val, 'Number')\n}\n\n/**\n * 是否字符串(String)\n * @param val\n\n */\nexport function isString(val) {\n return is(val, 'String')\n}\n\n/**\n * 是否函数方法(Function)\n * @param val\n\n */\nexport function isFunction(val) {\n return typeof val === 'function'\n}\n\n/**\n * 是否布尔(Boolean)\n * @param val\n\n */\nexport function isBoolean(val) {\n return is(val, 'Boolean')\n}\n\n/**\n * 是否数组(Array)\n * @param val\n\n */\nexport function isArray(val) {\n return val && Array.isArray(val)\n}\n"],"names":["uni"],"mappings":";;AACO,MAAM,kBAAkB;AAExB,MAAM,oBAAoB;AAE1B,MAAM,kBAAkB;AAOxB,SAAS,UAAU,YAAY;AACpC,QAAM,OAAO,OAAO,UAAU,SAAS,KAAK,UAAU;AAClD,MAAA;AACJ,MAAI,SAAS,kBAAkB;AAC7B,WAAO,CAAA;AACP,aAAS,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;AAC1C,WAAK,KAAK,UAAU,WAAW,CAAC,CAAC,CAAC;AAAA,IACpC;AAAA,EAAA,WACS,SAAS,mBAAmB;AACrC,WAAO,CAAA;AACP,eAAW,QAAQ,YAAY;AAEzB,UAAA,WAAW,eAAe,IAAI,GAAG;AACnC,aAAK,IAAI,IAAI,UAAU,WAAW,IAAI,CAAC;AAAA,MACzC;AAAA,IACF;AAAA,EAAA,OACK;AACE,WAAA;AAAA,EACT;AACO,SAAA;AACT;AAQO,SAAS,YAAY,MAAM,MAAM,OAAO,kBAAkB,MAAM;AACrE,MAAI,CAAC,QAAQ,KAAK,WAAW,GAAG;AAC9B,WAAO;EACT;AAEA,QAAM,MAAM,CAAA;AACZ,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AAC9B,UAAA,OAAO,KAAK,CAAC;AACf,QAAA,KAAK,IAAI,MAAM,OAAO;AACxB,UAAK,mBAAmB,KAAK,YAAa,CAAC,KAAK,UAAU;AACxD,YAAI,KAAK,IAAI;AAAA,MACf;AAAA,IACF;AAAA,EACF;AAEO,SAAA;AACT;AAQO,SAAS,eAAe,MAAM,MAAM,OAAO,kBAAkB,MAAM;AACxE,MAAI,CAAC,QAAQ,KAAK,WAAW,GAAG;AACvB,WAAA;AAAA,EACT;AAEA,QAAM,MAAM,CAAA;AACZ,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AAC9B,UAAA,OAAO,KAAK,CAAC;AACf,QAAA,KAAK,IAAI,MAAM,OAAO;AACxB,UAAK,mBAAmB,KAAK,YAAa,CAAC,KAAK,UAAU;AACpD,YAAA,KAAK,KAAK,GAAG;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AAEO,SAAA,IAAI,SAAS,MAAM;AAC5B;AAOgB,SAAA,SAAS,QAAQ,MAAM;AACrCA,sBAAc,MAAA,SAAA,qCAAA,WAAW,GAAG,IAAI,GAAG,IAAI;AACzC;AAEA,MAAM,WAAW,OAAO,UAAU;AAElB,SAAA,GAAG,KAAK,MAAM;AAC5B,SAAO,SAAS,KAAK,GAAG,MAAM,WAAW,IAAI;AAC/C;AAgBO,SAAS,SAAS,KAAK;AACrB,SAAA,GAAG,KAAK,QAAQ;AACzB;AAOO,SAAS,SAAS,KAAK;AACrB,SAAA,GAAG,KAAK,QAAQ;AACzB;AAOO,SAAS,WAAW,KAAK;AAC9B,SAAO,OAAO,QAAQ;AACxB;AAgBO,SAAS,QAAQ,KAAK;AACpB,SAAA,OAAO,MAAM,QAAQ,GAAG;AACjC;;;;;;;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["components/index-custom-navigationbar/index.vue","/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/components/index-custom-navigationbar/index.vue?type=component"],"sourcesContent":["<template>\n\t<view class=\"navbar\">\n\t\t<view class=\"navbar-fixed\">\n\t\t\t<!-- 状态栏占位 -->\n\t\t\t<view :style=\"{height: props.statusBarHeight+'px'}\"></view>\n\t\t\t<!-- 导航栏内容 -->\n\t\t\t<view class=\"navbar-content\" :style=\"{height:props.navbarHeight+'px',width:props.windowWidth+'px'}\">\n\t\t\t\t<view class=\"header\">\n\t\t\t\t\t<view class=\"company-name\">{{title}}</view>\n\t\t\t\t\t<nut-animate type=\"flicker\" :loop=\"true\">\n\t\t\t\t\t\t<view class=\"description\">{{desc}}</view>\n\t\t\t\t\t</nut-animate>\n\t\t\t\t</view>\n\t\t\t</view>\n\t\t\t<!-- \t\t<nut-searchbar clearable v-model=\"search_val\" background=\"transparent\" input-background=\"#fff\"\n\t\t\t\t@search=\"onSearch\" @clear=\"onClear\">\n\t\t\t\t<template #rightout>\n\t\t\t\t\t<nut-icon @click=\"onScan\" name=\"scan2\" custom-color=\"#ffffff\" />\n\t\t\t\t</template>\n\t\t\t</nut-searchbar> -->\n\t\t</view>\n\t\t<!-- 占位状态栏+导航栏的高度,使下面的内容不会被遮挡 -->\n\t\t<view :style=\"{height:(statusBarHeight + navbarHeight+ navbarSearchBoxHeight)+'px'}\"></view>\n\t</view>\n</template>\n\n\n<script setup>\n\timport {\n\t\tref,\n\t\tdefineProps\n\t} from 'vue';\n\t// import {\n\t// \tfetchGoodsList\n\t// } from '../../api/goods';\n\timport {\n\t\tnavigateTo\n\t} from '@/utils/helper';\n\n\t// const navbarSearchBoxHeight = 50\n\tconst navbarSearchBoxHeight = 0\n\tconst props = defineProps({\n\t\tstatusBarHeight: Number,\n\t\twindowWidth: Number,\n\t\tnavbarHeight: Number,\n\t\ttitle:String,\n\t\tdesc:String,\n\t\t// onIndexPageSearch:Function,\n\t\t// onIndexPageClear:Function\n\t})\n\t\n\t\n\t\n\t// const search_val = ref('')\n\t// const onSearch = () => {\n\t// \tif(props.onIndexPageSearch) {\n\t// \t\tprops.onIndexPageSearch(search_val.value)\n\t// \t}\n\t// }\n\t// const onClear = () => {\n\t// \tif(props.onIndexPageClear) {\n\t// \t\tprops.onIndexPageClear()\n\t// \t}\n\n\t// }\n\t// const onScan =() => {\n\t// \tuni.scanCode({\n\t// \t\tonlyFromCamera:true,\n\t// \t\tsuccess: (res) => {\n\t// \t\t\tfetchGoodsList({\n\t// \t\t\t\tsearch_params: {goods_no:res.result}\n\t// \t\t\t}).then(res => {\n\t// \t\t\t\tif (res.list.total >= 1) {\n\t// \t\t\t\t\tnavigateTo(\"/pages/mall/item/index?id=\" + res.list?.data[0]?.goods_id)\n\t// \t\t\t\t} else {\n\t// \t\t\t\t\tuni.showToast({\n\t// \t\t\t\t\t\ticon:'none',\n\t// \t\t\t\t\t\ttitle:'暂无该商品'\n\t// \t\t\t\t\t})\n\t// \t\t\t\t}\n\t// \t\t\t})\n\t// \t\t},\n\t// \t\tfail: () => {\n\t// \t\t\tuni.showToast({\n\t// \t\t\t\ticon:'none',\n\t// \t\t\t\ttitle:'扫码失败'\n\t// \t\t\t})\n\t// \t\t}\n\t// \t})\n\t// }\n</script>\n\n<style scoped lang=\"scss\">\n\t.navbar {}\n\n\t.navbar-fixed {\n\t\t/* // 固定定位 */\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tz-index: 999;\n\t\twidth: 100%;\n\t\t/* background: linear-gradient(90deg, #b79dff, #f2a4ff); */\n\t\t/* 渐变背景 */\n\t\tbackground-image: -webkit-linear-gradient(60deg, rgba(233, 100, 67, 1), rgba(198, 77, 255, 1));\n\t\tbackground-image: linear-gradient(30deg, rgba(233, 100, 67, 1), rgba(198, 77, 255, 1));\n\t\tbackground-position: 0 0;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-size: 100% auto;\n\t\topacity: 1;\n\t\t/* 确保背景不透明 */\n\t}\n\n\t.navbar-content {\n\t\tdisplay: flex;\n\t\tflex-flow: column;\n\n\t\t/* // 水平居中 */\n\t\tjustify-content: center;\n\t\t/* // 垂直居中 */\n\t\t/* // align-items: center; */\n\t\tpadding: 0 30rpx;\n\t\t/* // 盒内显示 (父元素和子元素宽度都是100%,但是父元素加了左右内填充,会导致子元素不在父元素内) */\n\t\tbox-sizing: border-box;\n\t}\n\n\t.company-name {\n\t\tfont-family: Akrobat ExtraBold !important;\n\t\tcolor: #fff;\n\t\tfont-size: 24rpx;\n\t\tfont-weight: 700\n\t}\n\n\t.description {\n\t\tfont-family: Akrobat ExtraBold !important;\n\t\tcolor: #fff;\n\t\tfont-size: 16rpx\n\t}\n</style>","import Component from '/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/components/index-custom-navigationbar/index.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;;;;;;;;;AAwCC,MAAM,wBAAwB;;;;;;;;;;;;;AAC9B,UAAM,QAAQ;;;;;;;;;;;;;;;;;;ACxCf,GAAG,gBAAgB,SAAS;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"config.js","sources":["config.ts"],"sourcesContent":["export default {\r\n\r\n\t// 系统名称\r\n\tname: \"云淘机\",\r\n\r\n\t/**\r\n\t * 后端api地址 (必填; 斜杠/结尾; 请确保能访问)\r\n\t * 例如: https://www.你的域名.com/index.php?s=/api/\r\n\t */\r\n\tapi_base_url: \"https://phone.19year.cn/index.php?s=/api\",\r\n\r\n\t/**\r\n\t * 仓库地址\r\n\t * 例如: https://www.你的域名.com/index.php?s=/api/\r\n\t */\r\n\thouse_api_base_url: \"https://newtel.19year.cn/index.php?s=/api\",\r\n\r\n\t/**\r\n\t * 是否启用商城设置缓存\r\n\t * 将减少用户端重复请求; 正式运营时请设为true, 开启后商城设置同步前端需10分钟缓存\r\n\t */\r\n\tenabledSettingCache: true,\r\n\r\n\r\n\t/**\r\n\t * 分销编号\r\n\t */\r\n\twxapp_id: 10001,\n\t\n\t/**\r\n\t * 代理商ID\r\n\t */\n\tagent_no: 10000001\r\n\r\n}"],"names":[],"mappings":";AAAA,MAAe,SAAA;AAAA;AAAA,EAGd,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAMN,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA,EAMd,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB,qBAAqB;AAAA;AAAA;AAAA;AAAA,EAMrB,UAAU;AAAA;AAAA;AAAA;AAAA,EAKV,UAAU;AAEX;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"form.js","sources":["uni_modules/nutui-uni/components/form/form.ts"],"sourcesContent":["import { computed } from 'vue'\nimport type { ExtractPropTypes, Ref } from 'vue'\nimport { useInject } from '../_hooks'\nimport { commonProps, makeObjectProp, makeStringProp } from '../_utils'\nimport type { ErrorMessage, FormLabelPosition, FormRules, FormStarPosition } from './types'\n\nexport const FORM_KEY = Symbol('Form')\n\nexport const formProps = {\n ...commonProps,\n /**\n * @description 表单数据对象(使用表单校验时_必填_)\n */\n modelValue: makeObjectProp({}),\n\n /**\n * @description 统一配置每个 `FormItem` 的 `rules`\n */\n rules: makeObjectProp<FormRules>({}),\n /**\n * @description 禁用表单下的所有数据录入组件\n */\n disabled: Boolean,\n /**\n * @description 表单项 label 的位置\n */\n labelPosition: makeStringProp<FormLabelPosition>('left'),\n /**\n * @description 必填表单项 label 的红色星标位置\n */\n starPosition: makeStringProp<FormStarPosition>('left'),\n}\n\nexport type FormProps = ExtractPropTypes<typeof formProps>\n\nexport const formEmits = {\n validate: (msg: ErrorMessage) => msg instanceof Object,\n}\n\nexport type FormEmits = typeof formEmits\n\nexport function useFormDisabled(disabled: Ref<boolean | undefined>) {\n const { parent } = useInject<{ props: { disabled: boolean } }>(FORM_KEY)\n\n return computed(() => {\n if (disabled.value != null)\n return disabled.value\n\n if (parent?.props.disabled != null)\n return parent.props.disabled\n\n return false\n })\n}\n"],"names":["commonProps","makeObjectProp","makeStringProp","useInject","computed"],"mappings":";;;;;AAMa,MAAA,WAAW,OAAO,MAAM;AAE9B,MAAM,YAAY;AAAA,EACvB,GAAGA,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIH,YAAYC,6CAAe,eAAA,EAAE;AAAA;AAAA;AAAA;AAAA,EAK7B,OAAOA,6CAA0B,eAAA,EAAE;AAAA;AAAA;AAAA;AAAA,EAInC,UAAU;AAAA;AAAA;AAAA;AAAA,EAIV,eAAeC,4DAAkC,MAAM;AAAA;AAAA;AAAA;AAAA,EAIvD,cAAcA,4DAAiC,MAAM;AACvD;AAIO,MAAM,YAAY;AAAA,EACvB,UAAU,CAAC,QAAsB,eAAe;AAClD;AAIO,SAAS,gBAAgB,UAAoC;AAClE,QAAM,EAAE,OAAA,IAAWC,iDAAA,UAA4C,QAAQ;AAEvE,SAAOC,uBAAS,MAAM;AACpB,QAAI,SAAS,SAAS;AACpB,aAAO,SAAS;AAEd,SAAA,iCAAQ,MAAM,aAAY;AAC5B,aAAO,OAAO,MAAM;AAEf,WAAA;AAAA,EAAA,CACR;AACH;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"menu.js","sources":["uni_modules/nutui-uni/components/menu/menu.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { commonProps, makeNumberProp, makeStringProp, truthProp } from '../_utils'\n\nexport const MENU_KEY = Symbol('nut-menu')\n\nexport const menuProps = {\n ...commonProps,\n /**\n * @description 选项的选中态图标颜色\n */\n activeColor: makeStringProp(''),\n /**\n * @description 是否显示遮罩\n */\n overlay: truthProp,\n /**\n * @description 是否锁定滚动\n */\n lockScroll: truthProp,\n /**\n * @description 动画时长\n */\n duration: {\n type: [Number, String],\n default: 300,\n },\n /**\n * @description 标题图标\n */\n titleIcon: String,\n /**\n * @description 是否在点击遮罩层后关闭菜单\n */\n closeOnClickOverlay: truthProp,\n /**\n * @description 展开方向\n */\n direction: makeStringProp<'down' | 'up'>('down'),\n /**\n * @description 滚动后是否固定,可设置固定位置(需要配合 `scrollTop` 使用)\n */\n scrollFixed: {\n type: [Boolean, String, Number],\n default: false,\n },\n /**\n * @description 页面的滚动距离,通过 `onPageScroll` 获取\n */\n scrollTop: makeNumberProp(0),\n /**\n * @description 标题样式类名\n */\n titleClass: [String],\n /**\n * @description 收起的图标\n */\n upIcon: makeStringProp('rect-up'),\n /**\n * @description 展开时的图标\n */\n downIcon: makeStringProp('rect-down'),\n offset: Number,\n}\n\nexport type MenuProps = ExtractPropTypes<typeof menuProps>\n"],"names":["commonProps","makeStringProp","truthProp","makeNumberProp"],"mappings":";;;;AAGa,MAAA,WAAW,OAAO,UAAU;AAElC,MAAM,YAAY;AAAA,EACvB,GAAGA,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIH,aAAaC,4DAAe,EAAE;AAAA;AAAA;AAAA;AAAA,EAI9B,SAASC,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIT,YAAYA,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIZ,UAAU;AAAA,IACR,MAAM,CAAC,QAAQ,MAAM;AAAA,IACrB,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAIA,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,qBAAqBA,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIrB,WAAWD,4DAA8B,MAAM;AAAA;AAAA;AAAA;AAAA,EAI/C,aAAa;AAAA,IACX,MAAM,CAAC,SAAS,QAAQ,MAAM;AAAA,IAC9B,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAIA,WAAWE,4DAAe,CAAC;AAAA;AAAA;AAAA;AAAA,EAI3B,YAAY,CAAC,MAAM;AAAA;AAAA;AAAA;AAAA,EAInB,QAAQF,4DAAe,SAAS;AAAA;AAAA;AAAA;AAAA,EAIhC,UAAUA,4DAAe,WAAW;AAAA,EACpC,QAAQ;AACV;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["pages/login/index.vue","pages/login/index.vue?type=page"],"sourcesContent":["<template>\n\t<view class=\"content\">\n\t\t<view class=\"avatar\">\n\t\t\t<nut-avatar size=\"80\">\n\t\t\t\t<nut-icon size=\"30\" name=\"my\" />\n\t\t\t</nut-avatar>\n\t\t</view>\n\t\t<view class=\"divider\">\n\t\t</view>\n\t</view>\n\n\t<view class=\"tip-infos\">\n\t\t<text>申请获取以下权限</text>\n\t\t<text>获得你的公开信息(昵称、头像等)</text>\n\t</view>\n\t<view class=\"authorize-btn-inner\">\n\t\t<nut-button type=\"success\" size=\"large\" open-type=\"getUserInfo\" @getuserinfo=\"getUserInfo\">授权登录</nut-button>\n\t</view>\n\t<view class=\"authorize-btn-inner\">\n\t\t<nut-button type=\"danger\" size=\"large\" @click=\"switchTab('/pages/index/index')\">暂不登录</nut-button>\n\t</view>\n</template>\n\n<script setup>\n\timport {\n\t\tonMounted,\n\t\tref\n\t} from 'vue';\n\timport {\n\t\tlogin\n\t} from '@/api/user';\n\timport {\n\t\tonLoad\n\t} from '@dcloudio/uni-app'\n\timport {\n\t\tnavigateTo,\n\t\tswitchTab\n\t} from '@/utils/helper';\n\tconst code = ref('')\n\tconst redirect_url = ref('')\n\tonLoad((options) => {\n\t\tredirect_url.value = options.redirect_url\n\t})\n\tonMounted(() => {\n\t\tuni.login({\n\t\t\tprovider: \"weixin\",\n\t\t\tsuccess(res) {\n\t\t\t\tif (res.errMsg === 'login:ok') {\n\t\t\t\t\tcode.value = res.code\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t})\n\tconst getUserInfo = (res) => {\n\t\tif (code.value === '') {\n\t\t\tuni.showToast({\n\t\t\t\ticon: 'none',\n\t\t\t\ttitle: '请稍后再试'\n\t\t\t})\n\t\t\treturn;\n\t\t}\n\t\tlogin(code.value, JSON.stringify(res.detail.userInfo)).then(res => {\n\t\t\tconsole.log(res);\n\t\t\tuni.setStorageSync('token', res.token)\n\t\t\tuni.setStorageSync('uid', res.user_id)\n\t\t\tif(res.is_bind_phone){\n\t\t\t\tnavigateTo('/pages/login/phoneAuthorization');\n\t\t\t\treturn\n\t\t\t}\n\t\t\tuni.showToast({\n\t\t\t\ttitle: '授权成功',\n\t\t\t\ticon: 'none'\n\t\t\t})\n\t\t\tif (redirect_url.value !== 'undefined') {\n\t\t\t\tnavigateTo(redirect_url.value)\n\t\t\t} else {\n\t\t\t\tuni.navigateBack()\n\t\t\t}\n\t\t})\n\t}\n</script>\n\n<style scoped lang=\"scss\">\n\t.divider {\n\t\theight: 1px;\n\t\tbackground: #eee;\n\t\twidth: 100%;\n\t}\n\n\t.content {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tflex-direction: column;\n\t\tpadding: 25px 15px;\n\t\talign-items: center;\n\t\tgap: 20px;\n\t}\n\n\t.tip-infos {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: flex-start;\n\t\tpadding: 10px 25px;\n\t\tgap: 10px;\n\n\t\ttext:nth-child(2) {\n\t\t\tfont-size: 15px;\n\t\t\tcolor: #666;\n\t\t}\n\t}\n\n\t.authorize-btn-inner {\n\t\tpadding: 15px;\n\t}\n</style>","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/pages/login/index.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","onLoad","onMounted","uni","login","res","navigateTo"],"mappings":";;;;;;;;;;;;;;;;;;;AAsCC,UAAM,OAAOA,cAAG,IAAC,EAAE;AACnB,UAAM,eAAeA,cAAG,IAAC,EAAE;AAC3BC,kBAAM,OAAC,CAAC,YAAY;AACnB,mBAAa,QAAQ,QAAQ;AAAA,IAC/B,CAAE;AACDC,kBAAAA,UAAU,MAAM;AACfC,oBAAAA,MAAI,MAAM;AAAA,QACT,UAAU;AAAA,QACV,QAAQ,KAAK;AACZ,cAAI,IAAI,WAAW,YAAY;AAC9B,iBAAK,QAAQ,IAAI;AAAA,UACjB;AAAA,QACD;AAAA,MACJ,CAAG;AAAA,IACH,CAAE;AACD,UAAM,cAAc,CAAC,QAAQ;AAC5B,UAAI,KAAK,UAAU,IAAI;AACtBA,sBAAAA,MAAI,UAAU;AAAA,UACb,MAAM;AAAA,UACN,OAAO;AAAA,QACX,CAAI;AACD;AAAA,MACA;AACDC,eAAAA,MAAM,KAAK,OAAO,KAAK,UAAU,IAAI,OAAO,QAAQ,CAAC,EAAE,KAAK,CAAAC,SAAO;AAClEF,sBAAAA,MAAA,MAAA,OAAA,+BAAYE,IAAG;AACfF,sBAAAA,MAAI,eAAe,SAASE,KAAI,KAAK;AACrCF,sBAAAA,MAAI,eAAe,OAAOE,KAAI,OAAO;AACrC,YAAGA,KAAI,eAAc;AACpBC,uBAAU,WAAC,iCAAiC;AAC5C;AAAA,QACA;AACDH,sBAAAA,MAAI,UAAU;AAAA,UACb,OAAO;AAAA,UACP,MAAM;AAAA,QACV,CAAI;AACD,YAAI,aAAa,UAAU,aAAa;AACvCG,uBAAU,WAAC,aAAa,KAAK;AAAA,QACjC,OAAU;AACNH,wBAAAA,MAAI,aAAc;AAAA,QAClB;AAAA,MACJ,CAAG;AAAA,IACD;;;;;;;;;;;;;;;;;;;;;;;;;;AC9EF,GAAG,WAAW,eAAe;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"phoneAuthorization.js","sources":["pages/login/phoneAuthorization.vue","pages/login/phoneAuthorization.vue?type=page"],"sourcesContent":["<template>\n\t<!-- <view class=\"content\">\n\t\t<view class=\"avatar\">\n\t\t\t<nut-avatar size=\"80\">\n\t\t\t\t<nut-icon size=\"30\" name=\"my\" />\n\t\t\t</nut-avatar>\n\t\t</view>\n\t\t<view class=\"divider\">\n\t\t</view>\n\t</view> -->\n\n\t<view class=\"tip-infos\">\n\t\t<text>申请获取以下权限</text>\n\t\t<text>获得你的手机号信息</text>\n\t</view>\n\t<view class=\"authorize-btn-inner\">\n\t\t<nut-button type=\"success\" size=\"large\" open-type=\"getPhoneNumber\" @getphonenumber=\"getPhoneNumber\">授权手机号</nut-button>\n\t</view>\n</template>\n\n<script setup>\n\timport {\n\t\tonMounted,\n\t\tref\n\t} from 'vue';\n\timport {\n\t\tlogin,\n\t\tfetchUserPhone\n\t} from '../../api/user';\n\timport {\n\t\tonLoad\n\t} from '@dcloudio/uni-app'\n\timport {\n\t\tnavigateTo\n\t} from '../../utils/helper';\n\tconst code = ref('')\n\tconst redirect_url = ref('')\n\tonLoad((options) => {\n\t\tredirect_url.value = options.redirect_url\n\t})\n\tonMounted(() => {\n\t\tuni.login({\n\t\t\tprovider: \"weixin\",\n\t\t\tsuccess(res) {\n\t\t\t\tif (res.errMsg === 'login:ok') {\n\t\t\t\t\tcode.value = res.code\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t})\n\tconst getPhoneNumber = (res) => {\n\t\tif(res.detail.code){\n\t\t\tfetchUserPhone(res.detail.code).then(res=>{\n\t\t\t\tconsole.log(res);\n\t\t\t\tif(res.msg==='success' && res.code ===1){\n\t\t\t\t\tuni.showToast({\n\t\t\t\t\t\ttitle: '授权成功',\n\t\t\t\t\t\ticon: 'none'\n\t\t\t\t\t})\n\t\t\t\t\tconsole.log(\"code\");\n\t\t\t\t\tuni.switchTab({\n\t\t\t\t\t\turl: '/pages/mine/index'\n\t\t\t\t\t})\n\t\t\t\t\t// uni.navigateBack()\n\t\t\t\t}else{\n\t\t\t\t\tuni.switchTab({\n\t\t\t\t\t\turl: '/pages/mine/index'\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\t\n\t}\n</script>\n\n<style scoped lang=\"scss\">\n\t.divider {\n\t\theight: 1px;\n\t\tbackground: #eee;\n\t\twidth: 100%;\n\t}\n\n\t.content {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\tflex-direction: column;\n\t\tpadding: 25px 15px;\n\t\talign-items: center;\n\t\tgap: 20px;\n\t}\n\n\t.tip-infos {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: flex-start;\n\t\tpadding: 10px 25px;\n\t\tgap: 10px;\n\n\t\ttext:nth-child(2) {\n\t\t\tfont-size: 15px;\n\t\t\tcolor: #666;\n\t\t}\n\t}\n\n\t.authorize-btn-inner {\n\t\tpadding: 15px;\n\t}\n</style>","import MiniProgramPage from '/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/pages/login/phoneAuthorization.vue'\nwx.createPage(MiniProgramPage)"],"names":["ref","onLoad","onMounted","uni","fetchUserPhone","res"],"mappings":";;;;;;;;;;;;;;AAmCC,UAAM,OAAOA,cAAG,IAAC,EAAE;AACnB,UAAM,eAAeA,cAAG,IAAC,EAAE;AAC3BC,kBAAM,OAAC,CAAC,YAAY;AACnB,mBAAa,QAAQ,QAAQ;AAAA,IAC/B,CAAE;AACDC,kBAAAA,UAAU,MAAM;AACfC,oBAAAA,MAAI,MAAM;AAAA,QACT,UAAU;AAAA,QACV,QAAQ,KAAK;AACZ,cAAI,IAAI,WAAW,YAAY;AAC9B,iBAAK,QAAQ,IAAI;AAAA,UACjB;AAAA,QACD;AAAA,MACJ,CAAG;AAAA,IACH,CAAE;AACD,UAAM,iBAAiB,CAAC,QAAQ;AAC/B,UAAG,IAAI,OAAO,MAAK;AAClBC,iBAAc,eAAC,IAAI,OAAO,IAAI,EAAE,KAAK,CAAAC,SAAK;AACzCF,wBAAAA,MAAA,MAAA,OAAA,4CAAYE,IAAG;AACf,cAAGA,KAAI,QAAM,aAAaA,KAAI,SAAQ,GAAE;AACvCF,0BAAAA,MAAI,UAAU;AAAA,cACb,OAAO;AAAA,cACP,MAAM;AAAA,YACZ,CAAM;AACDA,0BAAAA,MAAY,MAAA,OAAA,4CAAA,MAAM;AAClBA,0BAAAA,MAAI,UAAU;AAAA,cACb,KAAK;AAAA,YACX,CAAM;AAAA,UAEN,OAAS;AACJA,0BAAAA,MAAI,UAAU;AAAA,cACb,KAAK;AAAA,YACX,CAAM;AAAA,UACD;AAAA,QACL,CAAI;AAAA,MACD;AAAA,IAED;;;;;;;;;;;;;;ACvEF,GAAG,WAAW,eAAe;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"event.js","sources":["uni_modules/nutui-uni/components/_constants/event.ts"],"sourcesContent":["export const UPDATE_MODEL_EVENT = 'update:modelValue'\nexport const UPDATE_VISIBLE_EVENT = 'update:visible'\nexport const CHANGE_EVENT = 'change'\nexport const INPUT_EVENT = 'input'\nexport const CLICK_EVENT = 'click'\nexport const OPEN_EVENT = 'open'\nexport const CLOSE_EVENT = 'close'\nexport const OPENED_EVENT = 'opened'\nexport const CLOSED_EVENT = 'closed'\nexport const FOCUS_EVENT = 'focus'\nexport const BLUR_EVENT = 'blur'\nexport const CONFIRM_EVENT = 'confirm'\nexport const SEARCH_EVENT = 'search'\nexport const CLEAR_EVENT = 'clear'\nexport const CANCEL_EVENT = 'cancel'\nexport const CHOOSE_EVENT = 'choose'\nexport const SELECT_EVENT = 'select'\nexport const SELECTED_EVENT = 'selected'\n"],"names":[],"mappings":";AAAO,MAAM,qBAAqB;AAC3B,MAAM,uBAAuB;AAC7B,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,cAAc;AACpB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,gBAAgB;AACtB,MAAM,eAAe;AACrB,MAAM,cAAc;AACpB,MAAM,eAAe;;;;;;;;;;;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}

View File

@@ -0,0 +1 @@
{"version":3,"file":"prefix.js","sources":["uni_modules/nutui-uni/components/_constants/prefix.ts"],"sourcesContent":["export const PREFIX = 'nut'\n"],"names":[],"mappings":";AAAO,MAAM,SAAS;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sources":["uni_modules/nutui-uni/components/_constants/types.ts"],"sourcesContent":["import type { NutAnimationName } from '../transition'\n\nexport type Position = 'center' | 'top' | 'bottom' | 'left' | 'right'\n\nexport const animationName: Record<Position, NutAnimationName> = {\n center: 'fade',\n top: 'slide-down',\n bottom: 'slide-up',\n left: 'slide-left',\n right: 'slide-right',\n}\n"],"names":[],"mappings":";AAIO,MAAM,gBAAoD;AAAA,EAC/D,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useExpose.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useGlobalZIndex.js","sources":["uni_modules/nutui-uni/components/_hooks/useGlobalZIndex.ts"],"sourcesContent":["let globalZIndex = 2000\n\nexport function useGlobalZIndex() {\n return ++globalZIndex\n}\n\nexport function setGlobalZIndex(value: number) {\n globalZIndex = value\n}\n"],"names":[],"mappings":";AAAA,IAAI,eAAe;AAEZ,SAAS,kBAAkB;AAChC,SAAO,EAAE;AACX;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useInject.js","sources":["uni_modules/nutui-uni/components/_hooks/useInject.ts"],"sourcesContent":["import { computed, getCurrentInstance, inject, onUnmounted, ref } from 'vue'\nimport type { ComponentInternalInstance, InjectionKey } from 'vue'\n\ntype ParentProvide<T> = T & {\n add: (child: ComponentInternalInstance) => void\n remove: (child: ComponentInternalInstance) => void\n internalChildren: ComponentInternalInstance[]\n}\n\nexport function useInject<T>(key: InjectionKey<ParentProvide<T>>) {\n const parent = inject(key, null)\n\n if (parent) {\n const instance = getCurrentInstance()!\n const { add, remove, internalChildren } = parent\n\n add(instance)\n onUnmounted(() => remove(instance))\n\n const index = computed(() => internalChildren.indexOf(instance))\n\n return {\n parent,\n index,\n }\n }\n\n return {\n parent: null,\n index: ref(-1),\n }\n}\n"],"names":["inject","getCurrentInstance","onUnmounted","computed","ref"],"mappings":";;AASO,SAAS,UAAa,KAAqC;AAC1D,QAAA,SAASA,cAAAA,OAAO,KAAK,IAAI;AAE/B,MAAI,QAAQ;AACV,UAAM,WAAWC,cAAAA;AACjB,UAAM,EAAE,KAAK,QAAQ,iBAAA,IAAqB;AAE1C,QAAI,QAAQ;AACAC,kBAAAA,YAAA,MAAM,OAAO,QAAQ,CAAC;AAElC,UAAM,QAAQC,cAAAA,SAAS,MAAM,iBAAiB,QAAQ,QAAQ,CAAC;AAExD,WAAA;AAAA,MACL;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AAEO,SAAA;AAAA,IACL,QAAQ;AAAA,IACR,OAAOC,cAAAA,IAAI,EAAE;AAAA,EAAA;AAEjB;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useLockScroll.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useProvide.js","sources":["uni_modules/nutui-uni/components/_hooks/useProvide.ts"],"sourcesContent":["import { getCurrentInstance, markRaw, provide, shallowReactive } from 'vue'\nimport type {\n ComponentInternalInstance,\n ConcreteComponent,\n InjectionKey,\n VNode,\n VNodeNormalizedChildren,\n} from 'vue'\n\n// TODO: uniapp 不支持 vue 直接导出的 isVNode\nexport function isVNode(value: any): value is VNode {\n return value ? value.__v_isVNode === true : false\n}\n\nexport function flattenVNodes(shouldTraverseChildren: VNodeNormalizedChildren, childName?: string) {\n const result: VNode[] = []\n\n const traverse = (children: VNodeNormalizedChildren) => {\n if (!Array.isArray(children))\n return\n children.forEach((child) => {\n if (!isVNode(child))\n return\n\n if (childName) {\n if (child.type && (child.type as ConcreteComponent).name === childName) {\n result.push(child)\n return\n }\n }\n else {\n result.push(child)\n }\n\n if (child.component?.subTree)\n traverse(child.component.subTree.children)\n\n if (child.children)\n traverse(child.children)\n })\n }\n\n traverse(shouldTraverseChildren)\n\n return result\n}\n\nexport function sortChildren(\n parent: ComponentInternalInstance,\n internalChildren: ComponentInternalInstance[],\n childName?: string,\n) {\n const vnodes = flattenVNodes(parent && parent.subTree && parent.subTree.children, childName)\n internalChildren.sort((a, b) => {\n return vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode)\n })\n}\n\n// 如果指定组件名称,则只查找此组件并且查到后结束。也就是不关心此组件下的内容,在大部分场景下节省查找消耗。\nexport function useProvide<ProvideValue>(key: InjectionKey<ProvideValue>, childName?: string) {\n const internalChildren: ComponentInternalInstance[] = shallowReactive([])\n const publicChildren = shallowReactive<any[]>([])\n const parent = getCurrentInstance()!\n\n const add = (child: ComponentInternalInstance) => {\n if (!child.proxy)\n return\n internalChildren.push(markRaw(child))\n publicChildren.push(markRaw(child.proxy))\n sortChildren(parent, internalChildren, childName)\n }\n\n const remove = (child: ComponentInternalInstance) => {\n if (child.proxy) {\n internalChildren.splice(internalChildren.indexOf(markRaw(child)), 1)\n publicChildren.splice(publicChildren.indexOf(markRaw(child.proxy)), 1)\n }\n }\n\n return (value?: ProvideValue) => {\n provide(key, {\n add,\n remove,\n internalChildren,\n ...value,\n } as any)\n\n return {\n internalChildren,\n children: publicChildren,\n }\n }\n}\n"],"names":["shallowReactive","getCurrentInstance","markRaw","provide"],"mappings":";;AAUO,SAAS,QAAQ,OAA4B;AAC3C,SAAA,QAAQ,MAAM,gBAAgB,OAAO;AAC9C;AAEgB,SAAA,cAAc,wBAAiD,WAAoB;AACjG,QAAM,SAAkB,CAAA;AAElB,QAAA,WAAW,CAAC,aAAsC;AAClD,QAAA,CAAC,MAAM,QAAQ,QAAQ;AACzB;AACO,aAAA,QAAQ,CAAC,UAAU;;AACtB,UAAA,CAAC,QAAQ,KAAK;AAChB;AAEF,UAAI,WAAW;AACb,YAAI,MAAM,QAAS,MAAM,KAA2B,SAAS,WAAW;AACtE,iBAAO,KAAK,KAAK;AACjB;AAAA,QACF;AAAA,MAAA,OAEG;AACH,eAAO,KAAK,KAAK;AAAA,MACnB;AAEA,WAAI,WAAM,cAAN,mBAAiB;AACV,iBAAA,MAAM,UAAU,QAAQ,QAAQ;AAE3C,UAAI,MAAM;AACR,iBAAS,MAAM,QAAQ;AAAA,IAAA,CAC1B;AAAA,EAAA;AAGH,WAAS,sBAAsB;AAExB,SAAA;AACT;AAEgB,SAAA,aACd,QACA,kBACA,WACA;AACM,QAAA,SAAS,cAAc,UAAU,OAAO,WAAW,OAAO,QAAQ,UAAU,SAAS;AAC1E,mBAAA,KAAK,CAAC,GAAG,MAAM;AACvB,WAAA,OAAO,QAAQ,EAAE,KAAK,IAAI,OAAO,QAAQ,EAAE,KAAK;AAAA,EAAA,CACxD;AACH;AAGgB,SAAA,WAAyB,KAAiC,WAAoB;AACtF,QAAA,mBAAgDA,8BAAgB,CAAA,CAAE;AAClE,QAAA,iBAAiBA,8BAAuB,CAAA,CAAE;AAChD,QAAM,SAASC,cAAAA;AAET,QAAA,MAAM,CAAC,UAAqC;AAChD,QAAI,CAAC,MAAM;AACT;AACe,qBAAA,KAAKC,sBAAQ,KAAK,CAAC;AACpC,mBAAe,KAAKA,cAAAA,QAAQ,MAAM,KAAK,CAAC;AAC3B,iBAAA,QAAQ,kBAAkB,SAAS;AAAA,EAAA;AAG5C,QAAA,SAAS,CAAC,UAAqC;AACnD,QAAI,MAAM,OAAO;AACf,uBAAiB,OAAO,iBAAiB,QAAQA,sBAAQ,KAAK,CAAC,GAAG,CAAC;AACpD,qBAAA,OAAO,eAAe,QAAQA,cAAAA,QAAQ,MAAM,KAAK,CAAC,GAAG,CAAC;AAAA,IACvE;AAAA,EAAA;AAGF,SAAO,CAAC,UAAyB;AAC/BC,kBAAAA,QAAQ,KAAK;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IAAA,CACG;AAED,WAAA;AAAA,MACL;AAAA,MACA,UAAU;AAAA,IAAA;AAAA,EACZ;AAEJ;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useRect.js","sources":["uni_modules/nutui-uni/components/_hooks/useRect.ts"],"sourcesContent":["import type { ComponentInternalInstance } from 'vue'\nimport { useSelectorQuery } from './useSelectorQuery'\n\nexport function useRect(id: string, instance?: ComponentInternalInstance): Promise<UniApp.NodeInfo> {\n const { getSelectorNodeInfo } = useSelectorQuery(instance)\n return getSelectorNodeInfo(`#${id}`)\n}\n"],"names":["useSelectorQuery"],"mappings":";;AAGgB,SAAA,QAAQ,IAAY,UAAgE;AAClG,QAAM,EAAE,oBAAA,IAAwBA,wDAAA,iBAAiB,QAAQ;AAClD,SAAA,oBAAoB,IAAI,EAAE,EAAE;AACrC;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useRelation.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useRouter.js","sources":["uni_modules/nutui-uni/components/_hooks/useRouter.ts"],"sourcesContent":["export type NavigateToOptions = string | UniApp.NavigateToOptions\nexport type RedirectToOptions = string | UniApp.RedirectToOptions\n\nexport type RouterOptions = UniApp.NavigateToOptions | UniApp.RedirectToOptions\n\nexport function useRouter() {\n const push = (options: NavigateToOptions) => {\n if (typeof options === 'string') {\n uni.navigateTo({ url: options })\n return\n }\n\n uni.navigateTo(options)\n }\n const replace = (options: RedirectToOptions) => {\n if (typeof options === 'string') {\n uni.redirectTo({ url: options })\n return\n }\n\n uni.redirectTo(options)\n }\n\n return {\n push,\n replace,\n }\n}\n"],"names":["uni"],"mappings":";;AAKO,SAAS,YAAY;AACpB,QAAA,OAAO,CAAC,YAA+B;AACvC,QAAA,OAAO,YAAY,UAAU;AAC/BA,oBAAAA,MAAI,WAAW,EAAE,KAAK,QAAS,CAAA;AAC/B;AAAA,IACF;AAEAA,wBAAI,WAAW,OAAO;AAAA,EAAA;AAElB,QAAA,UAAU,CAAC,YAA+B;AAC1C,QAAA,OAAO,YAAY,UAAU;AAC/BA,oBAAAA,MAAI,WAAW,EAAE,KAAK,QAAS,CAAA;AAC/B;AAAA,IACF;AAEAA,wBAAI,WAAW,OAAO;AAAA,EAAA;AAGjB,SAAA;AAAA,IACL;AAAA,IACA;AAAA,EAAA;AAEJ;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useSelectorQuery.js","sources":["uni_modules/nutui-uni/components/_hooks/useSelectorQuery.ts"],"sourcesContent":["import { getCurrentInstance } from 'vue'\nimport type { ComponentInternalInstance } from 'vue'\n\nexport function useSelectorQuery(instance?: ComponentInternalInstance | null) {\n let query: UniApp.SelectorQuery | null = null\n\n if (!instance)\n instance = getCurrentInstance()\n\n if (!instance)\n console.warn('useSelectorQuery', 'useSelectorQuery必须在setup函数中使用')\n\n // #ifndef MP-ALIPAY\n query = uni.createSelectorQuery().in(instance)\n // #endif\n // #ifdef MP-ALIPAY\n query = uni.createSelectorQuery().in(null)\n // #endif\n\n const getSelectorNodeInfo = (selector: string): Promise<UniApp.NodeInfo> => {\n return new Promise((resolve, reject) => {\n if (query) {\n query\n .select(selector)\n .boundingClientRect((res) => {\n const selectRes: UniApp.NodeInfo = res as UniApp.NodeInfo\n if (selectRes)\n resolve(selectRes)\n else\n reject(new Error(`未找到对应节点: ${selector}`))\n })\n .exec()\n }\n else {\n reject(new Error('未找到对应的SelectorQuery实例'))\n }\n })\n }\n\n const getSelectorNodeInfos = (\n selector: string,\n ): Promise<UniApp.NodeInfo[]> => {\n return new Promise((resolve, reject) => {\n if (query) {\n query\n .selectAll(selector)\n .boundingClientRect((res) => {\n const selectRes: UniApp.NodeInfo[] = res as UniApp.NodeInfo[]\n if (selectRes && selectRes.length > 0)\n resolve(selectRes)\n else\n reject(new Error(`未找到对应节点: ${selector}`))\n })\n .exec()\n }\n else {\n reject(new Error('未找到对应的SelectorQuery实例'))\n }\n })\n }\n\n return {\n query,\n getSelectorNodeInfo,\n getSelectorNodeInfos,\n }\n}\n"],"names":["getCurrentInstance","uni"],"mappings":";;AAGO,SAAS,iBAAiB,UAA6C;AAC5E,MAAI,QAAqC;AAEzC,MAAI,CAAC;AACH,eAAWA,cAAmB,mBAAA;AAEhC,MAAI,CAAC;AACHC,kBAAA,MAAa,MAAA,QAAA,qEAAA,oBAAoB,+BAA+B;AAGlE,UAAQA,cAAAA,MAAI,oBAAsB,EAAA,GAAG,QAAQ;AAMvC,QAAA,sBAAsB,CAAC,aAA+C;AAC1E,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,UAAI,OAAO;AACT,cACG,OAAO,QAAQ,EACf,mBAAmB,CAAC,QAAQ;AAC3B,gBAAM,YAA6B;AAC/B,cAAA;AACF,oBAAQ,SAAS;AAAA;AAEjB,mBAAO,IAAI,MAAM,YAAY,QAAQ,EAAE,CAAC;AAAA,QAAA,CAC3C,EACA,KAAK;AAAA,MAAA,OAEL;AACI,eAAA,IAAI,MAAM,uBAAuB,CAAC;AAAA,MAC3C;AAAA,IAAA,CACD;AAAA,EAAA;AAGG,QAAA,uBAAuB,CAC3B,aAC+B;AAC/B,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,UAAI,OAAO;AACT,cACG,UAAU,QAAQ,EAClB,mBAAmB,CAAC,QAAQ;AAC3B,gBAAM,YAA+B;AACjC,cAAA,aAAa,UAAU,SAAS;AAClC,oBAAQ,SAAS;AAAA;AAEjB,mBAAO,IAAI,MAAM,YAAY,QAAQ,EAAE,CAAC;AAAA,QAAA,CAC3C,EACA,KAAK;AAAA,MAAA,OAEL;AACI,eAAA,IAAI,MAAM,uBAAuB,CAAC;AAAA,MAC3C;AAAA,IAAA,CACD;AAAA,EAAA;AAGI,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useStyle.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"useTouch.js","sources":["uni_modules/nutui-uni/components/_hooks/useTouch.ts"],"sourcesContent":["import { ref } from 'vue'\n\nconst MIN_DISTANCE = 10\n\ntype Direction = '' | 'vertical' | 'horizontal'\n\nfunction getDirection(x: number, y: number) {\n if (x > y && x > MIN_DISTANCE)\n return 'horizontal'\n\n if (y > x && y > MIN_DISTANCE)\n return 'vertical'\n\n return ''\n}\n\nexport function useTouch() {\n const startX = ref(0)\n const startY = ref(0)\n const moveX = ref(0)\n const moveY = ref(0)\n const deltaX = ref(0)\n const deltaY = ref(0)\n const offsetX = ref(0)\n const offsetY = ref(0)\n const direction = ref<Direction>('')\n\n const isVertical = () => direction.value === 'vertical'\n const isHorizontal = () => direction.value === 'horizontal'\n\n const reset = () => {\n deltaX.value = 0\n deltaY.value = 0\n offsetX.value = 0\n offsetY.value = 0\n direction.value = ''\n }\n\n const start = ((event: TouchEvent) => {\n reset()\n startX.value = event.touches[0].clientX\n startY.value = event.touches[0].clientY\n }) as EventListener\n\n const move = ((event: TouchEvent) => {\n const touch = event.touches[0]\n deltaX.value = touch.clientX - startX.value\n deltaY.value = touch.clientY - startY.value\n moveX.value = touch.clientX\n moveY.value = touch.clientY\n offsetX.value = Math.abs(deltaX.value)\n offsetY.value = Math.abs(deltaY.value)\n\n if (!direction.value)\n direction.value = getDirection(offsetX.value, offsetY.value)\n }) as EventListener\n\n return {\n move,\n start,\n reset,\n startX,\n startY,\n moveX,\n moveY,\n deltaX,\n deltaY,\n offsetX,\n offsetY,\n direction,\n isVertical,\n isHorizontal,\n }\n}\n"],"names":["ref"],"mappings":";;AAEA,MAAM,eAAe;AAIrB,SAAS,aAAa,GAAW,GAAW;AACtC,MAAA,IAAI,KAAK,IAAI;AACR,WAAA;AAEL,MAAA,IAAI,KAAK,IAAI;AACR,WAAA;AAEF,SAAA;AACT;AAEO,SAAS,WAAW;AACnB,QAAA,SAASA,kBAAI,CAAC;AACd,QAAA,SAASA,kBAAI,CAAC;AACd,QAAA,QAAQA,kBAAI,CAAC;AACb,QAAA,QAAQA,kBAAI,CAAC;AACb,QAAA,SAASA,kBAAI,CAAC;AACd,QAAA,SAASA,kBAAI,CAAC;AACd,QAAA,UAAUA,kBAAI,CAAC;AACf,QAAA,UAAUA,kBAAI,CAAC;AACf,QAAA,YAAYA,kBAAe,EAAE;AAE7B,QAAA,aAAa,MAAM,UAAU,UAAU;AACvC,QAAA,eAAe,MAAM,UAAU,UAAU;AAE/C,QAAM,QAAQ,MAAM;AAClB,WAAO,QAAQ;AACf,WAAO,QAAQ;AACf,YAAQ,QAAQ;AAChB,YAAQ,QAAQ;AAChB,cAAU,QAAQ;AAAA,EAAA;AAGd,QAAA,QAAS,CAAC,UAAsB;AAC9B;AACN,WAAO,QAAQ,MAAM,QAAQ,CAAC,EAAE;AAChC,WAAO,QAAQ,MAAM,QAAQ,CAAC,EAAE;AAAA,EAAA;AAG5B,QAAA,OAAQ,CAAC,UAAsB;AAC7B,UAAA,QAAQ,MAAM,QAAQ,CAAC;AACtB,WAAA,QAAQ,MAAM,UAAU,OAAO;AAC/B,WAAA,QAAQ,MAAM,UAAU,OAAO;AACtC,UAAM,QAAQ,MAAM;AACpB,UAAM,QAAQ,MAAM;AACpB,YAAQ,QAAQ,KAAK,IAAI,OAAO,KAAK;AACrC,YAAQ,QAAQ,KAAK,IAAI,OAAO,KAAK;AAErC,QAAI,CAAC,UAAU;AACb,gBAAU,QAAQ,aAAa,QAAQ,OAAO,QAAQ,KAAK;AAAA,EAAA;AAGxD,SAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAEJ;;"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"date.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}

View File

@@ -0,0 +1 @@
{"version":3,"file":"env.js","sources":["uni_modules/nutui-uni/components/_utils/env.ts"],"sourcesContent":["/** 枚举EPlatform */\nenum EPlatform {\n /** App */\n AppPlus = 'APP-PLUS',\n /** App nvue */\n AppPlusNvue = 'APP-PLUS-NVUE',\n /** H5 */\n H5 = 'H5',\n /** 微信小程序 */\n MpWeixin = 'MP-WEIXIN',\n /** 支付宝小程序 */\n MpAlipay = 'MP-ALIPAY',\n /** 百度小程序 */\n MpBaidu = 'MP-BAIDU',\n /** 字节跳动小程序 */\n MpToutiao = 'MP-TOUTIAO',\n /** QQ小程序 */\n MpQq = 'MP-QQ',\n /** 360小程序 */\n Mp360 = 'MP-360',\n /** 微信小程序/支付宝小程序/百度小程序/字节跳动小程序/QQ小程序/360小程序 */\n Mp = 'MP',\n /** 快应用通用(包含联盟、华为) */\n QuickappWebview = 'quickapp-webview',\n /** 快应用联盟 */\n QuickappWebviewUnion = 'quickapp-webview-union',\n /** 快应用华为 */\n QuickappWebviewHuawei = 'quickapp-webview-huawei',\n}\n\n/** 使用条件编译获取平台信息 */\nfunction ifDefPlatform(): EPlatform {\n let platform: EPlatform\n // #ifdef APP-PLUS\n platform = EPlatform.AppPlus\n // #endif\n // #ifdef APP-PLUS-NVUE\n platform = EPlatform.AppPlusNvue\n // #endif\n // #ifdef H5\n platform = EPlatform.H5\n // #endif\n // #ifdef MP-WEIXIN\n platform = EPlatform.MpWeixin\n // #endif\n // #ifdef MP-ALIPAY\n platform = EPlatform.MpAlipay\n // #endif\n // #ifdef MP-BAIDU\n platform = EPlatform.MpBaidu\n // #endif\n // #ifdef MP-TOUTIAO\n platform = EPlatform.MpToutiao\n // #endif\n // #ifdef MP-QQ\n platform = EPlatform.MpQq\n // #endif\n // #ifdef MP-360\n platform = EPlatform.Mp360\n // #endif\n // #ifdef MP\n platform = EPlatform.Mp\n // #endif\n // #ifdef quickapp-webview\n platform = EPlatform.QuickappWebview\n // #endif\n // #ifdef quickapp-webview-union\n platform = EPlatform.QuickappWebviewUnion\n // #endif\n // #ifdef quickapp-webview-huawei\n platform = EPlatform.QuickappWebviewHuawei\n // #endif\n return platform\n}\n\n/** 平台类型 */\nexport const platform: EPlatform = ifDefPlatform()\n\n/** H5 */\nexport const isH5 = platform === EPlatform.H5\n/** 微信小程序 */\nexport const isMpWeixin = platform === EPlatform.MpWeixin\n/** 支付宝小程序 */\nexport const isMpAlipay = platform === EPlatform.MpAlipay\n/** 百度小程序 */\nexport const isMpBaidu = platform === EPlatform.MpBaidu\n/** 字节跳动小程序 */\nexport const isMpToutiao = platform === EPlatform.MpToutiao\n/** QQ小程序 */\nexport const isMpQq = platform === EPlatform.MpQq\n/** 360小程序 */\nexport const isMp360 = platform === EPlatform.Mp360\n/** 微信小程序/支付宝小程序/百度小程序/字节跳动小程序/QQ小程序/360小程序 */\nexport const isMp = platform === EPlatform.Mp\n/** 快应用通用(包含联盟、华为) */\nexport const isQuickappWebview = platform === EPlatform.QuickappWebview\n/** 快应用联盟 */\nexport const isQuickappWebviewUnion = platform === EPlatform.QuickappWebviewUnion\n/** 快应用华为 */\nexport const isQuickappWebviewHuawei = platform === EPlatform.QuickappWebviewHuawei\n"],"names":["platform"],"mappings":";AA+BA,SAAS,gBAA2B;AAC9BA,MAAAA;AAWJA,cAAW;AAkBXA,cAAW;AAWJA,SAAAA;AACT;AAGO,MAAM,WAAsB,cAAc;AAG1C,MAAM,OAAO,aAAa;AAI1B,MAAM,aAAa,aAAa;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"interceptor.js","sources":["uni_modules/nutui-uni/components/_utils/interceptor.ts"],"sourcesContent":["import { isPromise } from './is'\n\nexport type Interceptor = (...args: any[]) => Promise<boolean> | boolean | undefined | void\n\nexport function funInterceptor(interceptor: Interceptor | undefined, {\n args = [],\n done,\n canceled,\n}: {\n args?: unknown[]\n done: (val?: any) => void\n canceled?: () => void\n}) {\n if (interceptor) {\n const returnVal = interceptor(null, ...args)\n\n if (isPromise(returnVal)) {\n returnVal\n .then((value) => {\n if (value)\n done(value)\n else if (canceled)\n canceled()\n })\n .catch(() => {})\n }\n else if (returnVal) {\n done()\n }\n else if (canceled) {\n canceled()\n }\n }\n else {\n done()\n }\n}\n"],"names":["isPromise"],"mappings":";;AAIO,SAAS,eAAe,aAAsC;AAAA,EACnE,OAAO,CAAC;AAAA,EACR;AAAA,EACA;AACF,GAIG;AACD,MAAI,aAAa;AACf,UAAM,YAAY,YAAY,MAAM,GAAG,IAAI;AAEvC,QAAAA,0CAAAA,UAAU,SAAS,GAAG;AAErB,gBAAA,KAAK,CAAC,UAAU;AACX,YAAA;AACF,eAAK,KAAK;AAAA,iBACH;AACE;MAAA,CACZ,EACA,MAAM,MAAM;AAAA,MAAA,CAAE;AAAA,eAEV,WAAW;AACb;eAEE,UAAU;AACR;IACX;AAAA,EAAA,OAEG;AACE;EACP;AACF;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"is.js","sources":["uni_modules/nutui-uni/components/_utils/is.ts"],"sourcesContent":["const toString = Object.prototype.toString\n\nexport function is(val: unknown, type: string) {\n return toString.call(val) === `[object ${type}]`\n}\n\nexport function isDef<T = unknown>(val?: T): val is T {\n return typeof val !== 'undefined'\n}\n\nexport function isUnDef<T = unknown>(val?: T): val is T {\n return !isDef(val)\n}\n\nexport function isObject(val: any): val is Record<any, any> {\n return val !== null && is(val, 'Object')\n}\n\nexport function isEmpty<T = unknown>(val: T): val is T {\n if (isArray(val) || isString(val))\n return val.length === 0\n\n if (val instanceof Map || val instanceof Set)\n return val.size === 0\n\n if (isObject(val))\n return Object.keys(val).length === 0\n\n return false\n}\n\nexport function isDate(val: unknown): val is Date {\n return is(val, 'Date')\n}\n\nexport function isNull(val: unknown): val is null {\n return val === null\n}\n\nexport function isNullAndUnDef(val: unknown): val is null | undefined {\n return isUnDef(val) && isNull(val)\n}\n\nexport function isNullOrUnDef(val: unknown): val is null | undefined {\n return isUnDef(val) || isNull(val)\n}\n\nexport function isNumber(val: unknown): val is number {\n return is(val, 'Number')\n}\n\nexport function isPromise<T = any>(val: unknown): val is Promise<T> {\n return (\n is(val, 'Promise')\n || ((isObject(val) || isFunction(val))\n && isFunction((val as any).then)\n && isFunction((val as any).catch))\n )\n}\n\nexport function isString(val: unknown): val is string {\n return is(val, 'String')\n}\n\nexport function isFunction(val: unknown): val is () => void {\n return typeof val === 'function'\n}\n\nexport function isBoolean(val: unknown): val is boolean {\n return is(val, 'Boolean')\n}\n\nexport function isRegExp(val: unknown): val is RegExp {\n return is(val, 'RegExp')\n}\n\nexport function isArray(val: any): val is Array<any> {\n return val && Array.isArray(val)\n}\n\nexport function isWindow(val: any): val is Window {\n return typeof window !== 'undefined' && is(val, 'Window')\n}\n\nexport function isElement(val: unknown): val is Element {\n return isObject(val) && !!val.tagName\n}\n\nexport function isMap(val: unknown): val is Map<any, any> {\n return is(val, 'Map')\n}\n\nexport function isUrl(path: string): boolean {\n const reg = /^http(s)?:\\/\\/([\\w-]+\\.)+[\\w-]+(\\/[\\w- ./?%&=]*)?/\n return reg.test(path)\n}\n"],"names":[],"mappings":";AAAA,MAAM,WAAW,OAAO,UAAU;AAElB,SAAA,GAAG,KAAc,MAAc;AAC7C,SAAO,SAAS,KAAK,GAAG,MAAM,WAAW,IAAI;AAC/C;AAEO,SAAS,MAAmB,KAAmB;AACpD,SAAO,OAAO,QAAQ;AACxB;AAMO,SAAS,SAAS,KAAmC;AAC1D,SAAO,QAAQ,QAAQ,GAAG,KAAK,QAAQ;AACzC;AAEO,SAAS,QAAqB,KAAkB;AACrD,MAAI,QAAQ,GAAG,KAAK,SAAS,GAAG;AAC9B,WAAO,IAAI,WAAW;AAEpB,MAAA,eAAe,OAAO,eAAe;AACvC,WAAO,IAAI,SAAS;AAEtB,MAAI,SAAS,GAAG;AACd,WAAO,OAAO,KAAK,GAAG,EAAE,WAAW;AAE9B,SAAA;AACT;AAkBO,SAAS,SAAS,KAA6B;AAC7C,SAAA,GAAG,KAAK,QAAQ;AACzB;AAEO,SAAS,UAAmB,KAAiC;AAClE,SACE,GAAG,KAAK,SAAS,MACZ,SAAS,GAAG,KAAK,WAAW,GAAG,MAC/B,WAAY,IAAY,IAAI,KAC5B,WAAY,IAAY,KAAK;AAEtC;AAEO,SAAS,SAAS,KAA6B;AAC7C,SAAA,GAAG,KAAK,QAAQ;AACzB;AAEO,SAAS,WAAW,KAAiC;AAC1D,SAAO,OAAO,QAAQ;AACxB;AAEO,SAAS,UAAU,KAA8B;AAC/C,SAAA,GAAG,KAAK,SAAS;AAC1B;AAMO,SAAS,QAAQ,KAA6B;AAC5C,SAAA,OAAO,MAAM,QAAQ,GAAG;AACjC;;;;;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"props.js","sources":["uni_modules/nutui-uni/components/_utils/props.ts"],"sourcesContent":["/**\n * prop type helpers\n * help us to write less code and reduce bundle size\n * copy from https://github.com/youzan/vant/blob/main/packages/vant/src/utils/props.ts\n */\nimport type { ExtractPropTypes, PropType, StyleValue } from 'vue'\n\nexport const unknownProp = null as unknown as PropType<unknown>\n\nexport const numericProp = [Number, String]\n\nexport const truthProp = {\n type: Boolean,\n default: true as const,\n}\n\nexport const nullableBooleanProp = {\n type: Boolean as PropType<boolean | undefined>,\n default: undefined,\n}\n\nexport function makeRequiredProp<T>(type: T) {\n return {\n type,\n required: true as const,\n }\n}\n\nexport function makeArrayProp<T>(defaultVal: T[] = []) {\n return {\n type: Array as PropType<T[]>,\n default: () => defaultVal,\n }\n}\n\nexport function makeObjectProp<T>(defaultVal: T) {\n return {\n type: Object as PropType<T>,\n default: () => defaultVal,\n }\n}\n\nexport function makeNumberProp<T>(defaultVal: T) {\n return {\n type: Number,\n default: defaultVal,\n }\n}\n\nexport function makeNumericProp<T>(defaultVal: T) {\n return {\n type: numericProp,\n default: defaultVal,\n }\n}\n\nexport function makeStringProp<T>(defaultVal: T) {\n return {\n type: String as unknown as PropType<T>,\n default: defaultVal,\n }\n}\n\nexport type ClassType = string | object | Array<ClassType>\n\nexport const commonProps = {\n /**\n * @description 自定义类名\n */\n customClass: {\n type: [String, Object, Array] as PropType<ClassType>,\n default: '',\n },\n /**\n * @description 自定义样式\n */\n customStyle: {\n type: [String, Object, Array] as PropType<StyleValue>,\n default: '',\n },\n}\n\nexport type CommonProps = ExtractPropTypes<typeof commonProps>\n"],"names":[],"mappings":";AASa,MAAA,cAAc,CAAC,QAAQ,MAAM;AAEnC,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,EACN,SAAS;AACX;AAEO,MAAM,sBAAsB;AAAA,EACjC,MAAM;AAAA,EACN,SAAS;AACX;AAEO,SAAS,iBAAoB,MAAS;AACpC,SAAA;AAAA,IACL;AAAA,IACA,UAAU;AAAA,EAAA;AAEd;AAEgB,SAAA,cAAiB,aAAkB,IAAI;AAC9C,SAAA;AAAA,IACL,MAAM;AAAA,IACN,SAAS,MAAM;AAAA,EAAA;AAEnB;AAEO,SAAS,eAAkB,YAAe;AACxC,SAAA;AAAA,IACL,MAAM;AAAA,IACN,SAAS,MAAM;AAAA,EAAA;AAEnB;AAEO,SAAS,eAAkB,YAAe;AACxC,SAAA;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb;AAEO,SAAS,gBAAmB,YAAe;AACzC,SAAA;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb;AAEO,SAAS,eAAkB,YAAe;AACxC,SAAA;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EAAA;AAEb;AAIO,MAAM,cAAc;AAAA;AAAA;AAAA;AAAA,EAIzB,aAAa;AAAA,IACX,MAAM,CAAC,QAAQ,QAAQ,KAAK;AAAA,IAC5B,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAIA,aAAa;AAAA,IACX,MAAM,CAAC,QAAQ,QAAQ,KAAK;AAAA,IAC5B,SAAS;AAAA,EACX;AACF;;;;;;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"pxCheck.js","sources":["uni_modules/nutui-uni/components/_utils/pxCheck.ts"],"sourcesContent":["export function pxCheck(value: string | number): string {\n return Number.isNaN(Number(value)) ? String(value) : `${value}px`\n}\n"],"names":[],"mappings":";AAAO,SAAS,QAAQ,OAAgC;AAC/C,SAAA,OAAO,MAAM,OAAO,KAAK,CAAC,IAAI,OAAO,KAAK,IAAI,GAAG,KAAK;AAC/D;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"raf.js","sources":["uni_modules/nutui-uni/components/_utils/raf.ts"],"sourcesContent":["const _window = window as any\n\nexport const inBrowser = typeof window !== 'undefined'\n\nfunction requestAniFrame() {\n if (typeof _window !== 'undefined') {\n return (\n _window.requestAnimationFrame\n || _window.webkitRequestAnimationFrame\n || function (callback: () => void) {\n _window.setTimeout(callback, 1000 / 60)\n }\n )\n }\n else {\n return function (callback: () => void) {\n setTimeout(callback, 1000 / 60)\n }\n }\n}\n\nexport function cancelRaf(id: number) {\n if (inBrowser)\n cancelAnimationFrame(id)\n\n else\n clearTimeout(id)\n}\n\nexport default requestAniFrame()\n"],"names":[],"mappings":";AAAA,MAAM,UAAU;AAIhB,SAAS,kBAAkB;AACrB,MAAA,OAAO,YAAY,aAAa;AAClC,WACE,QAAQ,yBACL,QAAQ,+BACR,SAAU,UAAsB;AACzB,cAAA,WAAW,UAAU,MAAO,EAAE;AAAA,IAAA;AAAA,EACxC,OAGC;AACH,WAAO,SAAU,UAAsB;AAC1B,iBAAA,UAAU,MAAO,EAAE;AAAA,IAAA;AAAA,EAElC;AACF;AAUA,MAAA,oBAAe,gBAAgB;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"type.js","sources":["uni_modules/nutui-uni/components/avatar/type.ts"],"sourcesContent":["export const avatarSize = ['large', 'normal', 'small'] as const\nexport type AvatarSize = (typeof avatarSize)[number]\n\nexport const avatarShape = ['round', 'square'] as const\nexport type AvatarShape = (typeof avatarShape)[number]\n\nexport interface AvatarFinalSize {\n /**\n * 是否为预设尺寸\n */\n preset: boolean\n /**\n * 尺寸值\n */\n value: string\n}\n"],"names":[],"mappings":";AAAO,MAAM,aAAa,CAAC,SAAS,UAAU,OAAO;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"avatargroup.js","sources":["uni_modules/nutui-uni/components/avatargroup/avatargroup.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { commonProps, makeNumericProp, makeStringProp } from '../_utils'\nimport type { AvatarShape, AvatarSize } from '../avatar'\n\nexport const AVATAR_GROUP_KEY = Symbol('avatarGroup')\n\nexport const avatargroupProps = {\n ...commonProps,\n /**\n * @description 显示的最大头像个数\n */\n maxCount: makeNumericProp(-1),\n\n /**\n * @description 头像数量超出时,会出现一个头像折叠元素,该元素内容可为`...`、`more`、`+N`\n */\n maxContent: makeStringProp(''),\n\n /**\n * @description 头像的大小,可选值为:`large`、`normal`、`small`,支持直接输入数字\n */\n size: makeNumericProp<AvatarSize | string | number>('normal'),\n\n /**\n * @description 头像的形状,可选值为:`square`、`round`\n */\n shape: makeStringProp<AvatarShape>('round'),\n\n /**\n * @description 头像折叠元素的字体颜色\n */\n maxColor: makeStringProp('#666'),\n\n /**\n * @description 头像折叠元素的背景色\n */\n maxBgColor: makeStringProp('#eee'),\n\n /**\n * @description 头像之间的间距\n */\n span: makeNumericProp('-8'),\n\n /**\n * @description 组合头像之间的层级方向,可选值为:`left`、`right`\n */\n zIndex: makeStringProp<'left' | 'right'>('left'),\n}\n\nexport type AvatarGroupProps = ExtractPropTypes<typeof avatargroupProps>\n"],"names":[],"mappings":";;;AAIa,MAAA,mBAAmB,OAAO,aAAa;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"helper.js","sources":["uni_modules/nutui-uni/components/cascader/helper.ts"],"sourcesContent":["import type { CascaderConfig, CascaderOption, ConvertConfig } from './types'\n\nexport function formatTree(tree: CascaderOption[], parent: CascaderOption | null, config: CascaderConfig): CascaderOption[] {\n return tree.map((node: CascaderOption) => {\n const { value: valueKey = 'value', text: textKey = 'text', children: childrenKey = 'children' } = config\n\n const { [valueKey]: value, [textKey]: text, [childrenKey]: children, ...others } = node\n\n const newNode: CascaderOption = {\n loading: false,\n ...others,\n level: parent ? ((parent && parent.level) || 0) + 1 : 0,\n value,\n text,\n children,\n _parent: parent,\n }\n\n if (newNode.children && newNode.children.length)\n newNode.children = formatTree(newNode.children, newNode, config)\n\n return newNode\n })\n}\n\nexport function eachTree(tree: CascaderOption[], cb: (node: CascaderOption) => any): void {\n let i = 0\n let node: CascaderOption\n /* eslint-disable no-cond-assign */\n while ((node = tree[i++])) {\n if (cb(node) === true)\n break\n\n if (node.children && node.children.length)\n eachTree(node.children, cb)\n }\n}\n\nconst defaultConvertConfig = {\n topId: null,\n idKey: 'id',\n pidKey: 'pid',\n sortKey: '',\n}\n\nexport function convertListToOptions(list: CascaderOption[], options: ConvertConfig): CascaderOption[] {\n const mergedOptions = {\n ...defaultConvertConfig,\n ...(options || {}),\n }\n\n const { topId, idKey, pidKey, sortKey } = mergedOptions\n\n let result: CascaderOption[] = []\n let map: any = {}\n\n list.forEach((node: CascaderOption) => {\n node = { ...node }\n const { [idKey]: id, [pidKey]: pid } = node\n const children = (map[pid] = map[pid] || [])\n\n if (!result.length && pid === topId)\n result = children\n\n children.push(node)\n\n node.children = map[id] || (map[id] = [])\n })\n\n if (sortKey) {\n Object.keys(map).forEach((i) => {\n if (map[i].length > 1)\n map[i].sort((a: CascaderOption, b: CascaderOption) => a[sortKey] - b[sortKey])\n })\n }\n\n map = null\n\n return result\n}\n"],"names":[],"mappings":";AAEgB,SAAA,WAAW,MAAwB,QAA+B,QAA0C;AACnH,SAAA,KAAK,IAAI,CAAC,SAAyB;AAClC,UAAA,EAAE,OAAO,WAAW,SAAS,MAAM,UAAU,QAAQ,UAAU,cAAc,WAAA,IAAe;AAElG,UAAM,EAAE,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,WAAW,GAAG,UAAU,GAAG,WAAW;AAEnF,UAAM,UAA0B;AAAA,MAC9B,SAAS;AAAA,MACT,GAAG;AAAA,MACH,OAAO,UAAW,UAAU,OAAO,SAAU,KAAK,IAAI;AAAA,MACtD;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA,IAAA;AAGP,QAAA,QAAQ,YAAY,QAAQ,SAAS;AACvC,cAAQ,WAAW,WAAW,QAAQ,UAAU,SAAS,MAAM;AAE1D,WAAA;AAAA,EAAA,CACR;AACH;AAEgB,SAAA,SAAS,MAAwB,IAAyC;AACxF,MAAI,IAAI;AACJ,MAAA;AAEI,SAAA,OAAO,KAAK,GAAG,GAAI;AACrB,QAAA,GAAG,IAAI,MAAM;AACf;AAEE,QAAA,KAAK,YAAY,KAAK,SAAS;AACxB,eAAA,KAAK,UAAU,EAAE;AAAA,EAC9B;AACF;AAEA,MAAM,uBAAuB;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AACX;AAEgB,SAAA,qBAAqB,MAAwB,SAA0C;AACrG,QAAM,gBAAgB;AAAA,IACpB,GAAG;AAAA,IACH,GAAI,WAAW,CAAC;AAAA,EAAA;AAGlB,QAAM,EAAE,OAAO,OAAO,QAAQ,YAAY;AAE1C,MAAI,SAA2B,CAAA;AAC/B,MAAI,MAAW,CAAA;AAEV,OAAA,QAAQ,CAAC,SAAyB;AAC9B,WAAA,EAAE,GAAG;AACN,UAAA,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,IAAQ,IAAA;AACvC,UAAM,WAAY,IAAI,GAAG,IAAI,IAAI,GAAG,KAAK;AAErC,QAAA,CAAC,OAAO,UAAU,QAAQ;AACnB,eAAA;AAEX,aAAS,KAAK,IAAI;AAElB,SAAK,WAAW,IAAI,EAAE,MAAM,IAAI,EAAE,IAAI,CAAA;AAAA,EAAC,CACxC;AAED,MAAI,SAAS;AACX,WAAO,KAAK,GAAG,EAAE,QAAQ,CAAC,MAAM;AAC1B,UAAA,IAAI,CAAC,EAAE,SAAS;AACd,YAAA,CAAC,EAAE,KAAK,CAAC,GAAmB,MAAsB,EAAE,OAAO,IAAI,EAAE,OAAO,CAAC;AAAA,IAAA,CAChF;AAAA,EACH;AAEM,QAAA;AAEC,SAAA;AACT;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"tree.js","sources":["uni_modules/nutui-uni/components/cascader/tree.ts"],"sourcesContent":["import { eachTree, formatTree } from './helper'\nimport type { CascaderConfig, CascaderOption, CascaderValue } from './types'\n\nclass Tree {\n nodes: CascaderOption[]\n readonly config: CascaderConfig\n\n constructor(nodes: CascaderOption[], config?: CascaderConfig) {\n this.config = {\n value: 'value',\n text: 'text',\n children: 'children',\n ...(config || {}),\n }\n this.nodes = formatTree(nodes, null, this.config)\n }\n\n updateChildren(nodes: CascaderOption[], parent: CascaderOption | null): void {\n if (!parent)\n this.nodes = formatTree(nodes, null, this.config)\n\n else\n parent.children = formatTree(nodes, parent, this.config)\n }\n\n // for test\n getNodeByValue(value: CascaderOption['value']): CascaderOption | void {\n let foundNode\n eachTree(this.nodes, (node: CascaderOption) => {\n if (node.value === value) {\n foundNode = node\n return true\n }\n })\n\n return foundNode\n }\n\n getPathNodesByValue(value: CascaderValue): CascaderOption[] {\n if (!value.length)\n return []\n\n const pathNodes = []\n let currentNodes: CascaderOption[] | void = this.nodes\n\n while (currentNodes && currentNodes.length) {\n const foundNode: CascaderOption | void = currentNodes.find(node => node.value === value[node.level as number])\n\n if (!foundNode)\n break\n\n pathNodes.push(foundNode)\n currentNodes = foundNode.children\n }\n\n return pathNodes\n }\n\n isLeaf(node: CascaderOption, lazy: boolean): boolean {\n const { leaf, children } = node\n const hasChildren = Array.isArray(children) && Boolean(children.length)\n\n return leaf == null ? !hasChildren && !lazy : leaf\n }\n\n hasChildren(node: CascaderOption, lazy: boolean): boolean {\n if (lazy)\n return Array.isArray(node.children) && Boolean(node.children.length)\n return !this.isLeaf(node, lazy)\n }\n}\n\nexport default Tree\n"],"names":["formatTree","eachTree"],"mappings":";;AAGA,MAAM,KAAK;AAAA,EAIT,YAAY,OAAyB,QAAyB;AAC5D,SAAK,SAAS;AAAA,MACZ,OAAO;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,MACV,GAAI,UAAU,CAAC;AAAA,IAAA;AAEjB,SAAK,QAAQA,2DAAW,OAAO,MAAM,KAAK,MAAM;AAAA,EAClD;AAAA,EAEA,eAAe,OAAyB,QAAqC;AAC3E,QAAI,CAAC;AACH,WAAK,QAAQA,2DAAW,OAAO,MAAM,KAAK,MAAM;AAAA;AAGhD,aAAO,WAAWA,2DAAW,OAAO,QAAQ,KAAK,MAAM;AAAA,EAC3D;AAAA;AAAA,EAGA,eAAe,OAAuD;AAChE,QAAA;AACKC,oDAAAA,SAAA,KAAK,OAAO,CAAC,SAAyB;AACzC,UAAA,KAAK,UAAU,OAAO;AACZ,oBAAA;AACL,eAAA;AAAA,MACT;AAAA,IAAA,CACD;AAEM,WAAA;AAAA,EACT;AAAA,EAEA,oBAAoB,OAAwC;AAC1D,QAAI,CAAC,MAAM;AACT,aAAO;AAET,UAAM,YAAY,CAAA;AAClB,QAAI,eAAwC,KAAK;AAE1C,WAAA,gBAAgB,aAAa,QAAQ;AACpC,YAAA,YAAmC,aAAa,KAAK,CAAA,SAAQ,KAAK,UAAU,MAAM,KAAK,KAAe,CAAC;AAE7G,UAAI,CAAC;AACH;AAEF,gBAAU,KAAK,SAAS;AACxB,qBAAe,UAAU;AAAA,IAC3B;AAEO,WAAA;AAAA,EACT;AAAA,EAEA,OAAO,MAAsB,MAAwB;AAC7C,UAAA,EAAE,MAAM,SAAa,IAAA;AAC3B,UAAM,cAAc,MAAM,QAAQ,QAAQ,KAAK,QAAQ,SAAS,MAAM;AAEtE,WAAO,QAAQ,OAAO,CAAC,eAAe,CAAC,OAAO;AAAA,EAChD;AAAA,EAEA,YAAY,MAAsB,MAAwB;AACpD,QAAA;AACK,aAAA,MAAM,QAAQ,KAAK,QAAQ,KAAK,QAAQ,KAAK,SAAS,MAAM;AACrE,WAAO,CAAC,KAAK,OAAO,MAAM,IAAI;AAAA,EAChC;AACF;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"cellgroup.js","sources":["uni_modules/nutui-uni/components/cellgroup/cellgroup.ts","uni_modules/nutui-uni/components/cellgroup/cellgroup.vue","/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/uni_modules/nutui-uni/components/cellgroup/cellgroup.vue?type=component"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { commonProps } from '../_utils'\n\nexport const cellgroupProps = {\n ...commonProps,\n /**\n * @description 标题名称\n */\n title: String,\n /**\n * @description 右侧描述\n */\n desc: String,\n}\n\nexport type CellGroupProps = ExtractPropTypes<typeof cellgroupProps>\n","<script lang=\"ts\" setup>\nimport { computed, defineComponent, useSlots } from 'vue'\nimport { PREFIX } from '../_constants'\nimport { getMainClass } from '../_utils'\nimport { cellgroupProps } from './cellgroup'\n\nconst props = defineProps(cellgroupProps)\n\nconst slots = useSlots()\n\nconst classes = computed(() => {\n return getMainClass(props, componentName)\n})\n</script>\n\n<script lang=\"ts\">\nconst componentName = `${PREFIX}-cell-group`\n\nexport default defineComponent({\n name: componentName,\n options: {\n virtualHost: true,\n addGlobalClass: true,\n\n styleIsolation: 'shared',\n\n },\n})\n</script>\n\n<template>\n <view :class=\"classes\" :style=\"props.customStyle\">\n <slot v-if=\"slots.title\" name=\"title\" />\n\n <template v-else>\n <view v-if=\"props.title\" class=\"nut-cell-group__title\">\n {{ props.title }}\n </view>\n </template>\n\n <slot v-if=\"slots.desc\" name=\"desc\" />\n\n <template v-else>\n <view v-if=\"props.desc\" class=\"nut-cell-group__desc\">\n {{ props.desc }}\n </view>\n </template>\n\n <view class=\"nut-cell-group__wrap\">\n <slot />\n </view>\n </view>\n</template>\n\n<style lang=\"scss\">\n@import \"./index\";\n</style>\n","import Component from '/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/uni_modules/nutui-uni/components/cellgroup/cellgroup.vue'\nwx.createComponent(Component)"],"names":["commonProps","PREFIX","defineComponent","useSlots","computed","getMainClass","Component"],"mappings":";;;;;;AAGO,MAAM,iBAAiB;AAAA,EAC5B,GAAGA,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIH,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,MAAM;AACR;ACGA,MAAM,gBAAgB,GAAGC,wDAAM;AAE/B,MAAA,cAAeC,cAAAA,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,SAAS;AAAA,IACP,aAAa;AAAA,IACb,gBAAgB;AAAA,IAEhB,gBAAgB;AAAA,EAElB;AACF,CAAC;;;;;AArBD,UAAM,QAAQ;AAEd,UAAM,QAAQC,cAAAA;AAER,UAAA,UAAUC,cAAAA,SAAS,MAAM;AACtB,aAAAC,6CAAA,aAAa,OAAO,aAAa;AAAA,IAAA,CACzC;;;;;;;;;;;;;;;;;;;;;ACXD,GAAG,gBAAgBC,SAAS;"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["uni_modules/nutui-uni/components/checkbox/checkbox.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '../_constants'\nimport { commonProps, makeNumericProp, makeStringProp, nullableBooleanProp } from '../_utils'\n\nexport const checkboxProps = {\n ...commonProps,\n /**\n * @description 是否处于选中状态\n */\n modelValue: {\n type: [Boolean, Number, String],\n default: false,\n },\n /**\n * @description 是否禁用选择\n */\n disabled: nullableBooleanProp,\n /**\n * @description 文本所在的位置,可选值:`left`,`right`\n */\n textPosition: makeStringProp<'left' | 'right'>('right'),\n /**\n * @description 图标大小,如 20px 2em 2rem\n */\n iconSize: makeNumericProp(''),\n /**\n * @description 复选框标识\n */\n label: [Boolean, Number, String],\n /**\n * @description 当前是否支持半选状态,一般用在全选操作中\n */\n indeterminate: Boolean,\n /**\n * @description 形状,可选值:`button`、`round`\n */\n shape: makeStringProp<'button' | 'round'>('round'),\n /**\n * @description 选中状态的值\n */\n checkedValue: {\n type: [Boolean, Number, String],\n default: true,\n },\n /**\n * @description 未选中状态的值\n */\n uncheckedValue: {\n type: [Boolean, Number, String],\n default: false,\n },\n}\n\nexport type CheckboxProps = ExtractPropTypes<typeof checkboxProps>\n\n/* eslint-disable unused-imports/no-unused-vars */\nexport const checkboxEmits = {\n [UPDATE_MODEL_EVENT]: (value: any) => true,\n [CHANGE_EVENT]: (checked: boolean, value: any) => true,\n}\n/* eslint-enable unused-imports/no-unused-vars */\n\nexport type CheckboxEmits = typeof checkboxEmits\n\nexport const CHECKBOX_KEY = Symbol('nut-checkbox')\n"],"names":["commonProps","nullableBooleanProp","makeStringProp","makeNumericProp","UPDATE_MODEL_EVENT","CHANGE_EVENT"],"mappings":";;;;;AAIO,MAAM,gBAAgB;AAAA,EAC3B,GAAGA,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIH,YAAY;AAAA,IACV,MAAM,CAAC,SAAS,QAAQ,MAAM;AAAA,IAC9B,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAIA,UAAUC,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIV,cAAcC,4DAAiC,OAAO;AAAA;AAAA;AAAA;AAAA,EAItD,UAAUC,6DAAgB,EAAE;AAAA;AAAA;AAAA;AAAA,EAI5B,OAAO,CAAC,SAAS,QAAQ,MAAM;AAAA;AAAA;AAAA;AAAA,EAI/B,eAAe;AAAA;AAAA;AAAA;AAAA,EAIf,OAAOD,4DAAmC,OAAO;AAAA;AAAA;AAAA;AAAA,EAIjD,cAAc;AAAA,IACZ,MAAM,CAAC,SAAS,QAAQ,MAAM;AAAA,IAC9B,SAAS;AAAA,EACX;AAAA;AAAA;AAAA;AAAA,EAIA,gBAAgB;AAAA,IACd,MAAM,CAAC,SAAS,QAAQ,MAAM;AAAA,IAC9B,SAAS;AAAA,EACX;AACF;AAKO,MAAM,gBAAgB;AAAA,EAC3B,CAACE,iDAAkB,kBAAA,GAAG,CAAC,UAAe;AAAA,EACtC,CAACC,6DAAY,GAAG,CAAC,SAAkB,UAAe;AACpD;AAKa,MAAA,eAAe,OAAO,cAAc;;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"empty.js","sources":["uni_modules/nutui-uni/components/empty/empty.ts","uni_modules/nutui-uni/components/empty/empty.vue","/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/uni_modules/nutui-uni/components/empty/empty.vue?type=component"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { commonProps, makeNumericProp, makeStringProp } from '../_utils'\n\nexport const emptyProps = {\n ...commonProps,\n /**\n * @description 图片类型,可选值为 `empty`、`error`、`network`,支持传入图片 `URL`\n */\n image: makeStringProp<'empty' | 'error' | 'network' | (string & {})>('empty'),\n\n /**\n * @description 图片大小,单位为 `px`\n */\n imageSize: makeNumericProp(''),\n\n /**\n * @description 图片下方的描述文字\n */\n description: makeStringProp(''),\n}\nexport type EmptyProps = ExtractPropTypes<typeof emptyProps>\n","<script setup lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { PREFIX } from '../_constants'\nimport { getMainClass, pxCheck } from '../_utils'\nimport { useTranslate } from '../../locale'\nimport { emptyProps } from './empty'\n\nconst props = defineProps(emptyProps)\ninterface statusOptions {\n [key: string]: string\n}\n\nconst defaultStatus: statusOptions = {\n empty: 'https://static-ftcms.jd.com/p/files/61a9e3183985005b3958672b.png',\n error: 'https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png',\n network: 'https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png',\n}\nconst classes = computed(() => {\n return getMainClass(props, componentName)\n})\nconst style = computed(() => {\n if (props.imageSize) {\n return {\n width: pxCheck(props.imageSize),\n height: pxCheck(props.imageSize),\n }\n }\n return {}\n})\nconst isHttpUrl\n = props.image.startsWith('https://') || props.image.startsWith('http://') || props.image.startsWith('//')\nconst src = isHttpUrl ? props.image : defaultStatus[props.image]\n</script>\n\n<script lang=\"ts\">\nconst componentName = `${PREFIX}-empty`\nconst { translate } = useTranslate(componentName)\n\nexport default defineComponent({\n name: componentName,\n options: {\n virtualHost: true,\n addGlobalClass: true,\n styleIsolation: 'shared',\n },\n})\n</script>\n\n<template>\n <view :class=\"classes\" :style=\"customStyle\">\n <view class=\"nut-empty__box\" :style=\"style\">\n <slot name=\"image\">\n <image v-if=\"src\" class=\"nut-empty__box--img\" :src=\"src\" />\n </slot>\n </view>\n\n <slot name=\"description\">\n <view class=\"nut-empty__description\">\n {{ description || translate('noData') }}\n </view>\n </slot>\n\n <slot />\n </view>\n</template>\n\n<style lang=\"scss\">\n@import './index';\n</style>\n","import Component from '/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/uni_modules/nutui-uni/components/empty/empty.vue'\nwx.createComponent(Component)"],"names":["commonProps","makeStringProp","makeNumericProp","PREFIX","useTranslate","defineComponent","computed","getMainClass","pxCheck","Component"],"mappings":";;;;;;;;;AAGO,MAAM,aAAa;AAAA,EACxB,GAAGA,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIH,OAAOC,4DAA8D,OAAO;AAAA;AAAA;AAAA;AAAA,EAK5E,WAAWC,6DAAgB,EAAE;AAAA;AAAA;AAAA;AAAA,EAK7B,aAAaD,4DAAe,EAAE;AAChC;ACgBA,MAAM,gBAAgB,GAAGE,wDAAM;AAC/B,MAAM,EAAE,UAAc,IAAAC,sDAAa,aAAa;AAEhD,MAAA,cAAeC,cAAAA,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,SAAS;AAAA,IACP,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,EAClB;AACF,CAAC;;;;;AAtCD,UAAM,QAAQ;AAKd,UAAM,gBAA+B;AAAA,MACnC,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS;AAAA,IAAA;AAEL,UAAA,UAAUC,cAAAA,SAAS,MAAM;AACtB,aAAAC,6CAAA,aAAa,OAAO,aAAa;AAAA,IAAA,CACzC;AACK,UAAA,QAAQD,cAAAA,SAAS,MAAM;AAC3B,UAAI,MAAM,WAAW;AACZ,eAAA;AAAA,UACL,OAAOE,+CAAAA,QAAQ,MAAM,SAAS;AAAA,UAC9B,QAAQA,+CAAAA,QAAQ,MAAM,SAAS;AAAA,QAAA;AAAA,MAEnC;AACA,aAAO;IAAC,CACT;AACD,UAAM,YACE,MAAM,MAAM,WAAW,UAAU,KAAK,MAAM,MAAM,WAAW,SAAS,KAAK,MAAM,MAAM,WAAW,IAAI;AAC9G,UAAM,MAAM,YAAY,MAAM,QAAQ,cAAc,MAAM,KAAK;;;;;;;;;;;;;;;AC9B/D,GAAG,gBAAgBC,SAAS;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"grid.js","sources":["uni_modules/nutui-uni/components/grid/grid.vue","/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/uni_modules/nutui-uni/components/grid/grid.vue?type=component"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { CSSProperties } from 'vue'\nimport { computed, defineComponent } from 'vue'\nimport { PREFIX } from '../_constants'\nimport { useProvide } from '../_hooks'\nimport { getMainClass, getMainStyle, pxCheck } from '../_utils'\nimport { GRID_KEY, gridProps } from './grid'\n\nconst props = defineProps(gridProps)\n\nconst componentName = `${PREFIX}-grid`\n\nuseProvide(GRID_KEY, `${componentName}-item`)({ props })\n\nconst classes = computed(() => {\n return getMainClass(props, componentName, {\n [`${componentName}--border`]: props.border && !props.gutter,\n })\n})\n\nconst styles = computed(() => {\n const style: CSSProperties = {}\n if (props.gutter)\n style.paddingLeft = pxCheck(props.gutter)\n\n return getMainStyle(props, style)\n})\n</script>\n\n<script lang=\"ts\">\nexport default defineComponent({\n name: 'NutGrid',\n options: {\n virtualHost: true,\n addGlobalClass: true,\n styleIsolation: 'shared',\n },\n})\n</script>\n\n<template>\n <view :class=\"classes\" :style=\"styles\">\n <slot />\n </view>\n</template>\n\n<style lang=\"scss\">\n@import './index';\n</style>\n","import Component from '/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/uni_modules/nutui-uni/components/grid/grid.vue'\nwx.createComponent(Component)"],"names":["defineComponent","PREFIX","useProvide","GRID_KEY","computed","getMainClass","pxCheck","getMainStyle","Component"],"mappings":";;;;;;;;AA8BA,MAAA,cAAeA,cAAAA,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,SAAS;AAAA,IACP,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,EAClB;AACF,CAAC;;;;;AA7BD,UAAM,QAAQ;AAER,UAAA,gBAAgB,GAAGC,kDAAM,MAAA;AAE/BC,iEAAWC,2CAAAA,UAAU,GAAG,aAAa,OAAO,EAAE,EAAE,OAAO;AAEjD,UAAA,UAAUC,cAAAA,SAAS,MAAM;AACtB,aAAAC,6CAAA,aAAa,OAAO,eAAe;AAAA,QACxC,CAAC,GAAG,aAAa,UAAU,GAAG,MAAM,UAAU,CAAC,MAAM;AAAA,MAAA,CACtD;AAAA,IAAA,CACF;AAEK,UAAA,SAASD,cAAAA,SAAS,MAAM;AAC5B,YAAM,QAAuB,CAAA;AAC7B,UAAI,MAAM;AACF,cAAA,cAAcE,+CAAAA,QAAQ,MAAM,MAAM;AAEnC,aAAAC,6CAAA,aAAa,OAAO,KAAK;AAAA,IAAA,CACjC;;;;;;;;;ACzBD,GAAG,gBAAgBC,SAAS;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["uni_modules/nutui-uni/components/grid/grid.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { commonProps, makeNumericProp, makeStringProp, truthProp } from '../_utils'\n\nexport const GRID_KEY = Symbol('grid')\n\nexport const gridProps = {\n ...commonProps,\n /**\n * @description 列数\n */\n columnNum: makeNumericProp(4),\n\n /**\n * @description 是否显示边框\n */\n border: truthProp,\n\n /**\n * @description 格子之间的间距,默认单位为 `px`\n */\n gutter: makeNumericProp(0),\n\n /**\n * @description 是否将格子内容居中显示\n */\n center: truthProp,\n\n /**\n * @description 是否将格子固定为正方形\n */\n square: Boolean,\n\n /**\n * @description 内容翻转\n */\n reverse: Boolean,\n\n /**\n * @description 格子内容排列的方向,可选值为 `horizontal`\n */\n direction: makeStringProp<'horizontal' | 'vertical'>('vertical'),\n\n /**\n * @description 是否开启格子点击反馈\n */\n clickable: Boolean,\n}\n\nexport type GridProps = ExtractPropTypes<typeof gridProps>\n"],"names":["commonProps","makeNumericProp","truthProp","makeStringProp"],"mappings":";;;;AAGa,MAAA,WAAW,OAAO,MAAM;AAE9B,MAAM,YAAY;AAAA,EACvB,GAAGA,6CAAA;AAAA;AAAA;AAAA;AAAA,EAIH,WAAWC,6DAAgB,CAAC;AAAA;AAAA;AAAA;AAAA,EAK5B,QAAQC,6CAAA;AAAA;AAAA;AAAA;AAAA,EAKR,QAAQD,6DAAgB,CAAC;AAAA;AAAA;AAAA;AAAA,EAKzB,QAAQC,6CAAA;AAAA;AAAA;AAAA;AAAA,EAKR,QAAQ;AAAA;AAAA;AAAA;AAAA,EAKR,SAAS;AAAA;AAAA;AAAA;AAAA,EAKT,WAAWC,4DAA0C,UAAU;AAAA;AAAA;AAAA;AAAA,EAK/D,WAAW;AACb;;;"}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"icon.js","sources":["uni_modules/nutui-uni/components/icon/icon.ts","uni_modules/nutui-uni/components/icon/icon.vue","/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/uni_modules/nutui-uni/components/icon/icon.vue?type=component"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { CLICK_EVENT } from '../_constants'\nimport { commonProps, makeNumericProp, makeStringProp } from '../_utils'\n\nexport const iconProps = {\n ...commonProps,\n popClass: { type: String, default: '' },\n /**\n * @description 图标宽度\n */\n width: makeNumericProp(''),\n /**\n * @description 图标高度\n */\n height: makeNumericProp(''),\n /**\n * @description 图标名称\n */\n name: makeStringProp(''),\n /**\n * @description 图标大小\n */\n size: makeNumericProp(''),\n /**\n * @description 自定义 `icon` 类名前缀,用于使用自定义图标\n */\n classPrefix: { type: String, default: 'nut-icon' },\n /**\n * @description 自定义 `icon` 字体基础类名\n */\n fontClassName: { type: String, default: 'nutui-iconfont' },\n /**\n * @description 图标颜色\n */\n customColor: { type: String, default: '' },\n}\n\nexport type IconProps = ExtractPropTypes<typeof iconProps>\n\nexport const iconEmits = {\n [CLICK_EVENT]: (evt: Event) => evt instanceof Object,\n}\n\nexport type IconEmits = typeof iconEmits\n","<script setup lang=\"ts\">\nimport { computed, defineComponent } from 'vue'\nimport { CLICK_EVENT, PREFIX } from '../_constants'\nimport { getMainClass, getMainStyle, pxCheck } from '../_utils'\nimport { iconEmits, iconProps } from './icon'\n\nconst props = defineProps(iconProps)\nconst emits = defineEmits(iconEmits)\n\nfunction handleClick(event: unknown) {\n emits(CLICK_EVENT, event as Event)\n}\n\nconst isImage = computed(() => {\n return props.name ? props.name.includes('/') : false\n})\n\nconst classes = computed(() => {\n const obj: Record<string, boolean> = {}\n if (isImage.value) {\n obj[`${componentName}__img`] = true\n }\n else {\n obj[props.fontClassName] = true\n obj[`${props.classPrefix}-${props.name}`] = true\n obj[props.popClass] = true\n }\n return getMainClass(props, componentName, obj)\n})\n\nconst getStyle = computed(() => {\n const style = {\n color: props.customColor,\n fontSize: pxCheck(props.size),\n width: pxCheck(props.width),\n height: pxCheck(props.height),\n }\n return getMainStyle(props, style)\n})\n</script>\n\n<script lang=\"ts\">\nconst componentName = `${PREFIX}-icon`\n\nexport default defineComponent({\n name: componentName,\n options: {\n virtualHost: true,\n addGlobalClass: true,\n styleIsolation: 'shared',\n },\n})\n</script>\n\n<template>\n <image\n v-if=\"isImage\"\n :class=\"classes\"\n :style=\"getStyle\"\n :src=\"name\"\n @click=\"handleClick\"\n />\n <text\n v-else\n :class=\"classes\"\n :style=\"getStyle\"\n @click=\"handleClick\"\n />\n</template>\n\n<style lang=\"scss\">\n@import './index';\n</style>\n","import Component from '/Users/iuu/Developer/PHP/Work/yuntaoji/yuntaoji-mini-app/uni_modules/nutui-uni/components/icon/icon.vue'\nwx.createComponent(Component)"],"names":["commonProps","makeNumericProp","makeStringProp","CLICK_EVENT","PREFIX","defineComponent","computed","getMainClass","pxCheck","getMainStyle","Component"],"mappings":";;;;;;;;AAIO,MAAM,YAAY;AAAA,EACvB,GAAGA,6CAAA;AAAA,EACH,UAAU,EAAE,MAAM,QAAQ,SAAS,GAAG;AAAA;AAAA;AAAA;AAAA,EAItC,OAAOC,6DAAgB,EAAE;AAAA;AAAA;AAAA;AAAA,EAIzB,QAAQA,6DAAgB,EAAE;AAAA;AAAA;AAAA;AAAA,EAI1B,MAAMC,4DAAe,EAAE;AAAA;AAAA;AAAA;AAAA,EAIvB,MAAMD,6DAAgB,EAAE;AAAA;AAAA;AAAA;AAAA,EAIxB,aAAa,EAAE,MAAM,QAAQ,SAAS,WAAW;AAAA;AAAA;AAAA;AAAA,EAIjD,eAAe,EAAE,MAAM,QAAQ,SAAS,iBAAiB;AAAA;AAAA;AAAA;AAAA,EAIzD,aAAa,EAAE,MAAM,QAAQ,SAAS,GAAG;AAC3C;AAIO,MAAM,YAAY;AAAA,EACvB,CAACE,4DAAW,GAAG,CAAC,QAAe,eAAe;AAChD;ACCA,MAAM,gBAAgB,GAAGC,wDAAM;AAE/B,MAAA,cAAeC,cAAAA,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,SAAS;AAAA,IACP,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,EAClB;AACF,CAAC;;;;;;AA7CD,UAAM,QAAQ;AACd,UAAM,QAAQ;AAEd,aAAS,YAAY,OAAgB;AACnC,YAAMF,iDAAAA,aAAa,KAAc;AAAA,IACnC;AAEM,UAAA,UAAUG,cAAAA,SAAS,MAAM;AAC7B,aAAO,MAAM,OAAO,MAAM,KAAK,SAAS,GAAG,IAAI;AAAA,IAAA,CAChD;AAEK,UAAA,UAAUA,cAAAA,SAAS,MAAM;AAC7B,YAAM,MAA+B,CAAA;AACrC,UAAI,QAAQ,OAAO;AACb,YAAA,GAAG,aAAa,OAAO,IAAI;AAAA,MAAA,OAE5B;AACC,YAAA,MAAM,aAAa,IAAI;AAC3B,YAAI,GAAG,MAAM,WAAW,IAAI,MAAM,IAAI,EAAE,IAAI;AACxC,YAAA,MAAM,QAAQ,IAAI;AAAA,MACxB;AACO,aAAAC,0DAAa,OAAO,eAAe,GAAG;AAAA,IAAA,CAC9C;AAEK,UAAA,WAAWD,cAAAA,SAAS,MAAM;AAC9B,YAAM,QAAQ;AAAA,QACZ,OAAO,MAAM;AAAA,QACb,UAAUE,+CAAAA,QAAQ,MAAM,IAAI;AAAA,QAC5B,OAAOA,+CAAAA,QAAQ,MAAM,KAAK;AAAA,QAC1B,QAAQA,+CAAAA,QAAQ,MAAM,MAAM;AAAA,MAAA;AAEvB,aAAAC,6CAAA,aAAa,OAAO,KAAK;AAAA,IAAA,CACjC;;;;;;;;;;;;;;;;;ACrCD,GAAG,gBAAgBC,SAAS;"}

Some files were not shown because too many files have changed in this diff Show More