You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
3.0 KiB
1 line
3.0 KiB
{"remainingRequest":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/babel-loader/lib/index.js!/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/linhuakun/Downloads/nodejs/codewhy/src/components/content/tabControl/TabControl.vue?vue&type=script&lang=js&","dependencies":[{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/src/components/content/tabControl/TabControl.vue","mtime":1607925374528},{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/babel-loader/lib/index.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KZXhwb3J0IGRlZmF1bHQgewogIG5hbWU6ICJUYWJDb250cm9sIiwKICBwcm9wczogewogICAgdGl0bGVzOiB7CiAgICAgIHR5cGU6IEFycmF5LAogICAgICBkZWZhdWx0OiBmdW5jdGlvbiBfZGVmYXVsdCgpIHsKICAgICAgICByZXR1cm4gW107CiAgICAgIH0KICAgIH0KICB9LAogIGRhdGE6IGZ1bmN0aW9uIGRhdGEoKSB7CiAgICByZXR1cm4gewogICAgICBjdXJyZW50SW5kZXg6IDAKICAgIH07CiAgfSwKICBtZXRob2RzOiB7CiAgICBpdGVtY2xpY2s6IGZ1bmN0aW9uIGl0ZW1jbGljayhpbmRleCkgewogICAgICB0aGlzLmN1cnJlbnRJbmRleCA9IGluZGV4OwogICAgICB0aGlzLiRlbWl0KCd0YWJDbGljaycsIGluZGV4KTsKICAgIH0KICB9Cn07"},{"version":3,"sources":["TabControl.vue"],"names":[],"mappings":";;;;;;;;;AAUA,eAAA;AACA,EAAA,IAAA,EAAA,YADA;AAEA,EAAA,KAAA,EAAA;AACA,IAAA,MAAA,EAAA;AACA,MAAA,IAAA,EAAA,KADA;AAEA,MAAA,OAFA,sBAEA;AACA,eAAA,EAAA;AACA;AAJA;AADA,GAFA;AAUA,EAAA,IAVA,kBAUA;AACA,WAAA;AACA,MAAA,YAAA,EAAA;AADA,KAAA;AAGA,GAdA;AAeA,EAAA,OAAA,EAAA;AACA,IAAA,SADA,qBACA,KADA,EACA;AACA,WAAA,YAAA,GAAA,KAAA;AACA,WAAA,KAAA,CAAA,UAAA,EAAA,KAAA;AACA;AAJA;AAfA,CAAA","sourcesContent":["<template>\n<div class=\"tab-control\">\n <div v-for=\"(item,index) in titles\"\n class=\"tab-control-item\" :key=index :class=\"{active:index===currentIndex}\" @click=\"itemclick(index)\">\n <span>{{item}}</span>\n </div>\n</div>\n</template>\n\n<script>\nexport default {\n name: \"TabControl\",\n props:{\n titles:{\n type:Array,\n default(){\n return []\n }\n }\n },\n data(){\n return{\n currentIndex:0\n }\n },\n methods:{\n itemclick(index){\n this.currentIndex=index;\n this.$emit('tabClick',index);\n }\n }\n}\n</script>\n\n<style scoped>\n.tab-control{\n display: flex;\n text-align: center;\n font-size: 15px;\n height: 40px;\n line-height: 40px;\n background-color: #fff;\n position: relative;\n}\n.tab-control-item{\n flex:1;\n}\n.tab-control-item span{\n padding: 5px;\n}\n\n.active span{\n border-bottom: 3px solid var(--color-tint);\n}\n</style>\n"],"sourceRoot":"src/components/content/tabControl"}]} |