From 12c48f04f9ea1a57781a6e8c5c9ef901eaad8518 Mon Sep 17 00:00:00 2001 From: xuxueyang <xuxy@fengyuntec.com> Date: 星期四, 05 九月 2024 22:31:17 +0800 Subject: [PATCH] merge 1.小程序-花店:1.1-浏览记录建议改成显示30条数据; 1.2-增加一个一键清空已失效商品 2.小程序-花店:增加热区跳转进入店铺 及 点击头像和名字也可以跳转进入店铺 3.小程序-花店:轮播图指示点优化去掉 4.小程序-花店:登录,注册失去焦点验证手机号 --- components/top-tabs.vue | 53 ++++++++++++++++++++++++++++++++++------------------- 1 files changed, 34 insertions(+), 19 deletions(-) diff --git a/components/top-tabs.vue b/components/top-tabs.vue index bb591fc..2915b97 100644 --- a/components/top-tabs.vue +++ b/components/top-tabs.vue @@ -1,8 +1,8 @@ <template> - <view class="flex top-tabs"> + <view class="flex top-tabs" :class="[type]"> <view class="top-tab t-grey p10" v-for="(item,index) of tabs" @tap="changeIndex(index)" :class="[''+index==flg?'active':'']"> - {{item.name || item.label || ''}} + {{ item.name || item.label || '' }} </view> </view> </template> @@ -11,22 +11,21 @@ export default { name: "top-tabs", data() { - return { - - }; + return {}; }, props: { tabs: { type: Array, default: [] }, - flg: "" + flg: "", + type: '', }, methods: { changeIndex(index) { - if(index==this.flg){ - - }else{ + if (index == this.flg) { + + } else { this.$emit('update:flg', index) this.$emit('change', index) } @@ -36,25 +35,39 @@ } </script> -<style lang="scss"> - .top-tabs { +<style lang="scss" scoped> + .top-tabs.coupon { .top-tab { - color: #000000; - // flex: 1; + color: var(----topicdarkgray); } .top-tab.active { - color: #000; + color: var(--topicolor); + } + + .top-tab.active::before { + background: var(--topicolor); + bottom: 0rpx; + } + } + + .top-tabs { + .top-tab { + color: #ffffff; + flex: 1; + text-align: center; + } + + .top-tab.active { + color: #ffffff; font-weight: 600; // border-bottom: 8rpx solid #000; // 底部的线条 - font-family: PingFangSC, PingFang SC; font-weight: 600; font-size: 36rpx; - color: #000000; line-height: 32rpx; - text-align: left; + text-align: center; font-style: normal; // padding: 0rpx; width: fit-content; @@ -69,8 +82,10 @@ bottom: 8rpx; // width: 110rpx; height: 8rpx; - background: #04BA97; + // background: #04BA97; + background: #ffffff; + border-radius: 4rpx; } } -</style> +</style> \ No newline at end of file -- Gitblit v1.9.3