github Tencent/omi v6.19.21
Private event

latest releases: v7.7.0, v7.6.18, v7.6.6...
3 years ago
import { define, render, WeElement } from 'omi'

define('o-button', class extends WeElement {
  render() {
    return (
      <button {...this.props}><slot></slot></button>
    )
  }
})

define('my-app', class extends WeElement {
  render() {
    return (
      <o-button _onclick={evt => {
        //onclick trigger twice, _onclick trigger once
        console.log(1)
      }}>button</o-button>
    )
  }
})


render(<my-app />, 'body')

Don't miss a new omi release

NewReleases is sending notifications on new releases.