feat: 快速预定功能调整
This commit is contained in:
@@ -10,14 +10,24 @@
|
||||
]"
|
||||
@click="handleTabClick(index)"
|
||||
>
|
||||
<text
|
||||
:class="[
|
||||
'font-size-16 font-500 color-525866 absolute',
|
||||
activeIndex === index && 'tab-text-active',
|
||||
]"
|
||||
>
|
||||
{{ item.label }}
|
||||
</text>
|
||||
<view class="absolute flex flex-items-center">
|
||||
<uni-icons
|
||||
class="icon mr-4"
|
||||
fontFamily="znicons"
|
||||
size="20"
|
||||
:color="activeIndex === index ? '#2D91FF' : '#525866'"
|
||||
>
|
||||
{{ zniconsMap[item.icon] }}
|
||||
</uni-icons>
|
||||
<text
|
||||
:class="[
|
||||
'font-size-16 font-500 color-525866 ',
|
||||
activeIndex === index && 'tab-text-active',
|
||||
]"
|
||||
>
|
||||
{{ item.label }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -45,6 +55,7 @@ import {
|
||||
watch,
|
||||
getCurrentInstance,
|
||||
} from "vue";
|
||||
import { zniconsMap } from "@/static/fonts/znicons";
|
||||
|
||||
// 获取组件实例
|
||||
const instance = getCurrentInstance();
|
||||
@@ -54,10 +65,10 @@ const props = defineProps({
|
||||
tabs: {
|
||||
type: Array,
|
||||
default: () => [
|
||||
{ label: "客房", value: "0" },
|
||||
{ label: "门票", value: "1" },
|
||||
{ label: "餐食", value: "2" },
|
||||
{ label: "套餐", value: "3" },
|
||||
{ label: "客房", value: "0", icon: "zn-nav-room" },
|
||||
{ label: "门票", value: "1", icon: "zn-nav-ticket" },
|
||||
{ label: "餐食", value: "2", icon: "zn-nav-meal" },
|
||||
// { label: "套餐", value: "3", icon: "zn-package" },
|
||||
],
|
||||
},
|
||||
defaultActive: {
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.icon {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.tab-item-active {
|
||||
&::before {
|
||||
content: "";
|
||||
|
||||
Reference in New Issue
Block a user