修复:修复一些bug
This commit is contained in:
parent
793c682ac5
commit
94f88c93e8
@ -1,19 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="container">
|
||||
<!--<img :src="sourceImg" style="width: 50px; height: 50px;">-->
|
||||
<div class="img-container" v-loading="loading">
|
||||
<div class="img-region">
|
||||
<img :src="sourceImg" ref="image" style="max-width: 100%;" alt="">
|
||||
</div>
|
||||
<div class="button-region">
|
||||
<el-button type="primary" @click="sureSava">保存头像</el-button>
|
||||
<el-button v-if="sourceImg.length > 0" type="primary" @click="sureSava">保存头像</el-button>
|
||||
<el-button @click="selectImg">重新选择</el-button>
|
||||
<!--<el-upload-->
|
||||
<!--action="https://jsonplaceholder.typicode.com/posts/"-->
|
||||
<!--:auto-upload="false">-->
|
||||
<!--<el-button ref="selectImg">选择</el-button>-->
|
||||
<!--</el-upload>-->
|
||||
<input ref="selectImg" type="file" style="display: none;" accept="image/*" @change="changImg"></input>
|
||||
</div>
|
||||
</div>
|
||||
@ -42,7 +36,7 @@
|
||||
},
|
||||
src: {
|
||||
type: String,
|
||||
default: '~@/assets/img/widget-img.jpeg'
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data () {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
import { Icon } from 'ant-design-vue'
|
||||
const IconFont = Icon.createFromIconfontCN({
|
||||
scriptUrl: '//at.alicdn.com/t/font_2024484_m5kf9lawn2i.js'
|
||||
scriptUrl: '//at.alicdn.com/t/font_2024484_m4qfejm9sve.js'
|
||||
})
|
||||
|
||||
export default {
|
||||
|
||||
@ -4,10 +4,16 @@
|
||||
<breadcrumb class="breadcrumb-container" />
|
||||
|
||||
<div class="right-content">
|
||||
<div class="right-content-button">
|
||||
<router-link target="_blank" to="/articles">
|
||||
<svg-icon icon-class="WEBSITE"></svg-icon>网站
|
||||
</router-link></div>
|
||||
<router-link to="/setting/website/manager-blog">
|
||||
<div class="right-content-button">
|
||||
<svg-icon icon-class="wangzhanguanli"></svg-icon>网站管理
|
||||
</div>
|
||||
</router-link>
|
||||
<router-link target="_blank" to="/articles">
|
||||
<div class="right-content-button">
|
||||
<svg-icon icon-class="WEBSITE"></svg-icon>网站
|
||||
</div>
|
||||
</router-link>
|
||||
<div class="right-username">{{username}}</div>
|
||||
<div class="right-menu">
|
||||
<el-dropdown class="avatar-container" trigger="click">
|
||||
@ -23,17 +29,9 @@
|
||||
</router-link>
|
||||
<router-link to="/setting/website/manager-blog">
|
||||
<el-dropdown-item>
|
||||
<svg-icon icon-class="wangzhan"></svg-icon>网站管理
|
||||
<svg-icon icon-class="wangzhanguanli"></svg-icon>网站管理
|
||||
</el-dropdown-item>
|
||||
</router-link>
|
||||
<!--<router-link to="/">-->
|
||||
<!--<el-dropdown-item>-->
|
||||
<!--首页-->
|
||||
<!--</el-dropdown-item>-->
|
||||
<!--</router-link>-->
|
||||
<!--<a target="_blank" href="https://github.com/jamebal/jmal-cloud-view/">-->
|
||||
<!--<el-dropdown-item>Github</el-dropdown-item>-->
|
||||
<!--</a>-->
|
||||
<el-dropdown-item divided @click.native="logout">
|
||||
<svg-icon icon-class="tuichudenglu"></svg-icon>退出登录
|
||||
</el-dropdown-item>
|
||||
@ -174,7 +172,7 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.avatar-container:hover {
|
||||
&:hover {
|
||||
background-color: #00000006;
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ export const constantRoutes = [
|
||||
path: 'manager-alone-page',
|
||||
name: 'manager-alone-page',
|
||||
component: () => import('@/views/setting/articles/alonePageManager'),
|
||||
meta: { title: '独立页面' , icon: 'guanlizhuanjiawenzhang'}
|
||||
meta: { title: '独立页面' , icon: 'yemianshezhi'}
|
||||
},
|
||||
{
|
||||
path: 'manager-blog',
|
||||
|
||||
@ -185,7 +185,7 @@
|
||||
filename: '',
|
||||
clientHeight: document.documentElement.clientHeight,
|
||||
updating: false,
|
||||
storageLocation: '/',
|
||||
storageLocation: '',
|
||||
selectLocationVisible: false,
|
||||
moreSetting: false,
|
||||
contentEditor: '',
|
||||
@ -264,7 +264,6 @@
|
||||
this.currentDarft = false
|
||||
this.file = res.data
|
||||
}
|
||||
console.log(this.file)
|
||||
// 初始化编辑器
|
||||
if(isReload){
|
||||
this.contentEditor.setValue(this.file.contentText)
|
||||
@ -273,7 +272,6 @@
|
||||
}
|
||||
this.content = this.file.contentText
|
||||
this.filename = this.file.name.split('.md')[0]
|
||||
this.storageLocation = this.file.path
|
||||
// 加载标签
|
||||
if(this.file.tagIds && this.file.tagIds.length > 0 && this.tags && this.tags.length > 0) {
|
||||
this.loadDynamicTags()
|
||||
@ -376,11 +374,12 @@
|
||||
return {
|
||||
accept: 'image/*,.mp3, .wav, .rar',
|
||||
headers: {
|
||||
'jmal-token': this.$store.state.user.token
|
||||
'jmal-token': this.$store.state.user.token,
|
||||
'username': this.$store.state.user.name,
|
||||
'userId': this.$store.state.user.userId
|
||||
},
|
||||
url: '/api/upload-markdown-image',
|
||||
extraData: {
|
||||
'filename': this.filename,
|
||||
'username': this.$store.state.user.name,
|
||||
'userId': this.$store.state.user.userId
|
||||
},
|
||||
@ -399,7 +398,16 @@
|
||||
response.data = {}
|
||||
response.data['succMap'] = succMap
|
||||
return JSON.stringify(response)
|
||||
}
|
||||
},
|
||||
error(msg) {
|
||||
console.log('error', msg)
|
||||
},
|
||||
linkToImgUrl: '/api/upload-markdown-link-image',
|
||||
linkToImgFormat(responseText) {
|
||||
let response = JSON.parse(responseText)
|
||||
response.data['url'] = fileConfig.mardownPreviewUrl(response.data.url)
|
||||
return JSON.stringify(response)
|
||||
},
|
||||
}
|
||||
},
|
||||
save(){
|
||||
@ -475,6 +483,7 @@
|
||||
tagNames: this.dynamicTags,
|
||||
currentDirectory: this.storageLocation,
|
||||
contentText: this.contentEditor.getValue(),
|
||||
html: this.contentEditor.getHTML(),
|
||||
uploadDate: this.file.uploadDate,
|
||||
}).then((res) => {
|
||||
this.$emit('update:hasChange', false)
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
<div class="config-itme-label">导航栏顶部 - 网站 Logo / 站点名称:</div>
|
||||
<el-input autosize type="textarea" width="100%" v-model="form.siteName"></el-input>
|
||||
<span class="instruction">配置网站的 Logo,该选项仅作用于顶部导航条</span>
|
||||
|
||||
<div class="config-itme-label">导航栏操作按钮:</div>
|
||||
<el-input type="textarea" width="100%" v-model="form.operatingButtons" :autosize="{ minRows: 4, maxRows: 6 }" @input="preview"></el-input>
|
||||
<span class="instruction">
|
||||
@ -54,7 +53,24 @@
|
||||
</div>
|
||||
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="分类界面" name="3">
|
||||
<el-collapse-item title="归档、分类、标签" name="3">
|
||||
|
||||
<div class="config-itme-label">页面显示与否:</div>
|
||||
<el-checkbox-group v-model="form.alonePages">
|
||||
<el-checkbox label="archives">归档</el-checkbox>
|
||||
<el-checkbox label="categories">分类</el-checkbox>
|
||||
<el-checkbox label="tags">标签</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<span class="instruction">选中项会显示在导航栏中</span>
|
||||
|
||||
<div class="config-itme-label">归档界面背景大图:</div>
|
||||
<el-tooltip class="item" effect="dark" placement="bottom" :disabled="!form.archiveBackground || form.archiveBackground.length === 0">
|
||||
<el-input autosize type="textarea" width="100%" v-model="form.archiveBackground"></el-input>
|
||||
<div slot="content">
|
||||
<el-image style="width: 150px;" :src="form.archiveBackground" fit="contain"></el-image>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<span class="instruction">在这里填入图片的URL地址, 以在归档页面显示一个背景大图。</span>
|
||||
<div class="config-itme-label">分类界面背景大图:</div>
|
||||
<el-tooltip class="item" effect="dark" placement="bottom" :disabled="!form.categoryBackground || form.categoryBackground.length === 0">
|
||||
<el-input autosize type="textarea" width="100%" v-model="form.categoryBackground"></el-input>
|
||||
@ -63,6 +79,14 @@
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<span class="instruction">在这里填入图片的URL地址, 以在分类页面显示一个背景大图。</span>
|
||||
<div class="config-itme-label">标签界面背景大图:</div>
|
||||
<el-tooltip class="item" effect="dark" placement="bottom" :disabled="!form.tagBackground || form.tagBackground.length === 0">
|
||||
<el-input autosize type="textarea" width="100%" v-model="form.tagBackground"></el-input>
|
||||
<div slot="content">
|
||||
<el-image style="width: 150px;" :src="form.tagBackground" fit="contain"></el-image>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<span class="instruction">在这里填入图片的URL地址, 以在分类页面显示一个背景大图。</span>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-card>
|
||||
@ -91,8 +115,11 @@ export default {
|
||||
siteName: '',
|
||||
operatingButtons: '',
|
||||
categoryBackground: '',
|
||||
archiveBackground: '',
|
||||
tagBackground: '',
|
||||
alonePages: []
|
||||
},
|
||||
operatingButtons: []
|
||||
operatingButtons: [],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
|
||||
@ -47,7 +47,6 @@
|
||||
<el-button class="card-button" size="mini" type="primary" @click="add()">新增分类</el-button>
|
||||
</div>
|
||||
<div class="card-header-right" v-show="this.multipleSelection.length > 0">
|
||||
<el-button v-show="this.multipleSelection.length === 1" size="small" @click="handleEdit()">编辑</el-button>
|
||||
<el-button size="small" type="danger" @click="handleDelete()">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@ -65,6 +64,9 @@
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="名称">
|
||||
<template slot-scope="scope">
|
||||
<a @click="handleEdit(scope.row.id)">{{scope.row.name}}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="子分类">
|
||||
@ -234,12 +236,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleEdit() {
|
||||
handleEdit(id) {
|
||||
this.editMove = 2
|
||||
this.dialogVisible = true
|
||||
this.dialogTitle = '修改分类'
|
||||
categoryApi.categoryInfo({
|
||||
categoryId: this.multipleSelection[0].id
|
||||
categoryId: id
|
||||
}).then(res => {
|
||||
this.form = res.data
|
||||
})
|
||||
|
||||
@ -144,13 +144,6 @@
|
||||
},
|
||||
// 忘记密码
|
||||
forget() {
|
||||
// this.$confirm('请联系管理员重置密码', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// cancelButtonText: '',
|
||||
// type: 'info'
|
||||
// }).then(() => {
|
||||
// })
|
||||
|
||||
this.$alert('请联系管理员重置密码', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
@ -224,6 +217,7 @@
|
||||
},
|
||||
// 修改用户信息操作
|
||||
userUpdate(data, dataURL){
|
||||
console.log('this.$store.state.user.avatar', this.$store.state.user.avatar)
|
||||
this.userUpdateLoading = true
|
||||
userUpdate(data).then((res) => {
|
||||
this.userUpdateLoading = false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user