Merge branch 'dev-lint' into dev-lint-commet

This commit is contained in:
tnt group
2022-09-22 10:08:25 +08:00
20 changed files with 84 additions and 88 deletions
@@ -9,7 +9,7 @@
:icon-size="16"
:indent="18"
@update:value="clickItemHandle"
></n-menu>
></n-menu>
<div class="chart-content-list">
<n-scrollbar>
<charts-item-box :menuOptions="packages.selectOptions"></charts-item-box>
@@ -24,14 +24,12 @@ import { ConfigType } from '@/packages/index.d'
import { useSettingStore } from '@/store/modules/settingStore/settingStore'
import { loadAsyncComponent } from '@/utils'
const ChartsItemBox = loadAsyncComponent(() =>
import('../ChartsItemBox/index.vue')
)
const ChartsItemBox = loadAsyncComponent(() => import('../ChartsItemBox/index.vue'))
const props = defineProps({
selectOptions: {
type: Object,
default: () => []
default: () => {}
}
})
@@ -138,9 +138,11 @@ const filterRes = computed(() => {
try {
const fn = new Function('data', filter.value)
const res = fn(cloneDeep(sourceData.value))
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
errorFlag.value = false
return toString(res)
} catch (error) {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
errorFlag.value = true
return '过滤函数错误'
}
@@ -102,6 +102,7 @@ const selectTarget = computed(() => {
if (selectId.length !== 1) return undefined
const target = chartEditStore.componentList[chartEditStore.fetchTargetIndex()]
if (target?.isGroup) {
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
tabsSelect.value = TabsEnum.CHART_SETTING
}
return target
@@ -24,7 +24,7 @@
v-model:value.trim="title"
@keyup.enter="handleBlur"
@blur="handleBlur"
></n-input>
></n-input>
</n-space>
</template>
@@ -50,16 +50,16 @@ const fetchProhectInfoById = () => {
const title = ref<string>(fetchProhectInfoById() || '')
const comTitle = computed(() => {
title.value = title.value.replace(/\s/g, "");
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
title.value = title.value.replace(/\s/g, '')
return title.value.length ? title.value : '新项目'
})
const handleFocus = () => {
focus.value = true
nextTick(() => {
; (<any>inputInstRef).value.focus()
inputInstRef.value && (inputInstRef.value as any).focus()
})
}
@@ -71,4 +71,4 @@ const handleBlur = () => {
.title {
font-size: 15px;
}
</style>
</style>
@@ -1,8 +1,5 @@
<template>
<div
class="go-content-layers-list-item"
:class="{ hover: hover, select: select }"
>
<div class="go-content-layers-list-item" :class="{ hover: hover, select: select }">
<div class="go-flex-center item-content">
<n-image
class="list-img"
@@ -10,7 +7,7 @@
preview-disabled
:src="image"
:fallback-src="requireErrorImg()"
></n-image>
></n-image>
<n-ellipsis>
<n-text class="list-text" :depth="2">
{{ props.componentData.chartConfig.title }}
@@ -43,6 +40,7 @@ const props = defineProps({
}
})
// eslint-disable-next-line vue/no-setup-props-destructure
const { image } = props.componentData.chartConfig
// 计算当前选中目标
@@ -80,7 +78,7 @@ $textSize: 10px;
/* 需要设置最高级,覆盖 hover 的颜色 */
background-color: rgba(0, 0, 0, 0);
.list-img {
border:1px solid v-bind('themeColor')!important;
border: 1px solid v-bind('themeColor') !important;
}
}
.select-modal,
+1 -1
View File
@@ -35,7 +35,7 @@ export const useSync = () => {
}
if (e.isGroup) {
;(e as CreateComponentGroupType).groupList.forEach(groupItem => {
(e as CreateComponentGroupType).groupList.forEach(groupItem => {
intComponent(groupItem)
})
} else {