File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
console/atest-ui/src/views Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ function storeVerify(formEl: FormInstance | undefined) {
192192 })
193193}
194194
195+ const storeDuplicate = async (formEl : FormInstance | undefined ) => {
196+ createAction .value = true
197+ storeForm .name += ' -copy'
198+ }
199+
195200function updateKeys() {
196201 const props = storeForm .properties
197202 if (props .findIndex (p => p .key === ' ' ) === - 1 ) {
@@ -275,7 +280,7 @@ const storeExtLink = ref('')
275280 ref =" storeFormRef"
276281 status-icon label-width =" 120px" >
277282 <el-form-item :label =" t('field.name')" prop =" name" >
278- <el-input v-model =" storeForm.name" test-id =" store-form-name" />
283+ <el-input v-model =" storeForm.name" test-id =" store-form-name" :disabled = " !createAction " />
279284 </el-form-item >
280285 <el-form-item label =" URL" prop =" url" >
281286 <el-input v-model =" storeForm.url" placeholder =" http://foo" test-id =" store-form-url" />
@@ -348,6 +353,11 @@ const storeExtLink = ref('')
348353 test-id =" store-form-verify"
349354 >{{t('button.verify')}}</Button
350355 >
356+ <Button
357+ type =" primary"
358+ v-if =" !createAction"
359+ @click =" storeDuplicate(storeFormRef)"
360+ >{{t('button.duplicate')}}</Button >
351361 <Button
352362 type =" primary"
353363 @click =" submitForm(storeFormRef)"
You can’t perform that action at this time.
0 commit comments