style(components): 将按钮组件替换为链接样式

- 统一将页面中的 Button 组件替换为 a 标签,保持样式一致
- 添加统一的链接样式类 ops-link 和分隔符样式类 ops-sep
- 更新操作列中按钮的样式,使用颜色、光标和文本装饰属性替代原有 props 配置
- 在多个文件中调整了操作项之间的分隔符显示逻辑
- 优化表格操作列渲染函数,去除冗余的 Button 属性配置
- 保持功能不变的前提下提升界面视觉一致性
This commit is contained in:
pikachu1995@126.com
2025-11-24 11:33:54 +08:00
parent 756cb28daa
commit 799184fd21
82 changed files with 1454 additions and 1394 deletions

View File

@@ -79,7 +79,7 @@
  {{ mes.time }}
</p>
<div class="message-content-body">
<p class="message-content" v-html="mes.content">{{ mes.content }}</p>
<p class="message-content" v-html="mes.content"></p>
</div>
</div>
</transition>
@@ -95,15 +95,15 @@
data() {
const markAsReadBtn = (h, params) => {
return h(
"Button",
"a",
{
props: {
icon: "md-eye-off",
size: "small"
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
// 标记已读
let v = params.row;
this.loading = true;
API_Index.read(v.id).then(res => {
@@ -112,87 +112,82 @@
this.getAll();
}
});
}
}
},
},
},
"标为已读"
);
};
const deleteMesBtn = (h, params) => {
return h(
"Button",
"a",
{
props: {
icon: "md-trash",
size: "small",
type: "error"
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
// 移除
let v = params.row;
this.loading = true;
API_Index.deleteMessage(v.id).then(res => {
this.loading = false;
if (res.success) {
this.refreshMessage()
this.refreshMessage();
}
});
}
}
},
},
},
"删除"
);
};
const restoreBtn = (h, params) => {
return h(
"Button",
"a",
{
props: {
icon: "md-redo",
size: "small"
},
style: {
margin: "0 5px 0 0"
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
// 还原
let v = params.row;
API_Index.reductionMessage(v.id).then(res => {
this.loading = false;
if (res.success) {
this.refreshMessage()
this.refreshMessage();
}
});
}
}
},
},
},
"还原"
);
};
const deleteRealBtn = (h, params) => {
return h(
"Button",
"a",
{
props: {
icon: "md-trash",
size: "small",
type: "error"
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {
// 彻底删除
let v = params.row;
this.loading = true;
API_Index.clearMessage(v.id).then(res => {
this.loading = false;
if (res.success) {
this.refreshMessage()
this.refreshMessage();
}
});
}
}
},
},
},
"彻底删除"
);
@@ -287,6 +282,7 @@
} else {
return h("div", [
restoreBtn(h, params),
h("span", { style: { margin: "0 8px", color: "#dcdee2" } }, "|"),
deleteRealBtn(h, params)
]);
}