diff --git a/README.md b/README.md index 866f066..54075d8 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,16 @@ npm install # develop npm run dev ``` + +### 4. Build +```bush +# build for test environment +npm run build:stage + +# build for production environment +npm run build:prod +``` + This will automatically open http://localhost:9528 ## Browsers support diff --git a/src/permission.js b/src/permission.js index 3914d97..58fc470 100644 --- a/src/permission.js +++ b/src/permission.js @@ -8,7 +8,7 @@ import getPageTitle from '@/utils/get-page-title' NProgress.configure({ showSpinner: false }) // NProgress Configuration -const whiteList = ['/login','/public/articles','/public/article','/share'] // no redirect whitelist +const whiteList = ['/login','/public/articles','/public/articles/article','/share'] // no redirect whitelist router.beforeEach(async(to, from, next) => { // start progress bar diff --git a/src/views/form/index.vue b/src/views/form/index.vue index 3028867..5028bd8 100644 --- a/src/views/form/index.vue +++ b/src/views/form/index.vue @@ -1,63 +1,17 @@ diff --git a/src/views/home/index.vue b/src/views/home/index.vue index c374c50..a689b80 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -1420,14 +1420,14 @@ export default { } } else { if(row.contentType.includes('text')){ - // let routeData = this.$router.resolve({path: '/public/p',query: {mark: row.id}}) + // let routeData = this.$router.resolve({path: '/public/articles/article',query: {mark: row.id}}) // window.open(routeData.href, '_blank'); this.$router.push(`/public/articles/article?mark=${row.id}`) }else{ // 打开文件 const fileIds = [row.id] const url = process.env.VUE_APP_BASE_FILE_API + 'preview/' + row.name + '?jmal-token=' + this.$store.state.user.token + '&fileIds=' + fileIds - window.open(url, '_self') + window.open(url, '_blank') } } } diff --git a/src/views/public/article/index.vue b/src/views/public/article/index.vue index 452b923..02faba6 100644 --- a/src/views/public/article/index.vue +++ b/src/views/public/article/index.vue @@ -20,7 +20,7 @@
-
+
目录
@@ -51,7 +51,8 @@ toolbarsFlag: true, content:'', html:'', - titleList: [] + titleList: [], + tocMaxHeight: 500 } }, mounted() { diff --git a/src/views/table/index.vue b/src/views/table/index.vue index 3f00243..7f08893 100644 --- a/src/views/table/index.vue +++ b/src/views/table/index.vue @@ -3,7 +3,6 @@