"use strict";(self.webpackChunk_alilc_lowcode_engine_docs=self.webpackChunk_alilc_lowcode_engine_docs||[]).push([[5439],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=l(r),f=a,m=d["".concat(s,".").concat(f)]||d[f]||u[f]||o;return r?n.createElement(m,i(i({ref:t},p),{},{components:r})):n.createElement(m,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var l=2;l<o;l++)i[l]=r[l];return n.createElement.apply(null,i)}return n.createElement.apply(null,r)}d.displayName="MDXCreateElement"},8405:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var n=r(7462),a=(r(7294),r(3905));const o={title:"DataSource - \u6570\u636e\u6e90 API",sidebar_position:12},i=void 0,c={unversionedId:"api/datasource",id:"api/datasource",title:"DataSource - \u6570\u636e\u6e90 API",description:"\u8bf7\u6c42\u6570\u636e\u6e90",source:"@site/docs/api/datasource.md",sourceDirName:"api",slug:"/api/datasource",permalink:"/site/docs/api/datasource",draft:!1,editUrl:"https://github.com/alibaba/lowcode-engine/tree/develop/docs/docs/api/datasource.md",tags:[],version:"current",sidebarPosition:12,frontMatter:{title:"DataSource - \u6570\u636e\u6e90 API",sidebar_position:12},sidebar:"api",previous:{title:"common - \u901a\u7528 API",permalink:"/site/docs/api/common"}},s={},l=[{value:"\u8bf7\u6c42\u6570\u636e\u6e90",id:"\u8bf7\u6c42\u6570\u636e\u6e90",level:3},{value:"\u83b7\u53d6\u6570\u636e\u6e90\u7684\u503c",id:"\u83b7\u53d6\u6570\u636e\u6e90\u7684\u503c",level:3},{value:"\u624b\u52a8\u4fee\u6539\u6570\u636e\u6e90\u503c",id:"\u624b\u52a8\u4fee\u6539\u6570\u636e\u6e90\u503c",level:3}],p={toc:l};function u(e){let{components:t,...r}=e;return(0,a.kt)("wrapper",(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h3",{id:"\u8bf7\u6c42\u6570\u636e\u6e90"},"\u8bf7\u6c42\u6570\u636e\u6e90"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"// \u8bf7\u6c42 userList\uff08userList \u5728\u6570\u636e\u6e90\u9762\u677f\u4e2d\u5b9a\u4e49\uff09\n\nthis.dataSourceMap['userList'].load({\n    data: {}\n}).then(res => {})\n  .catch(error => {});\n")),(0,a.kt)("h3",{id:"\u83b7\u53d6\u6570\u636e\u6e90\u7684\u503c"},"\u83b7\u53d6\u6570\u636e\u6e90\u7684\u503c"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"const { userList } = this.state;\n")),(0,a.kt)("h3",{id:"\u624b\u52a8\u4fee\u6539\u6570\u636e\u6e90\u503c"},"\u624b\u52a8\u4fee\u6539\u6570\u636e\u6e90\u503c"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},"// \u83b7\u53d6\u6570\u636e\u6e90\u9762\u677f\u4e2d\u5b9a\u4e49\u7684\u503c\nconst { user } = this.state;\n\n// \u4fee\u6539 state \u503c\nthis.setState({\n    user: {}\n});\n")))}u.isMDXComponent=!0}}]);