mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-22 02:45:55 +08:00
style(components): 将按钮组件替换为链接样式
- 统一将页面中的 Button 组件替换为 a 标签,保持样式一致 - 添加统一的链接样式类 ops-link 和分隔符样式类 ops-sep - 更新操作列中按钮的样式,使用颜色、光标和文本装饰属性替代原有 props 配置 - 在多个文件中调整了操作项之间的分隔符显示逻辑 - 优化表格操作列渲染函数,去除冗余的 Button 属性配置 - 保持功能不变的前提下提升界面视觉一致性
This commit is contained in:
@@ -314,13 +314,16 @@ export default {
|
||||
minWidth: 50,
|
||||
align: "center",
|
||||
render: (h, params) => {
|
||||
if (this.disabled) {
|
||||
return h("div");
|
||||
}
|
||||
return h(
|
||||
"Button",
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
size: "small",
|
||||
type: "error",
|
||||
ghost: true,
|
||||
style: {
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
|
||||
@@ -67,35 +67,30 @@
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
v-if="
|
||||
row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'
|
||||
"
|
||||
type="info"
|
||||
size="small"
|
||||
<a
|
||||
v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="see(row)"
|
||||
>编辑</Button
|
||||
>
|
||||
<Button v-else type="default" size="small" @click="see(row, 'only')"
|
||||
>查看</Button
|
||||
>
|
||||
<Button
|
||||
v-if="
|
||||
row.promotionStatus === 'START' || row.promotionStatus === 'NEW'
|
||||
"
|
||||
type="error"
|
||||
size="small"
|
||||
:style="{ marginLeft: '5px' }"
|
||||
>编辑</a>
|
||||
<a
|
||||
v-else
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="see(row, 'only')"
|
||||
>查看</a>
|
||||
<span style="margin: 0 8px; color: #dcdee2">|</span>
|
||||
<a
|
||||
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="remove(row)"
|
||||
>关闭</Button
|
||||
>
|
||||
<Button
|
||||
style="margin: 5px"
|
||||
type="info"
|
||||
size="small"
|
||||
>关闭</a>
|
||||
<span
|
||||
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
|
||||
style="margin: 0 8px; color: #dcdee2"
|
||||
>|</span>
|
||||
<a
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="receivePage(row.id)"
|
||||
>领取记录
|
||||
</Button>
|
||||
>领取记录</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
|
||||
@@ -91,8 +91,11 @@
|
||||
<img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt="" />
|
||||
</template>
|
||||
<template slot-scope="{ index }" slot="action">
|
||||
<Button type="error" :disabled="form.promotionStatus != 'NEW' && !!id" size="small" ghost
|
||||
@click="delGoods(index)">删除</Button>
|
||||
<a
|
||||
v-if="form.promotionStatus == 'NEW' || !id"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="delGoods(index)"
|
||||
>删除</a>
|
||||
</template>
|
||||
</Table>
|
||||
</FormItem>
|
||||
|
||||
@@ -39,14 +39,11 @@
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<div>
|
||||
<Button type="primary" v-if="row.promotionStatus == 'NEW'" size="small" @click="edit(row)">编辑</Button>
|
||||
<Button type="info" v-else size="small" @click="edit(row)">查看</Button>
|
||||
<Button type="success" v-if="row.promotionStatus === 'START'" style="margin-left: 5px" size="small"
|
||||
@click="openOrClose(row)">关闭</Button>
|
||||
<Button type="success" v-if="row.promotionStatus === 'CLOSE'" style="margin-left: 5px" size="small"
|
||||
@click="openOrClose(row)">开启</Button>
|
||||
<!--<Button type="error" :disabled="row.promotionStatus == 'START'" style="margin-left: 5px" size="small"-->
|
||||
<!--@click="del(row)">删除</Button>-->
|
||||
<a v-if="row.promotionStatus == 'NEW'" @click="edit(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">编辑</a>
|
||||
<a v-else @click="edit(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">查看</a>
|
||||
<span v-if="row.promotionStatus === 'START' || row.promotionStatus === 'CLOSE'" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a v-if="row.promotionStatus === 'START'" @click="openOrClose(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">关闭</a>
|
||||
<a v-if="row.promotionStatus === 'CLOSE'" @click="openOrClose(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">开启</a>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
@@ -114,29 +114,23 @@
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="action">
|
||||
<div class="action">
|
||||
<Button
|
||||
size="small"
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
<a
|
||||
v-if="liveStatus == 'NEW'"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="deleteGoods(row, index)"
|
||||
>删除</Button
|
||||
>
|
||||
<Button
|
||||
size="small"
|
||||
ghost
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
>删除</a>
|
||||
<span v-if="liveStatus == 'NEW'" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a
|
||||
v-if="liveStatus == 'NEW'"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="onMove(row.id, 1)"
|
||||
>上移</Button
|
||||
>
|
||||
<Button
|
||||
size="small"
|
||||
ghost
|
||||
type="primary"
|
||||
:disabled="liveStatus != 'NEW'"
|
||||
>上移</a>
|
||||
<span v-if="liveStatus == 'NEW'" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a
|
||||
v-if="liveStatus == 'NEW'"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="onMove(row.id, 0)"
|
||||
>下移</Button
|
||||
>
|
||||
>下移</a>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
@@ -122,14 +122,12 @@ export default {
|
||||
},
|
||||
[
|
||||
h(
|
||||
"Button",
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "error",
|
||||
size: "small",
|
||||
},
|
||||
style: {
|
||||
marginRight: "5px",
|
||||
color: "#2d8cf0",
|
||||
cursor: "pointer",
|
||||
textDecoration: "none",
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
|
||||
@@ -62,10 +62,12 @@
|
||||
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ row,index }" slot="action">
|
||||
<Button v-if="params.auditStatus == 99" type="primary" @click="()=>{liveGoodsData.splice(index,1)}">删除</Button>
|
||||
<Button v-if="params.auditStatus != 99 && !reviewed" ghost type="primary" @click="()=>{$router.push({path:'/goods-operation-edit',query:{id:row.goodsId}})}">查看</Button>
|
||||
<Button v-if="reviewed" :type="row.___selected ? 'primary' : 'default'" @click="selectedLiveGoods(row,index)">{{row.___selected ? '已':''}}选择</Button>
|
||||
<template slot-scope="{ row ,index }" slot="action">
|
||||
<a v-if="params.auditStatus == 99" @click="liveGoodsData.splice(index,1)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">删除</a>
|
||||
<span v-if="params.auditStatus == 99 || (params.auditStatus != 99 && !reviewed) || reviewed" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a v-if="params.auditStatus != 99 && !reviewed" @click="$router.push({path:'/goods-operation-edit',query:{id:row.goodsId}})" style="color:#2d8cf0;cursor:pointer;text-decoration:none">查看</a>
|
||||
<span v-if="reviewed" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a v-if="reviewed" @click="selectedLiveGoods(row,index)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">{{row.___selected ? '已':''}}选择</a>
|
||||
</template>
|
||||
</Table>
|
||||
<div class="flex">
|
||||
|
||||
@@ -35,14 +35,11 @@
|
||||
/>
|
||||
</template>
|
||||
<template slot-scope="{ index }" slot="action">
|
||||
<Button
|
||||
type="error"
|
||||
size="small"
|
||||
ghost
|
||||
<a
|
||||
v-if="status === 'manager'"
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="delGoods(index)"
|
||||
>删除</Button
|
||||
>
|
||||
>删除</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
|
||||
@@ -58,48 +58,15 @@
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<div class="row">
|
||||
<Button
|
||||
type="default"
|
||||
size="small"
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
@click="edit(row)"
|
||||
>编辑</Button
|
||||
>
|
||||
<Button
|
||||
type="info"
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
size="small"
|
||||
@click="manage(row, 'manager')"
|
||||
>管理</Button
|
||||
>
|
||||
<Button
|
||||
type="info"
|
||||
v-if="row.promotionStatus !== 'NEW' && row.promotionStatus !== 'CLOSE'"
|
||||
size="small"
|
||||
@click="manage(row, 'view')"
|
||||
>查看</Button
|
||||
>
|
||||
<!--<Button-->
|
||||
<!--type="error"-->
|
||||
<!--size="small"-->
|
||||
<!--v-if="row.promotionStatus != 'START'"-->
|
||||
<!--@click="remove(row)"-->
|
||||
<!-->删除</Button-->
|
||||
<!-->-->
|
||||
<Button
|
||||
type="success"
|
||||
v-if="row.promotionStatus == 'CLOSE'"
|
||||
size="small"
|
||||
@click="open(row)"
|
||||
>开启</Button
|
||||
>
|
||||
<Button
|
||||
type="warning"
|
||||
v-if="row.promotionStatus == 'START'"
|
||||
size="small"
|
||||
@click="close(row)"
|
||||
>关闭</Button
|
||||
>
|
||||
<a v-if="row.promotionStatus == 'NEW'" @click="edit(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">编辑</a>
|
||||
<span v-if="row.promotionStatus == 'NEW'" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a v-if="row.promotionStatus == 'NEW'" @click="manage(row, 'manager')" style="color:#2d8cf0;cursor:pointer;text-decoration:none">管理</a>
|
||||
<span v-if="row.promotionStatus !== 'NEW' && row.promotionStatus !== 'CLOSE'" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a v-if="row.promotionStatus !== 'NEW' && row.promotionStatus !== 'CLOSE'" @click="manage(row, 'view')" style="color:#2d8cf0;cursor:pointer;text-decoration:none">查看</a>
|
||||
<span v-if="row.promotionStatus == 'CLOSE'" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a v-if="row.promotionStatus == 'CLOSE'" @click="open(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">开启</a>
|
||||
<span v-if="row.promotionStatus == 'START'" style="margin:0 8px;color:#dcdee2">|</span>
|
||||
<a v-if="row.promotionStatus == 'START'" @click="close(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">关闭</a>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
|
||||
@@ -95,14 +95,11 @@
|
||||
/>
|
||||
</template>
|
||||
<template slot-scope="{ row, index }" slot="action">
|
||||
<Button
|
||||
type="error"
|
||||
<a
|
||||
v-if="promotionStatus === 'NEW'"
|
||||
size="small"
|
||||
ghost
|
||||
style="color:#2d8cf0;cursor:pointer;text-decoration:none"
|
||||
@click="delGoods(index, row)"
|
||||
>删除
|
||||
</Button>
|
||||
>删除</a>
|
||||
</template>
|
||||
</Table>
|
||||
</TabPane>
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
}}</Tag>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button v-if="row.promotionStatus === 'NEW'" type="primary" size="small" @click="manage(row)">管理</Button>
|
||||
<Button v-else type="info" size="small" @click="manage(row)">查看</Button>
|
||||
<a v-if="row.promotionStatus === 'NEW'" @click="manage(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">管理</a>
|
||||
<a v-else @click="manage(row)" style="color:#2d8cf0;cursor:pointer;text-decoration:none">查看</a>
|
||||
</template>
|
||||
</Table>
|
||||
<Row type="flex" justify="end" class="mt_10">
|
||||
|
||||
Reference in New Issue
Block a user