🚀 修复构建问题.
This commit is contained in:
@@ -168,7 +168,7 @@
|
|||||||
if (filterVal) {
|
if (filterVal) {
|
||||||
list = filterVal.startsWith('@')
|
list = filterVal.startsWith('@')
|
||||||
// tag 过滤
|
// tag 过滤
|
||||||
? list.filter(item => item.tags.some(tag => (tag.name as string).toLowerCase().startsWith(filterVal.substring(1, filterVal.length))))
|
? list.filter(item => item.tags.some(tag => tag.name?.toLowerCase().startsWith(filterVal.substring(1, filterVal.length))))
|
||||||
// 名称/编码/地址 过滤
|
// 名称/编码/地址 过滤
|
||||||
: list.filter(item => {
|
: list.filter(item => {
|
||||||
return (item.name as string)?.toLowerCase().indexOf(filterVal) > -1
|
return (item.name as string)?.toLowerCase().indexOf(filterVal) > -1
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default defineStore('tabBar', {
|
|||||||
addTab(tag: TagProps, ignoreCache: boolean) {
|
addTab(tag: TagProps, ignoreCache: boolean) {
|
||||||
this.tagList.push(tag);
|
this.tagList.push(tag);
|
||||||
if (!ignoreCache) {
|
if (!ignoreCache) {
|
||||||
this.cacheTabList.add(tag.name as string);
|
this.cacheTabList.add(tag.name);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -49,8 +49,8 @@ export default defineStore('tabBar', {
|
|||||||
this.cacheTabList.clear();
|
this.cacheTabList.clear();
|
||||||
// 要先判断 ignoreCache
|
// 要先判断 ignoreCache
|
||||||
this.tagList.filter((el) => !el.ignoreCache)
|
this.tagList.filter((el) => !el.ignoreCache)
|
||||||
.map((el) => el.name)
|
.map((el) => el.name)
|
||||||
.forEach((x) => this.cacheTabList.add(x));
|
.forEach((x) => this.cacheTabList.add(x));
|
||||||
},
|
},
|
||||||
|
|
||||||
// 重设 tab
|
// 重设 tab
|
||||||
|
|||||||
@@ -2,21 +2,21 @@ import type { SelectOptionData, TreeNodeData } from '@arco-design/web-vue';
|
|||||||
|
|
||||||
// 通过 label 进行过滤
|
// 通过 label 进行过滤
|
||||||
export const labelFilter = (searchValue: string, option: { label: string }) => {
|
export const labelFilter = (searchValue: string, option: { label: string }) => {
|
||||||
return option.label.toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
return option.label.toLowerCase().includes(searchValue.toLowerCase());
|
||||||
};
|
};
|
||||||
|
|
||||||
// 通过 title 进行过滤
|
// 通过 title 进行过滤
|
||||||
export const titleFilter = (searchValue: string, option: TreeNodeData) => {
|
export const titleFilter = (searchValue: string, option: TreeNodeData) => {
|
||||||
return (option.title as string).toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
return (option.title as string)?.toLowerCase().includes(searchValue.toLowerCase());
|
||||||
};
|
};
|
||||||
|
|
||||||
// 通过 tag label 进行过滤
|
// 通过 tag label 进行过滤
|
||||||
export const tagLabelFilter = (searchValue: string, option: SelectOptionData) => {
|
export const tagLabelFilter = (searchValue: string, option: SelectOptionData) => {
|
||||||
if (searchValue.startsWith('@')) {
|
if (searchValue.startsWith('@') && option.isTag) {
|
||||||
// tag 过滤
|
// tag 过滤
|
||||||
return option.isTag && (option.label as string).toLowerCase().startsWith(searchValue.substring(1, searchValue.length).toLowerCase());
|
return (option.label as string)?.toLowerCase().startsWith(searchValue.substring(1, searchValue.length).toLowerCase());
|
||||||
} else {
|
} else {
|
||||||
// 文本过滤
|
// 文本过滤
|
||||||
return !option.isTag && (option.label as string).toLowerCase().indexOf(searchValue.toLowerCase()) > -1;
|
return (option.label as string)?.toLowerCase().includes(searchValue.toLowerCase());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -152,6 +152,7 @@
|
|||||||
import { Message, Modal } from '@arco-design/web-vue';
|
import { Message, Modal } from '@arco-design/web-vue';
|
||||||
import usePermission from '@/hooks/permission';
|
import usePermission from '@/hooks/permission';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
|
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||||
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
||||||
|
|||||||
@@ -148,6 +148,7 @@
|
|||||||
import usePermission from '@/hooks/permission';
|
import usePermission from '@/hooks/permission';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import { usePagination } from '@/types/table';
|
import { usePagination } from '@/types/table';
|
||||||
|
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||||
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
import HostKeySelector from '@/components/asset/host-key/selector/index.vue';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openKeyView']);
|
||||||
|
|||||||
@@ -178,6 +178,7 @@
|
|||||||
import { Message, Modal } from '@arco-design/web-vue';
|
import { Message, Modal } from '@arco-design/web-vue';
|
||||||
import { tagColor } from '../types/const';
|
import { tagColor } from '../types/const';
|
||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
|
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||||
import TagMultiSelector from '@/components/meta/tag/multi-selector/index.vue';
|
import TagMultiSelector from '@/components/meta/tag/multi-selector/index.vue';
|
||||||
|
|
||||||
const emits = defineEmits(['openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup']);
|
const emits = defineEmits(['openAdd', 'openUpdate', 'openUpdateConfig', 'openHostGroup']);
|
||||||
|
|||||||
@@ -175,6 +175,7 @@
|
|||||||
import { copy } from '@/hooks/copy';
|
import { copy } from '@/hooks/copy';
|
||||||
import columns from '../types/table.columns';
|
import columns from '../types/table.columns';
|
||||||
import { dataColor } from '@/utils';
|
import { dataColor } from '@/utils';
|
||||||
|
import { GrantKey, GrantRouteName } from '@/views/asset/grant/types/const';
|
||||||
import TagMultiSelector from '@/components/meta/tag/multi-selector/index.vue';
|
import TagMultiSelector from '@/components/meta/tag/multi-selector/index.vue';
|
||||||
|
|
||||||
const tagSelector = ref();
|
const tagSelector = ref();
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
if (filterVal) {
|
if (filterVal) {
|
||||||
list = filterVal.startsWith('@')
|
list = filterVal.startsWith('@')
|
||||||
// tag 过滤
|
// tag 过滤
|
||||||
? list.filter(item => item.tags.some(tag => (tag.name as string).toLowerCase().startsWith(filterVal.substring(1, filterVal.length))))
|
? list.filter(item => item.tags.some(tag => tag.name?.toLowerCase().startsWith(filterVal.substring(1, filterVal.length))))
|
||||||
// 名称/编码/地址 过滤
|
// 名称/编码/地址 过滤
|
||||||
: list.filter(item => {
|
: list.filter(item => {
|
||||||
return (item.name as string)?.toLowerCase().indexOf(filterVal) > -1
|
return (item.name as string)?.toLowerCase().indexOf(filterVal) > -1
|
||||||
|
|||||||
@@ -78,10 +78,7 @@
|
|||||||
:bordered="false">
|
:bordered="false">
|
||||||
<!-- 配置项 -->
|
<!-- 配置项 -->
|
||||||
<template #keyName="{ record }">
|
<template #keyName="{ record }">
|
||||||
<span class="copy-left" title="复制" @click="copy(record.keyName)">
|
<span class="text-copy" @click="copy(record.keyName)">{{ record.keyName }}</span>
|
||||||
<icon-copy />
|
|
||||||
</span>
|
|
||||||
<span>{{ record.keyName }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
<!-- 配置值类型 -->
|
<!-- 配置值类型 -->
|
||||||
<template #valueType="{ record }">
|
<template #valueType="{ record }">
|
||||||
|
|||||||
Reference in New Issue
Block a user