Use router-link instead of a to improve usability

This commit is contained in:
syuilo 2018-10-20 09:34:34 +09:00
parent 51f0e12062
commit 8746d964fe

View File

@ -114,10 +114,9 @@ export default Vue.component('misskey-flavored-markdown', {
}
case 'mention': {
return (createElement as any)('a', {
return (createElement as any)('router-link', {
attrs: {
href: `${url}/${token.canonical}`,
target: '_blank',
to: `/${token.canonical}`,
dataIsMe: (this as any).i && getAcct((this as any).i) == getAcct(token),
style: 'color:var(--mfmMention);'
},
@ -129,10 +128,9 @@ export default Vue.component('misskey-flavored-markdown', {
}
case 'hashtag': {
return [createElement('a', {
return [createElement('router-link', {
attrs: {
href: `${url}/tags/${encodeURIComponent(token.hashtag)}`,
target: '_blank',
to: `/tags/${encodeURIComponent(token.hashtag)}`,
style: 'color:var(--mfmHashtag);'
}
}, token.content)];