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

1 line
3.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"s-float-menu.js","sources":["../../../../../../src/sheep/components/s-float-menu/s-float-menu.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9zaGVlcC9jb21wb25lbnRzL3MtZmxvYXQtbWVudS9zLWZsb2F0LW1lbnUudnVl"],"sourcesContent":["<!-- 装修基础组件:悬浮按钮 -->\r\n<template>\r\n <!-- 模态背景:展开时显示,点击后折叠 -->\r\n <view class=\"modal-bg\" v-if=\"fabRef?.isShow\" @click=\"handleCollapseFab\"></view>\r\n <!-- 悬浮按钮 -->\r\n <uni-fab\r\n ref=\"fabRef\"\r\n horizontal=\"right\"\r\n vertical=\"bottom\"\r\n :direction=\"state.direction\"\r\n :pattern=\"state.pattern\"\r\n :content=\"state.content\"\r\n @trigger=\"handleOpenLink\"\r\n />\r\n</template>\r\n<script setup>\r\n/**\r\n * 悬浮按钮\r\n */\r\n\r\nimport sheep from '@/sheep'\r\nimport { reactive, ref, unref } from 'vue'\r\nimport { onBackPress } from '@dcloudio/uni-app'\r\n\r\n// 定义属性\r\nconst props = defineProps({\r\n data: {\r\n type: Object,\r\n default() {},\r\n },\r\n})\r\n\r\n// 悬浮按钮配置: https://uniapp.dcloud.net.cn/component/uniui/uni-fab.html#fab-props\r\nconst state = reactive({\r\n // 可选样式配置项\r\n pattern: [],\r\n // 展开菜单内容配置项\r\n content: [],\r\n // 展开菜单显示方式horizontal-水平显示vertical-垂直显示\r\n direction: '',\r\n})\r\n\r\n// 悬浮按钮引用\r\nconst fabRef = ref(null)\r\n// 按钮方向\r\nstate.direction = props.data.direction\r\nprops.data?.list.forEach((item) => {\r\n // 按钮文字\r\n const text = props.data?.showText ? item.text : ''\r\n // 生成内容配置项\r\n state.content.push({ iconPath: sheep.$url.cdn(item.imgUrl), url: item.url, text })\r\n // 生成样式配置项\r\n state.pattern.push({ color: item.textColor })\r\n})\r\n\r\n// 处理链接跳转\r\nfunction handleOpenLink(e) {\r\n sheep.$router.go(e.item.url)\r\n}\r\n\r\n// 折叠\r\nfunction handleCollapseFab() {\r\n if (unref(fabRef)?.isShow) {\r\n unref(fabRef)?.close()\r\n }\r\n}\r\n\r\n// 按返回值后,折叠悬浮按钮\r\nonBackPress(() => {\r\n if (unref(fabRef)?.isShow) {\r\n unref(fabRef)?.close()\r\n return true\r\n }\r\n return false\r\n})\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n \r\n/* 模态背景 */\r\n.modal-bg {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n z-index: 11;\r\n width: 100%;\r\n height: 100%;\r\n background-color: rgba(#000000, 0.4);\r\n}\r\n</style>\r\n","import Component from 'D:/App/Work/addr/acdr-ui/src/sheep/components/s-float-menu/s-float-menu.vue'\nwx.createComponent(Component)"],"names":["reactive","ref","_a","sheep","unref","onBackPress"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyBA,UAAM,QAAQ;AAQd,UAAM,QAAQA,cAAAA,SAAS;AAAA;AAAA,MAErB,SAAS,CAAE;AAAA;AAAA,MAEX,SAAS,CAAE;AAAA;AAAA,MAEX,WAAW;AAAA,IACb,CAAC;AAGD,UAAM,SAASC,cAAG,IAAC,IAAI;AAEvB,UAAM,YAAY,MAAM,KAAK;AAC7B,gBAAM,SAAN,mBAAY,KAAK,QAAQ,CAAC,SAAS;;AAEjC,YAAM,SAAOC,MAAA,MAAM,SAAN,gBAAAA,IAAY,YAAW,KAAK,OAAO;AAEhD,YAAM,QAAQ,KAAK,EAAE,UAAUC,YAAAA,MAAM,KAAK,IAAI,KAAK,MAAM,GAAG,KAAK,KAAK,KAAK,KAAI,CAAE;AAEjF,YAAM,QAAQ,KAAK,EAAE,OAAO,KAAK,WAAW;AAAA,IAC9C;AAGA,aAAS,eAAe,GAAG;AACzBA,kBAAAA,MAAM,QAAQ,GAAG,EAAE,KAAK,GAAG;AAAA,IAC7B;AAGA,aAAS,oBAAoB;;AAC3B,WAAIC,MAAAA,cAAK,MAAC,MAAM,MAAZA,gBAAAA,IAAe,QAAQ;AACzBA,kCAAM,MAAM,MAAZA,mBAAe;AAAA,MAChB;AAAA,IACH;AAGAC,kBAAAA,YAAY,MAAM;;AAChB,WAAID,MAAAA,cAAK,MAAC,MAAM,MAAZA,gBAAAA,IAAe,QAAQ;AACzBA,kCAAM,MAAM,MAAZA,mBAAe;AACf,eAAO;AAAA,MACR;AACD,aAAO;AAAA,IACT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;ACzED,GAAG,gBAAgB,SAAS;"}