This commit is contained in:
Zhou Weidong authored and trae-solo-agent committed 2026-10-21 18:52:34 +08:00
commit 982346045d
1 file changed
+19 -3
@@ -55,6 +55,7 @@ const form = reactive({
favoriteCount: 0,
heat: 0,
isHot: false,
sort: 0,
cover: ''
})
@@ -168,6 +169,7 @@ function openCreate() {
favoriteCount: 0,
heat: 0,
isHot: false,
sort: 0,
cover: ''
})
coverFileName.value = ''
@@ -200,6 +202,7 @@ function openEdit(row) {
favoriteCount: row.favoriteCount ?? 0,
heat: row.views ?? 0,
isHot: !!row.isHot,
sort: row.sort ?? 0,
cover: row.cover || ''
})
coverFileName.value = row.cover ? coverBasename(row.cover) : ''
@@ -658,9 +661,22 @@ onMounted(async () => {
/>
</el-form-item>
</div>
<el-form-item label="是否热门">
<el-switch v-model="form.isHot" />
</el-form-item>
<div class="editor-grid editor-grid--two">
<el-form-item label="是否热门">
<el-switch v-model="form.isHot" />
</el-form-item>
<el-form-item label="排序权重">
<el-input-number
v-model="form.sort"
class="editor-number"
controls-position="right"
:min="0"
:max="99999"
:precision="0"
/>
<p class="readonly-stat-hint">数值越大越靠前,相同权重按 ID 倒序</p>
</el-form-item>
</div>
</section>
<section class="editor-section">