Omi Versions Save

Web Components Framework - Web组件框架

v7.3.5

6 months ago

v7.3.1

6 months ago

v7.3.0

6 months ago
<my-el onInstalled={e => console.log('installed')}><my-el>

v7.2.1

6 months ago

For Example:

Register AutoAnimate Directive:

import { registerDirective } from 'omi'
import autoAnimate from '@formkit/auto-animate'

registerDirective('auto-animate', autoAnimate)

Using Directive:

import { render, signal, tag, Component, h } from 'omi'

const show = signal(false)

@tag('my-app')
export class MyApp extends Component {
  render() {
    return (
      <>
        <buttton onClick={() => show.value = !show.value}>Toggle show</buttton>
        <div o-auto-animate >
          {show.value && <h2>Hello o-auto-animate!</h2>}
        </div>
      </>

    )
  }
}

render(<my-app />, document.body)

v7.2.0

6 months ago
import { Button } from './button' // tree shaking
import './button' // will not tree shaking

class MyApp extends Component {
  render() {
    return (
      <o-button>test</o-buttom>
    )
  }
}
import { Button } from './button' 

class MyApp extends Component {
  render() {
    return (
      {/* will not tree shaking*/ }
      <Button.tagName>test</Button.tagName>
    )
  }
}

v7.1.14

6 months ago

v7.1.13

6 months ago

v7.1.12

6 months ago

v7.1.10

6 months ago

v7.1.5

6 months ago