fix(全局): 多选框样式&搜索框加 clear 自动刷新数据

This commit is contained in:
baiqi 2024-04-23 17:11:55 +08:00 committed by 刘瑞斌
parent 33aea96d91
commit 65fb597820
29 changed files with 40 additions and 24 deletions

View File

@ -428,23 +428,29 @@
@apply hidden; @apply hidden;
} }
} }
.arco-checkbox-indeterminate .arco-checkbox-icon { .arco-checkbox-indeterminate .arco-checkbox-icon:not(.arco-checkbox-disabled .arco-checkbox-icon) {
border: 1px solid rgba(var(--primary-7)) !important; border: 1px solid rgba(var(--primary-7)) !important;
background-color: rgba(var(--primary-1)); background-color: rgba(var(--primary-1));
&::after { &::after {
background-color: rgb(var(--primary-7)); background-color: rgb(var(--primary-7));
} }
} }
.arco-checkbox-disabled:hover,
.arco-checkbox-disabled,
.arco-checkbox-disabled.arco-checkbox-checked, .arco-checkbox-disabled.arco-checkbox-checked,
.arco-checkbox-disabled.arco-checkbox-checked:hover { .arco-checkbox-disabled.arco-checkbox-checked:hover {
.arco-checkbox-icon { .arco-checkbox-icon {
@apply bg-white text-white; @apply bg-white text-white;
border: none; border-color: var(--color-text-input-border) !important;
background: rgb(var(--primary-2)) !important; background: var(--color-text-n8) !important;
&::after {
background-color: var(--color-text-4);
}
} }
.arco-checkbox-icon-check { .arco-checkbox-icon-check {
background-color: rgb(var(--primary-2)) !important; color: var(--color-text-4);
background-color: var(--color-text-n8) !important;
} }
} }

View File

@ -19,6 +19,7 @@
class="w-[240px]" class="w-[240px]"
@search="searchList" @search="searchList"
@press-enter="searchList" @press-enter="searchList"
@clear="searchList"
/></div> /></div>
</div> </div>
<ms-base-table v-bind="propsRes" ref="tableRef" v-model:selected-key="selectedKey" no-disable v-on="propsEvent"> <ms-base-table v-bind="propsRes" ref="tableRef" v-model:selected-key="selectedKey" no-disable v-on="propsEvent">

View File

