chore: migrate timi-web imports to @timi/web
This commit is contained in:
@@ -2,15 +2,15 @@
|
||||
|
||||
Timi Web 的业务 API、领域类型、用户状态和权限相关能力。
|
||||
|
||||
通用组件与工具位于 [timi-web](https://gitea.imyeyu.com/timi/timi-web),本项目使用自己的 Axios 网络层,并依赖它提供 Cookie、Storage 等通用工具。
|
||||
通用组件与工具位于 [@timi/web](https://gitea.imyeyu.com/timi/timi-web),本项目使用自己的 Axios 网络层,并依赖它提供 Cookie、Storage 等通用工具。
|
||||
|
||||
## 依赖方向
|
||||
|
||||
本项目是独立的业务能力包。只有需要业务 API、领域类型、用户状态或权限能力的项目才安装 `timi-web-api`;只使用通用组件的项目不需要安装本项目。
|
||||
|
||||
```text
|
||||
只使用通用组件的业务项目 -> timi-tdesign-mobile / timi-tdesign-pc -> timi-web
|
||||
需要业务能力的业务项目 -> timi-web-api -> timi-web
|
||||
只使用通用组件的业务项目 -> timi-tdesign-mobile / timi-tdesign-pc -> @timi/web
|
||||
需要业务能力的业务项目 -> timi-web-api -> @timi/web
|
||||
```
|
||||
|
||||
`timi-tdesign-mobile` 和 `timi-tdesign-pc` 不依赖 `timi-web-api`。其中的文章、通知组件只约束 `Article`、`Attachment`、`NotifyDetail` 的最小字段,业务对象可以携带自定义字段,并通过上传和资源解析回调接入任意后端。
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* 负责统一内容类型、附件标识和存储前的富文本格式,平台层不参与这些规则。
|
||||
*/
|
||||
import type { ArticleContentType, Attachment } from "../types";
|
||||
import { ATTACHMENT_ID_ATTR, isLocalMediaId, normalizeContent, TEMP_FILE_ID_ATTR } from "timi-web/editor";
|
||||
import { ATTACHMENT_ID_ATTR, isLocalMediaId, normalizeContent, TEMP_FILE_ID_ATTR } from "@timi/web/editor";
|
||||
|
||||
/** 文章内容中附件和临时文件的标识前缀。 */
|
||||
export const ATTACHMENT_ID_PREFIX = "attachment-id:";
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
/** 业务编辑器数据适配和通用编辑器能力出口。 */
|
||||
export * from "timi-web/editor";
|
||||
export * from "@timi/web/editor";
|
||||
export * from "./article";
|
||||
export * from "./notify";
|
||||
export type { Article, ArticleContentType } from "../types/Article";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {defineStore} from "pinia";
|
||||
import {computed, reactive, readonly, ref} from "vue";
|
||||
import type {CaptchaData, LoginRequest, LoginResponse, LoginUser} from "../types";
|
||||
import {Cooker, Storage} from "timi-web";
|
||||
import {Cooker, Storage} from "@timi/web";
|
||||
import {UserAPI} from "../api";
|
||||
|
||||
/** 用户 Store 配置项 */
|
||||
|
||||
Reference in New Issue
Block a user