fix(app-version): 修复版本页类型检查

This commit is contained in:
Zhou Weidong committed 2026-10-24 17:30:29 +08:00
1 parent 18234ebd5b
commit eaee765239
1 file changed
+16 -11
+16 -11
View File
@@ -3,13 +3,12 @@
<script setup lang="ts">
import type { FormInstance, FormRules } from 'element-plus'
import { ElMessage, ElMessageBox } from 'element-plus'
import { computed, h, ref } from 'vue'
import { computed, ref } from 'vue'
import PageHeading from '@/views/components/PageHeading.vue'
import { AppIcons } from '@/constants/icons'
import { dateCell } from '@/utils/format'
import {
batchCreateAppVersionsApi,
createAppVersionApi,
deleteAppVersionApi,
listAppVersionsApi,
updateAppVersionApi,
@@ -112,7 +111,7 @@ function openEdit(row: AppVersionItem) {
versionName: row.versionName,
downloadUrl: row.downloadUrl,
updateContent: row.updateContent ?? '',
forceUpdate: row.forceUpdate,
forceUpdate: row.forceUpdate === 1 ? 1 : 0,
minSupportedCode: row.minSupportedCode
}
dialogOpen.value = true
@@ -195,7 +194,7 @@ const forceText = computed(() => (v: number) => (v === 1 ? '强制' : '可选升
</el-form-item>
<el-form-item>
<el-button type="primary" :icon="AppIcons.search" @click="fetchList">查询</el-button>
<el-button plain @click="openCreate" :icon="AppIcons.plus">新建版本</el-button>
<el-button plain @click="openCreate" :icon="AppIcons.add">新建版本</el-button>
</el-form-item>
</el-form>
</section>
@@ -480,35 +479,41 @@ const forceText = computed(() => (v: number) => (v === 1 ? '强制' : '可选升
.toolbar {
margin-bottom: 12px;
}
.pagination {
margin-top: 12px;
justify-content: flex-end;
}
.dual-blocks {
display: flex;
flex-direction: column;
gap: 16px;
}
.platform-block {
border: 1px solid var(--el-border-color-lighter);
border-radius: 8px;
padding: 14px 16px 4px;
background: var(--el-fill-color-blank);
border: 1px solid var(--el-border-color-lighter);
border-radius: 8px;
header {
display: flex;
padding-bottom: 8px;
margin-bottom: 6px;
border-bottom: 1px solid var(--el-border-color-lighter);
align-items: center;
justify-content: space-between;
margin-bottom: 6px;
padding-bottom: 8px;
border-bottom: 1px solid var(--el-border-color-lighter);
}
.platform-title {
font-weight: 600;
font-size: 15px;
font-weight: 600;
}
&.disabled {
opacity: 0.5;
border-style: dashed;
opacity: 0.5;
}
}
</style>