| 1234567891011121314151617181920 |
- import { ref, onUnmounted } from 'vue'
- import { queryConfig } from '@/services/api/common'
- export function getConfigValue(configid: number) {
- const configValue = ref('')
- const controller = new AbortController()
- // 获取配置项
- queryConfig({
- controller,
- data: { configid }
- }).then((res) => {
- configValue.value = res.data.configvalue
- })
- onUnmounted(() => controller.abort())
- return configValue
- }
|