1
0
Fork 0
forked from forgejo/forgejo

Refactor from Vue2 to Vue3 (#20044)

Close #19902
This commit is contained in:
André Jaenisch 2022-10-01 16:26:38 +02:00 committed by GitHub
parent 726afe8a9e
commit 04e97b8311
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 384 additions and 606 deletions

View file

@ -26,8 +26,6 @@ import octiconSidebarExpand from '../../public/img/svg/octicon-sidebar-expand.sv
import octiconSidebarCollapse from '../../public/img/svg/octicon-sidebar-collapse.svg';
import Vue from 'vue';
export const svgs = {
'octicon-chevron-down': octiconChevronDown,
'octicon-chevron-right': octiconChevronRight,
@ -74,7 +72,8 @@ export function svg(name, size = 16, className = '') {
return serializer.serializeToString(svgNode);
}
export const SvgIcon = Vue.component('SvgIcon', {
export const SvgIcon = {
name: 'SvgIcon',
props: {
name: {type: String, required: true},
size: {type: Number, default: 16},
@ -88,4 +87,4 @@ export const SvgIcon = Vue.component('SvgIcon', {
},
template: `<span v-html="svg" />`
});
};