halo/ui
Takagi f40014d005
fix: error occurs when the link is purely numerical (#5479)
#### What type of PR is this?

/kind bug
/area editor
/area ui
/milestone 2.14.x

#### What this PR does / why we need it:

在默认的富文本编辑器中,使用了 [tiptap link](b3ef574f3d/packages/extension-link/src/link.ts (L127C3-L135C5)) ,而其中的 renderHTML 会对 href 进行处理,但当链接为纯数字的时候,`HTMLAttributes.href` 将不会有 `startsWith` 方法。

此 PR 将在解析 renderHTML 时,将 `HTMLAttributes.href` 转为 string,进而解决这个问题。

#### How to test it?

测试使用默认富文本编辑器时,编写一个链接,并将其设置为纯数字。
刷新页面,查看是否具有报错。

#### Which issue(s) this PR fixes:

Fixes #5478 

#### Does this PR introduce a user-facing change?
```release-note
解决在默认富文本编辑器中当链接为纯数字时报错的问题
```
2024-03-14 05:06:07 +00:00
..
.changeset Move folder console to ui 2024-02-02 22:22:51 +08:00
.husky Fix the problem of being unable to commit (#5362) 2024-02-18 08:00:16 +00:00
.vscode Move folder console to ui 2024-02-02 22:22:51 +08:00
console-src fix: unable to manually fill in the publish time (#5472) 2024-03-14 05:04:07 +00:00
cypress Move folder console to ui 2024-02-02 22:22:51 +08:00
docs Move folder console to ui 2024-02-02 22:22:51 +08:00
packages fix: error occurs when the link is purely numerical (#5479) 2024-03-14 05:06:07 +00:00
public Move folder console to ui 2024-02-02 22:22:51 +08:00
src pref: refactor default editor audio block upload logic (#5421) 2024-03-14 05:02:07 +00:00
uc-src refactor: optimize notification and subscription query using index (#5414) 2024-02-27 11:53:13 +00:00
.editorconfig Move folder console to ui 2024-02-02 22:22:51 +08:00
.env.development Move folder console to ui 2024-02-02 22:22:51 +08:00
.env.production Move folder console to ui 2024-02-02 22:22:51 +08:00
.eslintrc.cjs Move folder console to ui 2024-02-02 22:22:51 +08:00
.gitignore Move folder console to ui 2024-02-02 22:22:51 +08:00
.gitpod.yml Move folder console to ui 2024-02-02 22:22:51 +08:00
.npmignore Move folder console to ui 2024-02-02 22:22:51 +08:00
.npmrc Move folder console to ui 2024-02-02 22:22:51 +08:00
.prettierignore Move folder console to ui 2024-02-02 22:22:51 +08:00
Makefile Move folder console to ui 2024-02-02 22:22:51 +08:00
OWNERS Move folder console to ui 2024-02-02 22:22:51 +08:00
README.md Move folder console to ui 2024-02-02 22:22:51 +08:00
build.gradle Add build script for ui project 2024-02-03 22:51:50 +08:00
cypress.json Move folder console to ui 2024-02-02 22:22:51 +08:00
env.d.ts chore: bump formkit version to 1.5.x (#5395) 2024-02-29 09:57:39 +00:00
index.html Move folder console to ui 2024-02-02 22:22:51 +08:00
package.json chore: bump overlayscrollbars version to 2.5.0 (#5471) 2024-03-11 00:46:08 +00:00
pnpm-lock.yaml chore: bump overlayscrollbars version to 2.5.0 (#5471) 2024-03-11 00:46:08 +00:00
pnpm-workspace.yaml Move folder console to ui 2024-02-02 22:22:51 +08:00
postcss.config.js Move folder console to ui 2024-02-02 22:22:51 +08:00
prettier.config.js Move folder console to ui 2024-02-02 22:22:51 +08:00
tailwind.config.js Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.app.json chore: bump vue related packages version (#5384) 2024-02-22 03:12:07 +00:00
tsconfig.json Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.node.json Move folder console to ui 2024-02-02 22:22:51 +08:00
tsconfig.vitest.json Move folder console to ui 2024-02-02 22:22:51 +08:00
vite.config.ts Add build script for ui project 2024-02-03 22:51:50 +08:00
vite.uc.config.ts Add build script for ui project 2024-02-03 22:51:50 +08:00
vitest.config.ts Add build script for ui project 2024-02-03 22:51:50 +08:00

README.md

README

Halo logo

Halo 2.0 的管理端项目(原 halo-admin

GitHub release GitHub GitHub last commit GitHub Workflow Status Gitpod ready-to-code


当前仓库已经将 halo-admin 改为了 console。但对于 Halo 1.x 版本,依旧保持 halo-admin 的概念。

开发环境运行

npm install -g pnpm@8
pnpm install 
pnpm build:packages
pnpm dev

生产构建

pnpm build

状态

Repobeats analytics