Files
FunJiaUI_Vue_Package/README.md
T
funjia 257805a2fa feat: 产物更新 v1.4.0,新增 UmRemoteClass
同步源码仓库 FunjiaUI_Vue 的 v1.4.0 构建产物。

- 新增 UmRemoteClass(index.vue.d.ts / remoteScript.d.ts 类型声明)
- funjiaui.es.js / cjs.js / umd.js / index.d.ts / style.css 全量重建
- package.json:版本 1.3.1 → 1.4.0;files 白名单补上 UmRemoteClass
  (漏了它的话,按 npm 发布时新组件的类型声明不会进包)
- peerDependencies 未变:vue / element-plus / @element-plus/icons-vue

其余组件声明文件的改动来自本次重新生成(dts 输出格式化差异),行为未变。
2026-09-25 03:20:06 +08:00

53 lines
2.5 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.4.0 | 新增 **`UmRemoteClass`**:运行时加载远端脚本、取 `window` 上的配置类并交给表格渲染,配套导出框架无关的脚本加载器(`loadRemoteScript` / `resolveScriptUrl` / `toGlobalKey` 等)。**刻意不依赖 vue-router**,peerDependencies 未变 |
| 1.3.1 | 修复**编辑弹窗「点确定没反应」**:表单 vnode 改由 `render()` 创建,避免 Vue 3.5 在渲染外重算 computed 导致字符串 ref 失去 owner、`$refs.formRef` 为 null |
| 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` 标签 |