{"remainingRequest":"D:\\源码\\vue-element-admin-master\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\源码\\vue-element-admin-master\\src\\components\\RightPanel\\index.vue?vue&type=style&index=0&lang=css&","dependencies":[{"path":"D:\\源码\\vue-element-admin-master\\src\\components\\RightPanel\\index.vue","mtime":1649647926000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\css-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCi5zaG93UmlnaHRQYW5lbCB7CiAgb3ZlcmZsb3c6IGhpZGRlbjsKICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgd2lkdGg6IGNhbGMoMTAwJSAtIDE1cHgpOwp9Cg=="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/components/RightPanel","sourcesContent":["<template>\n <div ref=\"rightPanel\" :class=\"{show:show}\" class=\"rightPanel-container\">\n <div class=\"rightPanel-background\" />\n <div class=\"rightPanel\">\n <div class=\"handle-button\" :style=\"{'top':buttonTop+'px','background-color':theme}\" @click=\"show=!show\">\n <i :class=\"show?'el-icon-close':'el-icon-setting'\" />\n </div>\n <div class=\"rightPanel-items\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport { addClass, removeClass } from '@/utils'\n\nexport default {\n name: 'RightPanel',\n props: {\n clickNotClose: {\n default: false,\n type: Boolean\n },\n buttonTop: {\n default: 250,\n type: Number\n }\n },\n data() {\n return {\n show: false\n }\n },\n computed: {\n theme() {\n return this.$store.state.settings.theme\n }\n },\n watch: {\n show(value) {\n if (value && !this.clickNotClose) {\n this.addEventClick()\n }\n if (value) {\n addClass(document.body, 'showRightPanel')\n } else {\n removeClass(document.body, 'showRightPanel')\n }\n }\n },\n mounted() {\n this.insertToBody()\n },\n beforeDestroy() {\n const elx = this.$refs.rightPanel\n elx.remove()\n },\n methods: {\n addEventClick() {\n window.addEventListener('click', this.closeSidebar)\n },\n closeSidebar(evt) {\n const parent = evt.target.closest('.rightPanel')\n if (!parent) {\n this.show = false\n window.removeEventListener('click', this.closeSidebar)\n }\n },\n insertToBody() {\n const elx = this.$refs.rightPanel\n const body = document.querySelector('body')\n body.insertBefore(elx, body.firstChild)\n }\n }\n}\n</script>\n\n<style>\n.showRightPanel {\n overflow: hidden;\n position: relative;\n width: calc(100% - 15px);\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.rightPanel-background {\n position: fixed;\n top: 0;\n left: 0;\n opacity: 0;\n transition: opacity .3s cubic-bezier(.7, .3, .1, 1);\n background: rgba(0, 0, 0, .2);\n z-index: -1;\n}\n\n.rightPanel {\n width: 100%;\n max-width: 260px;\n height: 100vh;\n position: fixed;\n top: 0;\n right: 0;\n box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .05);\n transition: all .25s cubic-bezier(.7, .3, .1, 1);\n transform: translate(100%);\n background: #fff;\n z-index: 40000;\n}\n\n.show {\n transition: all .3s cubic-bezier(.7, .3, .1, 1);\n\n .rightPanel-background {\n z-index: 20000;\n opacity: 1;\n width: 100%;\n height: 100%;\n }\n\n .rightPanel {\n transform: translate(0);\n }\n}\n\n.handle-button {\n width: 48px;\n height: 48px;\n position: absolute;\n left: -48px;\n text-align: center;\n font-size: 24px;\n border-radius: 6px 0 0 6px !important;\n z-index: 0;\n pointer-events: auto;\n cursor: pointer;\n color: #fff;\n line-height: 48px;\n i {\n font-size: 24px;\n line-height: 48px;\n }\n}\n</style>\n"]}]}
|