Use router-link instead of a to improve usability
This commit is contained in:
parent
dbb7c756cd
commit
cb9b3c00dd
|
@ -114,10 +114,9 @@ export default Vue.component('misskey-flavored-markdown', {
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'mention': {
|
case 'mention': {
|
||||||
return (createElement as any)('a', {
|
return (createElement as any)('router-link', {
|
||||||
attrs: {
|
attrs: {
|
||||||
href: `${url}/${token.canonical}`,
|
to: `/${token.canonical}`,
|
||||||
target: '_blank',
|
|
||||||
dataIsMe: (this as any).i && getAcct((this as any).i) == getAcct(token),
|
dataIsMe: (this as any).i && getAcct((this as any).i) == getAcct(token),
|
||||||
style: 'color:var(--mfmMention);'
|
style: 'color:var(--mfmMention);'
|
||||||
},
|
},
|
||||||
|
@ -129,10 +128,9 @@ export default Vue.component('misskey-flavored-markdown', {
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'hashtag': {
|
case 'hashtag': {
|
||||||
return [createElement('a', {
|
return [createElement('router-link', {
|
||||||
attrs: {
|
attrs: {
|
||||||
href: `${url}/tags/${encodeURIComponent(token.hashtag)}`,
|
to: `/tags/${encodeURIComponent(token.hashtag)}`,
|
||||||
target: '_blank',
|
|
||||||
style: 'color:var(--mfmHashtag);'
|
style: 'color:var(--mfmHashtag);'
|
||||||
}
|
}
|
||||||
}, token.content)];
|
}, token.content)];
|
||||||
|
|
Loading…
Reference in New Issue