适配小程序代码结构

This commit is contained in:
zhonghua1
2026-01-20 08:46:36 +08:00
parent 3b169467ac
commit 9c00db8ff5
615 changed files with 62726 additions and 8 deletions

View File

@@ -0,0 +1 @@
{"version":3,"file":"uni-grid-item.js","sources":["uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue","../../../work/soft/HBuilderX.4.87.20251210/plugins/uniapp-cli-vite/uniComponent:/RDovd29yazIvY29kZS9zbWFydERyaXZlRUVVbmlBcHAxMTExL3VuaV9tb2R1bGVzL3VuaS1ncmlkL2NvbXBvbmVudHMvdW5pLWdyaWQtaXRlbS91bmktZ3JpZC1pdGVtLnZ1ZQ"],"sourcesContent":["<template>\r\n\t<view v-if=\"width\" :style=\"'width:'+width+';'+(square?'height:'+width:'')\" class=\"uni-grid-item\">\r\n\t\t<view :class=\"{ 'uni-grid-item--border': showBorder, 'uni-grid-item--border-top': showBorder && index < column, 'uni-highlight': highlight }\"\r\n\t\t :style=\"{'border-right-color': borderColor ,'border-bottom-color': borderColor ,'border-top-color': borderColor }\"\r\n\t\t class=\"uni-grid-item__box\" @click=\"_onClick\">\r\n\t\t\t<slot />\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\t/**\r\n\t * GridItem 宫格\r\n\t * @description 宫格组件\r\n\t * @tutorial https://ext.dcloud.net.cn/plugin?id=27\r\n\t * @property {Number} index 子组件的唯一标识 点击gird会返回当前的标识\r\n\t */\r\n\texport default {\r\n\t\tname: 'UniGridItem',\r\n\t\tinject: ['grid'],\r\n\t\tprops: {\r\n\t\t\tindex: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: 0\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tcolumn: 0,\r\n\t\t\t\tshowBorder: true,\r\n\t\t\t\tsquare: true,\r\n\t\t\t\thighlight: true,\r\n\t\t\t\tleft: 0,\r\n\t\t\t\ttop: 0,\r\n\t\t\t\topenNum: 2,\r\n\t\t\t\twidth: 0,\r\n\t\t\t\tborderColor: '#e5e5e5'\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreated() {\r\n\t\t\tthis.column = this.grid.column\r\n\t\t\tthis.showBorder = this.grid.showBorder\r\n\t\t\tthis.square = this.grid.square\r\n\t\t\tthis.highlight = this.grid.highlight\r\n\t\t\tthis.top = this.hor === 0 ? this.grid.hor : this.hor\r\n\t\t\tthis.left = this.ver === 0 ? this.grid.ver : this.ver\r\n\t\t\tthis.borderColor = this.grid.borderColor\r\n\t\t\tthis.grid.children.push(this)\r\n\t\t\t// this.grid.init()\r\n\t\t\tthis.width = this.grid.width\r\n\t\t},\r\n\t\tbeforeDestroy() {\r\n\t\t\tthis.grid.children.forEach((item, index) => {\r\n\t\t\t\tif (item === this) {\r\n\t\t\t\t\tthis.grid.children.splice(index, 1)\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t_onClick() {\r\n\t\t\t\tthis.grid.change({\r\n\t\t\t\t\tdetail: {\r\n\t\t\t\t\t\tindex: this.index\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n\t.uni-grid-item {\r\n\t\t/* #ifndef APP-NVUE */\r\n\t\theight: 100%;\r\n\t\tdisplay: flex;\r\n\t\t/* #endif */\r\n\t\t/* #ifdef H5 */\r\n\t\tcursor: pointer;\r\n\t\t/* #endif */\r\n\t}\r\n\r\n\t.uni-grid-item__box {\r\n\t\t/* #ifndef APP-NVUE */\r\n\t\tdisplay: flex;\r\n\t\twidth: 100%;\r\n\t\t/* #endif */\r\n\t\tposition: relative;\r\n\t\tflex: 1;\r\n\t\tflex-direction: column;\r\n\t\t// justify-content: center;\r\n\t\t// align-items: center;\r\n\t}\r\n\r\n\t.uni-grid-item--border {\r\n\t\tposition: relative;\r\n\t\t/* #ifdef APP-NVUE */\r\n\t\tborder-bottom-color: #D2D2D2;\r\n\t\tborder-bottom-style: solid;\r\n\t\tborder-bottom-width: 0.5px;\r\n\t\tborder-right-color: #D2D2D2;\r\n\t\tborder-right-style: solid;\r\n\t\tborder-right-width: 0.5px;\r\n\t\t/* #endif */\r\n\t\t/* #ifndef APP-NVUE */\r\n\t\tz-index: 0;\r\n\t\tborder-bottom: 1px #D2D2D2 solid;\r\n\t\tborder-right: 1px #D2D2D2 solid;\r\n\t\t/* #endif */\r\n\t}\r\n\t.uni-grid-item--border-top {\r\n\t\tposition: relative;\r\n\t\t/* #ifdef APP-NVUE */\r\n\t\tborder-top-color: #D2D2D2;\r\n\t\tborder-top-style: solid;\r\n\t\tborder-top-width: 0.5px;\r\n\t\t/* #endif */\r\n\t\t/* #ifndef APP-NVUE */\r\n\t\tborder-top: 1px #D2D2D2 solid;\r\n\t\tz-index: 0;\r\n\t\t/* #endif */\r\n\t}\r\n\r\n\r\n\t.uni-highlight:active {\r\n\t\tbackground-color: #f1f1f1;\r\n\t}\r\n</style>\r\n","import Component from 'D:/work2/code/smartDriveEEUniApp1111/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;AAiBC,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EACN,QAAQ,CAAC,MAAM;AAAA,EACf,OAAO;AAAA,IACN,OAAO;AAAA,MACN,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACA;AAAA,EACD,OAAO;AACN,WAAO;AAAA,MACN,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,MAAM;AAAA,MACN,KAAK;AAAA,MACL,SAAS;AAAA,MACT,OAAO;AAAA,MACP,aAAa;AAAA,IACd;AAAA,EACA;AAAA,EACD,UAAU;AACT,SAAK,SAAS,KAAK,KAAK;AACxB,SAAK,aAAa,KAAK,KAAK;AAC5B,SAAK,SAAS,KAAK,KAAK;AACxB,SAAK,YAAY,KAAK,KAAK;AAC3B,SAAK,MAAM,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,KAAK;AACjD,SAAK,OAAO,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,KAAK;AAClD,SAAK,cAAc,KAAK,KAAK;AAC7B,SAAK,KAAK,SAAS,KAAK,IAAI;AAE5B,SAAK,QAAQ,KAAK,KAAK;AAAA,EACvB;AAAA,EACD,gBAAgB;AACf,SAAK,KAAK,SAAS,QAAQ,CAAC,MAAM,UAAU;AAC3C,UAAI,SAAS,MAAM;AAClB,aAAK,KAAK,SAAS,OAAO,OAAO,CAAC;AAAA,MACnC;AAAA,KACA;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACR,WAAW;AACV,WAAK,KAAK,OAAO;AAAA,QAChB,QAAQ;AAAA,UACP,OAAO,KAAK;AAAA,QACb;AAAA,OACA;AAAA,IACF;AAAA,EACD;AACD;;;;;;;;;;;;;;;;AClED,GAAG,gBAAgB,SAAS;"}

File diff suppressed because one or more lines are too long