From 2726fbc0b0aa44b54dcf5d67a8b1de4193790598 Mon Sep 17 00:00:00 2001 From: Treecat Date: Wed, 22 Feb 2023 17:34:05 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-14316=20chore:=20=E5=BC=95=E5=85=A5rollu?= =?UTF-8?q?p=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E7=BB=86?= =?UTF-8?q?=E8=8A=82=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rollup.config.js | 39 +++++++++++++++++++++ src/case/button/node/treenode.js | 2 +- src/core/func/string.js | 4 +-- src/widget/dynamicdate/dynamicdate.combo.js | 3 +- 4 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 rollup.config.js diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 000000000..b71ac0e49 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,39 @@ +const babel = require("@rollup/plugin-babel"); +const alias = require("@rollup/plugin-alias"); +const resolve = require("@rollup/plugin-node-resolve"); +const commonjs = require("@rollup/plugin-commonjs"); +const path = require("path"); +// import { fileURLToPath } from "url"; +// import path from "path"; + +// const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const input = "src/index.js"; + +module.exports = [ + { + input, + output: [ + { + file: "dist/fineui.esm.js", + format: "esm", + sourcemap: true + } + ], + plugins: [ + alias({ + entries: [ + { find: "@", replacement: path.resolve(__dirname, "src") } + ] + }), + resolve(), + babel({ + babelHelpers: "runtime", + presets: ["@babel/preset-env"], + plugins: [ + ["@babel/plugin-proposal-decorators", { legacy: true }] + ] + }), + commonjs() + ] + } +]; diff --git a/src/case/button/node/treenode.js b/src/case/button/node/treenode.js index 5e6a31d58..9a599f344 100644 --- a/src/case/button/node/treenode.js +++ b/src/case/button/node/treenode.js @@ -169,7 +169,7 @@ export class FirstPlusGroupNode extends BasicTreeNode { } } -@shortcut +@shortcut() export class MidPlusGroupNode extends BasicTreeNode { static xtype = "bi.mid_plus_group_node"; diff --git a/src/core/func/string.js b/src/core/func/string.js index d273db525..c6f98fedc 100644 --- a/src/core/func/string.js +++ b/src/core/func/string.js @@ -1,4 +1,4 @@ -import {isString} from "../2.base"; +import {isString, each} from "../2.base"; /** * 判断字符串是否已指定的字符串开始 @@ -62,7 +62,7 @@ export function appendQuery(str, paras) { } else { src += "&"; } - BI._.each(paras, function (value, name) { + each(paras, function (value, name) { if (typeof (name) === "string") { src += name + "=" + value + "&"; } diff --git a/src/widget/dynamicdate/dynamicdate.combo.js b/src/widget/dynamicdate/dynamicdate.combo.js index 96266a023..684776f8c 100644 --- a/src/widget/dynamicdate/dynamicdate.combo.js +++ b/src/widget/dynamicdate/dynamicdate.combo.js @@ -28,8 +28,7 @@ export class DynamicDateCombo extends Single { static EVENT_ERROR = "EVENT_ERROR"; static EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW = "EVENT_BEFORE_YEAR_MONTH_POPUPVIEW"; - static EVENT_BEFORE_YEAR_MONTH_POPUPVIEW = "EVENT_BEFORE_YEAR_MONTH_POPUPVIEW"; - + static Static = 1; static Dynamic = 2;