|
|
@@ -47,14 +47,15 @@
|
|
|
<table class="table table-bordered" style="table-layout:fixed;">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <td v-for="pro in properties" class="list-menu td-width word-break" split-dropdown-trigger="pro.id" v-on:mouseenter="triggerOnMouseEnter(pro.id)">
|
|
|
+ <td v-for="(pro, index) in properties" class="list-menu td-width word-break" split-dropdown-trigger="pro.id"
|
|
|
+ @mouseenter="show_exp_list(pro,index)">
|
|
|
<span class="dropdown-toggle dropdown-back" data-toggle="dropdown"><span>{{pro.property.labelCn}}</span><span class="fa fa-angle-down td-icon"></span></span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
<tr v-if="hasProperties" class="tr-properties">
|
|
|
- <td v-for="pro in properties" class="td-properties" style="vertical-align:middle;">
|
|
|
+ <td v-for="pro in properties" class="td-properties" style="vertical-align:middle;" >
|
|
|
<span class="sl-selected" v-if="pro.selected" @click="selectProperty(pro)">
|
|
|
<a class="text-num">{{pro.selected.value}}</a>
|
|
|
<span><i class="fa fa-close"></i></span>
|
|
|
@@ -69,14 +70,9 @@
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <div v-for="pro in properties" split-dropdown-toggle="pro.id" class="x-split-dropdown-toggle" style="top: 40px !important;display: block">
|
|
|
- <ul class="parameter-selection-ul drop-down-list" role="menu" aria-labelledby="dropdownMenu1">
|
|
|
- <!--|orderBy:'value'-->
|
|
|
- <li v-for="v in pro.values"><a @click="selectPropertyValue(pro, value)" class="a-color"><span>{{v.value}}</span></a></li>
|
|
|
+ <ul v-show="selectedProperties.values" @mouseleave="hide_exp_list()" class="parameter-selection-ul drop-down-list" role="menu" aria-labelledby="dropdownMenu1">
|
|
|
+ <li v-for="v in selectedProperties.values"><a @click="selectPropertyValue(selectedProperties, value)" class="a-color"><span>{{v.value}}</span></a></li>
|
|
|
</ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -89,7 +85,8 @@
|
|
|
hasProperties: false,
|
|
|
selectedBrand: {
|
|
|
nameCn: null
|
|
|
- }
|
|
|
+ },
|
|
|
+ selectedProperties: {}
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
@@ -139,6 +136,16 @@
|
|
|
},
|
|
|
selectPropertyValue (item, value) {
|
|
|
return null
|
|
|
+ },
|
|
|
+ show_exp_list: function (pro, index) {
|
|
|
+ this.selectedProperties = pro
|
|
|
+ let dom = document.getElementsByClassName('drop-down-list')[0]
|
|
|
+ let list = document.getElementsByClassName('list-menu')[index]
|
|
|
+ let left = list.getBoundingClientRect().left - 169
|
|
|
+ dom.setAttribute('style', 'left: ' + left + 'px')
|
|
|
+ },
|
|
|
+ hide_exp_list: function () {
|
|
|
+ this.selectedProperties = {}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -741,4 +748,11 @@
|
|
|
text-overflow: ellipsis;
|
|
|
float: left;
|
|
|
}
|
|
|
+ .drop-down-list {
|
|
|
+ max-width: 150px;
|
|
|
+ position: absolute;
|
|
|
+ top: 40px;
|
|
|
+ left: 135px;
|
|
|
+ border: 1px solid #ddd;
|
|
|
+ }
|
|
|
</style>
|