ano-ui
Version:
<p align="center"> <img src="https://github.com/ano-ui/ano-ui/raw/main/public/logo.svg" style="width:100px;" /> <h1 align="center">Ano-UI (WIP)</h1> <p align="center">An UniApp UI components with UnoCSS.</p> </p> <p align="center"> <a href="https://www.np
26 lines (21 loc) • 869 B
text/typescript
import type { ExtractPropTypes } from 'vue'
import { CHANGE_EVENT, CLICK_EVENT, UPDATE_MODEL_EVENT } from '../constants'
import { useCustomClassProp, useCustomStyleProp } from '../composables'
import { isNumber, isString, makeNumericProp } from '../utils'
export const tabBarItemProps = {
customClass: useCustomClassProp,
customStyle: useCustomStyleProp,
name: makeNumericProp(''),
icon: String,
url: String,
}
export type TabBarItemValueType = string | number
export const tabBarItemEmits = {
[CLICK_EVENT]: (evt: MouseEvent) => evt instanceof Object,
[UPDATE_MODEL_EVENT]: (val: TabBarItemValueType) =>
isString(val) || isNumber(val),
[CHANGE_EVENT]: (val: TabBarItemValueType) =>
isString(val) || isNumber(val),
}
export type TabBarItemProps = ExtractPropTypes<typeof tabBarItemProps>
export type TabBarItemEmits = typeof tabBarItemEmits