amis icon indicating copy to clipboard operation
amis copied to clipboard

联动异常

Open icodingx opened this issue 7 years ago • 6 comments

如下代码:切换【数据源】时 【type: service】发出了两次请求,【type:service】还取不到${aid}的值,不知道为什么 ?

controls : [
	{type: "select", label: "列表", name: "aid", inline: true, source: "/form/list"},
	{type: "service", api: "/form/${aid}",body: {
		controls: [
			{type: "text", label: "名称", name: "atitle"},
			{type: "select", label: "数据源", name: "dsid", source:"datasources"}
		]}
	}
]

icodingx avatar Nov 21 '19 02:11 icodingx

感觉跟这个栗子是一样呢,看栗子貌似没问题 https://baidu.github.io/amis/linkpage/form2

2betop avatar Nov 21 '19 03:11 2betop

就是参考这个例子,service前的select 是静态的 ,我用的 source 就这样了,跟 service 里面的 select 用关系吗 ?

icodingx avatar Nov 21 '19 03:11 icodingx

试了下 source 也是没问题呢。难道是版本问题?试试最新的 npm 包?

2betop avatar Nov 21 '19 04:11 2betop

问题是切换 service 里的 select 【source】出现的两次请求,而且还选不中

icodingx avatar Nov 21 '19 09:11 icodingx

不能复现啊,来个栗子? fork 这个仓库,examples 里面个页面,并把 mock 地址配一下,然后提供地址?

2betop avatar Nov 21 '19 09:11 2betop

有问题再开,先关了

2betop avatar Dec 09 '19 08:12 2betop