mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
parent
08fe607012
commit
7716df55f9
@ -54,11 +54,18 @@
|
|||||||
prop="varsJson.code"
|
prop="varsJson.code"
|
||||||
:rules="rules.driveCode"
|
:rules="rules.driveCode"
|
||||||
>
|
>
|
||||||
<el-input clearable v-model.trim="dialogData.rowData!.varsJson['code']">
|
<div style="width: 100%">
|
||||||
<template #append>
|
<el-input
|
||||||
<el-button @click="jumpAzure">{{ $t('setting.loadCode') }}</el-button>
|
style="width: calc(100% - 80px)"
|
||||||
</template>
|
:autosize="{ minRows: 3, maxRows: 15 }"
|
||||||
</el-input>
|
type="textarea"
|
||||||
|
clearable
|
||||||
|
v-model.trim="dialogData.rowData!.varsJson['code']"
|
||||||
|
/>
|
||||||
|
<el-button class="append-button" @click="jumpAzure">
|
||||||
|
{{ $t('setting.loadCode') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
<span class="input-help">
|
<span class="input-help">
|
||||||
{{ $t('setting.codeHelper') }}
|
{{ $t('setting.codeHelper') }}
|
||||||
<el-link
|
<el-link
|
||||||
@ -269,7 +276,7 @@ const rules = reactive({
|
|||||||
driveCode: [{ validator: checkDriveCode, required: true, trigger: 'blur' }],
|
driveCode: [{ validator: checkDriveCode, required: true, trigger: 'blur' }],
|
||||||
});
|
});
|
||||||
function checkDriveCode(rule: any, value: any, callback: any) {
|
function checkDriveCode(rule: any, value: any, callback: any) {
|
||||||
const reg = /^[A-Za-z0-9_.-]{32,60}$/;
|
const reg = /^[A-Za-z0-9_.-]+$/;
|
||||||
if (!reg.test(value)) {
|
if (!reg.test(value)) {
|
||||||
return callback(new Error(i18n.global.t('setting.codeWarning')));
|
return callback(new Error(i18n.global.t('setting.codeWarning')));
|
||||||
}
|
}
|
||||||
@ -421,3 +428,11 @@ defineExpose({
|
|||||||
acceptParams,
|
acceptParams,
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.append-button {
|
||||||
|
width: 80px;
|
||||||
|
background-color: var(--el-fill-color-light);
|
||||||
|
color: var(--el-color-info);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user