refactor(stores): rename
This commit is contained in:
@@ -20,7 +20,7 @@ const route = useRoute();
|
|||||||
const show = defineModel<boolean>('show');
|
const show = defineModel<boolean>('show');
|
||||||
|
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
const { stationLayoutGridCols } = storeToRefs(layoutStore);
|
const { stationGridColumns } = storeToRefs(layoutStore);
|
||||||
const queryControlStore = useQueryControlStore();
|
const queryControlStore = useQueryControlStore();
|
||||||
const { stationVerifyMode } = storeToRefs(queryControlStore);
|
const { stationVerifyMode } = storeToRefs(queryControlStore);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ useEventListener('keydown', (event) => {
|
|||||||
<template v-if="route.path === '/station'">
|
<template v-if="route.path === '/station'">
|
||||||
<NDivider>布局</NDivider>
|
<NDivider>布局</NDivider>
|
||||||
<NFormItem label="车站列数" label-placement="left">
|
<NFormItem label="车站列数" label-placement="left">
|
||||||
<NInputNumber v-model:value="stationLayoutGridCols" :min="1" :max="10" />
|
<NInputNumber v-model:value="stationGridColumns" :min="1" :max="10" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="debugEnabled">
|
<template v-if="debugEnabled">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const { lineAlarmCounts } = storeToRefs(lineAlarmsStore);
|
|||||||
const { error: lineDevicesQueryError } = useLineDevicesQuery();
|
const { error: lineDevicesQueryError } = useLineDevicesQuery();
|
||||||
const { error: lineAlarmsQueryError } = useLineAlarmsQuery();
|
const { error: lineAlarmsQueryError } = useLineAlarmsQuery();
|
||||||
const layoutStore = useLayoutStore();
|
const layoutStore = useLayoutStore();
|
||||||
const { stationLayoutGridCols } = storeToRefs(layoutStore);
|
const { stationGridColumns } = storeToRefs(layoutStore);
|
||||||
|
|
||||||
watch([lineDevicesQueryError, lineAlarmsQueryError], ([newLineDevicesQueryError, newLineAlarmsQueryError]) => {
|
watch([lineDevicesQueryError, lineAlarmsQueryError], ([newLineDevicesQueryError, newLineAlarmsQueryError]) => {
|
||||||
if (newLineDevicesQueryError) {
|
if (newLineDevicesQueryError) {
|
||||||
@@ -54,7 +54,7 @@ const openDeviceParamsConfigModal = (station: Station) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NGrid :cols="stationLayoutGridCols" :x-gap="6" :y-gap="6" style="padding: 8px">
|
<NGrid :cols="stationGridColumns" :x-gap="6" :y-gap="6" style="padding: 8px">
|
||||||
<NGi v-for="station in stationList" :key="station.code">
|
<NGi v-for="station in stationList" :key="station.code">
|
||||||
<StationCard
|
<StationCard
|
||||||
:station="station"
|
:station="station"
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import { ref } from 'vue';
|
|||||||
export const useLayoutStore = defineStore(
|
export const useLayoutStore = defineStore(
|
||||||
'ndm-layout-store',
|
'ndm-layout-store',
|
||||||
() => {
|
() => {
|
||||||
const stationLayoutGridCols = ref(8);
|
const stationGridColumns = ref(6);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
stationLayoutGridCols,
|
stationGridColumns,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user