refactor: 移除ant-design-vue和tailwindcss依赖并优化样式

style: 统一使用css替换scss并调整组件样式
style: 优化组件布局和属性顺序
chore: 更新.gitignore和.eslintrc配置
This commit is contained in:
张翔
2026-03-13 09:55:05 +08:00
parent 9f8bf041c3
commit 2555bf5f55
17 changed files with 901 additions and 1313 deletions
@@ -4,14 +4,35 @@
<template #header>
<div class="card-title">
<span>参数配置</span>
<el-button type="primary" @click="handleAdd">新增配置</el-button>
<el-button
type="primary"
@click="handleAdd"
>
新增配置
</el-button>
</div>
</template>
<el-table :data="dataSource" v-loading="loading" style="width: 100%">
<el-table-column prop="id" label="ID" />
<el-table-column prop="configName" label="参数名称" />
<el-table-column prop="configKey" label="参数键名" />
<el-table-column prop="configValue" label="参数值" />
<el-table
v-loading="loading"
:data="dataSource"
style="width: 100%"
>
<el-table-column
prop="id"
label="ID"
/>
<el-table-column
prop="configName"
label="参数名称"
/>
<el-table-column
prop="configKey"
label="参数键名"
/>
<el-table-column
prop="configValue"
label="参数值"
/>
<el-table-column label="类型">
<template #default="{ row }">
<el-tag :type="row.configType === 'Y' ? '' : 'info'">
@@ -19,17 +40,41 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150">
<el-table-column
label="操作"
width="150"
>
<template #default="{ row }">
<el-button type="primary" link size="small" @click="handleEdit(row)">编辑</el-button>
<el-button type="danger" link size="small" @click="handleDelete(row)">删除</el-button>
<el-button
type="primary"
link
size="small"
@click="handleEdit(row)"
>
编辑
</el-button>
<el-button
type="danger"
link
size="small"
@click="handleDelete(row)"
>
删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog v-model="modalVisible" :title="modalTitle" width="500px">
<el-form :model="formState" label-width="80px">
<el-dialog
v-model="modalVisible"
:title="modalTitle"
width="500px"
>
<el-form
:model="formState"
label-width="80px"
>
<el-form-item label="参数名称">
<el-input v-model="formState.configName" />
</el-form-item>
@@ -41,8 +86,15 @@
</el-form-item>
</el-form>
<template #footer>
<el-button @click="modalVisible = false">取消</el-button>
<el-button type="primary" @click="handleModalOk">确定</el-button>
<el-button @click="modalVisible = false">
取消
</el-button>
<el-button
type="primary"
@click="handleModalOk"
>
确定
</el-button>
</template>
</el-dialog>
</div>
@@ -91,7 +143,9 @@ const handleDelete = async (row: any) => {
await request.delete(`/config/${row.id}`)
ElMessage.success('删除成功')
fetchData()
} catch {}
} catch (error) {
console.error('删除配置失败:', error)
}
}
const handleModalOk = async () => {
@@ -112,7 +166,7 @@ const handleModalOk = async () => {
onMounted(() => fetchData())
</script>
<style scoped lang="scss">
<style scoped lang="css">
.config-management .card-title {
display: flex;
justify-content: space-between;