fix lint warnings (#9287)

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
Azri Kahar
2021-11-02 05:34:20 +08:00
committed by GitHub
parent cb22ddfa7c
commit fcd3b1e345
5 changed files with 23 additions and 17 deletions

View File

@@ -0,0 +1,17 @@
<script lang="ts">
import { defineComponent, h, PropType } from 'vue';
import { icon, findIconDefinition, IconName } from '@fortawesome/fontawesome-svg-core';
export default defineComponent({
props: {
name: {
type: String as PropType<IconName>,
required: true,
},
},
render() {
const socialIcon = icon(findIconDefinition({ prefix: 'fab', iconName: this.name }));
return h({ template: socialIcon?.html[0] });
},
});
</script>

View File

@@ -14,8 +14,8 @@
</template>
<script lang="ts">
import { defineComponent, computed, h, PropType } from 'vue';
import { library, icon, findIconDefinition, IconName } from '@fortawesome/fontawesome-svg-core';
import { defineComponent, computed } from 'vue';
import { library } from '@fortawesome/fontawesome-svg-core';
import { fab } from '@fortawesome/free-brands-svg-icons';
import useSizeClass, { sizeProps } from '@/composables/size-class';
@@ -38,6 +38,8 @@ import CustomIconFolderMove from './custom-icons/folder_move.vue';
import CustomIconFolderLock from './custom-icons/folder_lock.vue';
import CustomIconLogout from './custom-icons/logout.vue';
import SocialIcon from './social-icon.vue';
library.add(fab);
const customIcons: string[] = [
@@ -520,19 +522,6 @@ const socialIcons: string[] = [
'zhihu',
];
const SocialIcon = defineComponent({
props: {
name: {
type: String as PropType<IconName>,
required: true,
},
},
render() {
const socialIcon = icon(findIconDefinition({ prefix: 'fab', iconName: this.name }));
return h({ template: socialIcon?.html[0] });
},
});
export default defineComponent({
components: {
CustomIconDirectus,

View File

@@ -54,7 +54,6 @@ import { getNodeName } from './utils';
import { useFieldTree } from '@/composables/use-field-tree';
import { getFilterOperatorsForType } from '@directus/shared/utils';
import { useFieldsStore } from '@/stores';
import { ClientFilterOperator } from '@directus/shared/types';
export default defineComponent({
components: {

View File

@@ -1,6 +1,6 @@
import { AnyLayer } from 'maplibre-gl';
import colors from '@/styles/_colors.module.scss';
const { green, orange, yellow, black, white } = colors;
const { green, orange, black, white } = colors;
const color = ['case', ['==', ['get', 'mode'], 'static'], black, ['==', ['get', 'active'], 'true'], orange, green];
export default <AnyLayer[]>[

View File

@@ -13,6 +13,7 @@
>
<div class="preview">
<template v-if="inter.preview">
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-if="isSVG(inter.preview)" v-html="inter.preview" />
<img v-else :src="inter.preview" alt="" />
</template>