Skip to content

Releases: Tencent/omi

v7.3.8

30 Nov 03:52
Compare
Choose a tag to compare
feat(omi): asynchronous execution of directive function

v7.3.6

10 Nov 00:55
Compare
Choose a tag to compare
fix(omi): inserted node of fragment disappears in installed function

v7.3.5

07 Nov 08:26
Compare
Choose a tag to compare
feat(omi-elements): cross screen adaptation

v7.3.1

02 Nov 12:41
Compare
Choose a tag to compare
fix(omi): fix props missing of lazy define component

Support for injecting lifecycle into props🎉

02 Nov 10:02
Compare
Choose a tag to compare
<my-el onInstalled={e => console.log('installed')}><my-el>

Directive 🎉

02 Nov 02:54
Compare
Choose a tag to compare

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)

Preventing tree shaking

28 Oct 00:49
Compare
Choose a tag to compare
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

25 Oct 11:33
Compare
Choose a tag to compare
docs(omi): omi diff example

v7.1.13

24 Oct 22:52
Compare
Choose a tag to compare
feat(omi): use promise.resolve to merge duplicate update operations

v7.1.12

23 Oct 07:54
Compare
Choose a tag to compare
feat(omi): use updateSelf to avoid repeatedly calling component updat…