Support sm.ms api v2.

pull/40/head
ruibaby 2019-08-04 22:21:13 +08:00
parent 18277681e8
commit f785d84e53
1 changed files with 71 additions and 40 deletions

View File

@ -249,9 +249,26 @@
>{{ attachmentType[item].text }}</a-select-option> >{{ attachmentType[item].text }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<div
class="smmsForm"
v-show="smmsFormVisible"
>
<a-form-item
label="Secret Token"
:wrapper-col="wrapperCol"
>
<a-tooltip
:trigger="['focus']"
placement="right"
title="需要到 sm.ms 官网注册"
>
<a-input v-model="options.smms_api_secret_token" />
</a-tooltip>
</a-form-item>
</div>
<div <div
class="upyunForm" class="upyunForm"
v-show="upyunFormHidden" v-show="upyunFormVisible"
> >
<a-form-item <a-form-item
label="域名:" label="域名:"
@ -301,7 +318,7 @@
</div> </div>
<div <div
class="qnyunForm" class="qnyunForm"
v-show="qnyunFormHidden" v-show="qnyunFormVisible"
> >
<a-form-item <a-form-item
label="区域:" label="区域:"
@ -355,7 +372,7 @@
</div> </div>
<div <div
class="aliyunForm" class="aliyunForm"
v-show="aliyunFormHidden" v-show="aliyunFormVisible"
> >
<a-form-item <a-form-item
label="Bucket" label="Bucket"
@ -390,7 +407,7 @@
</div> </div>
<div <div
class="baiduyunForm" class="baiduyunForm"
v-show="baiduyunFormHidden" v-show="baiduyunFormVisible"
> >
<a-form-item <a-form-item
label="Bucket" label="Bucket"
@ -425,7 +442,7 @@
</div> </div>
<div <div
class="tencentyunForm" class="tencentyunForm"
v-show="tencentyunFormHidden" v-show="tencentyunFormVisible"
> >
<a-form-item <a-form-item
label="Bucket" label="Bucket"
@ -673,11 +690,12 @@ export default {
sm: { span: 12 }, sm: { span: 12 },
xs: { span: 24 } xs: { span: 24 }
}, },
upyunFormHidden: false, smmsFormVisible: false,
qnyunFormHidden: false, upyunFormVisible: false,
aliyunFormHidden: false, qnyunFormVisible: false,
baiduyunFormHidden: false, aliyunFormVisible: false,
tencentyunFormHidden: false, baiduyunFormVisible: false,
tencentyunFormVisible: false,
logoDrawerVisible: false, logoDrawerVisible: false,
faviconDrawerVisible: false, faviconDrawerVisible: false,
options: [], options: [],
@ -705,47 +723,60 @@ export default {
handleAttachChange(e) { handleAttachChange(e) {
switch (e) { switch (e) {
case 'LOCAL': case 'LOCAL':
this.upyunFormVisible = false
this.qnyunFormVisible = false
this.aliyunFormVisible = false
this.baiduyunFormVisible = false
this.tencentyunFormVisible = false
this.smmsFormVisible = false
break
case 'SMMS': case 'SMMS':
this.upyunFormHidden = false this.smmsFormVisible = true
this.qnyunFormHidden = false this.upyunFormVisible = false
this.aliyunFormHidden = false this.qnyunFormVisible = false
this.baiduyunFormHidden = false this.aliyunFormVisible = false
this.tencentyunFormHidden = false this.baiduyunFormVisible = false
this.tencentyunFormVisible = false
break break
case 'UPYUN': case 'UPYUN':
this.upyunFormHidden = true this.smmsFormVisible = false
this.qnyunFormHidden = false this.upyunFormVisible = true
this.aliyunFormHidden = false this.qnyunFormVisible = false
this.baiduyunFormHidden = false this.aliyunFormVisible = false
this.tencentyunFormHidden = false this.baiduyunFormVisible = false
this.tencentyunFormVisible = false
break break
case 'QNYUN': case 'QNYUN':
this.qnyunFormHidden = true this.smmsFormVisible = false
this.upyunFormHidden = false this.qnyunFormVisible = true
this.aliyunFormHidden = false this.upyunFormVisible = false
this.baiduyunFormHidden = false this.aliyunFormVisible = false
this.tencentyunFormHidden = false this.baiduyunFormVisible = false
this.tencentyunFormVisible = false
break break
case 'ALIYUN': case 'ALIYUN':
this.aliyunFormHidden = true this.smmsFormVisible = false
this.qnyunFormHidden = false this.aliyunFormVisible = true
this.upyunFormHidden = false this.qnyunFormVisible = false
this.baiduyunFormHidden = false this.upyunFormVisible = false
this.tencentyunFormHidden = false this.baiduyunFormVisible = false
this.tencentyunFormVisible = false
break break
case 'BAIDUYUN': case 'BAIDUYUN':
this.aliyunFormHidden = false this.smmsFormVisible = false
this.qnyunFormHidden = false this.aliyunFormVisible = false
this.upyunFormHidden = false this.qnyunFormVisible = false
this.baiduyunFormHidden = true this.upyunFormVisible = false
this.tencentyunFormHidden = false this.baiduyunFormVisible = true
this.tencentyunFormVisible = false
break break
case 'TENCENTYUN': case 'TENCENTYUN':
this.aliyunFormHidden = false this.smmsFormVisible = false
this.qnyunFormHidden = false this.aliyunFormVisible = false
this.upyunFormHidden = false this.qnyunFormVisible = false
this.baiduyunFormHidden = false this.upyunFormVisible = false
this.tencentyunFormHidden = true this.baiduyunFormVisible = false
this.tencentyunFormVisible = true
break break
} }
}, },