refactor: eslint src --fix

This commit is contained in:
2024-04-15 20:35:37 +08:00
parent c75c7092bd
commit 7ecfbb9c15
38 changed files with 187 additions and 227 deletions

View File

@@ -1,21 +1,11 @@
<template>
<span v-if="!dictItem"></span>
<span v-else-if="!dictItem.color">{{ dictItem.label }}</span>
<a-tag v-else-if="dictItem.color === 'primary'" color="arcoblue">{{
dictItem.label
}}</a-tag>
<a-tag v-else-if="dictItem.color === 'success'" color="green">{{
dictItem.label
}}</a-tag>
<a-tag v-else-if="dictItem.color === 'warning'" color="orangered">{{
dictItem.label
}}</a-tag>
<a-tag v-else-if="dictItem.color === 'error'" color="red">{{
dictItem.label
}}</a-tag>
<a-tag v-else-if="dictItem.color === 'default'" color="gray">{{
dictItem.label
}}</a-tag>
<a-tag v-else-if="dictItem.color === 'primary'" color="arcoblue">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.color === 'success'" color="green">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.color === 'warning'" color="orangered">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.color === 'error'" color="red">{{ dictItem.label }}</a-tag>
<a-tag v-else-if="dictItem.color === 'default'" color="gray">{{ dictItem.label }}</a-tag>
<a-tag v-else :color="dictItem.color">{{ dictItem.label }}</a-tag>
</template>
@@ -27,19 +17,17 @@ defineOptions({ name: 'GiCellTag' })
const props = defineProps({
dict: {
type: Array<LabelValueState>,
required: true,
required: true
},
value: {
type: [Number, String],
required: true,
},
});
required: true
}
})
const dictItem = computed(() =>
props.dict.find(
(d) => d.value === String(props.value) || d.value === Number(props.value),
),
);
props.dict.find((d) => d.value === String(props.value) || d.value === Number(props.value))
)
</script>
<style lang="scss" scoped></style>

View File

@@ -1,12 +1,12 @@
<template>
<div class="gi-footer">{{appStore.getCopyright()}}</div>
<div class="gi-footer">{{ appStore.getCopyright() }}</div>
</template>
<script lang="ts" setup>
import Dayjs from 'dayjs'
import {useAppStore} from "@/stores";
import { useAppStore } from '@/stores'
const appStore = useAppStore();
const appStore = useAppStore()
defineOptions({ name: 'GiFooter' })

View File

@@ -90,7 +90,7 @@ const searchValue = ref('') // 搜索词
// 图标列表
const isGridView = ref(false)
let iconList: string[] = []
const iconList: string[] = []
for (const path in SvgIconModules) {
console.log(path)
const name = path.replace('/src/assets/icons/', '').replace('.svg', '')

View File

@@ -1,10 +1,6 @@
<template>
<div class="json_pretty_container">
<vue-json-pretty
:path="'res'"
:data="JSONObject"
:show-length="true"
/>
<vue-json-pretty :path="'res'" :data="JSONObject" :show-length="true" />
<icon-copy class="copy_icon" @click="onCopy(JSONObject)" />
</div>
</template>
@@ -29,12 +25,12 @@ const onCopy = (data: object) => {
</script>
<style lang="scss" scoped>
.json_pretty_container{
.json_pretty_container {
width: 100%;
height: 100%;
overflow: auto;
position: relative;
.copy_icon{
.copy_icon {
position: absolute;
right: 10px;
top: 10px;
@@ -42,4 +38,4 @@ const onCopy = (data: object) => {
cursor: pointer;
}
}
</style>
</style>

View File

@@ -1,15 +1,15 @@
<template>
<div class="content">
<icon-copy :size="16" @click="copyText"/>
<icon-copy :size="16" @click="copyText" />
</div>
</template>
<script setup lang="ts">
import { Message } from "@arco-design/web-vue"
interface Props{
value:any
import { Message } from '@arco-design/web-vue'
interface Props {
value: any
}
const props = withDefaults(defineProps<Props>(), {})
const copyText=()=>{
const copyText = () => {
const textarea = document.createElement('textarea')
textarea.value = props.value
document.body.appendChild(textarea)
@@ -20,9 +20,9 @@ const copyText=()=>{
}
</script>
<style scoped lang="scss">
.content{
.content {
display: inline-block;
margin-left: 5px;
cursor: pointer;
}
</style>
</style>