style:优化代码格式和样式

- 调整 van-icon 组件的闭合方式,提高代码可读性
- 修正 CSS 选择器的子元素选择符,统一代码风格
This commit is contained in:
陈昱达
2025-03-05 18:13:14 +08:00
parent 9f7b1ba949
commit a140eb3f0e
10 changed files with 182 additions and 111 deletions

View File

@@ -30,20 +30,20 @@ const handleAdd = (addType: 'row' | 'col') => {
const handleMartrixAction = (action: 'delete' | 'setting' | 'more') => {
switch (action) {
// case 'delete':
// showConfirmDialog({
// title: '提示',
// message: '是否确认删除题目?'
// }).then(() => {
// element.list = [];
// });
// break;
// case 'setting':
// break;
// case 'more':
// break;
default:
break;
// case 'delete':
// showConfirmDialog({
// title: '提示',
// message: '是否确认删除题目?'
// }).then(() => {
// element.list = [];
// });
// break;
// case 'setting':
// break;
// case 'more':
// break;
default:
break;
}
};
</script>
@@ -79,17 +79,14 @@ const handleMartrixAction = (action: 'delete' | 'setting' | 'more') => {
<span @click="handleAdd('col')"> <van-icon name="add-o" />添加列标签</span>
</van-col>
<van-col :span="6" :offset="6" class="martrix-table-action-tool">
<span @click="handleMartrixAction('delete')"> <van-icon
name="delete"
style="color: red;"
<span @click="handleMartrixAction('delete')">
<van-icon name="delete" style="color: red"
/></span>
<span @click="handleMartrixAction('setting')"> <van-icon
name="setting"
style="color: lightgrey;"
<span @click="handleMartrixAction('setting')">
<van-icon name="setting" style="color: lightgrey"
/></span>
<span @click="handleMartrixAction('more')"> <van-icon
name="ellipsis"
style="color: lightgrey;"
<span @click="handleMartrixAction('more')">
<van-icon name="ellipsis" style="color: lightgrey"
/></span>
</van-col>
</van-row>
@@ -110,7 +107,6 @@ const handleMartrixAction = (action: 'delete' | 'setting' | 'more') => {
border-width: 0 0 1px;
text-align: left;
}
}
.martrix-table-action {
@@ -125,10 +121,10 @@ const handleMartrixAction = (action: 'delete' | 'setting' | 'more') => {
display: flex;
justify-content: flex-end;
&>span {
& > span {
margin-right: 6px;
font-size: 16px;
}
}
}
</style>
</style>