Appearance
引入组件
局部引入
ts
// parent.vue
const FDropdown = defineAsyncComponent(() => import('@/components/formaui/f-dropdown/f-dropdown.vue'))基础用法
html
<f-dropdown v-model="showDropdown">
<f-button width="200rpx" margin="200rpx auto 0" @click="showDropdown = !showDropdown">click</f-button>
<template #content>
<view class="w-[680rpx] mx-auto mt-[20rpx] h-[400rpx] bg-gray-200 rounded-md flex justify-center items-center">这里是下拉框内容</view>
</template>
</f-dropdown>ts
import { ref } from 'vue'
const showDropdown = ref<boolean>(false)插槽
| 名称 | 说明 |
|---|---|
| default | - |
| content | 下拉框内容 |
属性
| 名称 | 类型 | 说明 | 默认值 |
|---|---|---|---|
v-model | boolean | 是否显示下拉框 | - |
事件
| 事件名 | 说明 | 回调参数 |
|---|---|---|
| - | - | - |
方法
| 方法名 | 说明 | 传入参数 |
|---|---|---|
| - | - | - |
