|
@@ -53,7 +53,7 @@
|
|
<a href="javascript:;" class="active">查看发票</a>
|
|
<a href="javascript:;" class="active">查看发票</a>
|
|
</div>
|
|
</div>
|
|
<div class="w invoice_status" v-if="invoiceData.length > 1">
|
|
<div class="w invoice_status" v-if="invoiceData.length > 1">
|
|
- <div class="white_shadow left_shadow" @click="clickArrow('left')" v-if="invoiceData.length > 6 && leftBtn">
|
|
|
|
|
|
+ <div class="white_shadow left_shadow" @click="clickArrow('left')" v-if="leftBtn">
|
|
<div class="el-iconfont">
|
|
<div class="el-iconfont">
|
|
<i class="el-icon-arrow-left"></i>
|
|
<i class="el-icon-arrow-left"></i>
|
|
</div>
|
|
</div>
|
|
@@ -67,7 +67,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="white_shadow right_shadow" @click="clickArrow('right')" v-if="invoiceData.length > 6 && rightBtn">
|
|
|
|
|
|
+ <div class="white_shadow right_shadow" @click="clickArrow('right')" v-if="showRightBtn && rightBtn">
|
|
<div class="el-iconfont">
|
|
<div class="el-iconfont">
|
|
<i class="el-icon-arrow-right"></i>
|
|
<i class="el-icon-arrow-right"></i>
|
|
</div>
|
|
</div>
|
|
@@ -444,7 +444,8 @@
|
|
loading: true,
|
|
loading: true,
|
|
leftBtn: false,
|
|
leftBtn: false,
|
|
rightBtn: true,
|
|
rightBtn: true,
|
|
- invoice_text: ''
|
|
|
|
|
|
+ invoice_text: '',
|
|
|
|
+ showRightBtn: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -452,6 +453,20 @@
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
$('#check_invoice').show()
|
|
$('#check_invoice').show()
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ const checkInvoiceDisplay = () => {
|
|
|
|
+ let canhandleNum = 0
|
|
|
|
+ const itemAllWidth = $('.invoice_status_item').map(function() {
|
|
|
|
+ return $(this).outerWidth() + 12;
|
|
|
|
+ }).get();
|
|
|
|
+ this.showRightBtn = itemAllWidth.reduce((sum, width) => sum + width, 0) - 1200 > 0;
|
|
|
|
+ if (itemAllWidth.length === 0 && canhandleNum < 10) {
|
|
|
|
+ canhandleNum++
|
|
|
|
+ setTimeout(checkInvoiceDisplay, 50)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ checkInvoiceDisplay()
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 联系客服
|
|
// 联系客服
|
|
@@ -520,7 +535,6 @@
|
|
clickArrow(data) {
|
|
clickArrow(data) {
|
|
var invoiceStatusList = $('.invoice_status_list');
|
|
var invoiceStatusList = $('.invoice_status_list');
|
|
var invoiceStatusListWidth = invoiceStatusList.width();
|
|
var invoiceStatusListWidth = invoiceStatusList.width();
|
|
- var invoiceStatusItem = $('.invoice_status_item')
|
|
|
|
var itemAllWidth = $('.invoice_status_item').map(function() {
|
|
var itemAllWidth = $('.invoice_status_item').map(function() {
|
|
return $(this).outerWidth() + 12; // 获取包括内边距的宽度 + margin值
|
|
return $(this).outerWidth() + 12; // 获取包括内边距的宽度 + margin值
|
|
}).get();
|
|
}).get();
|