Skip to content

Commit

Permalink
[代码完善](v2.5): v2.5 代码优化
Browse files Browse the repository at this point in the history
增加对 hash 模式的支持,hash 模式的部署方式文档已更新
  • Loading branch information
elunez committed Jun 6, 2020
1 parent 17aefdd commit 11ae4ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/router/routers.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const constantRouterMap = [
]

export default new Router({
// mode: 'hash',
mode: 'history',
scrollBehavior: () => ({ y: 0 }),
routes: constantRouterMap
Expand Down
4 changes: 2 additions & 2 deletions src/views/system/dict/dictDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@

<script>
import crudDictDetail from '@/api/system/dictDetail'
import CRUD, { presenter, header, form } from '@crud/crud'
import pagination from '@crud/Pagination'
import rrOperation from '@crud/RR.operation'
Expand All @@ -69,7 +68,8 @@ export default {
return [
CRUD({ title: '字典详情', url: 'api/dictDetail', query: { dictName: '' }, sort: ['dictSort,asc', 'id,desc'],
crudMethod: { ...crudDictDetail },
optShow: { add: true,
optShow: {
add: true,
edit: true,
del: true,
reset: false
Expand Down
2 changes: 2 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ const port = 8013 // 端口配置

// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
// hash 模式下可使用
// publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
publicPath: '/',
outputDir: 'dist',
assetsDir: 'static',
Expand Down

0 comments on commit 11ae4ad

Please sign in to comment.