qianzhaoy / vant--mobile-mall

基于有赞 vant 组件库的移动商城

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

user/order-entity-list中的component slot中 @handle="actionHandle($event, i)"是什么意思?

yangzhiganluk opened this issue · comments

actionHandle(handle, i) {
this[handle] && thishandle;
}
这是什么写法呢?

不同的按钮有不用的 handle 对应组件方法的名字. 所以直接判断一下 this[handle] 是否存在. 然后直接调用 thishandle 就行了. handle 是一个字符串.