DataSource
如何使用DataSource ?
ts
// cas认证后,设置全局ajax配置
window.gui.setAjaxConfig({sysCode:"",appType:"",tokenName:"",token:null})
// 单个.vue文件引入
<script setup lang="ts">
import { DataSource } from 'g-ui-web';
const ds = DataSource({
path: "https://viz-ui.gtcloud.cn/web-ui/data.json",
resPath: "data"
});
</script>单个组件使用 DataSource
单个组件使用 DataSource(多个数据源)
多个组件使用 DataSource
DataSource API
| 名称 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| on | 监听事件 | event | - |
| load | 加载数据 | function | - |
| reload | 重新加载数据 | function | - |