1 line
4.7 KiB
Plaintext
1 line
4.7 KiB
Plaintext
{"version":3,"file":"uni-grid-item.js","sources":["../../../../../../../src/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue","../../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy91bmlfbW9kdWxlcy91bmktZ3JpZC9jb21wb25lbnRzL3VuaS1ncmlkLWl0ZW0vdW5pLWdyaWQtaXRlbS52dWU"],"sourcesContent":["<template>\r\n <view\r\n :style=\"'width:' + width + ';' + (square ? 'height:' + width : '')\"\r\n class=\"uni-grid-item grid-item\"\r\n >\r\n <view\r\n :class=\"{\r\n 'uni-grid-item--border': showBorder,\r\n 'uni-grid-item--border-top': showBorder && index < column,\r\n 'uni-highlight': highlight,\r\n }\"\r\n :style=\"{\r\n 'border-right-color': borderColor,\r\n 'border-bottom-color': borderColor,\r\n 'border-top-color': borderColor,\r\n }\"\r\n class=\"uni-grid-item__box\"\r\n @click=\"_onClick\"\r\n >\r\n <slot />\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script>\r\n/**\r\n * GridItem 宫格\r\n * @description 宫格组件\r\n * @tutorial https://ext.dcloud.net.cn/plugin?id=27\r\n * @property {Number} index 子组件的唯一标识 ,点击gird会返回当前的标识\r\n */\r\nexport default {\r\n name: 'UniGridItem',\r\n inject: ['grid'],\r\n props: {\r\n index: {\r\n type: Number,\r\n default: 0,\r\n },\r\n },\r\n data() {\r\n return {\r\n column: 0,\r\n showBorder: true,\r\n square: true,\r\n highlight: true,\r\n left: 0,\r\n top: 0,\r\n openNum: 2,\r\n width: 0,\r\n borderColor: '#e5e5e5',\r\n }\r\n },\r\n created() {\r\n this.column = this.grid.column\r\n this.showBorder = this.grid.showBorder\r\n this.square = this.grid.square\r\n this.highlight = this.grid.highlight\r\n this.top = this.hor === 0 ? this.grid.hor : this.hor\r\n this.left = this.ver === 0 ? this.grid.ver : this.ver\r\n this.borderColor = this.grid.borderColor\r\n this.grid.children.push(this)\r\n // this.grid.init()\r\n this.width = this.grid.width\r\n },\r\n beforeDestroy() {\r\n this.grid.children.forEach((item, index) => {\r\n if (item === this) {\r\n this.grid.children.splice(index, 1)\r\n }\r\n })\r\n },\r\n methods: {\r\n _onClick() {\r\n this.grid.change({\r\n detail: {\r\n index: this.index,\r\n },\r\n })\r\n },\r\n },\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.uni-grid-item {\r\n /* #ifndef APP-NVUE */\r\n height: 100%;\r\n display: flex;\r\n /* #endif */\r\n /* #ifdef H5 */\r\n cursor: pointer;\r\n /* #endif */\r\n}\r\n\r\n.uni-grid-item__box {\r\n /* #ifndef APP-NVUE */\r\n display: flex;\r\n width: 100%;\r\n /* #endif */\r\n position: relative;\r\n flex: 1;\r\n flex-direction: column;\r\n // justify-content: center;\r\n // align-items: center;\r\n}\r\n\r\n.uni-grid-item--border {\r\n position: relative;\r\n /* #ifdef APP-NVUE */\r\n border-bottom-color: #d2d2d2;\r\n border-bottom-style: solid;\r\n border-bottom-width: 0.5px;\r\n border-right-color: #d2d2d2;\r\n border-right-style: solid;\r\n border-right-width: 0.5px;\r\n /* #endif */\r\n /* #ifndef APP-NVUE */\r\n z-index: 0;\r\n border-bottom: 1px #d2d2d2 solid;\r\n border-right: 1px #d2d2d2 solid;\r\n /* #endif */\r\n}\r\n.uni-grid-item--border-top {\r\n position: relative;\r\n /* #ifdef APP-NVUE */\r\n border-top-color: #d2d2d2;\r\n border-top-style: solid;\r\n border-top-width: 0.5px;\r\n /* #endif */\r\n /* #ifndef APP-NVUE */\r\n border-top: 1px #d2d2d2 solid;\r\n z-index: 0;\r\n /* #endif */\r\n}\r\n\r\n.uni-highlight:active {\r\n background-color: #f1f1f1;\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue'\nwx.createComponent(Component)"],"names":[],"mappings":";;AA+BA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EACN,QAAQ,CAAC,MAAM;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,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,IACf;AAAA,EACD;AAAA,EACD,UAAU;AACR,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,EACxB;AAAA,EACD,gBAAgB;AACd,SAAK,KAAK,SAAS,QAAQ,CAAC,MAAM,UAAU;AAC1C,UAAI,SAAS,MAAM;AACjB,aAAK,KAAK,SAAS,OAAO,OAAO,CAAC;AAAA,MACpC;AAAA,KACD;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,WAAW;AACT,WAAK,KAAK,OAAO;AAAA,QACf,QAAQ;AAAA,UACN,OAAO,KAAK;AAAA,QACb;AAAA,OACF;AAAA,IACF;AAAA,EACF;AACH;;;;;;;;;;;;;;AChFA,GAAG,gBAAgB,SAAS;"} |