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
b9bbfb22
Commit
b9bbfb22
authored
Sep 02, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(back-top): 添加tag
parent
cc6b34d4
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
36 additions
and
11 deletions
+36
-11
index.ts
app/web/page/editor/component/DynamicFormTabs/index.ts
+3
-0
index.vue
app/web/page/editor/component/DynamicFormTabs/index.vue
+3
-3
index.vue
app/web/page/editor/component/DynamicPageForm/index.vue
+1
-1
index.ts
app/web/page/editor/component/OperationPanel/index.ts
+5
-0
index.vue
app/web/page/editor/component/OperationPanel/index.vue
+4
-3
index.ts
app/web/page/editor/view/dashboard/index.ts
+6
-0
index.vue
app/web/page/editor/view/dashboard/index.vue
+1
-1
index.ts
app/web/page/store/modules/editor/index.ts
+10
-3
state.ts
app/web/page/store/modules/editor/state.ts
+2
-0
type.ts
app/web/page/store/modules/editor/type.ts
+1
-0
No files found.
app/web/page/editor/component/DynamicFormTabs/index.ts
View file @
b9bbfb22
import
{
Component
,
Vue
,
Prop
,
Watch
,
Emit
}
from
'
vue-property-decorator
'
;
import
{
Getter
}
from
'
vuex-class
'
;
import
DynamicForm
from
'
@editor/component/DynamicForm/index.vue
'
;
import
DynamicPageForm
from
'
@editor/component/DynamicPageForm/index.vue
'
;
// import EventBus from '@service/eventBus.service';
...
...
@@ -6,6 +7,8 @@ import DynamicPageForm from '@editor/component/DynamicPageForm/index.vue';
@
Component
({
components
:
{
DynamicPageForm
,
DynamicForm
},
name
:
'
RecordModal
'
})
export
default
class
DynamicFormTabs
extends
Vue
{
@
Getter
(
'
curRightTabName
'
)
curRightTabName
!
:
string
|
null
;
@
Emit
(
'
modProps
'
)
modProps
(
props
,
ele
,
type
)
{
// return props, ele, type;
...
...
app/web/page/editor/component/DynamicFormTabs/index.vue
View file @
b9bbfb22
<
template
>
<Tabs
class=
"dynamic-form-tabs"
>
<TabPane
label=
"组件设置"
>
<Tabs
class=
"dynamic-form-tabs"
:value=
"curRightTabName"
>
<TabPane
name=
"组件设置"
label=
"组件设置"
>
<dynamic-form
@
modProps=
"modProps"
@
resizedChildEvent=
"resizedChildEvent"
></dynamic-form>
</TabPane>
<!--
<TabPane
label=
"事件"
>
事件
</TabPane>
-->
<TabPane
label=
"页面设置"
>
<TabPane
name=
"页面设置"
label=
"页面设置"
>
<dynamic-page-form
@
modProps=
"modProps"
@
resizedChildEvent=
"resizedChildEvent"
></dynamic-page-form>
</TabPane>
</Tabs>
...
...
app/web/page/editor/component/DynamicPageForm/index.vue
View file @
b9bbfb22
...
...
@@ -2,7 +2,7 @@
<div
class=
"dynamic-form"
>
<h2>
{{
title
}}
</h2>
<Form
class=
"dynamic-form-component"
:label-width=
"80"
:model=
"propsForm"
@
submit
.
native
.
prevent
>
<h3>
基础属性
</h3>
<h3>
基础属性
</h3>
<h4>
标题栏
</h4>
<template
v-for=
"(item, index) in titleSchema"
>
<FormItem
class=
"Df-component-formitem"
:label=
"item.name"
:key=
"'titleSchema_' + index"
>
...
...
app/web/page/editor/component/OperationPanel/index.ts
View file @
b9bbfb22
...
...
@@ -69,6 +69,11 @@ export default class OperationPanel extends Mixins(TransformStyleMixin) {
//
}
@
Emit
(
'
handlePageSetClick
'
)
handlePageSetClick
()
{
//
}
@
Emit
(
'
show
'
)
show
(
event
,
containerIndex
,
childIndex
)
{
//
...
...
app/web/page/editor/component/OperationPanel/index.vue
View file @
b9bbfb22
<
template
>
<div
class=
"Dcm-container-panel_container"
>
<title-preview
/>
<title-preview
@
click.native.stop=
"handlePageSetClick"
/>
<div
:class=
"[
{'Dcm-container-panel_in': isDragIn, 'Dcm-container-panel_draging': isDraging}, 'Dcm-container-panel']" @dragover.prevent @dragenter="dragenter" @dragover="dragover"
@dragleave="dragleave" @drop="drops">
<grid-layout
...
...
@@ -40,12 +40,13 @@
:i=
"bottomInfo.i"
:static=
"true"
:key=
"bottomInfo.i + pageData.elements.length"
@
click.native.stop=
"handlePageSetClick"
>
<page-bottom-tip
/>
<page-bottom-tip
@
click.native.stop=
"handlePageSetClick"
/>
</grid-item>
</grid-layout>
</div>
<back-top-preview
/>
<back-top-preview
@
click.native.stop=
"handlePageSetClick"
/>
</div>
</
template
>
<
script
lang=
"ts"
src=
"./index.ts"
></
script
>
...
...
app/web/page/editor/view/dashboard/index.ts
View file @
b9bbfb22
...
...
@@ -27,6 +27,7 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
@
Mutation
(
'
SET_PAGE_DATA
'
)
setPageData
;
@
Mutation
(
'
UPDATE_PAGE_STYLE
'
)
setPageStyle
;
@
Mutation
(
'
UPDATE_PAGE_PROPS
'
)
setPageProps
;
@
Mutation
(
'
SET_CUR_RIGHT_TAB_NAME
'
)
setRightTabName
;
@
Action
(
'
resetPageData
'
)
resetPageData
;
@
Action
(
'
savePageData
'
)
savePageData
;
@
Action
(
'
getPageDate
'
)
getPageDate
;
...
...
@@ -115,6 +116,11 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
this
.
toggle
(
false
);
this
.
setCurEleIndex
(
curEleIndex
);
this
.
setCurChildIndex
(
curChildIndex
);
this
.
setRightTabName
(
'
组件设置
'
);
}
handlePageSetClick
()
{
this
.
toggle
(
false
);
this
.
setRightTabName
(
'
页面设置
'
);
}
getPageElements
(
ids
=
[])
{
return
ids
.
length
===
0
?
this
.
pageData
.
elements
:
ids
.
map
(
item
=>
{
...
...
app/web/page/editor/view/dashboard/index.vue
View file @
b9bbfb22
...
...
@@ -16,7 +16,7 @@
<Col
class=
"dashboard-container-middle"
span=
"17"
>
<Row
class=
"Dc-middle-row"
>
<Col
:span=
"isCollapsed ? 24 : 16"
class=
"Dc-middle-container"
@
click.native=
"toggle(true)"
>
<OperationPanel
:isDragIn.sync=
"isDragIn"
:isDraging=
"isDraging"
@
dragover=
"dragover"
@
drops=
"drops"
@
handleElementClick=
"handleElementClick"
@
show=
"show"
@
resizedEvent=
"resizedEvent"
@
movedEvent=
"movedEvent"
@
toggle=
"toggle"
/>
<OperationPanel
:isDragIn.sync=
"isDragIn"
:isDraging=
"isDraging"
@
dragover=
"dragover"
@
drops=
"drops"
@
handleElementClick=
"handleElementClick"
@
show=
"show"
@
resizedEvent=
"resizedEvent"
@
movedEvent=
"movedEvent"
@
toggle=
"toggle"
@
handlePageSetClick=
"handlePageSetClick"
/>
</Col>
<Col
span=
"8"
:class=
"[
{'Dcm-sider_none': isCollapsed}, 'Dc-middle-sider']">
<DynamicFormTabs
@
modProps=
"modProps"
@
resizedChildEvent=
"resizedChildEvent"
/>
...
...
app/web/page/store/modules/editor/index.ts
View file @
b9bbfb22
...
...
@@ -15,7 +15,8 @@ import {
SET_PAGE_DATA
,
UPDATE_COMMON_STYLE
,
UPDATE_PAGE_STYLE
,
UPDATE_PAGE_PROPS
UPDATE_PAGE_PROPS
,
SET_CUR_RIGHT_TAB_NAME
}
from
'
./type
'
;
import
RootState
from
'
../../state
'
;
...
...
@@ -36,6 +37,9 @@ export default class EditorModule implements Module<EditorState, RootState> {
},
pageInfo
(
state
:
EditorState
):
PageInfo
{
return
state
.
pageInfo
;
},
curRightTabName
(
state
:
EditorState
):
string
|
null
{
return
state
.
curRightTabName
;
}
};
...
...
@@ -111,8 +115,11 @@ export default class EditorModule implements Module<EditorState, RootState> {
[
SET_CUR_ELE_INDEX
](
state
,
curEleIndex
)
{
state
.
curEleIndex
=
curEleIndex
;
},
[
SET_CUR_CHILD_INDEX
](
state
,
curChildIndex
)
{
state
.
curChildIndex
=
curChildIndex
;
[
SET_CUR_ELE_INDEX
](
state
,
curEleIndex
)
{
state
.
curEleIndex
=
curEleIndex
;
},
[
SET_CUR_RIGHT_TAB_NAME
](
state
,
curRightTabName
)
{
state
.
curRightTabName
=
curRightTabName
;
},
[
SET_TEMPLATE_LIST
](
state
,
data
)
{
state
.
templateList
=
data
;
...
...
app/web/page/store/modules/editor/state.ts
View file @
b9bbfb22
...
...
@@ -60,6 +60,7 @@ export default interface EditorState {
pageInfo
:
PageInfo
;
curEleIndex
:
number
|
null
;
curChildIndex
:
number
|
null
;
curRightTabName
:
string
|
null
;
templateList
:
any
[];
gridLayout
:
GridLayout
;
}
...
...
@@ -67,6 +68,7 @@ export default interface EditorState {
export
const
defaultState
=
{
curEleIndex
:
null
,
curChildIndex
:
null
,
curRightTabName
:
null
,
pageInfo
:
{
id
:
0
,
pageName
:
''
,
...
...
app/web/page/store/modules/editor/type.ts
View file @
b9bbfb22
...
...
@@ -12,3 +12,4 @@ export const SET_PAGE_DATA = 'SET_PAGE_DATA';
export
const
UPDATE_COMMON_STYLE
=
'
UPDATE_COMMON_STYLE
'
;
export
const
UPDATE_PAGE_STYLE
=
'
UPDATE_PAGE_STYLE
'
;
export
const
UPDATE_PAGE_PROPS
=
'
UPDATE_PAGE_PROPS
'
;
export
const
SET_CUR_RIGHT_TAB_NAME
=
'
SET_CUR_RIGHT_TAB_NAME
'
;
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