tabby-commons
v1.0.4
Published
- 掌信科技WEB前端公用库 - 技术栈: [Vue3](https://v3.cn.vuejs.org) + [Element Plus](https://element-plus.org/zh-CN) + [Vite](https://cn.vitejs.dev)
Readme
简介
- 掌信科技WEB前端公用库
- 技术栈: Vue3 + Element Plus + Vite
安装
# 使用 npm 安装
npm install tabby-commons
# 使用 yarn 安装
yarn add tabby-commons
组件
- 文件上传:FileUpload
- 选择用户:ChoiceUser
- 动态表单:DynamicForms
- 流程设计:MyProcessDesigner、MyProcessPenal、DesignBpmn、ProcessViewer
- ......
# e.g.
<template>
<!-- 文件上传 -->
<FileUpload></FileUpload>
</template>
工具类/常量
- utils工具:completeUrl, getNormalPath, isExternal, isHttp, getToken, setToken, removeToken, auth
- axios封装:request
- 常量:constant
# utils工具 使用
import { utils } from 'tabby-commons'
utils.getToken()
# request 使用
import { request } from 'tabby-commons'
export function getDicts() {
return request({
url: '',
...
})
}
vue3全局函数
- moment, resetForm, handleTree, addDateRange, selectDictLabel, createUniqueString, setBtnColor, download, useDict, param2Obj, mapFormItem, smalltoBIG, $highlight
- $cache, $modal, $download, $chart, $bus, $auth
# script 中使用
import { ref, getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance()
proxy.resetForm('queryForm')
# <template> 中使用
<span v-html="$highlight(name, searchKey)"></span>
