mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-21 10:25:53 +08:00
feat: ✨ 管理端新增格式化价格文件插件并在代码中引入,更新代码需要install插件
This commit is contained in:
@@ -200,10 +200,7 @@ export default {
|
||||
key: "price",
|
||||
width: 130,
|
||||
render: (h, params) => {
|
||||
return h(
|
||||
"div",
|
||||
this.$options.filters.unitPrice(params.row.price, "¥")
|
||||
);
|
||||
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ export default {
|
||||
key: "price",
|
||||
minWidth: 130,
|
||||
render: (h, params) => {
|
||||
return h("div", this.$options.filters.unitPrice(params.row.price, "¥"));
|
||||
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
<div class="form-item-view">
|
||||
<FormItem label="商品编号"> {{ goods.id }}</FormItem>
|
||||
<FormItem label="商品价格">
|
||||
¥{{ goods.price | unitPrice }}
|
||||
<priceColorScheme :value="goods.price" :color="$mainColor"></priceColorScheme>
|
||||
|
||||
</FormItem>
|
||||
<FormItem label="商品图片">
|
||||
<div
|
||||
@@ -179,8 +180,8 @@ export default {
|
||||
specs: sku.goodsName,
|
||||
sn: sku.sn,
|
||||
weight: sku.weight,
|
||||
cost: that.$options.filters.unitPrice(sku.cost, "¥"),
|
||||
price: that.$options.filters.unitPrice(sku.price, "¥"),
|
||||
cost: sku.cost,
|
||||
price:sku.price,
|
||||
image: sku.thumbnail,
|
||||
});
|
||||
});
|
||||
@@ -196,10 +197,17 @@ export default {
|
||||
{
|
||||
title: "成本",
|
||||
key: "cost",
|
||||
render: (h, params) => {
|
||||
console.log(params)
|
||||
return h("priceColorScheme", {props:{value:params.row.cost,color:this.$mainColor}} );
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "价格",
|
||||
key: "price",
|
||||
render: (h, params) => {
|
||||
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,9 @@
|
||||
</template>
|
||||
|
||||
<template slot="commissionRate" slot-scope="scope">
|
||||
{{ scope.row.commissionRate }}%
|
||||
<priceColorScheme v-if="scope.row.commissionRate > 0" unit="" :color="$mainColor" :value="scope.row.commissionRate">%</priceColorScheme>
|
||||
<priceColorScheme v-else :value="scope.row.commissionRate" unit="" >%</priceColorScheme>
|
||||
<!-- {{ scope.row.commissionRate }}% -->
|
||||
</template>
|
||||
|
||||
<template slot="deleteFlag" slot-scope="{ row }">
|
||||
|
||||
Reference in New Issue
Block a user