修该:文档编辑界面
This commit is contained in:
parent
fd1bbcf004
commit
2a9879c226
@ -1,9 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-header>
|
|
||||||
|
<el-dialog title="文件夹选择文件夹" :visible.sync="selectLocaltionVisible">
|
||||||
|
<file-tree :directoryTreeData="directoryTreeData"></file-tree>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-header height="120px">
|
||||||
<div class="header-item">
|
<div class="header-item">
|
||||||
<el-input placeholder="请输入文档名称" v-model="filename">
|
文章标题:
|
||||||
<template slot="append">.md</template>
|
<el-input placeholder="文章标题" v-model="filename"/>
|
||||||
|
</div>
|
||||||
|
<div class="header-item">
|
||||||
|
存储位置:
|
||||||
|
<el-input placeholder="存储位置" v-model="storageLocation">
|
||||||
|
<el-button slot="append" @click="selectDir">选择</el-button>
|
||||||
</el-input>
|
</el-input>
|
||||||
<el-button v-if="!editStatus" class="release-button" type="primary" @click="add" :loading="adding">发布文章</el-button>
|
<el-button v-if="!editStatus" class="release-button" type="primary" @click="add" :loading="adding">发布文章</el-button>
|
||||||
<el-button v-if="editStatus" class="release-button" type="primary" @click="update" :loading="updating">更新文章</el-button>
|
<el-button v-if="editStatus" class="release-button" type="primary" @click="update" :loading="updating">更新文章</el-button>
|
||||||
@ -28,7 +38,11 @@
|
|||||||
<script>
|
<script>
|
||||||
import markdownApi from '@/api/markdown-api'
|
import markdownApi from '@/api/markdown-api'
|
||||||
import uploadApi from '@/api/file-api'
|
import uploadApi from '@/api/file-api'
|
||||||
|
import FileTree from"@/components/FileTree"
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
FileTree
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
editStatus: false,
|
editStatus: false,
|
||||||
@ -38,6 +52,9 @@
|
|||||||
clientHeight: document.documentElement.clientHeight - 155,
|
clientHeight: document.documentElement.clientHeight - 155,
|
||||||
updating: false,
|
updating: false,
|
||||||
adding: false,
|
adding: false,
|
||||||
|
storageLocation: '/',
|
||||||
|
selectLocaltionVisible: false,
|
||||||
|
directoryTreeData: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -145,6 +162,9 @@
|
|||||||
});
|
});
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
selectDir(){
|
||||||
|
this.selectLocaltionVisible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,16 +174,19 @@
|
|||||||
padding: 5px 20px 20px 20px;
|
padding: 5px 20px 20px 20px;
|
||||||
}
|
}
|
||||||
/deep/ .el-header {
|
/deep/ .el-header {
|
||||||
padding: 12.5px 10px 20px 20px;
|
padding: 12.5px 20px 20px 20px;
|
||||||
}
|
}
|
||||||
/deep/ .el-input-group {
|
/deep/ .el-input-group {
|
||||||
width: unset;
|
width: unset;
|
||||||
}
|
}
|
||||||
.header-item {
|
.header-item {
|
||||||
float: right;
|
padding: 5px 0 5px 0;
|
||||||
.release-button {
|
.release-button {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
.el-input {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user