feat: 新增数据请求配置

This commit is contained in:
MTrun
2022-03-17 20:18:46 +08:00
parent c399277350
commit 501dfdc223
9 changed files with 105 additions and 25 deletions
@@ -1,7 +1,37 @@
<template>
<h1>全局接口配置</h1>
<div>
<setting-item-box name="源地址" :alone="true">
<n-input
v-model:value="requestConfig.requestUrl"
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"
:show-button="false"
placeholder="为 0 不更新"
>
<template #suffix>
</template>
</n-input-number>
</setting-item-box>
</div>
</template>
<script setup lang="ts">
</script>
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>
<style lang="scss" scoped></style>
@@ -4,10 +4,8 @@
</div>
</template>
<script setup>
<script setup lang="ts" >
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>