diff --git a/src/views/content/layoutItem/article/columns.ts b/src/views/content/layoutItem/article/columns.ts new file mode 100644 index 0000000..729e8a2 --- /dev/null +++ b/src/views/content/layoutItem/article/columns.ts @@ -0,0 +1,39 @@ +import { h } from 'vue'; +import { ElTag } from 'element-plus'; + +export const columns = [ + { + label: '文章标题', + prop: 'title', + render(record) { + return h('a', { + href: 'http://www.baidu.com', + target:"_blank" + },record.row.title); + }, + }, + { + label: '文章分类', + prop: 'categoryName', + }, + // { + // label: '文章链接', + // value:'articelLink', + // isSlot:true, + // }, + { + label: '文章状态', + prop: 'status', + render(record) { + return h('span', record.row.status === 1 ? '下架' : '正常') + }, + }, + { + label: '创建人', + prop: 'createUser', + }, + { + label: '创建时间', + prop: 'createTime', + }, +]; diff --git a/src/views/content/layoutItem/article/index.vue b/src/views/content/layoutItem/article/index.vue new file mode 100644 index 0000000..819197c --- /dev/null +++ b/src/views/content/layoutItem/article/index.vue @@ -0,0 +1,99 @@ + + diff --git a/src/views/content/layoutItem/article/querySchemas.ts b/src/views/content/layoutItem/article/querySchemas.ts new file mode 100644 index 0000000..919eddf --- /dev/null +++ b/src/views/content/layoutItem/article/querySchemas.ts @@ -0,0 +1,30 @@ +import { FormSchema } from '@/components/Form/index'; +export const schemas: FormSchema[] = [ + { + field: 'title', + component: 'Input', + label: '文章标题', + componentProps: { + placeholder: '请输入文章标题', + }, + }, + { + field: 'status', + component: 'Select', + label: '文章状态', + componentProps: { + placeholder: '请选择文章状态', + clearable: true, + options: [ + { + label: '下架', + value: '1', + }, + { + label: '正常', + value: '0', + } + ], + }, + }, +]; diff --git a/src/views/content/layoutItem/edit.vue b/src/views/content/layoutItem/edit.vue index df7413f..807961c 100644 --- a/src/views/content/layoutItem/edit.vue +++ b/src/views/content/layoutItem/edit.vue @@ -1,8 +1,8 @@ - + + +