Browse Source

Merge pull request #941 in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '966788397ee3caabc3d0be65c5ca879248a20e17':
  无JIRA任务,吧BI.getEncodeURL方法内置到FineUI中
es6
Dailer 5 years ago
parent
commit
0ea0291159
  1. 32
      dist/2.0/fineui.ie.js
  2. 32
      dist/2.0/fineui.js
  3. 14
      dist/base.js
  4. 32
      dist/bundle.ie.js
  5. 32
      dist/bundle.js
  6. 2
      dist/case.js
  7. 15
      dist/core.js
  8. 32
      dist/fineui.ie.js
  9. 32
      dist/fineui.js
  10. 32
      dist/fineui_without_jquery_polyfill.js
  11. 15
      dist/utils.js
  12. 6
      dist/widget.js
  13. 15
      src/core/alias.js

32
dist/2.0/fineui.ie.js vendored

@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -46997,15 +47012,6 @@ BI.Label = BI.inherit(BI.Single, {
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -51839,7 +51845,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -65839,7 +65845,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -82047,7 +82053,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83087,7 +83093,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

32
dist/2.0/fineui.js vendored

@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -47401,15 +47416,6 @@ BI.Label = BI.inherit(BI.Single, {
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -52243,7 +52249,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -66243,7 +66249,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -82451,7 +82457,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83491,7 +83497,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

14
dist/base.js vendored

@ -612,7 +612,7 @@ BI.Text = BI.inherit(BI.Single, {
this.setText(o.value);
}
if (BI.isKey(o.keyword)) {
this.text.element.__textKeywordMarked__(text, o.keyword, o.py);
this.doRedMark(o.keyword);
}
if (o.highLight) {
this.doHighLight();
@ -674,7 +674,8 @@ BI.Text = BI.inherit(BI.Single, {
}
});
BI.shortcut("bi.text", BI.Text);/**
BI.shortcut("bi.text", BI.Text);
/**
* guy
* @class BI.BasicButton
* @extends BI.Single
@ -11524,15 +11525,6 @@ BI.Label = BI.inherit(BI.Single, {
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},

32
dist/bundle.ie.js vendored

@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -46997,15 +47012,6 @@ BI.Label = BI.inherit(BI.Single, {
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -51839,7 +51845,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -65839,7 +65845,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -82047,7 +82053,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83087,7 +83093,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

32
dist/bundle.js vendored

@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -47401,15 +47416,6 @@ BI.Label = BI.inherit(BI.Single, {
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -52243,7 +52249,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -66243,7 +66249,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -82451,7 +82457,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83491,7 +83497,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

2
dist/case.js vendored

@ -1948,7 +1948,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,

15
dist/core.js vendored

@ -15861,6 +15861,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16116,6 +16117,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";

32
dist/fineui.ie.js vendored

@ -16106,6 +16106,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16361,6 +16362,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -47242,15 +47257,6 @@ BI.Label = BI.inherit(BI.Single, {
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -52084,7 +52090,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -66084,7 +66090,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -82292,7 +82298,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83332,7 +83338,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

32
dist/fineui.js vendored

@ -16106,6 +16106,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -16361,6 +16362,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -47646,15 +47661,6 @@ BI.Label = BI.inherit(BI.Single, {
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -52488,7 +52494,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -66488,7 +66494,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -82696,7 +82702,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -83736,7 +83742,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

32
dist/fineui_without_jquery_polyfill.js vendored

@ -15607,6 +15607,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -15862,6 +15863,20 @@ BI.ShowAction = BI.inherit(BI.Action, {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";
@ -34217,15 +34232,6 @@ BI.Label = BI.inherit(BI.Single, {
});
},
_setEnable: function (enable) {
BI.Label.superclass._setEnable.apply(this, arguments);
if (enable === true) {
this.element.removeClass("base-disabled disabled");
} else if (enable === false) {
this.element.addClass("base-disabled disabled");
}
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
@ -36716,7 +36722,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return BI.extend(td, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "normal",
once: false,
@ -48897,7 +48903,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -65105,7 +65111,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -66145,7 +66151,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

15
dist/utils.js vendored

@ -12826,6 +12826,7 @@ if (!_global.BI) {
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -13081,6 +13082,20 @@ if (!_global.BI) {
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";

6
dist/widget.js vendored

@ -6027,7 +6027,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -22235,7 +22235,7 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
return BI.map(item, function (j, td) {
return {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,
@ -23275,7 +23275,7 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
return BI.map(items, function (j, item) {
return BI.extend(item, {
type: "bi.text_item",
cls: "bi-list-item-active",
cls: "bi-list-item-select",
textAlign: "center",
whiteSpace: "nowrap",
once: false,

15
src/core/alias.js

@ -353,6 +353,7 @@
return left;
}
BI.cjkEncode = function (text) {
// alex:如果非字符串,返回其本身(cjkEncode(234) 返回 ""是不对的)
if (typeof text !== "string") {
@ -608,6 +609,20 @@
})(jo);
};
/**
* 获取编码后的url
* @param urlTemplate url模板
* @param param 参数
* @returns {*|String}
* @example
* BI.getEncodeURL("design/{tableName}/{fieldName}",{tableName: "A", fieldName: "a"}) // design/A/a
*/
BI.getEncodeURL = function (urlTemplate, param) {
return urlTemplate.replaceAll("\\{(.*?)\\}", function (ori, str) {
return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);
});
};
BI.encodeURIComponent = function (url) {
BI.specialCharsMap = BI.specialCharsMap || {};
url = url || "";

Loading…
Cancel
Save