Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Tencent/omi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6db18f138d1cb1ab0a3bddfc53e76469998f4fc5
Choose a base ref
...
head repository: Tencent/omi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3512ca5fb8b53df0b3ec504e11f385e98d3059b8
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Oct 20, 2023

  1. chore: remove dead file

    dntzhang committed Oct 20, 2023
    Copy the full SHA
    2fa4d98 View commit details

Commits on Oct 21, 2023

  1. Copy the full SHA
    3512ca5 View commit details
Showing with 5 additions and 18 deletions.
  1. +0 −14 index.html
  2. +1 −1 packages/omi/package.json
  3. +3 −2 packages/omi/src/diff.ts
  4. +1 −1 packages/omi/src/index.ts
14 changes: 0 additions & 14 deletions index.html

This file was deleted.

2 changes: 1 addition & 1 deletion packages/omi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "omi",
"version": "7.1.6",
"version": "7.1.7",
"scripts": {
"start": "vite",
"dev-vite": "vite",
5 changes: 3 additions & 2 deletions packages/omi/src/diff.ts
Original file line number Diff line number Diff line change
@@ -34,9 +34,10 @@ export function diff(dom: ExtendedElement | ExtendedElement[] | null, vnode: VNo

if (isArray(vnode)) {
if (parent) {
// don't use css and props.css when using h.f
// don't use props.css when using h.f? can we use now?
// diff node list and vnode list
innerDiffNode(parent, vnode as VNode[], hydrating, component as Component, updateSelf)
ret = parent.childNodes
} else {
// connectedCallback 的时候 parent 为 null
ret = [];
@@ -48,7 +49,7 @@ export function diff(dom: ExtendedElement | ExtendedElement[] | null, vnode: VNo
})
}
} else {
if (isArray(dom)) {
if (isArray(dom) || dom instanceof NodeList) {
(dom as ExtendedElement[]).forEach((child, index) => {
if (index === 0) {
ret = idiff(child, vnode as VNode, component as Component, updateSelf)
2 changes: 1 addition & 1 deletion packages/omi/src/index.ts
Original file line number Diff line number Diff line change
@@ -7,6 +7,6 @@ export { createRef, bind } from './utils'
export { signal, computed, effect, batch, setActiveComponent, getActiveComponent } from './reactivity'
export { Signal } from './signal'
export { css } from './css-tag'
export const version = '7.1.6'
export const version = '7.1.7'