Browse Source

Pull request #2639: 无JIRA任务 路由支持history模式 (默认为hash模式)

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit '3c797a7537636a286e5043457c4848f60684369a':
  无JIRA任务 路由支持history模式 (默认为hash模式)
es6
windy 3 years ago
parent
commit
d0384c438f
  1. 1
      src/router/router.js
  2. 6
      webpack/webpack.dev.js

1
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) {

6
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({

Loading…
Cancel
Save