zgg-ui
Version:
2.0.1 正式版本 基于 Vue 3、UniApp 和 TypeScript 开发的多端适配移动端 UI 组件库,旨在提供丰富的组件集合,帮助开发者快速构建多端响应式的移动应用界面
30 lines (23 loc) • 602 B
text/typescript
import { getCurrentInstance } from 'vue'
import type { ComponentInternalInstance } from 'vue'
import z from '../libs/z'
//组件的共同方法
interface PropsTypeHook {
otherStyle: object | any
otherClass: string
url: string
linkType: string
}
const propsHook: PropsTypeHook = {
otherStyle: () => ({}),
otherClass: '',
url: '',
linkType: 'navigateTo',
}
// 跳转某一个页面
const openPage = (url: string, linkType: string = 'navigateTo') => {
if (url) {
;(uni as any)[linkType]({ url })
}
}
export { PropsTypeHook, propsHook, openPage }