1 line
3.8 KiB
Plaintext
1 line
3.8 KiB
Plaintext
|
{"version":3,"file":"s-title-block.js","sources":["../../../../../../src/sheep/components/s-title-block/s-title-block.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtdGl0bGUtYmxvY2svcy10aXRsZS1ibG9jay52dWU"],"sourcesContent":["<!-- 装修商品组件:标题栏 -->\r\n<template>\r\n <view\r\n class=\"ss-title-wrap ss-flex ss-col-center\"\r\n :class=\"[state.typeMap[data.textAlign]]\"\r\n :style=\"[bgStyle, { marginLeft: `${data.space}px` }]\"\r\n >\r\n <view class=\"title-content\">\r\n <!-- 主标题 -->\r\n <view v-if=\"data.title\" class=\"title-text\" :style=\"[titleStyles]\">{{ data.title }}</view>\r\n <!-- 副标题 -->\r\n <view v-if=\"data.description\" :style=\"[descStyles]\" class=\"sub-title-text\">\r\n {{ data.description }}\r\n </view>\r\n </view>\r\n <!-- 查看更多 -->\r\n <view\r\n v-if=\"data.more?.show\"\r\n class=\"more-box ss-flex ss-col-center\"\r\n @tap=\"sheep.$router.go(data.more.url)\"\r\n :style=\"{ color: data.descriptionColor }\"\r\n >\r\n <view class=\"more-text\" v-if=\"data.more.type !== 'icon'\">{{ data.more.text }}</view>\r\n <text class=\"_icon-forward\" v-if=\"data.more.type !== 'text'\"></text>\r\n </view>\r\n </view>\r\n</template>\r\n\r\n<script setup>\r\n/**\r\n * 标题栏\r\n */\r\nimport { reactive, computed } from 'vue'\r\nimport sheep from '@/sheep'\r\n\r\n// 数据\r\nconst state = reactive({\r\n typeMap: {\r\n left: 'ss-row-left',\r\n center: 'ss-row-center',\r\n },\r\n})\r\n\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\r\n// 标题样式\r\nconst titleStyles = {\r\n color: props.data.titleColor,\r\n fontSize: `${props.data.titleSize}px`,\r\n textAlign: props.data.textAlign,\r\n}\r\n\r\n// 副标题\r\nconst descStyles = {\r\n color: props.data.descriptionColor,\r\n textAlign: props.data.textAlign,\r\n fontSize: `${props.data.descriptionSize}px`,\r\n fontWeight: `${props.data.descriptionWeight}px`,\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n \r\n.ss-title-wrap {\r\n position: relative;\r\n height: 80rpx;\r\n\r\n .title-content {\r\n .title-text {\r\n font-size: 30rpx;\r\n color: #333;\r\n }\r\n\r\n .sub-title-text {\r\n font-size: 22rpx;\r\n color: #999;\r\n }\r\n }\r\n\r\n .more-box {\r\n position: absolute;\r\n top: 50%;\r\n right: 20rpx;\r\n font-size: 22rpx;\r\n color: #999;\r\n white-space: nowrap;\r\n transform: translateY(-50%);\r\n }\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-title-block/s-title-block.vue'\nwx.createComponent(Component)"],"names":["reactive","computed"],"mappings":";;;;;;;;;;;;;;;;;;AAoCA,UAAM,QAAQA,cAAAA,SAAS;AAAA,MACrB,SAAS;AAAA,QACP,MAAM;AAAA,QACN,QAAQ;AAAA,MACT;AAAA,IACH,CAAC;AAGD,UAAM,QAAQ;AAad,UAAM,UAAUC,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;AAGD,UAAM,cAAc;AAAA,MAClB,OAAO,MAAM,KAAK;AAAA,MAClB,UAAU,GAAG,MAAM,KAAK,SAAS;AAAA,MACjC,WAAW,MAAM,KAAK;AAAA,IACxB;AAGA,UAAM,aAAa;AAAA,MACjB,OAAO,MAAM,KAAK;AAAA,MAClB,WAAW,MAAM,KAAK;AAAA,MACtB,UAAU,GAAG,MAAM,KAAK,eAAe;AAAA,MACvC,YAAY,GAAG,MAAM,KAAK,iBAAiB;AAAA,IAC7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/EA,GAAG,gBAAgB,SAAS;"}
|