feat:组件结构调整

This commit is contained in:
talktao 2022-04-11 22:59:00 +08:00
parent 1b5844759b
commit 01736c0b8f
2 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,7 @@ export default{
<script setup lang="ts">
import { ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
interface topTitleProps {
title?: string,
leftIcon?: string,
@ -46,9 +46,9 @@ export default{
<template>
<van-sticky>
<van-nav-bar :title="title" @click-left="clickLeft" @click-right="clickRight" left-arrow>
<template #left> <van-icon :color="color" size="20" :name="leftIcon" /><span :style="{color}">{{ leftText }}</span> </template>
<template #left> <van-icon :color="color" size="20" :name="leftIcon" /><span :style="color">{{ leftText }}</span> </template>
<template @click-right="onClickRight" #right>
<span :style="{color}">{{ rightText }}</span>
<span :style="color">{{ rightText }}</span>
</template>
</van-nav-bar>
</van-sticky>

View File

@ -8,7 +8,6 @@ export default {
let curComponent = modules[componentPath]?.default
app.component(curComponent.name, curComponent);
})
}