fix: Model editing prohibits modifying model types#1944
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| disabled | ||
| v-loading="model_type_loading" | ||
| @change="list_base_model($event, true)" | ||
| v-model="base_form_data.model_type" |
There was a problem hiding this comment.
- The
disabledattribute on the<el-select>element is set incorrectly. It should be outside of the template but within the component's script section or directly above thev-model. Adjust it to:
props: {
base_form_data: Object,
},
created() {
}, methods: {
...Then update the HTML as follows:
<template>
<!-- ... -->
<el-select :disabled="true" v-loading="model_type_loading">
...
</el-select>
</template>Optimization Suggestion: Consider using computed properties instead of local data bindings wherever possible to improve performance and readability.
Summary of Changes:
-
Correct Placement of
disabled:- Ensure that the
disabledproperty is defined correctly in the parent/component scope (data,computed,methods) where the Vue instance lives.
- Ensure that the
-
Computation Property Usage:
- Use computed properties if you have multiple places in your code where this value remains constant or updates regularly.
Feel free to ask if you need further clarification on these changes!
fix: Model editing prohibits modifying model types