Appearance
useNoticeModalSettings
▸ useNoticeModalSettings(source
, options?
): UseQueryReturnType
<any
, Error
>
远程获取紧急弹窗配置
参数
Name | Type | Description |
---|---|---|
source | string | json 文件路径 |
options? | UseNoticeModalSettingsOptions |
返回值
UseQueryReturnType
<any
, Error
>
示例
vue
<script setup>
const props = defineProps({
key: {
type: String,
required: true,
},
})
const {data: notice} = useNoticeModalSettings('https://xxx.json', {
select: source => source[props.key],
})
</script>
<template>
<mp-notice-modal :notice="notice" />
</template>