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
2.4 KiB

{"remainingRequest":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/linhuakun/Downloads/coderlhk/codewhy/src/components/content/tabControl/TabControl.vue?vue&type=script&lang=js&","dependencies":[{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/src/components/content/tabControl/TabControl.vue","mtime":1607925374528},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/babel-loader/lib/index.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/coderlhk/codewhy/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KCmV4cG9ydCBkZWZhdWx0IHsKICBuYW1lOiAiVGFiQ29udHJvbCIsCiAgcHJvcHM6ewogICAgdGl0bGVzOnsKICAgICAgdHlwZTpBcnJheSwKICAgICAgZGVmYXVsdCgpewogICAgICAgIHJldHVybiBbXQogICAgICB9CiAgICB9CiAgfSwKICBkYXRhKCl7CiAgICByZXR1cm57CiAgICAgIGN1cnJlbnRJbmRleDowCiAgICB9CiAgfSwKICBtZXRob2RzOnsKICAgIGl0ZW1jbGljayhpbmRleCl7CiAgICAgIHRoaXMuY3VycmVudEluZGV4PWluZGV4OwogICAgICB0aGlzLiRlbWl0KCd0YWJDbGljaycsaW5kZXgpOwogICAgfQogIH0KfQo="},{"version":3,"sources":["TabControl.vue"],"names":[],"mappings":";;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"TabControl.vue","sourceRoot":"src/components/content/tabControl","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"]}]}