Browse Source

Pull request #2339: 无JIRA任务 worker模式

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit 'f0714cf04a88a141d7aa2a8bd1c8f3066fc22c82':
  worker模式
es6
guy 3 years ago
parent
commit
656b36ee30
  1. 8
      dist/fix/fix.compact.js
  2. 2
      dist/fix/worker.compact.js
  3. 1
      examples/worker.html

8
dist/fix/fix.compact.js vendored

@ -115,7 +115,7 @@
function createStore () {
var needPop = false;
if (_global.Fix && this._store) {
if (this._store) {
var store = findStore(this.options.context || this._parent || this.options.element || this._context);
if (store) {
pushTarget(store);
@ -151,7 +151,11 @@
var __initWatch = BI.Widget.prototype.__initWatch;
BI.Widget.prototype.__initWatch = function () {
__initWatch.apply(this, arguments);
if (_global.Fix && this._store) {
var workerMode = BI.Providers.getProvider("bi.provider.system").getWorkerMode();
if (workerMode && this._worker) {
return;
}
if (this._store) {
initWatch(this, this.watch);
}
};

2
dist/fix/worker.compact.js vendored

@ -88,7 +88,7 @@
name: name,
eventType: "create",
options: options,
watches: BI.map(this.watch, function (key) {
watches: BI.map(this.$watch || this.watch, function (key) {
return key;
})
});

1
examples/worker.html

@ -6,7 +6,6 @@
<script src="../dist/2.0/fineui.js"></script> -->
<link rel="stylesheet" type="text/css" href="http://fanruan.design/fineui/2.0/fineui.min.css" />
<script src="http://fanruan.design/fineui/2.0/fineui.min.js"></script>
<script src="../dist/fix/worker.compact.js"></script>
<script src="demo.worker.js"></script>
</head>
<body>

Loading…
Cancel
Save