Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add minio protocol and base option #3

Open
wants to merge 1 commit into
base: release-1.6
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/views/system/optiontabs/AttachmentTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,14 @@
</a-form-model-item>
</div>
<div v-show="options.attachment_type === 'MINIO'" id="minioForm">
<a-form-model-item label="终端节点协议:">
<a-select v-model="options.minio_protocol">
<a-select-option value="https://">HTTPS</a-select-option>
<a-select-option value="http://">HTTP</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item label="EndPoint(终端节点):">
<a-input v-model="options.minio_endpoint" placeholder="Endpoint" />
<a-input v-model="options.minio_endpoint" placeholder="无需再加上 http:// 或者 https://" />
</a-form-model-item>
<a-form-model-item label="Bucket(桶名称):">
<a-input v-model="options.minio_bucket_name" placeholder="桶名称" />
Expand All @@ -258,6 +264,9 @@
<a-form-model-item label="文件目录:">
<a-input v-model="options.minio_source" placeholder="不填写则上传到根目录" />
</a-form-model-item>
<a-form-model-item label="前端访问地址:">
<a-input v-model="options.minio_front_base" placeholder="用于前端预览的地址,需要包含 http:// 或者 https://" />
</a-form-model-item>
</div>
<a-form-model-item>
<ReactiveButton
Expand Down Expand Up @@ -565,6 +574,13 @@ export default {
}
break
case 'MINIO':
if (!this.options.minio_protocol) {
this.$notification['error']({
message: '提示',
description: '协议不能为空!'
})
return
}
if (!this.options.minio_endpoint) {
this.$notification['error']({
message: '提示',
Expand Down