@ -500,12 +500,6 @@
background-color: var(--color-text-n9); background-color: var(--color-text-n9);
line-height: normal; line-height: normal;
} }
:deep(.arco-checkbox-indeterminate) {
.arco-checkbox-icon {
border-color: rgb(var(--primary-5));
background: rgb(var(--primary-1));
}
}
} }
.footer { .footer {
display: flex; display: flex;

View File

@ -7,6 +7,7 @@
class="mr-[8px] w-[240px]" class="mr-[8px] w-[240px]"
@search="loadQuoteList" @search="loadQuoteList"
@press-enter="loadQuoteList" @press-enter="loadQuoteList"
@clear="loadQuoteList"
/> />
<ms-base-table v-bind="propsRes" no-disable v-on="propsEvent"> <ms-base-table v-bind="propsRes" no-disable v-on="propsEvent">
<template #num="{ record }"> <template #num="{ record }">

View File

@ -17,6 +17,7 @@
class="mr-[8px] w-[240px]" class="mr-[8px] w-[240px]"
@search="loadCaseList" @search="loadCaseList"
@press-enter="loadCaseList" @press-enter="loadCaseList"
@clear="loadCaseList"
/> />
<a-button type="outline" class="arco-btn-outline--secondary !p-[8px]" @click="loadCaseList"> <a-button type="outline" class="arco-btn-outline--secondary !p-[8px]" @click="loadCaseList">
<template #icon> <template #icon>

View File

@ -9,6 +9,7 @@
class="mr-[8px] w-[240px]" class="mr-[8px] w-[240px]"
@search="loadQuoteList" @search="loadQuoteList"
@press-enter="loadQuoteList" @press-enter="loadQuoteList"
@clear="loadQuoteList"
/> />
</div> </div>

View File

@ -9,6 +9,7 @@
class="mr-[8px] w-[240px]" class="mr-[8px] w-[240px]"
@search="loadMockList" @search="loadMockList"
@press-enter="loadMockList" @press-enter="loadMockList"
@clear="loadMockList"
/> />
</div> </div>
</div> </div>

View File

@ -9,6 +9,7 @@
class="mr-[8px] w-[240px]" class="mr-[8px] w-[240px]"
@search="loadApiList(false)" @search="loadApiList(false)"
@press-enter="loadApiList(false)" @press-enter="loadApiList(false)"
@clear="loadApiList(false)"
/> />
<a-button type="outline" class="arco-btn-outline--secondary !p-[8px]" @click="loadApiList(false)"> <a-button type="outline" class="arco-btn-outline--secondary !p-[8px]" @click="loadApiList(false)">
<template #icon> <template #icon>
@ -309,12 +310,7 @@
const statusFilters = ref<string[]>([]); const statusFilters = ref<string[]>([]);
const deleteUserFilterVisible = ref(false); const deleteUserFilterVisible = ref(false);
const deleteUserFilters = ref<string[]>([]); const deleteUserFilters = ref<string[]>([]);
const moduleIds = computed(() => {
if (props.activeModule === 'all') {
return [];
}
return [props.activeModule];
});
const tableQueryParams = ref<any>(); const tableQueryParams = ref<any>();
const tableStore = useTableStore(); const tableStore = useTableStore();
async function getModuleIds() { async function getModuleIds() {

View File

@ -9,6 +9,7 @@
class="mr-[8px] w-[240px]" class="mr-[8px] w-[240px]"
@search="loadCaseList" @search="loadCaseList"
@press-enter="loadCaseList" @press-enter="loadCaseList"
@clear="loadCaseList"
/> />
<a-button type="outline" class="arco-btn-outline--secondary !p-[8px]" @click="loadCaseList"> <a-button type="outline" class="arco-btn-outline--secondary !p-[8px]" @click="loadCaseList">
<template #icon> <template #icon>
@ -450,9 +451,6 @@
const caseLevelFields = ref<Record<string, any>>({}); const caseLevelFields = ref<Record<string, any>>({});
const caseFilterVisible = ref(false); const caseFilterVisible = ref(false);
const caseFilters = ref<string[]>([]); const caseFilters = ref<string[]>([]);
const caseLevelList = computed(() => {
return caseLevelFields.value?.options || [];
});
const lastReportStatusFilterVisible = ref(false); const lastReportStatusFilterVisible = ref(false);
const lastReportStatusList = ref<string[]>(Object.keys(ReportStatus[ReportEnum.API_REPORT])); const lastReportStatusList = ref<string[]>(Object.keys(ReportStatus[ReportEnum.API_REPORT]));
const lastReportStatusFilters = ref<string[]>([]); const lastReportStatusFilters = ref<string[]>([]);

View File

@ -25,8 +25,6 @@
/** /**
* @description 用例报告独立报告 * @description 用例报告独立报告
*/ */
import { ref } from 'vue';
import MsChart from '@/components/pure/chart/index.vue'; import MsChart from '@/components/pure/chart/index.vue';
import { useI18n } from '@/hooks/useI18n'; import { useI18n } from '@/hooks/useI18n';

View File

@ -17,6 +17,7 @@
class="mr-[8px] w-[240px]" class="mr-[8px] w-[240px]"
@search="handleSearch" @search="handleSearch"
@press-enter="handleSearch" @press-enter="handleSearch"
@clear="handleSearch"
/> />
<batchAddKeyVal <batchAddKeyVal
:params="innerParams" :params="innerParams"

View File

@ -10,6 +10,7 @@
class="mx-[8px] w-[240px]" class="mx-[8px] w-[240px]"
@search="searchCase" @search="searchCase"
@press-enter="searchCase" @press-enter="searchCase"
@clear="searchCase"
></a-input-search> ></a-input-search>
</div> </div>
<ms-base-table v-bind="propsRes" v-on="propsEvent"> <ms-base-table v-bind="propsRes" v-on="propsEvent">

View File

@ -18,6 +18,7 @@
class="mx-[8px] w-[240px]" class="mx-[8px] w-[240px]"
@search="searchCase" @search="searchCase"
@press-enter="searchCase" @press-enter="searchCase"
@clear="searchCase"
></a-input-search> ></a-input-search>
</div> </div>
<ms-base-table v-bind="propsRes" v-on="propsEvent"> <ms-base-table v-bind="propsRes" v-on="propsEvent">

View File

@ -9,6 +9,7 @@
class="mx-[8px] w-[240px]" class="mx-[8px] w-[240px]"
@search="searchList" @search="searchList"
@press-enter="searchList" @press-enter="searchList"
@clear="searchList"
></a-input-search> ></a-input-search>
</div> </div>
<ms-base-table v-bind="propsRes" v-on="propsEvent"> <ms-base-table v-bind="propsRes" v-on="propsEvent">

View File

@ -27,6 +27,7 @@
class="mx-[8px] w-[240px]" class="mx-[8px] w-[240px]"
@search="searchList" @search="searchList"
@press-enter="searchList" @press-enter="searchList"
@clear="searchList"
></a-input-search> ></a-input-search>
</div> </div>
<AssociatedDemandTable <AssociatedDemandTable
@ -74,6 +75,7 @@
class="mx-[8px] w-[240px]" class="mx-[8px] w-[240px]"
@search="searchHandler" @search="searchHandler"
@press-enter="searchHandler" @press-enter="searchHandler"
@clear="searchHandler"
></a-input-search> ></a-input-search>
</div> </div>
<ms-base-table ref="tableRef" v-bind="propsRes" v-on="propsEvent"> <ms-base-table ref="tableRef" v-bind="propsRes" v-on="propsEvent">
@ -119,14 +121,12 @@
import { getCaseRelatedInfo } from '@/api/modules/project-management/menuManagement'; import { getCaseRelatedInfo } from '@/api/modules/project-management/menuManagement';
import { useI18n } from '@/hooks/useI18n'; import { useI18n } from '@/hooks/useI18n';
import { useAppStore } from '@/store'; import { useAppStore } from '@/store';
import useFeatureCaseStore from '@/store/modules/case/featureCase';
import type { CreateOrUpdateDemand, DemandItem } from '@/models/caseManagement/featureCase'; import type { CreateOrUpdateDemand, DemandItem } from '@/models/caseManagement/featureCase';
import { TableKeyEnum } from '@/enums/tableEnum'; import { TableKeyEnum } from '@/enums/tableEnum';
const { t } = useI18n(); const { t } = useI18n();
const appStore = useAppStore(); const appStore = useAppStore();
const featureCaseStore = useFeatureCaseStore();
const currentProjectId = computed(() => appStore.currentProjectId); const currentProjectId = computed(() => appStore.currentProjectId);
const props = defineProps<{ const props = defineProps<{
caseId: string; caseId: string;

View File

@ -21,6 +21,7 @@
allow-clear allow-clear
@search="searchHandler" @search="searchHandler"
@press-enter="searchHandler" @press-enter="searchHandler"
@clear="searchHandler"
></a-input-search> ></a-input-search>
</div> </div>
<ms-base-table ref="tableRef" v-bind="propsRes" v-on="propsEvent"> <ms-base-table ref="tableRef" v-bind="propsRes" v-on="propsEvent">

View File

@ -25,6 +25,7 @@
class="mx-[8px] w-[240px]" class="mx-[8px] w-[240px]"
@search="searchHandler" @search="searchHandler"
@press-enter="searchHandler" @press-enter="searchHandler"
@clear="searchHandler"
></a-input-search> ></a-input-search>
</div> </div>
<ms-base-table ref="tableRef" v-bind="propsRes" v-on="propsEvent"> <ms-base-table ref="tableRef" v-bind="propsRes" v-on="propsEvent">

View File

@ -78,6 +78,7 @@
class="w-[200px]" class="w-[200px]"
@press-enter="searchCase" @press-enter="searchCase"
@search="searchCase" @search="searchCase"
@clear="searchCase"
/> />
<!-- TODO这个版本不做 --> <!-- TODO这个版本不做 -->
<!-- <a-button type="outline" class="arco-btn-outline--secondary px-[8px]"> <!-- <a-button type="outline" class="arco-btn-outline--secondary px-[8px]">

View File

@ -31,6 +31,7 @@
class="mx-[8px] w-[240px]" class="mx-[8px] w-[240px]"
@search="searchDependCase" @search="searchDependCase"
@press-enter="searchDependCase" @press-enter="searchDependCase"
@clear="searchDependCase"
></a-input-search> ></a-input-search>
</div> </div>
</div> </div>

View File

@ -31,6 +31,7 @@
class="mr-[8px] w-[240px]" class="mr-[8px] w-[240px]"
@search="loadCaseList" @search="loadCaseList"
@press-enter="loadCaseList" @press-enter="loadCaseList"
@clear="loadCaseList"
/> />
<a-select <a-select
v-model:model-value="type" v-model:model-value="type"
@ -184,6 +185,7 @@
class="w-[300px]" class="w-[300px]"
@press-enter="searchDemand" @press-enter="searchDemand"
@search="searchDemand" @search="searchDemand"
@clear="searchDemand"
/> />
</div> </div>
<caseTabDemand <caseTabDemand

View File

@ -13,6 +13,7 @@
:placeholder="t('project.menu.nameSearch')" :placeholder="t('project.menu.nameSearch')"
@press-enter="fetchData" @press-enter="fetchData"
@search="fetchData" @search="fetchData"
@clear="fetchData"
></a-input-search> ></a-input-search>
</div> </div>
</div> </div>

View File

@ -26,6 +26,7 @@
allow-clear allow-clear
@press-enter="searchData" @press-enter="searchData"
@search="searchData" @search="searchData"
@clear="searchData"
/> />
<!-- 全局参数--> <!-- 全局参数-->
<div class="p-[8px] text-[var(--color-text-4)]"> <div class="p-[8px] text-[var(--color-text-4)]">

View File

@ -16,6 +16,7 @@
allow-clear allow-clear
@press-enter="fetchData" @press-enter="fetchData"
@search="fetchData" @search="fetchData"
@clear="fetchData"
></a-input-search> ></a-input-search>
</div> </div>
<MsBaseTable <MsBaseTable

View File

@ -10,6 +10,7 @@
allow-clear allow-clear
@press-enter="fetchData" @press-enter="fetchData"
@search="fetchData" @search="fetchData"
@clear="fetchData"
></a-input-search> ></a-input-search>
</div> </div>
<MsBaseTable class="mt-[16px]" v-bind="propsRes" v-on="propsEvent"> <MsBaseTable class="mt-[16px]" v-bind="propsRes" v-on="propsEvent">
@ -334,4 +335,4 @@
}); });
</script> </script>
<style scoped></style> <style scoped></style>

View File

@ -28,6 +28,7 @@
allow-clear allow-clear
@search="searchFiled" @search="searchFiled"
@press-enter="searchFiled" @press-enter="searchFiled"
@clear="searchFiled"
></a-input-search> ></a-input-search>
</div> </div>
<MsBaseTable v-bind="propsRes" ref="tableRef" v-on="propsEvent"> <MsBaseTable v-bind="propsRes" ref="tableRef" v-on="propsEvent">

View File

@ -18,6 +18,7 @@
class="w-[230px]" class="w-[230px]"
@search="searchHandler" @search="searchHandler"
@press-enter="searchHandler" @press-enter="searchHandler"
@clear="searchHandler"
></a-input-search> ></a-input-search>
</div> </div>
<ms-base-table <ms-base-table

View File

@ -30,6 +30,7 @@
allow-clear allow-clear
@search="searchFiled" @search="searchFiled"
@press-enter="searchFiled" @press-enter="searchFiled"
@clear="searchFiled"
></a-input-search> ></a-input-search>
</div> </div>
<MsBaseTable v-bind="propsRes" ref="tableRef" v-on="propsEvent"> <MsBaseTable v-bind="propsRes" ref="tableRef" v-on="propsEvent">

View File

@ -25,6 +25,7 @@
allow-clear allow-clear
@press-enter="handleEnter" @press-enter="handleEnter"
@search="handleSearch" @search="handleSearch"
@clear="() => handleSearch('')"
></a-input-search> ></a-input-search>
<a-radio-group <a-radio-group
v-if="couldShowUser && couldShowAuth" v-if="couldShowUser && couldShowAuth"

View File

@ -21,6 +21,7 @@
allow-clear allow-clear
@search="searchHandler" @search="searchHandler"
@press-enter="searchHandler" @press-enter="searchHandler"
@clear="searchHandler"
></a-input-search> ></a-input-search>
</a-col> </a-col>
</a-row> </a-row>