mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-07 02:57:11 +08:00
refactor: eslint src --fix
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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' })
|
||||
|
||||
|
||||
@@ -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', '')
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user