chore: remove gitee image host (#146)

This commit is contained in:
Yang Libin 2022-03-27 19:45:14 +08:00 committed by GitHub
parent bf3c6c4ec1
commit 8e230984bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 30 deletions

View File

@ -48,13 +48,12 @@ Markdown 文档自动即时渲染为微信图文,让你不再为微信文章
| # | 图床 | 使用时是否需要配置 | 备注 |
| --- | ----------------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| 1 | 默认 | 否 | - |
| 2 | [Gitee](https://gitee.com) | 配置 `Repo`、`Token` 参数 | 图片超过 1MB 无法正常展示 |
| 3 | [GitHub](https://github.com) | 配置 `Repo`、`Token` 参数 | [如何获取 GitHub token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) |
| 4 | [阿里云](https://www.aliyun.com/product/oss) | 配置 `AccessKey ID`、`AccessKey Secret`、`Bucket`、`Region` 参数 | [如何使用阿里云 OSS](https://help.aliyun.com/document_detail/31883.html) |
| 5 | [腾讯云](https://cloud.tencent.com/act/pro/cos) | 配置 `SecretId`、`SecretKey`、`Bucket`、`Region` 参数 | [如何使用腾讯云 COS](https://cloud.tencent.com/document/product/436/38484) |
| 6 | [七牛云](https://www.qiniu.com/products/kodo) | 配置 `AccessKey`、`SecretKey`、`Bucket`、`Domain`、`Region` 参数 | [如何使用七牛云 Kodo](https://developer.qiniu.com/kodo) |
| 7 | [MinIO](https://min.io/) | 配置 `Endpoint`、`Port`、`UseSSL`、`Bucket`、`AccessKey`、`SecretKey` 参数 | [如何使用 MinIO](http://docs.minio.org.cn/docs/master/minio-client-complete-guide) |
| 8 | 自定义上传 | 是 | [如何自定义上传?](#自定义上传逻辑) |
| 2 | [GitHub](https://github.com) | 配置 `Repo`、`Token` 参数 | [如何获取 GitHub token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) |
| 3 | [阿里云](https://www.aliyun.com/product/oss) | 配置 `AccessKey ID`、`AccessKey Secret`、`Bucket`、`Region` 参数 | [如何使用阿里云 OSS](https://help.aliyun.com/document_detail/31883.html) |
| 4 | [腾讯云](https://cloud.tencent.com/act/pro/cos) | 配置 `SecretId`、`SecretKey`、`Bucket`、`Region` 参数 | [如何使用腾讯云 COS](https://cloud.tencent.com/document/product/436/38484) |
| 5 | [七牛云](https://www.qiniu.com/products/kodo) | 配置 `AccessKey`、`SecretKey`、`Bucket`、`Domain`、`Region` 参数 | [如何使用七牛云 Kodo](https://developer.qiniu.com/kodo) |
| 6 | [MinIO](https://min.io/) | 配置 `Endpoint`、`Port`、`UseSSL`、`Bucket`、`AccessKey`、`SecretKey` 参数 | [如何使用 MinIO](http://docs.minio.org.cn/docs/master/minio-client-complete-guide) |
| 7 | 自定义上传 | 是 | [如何自定义上传?](#自定义上传逻辑) |
![select-and-change-color-theme](https://doocs.oss-cn-shenzhen.aliyuncs.com/img//1606034542281-a8c99fa7-c11e-4e43-98da-e36012f54dc8.gif)

View File

@ -39,7 +39,7 @@
</div>
</el-upload>
</el-tab-pane>
<el-tab-pane class="github-panel" label="Gitee 图床" name="gitee">
<!-- <el-tab-pane class="github-panel" label="Gitee 图床" name="gitee">
<el-form
class="setting-form"
:model="formGitee"
@ -77,7 +77,7 @@
>
</el-form-item>
</el-form>
</el-tab-pane>
</el-tab-pane> -->
<el-tab-pane class="github-panel" label="GitHub 图床" name="github">
<el-form
class="setting-form"
@ -405,11 +405,11 @@ export default {
branch: ``,
accessToken: ``,
},
formGitee: {
repo: ``,
branch: ``,
accessToken: ``,
},
// formGitee: {
// repo: ``,
// branch: ``,
// accessToken: ``,
// },
formAliOSS: {
accessKeyId: ``,
accessKeySecret: ``,
@ -463,10 +463,10 @@ export default {
value: `default`,
label: `默认`,
},
{
value: `gitee`,
label: `Gitee`,
},
// {
// value: `gitee`,
// label: `Gitee`,
// },
{
value: `github`,
label: `GitHub`,
@ -499,9 +499,9 @@ export default {
if (localStorage.getItem(`githubConfig`)) {
this.formGitHub = JSON.parse(localStorage.getItem(`githubConfig`))
}
if (localStorage.getItem(`giteeConfig`)) {
this.formGitee = JSON.parse(localStorage.getItem(`giteeConfig`))
}
// if (localStorage.getItem(`giteeConfig`)) {
// this.formGitee = JSON.parse(localStorage.getItem(`giteeConfig`))
// }
if (localStorage.getItem(`aliOSSConfig`)) {
this.formAliOSS = JSON.parse(localStorage.getItem(`aliOSSConfig`))
}
@ -529,15 +529,15 @@ export default {
localStorage.setItem(`githubConfig`, JSON.stringify(this.formGitHub))
this.$message.success(`保存成功`)
},
saveGiteeConfiguration() {
if (!(this.formGitee.repo && this.formGitee.accessToken)) {
const blankElement = this.formGitee.repo ? `私人令牌` : `Gitee 仓库`
this.$message.error(`参数「${blankElement}」不能为空`)
return
}
localStorage.setItem(`giteeConfig`, JSON.stringify(this.formGitee))
this.$message.success(`保存成功`)
},
// saveGiteeConfiguration() {
// if (!(this.formGitee.repo && this.formGitee.accessToken)) {
// const blankElement = this.formGitee.repo ? `` : `Gitee `
// this.$message.error(`${blankElement}`)
// return
// }
// localStorage.setItem(`giteeConfig`, JSON.stringify(this.formGitee))
// this.$message.success(``)
// },
saveAliOSSConfiguration() {
if (
!(