Browse Source

KERNEL-14316 chore: 引入rollup,修复一些细节 BUG

es6
Treecat 2 years ago
parent
commit
2726fbc0b0
  1. 39
      rollup.config.js
  2. 2
      src/case/button/node/treenode.js
  3. 4
      src/core/func/string.js
  4. 3
      src/widget/dynamicdate/dynamicdate.combo.js

39
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()
]
}
];

2
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";

4
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 + "&";
}

3
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;

Loading…
Cancel
Save