Skip to content

Commit 6e2e0c9

Browse files
Merge branch 'feature/1.1.x' into develop
2 parents 0a5b1ba + f28b353 commit 6e2e0c9

File tree

261 files changed

+19290
-8014
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+19290
-8014
lines changed

.npmrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
auto-install-peers = true
2+
registry=https://packages.aliyun.com/5f6426fcdb0493ecef9118ab/npm/npm-registry/
3+
//packages.aliyun.com/5f6426fcdb0493ecef9118ab/npm/npm-registry/:_authToken=8189340c-e582-4d1d-9f9f-1cb14eb832ee
4+
SENTRYCLI_CDNURL=https://cdn.npmmirror.com/binaries/sentry-cli
5+
sharp_libvips_binary_host=https://npmmirror.com/mirrors/sharp-libvips
6+
sharp_binary_host=https://npmmirror.com/mirrors/sharp
7+
home=https://www.npmjs.org

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## 1.1.0
2+
1. 引擎部分:
3+
1. 实现全局数据管理
4+
2. 实现全局方法管理
5+
3. http接入
6+
4. 组件联动
7+
5. 实现画布缩放
8+
9+
## 1.0.0
10+
1. 引擎核心部分
11+
2. 后台编辑器核心部分
12+
3. 渲染器核心部分

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# 使用
2+
## 启动项目
3+
```
4+
pnpm i && pnpm playground
5+
```
6+
7+
## 组件开发
8+
目录: [组件开发目录](packages/ui-vue2)
9+
### demo
10+
目录: [demo](packages/ui-vue2/src/q-demo)
11+
12+
### 组件调试
13+
直接通过 页面编辑器进行输入
14+
15+
## schemas标准
16+
查看: [schemas标准](apps/quantum-docs/docs/api/schema/index.md)
17+
18+
119
# 概览
220
## 目的
321
1. 实现基本的、可拓展的、可被二次封装的、不依赖于框架的低代码平台

apps/quantum-backend/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
搭建平台B端侧
44

55
## 说明
6+
// 区分 经典模式(运营人员) 和 新模式(开发人员)

apps/quantum-backend/components.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export {}
77

