style: 增加地域配置

This commit is contained in:
2025-02-27 14:35:18 +08:00
parent 8be8a98402
commit 5eb65e38f2

View File

@@ -29,6 +29,9 @@ const settingsData = ref({
membership_config: {
issuance_num_per_month_company: 10,
issuance_num_per_month_person: 5
},
areas: {
separator: " "
}
});
@@ -42,6 +45,16 @@ const purchaseTypeMap = {
6: "跳转卡"
};
// 添加分隔符选项
const separatorOptions = [
{ value: " ", label: "空格" },
{ value: ",", label: "逗号" },
{ value: "、", label: "顿号" },
{ value: "-", label: "中划线" },
{ value: "_", label: "下划线" },
{ value: " > ", label: "大于号" }
];
// 加载设置数据
const loadSettings = async () => {
try {
@@ -235,6 +248,47 @@ onMounted(() => {
</el-form-item>
</el-form>
</el-card>
<!-- 地域配置 -->
<el-card class="settings-card">
<template #header>
<div class="card-header">
<span>地域配置</span>
<el-button type="primary" @click="saveSettings('areas')"
>保存</el-button
>
</div>
</template>
<el-form
label-width="160px"
:model="settingsData.areas"
class="settings-form"
>
<el-form-item label="地址分隔符">
<el-select
v-model="settingsData.areas.separator"
placeholder="请选择分隔符"
style="width: 180px"
>
<el-option
v-for="item in separatorOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
<span
>{{ item.label }} ({{
item.value === " " ? "空格" : item.value
}})</span
>
</el-option>
</el-select>
<div class="form-tip">
用于连接地区名称,例如:北京{{ settingsData.areas.separator }}朝阳区
</div>
</el-form-item>
</el-form>
</el-card>
</div>
</template>
@@ -259,6 +313,12 @@ onMounted(() => {
width: 100%;
margin-top: 20px;
}
.form-tip {
margin-top: 8px;
font-size: 12px;
color: #909399;
}
}
}
</style>