Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
c73c5c89
Commit
c73c5c89
authored
Jan 21, 2021
by
郝聪敏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/test' into 'master'
Feature/test See merge request
!2
parents
da15d790
6a333c9b
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
110 additions
and
58 deletions
+110
-58
index.ts
app/web/component/layout/activity/index.ts
+1
-4
index.vue
app/web/component/layout/activity/index.vue
+0
-1
index.ts
app/web/component/layout/editor/index.ts
+1
-3
index.ts
app/web/component/layout/login/index.ts
+0
-4
index.ts
app/web/config/index.ts
+2
-1
config.ts
app/web/lib/config.ts
+2
-0
index.ts
app/web/page/editor/component/DynamicComponent/index.ts
+12
-13
index.ts
app/web/page/editor/view/dashboard/index.ts
+0
-1
qg.service.ts
app/web/service/qg.service.ts
+50
-0
config.local.ts
config/config.local.ts
+8
-6
config.prod.ts
config/config.prod.ts
+3
-2
package.json
package.json
+21
-20
webpack.config.js
webpack.config.js
+10
-3
No files found.
app/web/component/layout/activity/index.ts
View file @
c73c5c89
import
{
Vue
,
Component
,
Prop
}
from
'
vue-property-decorator
'
;
import
cherryUi
from
'
@qg/cherry-ui
'
;
import
Raven
from
'
raven-js
'
;
import
RavenVue
from
'
raven-js/plugins/vue
'
;
import
{
release
}
from
'
@/.sentryclirc
'
;
import
'
@qg/cherry-ui/dist/cherry.css
'
;
Vue
.
use
(
cherryUi
);
import
'
@/service/qg.service
'
;
// 初始化sentry
if
(
process
.
env
.
SENTRY_ENV
!==
'
test
'
&&
process
.
env
.
NODE_ENV
===
'
production
'
)
{
...
...
app/web/component/layout/activity/index.vue
View file @
c73c5c89
...
...
@@ -8,7 +8,6 @@
<meta
name=
"viewport"
content=
"initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"
>
<link
rel=
"shortcut icon"
href=
"/favicon.ico"
type=
"image/x-icon"
/>
<link
rel=
"stylesheet"
href=
"/public/asset/css/reset.css"
>
<link
rel=
"stylesheet"
href=
""
>
</head>
<body>
<div
id=
"app"
><slot></slot></div>
...
...
app/web/component/layout/editor/index.ts
View file @
c73c5c89
import
{
Vue
,
Component
,
Prop
,
Watch
}
from
'
vue-property-decorator
'
;
import
iView
from
'
iview
'
;
import
cherryUi
from
'
@qg/cherry-ui
'
;
import
Raven
from
'
raven-js
'
;
import
RavenVue
from
'
raven-js/plugins/vue
'
;
import
{
release
}
from
'
@/.sentryclirc
'
;
import
VueContextMenu
from
'
@editor/component/Contextmenu/index
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
import
'
@/service/qg.service
'
;
import
'
iview/dist/styles/iview.css
'
;
import
'
@qg/cherry-ui/dist/cherry.css
'
;
Vue
.
use
(
iView
);
Vue
.
use
(
cherryUi
);
Vue
.
use
(
VueContextMenu
);
// 初始化sentry
...
...
app/web/component/layout/login/index.ts
View file @
c73c5c89
import
{
Vue
,
Component
,
Prop
}
from
'
vue-property-decorator
'
;
// import cherryUi from '../../../../../node_modules/@qg/cherry-ui/src/index';
import
cherryUi
from
'
@qg/cherry-ui
'
;
import
iView
from
'
iview
'
;
import
'
@qg/cherry-ui/dist/cherry.css
'
;
import
'
iview/dist/styles/iview.css
'
;
Vue
.
use
(
iView
);
Vue
.
use
(
cherryUi
);
@
Component
({
name
:
'
Layout
'
...
...
app/web/config/index.ts
View file @
c73c5c89
...
...
@@ -2,4 +2,5 @@ import prod from './prod.config';
import
dev
from
'
./dev.config
'
;
import
test
from
'
./test.config
'
;
export
default
process
.
env
.
NODE_ENV
===
'
test
'
?
test
:
process
.
env
.
NODE_ENV
===
'
production
'
?
prod
:
dev
;
// export default process.env.NODE_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev;
export
default
process
.
env
.
SENTRY_ENV
?
test
:
process
.
env
.
NODE_ENV
===
'
production
'
?
prod
:
dev
;
app/web/lib/config.ts
View file @
c73c5c89
// export const basicComponents = require('@qg/cherry-ui/md/index.json');
// export const kaLoginForm = require('@qg/citrus-ui/md/index.json');
export
const
basicComponents
=
[
{
eleName
:
'
freedom-container
'
,
...
...
app/web/page/editor/component/DynamicComponent/index.ts
View file @
c73c5c89
import
{
Component
,
Vue
,
Prop
,
Watch
}
from
'
vue-property-decorator
'
;
import
components
from
'
@qg/cherry-ui/src/index.js
'
;
import
FreedomContainer
from
'
../../component/FreedomContainer/index.vue
'
;
import
{
kebabCase
,
chunk
,
flatten
}
from
'
lodash
'
;
import
{
State
}
from
'
vuex-class
'
;
...
...
@@ -52,17 +51,17 @@ export default class DynamicComponent extends Vue {
console
.
log
(
'
dragend
'
);
}
getProps
(
eleName
)
{
const
props
=
{};
for
(
const
key
of
Object
.
keys
(
components
))
{
const
component
=
components
[
key
];
if
(
kebabCase
(
component
.
name
)
===
eleName
&&
component
.
props
)
{
for
(
const
prop
of
Object
.
keys
(
component
.
props
))
{
props
[
prop
]
=
[
'
Object
'
,
'
Array
'
].
includes
(
component
.
props
[
prop
].
type
.
name
)
?
component
.
props
[
prop
].
default
&&
component
.
props
[
prop
].
default
()
:
component
.
props
[
prop
].
default
;
}
}
}
//
getProps(eleName) {
//
const props = {};
//
for (const key of Object.keys(components)) {
//
const component = components[key];
//
if (kebabCase(component.name) === eleName && component.props) {
//
for (const prop of Object.keys(component.props)) {
//
props[prop] = ['Object', 'Array'].includes(component.props[prop].type.name) ? component.props[prop].default && component.props[prop].default() : component.props[prop].default;
//
}
//
}
//
}
return
props
;
}
//
return props;
//
}
}
\ No newline at end of file
app/web/page/editor/view/dashboard/index.ts
View file @
c73c5c89
...
...
@@ -5,7 +5,6 @@ import DynamicComponent from '@editor/component/DynamicComponent/index.vue';
import
VueGridLayout
from
'
vue-grid-layout
'
;
import
FreedomContainer
from
'
../../component/FreedomContainer/index.vue
'
;
import
DynamicForm
from
'
../../component/DynamicForm/index.vue
'
;
import
components
from
'
@qg/cherry-ui/src/index.js
'
;
import
LoginForm
from
'
@/lib/Form/index.vue
'
;
import
DownloadGuide
from
'
@/lib/DownloadGuide/index.vue
'
;
import
{
ContextMenu
}
from
'
@editor/mixins/contextMenu.mixin
'
;
...
...
app/web/service/qg.service.ts
0 → 100644
View file @
c73c5c89
import
Vue
from
'
vue
'
;
import
{
Button
,
Image
,
Icon
,
Cell
,
CellGroup
,
Row
,
Col
,
Dialog
,
Popup
,
Overlay
,
Divider
,
Loading
,
Picker
,
NavBar
,
Field
,
Checkbox
,
CardList
,
List
,
Form
,
Sticky
,
Tab
,
Tabs
}
from
'
@qg/cherry-ui
'
;
// import { KaLoginForm } from '@qg/citrus-ui';
Vue
.
use
(
Button
);
Vue
.
use
(
Image
);
// Vue.use(Cell);
// Vue.use(CellGroup);
// Vue.use(Row);
// Vue.use(Col);
// Vue.use(Popup);
// Vue.use(Divider);
// Vue.use(Picker);
Vue
.
use
(
Field
);
// Vue.use(Dialog);
// Vue.use(Checkbox);
// Vue.use(Icon);
// Vue.use(Sticky);
// Vue.use(Overlay);
Vue
.
use
(
Form
);
// Vue.use(CardList);
// Vue.use(Loading);
// Vue.use(List);
// Vue.use(Tab);
// Vue.use(Tabs);
// Vue.use(KaLoginForm);
config/config.local.ts
View file @
c73c5c89
...
...
@@ -22,12 +22,7 @@ export default (appInfo: EggAppConfig) => {
injectCss
:
false
};
exports
.
webpack
=
{
webpackConfigList
:
getWebpackConfig
(),
browser
:
'
http://localhost:7001/editor/list
'
};
exports
.
sequelize
=
{
const
localMysqlConfig
=
{
dialect
:
'
mysql
'
,
username
:
'
qa
'
,
password
:
'
qatest
'
,
...
...
@@ -36,5 +31,12 @@ export default (appInfo: EggAppConfig) => {
database
:
'
low_code
'
,
};
exports
.
sequelize
=
localMysqlConfig
;
exports
.
webpack
=
{
webpackConfigList
:
getWebpackConfig
(),
browser
:
'
http://localhost:7001/editor/list
'
};
return
exports
;
};
config/config.prod.ts
View file @
c73c5c89
...
...
@@ -31,8 +31,9 @@ export default (appInfo: EggAppConfig) => {
database
:
'
low_code
'
,
};
// exports.sequelize = process.env.NODE_ENV === 'test' ? localMysqlConfig : prodMysqlConfig;
exports
.
sequelize
=
localMysqlConfig
;
console
.
log
(
'
process.env.NODE_ENV
'
,
process
.
env
.
NAMESPACE
);
exports
.
sequelize
=
process
.
env
.
NAMESPACE
?
localMysqlConfig
:
prodMysqlConfig
;
return
exports
;
};
package.json
View file @
c73c5c89
...
...
@@ -3,7 +3,7 @@
"version"
:
"0.0.1"
,
"description"
:
"低代码平台"
,
"scripts"
:
{
"start"
:
"egg-scripts start --port
905
0 --workers 1"
,
"start"
:
"egg-scripts start --port
8
0 --workers 1"
,
"stop"
:
"egg-scripts stop"
,
"backend"
:
"nohup egg-scripts start --port 7001 --workers 4"
,
"dev"
:
"egg-bin dev -r egg-ts-helper/register"
,
...
...
@@ -18,14 +18,25 @@
"changelog"
:
"conventional-changelog -p angular -i CHANGELOG.md -s"
},
"dependencies"
:
{
"
@babel/plugin-syntax-jsx
"
:
"
^7.12.1
"
,
"
@better-scroll/core
"
:
"
^2.0.5
"
,
"
@easy-team/easywebpack-cli
"
:
"
^4.0.0
"
,
"
@easy-team/easywebpack-vue
"
:
"
^4.0.0
"
,
"
@hubcarl/json-typescript-mapper
"
:
"
^2.0.0
"
,
"
@qg/cherry-ui
"
:
"
^2.18.66
"
,
"
@qg/citrus-ui
"
:
"
0.0.1-alpha.1
"
,
"
@types/lodash
"
:
"
^4.14.117
"
,
"
@types/node
"
:
"
^10.12.0
"
,
"
@types/validator
"
:
"
^4.5.26
"
,
"
axios
"
:
"
^0.18.1
"
,
"
babel-plugin-transform-vue-jsx
"
:
"
^4.0.1
"
,
"
cz-conventional-changelog
"
:
"
^2.1.0
"
,
"
egg
"
:
"
^2.3.0
"
,
"
egg-bin
"
:
"
^4.9.0
"
,
"
egg-cors
"
:
"
^2.1.1
"
,
"
egg-scripts
"
:
"
^2.10.0
"
,
"
egg-sequelize-ts
"
:
"
^0.2.3-0
"
,
"
egg-ts-helper
"
:
"
^1.13.0
"
,
"
egg-view-vue-ssr
"
:
"
^3.0.5
"
,
"
egg-webpack
"
:
"
^4.4.7
"
,
"
egg-webpack-vue
"
:
"
^2.0.0
"
,
...
...
@@ -33,10 +44,13 @@
"
html2canvas
"
:
"
^1.0.0-rc.7
"
,
"
iview
"
:
"
^2.9.0
"
,
"
js-cookie
"
:
"
^2.2.1
"
,
"
less
"
:
"
^3.12.2
"
,
"
less-loader
"
:
"
^7.1.0
"
,
"
lodash
"
:
"
^4.17.4
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
moment
"
:
"
^2.17.1
"
,
"
mysql2
"
:
"
^2.2.5
"
,
"
node-tool-utils
"
:
"
^1.1.1
"
,
"
npm
"
:
"
^6.14.10
"
,
"
postcss-px2rem
"
:
"
^0.3.0
"
,
"
qs
"
:
"
^6.9.4
"
,
...
...
@@ -44,6 +58,12 @@
"
sa-sdk-javascript
"
:
"
^1.15.27
"
,
"
sequelize
"
:
"
^4.38.0
"
,
"
sequelize-typescript
"
:
"
^0.6.6
"
,
"
ts-loader
"
:
"
^5.3.0
"
,
"
ts-node
"
:
"
^7.0.1
"
,
"
tslint
"
:
"
^5.9.1
"
,
"
tslint-eslint-rules
"
:
"
^5.4.0
"
,
"
tslint-loader
"
:
"
^3.5.3
"
,
"
typescript
"
:
"
^3.9.2
"
,
"
vue
"
:
"
^2.6.12
"
,
"
vue-grid-layout
"
:
"
^2.3.11
"
,
"
vue-property-decorator
"
:
"
^7.2.0
"
,
...
...
@@ -51,25 +71,6 @@
"
vuex
"
:
"
^3.0.1
"
,
"
vuex-class
"
:
"
^0.3.1
"
,
"
vuex-router-sync
"
:
"
^5.0.0
"
,
"
@babel/plugin-syntax-jsx
"
:
"
^7.12.1
"
,
"
@easy-team/easywebpack-cli
"
:
"
^4.0.0
"
,
"
@easy-team/easywebpack-vue
"
:
"
^4.0.0
"
,
"
@types/lodash
"
:
"
^4.14.117
"
,
"
@types/node
"
:
"
^10.12.0
"
,
"
@types/validator
"
:
"
^4.5.26
"
,
"
babel-plugin-transform-vue-jsx
"
:
"
^4.0.1
"
,
"
cz-conventional-changelog
"
:
"
^2.1.0
"
,
"
egg-bin
"
:
"
^4.9.0
"
,
"
egg-ts-helper
"
:
"
^1.13.0
"
,
"
less
"
:
"
^3.12.2
"
,
"
less-loader
"
:
"
^7.1.0
"
,
"
node-tool-utils
"
:
"
^1.1.1
"
,
"
ts-loader
"
:
"
^5.3.0
"
,
"
ts-node
"
:
"
^7.0.1
"
,
"
tslint
"
:
"
^5.9.1
"
,
"
tslint-eslint-rules
"
:
"
^5.4.0
"
,
"
tslint-loader
"
:
"
^3.5.3
"
,
"
typescript
"
:
"
^3.9.2
"
,
"
webpack-sentry-plugin
"
:
"
^1.16.0
"
},
"devDependencies"
:
{},
...
...
webpack.config.js
View file @
c73c5c89
...
...
@@ -67,8 +67,15 @@ module.exports = {
args
:
SentryConfig
}
},
{
define
:{
'
process.env
'
:
{
SENTRY_ENV
:
JSON
.
stringify
(
process
.
env
.
SENTRY_ENV
)
}
}
}
],
optimization
:
{
optimization
:
{
namedModules
:
true
,
namedChunks
:
true
,
runtimeChunk
:
{
...
...
@@ -83,13 +90,13 @@ module.exports = {
default
:
false
,
saSdk
:
{
name
:
"
chunk-sa-sdk
"
,
// split cherryUI into a single package
priority
:
2
2
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
priority
:
2
1
,
// the weight needs to be larger than libs and app or it will be packaged into libs or app
test
:
/
[\\/]
node_modules
[\\/]
sa-sdk-javascript
[\\/]
/
,
// in order to adapt to cnpm
enforce
:
true
},
cherryUI
:
{
name
:
'
chunk-cherryUI
'
,
// 分离组件库
priority
:
2
1
,
priority
:
2
2
,
chunks
:
'
all
'
,
test
:
/
[\\/]
node_modules
[\\/]
@qg
[\\/]
cherry-ui
[\\/]
/
,
enforce
:
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment