omi v3.0.2
This commit is contained in:
parent
25d078e809
commit
cdca3d1311
|
@ -258,8 +258,8 @@ npm i omi
|
|||
|
||||
或从 CDN 获取:
|
||||
|
||||
* [https://unpkg.com/omi@3.0.1/dist/omi.min.js](https://unpkg.com/omi@3.0.1/dist/omi.min.js)
|
||||
* [https://unpkg.com/omi@3.0.1/dist/omi.js](https://unpkg.com/omi@3.0.1/dist/omi.js)
|
||||
* [https://unpkg.com/omi@3.0.2/dist/omi.min.js](https://unpkg.com/omi@3.0.2/dist/omi.min.js)
|
||||
* [https://unpkg.com/omi@3.0.2/dist/omi.js](https://unpkg.com/omi@3.0.2/dist/omi.js)
|
||||
|
||||
## Official Plugins
|
||||
|
||||
|
|
|
@ -257,8 +257,8 @@ npm i omi
|
|||
|
||||
or get it from CDN:
|
||||
|
||||
* [https://unpkg.com/omi@3.0.1/dist/omi.min.js](https://unpkg.com/omi@3.0.1/dist/omi.min.js)
|
||||
* [https://unpkg.com/omi@3.0.1/dist/omi.js](https://unpkg.com/omi@3.0.1/dist/omi.js)
|
||||
* [https://unpkg.com/omi@3.0.2/dist/omi.min.js](https://unpkg.com/omi@3.0.2/dist/omi.min.js)
|
||||
* [https://unpkg.com/omi@3.0.2/dist/omi.js](https://unpkg.com/omi@3.0.2/dist/omi.js)
|
||||
|
||||
## Official Plugins
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
# omi 3.0.2
|
||||
|
||||
Remove the _dirty prop of component for ssr and free updating.
|
||||
|
||||
|
||||
# omi 3.0.1
|
||||
|
||||
Solve component style scope. Component style will not pollute the child component.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* omi v3.0.1 http://omijs.org
|
||||
* omi v3.0.2 http://omijs.org
|
||||
* Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
|
@ -327,7 +327,7 @@
|
|||
var items = [];
|
||||
|
||||
function enqueueRender(component) {
|
||||
if (!component._dirty && (component._dirty = true) && items.push(component) == 1) {
|
||||
if (items.push(component) == 1) {
|
||||
(options.debounceRendering || defer)(rerender);
|
||||
}
|
||||
}
|
||||
|
@ -339,7 +339,7 @@
|
|||
var element;
|
||||
while (p = list.pop()) {
|
||||
element = p.base;
|
||||
if (p._dirty) renderComponent(p);
|
||||
renderComponent(p);
|
||||
}
|
||||
if (!list.length) {
|
||||
if (options.componentChange) options.componentChange(p, element);
|
||||
|
@ -1086,7 +1086,6 @@
|
|||
}
|
||||
|
||||
component.prevProps = component.prevState = component.prevContext = component.nextBase = null;
|
||||
component._dirty = false;
|
||||
|
||||
if (!skip) {
|
||||
rendered = component.render(props, state, context);
|
||||
|
@ -1291,7 +1290,6 @@
|
|||
* }
|
||||
*/
|
||||
function Component(props, context) {
|
||||
this._dirty = true;
|
||||
|
||||
/** @public
|
||||
* @type {object}
|
||||
|
@ -1460,7 +1458,7 @@
|
|||
instances: instances
|
||||
};
|
||||
|
||||
root.Omi.version = '3.0.0';
|
||||
root.Omi.version = '3.0.2';
|
||||
|
||||
var Omi = {
|
||||
h: h,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
/**
|
||||
* omi v3.0.1 http://omijs.org
|
||||
* omi v3.0.2 http://omijs.org
|
||||
* Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.
|
||||
* By dntzhang https://github.com/dntzhang
|
||||
* Github: https://github.com/AlloyTeam/omi
|
||||
|
@ -324,7 +324,7 @@ var IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/
|
|||
var items = [];
|
||||
|
||||
function enqueueRender(component) {
|
||||
if (!component._dirty && (component._dirty = true) && items.push(component) == 1) {
|
||||
if (items.push(component) == 1) {
|
||||
(options.debounceRendering || defer)(rerender);
|
||||
}
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ function rerender() {
|
|||
var element;
|
||||
while (p = list.pop()) {
|
||||
element = p.base;
|
||||
if (p._dirty) renderComponent(p);
|
||||
renderComponent(p);
|
||||
}
|
||||
if (!list.length) {
|
||||
if (options.componentChange) options.componentChange(p, element);
|
||||
|
@ -1083,7 +1083,6 @@ function renderComponent(component, opts, mountAll, isChild) {
|
|||
}
|
||||
|
||||
component.prevProps = component.prevState = component.prevContext = component.nextBase = null;
|
||||
component._dirty = false;
|
||||
|
||||
if (!skip) {
|
||||
rendered = component.render(props, state, context);
|
||||
|
@ -1288,7 +1287,6 @@ function getId() {
|
|||
* }
|
||||
*/
|
||||
function Component(props, context) {
|
||||
this._dirty = true;
|
||||
|
||||
/** @public
|
||||
* @type {object}
|
||||
|
@ -1457,7 +1455,7 @@ root.Omi = {
|
|||
instances: instances
|
||||
};
|
||||
|
||||
root.Omi.version = '3.0.0';
|
||||
root.Omi.version = '3.0.2';
|
||||
|
||||
var omi = {
|
||||
h: h,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -32,7 +32,7 @@
|
|||
return h(vnode.nodeName, extend(extend({}, vnode.attributes), props), arguments.length > 2 ? [].slice.call(arguments, 2) : vnode.children);
|
||||
}
|
||||
function enqueueRender(component) {
|
||||
if (!component.__d && (component.__d = !0) && 1 == items.push(component)) (options.debounceRendering || defer)(rerender);
|
||||
if (1 == items.push(component)) (options.debounceRendering || defer)(rerender);
|
||||
}
|
||||
function rerender() {
|
||||
var p, list = items;
|
||||
|
@ -40,7 +40,7 @@
|
|||
var element;
|
||||
while (p = list.pop()) {
|
||||
element = p.base;
|
||||
if (p.__d) renderComponent(p);
|
||||
renderComponent(p);
|
||||
}
|
||||
if (!list.length) if (options.componentChange) options.componentChange(p, element);
|
||||
}
|
||||
|
@ -375,7 +375,6 @@
|
|||
component.context = context;
|
||||
}
|
||||
component.__p = component.__s = component.__c = component.__b = null;
|
||||
component.__d = !1;
|
||||
if (!skip) {
|
||||
rendered = component.render(props, state, context);
|
||||
if (component.style) addScopedAttr(rendered, component.style(), '_style_' + component.s, component);
|
||||
|
@ -477,7 +476,6 @@
|
|||
return id++;
|
||||
}
|
||||
function Component(props, context) {
|
||||
this.__d = !0;
|
||||
this.context = context;
|
||||
this.props = props;
|
||||
this.state = this.state || {};
|
||||
|
@ -697,7 +695,7 @@
|
|||
options: options,
|
||||
instances: instances
|
||||
};
|
||||
root.Omi.version = '3.0.0';
|
||||
root.Omi.version = '3.0.2';
|
||||
var Omi = {
|
||||
h: h,
|
||||
createElement: h,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "omi",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.2",
|
||||
"description": "Omi === Preact + Scoped CSS + Store System + Native Support in 3kb javascript.",
|
||||
"main": "dist/omi.js",
|
||||
"jsnext:main": "dist/omi.esm.js",
|
||||
|
|
|
@ -20,7 +20,6 @@ function getId(){
|
|||
* }
|
||||
*/
|
||||
export function Component(props, context) {
|
||||
this._dirty = true;
|
||||
|
||||
/** @public
|
||||
* @type {object}
|
||||
|
|
|
@ -35,7 +35,7 @@ root.Omi = {
|
|||
instances
|
||||
};
|
||||
|
||||
root.Omi.version = '3.0.0';
|
||||
root.Omi.version = '3.0.2';
|
||||
|
||||
export default {
|
||||
h,
|
||||
|
|
|
@ -7,7 +7,7 @@ import { renderComponent } from './vdom/component';
|
|||
let items = [];
|
||||
|
||||
export function enqueueRender(component) {
|
||||
if (!component._dirty && (component._dirty = true) && items.push(component)==1) {
|
||||
if (items.push(component)==1) {
|
||||
(options.debounceRendering || defer)(rerender);
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ export function rerender() {
|
|||
let element;
|
||||
while ( (p = list.pop()) ) {
|
||||
element = p.base;
|
||||
if (p._dirty) renderComponent(p);
|
||||
renderComponent(p);
|
||||
}
|
||||
if (!list.length) {
|
||||
if (options.componentChange) options.componentChange(p, element);
|
||||
|
|
|
@ -95,7 +95,6 @@ export function renderComponent(component, opts, mountAll, isChild) {
|
|||
}
|
||||
|
||||
component.prevProps = component.prevState = component.prevContext = component.nextBase = null;
|
||||
component._dirty = false;
|
||||
|
||||
if (!skip) {
|
||||
rendered = component.render(props, state, context);
|
||||
|
|
Loading…
Reference in New Issue