1 line
3.5 KiB
Plaintext
1 line
3.5 KiB
Plaintext
{"version":3,"file":"s-menu-grid.js","sources":["../../../../../../src/sheep/components/s-menu-grid/s-menu-grid.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtbWVudS1ncmlkL3MtbWVudS1ncmlkLnZ1ZQ"],"sourcesContent":["<!-- 装修基础组件:宫格导航 -->\r\n<template>\r\n <view :style=\"[bgStyle, { marginLeft: `${data.space}px` }]\">\r\n <uni-grid :showBorder=\"Boolean(data.border)\" :column=\"data.column\">\r\n <uni-grid-item\r\n v-for=\"(item, index) in data.list\"\r\n :key=\"index\"\r\n @tap=\"sheep.$router.go(item.url)\"\r\n >\r\n <view class=\"grid-item-box ss-flex ss-flex-col ss-row-center ss-col-center\">\r\n <view class=\"img-box\">\r\n <view\r\n class=\"tag-box\"\r\n v-if=\"item.badge.show\"\r\n :style=\"[{ background: item.badge.bgColor, color: item.badge.textColor }]\"\r\n >\r\n {{ item.badge.text }}\r\n </view>\r\n <image class=\"menu-image\" :src=\"sheep.$url.cdn(item.iconUrl)\"></image>\r\n </view>\r\n\r\n <view class=\"title-box ss-flex ss-flex-col ss-row-center ss-col-center\">\r\n <view class=\"grid-text\" :style=\"[{ color: item.titleColor }]\">\r\n {{ item.title }}\r\n </view>\r\n <view class=\"grid-tip\" :style=\"[{ color: item.subtitleColor }]\">\r\n {{ item.subtitle }}\r\n </view>\r\n </view>\r\n </view>\r\n </uni-grid-item>\r\n </uni-grid>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nimport sheep from '@/sheep'\r\nimport { computed } from 'vue'\r\n\r\nconst props = defineProps({\r\n // 装修数据\r\n data: {\r\n type: Object,\r\n default: () => ({}),\r\n },\r\n // 装修样式\r\n styles: {\r\n type: Object,\r\n default: () => ({}),\r\n },\r\n})\r\n// 设置背景样式\r\nconst bgStyle = computed(() => {\r\n // 直接从 props.styles 解构\r\n const { bgType, bgImg, bgColor } = props.styles\r\n\r\n // 根据 bgType 返回相应的样式\r\n return {\r\n background: bgType === 'img' ? `url(${bgImg}) no-repeat top center / 100% 100%` : bgColor,\r\n }\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.menu-image {\r\n width: 24px;\r\n height: 24px;\r\n}\r\n\r\n.grid-item-box {\r\n display: flex;\r\n flex: 1;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n height: 100%;\r\n\r\n .img-box {\r\n position: relative;\r\n\r\n .tag-box {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 2;\r\n padding: 0.4em 0.6em 0.3em;\r\n font-size: 2em;\r\n line-height: 1;\r\n white-space: nowrap;\r\n border-radius: 200rpx;\r\n transform: scale(0.4) translateX(0.5em) translatey(-0.6em);\r\n transform-origin: 100% 0;\r\n }\r\n }\r\n\r\n .title-box {\r\n .grid-tip {\r\n font-size: 24rpx;\r\n text-align: center;\r\n white-space: nowrap;\r\n }\r\n }\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-menu-grid/s-menu-grid.vue'\nwx.createComponent(Component)"],"names":["computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,UAAM,QAAQ;AAad,UAAM,UAAUA,cAAQ,SAAC,MAAM;AAE7B,YAAM,EAAE,QAAQ,OAAO,QAAS,IAAG,MAAM;AAGzC,aAAO;AAAA,QACL,YAAY,WAAW,QAAQ,OAAO,KAAK,uCAAuC;AAAA,MACnF;AAAA,IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC3DD,GAAG,gBAAgB,SAAS;"} |