From b4d5340630e135a5dccc88cc287e55447033deaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Wed, 23 Jun 2021 13:51:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20css=E6=A1=86=E6=9E=B6=E5=BC=95=E5=85=A5?= =?UTF-8?q?=EF=BC=8C=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 + package.json | 2 + src/components/index.js | 3 + src/components/page/PageHeader.vue | 69 +-- src/components/table/index.vue | 121 +++++ src/main.js | 1 + src/mock/frame/tableDataMock.js | 58 +++ src/pages/frame/layouts/PageLayout.vue | 27 +- src/pages/system/view/user/UserManagement.vue | 46 +- src/pages/xunjian/view/area/index.vue | 25 + src/plugins/index.js | 20 +- src/utils/baseUrlUtil.js | 2 +- tailwind.config.js | 16 + vue.config.js | 490 +++++++++--------- 14 files changed, 554 insertions(+), 329 deletions(-) create mode 100644 src/components/index.js create mode 100644 src/components/table/index.vue create mode 100644 src/mock/frame/tableDataMock.js create mode 100644 src/pages/xunjian/view/area/index.vue create mode 100644 tailwind.config.js diff --git a/README.md b/README.md index 2684560..7344e31 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,6 @@ $ npm run serve ### 说明 用户名/密码:admin/666666 + + css 工具函数 地址 + https://www.tailwindcss.cn/docs/installation#post-css-7 diff --git a/package.json b/package.json index 6fa200d..ed7ffba 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ }, "dependencies": { "@antv/data-set": "^0.11.4", + "@tailwindcss/postcss7-compat": "^2.2.2", "animate.css": "^4.1.0", "ant-design-vue": "1.7.2", "axios": "^0.19.2", @@ -26,6 +27,7 @@ "js-cookie": "^2.2.1", "mockjs": "^1.1.0", "nprogress": "^0.2.0", + "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.2", "viser-vue": "^2.4.8", "vue": "^2.6.11", "vue-i18n": "^8.18.2", diff --git a/src/components/index.js b/src/components/index.js new file mode 100644 index 0000000..f49b5a1 --- /dev/null +++ b/src/components/index.js @@ -0,0 +1,3 @@ +import Table from './table/index.vue'; + +export { Table }; diff --git a/src/components/page/PageHeader.vue b/src/components/page/PageHeader.vue index ae2c4ba..85dc6d3 100644 --- a/src/components/page/PageHeader.vue +++ b/src/components/page/PageHeader.vue @@ -1,35 +1,10 @@ @@ -63,43 +38,11 @@ export default { diff --git a/src/components/table/index.vue b/src/components/table/index.vue new file mode 100644 index 0000000..7f6b4a9 --- /dev/null +++ b/src/components/table/index.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/main.js b/src/main.js index 6a586cd..1683c72 100644 --- a/src/main.js +++ b/src/main.js @@ -7,6 +7,7 @@ import { initRouter } from './router'; import VueI18n from 'vue-i18n'; import {accountModule, settingModule} from './pages/frame/store'; import App from './App.vue'; +import "tailwindcss/tailwind.css" import 'animate.css/source/animate.css'; import './theme/index.less'; diff --git a/src/mock/frame/tableDataMock.js b/src/mock/frame/tableDataMock.js new file mode 100644 index 0000000..c04b95a --- /dev/null +++ b/src/mock/frame/tableDataMock.js @@ -0,0 +1,58 @@ +import Mock from 'mockjs'; + +Mock.mock(`${process.env.VUE_APP_API_BASE_URL}/table`, 'post', () => ({ + data: { + pageNum: 1, + pageSize: 10, + records: [ + { + regionId: 1403455275008032, + regionName: '陈浩玮', + organizationId: 146, + organizationName: '一级系统:巴基斯坦公司', + remark: '123', + editorId: 1, + editorName: '管理员', + editTime: '2021-03-16 22:20:25', + }, + { + regionId: 1403455136596000, + regionName: '地点测试', + organizationId: 212, + organizationName: '吴国', + remark: '123', + editorId: 1, + editorName: '管理员', + editTime: '2021-03-16 22:19:19', + }, + { + regionId: 1400871246102560, + regionName: '陈浩玮测试', + organizationId: 212, + organizationName: '吴国', + remark: '321', + editorId: 1, + editorName: '管理员', + editTime: '2021-03-02 16:04:25', + }, + { + regionId: 1396338094768160, + regionName: '文件地区', + organizationId: 208, + organizationName: '扩普发展', + remark: '123213123123213213223123123', + editorId: 1, + editorName: '管理员', + editTime: '2021-03-02 15:37:11', + }, + ], + total: 4, + size: 10, + current: 1, + pages: 1, + }, + code: 'sys.success', + message: null, + traceId: '1805b654e82a4f2a8357d2f8922d9b19', + meta: null, +})); diff --git a/src/pages/frame/layouts/PageLayout.vue b/src/pages/frame/layouts/PageLayout.vue index d059726..7b4df31 100644 --- a/src/pages/frame/layouts/PageLayout.vue +++ b/src/pages/frame/layouts/PageLayout.vue @@ -1,15 +1,20 @@