fix: 去除没有必要的v-model、处理部分双向绑定问题

This commit is contained in:
ZhuRui
2026-08-06 10:12:58 +08:00
parent 7f16ccdb30
commit 0a60cc1816
10 changed files with 21 additions and 73 deletions
@@ -479,12 +479,7 @@ export default defineComponent({
>
{/* ===== Banner 标题 ===== */}
<Form.Item label="Banner标题" name="title" rules={titleRules}>
<Input
placeholder="请输入标题"
maxlength={TITLE_MAX}
allowClear
v-model:value={formData.title}
/>
<Input placeholder="请输入标题" maxlength={TITLE_MAX} allowClear />
</Form.Item>
{/* ===== 上传图片(必填,带裁剪) ===== */}
@@ -540,18 +535,13 @@ export default defineComponent({
{/* ===== 跳转类型 ===== */}
<Form.Item label="跳转类型" name="type" rules={typeRules}>
<Select
options={JUMP_TYPE_OPTIONS as any}
placeholder="请选择"
v-model:value={formData.type}
/>
<Select options={JUMP_TYPE_OPTIONS as any} placeholder="请选择" />
</Form.Item>
{/* ===== 联动字段:赛事详情页 → 模糊搜索关联赛事 ===== */}
{formData.type === '1' && (
<Form.Item label="关联赛事" name="relatedEventId">
<Select
v-model:value={formData.relatedEventId}
showSearch
filterOption={false}
allowClear={!eventSearchLoading.value}
@@ -571,24 +561,14 @@ export default defineComponent({
{/* ===== 联动字段:自定义链接 ===== */}
{formData.type === '2' && (
<Form.Item label="跳转地址" name="linkUrl" rules={linkUrlRules}>
<Input
placeholder="https://xxx"
maxlength={URL_MAX}
allowClear
v-model:value={formData.linkUrl}
/>
<Input placeholder="https://xxx" maxlength={URL_MAX} allowClear />
</Form.Item>
)}
{/* ===== 联动字段:小程序页面 ===== */}
{formData.type === '3' && (
<Form.Item label="小程序路径" name="linkUrl" rules={miniProgramPathRules}>
<Input
placeholder="/pages/index/index"
maxlength={PATH_MAX}
allowClear
v-model:value={formData.linkUrl}
/>
<Input placeholder="/pages/index/index" maxlength={PATH_MAX} allowClear />
</Form.Item>
)}
@@ -672,7 +652,6 @@ export default defineComponent({
max={999}
precision={0}
style={{ width: '200px' }}
v-model:value={formData.sort}
/>
</Form.Item>
</Form>
@@ -136,7 +136,7 @@ export default defineComponent({
{d.dropoutCount || '0'}
</Descriptions.Item>
<Descriptions.Item label="最大人数">{d.dtotalLimit || '-'}</Descriptions.Item>
<Descriptions.Item label="最大人数">{d.totalLimit || '-'}</Descriptions.Item>
<Descriptions.Item label="对岸数量">{d.matchTotalCount || '0'}</Descriptions.Item>
<Descriptions.Item label="已完成对岸数量">{d.matchCount || '0'}</Descriptions.Item>
</Descriptions>