diff --git a/README.md b/README.md
index c260de5c7..158c2a3e3 100644
--- a/README.md
+++ b/README.md
@@ -18,14 +18,6 @@
> 使用了 Vue3.0 全家桶、ant-design-vue2.0 和 typescript4.0,实践 vue3.0 的新特性以及玩法,不得不说 vue3.0 的 Composition API 相比于 vue2.0 的 Options API 灵活很多,让我们可以灵活地组合组件逻辑,我们可以很轻松的使用 hooks 的形式去代替以前 mixins 等的写法。更多 hooks 可以参考[vueuse](https://vueuse.org/functions.html)
-## 克隆项目
-
-```bash
-git clone --single-branch https://github.com/buqiyuan/vite-vue3-lowcode.git
-or
-git clone --depth=1 https://github.com/buqiyuan/vite-vue3-lowcode.git
-```
-
## Project setup
```shell
diff --git a/package.json b/package.json
index 28d76b981..c3922a1e0 100644
--- a/package.json
+++ b/package.json
@@ -87,6 +87,9 @@
"typescript"
],
"license": "MIT",
+ "engines": {
+ "node": "^12 || >=14"
+ },
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
diff --git a/src/api/account/model.d.ts b/src/api/account/model.d.ts
index 439cac29a..cf790a24f 100644
--- a/src/api/account/model.d.ts
+++ b/src/api/account/model.d.ts
@@ -31,6 +31,7 @@ declare namespace API {
psalt: string;
nickName: string;
headImg: string;
+ loginIp: string;
email: string;
phone: string;
remark: string;
diff --git a/src/components/dynamic-table/hooks/index.ts b/src/components/dynamic-table/hooks/index.ts
index 2975b518e..397ae13b7 100644
--- a/src/components/dynamic-table/hooks/index.ts
+++ b/src/components/dynamic-table/hooks/index.ts
@@ -1,3 +1,2 @@
export { useDragCol } from './useDragCol';
export { useExpandLoading } from './useExpandLoading';
-export { useCalculate } from './useCalculate';
diff --git a/src/components/dynamic-table/hooks/useCalculate.ts b/src/components/dynamic-table/hooks/useCalculate.ts
deleted file mode 100644
index 31d092ce8..000000000
--- a/src/components/dynamic-table/hooks/useCalculate.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { nextTick } from 'vue';
-import { isFunction } from '@/utils/is';
-
-interface CalculateParams {
- /** 表格实例 */
- tableRef: any;
- /** 数据源 */
- dataSource: any[];
- /** 表格列的配置描述 */
- columns: any[];
- /** 合计显示文本 */
- sumText: string;
- /** 合计行计算方法 */
- summaryFunc?: (params: { dataSource: any[]; columns: any[] }) => string[];
-}
-
-/**
- * 表格尾部合计行
- */
-export const useCalculate = () => {
- let tr: HTMLTableRowElement;
-
- const setCalculateRow = async (params: CalculateParams) => {
- await nextTick();
- const { tableRef, dataSource = [], columns = [], sumText, summaryFunc } = params;
- if (!dataSource.length) return;
- const tbody = tableRef.value.$el.querySelector('.ant-table-tbody') as HTMLTableSectionElement;
- if (!tr) {
- tr = tbody.lastElementChild?.cloneNode(true) as HTMLTableRowElement;
- tr.style.backgroundColor = '#f8f8f9';
- tr.style.position = 'sticky';
- tr.style.zIndex = '999';
- tr.style.bottom = '0';
- tr.setAttribute('data-row-key', String(Math.random()));
- }
- // 渲染单元格
- const renderCol = (colEls?: HTMLTableCellElement[]) => {
- // 如果有传进自定义合计行渲染方法
- if (isFunction(summaryFunc)) {
- const result = summaryFunc({ dataSource, columns });
- [...tr.children].forEach((item: HTMLTableCellElement, index) => {
- item.textContent = result[index];
- item.style.backgroundColor = 'inherit';
- });
- } else {
- // 没有自定义合计行方法就默认渲染囖
- const lastData = Object.keys(dataSource[0]).reduce((prev, key) => {
- const count = dataSource.map((n) => n[key]).reduce((p, c) => c + p, 0);
- prev[key] = isNaN(Number(count)) ? 'N/A' : count;
- return prev;
- }, {});
- const columnKeys = columns.map((item) => item.dataIndex ?? item.key);
- [...tr.children].forEach((item: HTMLTableCellElement, index) => {
- if (index == 0) {
- item.textContent = sumText;
- } else {
- item.textContent = lastData[columnKeys[index]];
- }
- item.style.backgroundColor = 'inherit';
- });
- }
- if (colEls?.length) {
- [...tr.children].forEach((item: HTMLTableCellElement, index) => {
- Object.keys(colEls[index].style || []).forEach((key) => {
- const styleKey = colEls[index].style[key];
- item.style[styleKey] = colEls[index].style[styleKey];
- item.className = colEls[index].className;
- });
- });
- }
- };
-
- renderCol();
-
- if (!tbody.contains(tr)) {
- tbody.appendChild(tr);
- setTimeout(() => {
- const colEls =
- tableRef.value.$el.querySelector('.ant-table-tbody')?.firstElementChild?.children;
- colEls && renderCol([...colEls] as HTMLTableCellElement[]);
- }, 100);
- }
- };
-
- return { setCalculateRow };
-};
diff --git a/src/layout/header/components.ts b/src/layout/header/components.ts
deleted file mode 100644
index 92f3717a3..000000000
--- a/src/layout/header/components.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Layout, Avatar, Menu, Dropdown, Breadcrumb, Tooltip } from 'ant-design-vue';
-
-import {
- SettingOutlined,
- SearchOutlined,
- MenuFoldOutlined,
- MenuUnfoldOutlined,
- FullscreenOutlined,
- FullscreenExitOutlined,
- PoweroffOutlined,
- GithubOutlined,
- LockOutlined,
-} from '@ant-design/icons-vue';
-
-export default {
- [Layout.Header.name]: Layout.Header,
- [Avatar.name]: Avatar,
- [Menu.name]: Menu,
- [Tooltip.name]: Tooltip,
- [Menu.Divider.name]: Menu.Divider,
- SettingOutlined,
- Dropdown,
- LockOutlined,
- GithubOutlined,
- SearchOutlined,
- [Breadcrumb.name]: Breadcrumb,
- [Breadcrumb.Item.name]: Breadcrumb.Item,
- MenuFoldOutlined,
- MenuUnfoldOutlined,
- FullscreenOutlined,
- FullscreenExitOutlined,
- PoweroffOutlined,
-};
diff --git a/src/layout/header/index.vue b/src/layout/header/index.vue
index 9d9c685d1..d0da1cea9 100644
--- a/src/layout/header/index.vue
+++ b/src/layout/header/index.vue
@@ -1,176 +1,180 @@
-
+
-