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