mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 17:18:40 +08:00
feat: ✨ NavbarCapsule 导航胶囊组件支持外部传入样式
This commit is contained in:
parent
4575099b9b
commit
fb980e7d9b
@ -0,0 +1,8 @@
|
||||
import type { ExtractPropTypes } from 'vue'
|
||||
import { baseProps } from '../common/props'
|
||||
|
||||
export const navbarCapsuleProps = {
|
||||
...baseProps
|
||||
}
|
||||
|
||||
export type NavbarCapsuleProps = ExtractPropTypes<typeof navbarCapsuleProps>
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="wd-navbar-capsule">
|
||||
<view :class="`wd-navbar-capsule ${customClass}`" :style="customStyle">
|
||||
<wd-icon @click="handleBack" name="chevron-left" custom-class="wd-navbar-capsule__icon" />
|
||||
<wd-icon @click="handleBackHome" name="home" custom-class="wd-navbar-capsule__icon" />
|
||||
</view>
|
||||
@ -17,7 +17,10 @@ export default {
|
||||
|
||||
<script lang="ts" setup>
|
||||
import wdIcon from '../wd-icon/wd-icon.vue'
|
||||
import { navbarCapsuleProps } from './types'
|
||||
|
||||
const emit = defineEmits(['back', 'back-home'])
|
||||
defineProps(navbarCapsuleProps)
|
||||
|
||||
function handleBack() {
|
||||
emit('back')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user