guy 7 years ago
parent
commit
48148a2e2a
  1. 52
      bi/core.js
  2. 36
      demo/js/fix-2.0/demo.js
  3. 52
      dist/bundle.js
  4. 2
      dist/bundle.min.css
  5. 90
      dist/bundle.min.js
  6. 52
      dist/core.js
  7. 36
      dist/demo.js
  8. 19
      dist/fix/fix.js
  9. 49
      npm-debug.log
  10. 45
      src/core/proto/jquery.compact.js
  11. 7
      src/core/proto/jquery.js
  12. 1
      src/core/widget.js

52
bi/core.js

@ -12530,6 +12530,7 @@ BI.Widget = BI.inherit(BI.OB, {
} else {
this.element = $(document.createElement(o.tagName));
}
this.element._isWidget = true;
if (o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
@ -21188,14 +21189,51 @@ Function.prototype.after = function (func) {
func.apply(this, arguments);
return ret;
}
};/*!
* jLayout JQuery Plugin v0.11
*
* Licensed under the revised BSD License.
* Copyright 2008, Bram Stein
* All rights reserved.
*/
};//缓存this.element的操作数据
if (jQuery) {
function wrap(prefix, name) {
return "_bi-widget" + prefix + name;
}
(function ($) {
var css = $.fn.css;
$.fn.css = function (name, value) {
if (this._isWidget === true) {
var key;
//this.element不允许get样式
if (BI.isPlainObject(name)) {
for (key in name) {
this.css(key, name[key]);
}
return this;
}
key = wrap("css", name);
if (this[key] !== value) {
css.apply(this, arguments);
this[key] = value;
return this;
}
return this;
}
return css.apply(this, arguments);
};
$.each(["width", "height", "innerWidth", "innerHeight", "outerWidth", "outerHeight"], function (index, name) {
var fn = $.fn[name];
$.fn[name] = function (value) {
if (this._isWidget === true && arguments.length === 1) {
var key = wrap("", name);
if (this[key] !== value) {
fn.apply(this, arguments);
this[key] = value;
return this;
}
return this;
}
return fn.apply(this, arguments);
}
})
})(jQuery);
}if (jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {

36
demo/js/fix-2.0/fix.js → demo/js/fix-2.0/demo.js

@ -1,4 +1,12 @@
Demo.Store = BI.inherit(Fix.VM, {
var model = new Fix.Observer({
name: 1,
arr: [{
n: 'a'
}, {
n: 'b'
}]
}).model;
Demo.Computed = BI.inherit(Fix.VM, {
computed: {
b: function () {
return this.model.name + 1
@ -7,23 +15,28 @@ Demo.Store = BI.inherit(Fix.VM, {
return this.model.name + this.model.b
}
},
})
Demo.Store = BI.inherit(Fix.VM, {
_init: function () {
this.computed = new Demo.Computed(model).model;
},
computed: {
b: function () {
return this.computed.c + 1
},
},
methods: {
run: function () {
this.model.name = 2;
var t = this.model.b;
this.computed.name = 2;
}
}
});
var model = new Fix.Observer({
name: 1,
arr: [{
n: 'a'
}, {
n: 'b'
}]
}).model;
Demo.Fix = BI.inherit(BI.Widget, {
_store: function () {
return new Demo.Store(model);
return new Demo.Store();
},
watch: {
b: function () {
@ -31,6 +44,7 @@ Demo.Fix = BI.inherit(BI.Widget, {
}
},
mounted: function () {
this.store.run()
}
});

52
dist/bundle.js vendored

@ -12581,6 +12581,7 @@ BI.Widget = BI.inherit(BI.OB, {
} else {
this.element = $(document.createElement(o.tagName));
}
this.element._isWidget = true;
if (o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
@ -21239,14 +21240,51 @@ Function.prototype.after = function (func) {
func.apply(this, arguments);
return ret;
}
};/*!
* jLayout JQuery Plugin v0.11
*
* Licensed under the revised BSD License.
* Copyright 2008, Bram Stein
* All rights reserved.
*/
};//缓存this.element的操作数据
if (jQuery) {
function wrap(prefix, name) {
return "_bi-widget" + prefix + name;
}
(function ($) {
var css = $.fn.css;
$.fn.css = function (name, value) {
if (this._isWidget === true) {
var key;
//this.element不允许get样式
if (BI.isPlainObject(name)) {
for (key in name) {
this.css(key, name[key]);
}
return this;
}
key = wrap("css", name);
if (this[key] !== value) {
css.apply(this, arguments);
this[key] = value;
return this;
}
return this;
}
return css.apply(this, arguments);
};
$.each(["width", "height", "innerWidth", "innerHeight", "outerWidth", "outerHeight"], function (index, name) {
var fn = $.fn[name];
$.fn[name] = function (value) {
if (this._isWidget === true && arguments.length === 1) {
var key = wrap("", name);
if (this[key] !== value) {
fn.apply(this, arguments);
this[key] = value;
return this;
}
return this;
}
return fn.apply(this, arguments);
}
})
})(jQuery);
}if (jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {

2
dist/bundle.min.css vendored

File diff suppressed because one or more lines are too long

90
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

52
dist/core.js vendored

@ -12530,6 +12530,7 @@ BI.Widget = BI.inherit(BI.OB, {
} else {
this.element = $(document.createElement(o.tagName));
}
this.element._isWidget = true;
if (o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}
@ -21188,14 +21189,51 @@ Function.prototype.after = function (func) {
func.apply(this, arguments);
return ret;
}
};/*!
* jLayout JQuery Plugin v0.11
*
* Licensed under the revised BSD License.
* Copyright 2008, Bram Stein
* All rights reserved.
*/
};//缓存this.element的操作数据
if (jQuery) {
function wrap(prefix, name) {
return "_bi-widget" + prefix + name;
}
(function ($) {
var css = $.fn.css;
$.fn.css = function (name, value) {
if (this._isWidget === true) {
var key;
//this.element不允许get样式
if (BI.isPlainObject(name)) {
for (key in name) {
this.css(key, name[key]);
}
return this;
}
key = wrap("css", name);
if (this[key] !== value) {
css.apply(this, arguments);
this[key] = value;
return this;
}
return this;
}
return css.apply(this, arguments);
};
$.each(["width", "height", "innerWidth", "innerHeight", "outerWidth", "outerHeight"], function (index, name) {
var fn = $.fn[name];
$.fn[name] = function (value) {
if (this._isWidget === true && arguments.length === 1) {
var key = wrap("", name);
if (this[key] !== value) {
fn.apply(this, arguments);
this[key] = value;
return this;
}
return this;
}
return fn.apply(this, arguments);
}
})
})(jQuery);
}if (jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间
if (!$.fn.insets) {

36
dist/demo.js vendored

@ -10436,7 +10436,15 @@ Demo.Func = BI.inherit(BI.Widget, {
}
});
BI.shortcut("demo.tmp", Demo.Func);
Demo.Store = BI.inherit(Fix.VM, {
var model = new Fix.Observer({
name: 1,
arr: [{
n: 'a'
}, {
n: 'b'
}]
}).model;
Demo.Computed = BI.inherit(Fix.VM, {
computed: {
b: function () {
return this.model.name + 1
@ -10445,23 +10453,28 @@ Demo.Store = BI.inherit(Fix.VM, {
return this.model.name + this.model.b
}
},
})
Demo.Store = BI.inherit(Fix.VM, {
_init: function () {
this.computed = new Demo.Computed(model).model;
},
computed: {
b: function () {
return this.computed.c + 1
},
},
methods: {
run: function () {
this.model.name = 2;
var t = this.model.b;
this.computed.name = 2;
}
}
});
var model = new Fix.Observer({
name: 1,
arr: [{
n: 'a'
}, {
n: 'b'
}]
}).model;
Demo.Fix = BI.inherit(BI.Widget, {
_store: function () {
return new Demo.Store(model);
return new Demo.Store();
},
watch: {
b: function () {
@ -10469,6 +10482,7 @@ Demo.Fix = BI.inherit(BI.Widget, {
}
},
mounted: function () {
this.store.run()
}
});

19
dist/fix/fix.js vendored

@ -874,13 +874,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_classCallCheck(this, VM);
var vm = this;
if (model instanceof Observer) {
if (model instanceof Observer || model instanceof VM) {
model = model.model;
}
this.$$model = model;
if (_.has(model, '__ob__')) {
this.$$model = model;
} else {
this.options = model || {};
}
initComputed(this, this.computed);
initMethods(this, this.methods);
var keys = _.keys(model).concat(_.keys(this.computed));
var keys = _.keys(this.$$model).concat(_.keys(this.computed));
var props = {};
var _loop = function _loop(i, len) {
@ -890,10 +894,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
enumerable: true,
configurable: true,
get: function get() {
return key in vm.$$model ? vm.$$model[key] : vm.$$computed[key];
return key in vm.$$computed ? vm.$$computed[key] : vm.$$model[key];
},
set: function set(val) {
return key in vm.$$model ? vm.$$model[key] = val : vm.$$computed[key] = val;
if (!vm.$$model || !(key in vm.$$model)) {
return;
}
return vm.$$model[key] = val;
}
};
}
@ -903,7 +910,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_loop(i, len);
}
this.model = createViewModel$1({}, props);
this.model.__ob__ = this.$$model.__ob__;
this.$$model && (this.model.__ob__ = this.$$model.__ob__);
this._init();
}

49
npm-debug.log

@ -1,49 +0,0 @@
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'start',
1 verbose cli '--scripts-prepend-node-path=auto' ]
2 info using npm@3.10.10
3 info using node@v6.11.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle fineui@1.0.1~prestart: fineui@1.0.1
6 silly lifecycle fineui@1.0.1~prestart: no script for prestart, continuing
7 info lifecycle fineui@1.0.1~start: fineui@1.0.1
8 verbose lifecycle fineui@1.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle fineui@1.0.1~start: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\PROJECT\fineui\node_modules\.bin;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseGit\bin;C:\Program Files\nodejs\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Users\Wang\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\Wang\AppData\Local\Programs\Python\Python36-32\;C:\Users\Wang\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\bin;C:\Program Files\Microsoft VS Code\bin;C:\Users\Wang\AppData\Roaming\npm
10 verbose lifecycle fineui@1.0.1~start: CWD: D:\PROJECT\fineui
11 silly lifecycle fineui@1.0.1~start: Args: [ '/d /s /c', 'node server.js' ]
12 silly lifecycle fineui@1.0.1~start: Returned: code: 1 signal: null
13 info lifecycle fineui@1.0.1~start: Failed to exec start script
14 verbose stack Error: fineui@1.0.1 start: `node server.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:920:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
15 verbose pkgid fineui@1.0.1
16 verbose cwd D:\PROJECT\fineui
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "start" "--scripts-prepend-node-path=auto"
19 error node v6.11.4
20 error npm v3.10.10
21 error code ELIFECYCLE
22 error fineui@1.0.1 start: `node server.js`
22 error Exit status 1
23 error Failed at the fineui@1.0.1 start script 'node server.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the fineui package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node server.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs fineui
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls fineui
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

45
src/core/proto/jquery.compact.js

@ -0,0 +1,45 @@
//缓存this.element的操作数据
if (jQuery) {
function wrap(prefix, name) {
return "_bi-widget" + prefix + name;
}
(function ($) {
var css = $.fn.css;
$.fn.css = function (name, value) {
if (this._isWidget === true) {
var key;
//this.element不允许get样式
if (BI.isPlainObject(name)) {
for (key in name) {
this.css(key, name[key]);
}
return this;
}
key = wrap("css", name);
if (this[key] !== value) {
css.apply(this, arguments);
this[key] = value;
return this;
}
return this;
}
return css.apply(this, arguments);
};
$.each(["width", "height", "innerWidth", "innerHeight", "outerWidth", "outerHeight"], function (index, name) {
var fn = $.fn[name];
$.fn[name] = function (value) {
if (this._isWidget === true && arguments.length === 1) {
var key = wrap("", name);
if (this[key] !== value) {
fn.apply(this, arguments);
this[key] = value;
return this;
}
return this;
}
return fn.apply(this, arguments);
}
})
})(jQuery);
}

7
src/core/proto/jquery.js vendored

@ -1,10 +1,3 @@
/*!
* jLayout JQuery Plugin v0.11
*
* Licensed under the revised BSD License.
* Copyright 2008, Bram Stein
* All rights reserved.
*/
if (jQuery) {
(function ($) {
// richer:容器在其各个边缘留出的空间

1
src/core/widget.js

@ -81,6 +81,7 @@ BI.Widget = BI.inherit(BI.OB, {
} else {
this.element = $(document.createElement(o.tagName));
}
this.element._isWidget = true;
if (o.baseCls || o.extraCls || o.cls) {
this.element.addClass((o.baseCls || "") + " " + (o.extraCls || "") + " " + (o.cls || ""));
}

Loading…
Cancel
Save