Commit 865613bc by Lin

fix(AddFiles): 修复模板循环中的 key 属性位置问题

- 在 AddFiles 组件中,调整了 v-for 循环中 key 属性的位置,以确保 Vue 的渲染性能和组件更新的正确性。
1 parent 9405bea1
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
<view class="detail-panel"> <view class="detail-panel">
<view class="form-header">必填信息</view> <view class="form-header">必填信息</view>
<view class="form-box flex"> <view class="form-box flex">
<template v-for="(i, index) in customerForm"> <template v-for="(i, index) in customerForm" :key="index">
<view class="form-item flex" :key="index"> <view class="form-item flex">
<view class="label flex"> <view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }} <view class="required" v-if="i.required">*</view>{{ i.label }}
</view> </view>
...@@ -64,8 +64,8 @@ ...@@ -64,8 +64,8 @@
</view> </view>
<view class="form-header">选填信息</view> <view class="form-header">选填信息</view>
<view class="form-box flex"> <view class="form-box flex">
<template v-for="(i, index) in optionalForm"> <template v-for="(i, index) in optionalForm" :key="index">
<view class="form-item flex" :key="index"> <view class="form-item flex">
<view class="label flex"> <view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }} <view class="required" v-if="i.required">*</view>{{ i.label }}
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!