Files
FunJiaUI_Vue_Package/README.md
T

51 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# FunJiaUI_Vue_Package
FunjiaUI 组件库的**构建产物仓库**,由源码仓库 [FunjiaUI_Vue](https://git.funjia.top/13429193897/FunjiaUI_Vue) 构建后同步过来。
本仓库只放产物,不要在这里改代码 —— 源码改动请提到源码仓库。
## 产物清单
| 文件 / 目录 | 说明 |
| --- | --- |
| `funjiaui.es.js` | ES Module 入口(`module`,Vite / Webpack 等打包器优先用它) |
| `funjiaui.cjs.js` | CommonJS 入口(`main`) |
| `funjiaui.umd.js` | UMD 入口(`unpkg` / `jsdelivr`),全局名 `funjiaUI` |
| `style.css` | 组件样式,需要手动引入(产物不自动注入样式) |
| `index.d.ts` | 类型入口,以及各组件目录下的 `.d.ts` 声明 |
| `UmTable/` `UmTree/` `UmTreeSelect/` `UmDialog/` `UmPagination/` `Iconfont/` | 各组件的类型声明目录 |
外部依赖只有 3 个,已声明为 `peerDependencies`,需由使用方自行安装:
`vue`、`element-plus`、`@element-plus/icons-vue`。
`lodash-es` / `dayjs` 等已打进产物,不需要单独安装。
## 使用
```bash
npm i git+https://git.funjia.top/13429193897/FunJiaUI_Vue_Package.git
```
```ts
import { UmByClassEnhance } from "funjiaui_vue_package";
import "funjiaui_vue_package/style.css";
```
```vue
<!-- 模板里只挂一个配置类,列表页的查询 / 工具栏 / 操作列 / 弹窗表单都由装饰器描述 -->
<um-by-class-enhance :target="Employee" />
```
UMD 方式(挂到 `window.funjiaUI`):
```html
<link rel="stylesheet" href="./style.css" />
<script src="./funjiaui.umd.js"></script>
```
## 版本
| 版本 | 说明 |
| --- | --- |
| 1.3.0 | 新增**列冻结**(`fixed: "left" \| "right"`、操作列 `operateFixed`),体检新增两条冻结相关规则;顺带修复 `sort: 0` 被当成 `1` 的排序缺陷 |
| 1.2.0 | 内核层重构(core/)、类型统一、编辑链路修复、配置体检、UMD 全局名修正为 `funjiaUI` |
| 1.0.0 | 初版产物(`um_table.es.js`,已被 1.2.0 取代),保留在 `v1.0.0` 标签 |