|
@@ -61282,14 +61282,20 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
}
|
|
|
|
|
|
function isDesignMode(control, config) {
|
|
|
- var _a;
|
|
|
+ var _a, _b;
|
|
|
if (window["IS_DESIGN_MODE"]) {
|
|
|
return true;
|
|
|
}
|
|
|
+ if ((control === null || control === void 0 ? void 0 : control.designMode) === true) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (((_a = config === null || config === void 0 ? void 0 : config.yvanScope) === null || _a === void 0 ? void 0 : _a.IS_DESIGN_MODE) === true) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
if ((control === null || control === void 0 ? void 0 : control.IS_DESIGN_MODE) === true) {
|
|
|
return true;
|
|
|
}
|
|
|
- if (((_a = config === null || config === void 0 ? void 0 : config.session) === null || _a === void 0 ? void 0 : _a.IS_DESIGN_MODE) === true) {
|
|
|
+ if (((_b = config === null || config === void 0 ? void 0 : config.session) === null || _b === void 0 ? void 0 : _b.IS_DESIGN_MODE) === true) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
@@ -61517,6 +61523,9 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
if (option.scopeOnLoad) {
|
|
|
exports.scopeOnLoad = option.scopeOnLoad;
|
|
|
}
|
|
|
+ if (option.scopeOnCreate) {
|
|
|
+ exports.scopeOnCreate = option.scopeOnCreate;
|
|
|
+ }
|
|
|
if (option.apiConvert) {
|
|
|
exports.apiConvert = option.apiConvert;
|
|
|
}
|
|
@@ -61527,6 +61536,9 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
function getApiConvert() {
|
|
|
return exports.apiConvert;
|
|
|
}
|
|
|
+ function getScopeOnCreate() {
|
|
|
+ return exports.scopeOnCreate;
|
|
|
+ }
|
|
|
function getPinyin(v) {
|
|
|
return pinyinFunc(v);
|
|
|
}
|
|
@@ -61573,8 +61585,18 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
this.isLoadFinish = false;
|
|
|
this._isLoading = false;
|
|
|
this.model = model;
|
|
|
+ if (typeof vjson.layout === 'undefined') {
|
|
|
+ // 没有定义布局的情况下,走 buildPlus 重新定义简写版布局
|
|
|
+ var ret = buildPlus({ model: model, vjson: vjson });
|
|
|
+ model = ret.model;
|
|
|
+ vjson = ret.vjson;
|
|
|
+ }
|
|
|
this.originalVjson = lodash.cloneDeep(vjson);
|
|
|
this.vjson = this.originalVjson; // this.buildVjson()
|
|
|
+ var extScope = getScopeOnCreate();
|
|
|
+ if (typeof extScope === 'function') {
|
|
|
+ extScope({ vjson: vjson, model: model }, this);
|
|
|
+ }
|
|
|
}
|
|
|
Scope.prototype._addWatch = function (tplExpress, fn) {
|
|
|
if (!this._watchList) {
|
|
@@ -61901,6 +61923,20 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
}
|
|
|
return (hash & 0x7FFFFFFF) + "";
|
|
|
}
|
|
|
+ function buildPlus(_a) {
|
|
|
+ var model = _a.model, vjson = _a.vjson;
|
|
|
+ var vjsonNew = __assign(__assign({}, vjson), { layout: 'fit', referenceHolder: true, items: [
|
|
|
+ {
|
|
|
+ layout: 'border',
|
|
|
+ // tbar: vjson.action,
|
|
|
+ items: vjson.items,
|
|
|
+ },
|
|
|
+ ] });
|
|
|
+ if (lodash.isArray(vjson.action)) {
|
|
|
+ vjsonNew.items[0].tbar = vjson.action;
|
|
|
+ }
|
|
|
+ return { model: model, vjson: vjsonNew };
|
|
|
+ }
|
|
|
|
|
|
(function (FuncDomain) {
|
|
|
FuncDomain["SCOPE"] = "scope";
|
|
@@ -98037,7 +98073,8 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
* row-item rows中的一行,比如 tree / grid / panel 等等
|
|
|
*/
|
|
|
function baseConfig(config, dragType) {
|
|
|
- if (isDesignMode(config, undefined) && dragType) {
|
|
|
+ // if (isDesignMode(config, undefined) && dragType) {
|
|
|
+ if (typeof config === 'object') {
|
|
|
var cc = '';
|
|
|
switch (dragType) {
|
|
|
case "cols-container":
|
|
@@ -136691,6 +136728,7 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
exports.axios = index;
|
|
|
exports.baseConfigProcess = baseConfigProcess;
|
|
|
exports.baseConfigProcessList = baseConfigProcessList;
|
|
|
+ exports.buildPlus = buildPlus;
|
|
|
exports.buildReportScope = buildReportScope;
|
|
|
exports.calcExpress = calcExpress;
|
|
|
exports.calcObject = calcObject;
|
|
@@ -136713,6 +136751,7 @@ define(['exports'], function (exports) { 'use strict';
|
|
|
exports.getPinyin = getPinyin;
|
|
|
exports.getRegList = getRegList;
|
|
|
exports.getRegParamList = getRegParamList;
|
|
|
+ exports.getScopeOnCreate = getScopeOnCreate;
|
|
|
exports.init = init$1;
|
|
|
exports.insertGridRow = insertGridRow;
|
|
|
exports.invokeServer = invokeServer;
|