请选择 进入手机版 | 继续访问电脑版
帖子
帖子
用户
博客
课程
显示全部楼层
1
帖子
0
勋章
7
Y币

[其他] props怎么理解

[复制链接]
发表于 2021-4-19 10:40:37
apicloud编程中用到的props与vue一样吗?
380
帖子
4
勋章
6
Y币
思想一样
1
帖子
0
勋章
7
Y币
哪位大佬指点一下那个生鲜电商的模板在mian的页面里面有一段代码
<cityselector onresult="oncityselector"><cityselector>
下面的相关代码是
  oncityselector(e){
            var currentCity = e.detail;
            if (currentCity && currentCity.name) {
                if (this.data.cityName != currentCity.name) {
                    this.data.cityName = currentCity.name;

                    if (this.data.wareTypeList.length > 0) {
                        this.updatedWareList();
                    } else {
                        this.fnGetWareTypeList();
                    }
                }
            }
            this.data.citySelectorOpened = false;
        },
请问这是一种怎样的写法啊
380
帖子
4
勋章
6
Y币
这是他写的组件
1
帖子
0
勋章
7
Y币
为什么怎么都找不到这个组件呢?大佬
380
帖子
4
勋章
6
Y币
pages目录下
1
帖子
0
勋章
7
Y币
大佬,能加你QQ吗
1
帖子
0
勋章
7
Y币
大佬,我说的是onresult="oncityselector"这个是什么写法???
1
帖子
0
勋章
7
Y币
      closeFrame(currentCity) {
            this.fire('result', currentCity);
大佬fire是什么意思???这又是什么写法???
1
帖子
1
勋章
77
Y币
<cityselector onresult="oncityselector"><cityselector>   
这个就相当于  vue  中自定义的组件,  onresult  就是自定义的事件,  想是内容了解的话  可以看看  cityselector 组件的源码
您需要登录后才可以回帖 登录

本版积分规则