|
|
@ -27188,14 +27188,14 @@ Data.Source = BISource = { |
|
|
|
var fns = exps.slice(); |
|
|
|
var fns = exps.slice(); |
|
|
|
var complete = false, |
|
|
|
var complete = false, |
|
|
|
running = false; |
|
|
|
running = false; |
|
|
|
var callback = function callback(index) { |
|
|
|
var callback = function callback(index, newValue, oldValue) { |
|
|
|
if (complete === true) { |
|
|
|
if (complete === true) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
fns[index] = true; |
|
|
|
fns[index] = true; |
|
|
|
if (runBinaryFunction(fns)) { |
|
|
|
if (runBinaryFunction(fns)) { |
|
|
|
complete = true; |
|
|
|
complete = true; |
|
|
|
cb(); |
|
|
|
cb(newValue, oldValue, index); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!running) { |
|
|
|
if (!running) { |
|
|
|
running = true; |
|
|
|
running = true; |
|
|
@ -27233,8 +27233,8 @@ Data.Source = BISource = { |
|
|
|
var w = new Watcher(model, function () { |
|
|
|
var w = new Watcher(model, function () { |
|
|
|
dep.depend(); |
|
|
|
dep.depend(); |
|
|
|
return NaN; |
|
|
|
return NaN; |
|
|
|
}, function () { |
|
|
|
}, function (newValue, oldValue) { |
|
|
|
callback(i); |
|
|
|
callback(i, newValue, oldValue); |
|
|
|
}); |
|
|
|
}); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
w.teardown(); |
|
|
|
w.teardown(); |
|
|
@ -27246,11 +27246,21 @@ Data.Source = BISource = { |
|
|
|
if (/\*\*$|\*$/.test(exp)) { |
|
|
|
if (/\*\*$|\*$/.test(exp)) { |
|
|
|
throw new Error('not support'); |
|
|
|
throw new Error('not support'); |
|
|
|
} |
|
|
|
} |
|
|
|
//其他含有*的情况,如*.a,*.*.a,a.*.a.*
|
|
|
|
//其他含有*的情况,如*.a,*.*.a,a.*.a
|
|
|
|
if (/\*/.test(exp)) { |
|
|
|
if (/\*/.test(exp)) { |
|
|
|
|
|
|
|
var currentModel = model; |
|
|
|
|
|
|
|
//先获取到能获取到的对象
|
|
|
|
|
|
|
|
var paths = exp.split("."); |
|
|
|
|
|
|
|
for (var _i = 0, len = paths.length; _i < len; _i++) { |
|
|
|
|
|
|
|
if (paths[_i] === "*") { |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
currentModel = model[paths[_i]]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
exp = exp.substr(exp.indexOf("*")); |
|
|
|
//补全路径
|
|
|
|
//补全路径
|
|
|
|
var parent = model.__ob__.parent, |
|
|
|
var parent = currentModel.__ob__.parent, |
|
|
|
root = model.__ob__; |
|
|
|
root = currentModel.__ob__; |
|
|
|
while (parent) { |
|
|
|
while (parent) { |
|
|
|
exp = '*.' + exp; |
|
|
|
exp = '*.' + exp; |
|
|
|
root = parent; |
|
|
|
root = parent; |
|
|
@ -27261,11 +27271,11 @@ Data.Source = BISource = { |
|
|
|
root._globalDeps || (root._globalDeps = {}); |
|
|
|
root._globalDeps || (root._globalDeps = {}); |
|
|
|
root._globalDeps[regStr] = _dep; |
|
|
|
root._globalDeps[regStr] = _dep; |
|
|
|
|
|
|
|
|
|
|
|
var _w = new Watcher(model, function () { |
|
|
|
var _w = new Watcher(currentModel, function () { |
|
|
|
_dep.depend(); |
|
|
|
_dep.depend(); |
|
|
|
return NaN; |
|
|
|
return NaN; |
|
|
|
}, function () { |
|
|
|
}, function (newValue, oldValue) { |
|
|
|
callback(i); |
|
|
|
callback(i, newValue, oldValue); |
|
|
|
}); |
|
|
|
}); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
_w.teardown(); |
|
|
|
_w.teardown(); |
|
|
@ -27273,8 +27283,8 @@ Data.Source = BISource = { |
|
|
|
}); |
|
|
|
}); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var watcher = new Watcher(model, exp, function () { |
|
|
|
var watcher = new Watcher(model, exp, function (newValue, oldValue) { |
|
|
|
callback(i); |
|
|
|
callback(i, newValue, oldValue); |
|
|
|
}, options); |
|
|
|
}, options); |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watchers.push(function unwatchFn() { |
|
|
|
watcher.teardown(); |
|
|
|
watcher.teardown(); |
|
|
@ -67700,7 +67710,9 @@ BI.ClipBoard = BI.inherit(BI.BasicButton, { |
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.ClipBoard.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.ClipBoard.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
extraCls: "bi-clipboard", |
|
|
|
extraCls: "bi-clipboard", |
|
|
|
el: {}, |
|
|
|
el: { |
|
|
|
|
|
|
|
type: "bi.layout" |
|
|
|
|
|
|
|
}, |
|
|
|
copy: BI.emptyFn, |
|
|
|
copy: BI.emptyFn, |
|
|
|
afterCopy: BI.emptyFn |
|
|
|
afterCopy: BI.emptyFn |
|
|
|
}); |
|
|
|
}); |
|
|
|