隐藏上传论文菜单

master
pan 4 years ago
parent bc1748439c
commit d900487db2
  1. 5
      components/account/login.vue
  2. 2
      nuxt.config.js
  3. 16
      pages/index/center.vue
  4. 2
      pages/index/upload.vue
  5. 6
      store/menus.js

@ -15,9 +15,9 @@
<script lang="ts">
import Vue from 'vue'
import Vue from 'vue'
export default Vue.extend({
export default Vue.extend({
name: 'login',
data() {
return {
@ -51,6 +51,7 @@
that.$message({
message: that.$t('account.form.tip.login_ok').toString(), duration: 1000, onClose: function() {
that.$cookies.set(that.GLOBAL.user_key, that.form.user)
that.$store.commit('menus/none')
that.$router.push(that.localePath('/document'))
}
})

@ -248,7 +248,7 @@ export default {
"title": "论文标题",
"type": "论文类型",
"upload": "点击上传",
"upload_tip": "只能上传txt",
"upload_tip": "只能上传txt、pdf格式的文件",
"year": "学位年度"
},
"tip": {

@ -6,19 +6,19 @@
<el-tab-pane :label="$t('center.collect.name')" name="Collect">
<collect/>
</el-tab-pane>
<el-tab-pane :label="$t('center.myupload.name')" name="Upload">
<myupload/>
</el-tab-pane>
<!-- <el-tab-pane :label="$t('center.myupload.name')" name="Upload">-->
<!-- <myupload/>-->
<!-- </el-tab-pane>-->
</el-tabs>
</template>
<script lang="ts">
import Security from '~/components/center/security.vue'
import Collect from '~/components/center/collect.vue'
import Myupload from '~/components/center/myupload.vue'
import Vue from 'vue'
import Security from '~/components/center/security.vue'
import Collect from '~/components/center/collect.vue'
import Myupload from '~/components/center/myupload.vue'
import Vue from 'vue'
export default Vue.extend({
export default Vue.extend({
name: 'center',
components: { Myupload, Collect, Security },
data(){

@ -75,7 +75,7 @@
:on-success="uploadOK"
:file-list="form.fileList"
:limit="1"
accept=".txt"
accept="application/pdf,text/plain"
v-model="form.fileList"
ref="file">
<el-button size="small" type="primary" v-if="form.fileList.length===0">{{$t('upload.form.upload')}}</el-button>

@ -2,15 +2,15 @@
* 菜单列表
*/
export const state=()=>({
menus:['document', 'note', 'center', 'upload']
menus:[]
})
export const mutations = {
//默认不包含阅读论文菜单
none(state){
state.menus=['document', 'note', 'center', 'upload']
state.menus=['document', 'note', 'center']
},
//包含阅读论文菜单
read(state){
state.menus=['document', 'note', 'center', 'upload','read']
state.menus=['document', 'note', 'center','read']
}
}

Loading…
Cancel
Save