Skip to content

Commit

Permalink
chore: remove gitee image host (doocs#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme authored Mar 27, 2022
1 parent bf3c6c4 commit 8e23098
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
46 changes: 23 additions & 23 deletions src/components/CodemirrorEditor/uploadImgDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -405,11 +405,11 @@ export default {
branch: ``,
accessToken: ``,
},
formGitee: {
repo: ``,
branch: ``,
accessToken: ``,
},
// formGitee: {
// repo: ``,
// branch: ``,
// accessToken: ``,
// },
formAliOSS: {
accessKeyId: ``,
accessKeySecret: ``,
Expand Down Expand Up @@ -463,10 +463,10 @@ export default {
value: `default`,
label: `默认`,
},
{
value: `gitee`,
label: `Gitee`,
},
// {
// value: `gitee`,
// label: `Gitee`,
// },
{
value: `github`,
label: `GitHub`,
Expand Down Expand Up @@ -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`))
}
Expand Down Expand Up @@ -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 (
!(
Expand Down

0 comments on commit 8e23098

Please sign in to comment.