Skip to content

fix: Model editing prohibits modifying model types#1944

Merged
shaohuzhang1 merged 1 commit intomainfrom
pr@main@fix_model_type
Dec 30, 2024
Merged

fix: Model editing prohibits modifying model types#1944
shaohuzhang1 merged 1 commit intomainfrom
pr@main@fix_model_type

Conversation

@shaohuzhang1
Copy link
Contributor

fix: Model editing prohibits modifying model types

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Dec 30, 2024

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.

Details

Instructions 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.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Dec 30, 2024

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

disabled
v-loading="model_type_loading"
@change="list_base_model($event, true)"
v-model="base_form_data.model_type"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The disabled attribute 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 the v-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:

  1. Correct Placement of disabled:

    • Ensure that the disabled property is defined correctly in the parent/component scope (data, computed, methods) where the Vue instance lives.
  2. 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!

@shaohuzhang1 shaohuzhang1 merged commit 4bff2b4 into main Dec 30, 2024
4 checks passed
@shaohuzhang1 shaohuzhang1 deleted the pr@main@fix_model_type branch December 30, 2024 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant