Commit 7d7b8a40 by 李伟康

commit 修改样式

1 parent 0acefcce
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
</view> </view>
<view class="content"> <view class="content">
<view class="title">问界·商城延保价格明细</view> <view class="title">问界·商城延保价格明细</view>
<tabs <template v-if="views.length">
:list="views" <tabs
@tabclick="changeView" :list="views"
/> @tabclick="changeView"
/>
</template>
<view class="canvas-box"> <view class="canvas-box">
<template v-for="(i,index) in views"> <template v-for="(i,index) in views">
<view <view
...@@ -79,5 +81,10 @@ export default { ...@@ -79,5 +81,10 @@ export default {
text-align: center; text-align: center;
} }
} }
.canvas-box {
view {
animation: show-view 0.5s forwards;
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
</view> </view>
<view class="content"> <view class="content">
<view class="title">问界·汽车产品三包凭证</view> <view class="title">问界·汽车产品三包凭证</view>
<tabs <template v-if="views.length">
:list="views" <tabs
@tabclick="changeView" :list="views"
/> @tabclick="changeView"
/>
</template>
<view class="canvas-box"> <view class="canvas-box">
<template v-for="(i,index) in views"> <template v-for="(i,index) in views">
<view <view
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
</view> </view>
<view class="content"> <view class="content">
<view class="title">历史成交记录</view> <view class="title">历史成交记录</view>
<Tabs :list="list" @tabclick="tabclick" /> <template v-if="list.length && shopMerchantId">
<Tabs :list="list" @tabclick="tabclick" />
</template>
<view class="card-list"> <view class="card-list">
<!-- <uni-grid :column="3" :show-border="false" :square="false"> <!-- <uni-grid :column="3" :show-border="false" :square="false">
<uni-grid-item v-for="item in historyList" :key="item.id"> --> <uni-grid-item v-for="item in historyList" :key="item.id"> -->
...@@ -48,6 +50,7 @@ import Tabs from './Tabs.vue'; ...@@ -48,6 +50,7 @@ import Tabs from './Tabs.vue';
export default { export default {
name: 'Media_6', name: 'Media_6',
props: { props: {
show:Boolean
}, },
components: {Tabs}, components: {Tabs},
data () { data () {
...@@ -77,14 +80,25 @@ export default { ...@@ -77,14 +80,25 @@ export default {
isEnd: false isEnd: false
} }
}, },
watch:{
show(n){
if(n) this.init()
}
},
mounted () { mounted () {
const { shopMerchantId } = uni.$storage.get("userInfo"); if(this.show) this.init()
this.shopMerchantId = shopMerchantId // const { shopMerchantId } = uni.$storage.get("userInfo");
this.getQuotationList(); // this.shopMerchantId = shopMerchantId
// this.getQuotationList();
}, },
methods: { methods: {
init(){
const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId
this.getQuotationList();
},
async getQuotationList() { async getQuotationList() {
const { goodsName, shopMerchantId, currentPage } = this const { goodsName, shopMerchantId, currentPage } = this
this.currentPage++ this.currentPage++
......
...@@ -3,12 +3,14 @@ ...@@ -3,12 +3,14 @@
<template v-for="(item,index) in list"> <template v-for="(item,index) in list">
<view <view
:class="['tab',{active:index == tabIndex}]" :class="['tab',{active:index == tabIndex}]"
:ref="`tab-${index}`"
:key="index" :key="index"
@click="tabClick(index)" @click="tabClick(index)"
> >
{{item.tabName}} {{item.tabName}}
</view> </view>
</template> </template>
<view class="border" :style="borderLeft"></view>
</view> </view>
</template> </template>
...@@ -20,15 +22,22 @@ export default { ...@@ -20,15 +22,22 @@ export default {
}, },
data () { data () {
return { return {
tabIndex: 0 tabIndex: 0,
borderLeft: 'left:50%;'
} }
}, },
mounted () { mounted () {
this.setBorderLeft()
}, },
methods: { methods: {
tabClick (index) { tabClick (index) {
this.tabIndex = index this.tabIndex = index
this.$emit('tabclick', index) this.$emit('tabclick', index)
this.setBorderLeft()
},
setBorderLeft(){
let {tabIndex} = this
this.borderLeft = `left:${this.$refs[`tab-${tabIndex}`][0].$el.offsetLeft}px`
} }
} }
} }
...@@ -42,11 +51,12 @@ export default { ...@@ -42,11 +51,12 @@ export default {
width: 100%; width: 100%;
gap: 0 32rpx; gap: 0 32rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
position: relative;
.tab { .tab {
width: 384rpx; width: 384rpx;
height: 80rpx; height: 80rpx;
background: #ffffff; background: #ffffff;
border: 2rpx solid #dce0e6; // border: 2rpx solid #dce0e6;
font-size: 32rpx; font-size: 32rpx;
color: #292d33; color: #292d33;
box-sizing: border-box; box-sizing: border-box;
...@@ -55,9 +65,20 @@ export default { ...@@ -55,9 +65,20 @@ export default {
justify-content: center; justify-content: center;
} }
.active { .active {
border: 4rpx solid #292d33; // border: 4rpx solid #292d33;
font-weight: 500; font-weight: 500;
color: #292d33; color: #292d33;
} }
.border{
width: 384rpx;
height: 80rpx;
border: 4rpx solid #292d33;
box-sizing: border-box;
position: absolute;
left: 0;
top: 0;
transition: all .25s;
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<media_5 :views="media[5]" :penSwitch="type != 'preview' && drawStatus" /> <media_5 :views="media[5]" :penSwitch="type != 'preview' && drawStatus" />
</view> </view>
<view :class="['view', { showView: id == 6 }]"> <view :class="['view', { showView: id == 6 }]">
<media_6 ref="history" :views="media[id]" /> <media_6 ref="history" :show="id == 6" />
</view> </view>
<pay-pop ref="pay"></pay-pop> <pay-pop ref="pay"></pay-pop>
<template v-if="type != 'preview'"> <template v-if="type != 'preview'">
...@@ -126,6 +126,7 @@ export default { ...@@ -126,6 +126,7 @@ export default {
}, },
async getFindSoureDetail(id) { async getFindSoureDetail(id) {
try { try {
if(id == 6) return
if (!this.media[id].length) if (!this.media[id].length)
this.media[id] = this.media[id] =
(await uni.$api.commonApi.getFindSoureDetail({ id })) || []; (await uni.$api.commonApi.getFindSoureDetail({ id })) || [];
...@@ -183,7 +184,7 @@ export default { ...@@ -183,7 +184,7 @@ export default {
.showView { .showView {
z-index: 2; z-index: 2;
display: block; display: block;
animation: show-view .15s forwards; animation: show-view .25s forwards;
} }
.pen-box { .pen-box {
position: fixed; position: fixed;
...@@ -195,12 +196,4 @@ export default { ...@@ -195,12 +196,4 @@ export default {
z-index: 3; z-index: 3;
box-shadow: 0 4px 12px 0 #00000033; box-shadow: 0 4px 12px 0 #00000033;
} }
@keyframes show-view{
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
</style> </style>
...@@ -2,3 +2,11 @@ ...@@ -2,3 +2,11 @@
* 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量 * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量
* uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用
*/ */
@keyframes show-view{
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!