lowcode-engine/docs/docs/api/datasource.md

499 B
Raw Blame History

title, sidebar_position
title sidebar_position
DataSource - 数据源 API 12

请求数据源

// 请求 userListuserList 在数据源面板中定义)

this.dataSourceMap['userList'].load({
	data: {}
}).then(res => {})
  .catch(error => {});

获取数据源的值

const { userList } = this.state;

手动修改数据源值

// 获取数据源面板中定义的值
const { user } = this.state;

// 修改 state 值
this.setState({
	user: {}
});