修改:网站设置
This commit is contained in:
parent
f0ea9dfc84
commit
7d66081362
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jmal-cloud-view",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.5",
|
||||
"description": "jmal cloud",
|
||||
"author": "Jmal <zhushilun084@163.com>",
|
||||
"license": "MIT",
|
||||
|
||||
@ -4,8 +4,7 @@
|
||||
<el-col :xs="24">
|
||||
<select-file title="选择图片" @select="selectedFile" :visible.sync="dialogSelectFile"></select-file>
|
||||
<div class="upload">
|
||||
<!-- <div class="url-desc url-desc-first">输入图片的url 或</div>-->
|
||||
<el-button class="upload-select-btn" title="选择文件" type="primary" size="small" icon="el-icon-folder" circle @click="dialogSelectFile = true"></el-button>
|
||||
<el-button v-if="enableSelect" class="upload-select-btn" title="选择文件" type="primary" size="small" icon="el-icon-folder" circle @click="dialogSelectFile = true"></el-button>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
class="upload"
|
||||
@ -13,7 +12,7 @@
|
||||
:headers="headers"
|
||||
:data="extraData"
|
||||
name="files"
|
||||
accept="image/*"
|
||||
:accept="accept"
|
||||
:show-file-list="false"
|
||||
:file-list="fileList"
|
||||
:limit="1"
|
||||
@ -23,6 +22,7 @@
|
||||
:on-progress="handleProgress"
|
||||
>
|
||||
<el-button title="上传" type="primary" size="small" icon="el-icon-upload2" circle></el-button>
|
||||
<span v-if="desc.length > 0">{{desc}}</span>
|
||||
<div class="url-desc" v-if="uploadState > 0" slot="tip">
|
||||
<span v-show="uploadState === 1">图片上传中{{uploadPercentage}}%</span>
|
||||
<span v-show="uploadState === 2">图片上传成功</span>
|
||||
@ -41,7 +41,7 @@
|
||||
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||
<el-input
|
||||
:autosize="intputAutosize"
|
||||
:placeholder="placeholder"
|
||||
:placeholder="(enableUrl ? '请输入图片的url 或 ': '') + placeholder"
|
||||
type="textarea"
|
||||
width="100%"
|
||||
v-model="currentValue"
|
||||
@ -76,17 +76,33 @@ export default {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default: 'image/*'
|
||||
},
|
||||
tipImageMaxWidth: {
|
||||
type: Number,
|
||||
default: 250
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请输入图片的url 或 点击上传'
|
||||
default: '点击上传'
|
||||
},
|
||||
intputAutosize: {
|
||||
type: Object,
|
||||
default: ()=>{ return { minRows: 1, maxRows: 6} }
|
||||
},
|
||||
enableSelect: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
enableUrl: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
desc: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -182,7 +198,7 @@ export default {
|
||||
xhr.send();
|
||||
},
|
||||
loadSuccess() {
|
||||
if(this.timer == null){
|
||||
if(this.timer == null && this.enableUrl){
|
||||
if(this.isLocked){
|
||||
const that = this
|
||||
this.timer = setTimeout(function (){
|
||||
|
||||
@ -80,9 +80,6 @@ a:hover {
|
||||
padding-bottom: 5px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
>>> .el-button {
|
||||
padding: 0px 0px;
|
||||
}
|
||||
}
|
||||
.img-dialog {
|
||||
|
||||
|
||||
@ -21,7 +21,13 @@
|
||||
</a-affix>
|
||||
|
||||
<el-tabs v-if="!subpage" v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="网站首页背景" name="1">
|
||||
<el-tab-pane label="网站首页" name="1">
|
||||
<div class="config-itme-label">网站图标:</div>
|
||||
<upload-image-input v-model="form.siteIco" desc="只支持ico格式" :enable-select="false" :enable-url="false" accept="image/vnd.microsoft.icon"/>
|
||||
<span class="instruction"><a href="http://www.ico51.cn" target="_blank">在线制作ico</a></span>
|
||||
<div class="config-itme-label">站点名称:</div>
|
||||
<el-input autosize type="textarea" width="100%" v-model="form.siteName"></el-input>
|
||||
<span class="instruction">给您的网站取一个响亮的名字。</span>
|
||||
<div class="config-itme-label">站点地址:</div>
|
||||
<el-input autosize type="textarea" width="100%" v-model="form.siteUrl"></el-input>
|
||||
<span class="instruction">在这里填入站点的地址或域名。例如:<a href="https://blog.jmal.top" target="_blank">https://blog.jmal.top</a></span>
|
||||
@ -38,8 +44,8 @@
|
||||
<span class="instruction">显示在博客首页大图内的描述。</span>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="导航栏" name="2">
|
||||
<div class="config-itme-label">导航栏顶部 - 网站 Logo / 站点名称:</div>
|
||||
<el-input autosize type="textarea" width="100%" v-model="form.siteName"></el-input>
|
||||
<div class="config-itme-label">导航栏顶部 - 网站 Logo:</div>
|
||||
<el-input autosize type="textarea" width="100%" v-model="form.siteLogo"></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: 1, maxRows: 6 }"
|
||||
@ -130,7 +136,9 @@ export default {
|
||||
backgroundSite: '',
|
||||
backgroundTextSite: '',
|
||||
backgroundDescSite: '',
|
||||
siteIco: '',
|
||||
siteName: '',
|
||||
siteLogo: '',
|
||||
operatingButtons: '',
|
||||
categoryBackground: '',
|
||||
archiveBackground: '',
|
||||
@ -320,4 +328,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.config-itme-label {
|
||||
>>> .el-button {
|
||||
padding: 0px 0px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user