diff --git a/README.md b/README.md index 2e1ecdd..323409e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 基于 Vite2.x + Vue3.x + TypeScript H5 低代码平台 +### 后续可能会。。。搭建 PC 端后台管理系统低代码平台 + [![license](https://img.shields.io/github/license/buqiyuan/vite-vue3-lowcode.svg)](LICENSE) **中文** | [English](./README.EN.md) @@ -34,7 +36,7 @@ git clone --single-branch https://gitee.com/buqiyuan/vite-vue3-lowcode.git - [x] 动态添加页面 - [x] 拖拽式生成组件 - [ ] service worker + indexeddb 实现无服务端的前端交互 -- [ ] 数据源管理 +- [ ] 数据源管理(支持导入 swagger JSON 生成数据模型及接口) - [ ] 提供预置函数 - [ ] 更多组件的封装 - [ ] 其他... diff --git a/components.d.ts b/components.d.ts index 853e3e0..8144f62 100644 --- a/components.d.ts +++ b/components.d.ts @@ -15,8 +15,6 @@ declare module 'vue' { ElTabPane: typeof import('element-plus/es/el-tab-pane')['default'] ElTabs: typeof import('element-plus/es/el-tabs')['default'] ElDialog: typeof import('element-plus/es/el-dialog')['default'] - ElCollapseItem: typeof import('element-plus/es/el-collapse-item')['default'] - ElCollapse: typeof import('element-plus/es/el-collapse')['default'] ElTag: typeof import('element-plus/es/el-tag')['default'] ElDropdownItem: typeof import('element-plus/es/el-dropdown-item')['default'] ElDropdownMenu: typeof import('element-plus/es/el-dropdown-menu')['default'] @@ -25,6 +23,9 @@ declare module 'vue' { ElInput: typeof import('element-plus/es/el-input')['default'] ElFormItem: typeof import('element-plus/es/el-form-item')['default'] ElForm: typeof import('element-plus/es/el-form')['default'] + ElCollapseItem: typeof import('element-plus/es/el-collapse-item')['default'] + ElCollapse: typeof import('element-plus/es/el-collapse')['default'] + ElPopconfirm: typeof import('element-plus/es/el-popconfirm')['default'] } } diff --git a/package.json b/package.json index 3785b61..b710ff0 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "axios": "^0.21.1", "dayjs": "^1.10.5", "dexie": "^3.0.3", - "element-plus": "1.0.2-beta.53", + "element-plus": "1.0.2-beta.52", "lodash": "^4.17.21", "monaco-editor": "^0.25.2", "normalize.css": "^8.0.1", @@ -62,7 +62,7 @@ "gh-pages": "^3.2.3", "husky": "^6.0.0", "lint-staged": "^11.0.0", - "prettier": "^2.3.1", + "prettier": "^2.3.2", "pretty-quick": "^3.1.1", "sass": "1.35.1", "stylelint": "^13.13.1", @@ -72,7 +72,7 @@ "typescript": "^4.3.4", "vite": "2.3.8", "vite-plugin-components": "^0.11.2", - "vite-plugin-style-import": "^1.0.0", + "vite-plugin-style-import": "^1.0.1", "vite-plugin-windicss": "^1.1.1", "vue-eslint-parser": "^7.6.0", "vue-tsc": "^0.2.0", diff --git a/src/enums/httpEnum.ts b/src/enums/httpEnum.ts new file mode 100644 index 0000000..38e905a --- /dev/null +++ b/src/enums/httpEnum.ts @@ -0,0 +1,34 @@ +/** + * @description: 请求结果集 + */ +export enum ResultEnum { + SUCCESS = 0, + ERROR = -1, + TIMEOUT = 10042, + TYPE = 'success' +} + +/** + * @description: 请求方法 + */ +export enum RequestEnum { + GET = 'GET', + POST = 'POST', + PATCH = 'PATCH', + PUT = 'PUT', + DELETE = 'DELETE' +} + +/** + * @description: 常用的contentTyp类型 + */ +export enum ContentTypeEnum { + // json + JSON = 'application/json;charset=UTF-8', + // json + TEXT = 'text/plain;charset=UTF-8', + // form-data 一般配合qs + FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8', + // form-data 上传 + FORM_DATA = 'multipart/form-data;charset=UTF-8' +} diff --git a/src/visual-editor/components/left-aside/components/data-source/data-fetch.vue b/src/visual-editor/components/left-aside/components/data-source/data-fetch.vue new file mode 100644 index 0000000..6d5fb73 --- /dev/null +++ b/src/visual-editor/components/left-aside/components/data-source/data-fetch.vue @@ -0,0 +1,260 @@ + + + + 添加 + 导入swagger + + + + + + + {{ item.name }} + + + + + + + + + + + + {{ JSON.stringify(item, null, 2) }} + + + + + + + + + diff --git a/src/visual-editor/components/left-aside/components/data-source/data-model.vue b/src/visual-editor/components/left-aside/components/data-source/data-model.vue new file mode 100644 index 0000000..02c56fb --- /dev/null +++ b/src/visual-editor/components/left-aside/components/data-source/data-model.vue @@ -0,0 +1,290 @@ + + + + 添加 + 导入swagger + + + + + + + {{ item.name }} + + + + + + + + + + + + + {{ JSON.stringify(entity, null, 2) }} + + + + + + + + + + diff --git a/src/visual-editor/components/left-aside/components/data-source/index.vue b/src/visual-editor/components/left-aside/components/data-source/index.vue index eeeb7c0..651e83e 100644 --- a/src/visual-editor/components/left-aside/components/data-source/index.vue +++ b/src/visual-editor/components/left-aside/components/data-source/index.vue @@ -1,255 +1,31 @@ - 添加 - - - - - - {{ item.name }} - - - - - - - - - {{ JSON.stringify(entity, null, 2) }} - - - - - + + + + + + + + diff --git a/src/visual-editor/components/left-aside/components/page-tree/index.vue b/src/visual-editor/components/left-aside/components/page-tree/index.vue index 0aff32f..b2c37db 100644 --- a/src/visual-editor/components/left-aside/components/page-tree/index.vue +++ b/src/visual-editor/components/left-aside/components/page-tree/index.vue @@ -1,6 +1,11 @@ - 添加页面 - + - + {{ tabItem.label }} @@ -23,7 +23,7 @@
{{ JSON.stringify(item, null, 2) }}
{{ JSON.stringify(entity, null, 2) }}