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

@@ -19,29 +19,21 @@
primary-key="id"
>
<template slot="action" slot-scope="scope">
<Button
type="info"
<a
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:5px"
@click="edit(scope.row)"
size="small"
style="margin-right: 5px"
>编辑
</Button>
<Button
type="error"
>编辑</a>
<span style="margin:0 8px;color:#dcdee2">|</span>
<a
style="color:#2d8cf0;cursor:pointer;text-decoration:none;margin-right:5px"
@click="remove(scope.row)"
size="small"
style="margin-right: 5px"
>删除
</Button>
<Button
>删除</a>
<span v-show="scope.row.level != 1" style="margin:0 8px;color:#dcdee2">|</span>
<a
v-show="scope.row.level != 1"
type="success"
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
@click="addChildren(scope.row)"
size="small"
style="margin-right: 5px"
>添加子分类
</Button>
>添加子分类</a>
</template>
</tree-table>
</Card>

View File

@@ -221,16 +221,12 @@ export default {
render: (h, params) => {
return h("div", [
h(
"Button",
"a",
{
props: {
size: "small",
type:
this.selectedIndex == params.index
? "primary"
: "default",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
display: this.selected ? "" : "none",
},
@@ -244,13 +240,17 @@ export default {
this.selectedIndex == params.index ? "已选" : "选择"
),
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
size: "small",
type: "info",
},
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
marginRight: "5px",
},
on: {
@@ -262,11 +262,17 @@ export default {
"编辑"
),
h(
"Button",
"span",
{ style: { margin: "0 8px", color: "#dcdee2" } },
"|"
),
h(
"a",
{
props: {
type: "error",
size: "small",
style: {
color: "#2d8cf0",
cursor: "pointer",
textDecoration: "none",
},
on: {
click: () => {

View File

@@ -133,17 +133,10 @@
align: "center",
width: 130,
render: (h, params) => {
return h("div", [
return h("div", { class: "ops" }, [
h(
"Button",
"a",
{
props: {
size: "small",
type: "info"
},
style: {
marginRight: "5px",
},
on: {
click: () => {
this.detail(params.row);
@@ -208,3 +201,15 @@
},
};
</script>
<style lang="scss" scoped>
.ops a {
color: #2d8cf0;
cursor: pointer;
text-decoration: none;
}
.ops span {
display: inline-block;
margin: 0 8px;
color: #dcdee2;
}
</style>