fix: update style and set labels (#50)

This commit is contained in:
Fine0830
2022-04-01 13:27:49 +08:00
committed by GitHub
parent b51e423c2b
commit 63d21becde
8 changed files with 65 additions and 41 deletions

View File

@@ -37,8 +37,6 @@ limitations under the License. -->
metricTypes: dashboardStore.selectedGrid.metricTypes,
metricConfig: dashboardStore.selectedGrid.metricConfig,
}"
:isEdit="isEdit"
@changeOpt="setStatus"
/>
<div v-show="!graph.type" class="no-data">
{{ t("noData") }}
@@ -51,11 +49,7 @@ limitations under the License. -->
:style="{ '--el-collapse-header-font-size': '15px' }"
>
<el-collapse-item :title="t('selectVisualization')" name="1">
<MetricOptions
@update="getSource"
@changeOpt="setStatus"
@loading="setLoading"
/>
<MetricOptions @update="getSource" @loading="setLoading" />
</el-collapse-item>
<el-collapse-item :title="t('graphStyles')" name="2">
<component :is="`${graph.type}Config`" />
@@ -100,7 +94,6 @@ export default defineComponent({
const dashboardStore = useDashboardStore();
const appStoreWithOut = useAppStoreWithOut();
const loading = ref<boolean>(false);
const isEdit = ref<boolean>(false);
const states = reactive<{
activeNames: string;
source: unknown;
@@ -128,14 +121,9 @@ export default defineComponent({
function applyConfig() {
dashboardStore.setConfigPanel(false);
setStatus();
dashboardStore.setConfigs(dashboardStore.selectedGrid);
}
function setStatus() {
isEdit.value = true;
}
function cancelConfig() {
dashboardStore.selectWidget(originConfig);
dashboardStore.setConfigPanel(false);
@@ -152,8 +140,6 @@ export default defineComponent({
cancelConfig,
getSource,
setLoading,
setStatus,
isEdit,
widget,
graph,
title,