iview table里面加icon iview他变了icon滑过加Tooltip 文字提示

 {
          title: '操作',
          key: 'action',
          align: 'center',
          width: 150,
          render: (h, params) => {
              let arr = [];
              arr.push(
                  h('Tooltip', {
                      props: {
                          placement: 'top',
                          transfer: true
                      }
                  }, [ h('Icon', {
                      props: {
                          type: 'md-download'
                      },
                      style:{
                          color:'#2d8cf0',
                          cursor: 'pointer',
                          marginRight: '5px',
                          fontSize:'18px'
                      },
                      on: {
                          click: () => {
                              this.downQrcode(params.row,1)
                          }
                      }
                  }), h('span', {
                      slot: 'content',
                      style: {
                          whiteSpace: 'normal'
                      }
                  }, '二维码')
                  ])
              )
              if (params.row.isValidate == '1'){
                  arr.push(
                      h('Tooltip', {
                          props: {
                              placement: 'top',
                              transfer: true
                          }
                      }, [ h('Icon', {
                          props: {
                              type: 'md-apps'
                          },
                          style:{
                              color:'#2d8cf0',
                              cursor: 'pointer',
                              marginRight: '5px',
                              fontSize:'18px'
                          },
                          on: {
                              click: () => {
                                  this.downQrcode(params.row,2)
                              }
                          }
                      }), h('span', {
                          slot: 'content',
                          style: {
                              whiteSpace: 'normal'
                          }
                      }, '序列码')
                      ])
                  )
                  arr.push(
                      h('Tooltip', {
                          props: {
                              placement: 'top',
                              transfer: true
                          }
                      }, [ h('Icon', {
                          props: {
                              type: 'md-checkmark-circle'
                          },
                          style:{
                              color:'#2d8cf0',
                              cursor: 'pointer',
                              marginRight: '5px',
                              fontSize:'18px'
                          },
                          on: {
                              click: () => {
                                  this.downQrcode(params.row,3)
                              }
                          }
                      }), h('span', {
                          slot: 'content',
                          style: {
                              whiteSpace: 'normal'
                          }
                      }, '校验码')
                      ])
                  )
              }
            return h('div', arr);
          }
        }

 

你可能感兴趣的:(iview table里面加icon iview他变了icon滑过加Tooltip 文字提示)