diff --git a/package.json b/package.json index 94c5d75ac..af1ceb00b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fineui", - "version": "2.0.20220414140544", + "version": "2.0.20220418121529", "description": "fineui", "main": "dist/fineui.min.js", "types": "dist/lib/index.d.ts", diff --git a/src/case/combo/bubblecombo/combo.bubble.js b/src/case/combo/bubblecombo/combo.bubble.js index e143efab0..2709295d9 100644 --- a/src/case/combo/bubblecombo/combo.bubble.js +++ b/src/case/combo/bubblecombo/combo.bubble.js @@ -99,6 +99,14 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { isViewVisible: function () { return this.combo.isViewVisible(); + }, + + adjustWidth: function () { + this.combo.adjustWidth(); + }, + + adjustHeight: function () { + this.combo.adjustHeight(); } }); diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index 7b87a2d1c..7d53dfe0e 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -52,7 +52,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { _addElement: function (i, item) { var o = this.options; var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); - var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width; + var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; if (o.columnSize.length > 0) { if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) { columnSize = null; diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 4f9ee1119..46b175e9b 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -51,7 +51,7 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { _addElement: function (i, item) { var o = this.options; var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments); - var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? null : item.height; + var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height; if (o.rowSize.length > 0) { if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) { rowSize = null; diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js index d159d8890..8c803abaa 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -48,7 +48,7 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { _addElement: function (i, item) { var o = this.options; var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments); - var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width; + var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; if (o.columnSize.length > 0) { if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) { columnSize = null; diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js index 0f1c9b166..33609e717 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -48,7 +48,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { _addElement: function (i, item) { var o = this.options; var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments); - var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? null : item.height; + var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height; if (o.rowSize.length > 0) { if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) { rowSize = null; diff --git a/src/core/wrapper/layout/sticky/sticky.horizontal.js b/src/core/wrapper/layout/sticky/sticky.horizontal.js index f178afd6b..c5b644542 100644 --- a/src/core/wrapper/layout/sticky/sticky.horizontal.js +++ b/src/core/wrapper/layout/sticky/sticky.horizontal.js @@ -13,7 +13,7 @@ BI.HorizontalStickyLayout = BI.inherit(BI.FlexHorizontalLayout, { _addElement: function (i, item) { var o = this.options; var w = BI.HorizontalStickyLayout.superclass._addElement.apply(this, arguments); - var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? null : item.width; + var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; if (o.columnSize.length > 0) { if (item.width >= 1 && o.columnSize[i] >= 1 && o.columnSize[i] !== item.width) { columnSize = null; diff --git a/src/core/wrapper/layout/sticky/sticky.vertical.js b/src/core/wrapper/layout/sticky/sticky.vertical.js index d99b8828e..a5ba3d837 100644 --- a/src/core/wrapper/layout/sticky/sticky.vertical.js +++ b/src/core/wrapper/layout/sticky/sticky.vertical.js @@ -13,7 +13,7 @@ BI.VerticalStickyLayout = BI.inherit(BI.FlexVerticalLayout, { _addElement: function (i, item) { var o = this.options; var w = BI.VerticalStickyLayout.superclass._addElement.apply(this, arguments); - var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? null : item.height; + var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height; if (o.rowSize.length > 0) { if (item.height >= 1 && o.rowSize[i] >= 1 && o.rowSize[i] !== item.height) { rowSize = null; diff --git a/src/router/router.js b/src/router/router.js index efcf2f777..02eb68904 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -3126,6 +3126,7 @@ BI.RouterWidget = BI.inherit(BI.Widget, { init: function () { this.$router = this._router = BI.Router.$router = $router = new VueRouter({ + mode: this.options.mode, routes: this.options.routes }); this.$router.beforeEach(function (to, from, next) { diff --git a/typescript/base/combination/combo.ts b/typescript/base/combination/combo.ts index 249e7e6f2..c7d511a2b 100644 --- a/typescript/base/combination/combo.ts +++ b/typescript/base/combination/combo.ts @@ -59,6 +59,8 @@ export declare class Combo extends Widget { getPopupPosition(): any; + adjustWidth(e?:MouseEvent): void; + adjustHeight(e?: MouseEvent): void; toggle(): void; diff --git a/typescript/case/combo/bubblecombo/combo.bubble.ts b/typescript/case/combo/bubblecombo/combo.bubble.ts index cd50d722b..d5366233f 100644 --- a/typescript/case/combo/bubblecombo/combo.bubble.ts +++ b/typescript/case/combo/bubblecombo/combo.bubble.ts @@ -17,4 +17,8 @@ export declare class BubbleCombo extends Widget { showView(): void; isViewVisible(): boolean; + + adjustWidth(e?:MouseEvent): void; + + adjustHeight(e?: MouseEvent): void; } diff --git a/webpack/webpack.dev.js b/webpack/webpack.dev.js index d3c0fb5bc..9e5a21432 100644 --- a/webpack/webpack.dev.js +++ b/webpack/webpack.dev.js @@ -36,11 +36,17 @@ module.exports = merge(common, { output: { path: dirs.DEST, filename: "[name].js", + publicPath: '/', }, devServer: { contentBase: path.join(__dirname, ".."), port: 9001, liveReload: true, + historyApiFallback: { + rewrites: [ + { from: /.*/, to: '/index.html' }, + ], + }, }, plugins: [ new MiniCssExtractPlugin({