mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-23 06:30:48 +08:00
feat: 修改 @ 样式
This commit is contained in:
8
open-isle-cli/package-lock.json
generated
8
open-isle-cli/package-lock.json
generated
@@ -12,7 +12,7 @@
|
||||
"echarts": "^5.6.0",
|
||||
"ldrs": "^1.1.7",
|
||||
"markdown-it": "^14.1.0",
|
||||
"vditor": "^3.8.7",
|
||||
"vditor": "^3.11.1",
|
||||
"vue": "^3.2.13",
|
||||
"vue-easy-lightbox": "^1.19.0",
|
||||
"vue-echarts": "^7.0.3",
|
||||
@@ -11330,9 +11330,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/vditor": {
|
||||
"version": "3.8.7",
|
||||
"resolved": "https://registry.npmjs.org/vditor/-/vditor-3.8.7.tgz",
|
||||
"integrity": "sha512-7loYmcj1TCkJV86qwstxzAy33GweFKdJnpiSzGGPqUzDaOcUAiaiFAjIQjxwJ3/sx7pNZf1NWLhXKabXEN7xzQ==",
|
||||
"version": "3.11.1",
|
||||
"resolved": "https://registry.npmjs.org/vditor/-/vditor-3.11.1.tgz",
|
||||
"integrity": "sha512-7rjNSXYVyZG0mVZpUG2tfxwnoNtkcRCnwdSju+Zvpjf/r72iQa6kLpeThFMIKPuQ5CRnQQv6gnR3eNU6UGbC2Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"diff-match-patch": "^1.0.5"
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": "^3.8.3",
|
||||
"echarts": "^5.6.0",
|
||||
"ldrs": "^1.1.7",
|
||||
"markdown-it": "^14.1.0",
|
||||
"vditor": "^3.8.7",
|
||||
"vditor": "^3.11.1",
|
||||
"vue": "^3.2.13",
|
||||
"vue-router": "^4.5.1",
|
||||
"vue-toastification": "^2.0.0-rc.5",
|
||||
"vue-easy-lightbox": "^1.19.0",
|
||||
"echarts": "^5.6.0",
|
||||
"vue-echarts": "^7.0.3"
|
||||
"vue-echarts": "^7.0.3",
|
||||
"vue-router": "^4.5.1",
|
||||
"vue-toastification": "^2.0.0-rc.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.16",
|
||||
|
||||
@@ -43,14 +43,18 @@ export function createVditor(editorId, options = {}) {
|
||||
theme: getEditorTheme(),
|
||||
preview: Object.assign({ theme: { current: getPreviewTheme() } }, preview),
|
||||
hint: {
|
||||
delay: 200,
|
||||
at: async (value) => {
|
||||
const list = await fetchMentions(value)
|
||||
return list.map(u => ({
|
||||
value: u.username,
|
||||
html: `<span>@${u.username}</span>`
|
||||
}))
|
||||
}
|
||||
extend: [
|
||||
{
|
||||
key: '@',
|
||||
hint: async (key) => {
|
||||
const list = await fetchMentions(key)
|
||||
return list.map(u => ({
|
||||
value: `@[${u.username}]`,
|
||||
html: `<img src="${u.avatar}" /> @${u.username}`
|
||||
}))
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
cdn: 'https://openisle-1307107697.cos.ap-guangzhou.myqcloud.com/assert/vditor',
|
||||
toolbar: [
|
||||
|
||||
@@ -68,6 +68,7 @@ public class SearchController {
|
||||
UserDto dto = new UserDto();
|
||||
dto.setId(user.getId());
|
||||
dto.setUsername(user.getUsername());
|
||||
dto.setAvatar(user.getAvatar());
|
||||
return dto;
|
||||
}
|
||||
|
||||
@@ -82,6 +83,7 @@ public class SearchController {
|
||||
private static class UserDto {
|
||||
private Long id;
|
||||
private String username;
|
||||
private String avatar;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
Reference in New Issue
Block a user