Skip to content

Commit ca22bab

Browse files
authored
refactor: adjusting the model list to a responsive layout (#405)
1 parent 95ea976 commit ca22bab

File tree

1 file changed

+10
-2
lines changed
  • src/pages/preference/components/model

1 file changed

+10
-2
lines changed

src/pages/preference/components/model/index.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import type { Model } from '@/stores/model'
3+
import type { ColProps } from 'ant-design-vue'
34
45
import { convertFileSrc } from '@tauri-apps/api/core'
56
import { remove } from '@tauri-apps/plugin-fs'
@@ -13,6 +14,13 @@ import { join } from '@/utils/path'
1314
1415
const modelStore = useModelStore()
1516
17+
const colProps: ColProps = {
18+
xs: 12,
19+
md: 8,
20+
lg: 6,
21+
xl: 4,
22+
}
23+
1624
async function handleDelete(item: Model) {
1725
const { id, path } = item
1826
@@ -34,14 +42,14 @@ async function handleDelete(item: Model) {
3442

3543
<template>
3644
<Row :gutter="[16, 16]">
37-
<Col :span="8">
45+
<Col v-bind="colProps">
3846
<Upload />
3947
</Col>
4048

4149
<Col
4250
v-for="item in modelStore.models"
4351
:key="item.id"
44-
:span="8"
52+
v-bind="colProps"
4553
>
4654
<Card
4755
hoverable

0 commit comments

Comments
 (0)