fix: update validateConfig func

This commit is contained in:
yanglbme 2020-11-09 08:39:49 +08:00
parent 3fac278a83
commit 5f913d4b27
3 changed files with 14 additions and 5 deletions

View File

@ -49,7 +49,7 @@ Markdown 文档自动即时渲染为微信图文,让你不再为微信文章
| 2 | GitHub 图床 | 配置 `Repo`、`Token` 参数 | [如何获取 GitHub token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) |
| 3 | 阿里云 OSS | 配置 `AccessKey ID`、`AccessKey Secret`、`Bucket`、`Region` 等参数 | [如何使用阿里云 OSS](https://help.aliyun.com/document_detail/31883.html) |
| 4 | 腾讯云 COS | 配置 `SecretId`、`SecretKey`、`Bucket`、`Region` 等参数 | [如何使用腾讯云 COS](https://cloud.tencent.com/document/product/436/38484) |
| 5 | 七牛云 Kodo | 配置 `AccessKey`、`SecretKey`、`Bucket`、`Domain`、`Region` 等参数 | [如何使用七牛云 Kodo](https://cloud.tencent.com/document/product/436/38484) |
| 5 | 七牛云 Kodo | 配置 `AccessKey`、`SecretKey`、`Bucket`、`Domain`、`Region` 等参数 | [如何使用七牛云 Kodo](https://developer.qiniu.com/kodo) |
![select-and-change-color-theme](./public/assets/images/select-and-change-color-theme.gif)

View File

@ -59,9 +59,9 @@ export function utf8to16(str) {
return out;
}
var base64EncodeChars =
const base64EncodeChars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
var base64DecodeChars = new Array(
const base64DecodeChars = new Array(
-1,
-1,
-1,

View File

@ -231,7 +231,7 @@
<el-form-item label="Bucket 对应域名" :required="true">
<el-input
v-model.trim="formQiniu.domain"
placeholder="如http://images.123ylb.cn"
placeholder="如https://images.123ylb.cn"
></el-input>
</el-form-item>
<el-form-item label="存储区域" :required="true">
@ -247,7 +247,7 @@
></el-input>
<el-link
type="primary"
href="https://cloud.tencent.com/document/product/436/38484"
href="https://developer.qiniu.com/kodo"
target="_blank"
>如何使用七牛云 Kodo</el-link
>
@ -496,6 +496,15 @@ export default {
this.formTxCOS.region;
errMessage = checkRes ? "" : "请先配置腾讯云 COS 参数";
break;
case "qiniu":
checkRes =
this.formQiniu.accessKey &&
this.formQiniu.secretKey &&
this.formQiniu.bucket &&
this.formQiniu.domain &&
this.formQiniu.region;
errMessage = checkRes ? "" : "请先配置七牛云 Kodo 参数";
break;
}
errMessage && this.$message.error(errMessage);
return checkRes;