components/tip/index.js
/**
   * Only render the first node of slots
   * and add tip tirgger handler on it
   */
Only render the first node of slots
and add tip tirgger handler on it
Only render the first node of slots and add tip tirgger handler on it
render() {
    if (!this.$slots.default || !this.$slots.default.length) {
      return this.$slots.default
    }
    let firstNode = null
    this.$slots.default.some(node => {
      firstNode = node
      return !!node.data
    })
    if (firstNode) {
      firstNode.data = firstNode.data || {}
      const on = (firstNode.data.on = firstNode.data.on || {})
      const nativeOn = (firstNode.data.nativeOn = firstNode.data.nativeOn || {})
      on.click = this.$_addEventHandle(on.click, this.show)
      nativeOn.click = this.$_addEventHandle(nativeOn.click, this.show)
    }
    return firstNode
  }
render ( ) { if ( ! this . $slots . default || ! this . $slots . default . length ) { return this . $slots . default } let firstNode = null this . $slots . default . some ( node => { firstNode = node return ! ! node . data } ) if ( firstNode ) { firstNode . data = firstNode . data || { } const on = ( firstNode . data . on = firstNode . data . on || { } ) const nativeOn = ( firstNode . data . nativeOn = firstNode . data . nativeOn || { } ) on . click = this . $_addEventHandle ( on . click , this . show ) nativeOn . click = this . $_addEventHandle ( nativeOn . click , this . show ) } return firstNode }
Only render the first node of slots
 and add tip tirgger handler on it
Only render the first node of slots and add tip tirgger handler on it
// eslint-disable-line no-unused-vars