| @@ -38,7 +38,7 @@ | |||
| type="text" | |||
| class="disabled" | |||
| style="width: 48.5%" | |||
| placeholder="选择数据集文件" | |||
| placeholder="{{i18n.dataset_select_placeholder}}" | |||
| required | |||
| /> | |||
| <input | |||
| @@ -46,7 +46,7 @@ | |||
| type="text" | |||
| class="disabled" | |||
| :required="required" | |||
| placeholder="选择数据集文件" | |||
| placeholder="{{i18n.dataset_select_placeholder}}" | |||
| /> | |||
| </span> | |||
| @@ -59,10 +59,10 @@ | |||
| ? 'select-dataset-button' | |||
| : 'select-dataset-button-color' | |||
| " | |||
| >选择数据集 | |||
| >{{i18n.dataset_select}} | |||
| </el-button> | |||
| <el-dialog | |||
| title="选择数据集" | |||
| title="{{i18n.dataset_select}}" | |||
| :visible.sync="dialogVisible" | |||
| :width="dialogWidth" | |||
| > | |||
| @@ -74,7 +74,7 @@ | |||
| ></i> | |||
| <input | |||
| type="text" | |||
| placeholder="搜数据集名称/描述..." | |||
| placeholder="{{i18n.dataset_search_placeholder}}" | |||
| v-model="search" | |||
| @keydown.enter.stop.prevent="searchName" | |||
| /> | |||
| @@ -90,7 +90,7 @@ | |||
| > | |||
| <el-tabs v-model="activeName" @tab-click="handleClick"> | |||
| <!-- 当前项目的数据集 --> | |||
| <el-tab-pane label="本项目" name="first" v-loading="loadingCurrent"> | |||
| <el-tab-pane label="{{i18n.dataset_current_repo}}" name="first" v-loading="loadingCurrent"> | |||
| <el-row> | |||
| <el-tree | |||
| :data="currentDatasetList" | |||
| @@ -144,7 +144,7 @@ | |||
| <i | |||
| class="ri-links-line" | |||
| style="color: #21ba45; margin-right: 0.3rem" | |||
| title="关联数据集" | |||
| title="{{i18n.dataset_relate}}" | |||
| v-if=" | |||
| '/' + data.Repo.OwnerName + '/' + data.Repo.Name !== | |||
| repoLink | |||
| @@ -172,13 +172,13 @@ | |||
| class="zip-loading" | |||
| v-if="data.DecompressState === 2" | |||
| > | |||
| 正在解压缩 | |||
| {{i18n.dataset_unziping}} | |||
| </span> | |||
| <span | |||
| class="unzip-failed" | |||
| v-if="data.DecompressState === 3" | |||
| > | |||
| 解压失败 | |||
| {{i18n.dataset_unzip_failed}} | |||
| </span> | |||
| </span> | |||
| </span> | |||
| @@ -201,7 +201,7 @@ | |||
| </div> | |||
| </el-tab-pane> | |||
| <!-- 我上传的数据集 --> | |||
| <el-tab-pane label="我上传的" name="second" v-loading="loadingMy"> | |||
| <el-tab-pane label="{{i18n.dataset_my_upload}}" name="second" v-loading="loadingMy"> | |||
| <el-row> | |||
| <el-tree | |||
| :data="myDatasetList" | |||
| @@ -274,13 +274,13 @@ | |||
| class="zip-loading" | |||
| v-if="data.DecompressState === 2" | |||
| > | |||
| 正在解压缩 | |||
| {{i18n.dataset_unziping}} | |||
| </span> | |||
| <span | |||
| class="unzip-failed" | |||
| v-if="data.DecompressState === 3" | |||
| > | |||
| 解压失败 | |||
| {{i18n.dataset_unzip_failed}} | |||
| </span> | |||
| </span> | |||
| </span> | |||
| @@ -304,7 +304,7 @@ | |||
| </el-tab-pane> | |||
| <!-- 公开的数据集 --> | |||
| <el-tab-pane | |||
| label="公开数据集" | |||
| label="{{i18n.dataset_public}}" | |||
| name="third" | |||
| v-loading="loadingPublic" | |||
| > | |||
| @@ -380,13 +380,13 @@ | |||
| class="zip-loading" | |||
| v-if="data.DecompressState === 2" | |||
| > | |||
| 正在解压缩 | |||
| {{i18n.dataset_unziping}} | |||
| </span> | |||
| <span | |||
| class="unzip-failed" | |||
| v-if="data.DecompressState === 3" | |||
| > | |||
| 解压失败 | |||
| {{i18n.dataset_unzip_failed}} | |||
| </span> | |||
| </span> | |||
| </span> | |||
| @@ -410,7 +410,7 @@ | |||
| </el-tab-pane> | |||
| <!-- 我点赞的数据集 --> | |||
| <el-tab-pane | |||
| label="我收藏的" | |||
| label="{{i18n.dataset_collected}}" | |||
| name="four" | |||
| v-loading="loadingFavorite" | |||
| > | |||
| @@ -486,13 +486,13 @@ | |||
| class="zip-loading" | |||
| v-if="data.DecompressState === 2" | |||
| > | |||
| 正在解压缩 | |||
| {{i18n.dataset_unziping}} | |||
| </span> | |||
| <span | |||
| class="unzip-failed" | |||
| v-if="data.DecompressState === 3" | |||
| > | |||
| 解压失败 | |||
| {{i18n.dataset_unzip_failed}} | |||
| </span> | |||
| </span> | |||
| </span> | |||
| @@ -536,7 +536,7 @@ | |||
| line-height: 40px; | |||
| " | |||
| > | |||
| 已选数据文件 | |||
| {{i18n.dataset_selected}} | |||
| </div> | |||
| <div style="flex: 1; margin-top: 1.5rem"> | |||
| <el-checkbox-group v-model="checkList"> | |||
| @@ -558,7 +558,7 @@ | |||
| color: #fff; | |||
| border: 1px solid #389e0d; | |||
| " | |||
| >确定</el-button | |||
| >{{i18n.dataset_ok}}</el-button | |||
| > | |||
| </div> | |||
| </el-col> | |||
| @@ -666,10 +666,10 @@ export default { | |||
| }) | |||
| ) { | |||
| this.$refs[data.ref].setChecked(data.id, false, false); | |||
| this.$message.warning("不能选择相同名称的数据文件"); | |||
| this.$message.warning(i18n.dataset_not_equal_file); | |||
| } else if (this.selectDatasetArray.length === 5) { | |||
| this.$refs[data.ref].setChecked(data.id, false, false); | |||
| this.$message.error("最多不超过五个文件"); | |||
| this.$message.error(i18n.dataset_most); | |||
| } else { | |||
| this.selectDatasetArray.push(data); | |||
| } | |||
| @@ -7,32 +7,32 @@ | |||
| v-if="benchmarkNew" | |||
| class="label-fix-width" | |||
| style="font-weight: normal" | |||
| >镜像</label | |||
| >{{i18n.image_label}}</label | |||
| > | |||
| <label v-else>镜像</label> | |||
| <label v-else>{{i18n.image_label}}</label> | |||
| <input | |||
| v-if="benchmarkNew" | |||
| type="text" | |||
| name="image" | |||
| :value="imageAddress" | |||
| style="width: 48.5%" | |||
| placeholder="选择镜像或输入镜像地址" | |||
| placeholder="{{i18n.image_select_placeholder}}" | |||
| /> | |||
| <input | |||
| v-else | |||
| type="text" | |||
| name="image" | |||
| :value="imageAddress" | |||
| placeholder="选择镜像或输入镜像地址" | |||
| placeholder="{{i18n.image_select_placeholder}}" | |||
| /> | |||
| <el-button | |||
| type="text" | |||
| @click="dialogVisible = true" | |||
| icon="el-icon-plus" | |||
| style="color: #0366d6" | |||
| >选择镜像 | |||
| >{{i18n.image_select}} | |||
| </el-button> | |||
| <el-dialog title="选择镜像" :visible.sync="dialogVisible" width="50%"> | |||
| <el-dialog title="{{i18n.image_select}}" :visible.sync="dialogVisible" width="50%"> | |||
| <div | |||
| class="ui icon input" | |||
| style="z-index: 9999; position: absolute; right: 50px; height: 30px" | |||
| @@ -43,12 +43,12 @@ | |||
| ></i> | |||
| <input | |||
| type="text" | |||
| placeholder="搜镜像Tag/描述/标签..." | |||
| placeholder="{{i18n.image_search_placeholder}}" | |||
| v-model="search" | |||
| /> | |||
| </div> | |||
| <el-tabs v-model="activeName" @tab-click="handleClick"> | |||
| <el-tab-pane label="公开镜像" name="first" v-loading="loadingPublic"> | |||
| <el-tab-pane label="{{i18n.image_public}}" name="first" v-loading="loadingPublic"> | |||
| <div | |||
| style=" | |||
| display: flex; | |||
| @@ -120,7 +120,7 @@ | |||
| selectImages(publicData.place, publicData.tag) | |||
| " | |||
| > | |||
| 使用 | |||
| {{i18n.image_use}} | |||
| </button> | |||
| </div> | |||
| </div> | |||
| @@ -169,6 +169,7 @@ export default { | |||
| }, | |||
| tableDataPublic: [], | |||
| loadingPublic: false, | |||
| i18n: {}, | |||
| }; | |||
| }, | |||
| methods: { | |||
| @@ -236,7 +237,13 @@ export default { | |||
| this.benchmarkNew = true; | |||
| } | |||
| }, | |||
| created() {}, | |||
| created() { | |||
| if (document.documentElement.attributes["lang"].nodeValue == "en-US") { | |||
| this.i18n = this.$locale.US; | |||
| } else { | |||
| this.i18n = this.$locale.CN; | |||
| } | |||
| }, | |||
| }; | |||
| </script> | |||
| @@ -7,16 +7,16 @@ | |||
| v-if="benchmarkNew" | |||
| class="label-fix-width" | |||
| style="font-weight: normal" | |||
| >镜像</label | |||
| >{{i18n.image_label}}</label | |||
| > | |||
| <label v-else>镜像</label> | |||
| <label v-else>{{i18n.image_label}}</label> | |||
| <input | |||
| v-if="benchmarkNew" | |||
| type="text" | |||
| name="image" | |||
| :value="imageAddress" | |||
| style="width: 48.5%" | |||
| placeholder="选择镜像或输入镜像地址" | |||
| placeholder="{{i18n.image_select_placeholder}}" | |||
| required | |||
| /> | |||
| <input | |||
| @@ -24,7 +24,7 @@ | |||
| type="text" | |||
| name="image" | |||
| :value="imageAddress" | |||
| placeholder="选择镜像或输入镜像地址" | |||
| placeholder="{{i18n.image_select_placeholder}}" | |||
| required | |||
| /> | |||
| <el-button | |||
| @@ -32,9 +32,9 @@ | |||
| @click="dialogVisible = true" | |||
| icon="el-icon-plus" | |||
| style="color: #0366d6" | |||
| >选择镜像 | |||
| >{{i18n.image_select}} | |||
| </el-button> | |||
| <el-dialog title="选择镜像" :visible.sync="dialogVisible" width="50%"> | |||
| <el-dialog title="{{i18n.image_select}}" :visible.sync="dialogVisible" width="50%"> | |||
| <div | |||
| class="ui icon input" | |||
| style="z-index: 9999; position: absolute; right: 50px; height: 30px" | |||
| @@ -45,12 +45,12 @@ | |||
| ></i> | |||
| <input | |||
| type="text" | |||
| placeholder="搜镜像Tag/描述/标签..." | |||
| placeholder="{{i18n.image_search_placeholder}}" | |||
| v-model="search" | |||
| /> | |||
| </div> | |||
| <el-tabs v-model="activeName" @tab-click="handleClick"> | |||
| <el-tab-pane label="公开镜像" name="first" v-loading="loadingPublic"> | |||
| <el-tab-pane label="{{i18n.image_public}}" name="first" v-loading="loadingPublic"> | |||
| <div | |||
| style=" | |||
| display: flex; | |||
| @@ -122,7 +122,7 @@ | |||
| selectImages(publicData.place, publicData.tag) | |||
| " | |||
| > | |||
| 使用 | |||
| {{i18n.image_use}} | |||
| </button> | |||
| </div> | |||
| </div> | |||
| @@ -142,7 +142,7 @@ | |||
| </div> | |||
| </el-tab-pane> | |||
| <el-tab-pane label="我的镜像" name="second" v-loading="loadingCustom"> | |||
| <el-tab-pane label="{{i18n.image_my}}" name="second" v-loading="loadingCustom"> | |||
| <div | |||
| style=" | |||
| display: flex; | |||
| @@ -208,7 +208,7 @@ | |||
| selectImages(customData.place, customData.tag) | |||
| " | |||
| > | |||
| 使用 | |||
| {{i18n.image_use}} | |||
| </button> | |||
| <span | |||
| v-if="customData.status === 0" | |||
| @@ -217,7 +217,7 @@ | |||
| <i class="CREATING"></i> | |||
| <span | |||
| style="margin-left: 0.4em; font-size: 12px; color: #5a5a5a" | |||
| >提交中</span | |||
| >{{i18n.image_commit}}</span | |||
| > | |||
| </span> | |||
| <span | |||
| @@ -228,11 +228,11 @@ | |||
| <el-tooltip | |||
| class="item" | |||
| effect="dark" | |||
| content="检测提交镜像是否大小超过20G!" | |||
| content="{{i18n.image_commit_content}}" | |||
| placement="left" | |||
| > | |||
| <span style="margin-left: 0.4em; font-size: 12px; color: red" | |||
| >提交失败</span | |||
| >{{i18n.image_commit_failed}}</span | |||
| > | |||
| </el-tooltip> | |||
| </span> | |||
| @@ -254,7 +254,7 @@ | |||
| </div> | |||
| </el-tab-pane> | |||
| <el-tab-pane label="我收藏的镜像" name="third"> | |||
| <el-tab-pane label="{{i18n.image_collected}}" name="third"> | |||
| <div | |||
| style=" | |||
| display: flex; | |||
| @@ -324,7 +324,7 @@ | |||
| class="ui primary basic button mini" | |||
| @click.stop.prevent="selectImages(starData.place, starData.tag)" | |||
| > | |||
| 使用 | |||
| {{i18n.image_use}} | |||
| </button> | |||
| </div> | |||
| </div> | |||
| @@ -368,7 +368,7 @@ export default { | |||
| paramsPublic: { page: 1, pageSize: 5, q: "", recommend: false }, | |||
| tableDataPublic: [], | |||
| loadingPublic: false, | |||
| i18n: {}, | |||
| currentPageCustom: 1, | |||
| pageSizeCustom: 5, | |||
| totalNumCustom: 0, | |||
| @@ -513,7 +513,13 @@ export default { | |||
| this.benchmark = true; | |||
| } | |||
| }, | |||
| created() {}, | |||
| created() { | |||
| if (document.documentElement.attributes["lang"].nodeValue == "en-US") { | |||
| this.i18n = this.$locale.US; | |||
| } else { | |||
| this.i18n = this.$locale.CN; | |||
| } | |||
| }, | |||
| }; | |||
| </script> | |||
| @@ -77,6 +77,7 @@ export const i18nVue = { | |||
| dataset_my_upload:"我上传的", | |||
| dataset_current_repo:"本项目", | |||
| dataset_public:"公开数据集", | |||
| dataset_relate:"关联数据集", | |||
| dataset_collected:"我收藏的", | |||
| dataset_selected:"已选数据文件", | |||
| dataset_ok:"确定", | |||