JinZHouXiYiJi_DaPin2/examples/data/Rest/index.ts

28 lines
700 B
TypeScript
Raw Normal View History

2023-12-05 13:23:01 +08:00
import { handler, RequestMethod } from 'open-data-v/data/rest'
import { shallowRef } from 'vue'
import { uuid } from '@/utils/utils'
import DataView from './Pane.vue'
export default {
type: 'REST',
name: '动态数据',
component: shallowRef(DataView),
handler,
useTo: ['COMPONENT', 'GLOBAL'],
getdefaultOption: () => {
return {
method: RequestMethod.GET,
url: '/getRiskArea',
headers: [{ key: '', value: '', disable: false, id: uuid() }],
params: [{ key: '', value: '', disable: false, id: uuid() }],
data: [{ key: '', value: '', disable: false, id: uuid() }],
otherConfig: {
isRepeat: false,
interval: 1000
}
}
}
}