acdr-ui/dist/dev/mp-weixin/sheep/components/s-tabbar/s-tabbar.js.map

1 line
3.4 KiB
Plaintext
Raw Normal View History

2024-09-19 07:20:14 +08:00
{"version":3,"file":"s-tabbar.js","sources":["../../../../../../src/sheep/components/s-tabbar/s-tabbar.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtdGFiYmFyL3MtdGFiYmFyLnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"u-page__item\" v-if=\"tabbar?.items?.length > 0\">\r\n <su-tabbar\r\n :value=\"path\"\r\n :fixed=\"true\"\r\n :placeholder=\"true\"\r\n :safeAreaInsetBottom=\"true\"\r\n :inactiveColor=\"tabbar.style.color\"\r\n :activeColor=\"tabbar.style.activeColor\"\r\n :midTabBar=\"tabbar.mode === 2\"\r\n :customStyle=\"tabbarStyle\"\r\n >\r\n <su-tabbar-item\r\n v-for=\"(item, index) in tabbar.items\"\r\n :key=\"item.text\"\r\n :text=\"item.text\"\r\n :name=\"item.url\"\r\n :isCenter=\"getTabbarCenter(index)\"\r\n :centerImage=\"sheep.$url.cdn(item.iconUrl)\"\r\n @tap=\"sheep.$router.go(item.url)\"\r\n >\r\n <template v-slot:active-icon>\r\n <image class=\"u-page__item__slot-icon\" :src=\"sheep.$url.cdn(item.activeIconUrl)\"></image>\r\n </template>\r\n <template v-slot:inactive-icon>\r\n <image class=\"u-page__item__slot-icon\" :src=\"sheep.$url.cdn(item.iconUrl)\"></image>\r\n </template>\r\n </su-tabbar-item>\r\n </su-tabbar>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\nimport { computed, unref } from 'vue'\r\nimport sheep from '@/sheep'\r\n\r\nconst tabbar = computed(() => {\r\n return sheep.$store('app').template.basic?.tabbar\r\n})\r\n\r\nconst tabbarStyle = computed(() => {\r\n const backgroundStyle = tabbar.value.style\r\n if (backgroundStyle.bgType === 'color') {\r\n return { background: backgroundStyle.bgColor }\r\n }\r\n if (backgroundStyle.bgType === 'img')\r\n return {\r\n background: `url(${sheep.$url.cdn(backgroundStyle.bgImg)}) no-repeat top center / 100% auto`,\r\n }\r\n})\r\n\r\nconst getTabbarCenter = (index) => {\r\n if (unref(tabbar).mode !== 2) return false\r\n return unref(tabbar).items % 2 > 0\r\n ? Math.ceil(unref(tabbar).items.length / 2) === index + 1\r\n : false\r\n}\r\n\r\nconst props = defineProps({\r\n path: String,\r\n default: '',\r\n})\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n.u-page {\r\n padding: 0;\r\n\r\n &__item {\r\n &__title {\r\n padding: 15px;\r\n font-size: 15px;\r\n color: var(--textSize);\r\n background-color: #fff;\r\n\r\n &__slot-title {\r\n font-size: 14px;\r\n color: var(--textSize);\r\n }\r\n }\r\n\r\n &__slot-icon {\r\n width: 25px;\r\n height: 25px;\r\n }\r\n }\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-tabbar/s-tabbar.vue'\nwx.createComponent(Component)"],"names":["computed","sheep","unref","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoCA,UAAM,SAASA,cAAQ,SAAC,MAAM;;AAC5B,cAAOC,iBAAAA,MAAM,OAAO,KAAK,EAAE,SAAS,UAA7BA,mBAAoC;AAAA,IAC7C,CAAC;AAED,UAAM,cAAcD,cAAQ,SAAC,MAAM;AACjC,YAAM,kBAAkB,OAAO,MAAM;AACrC,UAAI,gBAAgB,WAAW,SAAS;AACtC,eAAO,EAAE,YAAY,gBAAgB,QAAS;AAAA,MAC/C;AACD,UAAI,gBAAgB,WAAW;AAC7B,eAAO;AAAA,UACL,YAAY,OAAOC,kBAAM,KAAK,IAAI,gBAAgB,KAAK,CAAC;AAAA,QACzD;AAAA,IACL,CAAC;AAED,UAAM,kBAAkB,CAAC,UAAU;AACjC,UAAIC,cAAK,MAAC,MAAM,EAAE,SAAS;AAAG,eAAO;AACrC,aAAOA,cAAK,MAAC,MAAM,EAAE,QAAQ,IAAI,IAC7B,KAAK,KAAKA,cAAK,MAAC,MAAM,EAAE,MAAM,SAAS,CAAC,MAAM,QAAQ,IACtD;AAAA,IACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvDA,GAAG,gBAAgBC,SAAS;"}