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
1979007b
Commit
1979007b
authored
Jul 25, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Plain Diff
feat: merge master
parents
685ba6f7
5c79a357
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
172 additions
and
124 deletions
+172
-124
index.vue
app/web/component/layout/editor/single/index.vue
+124
-118
config.ts
app/web/lib/config.ts
+17
-5
index.ts
app/web/page/editor/component/DynamicForm/index.ts
+9
-0
index.ts
app/web/page/store/modules/editor/index.ts
+22
-1
No files found.
app/web/component/layout/editor/single/index.vue
View file @
1979007b
<
template
>
<div
id=
"app"
class=
"layout"
>
<div
id=
"app"
class=
"layout"
>
<Row
type=
"flex"
class=
"layout-container"
v-if=
"!isDashboard"
>
<i-col
:span=
"3"
class=
"layout-menu-left"
>
<Menu
:active-name=
"activeName"
theme=
"dark"
width=
"auto"
:open-names=
"['1']"
accordion
@
on-select=
"select"
>
<Menu
:active-name=
"activeName"
theme=
"dark"
width=
"auto"
:open-names=
"['1']"
accordion
@
on-select=
"select"
>
<div
class=
"layout-logo-left"
>
低代码平台
</div>
<Menu-item
v-if=
"tenant.workist"
name=
"list"
>
作品列表
</Menu-item>
<Menu-item
v-if=
"tenant.draftList"
name=
"my"
>
我的草稿
</Menu-item>
<Menu-item
v-if=
"tenant.tmplList"
name=
"template"
>
创意模板
</Menu-item>
<Menu-item
name=
"list"
>
作品列表
</Menu-item>
<Menu-item
name=
"my"
>
我的草稿
</Menu-item>
<Menu-item
name=
"template"
>
创意模板
</Menu-item>
<Menu-item
name=
"navigator"
>
导航配置
</Menu-item>
</Menu>
</i-col>
...
...
@@ -29,118 +36,117 @@
</div>
</
template
>
<
style
lang=
"less"
scoped
>
#app {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ivu-spin-fix {
z-index: 1000;
background-color: rgba(0, 0, 0, 0.8);
}
.layout {
border: 1px solid #d7dde4;
background: #f5f7f9;
position: relative;
border-radius: 4px;
overflow: auto;
height: 100%;
}
.layout-container {
height: 100%;
}
.layout-breadcrumb {
padding: 10px 15px 0;
}
.layout-content {
flex: 1;
overflow: auto;
background: #fff;
border-radius: 4px;
}
.layout-content-main {
padding: 10px;
}
.layout-copy {
height: 45px;
text-align: center;
padding: 10px 0 20px;
color: #9ea7b4;
}
.layout-menu-left {
background: #464c5b;
}
.layout-menu-right {
display: flex;
flex-direction: column;
}
.layout-header {
height: 45px;
line-height: 45px;
background: #fff;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.layout-ceiling-main {
float: right;
margin-right: 15px;
}
.layout-logo-left {
width: 90%;
height: 30px;
line-height: 30px;
color: #fff;
font-size: 18px;
text-align: center;
background: #5b6270;
border-radius: 3px;
margin: 15px auto;
}
.layout-ceiling-main a {
color: #9ba7b5;
}
.ivu-col {
transition: width 0.2s ease-in-out;
}
.router-fade-enter-active,
.router-fade-leave-active {
transition: opacity 0.3s;
}
.router-fade-enter,
.router-fade-leave-active {
opacity: 0;
}
.avator {
float: right;
width: 120px;
height: 45px;
line-height: 45px;
font-size: 14px;
}
body {
/deep/ .cr-popup {
z-index: 1111;
}
}
#app {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ivu-spin-fix {
z-index: 1000;
background-color: rgba(0, 0, 0, 0.8);
}
.layout {
border: 1px solid #d7dde4;
background: #f5f7f9;
position: relative;
border-radius: 4px;
overflow: auto;
height: 100%;
}
.layout-container {
height: 100%;
}
.layout-breadcrumb {
padding: 10px 15px 0;
}
.layout-content {
flex: 1;
overflow: auto;
background: #fff;
border-radius: 4px;
}
.layout-content-main {
padding: 10px;
}
.layout-copy {
height: 45px;
text-align: center;
padding: 10px 0 20px;
color: #9ea7b4;
}
.layout-menu-left {
background: #464c5b;
}
.layout-menu-right {
display: flex;
flex-direction: column;
}
.layout-header {
height: 45px;
line-height: 45px;
background: #fff;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.layout-ceiling-main {
float: right;
margin-right: 15px;
}
.layout-logo-left {
width: 90%;
height: 30px;
line-height: 30px;
color: #fff;
font-size: 18px;
text-align: center;
background: #5b6270;
border-radius: 3px;
margin: 15px auto;
}
.layout-ceiling-main a {
color: #9ba7b5;
}
.ivu-col {
transition: width 0.2s ease-in-out;
}
.router-fade-enter-active,
.router-fade-leave-active {
transition: opacity 0.3s;
}
.router-fade-enter,
.router-fade-leave-active {
opacity: 0;
}
.avator {
float: right;
width: 120px;
height: 45px;
line-height: 45px;
font-size: 14px;
}
body {
/deep/ .cr-popup {
z-index: 1111;
}
}
</
style
>
<
script
lang=
"ts"
src=
"./index.ts"
></
script
>
\ No newline at end of file
app/web/lib/config.ts
View file @
1979007b
...
...
@@ -11,13 +11,25 @@ export const basicComponents = [
key
:
'
link
'
,
name
:
'
跳转链接
'
,
desc
:
'
跳转链接
'
,
type
:
'
text
'
type
:
'
text
'
,
},
// {
// key: 'freedomVideo',
// name: '视频背景',
// desc: '视频背景',
// type: 'upload'
// },
{
key
:
'
freedomVideo
'
,
name
:
'
视频背景
'
,
desc
:
'
视频背景
'
,
type
:
'
upload
'
key
:
'
isFinance
'
,
name
:
'
是否导流
'
,
desc
:
'
是否导流
'
,
type
:
'
checkbox
'
,
},
{
key
:
'
needLogin
'
,
name
:
'
是否登录
'
,
desc
:
'
是否登录
'
,
type
:
'
checkbox
'
,
}
],
value
:
{
...
...
app/web/page/editor/component/DynamicForm/index.ts
View file @
1979007b
...
...
@@ -302,6 +302,15 @@ export default class DynamicForm extends Mixins(ContextMenuMixin, DynamicFormMix
if
(
element
.
name
!==
'
cs-guide-cube
'
)
{
this
.
adjustHeight
();
}
if
(
element
.
name
===
'
freedom-container
'
)
{
const
{
isFinance
}
=
newVal
;
if
(
isFinance
)
{
newVal
.
needLogin
=
true
;
newVal
.
disabledSelectNeedLogin
=
true
;
}
else
{
newVal
.
disabledSelectNeedLogin
=
false
;
}
}
});
this
.
$emit
(
'
modProps
'
,
params
,
'
component
'
);
}
...
...
app/web/page/store/modules/editor/index.ts
View file @
1979007b
...
...
@@ -92,7 +92,28 @@ export default class EditorModule implements Module<EditorState, RootState> {
const
res
=
await
api
.
getPageById
(
condition
);
const
{
page
}
=
res
as
PageInfo
;
const
{
pageInfo
}
=
cloneDeep
(
defaultState
);
commit
(
SET_PAGE_INFO
,
{
...
pageInfo
,
page
:
JSON
.
parse
(
page
as
string
)
});
const
pageObj
=
JSON
.
parse
(
page
as
string
);
commit
(
SET_PAGE_INFO
,
{
...
pageInfo
,
page
:
pageObj
});
const
goodsTabs
=
{};
(
pageObj
as
Page
).
elements
.
forEach
((
element
,
idx
)
=>
{
if
(
element
.
name
===
'
cs-goods-tabs
'
&&
element
?.
child
?.
length
)
{
goodsTabs
[
idx
]
=
cloneDeep
(
element
.
child
);
// 逆向循环
for
(
let
i
=
element
.
child
.
length
-
1
;
i
>=
0
;
i
--
)
{
commit
(
COPY_OR_DELETE_PAGE_INFO
,
{
type
:
'
delete
'
,
containerIndex
:
idx
,
childIndex
:
i
});
// this.updatePageData({ type: 'delete', containerIndex: idx, childIndex: i });
}
}
});
let
tempIndex
=
0
;
Object
.
keys
(
goodsTabs
).
forEach
(
key
=>
{
goodsTabs
[
key
].
forEach
((
child
,
index
)
=>
{
commit
(
UPDATE_PAGE_INFO
,
{
containerIndex
:
+
key
+
1
+
index
+
tempIndex
,
data
:
child
,
type
:
'
add
'
});
// console.log('parseGoodsTabs', { containerIndex: +key + 1 + index, data: child });
// this.updatePageInfo({ containerIndex: +key + 1 + index, data: child });
});
tempIndex
++
;
});
},
setDragable
({
commit
},
condition
)
{
commit
(
SET_DRAGABLE
,
condition
);
...
...
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