diff --git a/src/components/Select.vue b/src/components/Select.vue new file mode 100644 index 00000000..ceea97fb --- /dev/null +++ b/src/components/Select.vue @@ -0,0 +1,159 @@ + + + + diff --git a/src/components/index.ts b/src/components/index.ts index 9a176148..0ce63ae1 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -19,6 +19,7 @@ import TimePicker from "./TimePicker.vue"; import Selector from "./Selector.vue"; import Graph from "./Graph.vue"; import Radio from "./Radio.vue"; +import SelectSingle from "./Select.vue"; import type { App } from "vue"; import VueGridLayout from "vue-grid-layout"; @@ -29,6 +30,7 @@ const components: { [key: string]: any } = { Selector, Graph, Radio, + SelectSingle, }; const componentsName: string[] = Object.keys(components); diff --git a/src/views/dashboard/configuration/widget/metric/Index.vue b/src/views/dashboard/configuration/widget/metric/Index.vue index 8d6a9f42..e1182702 100644 --- a/src/views/dashboard/configuration/widget/metric/Index.vue +++ b/src/views/dashboard/configuration/widget/metric/Index.vue @@ -57,7 +57,6 @@ limitations under the License. --> @@ -122,7 +121,6 @@ const { t } = useI18n(); const emit = defineEmits(["update", "loading", "changeOpt"]); const dashboardStore = useDashboardStore(); const { metrics, metricTypes, graph } = dashboardStore.selectedGrid; -const showConfig = ref(false); const states = reactive<{ metrics: string[]; metricTypes: string[]; @@ -425,7 +423,6 @@ function setMetricTypeList(type: string) { return MetricTypes[type]; } function setMetricConfig(index: number) { - showConfig.value = true; const n = { unit: "", label: "", @@ -444,7 +441,6 @@ function setMetricConfig(index: number) { ...n, ...dashboardStore.selectedGrid.metricConfig[index], }; - showConfig.value = true; }