Commit 6260c0e2 by 杨北旺

style:修复bug和样式

1 parent 4247f354
......@@ -63,7 +63,9 @@ export default {
addHtml: 'auth-button'
}
]
}
},
showMoreTags:false,
moreTags:[]
}
},
mounted() {
......@@ -91,6 +93,11 @@ export default {
this.tags = list || []
this.getGoodsList(id)
this.goodsCategoryId = id
// if(this.tags.length>5){
// this.moreTags = this.tags.slice(5)
// this.tags = this.tags.slice(0,5)
// this.showMoreTags = true
// }
})
},
/**商品权益列表 */
......@@ -111,6 +118,14 @@ export default {
this.getGoodsList(id)
this.goodsCategoryId = id
this.currentIndex = index
// if(this.tags.length>5){
// this.moreTags = this.tags.slice(5)
// this.tags = this.tags.slice(0,5)
// this.showMoreTags = true
// }
if(this.$refs.mydrown){
this.$refs.mydrown.hide()
}
},
showInput(index, val) {
this.inputValue = val
......
......@@ -28,13 +28,26 @@
<div class="equity-wrap contain fill">
<div class="tagsCtn">
<div class="choseRow flex_sc">
<div class="choseItem" @click="changeGoodsCategory({ id: item.id, index })" :class="{ active: currentIndex == index }" v-for="(item, index) in tags" :key="index">
<div class="choseItem hideText" @click="changeGoodsCategory({ id: item.id, index })" :class="{ active: currentIndex == index }" v-for="(item, index) in tags" :key="index">
<span>{{item.goodsCategory}}</span>
<i class="del el-icon-close" @click.stop="categoryDelete(item.id)"></i>
</div>
<div v-if="inputVisible" class="choseItem">
<input @keydown.enter="handleInputConfirm" @blur="handleInputConfirm" maxlength="8" v-model="tagInputValue" class="input-new-tag" ref="saveTagInput" type="text">
</div>
<!-- <div v-if="showMoreTags" class="choseItem" style="padding:0 10px">
<el-dropdown ref="mydrown" trigger="click" @visible-change="listenDrop">
<i class="el-icon-arrow-down"></i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(el,indexs) in moreTags" :key="indexs">
<div @click.stop="changeGoodsCategory({ id: el.id, index:indexs })" class="drow_class">
<div class="title">{{el.goodsCategory}}</div>
<i class="del el-icon-close" @click.stop="categoryDelete(el.id)"></i>
</div>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div> -->
<div class="choseItem" @click="toAddEquity">+</div>
</div>
<!-- <div class="tags-box">
......@@ -57,7 +70,7 @@
<div class="table_box">
<div class="tableTop topP">
<span>权益列表</span>
<GLButton fn="添加汽车权益" type="primary" size="small" @click="addEquity(1)">添加汽车权益</GLButton>
<GLButton fn="添加门店权益" type="primary" size="small" @click="addEquity(2)">添加门店权益</GLButton>
</div>
<GLTable ref="goodsTable" :tableParams="goodsTableParams" :tableData="goodsTableData" :tableTotal="tableTotal">
<div slot="mainPageFlag" slot-scope="scope">
......@@ -218,6 +231,11 @@ export default {
this.init()
},
methods: {
listenDrop(e){
if(!e){
this.$refs.mydrown.hide()
}
},
toAddEquity(){
this.inputVisible = true
setTimeout(()=>{
......@@ -329,9 +347,9 @@ export default {
.tags {
background: #f4f6fc;
}
.tags-box {
// .tags-box {
}
// }
.tags.el-tag {
background: #ffffff !important;
border-radius: 4px !important;
......@@ -431,6 +449,7 @@ export default {
margin-bottom: -1px;
.choseRow{
display: flex;
overflow: hidden;
.choseItem {
display: inline-block;
box-sizing: border-box;
......@@ -454,6 +473,19 @@ export default {
margin-left: 8px;
}
}
.hideText{
// overflow: hidden;
// text-overflow: ellipsis;
white-space: nowrap;
}
}
.drow_class{
display: flex;
align-items: center;
justify-content: space-between;
.title{
min-width: 75px;
}
}
.table_box{
border: 1px solid #e5e5e5;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!