From 845fe2d0bbb84832707fae5c3395e7163ab51c3b Mon Sep 17 00:00:00 2001 From: fay Date: Tue, 2 Jun 2020 19:29:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20fineui?= =?UTF-8?q?=E6=89=93=E5=8C=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gruntfile.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index d33cb9624..959e753c1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -200,7 +200,10 @@ module.exports = function (grunt) { "!src/case/colorchooser/**/*.js", "!src/case/tree/ztree/**/*.js", - "dist/widget.js", "dist/fix/fix.compact.js", "ui/js/**/*.js"]), + "dist/widget.js", + "dist/fix/fix.compact.js", + "ui/js/**/*.js", + "dist/es5.fineui.js"]), dest: "dist/fineui_without_jquery_polyfill.js" }, From 3c48b273fe07e36dac2f01c5c42121522c2cc3bc Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Tue, 2 Jun 2020 19:36:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?DEC-13547=20FineUI=20=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=9C=AA=E5=AE=9A=E4=B9=89=E7=9A=84=E6=97=B6=E5=80=99=E6=8A=9B?= =?UTF-8?q?=E5=87=BAshortcut=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 3 +++ src/core/shortcut.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index fa5fcd40f..8e588c8e5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ # 更新日志 +2.0(2020-06) +- 增加组件shortcut未定义的错误提示 + 2.0(2020-05) - 修复调用BI.history.navigate(XXX, {trigger: false})时, XXX包含中文空格等字符仍然触发回调的问题 - 新增BI.after和BI.before方法 diff --git a/src/core/shortcut.js b/src/core/shortcut.js index 26769de68..7f2717850 100644 --- a/src/core/shortcut.js +++ b/src/core/shortcut.js @@ -11,6 +11,10 @@ var createWidget = function (config) { var cls = kv[config.type]; + if(!cls){ + throw new Error("组件"+config.type +"未定义"); + } + var widget = new cls(); widget._initProps(config); @@ -72,4 +76,4 @@ return widget.element; }; -})(); \ No newline at end of file +})();