提交 96843223 编写于 作者: Neuromancer255's avatar Neuromancer255

添加数据选择编辑器(请求接口)--fix1

上级 15078225
...@@ -78,6 +78,14 @@ export default class AppPicker extends Vue { ...@@ -78,6 +78,14 @@ export default class AppPicker extends Vue {
*/ */
@Prop() public itemParams?: any; @Prop() public itemParams?: any;
/**
* 编辑器参数
*
* @type {string}
* @memberof AppUpicker
*/
@Prop() public valueItem?: string;
/** /**
* 列表项请求路径 * 列表项请求路径
* *
...@@ -109,7 +117,7 @@ export default class AppPicker extends Vue { ...@@ -109,7 +117,7 @@ export default class AppPicker extends Vue {
// 解析编辑器参数 // 解析编辑器参数
this.analysis(this.itemParams); this.analysis(this.itemParams);
// 请求下拉数据 // 请求下拉数据
// this.fectchItemList(this.url); this.fectchItemList(this.url);
// 提取需要的值(value,label) // 提取需要的值(value,label)
this.extractItem(this.itemList,this.items); this.extractItem(this.itemList,this.items);
} }
...@@ -178,7 +186,12 @@ export default class AppPicker extends Vue { ...@@ -178,7 +186,12 @@ export default class AppPicker extends Vue {
* @param item * @param item
*/ */
public onACSelect(item: any): void { public onACSelect(item: any): void {
this.$emit('formitemvaluechange', { name: this.name, value: item.label }); if(this.name){
this.$emit('formitemvaluechange', { name: this.name, value: item.label });
}
if(this.valueItem){
this.$emit('formitemvaluechange', { name: this.valueItem, value: item.label });
}
} }
} }
</script> </script>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册