From 1995e710dcf70e635c4edaa8173f8b66cd67d499 Mon Sep 17 00:00:00 2001 From: 黄何裕 <1053952480@qq.com> Date: 星期二, 30 七月 2024 14:05:06 +0800 Subject: [PATCH] 样式优化 --- src/views/screen/components/select-item/index.vue | 179 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 155 insertions(+), 24 deletions(-) diff --git a/src/views/screen/components/select-item/index.vue b/src/views/screen/components/select-item/index.vue index 3297ce7..f93947a 100644 --- a/src/views/screen/components/select-item/index.vue +++ b/src/views/screen/components/select-item/index.vue @@ -1,12 +1,46 @@ <template> <div class="select-container"> - <div class="type-select"> - <div class="select-label">鏁版嵁婧�</div> - <el-select v-model="typeValue" popper-class="type-select" class="select-style" @change="setConfig"> - <el-option v-for="item in testData1" :key="item.name" :label="item.name" :value="item.value" /> - </el-select> + <div class="tabs-box"> + <el-tabs v-model="activeName" @tab-click="handleClick"> + <el-tab-pane + v-for="item in testData1" + :label="item.name" + :name="item.value" + ></el-tab-pane> + </el-tabs> </div> - + <!-- <div class="type-select"> + <div class="select-label">鏁版嵁婧�</div> + <el-select + v-model="typeValue" + popper-class="type-select" + class="select-style" + @change="setConfig" + > + <el-option + v-for="item in testData1" + :key="item.name" + :label="item.name" + :value="item.value" + /> + </el-select> + </div> --> + <!-- <div class="local-select"> + <div class="select-label">鍦板尯</div> + <el-select + v-model="localValue" + popper-class="type-select" + class="select-style" + @change="setConfig" + > + <el-option + v-for="item in testData2" + :key="item.name" + :label="item.name" + :value="item.value" + /> + </el-select> + </div> --> <div class="date-select"> <div class="select-label">鏃ユ湡</div> <el-date-picker @@ -19,7 +53,6 @@ @change="setConfig" /> </div> - </div> </template> @@ -28,51 +61,149 @@ data() { return { typeValue: 1, + localValue: 1, dateValue: new Date(), + activeName: 1, + testData1: [ { - name: '鐪佸巺', - value: 1 + name: "鐪佸巺鏁版嵁", + value: 1, }, { - name: '甯傚巺', - value: 2 + name: "甯傚眬鏁版嵁", + value: 2, }, { - name: '鍏畨閮�', - value: 3 - } - ] - } + name: "鍏畨閮ㄦ暟鎹�", + value: 3, + }, + ], + testData2: [ + { + name: "瀵岄『鍘�", + value: 1, + }, + { + name: "鑽e幙", + value: 2, + }, + { + name: "楂樻柊鍖�", + value: 3, + }, + { + name: "鑷祦浜曞尯", + value: 4, + }, + { + name: "璐′簳鍖�", + value: 5, + }, + { + name: "澶у畨鍖�", + value: 6, + }, + { + name: "娌挎哗鍖�", + value: 7, + }, + ], + }; }, methods: { - setConfig() { - - } - } -} + setConfig() {}, + handleClick() {}, + }, +}; </script> <style lang="scss" scoped> .select-container { position: absolute; - top: 30px; - left: 20px; + top: 0px; + left: 0px; display: flex; align-items: center; + justify-content: space-between; + width: 90%; .select-label { font-size: 20px; margin-right: 10px; color: #2375f0; + flex-shrink: 0; } + + .local-label { + font-size: 20px; + margin-right: 10px; + color: #2375f0; + flex-shrink: 0; + } + .type-select { display: flex; align-items: center; margin-right: 20px; + width: 200px; } + + .local-select { + display: flex; + align-items: center; + margin-right: 20px; + width: 200px; + } + .date-select { display: flex; align-items: center; + width: 320px; + margin-top: -15px; } } -</style> \ No newline at end of file +::v-deep .tabs-box { + margin-top: 5px; + width: 40%; + .el-tabs__item { + color: #ffffff !important; + font-size: 20px; + } + .is-active { + color: #66b5ff !important; + background: url("../../../../assets/images/screen/button1.png"); + background-size: cover !important; + background-repeat: no-repeat !important; + background-position: center center !important; + } +} +::v-deep .el-input__inner { + background: rgba(67, 102, 155, 0.4) !important; + color: #4481dd; + border-color: #4481dd !important; +} + +::v-deep .date-select .el-range-input { + background-color: transparent !important; + color: #4481dd; +} +::v-deep .date-select .el-date-editor .el-range-separator { + color: #4481dd !important; +} +// } +/* 鍘绘帀tabs鏍囩鏍忎笅鐨勪笅鍒掔嚎 */ +::v-deep .el-tabs__nav-wrap::after { + position: static !important; + /* background-color: #fff; */ +} +/* 涓嬪垝绾垮垏鎹㈤珮浜� */ +::v-deep .el-tabs__active-bar { + background-color: #4481dd; +} +::v-deep .el-tabs__item { + margin: 5px 30px; + padding: 0px 25px !important; + border-radius: 5px; + background: url("../../../../assets/images/screen/button.png"); +} +</style> -- Gitblit v1.8.0