Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/src/views/template/component/EditModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
<span>模型类型</span>
</template>
<el-select
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!

Expand Down