88
declare module 'vue' {
99
export interface GlobalComponents {
10+
CompList: typeof import('./src/components/classic/sidebar/comp-list/index.vue')['default']
1011
Preview: typeof import('./src/components/pagePreview/preview.vue')['default']
12+
PropsList: typeof import('./src/components/classic/sidebar/props-list/index.vue')['default']
13+
QAntdDrawer: typeof import('@q-front-npm/vue3-antd-pc-ui/es')['QAntdDrawer']
14+
QAntdDropdown: typeof import('@q-front-npm/vue3-antd-pc-ui/es')['QAntdDropdown']
1115
QAntdForm: typeof import('@q-front-npm/vue3-antd-pc-ui/es')['QAntdForm']
1216
QAntdIcon: typeof import('@q-front-npm/vue3-antd-pc-ui/es')['QAntdIcon']
1317
QAntdKeepAliveTabs: typeof import('@q-front-npm/vue3-antd-pc-ui/es')['QAntdKeepAliveTabs']
@@ -16,6 +20,7 @@ declare module 'vue' {
1620
QAntdTable: typeof import('@q-front-npm/vue3-antd-pc-ui/es')['QAntdTable']
1721
QAntdTableAction: typeof import('@q-front-npm/vue3-antd-pc-ui/es')['QAntdTableAction']
1822
QBreadcrumb: typeof import('@q-front-npm/vue3-pc-ui/es')['QBreadcrumb']
23+
QCodeEditor: typeof import('@q-front-npm/vue3-pc-ui/es')['QCodeEditor']
1924
QLoading: typeof import('@q-front-npm/vue3-pc-ui/es')['QLoading']
2025
QmAside: typeof import('./src/components/layout/qm-aside.vue')['default']
2126
QmAuthority: typeof import('./src/components/qm-authority/index.vue')['default']
@@ -24,6 +29,7 @@ declare module 'vue' {
2429
QThemeModeButton: typeof import('@q-front-npm/vue3-pc-ui/es')['QThemeModeButton']
2530
RouterLink: typeof import('vue-router')['RouterLink']
2631
RouterView: typeof import('vue-router')['RouterView']
32+
Sidebar: typeof import('./src/components/classic/sidebar/index.vue')['default']
2733
Src: typeof import('./src/components/json-viewer/src/index.vue')['default']
2834
ViewModal: typeof import('./src/components/json-viewer/src/view-modal.vue')['default']
2935
}

apps/quantum-backend/package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,24 @@
66
"author": "Evan Wu",
77
"scripts": {
88
"dev": "vite",
9+
"playground": "vite",
910
"build": "NODE_OPTIONS=--max-old-space-size=8192 vite build",
1011
"preview": "vite preview",
1112
"type:check": "vue-tsc --noEmit --skipLibCheck"
1213
},
1314
"dependencies": {
1415
"@qimao/quantum-utils": "workspace:*",
1516
"@qimao/quantum-core": "workspace:*",
17+
"@qimao/quantum-schemas": "workspace:*",
1618
"@qimao/quantum-editor": "workspace:*",
1719
"@qimao/quantum-sandbox": "workspace:*",
18-
"@qimao/quantum-ui": "workspace:*",
1920
"@ant-design/icons-vue": "6.1.0",
20-
"@q-front-npm-configs/vite": "1.2.1-beta.0",
21-
"@q-front-npm/hooks": "1.2.1-beta.0",
22-
"@q-front-npm/http": "1.2.1-beta.0",
23-
"@q-front-npm/shared": "1.2.1-beta.0",
24-
"@q-front-npm/vue3-antd-pc-ui": "1.2.1-beta.0",
25-
"@q-front-npm/vue3-pc-ui": "1.2.1-beta.0",
21+
"@q-front-npm-configs/vite": "~1.2.5-beta.1",
22+
"@q-front-npm/hooks": "~1.2.5-beta.1",
23+
"@q-front-npm/http": "~1.2.9-beta.2",
24+
"@q-front-npm/shared": "~1.2.4-beta.0",
25+
"@q-front-npm/vue3-antd-pc-ui": "~1.2.10-beta.5",
26+
"@q-front-npm/vue3-pc-ui": "~1.2.5-beta.5",
2627
"ant-design-vue": "~4.0.6",
2728
"axios": "0.27.2",
2829
"dayjs": "1.11.7",
@@ -34,11 +35,12 @@
3435
"vue": "~3.3.4",
3536
"vue-router": "~4.2.4",
3637
"vue-json-pretty": "^2.2.4",
37-
"monaco-editor": "^0.44.0"
38+
"monaco-editor": "^0.44.0",
39+
"tinymce": "^5.10.9"
3840
},
3941
"devDependencies": {
4042
"@sentry/vue": "^7.66.0",
41-
"@q-front-npm/types": "1.2.1-beta.0",
43+
"@q-front-npm/types": "1.2.1",
4244
"@types/element-resize-detector": "1.1.3",
4345
"@types/less": "3.0.3",
4446
"@types/lodash-es": "4.17.6",
@@ -51,7 +53,7 @@
5153
"vue-tsc": "1.8.8",
5254
"workbox-build": "^7.0.0",
5355
"workbox-window": "^7.0.0",
54-
"@qimao/quantum-render-active": "workspace:*",
55-
"@qimao/quantum-render-vue3": "workspace:*"
56+
"@qimao/quantum-runtime-vue2-active": "workspace:*",
57+
"@qimao/quantum-runtime-vue3": "workspace:*"
5658
}
5759
}
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
<!-- -->
2+
<template>
3+
<div class="classic-sidebar-comp">
4+
<a-tabs size="small">
5+
<a-tab-pane v-for="group in compList" :key="group.text" :tab="group.text">
6+
<div class="classic-sidebar-comp-tab">
7+
<template
8+
v-for="item in group.children"
9+
:key="item.component"
10+
>
11+
<div
12+
class="classic-sidebar-comp-tab-item"
13+
@click="addComp(item)"
14+
>
15+
<div class="classic-sidebar-comp-tab-item-icon">
16+
<a-tooltip placement="right" :title="item.desc">
17+
<template v-if="item.icon">
18+
<template v-if="js_is_string(item.icon) && item.icon.startsWith('http')">
19+
<img :src="item.icon" >
20+
</template>
21+
<template v-else-if="js_is_string(item.icon)">
22+
<q-antd-icon :type="item.icon"/>
23+
</template>
24+
<template v-else>
25+
<component :is="toRaw(item.icon)"></component>
26+
</template>
27+
</template>
28+
</a-tooltip>
29+
</div>
30+
<p :title="item.text">{{ item.text }}</p>
31+
</div>
32+
</template>
33+
</div>
34+
</a-tab-pane>
35+
</a-tabs>
36+
</div>
37+
</template>
38+
39+
<script lang='ts' setup>
40+
import { IComponentItem, IServices } from '@qimao/quantum-editor';
41+
import { js_is_string } from '@qimao/quantum-utils';
42+
import { computed, inject, reactive, toRaw } from 'vue'
43+
defineOptions({
44+
name: 'CompList'
45+
})
46+
47+
const services = inject<IServices>('services');
48+
const compList = computed(() => services?.componentService.getList())
49+
50+
function addComp(item: IComponentItem) {
51+
const width = services?.editorService?.get('sandbox')?.designWidth
52+
services?.editorService.add({
53+
label: item.text,
54+
type: item.component,
55+
...{
56+
...item.data,
57+
style: {
58+
height: '',
59+
width: width
60+
}
61+
},
62+
})
63+
}
64+
65+
</script>
66+
<style lang='scss' scoped>
67+
.classic-sidebar-comp {
68+
@include bg-color(aside-bg);
69+
padding: 0 10px;
70+
margin: 6px;
71+
border: 1px solid;
72+
@include border-color(border-color);
73+
:deep(.ant-tabs >.ant-tabs-nav) {
74+
margin-bottom: 8px;
75+
}
76+
&-tab {
77+
display: flex;
78+
padding: 0 10px;
79+
flex-wrap: no-wrap;
80+
overflow-x: auto;
81+
&-item {
82+
display: flex;
83+
overflow: hidden;
84+
text-overflow: ellipsis;
85+
margin: 0px 10px 0 0;
86+
box-sizing: border-box;
87+
color: #313a40;
88+
flex-direction: column;
89+
min-width: 42px;
90+
cursor: pointer;
91+
&-icon {
92+
font-size: 20px;
93+
background: #fff;
94+
height: 40px;
95+
width: 40px;
96+
line-height: 40px;
97+
border-radius: 5px;
98+
color: #909090;
99+
border: 1px solid #d9dbdd;
100+
display: flex;
101+
justify-content: space-evenly;
102+
align-items: center;
103+
margin-bottom: 5px;
104+
}
105+
p {
106+
text-align: center;
107+
}
108+
}
109+
110+
}
111+
}
112+
</style>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!-- -->
2+
<template>
3+
<div class="classic-sidebar">
4+
<comp-list></comp-list>
5+
<props-list></props-list>
6+
</div>
7+
</template>
8+
9+
<script lang='ts' setup>
10+
import { IServices } from '@qimao/quantum-editor';
11+
import { PropType, provide, reactive } from 'vue'
12+
import CompList from './comp-list/index.vue'
13+
import PropsList from './props-list/index.vue'
14+
defineOptions({
15+
name: 'Sidebar'
16+
})
17+
const props = defineProps({
18+
services: {
19+
type: Object as PropType<IServices>,
20+
default: () => {}
21+
}
22+
})
23+
provide('services', props.services)
24+
25+
</script>
26+
<style lang='scss' scoped>
27+
.classic-sidebar {
28+
height: 100%;
29+
overflow-y: auto;
30+
}
31+
</style>

0 commit comments

Comments
 (0)