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

render: (h, params) => {
    return h('Select', {
        on: {
            'on-change': (value) => {
                consle.log('change value', value);
            }
        }
    })
}

  

render: (h, params) => {
    return h('div', [
        h('span', {style: {marginRight: '5px'},}, '自动更新'),
        h('i-switch', {
      props: {
        value: params.row.autoUpdate //控制switch开关 true|| false
      }  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 @ 2020-09-14 11:04  爱跑步的乌龟  阅读(1306)  评论(0编辑  收藏  举报