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

1 line
5.1 KiB
Plaintext

{"version":3,"file":"s-coupon-select.js","sources":["../../../../../../src/sheep/components/s-coupon-select/s-coupon-select.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtY291cG9uLXNlbGVjdC9zLWNvdXBvbi1zZWxlY3QudnVl"],"sourcesContent":["<!-- 订单确认的优惠劵选择弹窗 -->\r\n<template>\r\n <su-popup\r\n :show=\"show\"\r\n type=\"bottom\"\r\n round=\"20\"\r\n @close=\"emits('close')\"\r\n showClose\r\n backgroundColor=\"#f2f2f2\"\r\n >\r\n <view class=\"model-box\">\r\n <view class=\"title ss-m-t-16 ss-m-l-20 ss-flex\">优惠券</view>\r\n <scroll-view\r\n class=\"model-content\"\r\n scroll-y\r\n :scroll-with-animation=\"false\"\r\n :enable-back-to-top=\"true\"\r\n >\r\n <!--可使用的优惠券区域-->\r\n <view class=\"subtitle ss-m-l-20\">可使用优惠券</view>\r\n <view\r\n v-for=\"(item, index) in state.couponInfo.filter((coupon) => coupon.match)\"\r\n :key=\"index\"\r\n >\r\n <s-coupon-list :data=\"item\" type=\"user\" :disabled=\"false\">\r\n <template v-slot:reason>\r\n <view class=\"ss-flex ss-m-t-24\">\r\n <view class=\"reason-title\">可用原因:</view>\r\n <view class=\"reason-desc\">{{ item.description || '已达到使用门槛' }}</view>\r\n </view>\r\n </template>\r\n <template #default>\r\n <label class=\"ss-flex ss-col-center\" @tap=\"radioChange(item.id)\">\r\n <radio\r\n color=\"var(--ui-BG-Main)\"\r\n style=\"transform: scale(0.8)\"\r\n :checked=\"state.couponId === item.id\"\r\n @tap.stop=\"radioChange(item.id)\"\r\n />\r\n </label>\r\n </template>\r\n </s-coupon-list>\r\n </view>\r\n <!--不可使用的优惠券区域-->\r\n <view class=\"subtitle ss-m-t-40 ss-m-l-20\">不可使用优惠券</view>\r\n <view v-for=\"item in state.couponInfo.filter((coupon) => !coupon.match)\" :key=\"item.id\">\r\n <s-coupon-list :data=\"item\" type=\"user\" :disabled=\"true\">\r\n <template v-slot:reason>\r\n <view class=\"ss-flex ss-m-t-24\">\r\n <view class=\"reason-title\">不可用原因:</view>\r\n <view class=\"reason-desc\">{{ item.description || '未达到使用门槛' }}</view>\r\n </view>\r\n </template>\r\n </s-coupon-list>\r\n </view>\r\n </scroll-view>\r\n </view>\r\n <view class=\"modal-footer ss-flex\">\r\n <button class=\"confirm-btn ss-reset-button\" @tap=\"onConfirm\">确认</button>\r\n </view>\r\n </su-popup>\r\n</template>\r\n<script setup>\r\nimport { computed, reactive } from 'vue'\r\n\r\nconst props = defineProps({\r\n modelValue: {\r\n // 优惠劵列表\r\n type: Object,\r\n default() {},\r\n },\r\n show: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n})\r\n\r\nconst emits = defineEmits(['confirm', 'close'])\r\n\r\nconst state = reactive({\r\n couponInfo: computed(() => props.modelValue), // 优惠劵列表\r\n couponId: undefined, // 选中的优惠劵编号\r\n})\r\n\r\n// 选中优惠劵\r\nfunction radioChange(couponId) {\r\n if (state.couponId === couponId) {\r\n state.couponId = undefined\r\n } else {\r\n state.couponId = couponId\r\n }\r\n}\r\n\r\n// 确认优惠劵\r\nconst onConfirm = () => {\r\n emits('confirm', state.couponId)\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n \r\n:deep() {\r\n .uni-checkbox-input {\r\n background-color: var(--ui-BG-Main);\r\n }\r\n}\r\n\r\n.model-box {\r\n height: 60vh;\r\n}\r\n\r\n.title {\r\n height: 80rpx;\r\n font-size: 36rpx;\r\n font-weight: bold;\r\n color: #333333;\r\n}\r\n\r\n.subtitle {\r\n font-size: 26rpx;\r\n font-weight: 500;\r\n color: #333333;\r\n}\r\n\r\n.model-content {\r\n height: 54vh;\r\n}\r\n\r\n.modal-footer {\r\n width: 100%;\r\n height: 120rpx;\r\n background: #fff;\r\n}\r\n\r\n.confirm-btn {\r\n width: 710rpx;\r\n height: 80rpx;\r\n margin-left: 20rpx;\r\n color: #fff;\r\n background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));\r\n border-radius: 40rpx;\r\n}\r\n\r\n.reason-title {\r\n font-size: 20rpx;\r\n font-weight: 600;\r\n line-height: 26rpx;\r\n color: #ff0003;\r\n}\r\n\r\n.reason-desc {\r\n font-size: 20rpx;\r\n font-weight: 600;\r\n line-height: 26rpx;\r\n color: #434343;\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-coupon-select/s-coupon-select.vue'\nwx.createComponent(Component)"],"names":["reactive","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,UAAM,QAAQ;AAYd,UAAM,QAAQ;AAEd,UAAM,QAAQA,cAAAA,SAAS;AAAA,MACrB,YAAYC,cAAQ,SAAC,MAAM,MAAM,UAAU;AAAA;AAAA,MAC3C,UAAU;AAAA;AAAA,IACZ,CAAC;AAGD,aAAS,YAAY,UAAU;AAC7B,UAAI,MAAM,aAAa,UAAU;AAC/B,cAAM,WAAW;AAAA,MACrB,OAAS;AACL,cAAM,WAAW;AAAA,MAClB;AAAA,IACH;AAGA,UAAM,YAAY,MAAM;AACtB,YAAM,WAAW,MAAM,QAAQ;AAAA,IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/FA,GAAG,gBAAgB,SAAS;"}