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
5c79a357
Commit
5c79a357
authored
Jul 25, 2022
by
徐光星
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat/templateError' into 'master'
Feat/template error See merge request
!85
parents
5f73dabc
520383a5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
146 additions
and
119 deletions
+146
-119
index.vue
app/web/component/layout/editor/single/index.vue
+124
-118
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 @
5c79a357
<
template
>
<
template
>
<div
id=
"app"
class=
"layout"
>
<div
id=
"app"
class=
"layout"
>
<Row
type=
"flex"
class=
"layout-container"
v-if=
"!isDashboard"
>
<Row
type=
"flex"
class=
"layout-container"
v-if=
"!isDashboard"
>
<i-col
:span=
"3"
class=
"layout-menu-left"
>
<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>
<div
class=
"layout-logo-left"
>
低代码平台
</div>
<Menu-item
v-if=
"tenant.workist"
name=
"list"
>
作品列表
</Menu-item>
<Menu-item
name=
"list"
>
作品列表
</Menu-item>
<Menu-item
v-if=
"tenant.draftList"
name=
"my"
>
我的草稿
</Menu-item>
<Menu-item
name=
"my"
>
我的草稿
</Menu-item>
<Menu-item
v-if=
"tenant.tmplList"
name=
"template"
>
创意模板
</Menu-item>
<Menu-item
name=
"template"
>
创意模板
</Menu-item>
<Menu-item
name=
"navigator"
>
导航配置
</Menu-item>
<Menu-item
name=
"navigator"
>
导航配置
</Menu-item>
</Menu>
</Menu>
</i-col>
</i-col>
...
@@ -29,76 +36,76 @@
...
@@ -29,76 +36,76 @@
</div>
</div>
</
template
>
</
template
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
#app {
#app {
position: absolute;
position: absolute;
top: 0;
top: 0;
left: 0;
left: 0;
width: 100%;
width: 100%;
height: 100%;
height: 100%;
}
}
.ivu-spin-fix {
.ivu-spin-fix {
z-index: 1000;
z-index: 1000;
background-color: rgba(0, 0, 0, 0.8);
background-color: rgba(0, 0, 0, 0.8);
}
}
.layout {
.layout {
border: 1px solid #d7dde4;
border: 1px solid #d7dde4;
background: #f5f7f9;
background: #f5f7f9;
position: relative;
position: relative;
border-radius: 4px;
border-radius: 4px;
overflow: auto;
overflow: auto;
height: 100%;
height: 100%;
}
}
.layout-container {
.layout-container {
height: 100%;
height: 100%;
}
}
.layout-breadcrumb {
.layout-breadcrumb {
padding: 10px 15px 0;
padding: 10px 15px 0;
}
}
.layout-content {
.layout-content {
flex: 1;
flex: 1;
overflow: auto;
overflow: auto;
background: #fff;
background: #fff;
border-radius: 4px;
border-radius: 4px;
}
}
.layout-content-main {
.layout-content-main {
padding: 10px;
padding: 10px;
}
}
.layout-copy {
.layout-copy {
height: 45px;
height: 45px;
text-align: center;
text-align: center;
padding: 10px 0 20px;
padding: 10px 0 20px;
color: #9ea7b4;
color: #9ea7b4;
}
}
.layout-menu-left {
.layout-menu-left {
background: #464c5b;
background: #464c5b;
}
}
.layout-menu-right {
.layout-menu-right {
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
}
}
.layout-header {
.layout-header {
height: 45px;
height: 45px;
line-height: 45px;
line-height: 45px;
background: #fff;
background: #fff;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
}
.layout-ceiling-main {
.layout-ceiling-main {
float: right;
float: right;
margin-right: 15px;
margin-right: 15px;
}
}
.layout-logo-left {
.layout-logo-left {
width: 90%;
width: 90%;
height: 30px;
height: 30px;
line-height: 30px;
line-height: 30px;
...
@@ -108,39 +115,38 @@
...
@@ -108,39 +115,38 @@
background: #5b6270;
background: #5b6270;
border-radius: 3px;
border-radius: 3px;
margin: 15px auto;
margin: 15px auto;
}
}
.layout-ceiling-main a {
.layout-ceiling-main a {
color: #9ba7b5;
color: #9ba7b5;
}
}
.ivu-col {
.ivu-col {
transition: width 0.2s ease-in-out;
transition: width 0.2s ease-in-out;
}
}
.router-fade-enter-active,
.router-fade-enter-active,
.router-fade-leave-active {
.router-fade-leave-active {
transition: opacity 0.3s;
transition: opacity 0.3s;
}
}
.router-fade-enter,
.router-fade-enter,
.router-fade-leave-active {
.router-fade-leave-active {
opacity: 0;
opacity: 0;
}
}
.avator {
.avator {
float: right;
float: right;
width: 120px;
width: 120px;
height: 45px;
height: 45px;
line-height: 45px;
line-height: 45px;
font-size: 14px;
font-size: 14px;
}
}
body {
body {
/deep/ .cr-popup {
/deep/ .cr-popup {
z-index: 1111;
z-index: 1111;
}
}
}
}
</
style
>
</
style
>
<
script
lang=
"ts"
src=
"./index.ts"
></
script
>
<
script
lang=
"ts"
src=
"./index.ts"
></
script
>
\ No newline at end of file
app/web/page/store/modules/editor/index.ts
View file @
5c79a357
...
@@ -92,7 +92,28 @@ export default class EditorModule implements Module<EditorState, RootState> {
...
@@ -92,7 +92,28 @@ export default class EditorModule implements Module<EditorState, RootState> {
const
res
=
await
api
.
getPageById
(
condition
);
const
res
=
await
api
.
getPageById
(
condition
);
const
{
page
}
=
res
as
PageInfo
;
const
{
page
}
=
res
as
PageInfo
;
const
{
pageInfo
}
=
cloneDeep
(
defaultState
);
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
)
{
setDragable
({
commit
},
condition
)
{
commit
(
SET_DRAGABLE
,
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