amis icon indicating copy to clipboard operation
amis copied to clipboard

我想在 api 中的 adapter 中使用 当前作用域中的 表单数据 要怎么做呢?

Open yangkun2197 opened this issue 6 years ago • 1 comments

{ type: "group", controls: [ { type: "select", name: "select_config_lNav", label: "", searchable: true, // clearable: true, // required: true, source: "get:" + groupAPIs..urls.list + "?format=3", }, { name: "config_lNav", type: "editor", language: "json", label: "", size: "xxl", required: true, validateOnChange: true, }, ], }, { type: "service", name: "service_config_lNav2", initFetch: false, api: { method: "get", url: pageAPIs..urls.listbygroup, data: { treecode: "${select_config_lNav}", }, //@ts-ignore adaptor: function (data, response, api) { //这里我想使用 config_lNav 中的数据(如 我想把 config_lNav 和 data的数据做一下去重 或者合并 ),我要怎么做??? //我不想 在 data中引入(如 config_lNav:${config_lNav} ),因为这个不需要提交到服务器端.

谢谢。

yangkun2197 avatar Aug 13 '20 04:08 yangkun2197

你可以配置到api里,用完了之后在适配器里去掉就好,不会提交到后端的

RickCole21 avatar Sep 14 '20 02:09 RickCole21