feat: 创建运行环境增加版本校验 (#549)

This commit is contained in:
zhengkunwang223 2023-04-09 22:30:16 +08:00 committed by GitHub
parent 18b4c98daa
commit 18c5c99705
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -1276,7 +1276,7 @@ const message = {
runtime: {
runtime: 'Runtime',
image: 'Image',
workDir: 'working directory',
workDir: 'Working directory',
create: 'Create runtime',
name: 'Name',
resource: 'Source',
@ -1286,6 +1286,7 @@ const message = {
localHelper: 'The local operating environment needs to be installed by itself',
version: 'Version',
status: 'Status',
versionHelper: 'PHP version, e.g. v8.0',
},
};

View File

@ -1272,6 +1272,7 @@ const message = {
localHelper: '本地运行环境需要自行安装',
version: '版本',
status: '状态',
versionHelper: 'PHP的版本,例如 v8.0',
},
};
export default {

View File

@ -82,7 +82,7 @@
<el-alert :title="$t('runtime.localHelper')" type="info" :closable="false" />
</el-form-item>
<el-form-item :label="$t('runtime.version')" prop="version">
<el-input v-model="runtime.version"></el-input>
<el-input v-model="runtime.version" :placeholder="$t('runtime.versionHelper')"></el-input>
</el-form-item>
</div>
</el-form>
@ -144,7 +144,7 @@ const rules = ref<any>({
name: [Rules.appName],
resource: [Rules.requiredInput],
appId: [Rules.requiredSelect],
version: [Rules.requiredInput],
version: [Rules.requiredInput, Rules.paramCommon],
image: [Rules.requiredInput, Rules.imageName],
});
@ -268,6 +268,7 @@ const getRuntime = async (id: number) => {
const acceptParams = async (props: OperateRrops) => {
mode.value = props.mode;
initParam.value = false;
if (props.mode === 'create') {
runtime.value = {
name: '',