<template>
    <app-view class="app-html">
        <template #header>
            <app-navbar title="平台规则" />
        </template>
        <Tabs class="mine-generalize__tabs" v-model:active="active" @click-tab="onClickTab" sticky>
            <Tab title="平台规则" />
            <Tab title="买家规则" />
            <Tab title="卖家规则"/>
            <Tab title="积分规则"/>
        </Tabs>
        <app-html v-if="active === 0" url="./html/ptgz.htm" />
        <app-html v-if="active === 1" url="./html/mjgz_b.htm" />
        <app-html v-if="active === 2" url="./html/mjgz_s.htm" />
        <app-html v-if="active === 3" url="./html/jfgz.htm" />
    </app-view>
</template>

<script lang="ts" setup>

    import { ref } from 'vue'
    import AppHtml from '@mobile/components/base/html-panel/index.vue'
    import { Tab, Tabs } from 'vant'

    /// tab激活项
    const active = ref(0);
    const onClickTab = (e: any ) => {
        active.value = e.name
    };

</script>