Skip to content

Commit

Permalink
修改文件配置,允许线上部署
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyStudent13 committed Oct 15, 2022
1 parent ecb1640 commit 2e2457d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default {
{ name: 'format-detection', content: 'telephone=no' },
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', href: '//at.alicdn.com/t/font_3202885_9p4m8dagmyh.css' },
{ rel: 'icon', type: 'image/x-icon', href: './favicon.ico' },
// { rel: 'stylesheet', href: '//at.alicdn.com/t/font_3202885_9p4m8dagmyh.css' },
],
// script: [
// {
Expand Down Expand Up @@ -64,8 +64,14 @@ export default {
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
transpile: [/^element-ui/],
extend(config, { isDev }) {
if (!isDev) {
config.output.publicPath = './dist/'
}
},
},
router: {
mode: 'hash',
base: process.env.NODE_ENV === 'production' ? '/dist' : '/',
routeNameSplitter: '/',
extendRoutes(routes, resolve) {
Expand Down
4 changes: 2 additions & 2 deletions store/modules/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Cookies from 'js-cookie'

const state = {
const state = () => ({
sidebar: {
opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
withoutAnimation: false,
Expand All @@ -9,7 +9,7 @@ const state = {
device: 'desktop',
size: Cookies.get('size') || 'medium',
menu: {},
}
})

const mutations = {
TOGGLE_SIDEBAR: (state) => {
Expand Down
4 changes: 2 additions & 2 deletions store/modules/stableData.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const now = new Date()

const state = {
const state = () => ({
contractDictionary: [],
allDictionary: null,
}
})

const mutations = {
SET_AllDictionary: (state, dictionary) => {
Expand Down

0 comments on commit 2e2457d

Please sign in to comment.