iview render函数中监听on-change、click方法、控制switch开关 true|| false

1
2
3
4
5
6
7
8
9
render: (h, params) => {
    return h('Select', {
        on: {
            'on-change': (value) => {
                consle.log('change value', value);
            }
        }
    })
}

  

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
render: (h, params) => {
    return h('div', [
        h('span', {style: {marginRight: '5px'},}, '自动更新'),
        h('i-switch', {<br>      props: {<br>        value: params.row.autoUpdate //控制switch开关 true|| false<br>      }
         style: {marginRight: '5px'},
         on: {
             'on-change': () => {
                  this.changeRateSettingss(params.index)
              }
          }
         }),
         h('Button', {
          props: {type: 'primary',size: 'small'},
          style: {marginRight: '5px'},
          on: {
             click: () => {
               this.changeRateSettingss(params.index)
             }
           }
       }, this.$t('liveRate_lang.btn.edit')),
    ]);
}

  

posted @   爱跑步的乌龟  阅读(1390)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示