Skip to content

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-