fix: 修改data模块的数据调用和全局设定

This commit is contained in:
MTrun
2022-03-22 15:46:17 +08:00
parent 559bf2fe57
commit c42e9ad0fb
9 changed files with 54 additions and 58 deletions
@@ -2,14 +2,14 @@
<div class="go-chart-data-setting">
<setting-item-box name="源地址" :alone="true">
<n-input
v-model:value="requestConfig.requestUrl"
v-model:value.trim="chartEditStore.getRequestGlobalConfig.requestOriginUrl"
placeholder="源地址如: http://127.0.0.1"
></n-input>
</setting-item-box>
<setting-item-box name="更新间隔">
<n-input-number
v-model:value="requestConfig.requestInterval"
min="0"
v-model:value.trim="chartEditStore.getRequestGlobalConfig.requestInterval"
min="5"
:show-button="false"
placeholder="为 0 不更新"
>
@@ -22,14 +22,9 @@
</template>
<script setup lang="ts">
import { computed, Ref } from 'vue'
import { SettingItemBox } from '@/components/ChartItemSetting/index'
import { useChartEditStore } from '@/store/modules/chartEditStore/chartEditStore'
import { RequestConfigType } from '@/store/modules/chartEditStore/chartEditStore.d'
const chartEditStore = useChartEditStore()
const requestConfig: Ref<RequestConfigType> = computed(() => {
return chartEditStore.getRequestConfig
})
</script>