travel/admin/node_modules/.cache/vue-loader/d8aea76bf7a8f61f2de4edac92c...

1 line
4.7 KiB
JSON
Raw Normal View History

2024-06-24 11:28:18 +08:00
{"remainingRequest":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\components\\RightPanel\\index.vue?vue&type=style&index=0&id=1e488bfb&lang=css","dependencies":[{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\src\\components\\RightPanel\\index.vue","mtime":1718070786003},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\css-loader\\dist\\cjs.js","mtime":1718764958140},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":1718764960674},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\postcss-loader\\src\\index.js","mtime":1718764958994},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\cache-loader\\dist\\cjs.js","mtime":1718764957200},{"path":"D:\\phpstudy_pro\\WWW\\travel\\admin\\node_modules\\vue-loader\\lib\\index.js","mtime":1718764959862}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKDQouc2hvd1JpZ2h0UGFuZWwgew0KICBvdmVyZmxvdzogaGlkZGVuOw0KICBwb3NpdGlvbjogcmVsYXRpdmU7DQogIHdpZHRoOiBjYWxjKDEwMCUgLSAxNXB4KTsNCn0NCg=="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/components/RightPanel","sourcesContent":["<template>\r\n <div ref=\"rightPanel\" :class=\"{show:show}\" class=\"rightPanel-container\">\r\n <div class=\"rightPanel-background\" />\r\n <div class=\"rightPanel\">\r\n <div class=\"handle-button\" :style=\"{'top':buttonTop+'px','background-color':theme}\" @click=\"show=!show\">\r\n <i :class=\"show?'el-icon-close':'el-icon-setting'\" />\r\n </div>\r\n <div class=\"rightPanel-items\">\r\n <slot />\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { addClass, removeClass } from '@/utils'\r\n\r\nexport default {\r\n name: 'RightPanel',\r\n props: {\r\n clickNotClose: {\r\n default: false,\r\n type: Boolean\r\n },\r\n buttonTop: {\r\n default: 250,\r\n type: Number\r\n }\r\n },\r\n data() {\r\n return {\r\n show: false\r\n }\r\n },\r\n computed: {\r\n theme() {\r\n return this.$store.state.settings.theme\r\n }\r\n },\r\n watch: {\r\n show(value) {\r\n if (value && !this.clickNotClose) {\r\n this.addEventClick()\r\n }\r\n if (value) {\r\n addClass(document.body, 'showRightPanel')\r\n } else {\r\n removeClass(document.body, 'showRightPanel')\r\n }\r\n }\r\n },\r\n mounted() {\r\n this.insertToBody()\r\n },\r\n beforeDestroy() {\r\n const elx = this.$refs.rightPanel\r\n elx.remove()\r\n },\r\n methods: {\r\n addEventClick() {\r\n window.addEventListener('click', this.closeSidebar)\r\n },\r\n closeSidebar(evt) {\r\n const parent = evt.target.closest('.rightPanel')\r\n if (!parent) {\r\n this.show = false\r\n window.removeEventListener('click', this.closeSidebar)\r\n }\r\n },\r\n insertToBody() {\r\n const elx = this.$refs.rightPanel\r\n const body = document.querySelector('body')\r\n body.insertBefore(elx, body.firstChild)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style>\r\n.showRightPanel {\r\n overflow: hidden;\r\n position: relative;\r\n width: calc(100% - 15px);\r\n}\r\n</style>\r\n\r\n<style lang=\"scss\" scoped>\r\n.rightPanel-background {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n opacity: 0;\r\n transition: opacity .3s cubic-bezier(.7, .3, .1, 1);\r\n background: rgba(0, 0, 0, .2);\r\n z-index: -1;\r\n}\r\n\r\n.rightPanel {\r\n width: 100%;\r\n max-width: 260px;\r\n height: 100vh;\r\n position: fixed;\r\n top: 0;\r\n right: 0;\r\n box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .05);\r\n transition: all .25s cubic-bezier(.7, .3, .1, 1);\r\n transform: translate(100%);\r