From df50735a986ad564091bbfc8ceb27f0b859bd747 Mon Sep 17 00:00:00 2001 From: loveflow <5269966+loveflow@user.noreply.gitee.com> Date: Wed, 24 Jan 2024 21:52:48 +0800 Subject: [PATCH] update --- src/loveflow/components/data/table.vue | 23 +++++++++++++++++++ .../mixins/tableList.global.mixins.js | 9 +++++++- src/main.js | 2 ++ .../enterpriseManage/recordManage/index.vue | 14 +++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 src/loveflow/components/data/table.vue diff --git a/src/loveflow/components/data/table.vue b/src/loveflow/components/data/table.vue new file mode 100644 index 0000000..7aa9acf --- /dev/null +++ b/src/loveflow/components/data/table.vue @@ -0,0 +1,23 @@ + + diff --git a/src/loveflow/mixins/tableList.global.mixins.js b/src/loveflow/mixins/tableList.global.mixins.js index 5fa0e79..bcec4b6 100644 --- a/src/loveflow/mixins/tableList.global.mixins.js +++ b/src/loveflow/mixins/tableList.global.mixins.js @@ -39,7 +39,14 @@ const tableListMixins = { }, mounted() {}, methods: { - loadData() {}, + loadData() { + for (let i = 0; i < 10; i++) { + this.dataSource.push({ + id: i + "", + name: "测试" + i, + }); + } + }, }, }; export default tableListMixins; diff --git a/src/main.js b/src/main.js index 47b4c97..60125a4 100644 --- a/src/main.js +++ b/src/main.js @@ -16,6 +16,7 @@ import lkyPagination from "./components/publicModule/lkyPagination" // 本组件 import * as cusRule from '@/loveflow/rules' import { registerPlugins } from '@/loveflow/plugins/index' import FormDialog from '@/loveflow/components/modal/formDialog.vue' +import gMainTable from '@/loveflow/components/data/table.vue' import * as echarts from "echarts"; Vue.prototype.$echarts = echarts; @@ -30,6 +31,7 @@ Vue.component('erupload', erupload) Vue.component('lkyTable', lkyTable) Vue.component('lkyPagination',lkyPagination) Vue.component('FormDialog', FormDialog) +Vue.component('gMainTable', gMainTable) const vm = new Vue({ el: '#app', router, diff --git a/src/views/enterpriseManage/recordManage/index.vue b/src/views/enterpriseManage/recordManage/index.vue index ed06f1e..b249e39 100644 --- a/src/views/enterpriseManage/recordManage/index.vue +++ b/src/views/enterpriseManage/recordManage/index.vue @@ -4,6 +4,8 @@ 打开 + + import { deleteAction, getAction, downFile } from "@/loveflow/api/manage"; +import { tableListMixins } from "@/loveflow/mixins/tableList.global.mixins.js"; export default { + mixins: [tableListMixins], data() { return { + columns: [ + { + prop: "id", + label: "序号", + }, + { + prop: "name", + label: "姓名", + }, + ], formItems: [ { type: "input",