{"remainingRequest":"D:\\源码\\vue-element-admin-master\\node_modules\\babel-loader\\lib\\index.js!D:\\源码\\vue-element-admin-master\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\源码\\vue-element-admin-master\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\源码\\vue-element-admin-master\\src\\components\\Share\\DropdownMenu.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\源码\\vue-element-admin-master\\src\\components\\Share\\DropdownMenu.vue","mtime":1649647926000},{"path":"D:\\源码\\vue-element-admin-master\\babel.config.js","mtime":1649647926000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\源码\\vue-element-admin-master\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"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:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KZXhwb3J0IGRlZmF1bHQgewogIHByb3BzOiB7CiAgICBpdGVtczogewogICAgICB0eXBlOiBBcnJheSwKICAgICAgZGVmYXVsdDogZnVuY3Rpb24gX2RlZmF1bHQoKSB7CiAgICAgICAgcmV0dXJuIFtdOwogICAgICB9CiAgICB9LAogICAgdGl0bGU6IHsKICAgICAgdHlwZTogU3RyaW5nLAogICAgICBkZWZhdWx0OiAndnVlJwogICAgfQogIH0sCiAgZGF0YTogZnVuY3Rpb24gZGF0YSgpIHsKICAgIHJldHVybiB7CiAgICAgIGlzQWN0aXZlOiBmYWxzZQogICAgfTsKICB9LAogIG1ldGhvZHM6IHsKICAgIGNsaWNrVGl0bGU6IGZ1bmN0aW9uIGNsaWNrVGl0bGUoKSB7CiAgICAgIHRoaXMuaXNBY3RpdmUgPSAhdGhpcy5pc0FjdGl2ZTsKICAgIH0KICB9Cn07"},{"version":3,"mappings":";;;;;;;;;;;;AAaA;EACAA;IACAC;MACAC,WADA;MAEAC;QACA;MACA;IAJA,CADA;IAOAC;MACAF,YADA;MAEAC;IAFA;EAPA,CADA;EAaAE,IAbA,kBAaA;IACA;MACAC;IADA;EAGA,CAjBA;EAkBAC;IACAC,UADA,wBACA;MACA;IACA;EAHA;AAlBA","names":["props","items","type","default","title","data","isActive","methods","clickTitle"],"sourceRoot":"src/components/Share","sources":["DropdownMenu.vue"],"sourcesContent":["<template>\n <div :class=\"{active:isActive}\" class=\"share-dropdown-menu\">\n <div class=\"share-dropdown-menu-wrapper\">\n <span class=\"share-dropdown-menu-title\" @click.self=\"clickTitle\">{{ title }}</span>\n <div v-for=\"(item,index) of items\" :key=\"index\" class=\"share-dropdown-menu-item\">\n <a v-if=\"item.href\" :href=\"item.href\" target=\"_blank\">{{ item.title }}</a>\n <span v-else>{{ item.title }}</span>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n items: {\n type: Array,\n default: function() {\n return []\n }\n },\n title: {\n type: String,\n default: 'vue'\n }\n },\n data() {\n return {\n isActive: false\n }\n },\n methods: {\n clickTitle() {\n this.isActive = !this.isActive\n }\n }\n}\n</script>\n\n<style lang=\"scss\" >\n$n: 9; //和items.length 相同\n$t: .1s;\n.share-dropdown-menu {\n width: 250px;\n position: relative;\n z-index: 1;\n height: auto!important;\n &-title {\n width: 100%;\n display: block;\n cursor: pointer;\n background: black;\n color: white;\n height: 60px;\n line-height: 60px;\n font-size: 20px;\n text-align: center;\n z-index: 2;\n transform: translate3d(0,0,0);\n }\n &-wrapper {\n position: relative;\n }\n &-item {\n text-align: center;\n position: absolute;\n width: 100%;\n background: #e0e0e0;\n color: #000;\n line-height: 60px;\n height: 60px;\n cursor: pointer;\n font-size: 18px;\n overflow: hidden;\n opacity: 1;\n transition: transform 0.28s ease;\n &:hover {\n background: black;\n color: white;\n }\n @for $i from 1 through $n {\n &:nth-of-type(#{$i}) {\n z-index: -1;\n transition-delay: $i*$t;\n transform: translate3d(0, -60px, 0);\n }\n }\n }\n &.active {\n .share-dropdown-menu-wrapper {\n z-index: 1;\n }\n .share-dropdown-menu-item {\n @for $i from 1 through $n {\n &:nth-of-type(#{$i}) {\n transition-delay: ($n - $i)*$t;\n transform: translate3d(0, ($i - 1)*60px, 0);\n }\n }\n }\n }\n}\n</style>\n"]}]}
|