Commit 0da0001d authored by zhengke's avatar zhengke

优化数据源绑定

parent b8afd873
......@@ -108,7 +108,16 @@
const setTemplateDataSource = (Id,index,type) => {
sourceLoadingStore.setSourceLoading(true)
datas.loading = true
if(type) return
if(type) {
datas.DataSource.DataSourceList.forEach((x,indexs)=>{
if(index==indexs&&x.type=="image"){
x.TemplateDataSource.Id = setType(x)[0].Id
x.TemplateDataSource.Content = setType(x)[0].Content
x.TemplateDataSource.Name = setType(x)[0].Name
}
})
return
}
datas.DataSource.DataSourceList.forEach((x,indexs)=>{
if(index==indexs){
let obj = x.TemplateList.find(y=>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment