diff --git a/src/views/content/ad/columns.ts b/src/views/content/ad/columns.ts
index f15b54d..ac77d2a 100644
--- a/src/views/content/ad/columns.ts
+++ b/src/views/content/ad/columns.ts
@@ -1,21 +1,23 @@
import { h } from 'vue';
-import { ElAvatar } from 'element-plus';
+import { ElAvatar, ElTag } from 'element-plus';
export const columns = [
{
type: 'selection',
},
{
label: 'ID',
- prop: 'id'
+ prop: 'id',
+ width: 100,
},
{
label: '广告标题',
prop: 'title',
+ width: 250,
render(record) {
return h('a', {
- href: 'http://www.baidu.com',
+ href: record.row.url,
target:"_blank"
- },record.row.title);
+ }, record.row.title);
},
},
{
@@ -23,7 +25,7 @@ export const columns = [
prop: 'cover',
render(record) {
return h(ElAvatar, {
- size: 48,
+ size: 35,
src: record.row.cover,
shape: 'square',
fit: 'fill',
@@ -56,9 +58,39 @@ export const columns = [
label: '广告状态',
prop: 'status',
render(record) {
- return h('span', record.row.status === 1 ? '在用' : '停用')
+ return h(
+ ElTag,
+ {
+ type: record.row.status ==1 ? 'success' : 'danger',
+ },
+ {
+ default: () => (record.row.status ==1 ? '正常' : '停用'),
+ },
+ );
},
},
+ {
+ label: '广告尺寸',
+ prop: 'size',
+ render(record) {
+ return record.row.width + 'x' + record.row.height;
+ },
+ },
+ {
+ label: '投放时间',
+ prop: 'time',
+ render(record) {
+ return record.row.start_time + 'x' + record.row.end_time;
+ },
+ },
+ {
+ label: '点击量',
+ prop: 'click',
+ },
+ {
+ label: '排序',
+ prop: 'sort',
+ },
{
label: '创建人',
prop: 'createUser',
@@ -66,5 +98,6 @@ export const columns = [
{
label: '创建时间',
prop: 'createTime',
+ width: 180,
},
];
diff --git a/src/views/content/ad/index.vue b/src/views/content/ad/index.vue
index c14aa6a..01109b4 100644
--- a/src/views/content/ad/index.vue
+++ b/src/views/content/ad/index.vue
@@ -22,7 +22,7 @@
- 添加广告
+ 添加
@@ -69,7 +69,7 @@ const selectionData = ref([])
adSortId:''
});
const actionColumn = reactive({
- width: 250,
+ width: 200,
label: '操作',
prop: 'action',
fixed: 'right',
diff --git a/src/views/content/adSort/columns.ts b/src/views/content/adSort/columns.ts
index ffc0724..e294afd 100644
--- a/src/views/content/adSort/columns.ts
+++ b/src/views/content/adSort/columns.ts
@@ -7,7 +7,8 @@ export const columns = [
},
{
label: 'ID',
- prop: 'id'
+ prop: 'id',
+ width: 100,
},
{
label: '广告位名称',
@@ -49,5 +50,6 @@ export const columns = [
{
label: '创建时间',
prop: 'createTime',
+ width: 180,
},
];
diff --git a/src/views/content/adSort/index.vue b/src/views/content/adSort/index.vue
index cdcf4ba..b5c7973 100644
--- a/src/views/content/adSort/index.vue
+++ b/src/views/content/adSort/index.vue
@@ -19,7 +19,7 @@
- 添加广告位
+ 添加
@@ -66,7 +66,7 @@ const selectionData = ref([])
type:''
});
const actionColumn = reactive({
- width: 250,
+ width: 200,
label: '操作',
prop: 'action',
fixed: 'right',