Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
1ebb5690
Unverified
提交
1ebb5690
authored
8月 03, 2021
作者:
王嘉豪
提交者:
GitHub
8月 03, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #480 from dataease/pr@dev@feat_panel-view-set-bar
feat:预览界面点击组件显示设置入口,点击空白也取消设置入口;去掉原有鼠标移入显示的样式
上级
b09bf1ca
79601808
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
104 行增加
和
5 行删除
+104
-5
ComponentWrapper.vue
.../components/canvas/components/Editor/ComponentWrapper.vue
+18
-2
EditBar.vue
frontend/src/components/canvas/components/Editor/EditBar.vue
+70
-0
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+14
-1
UserView.vue
frontend/src/components/canvas/custom-component/UserView.vue
+2
-2
没有找到文件。
frontend/src/components/canvas/components/Editor/ComponentWrapper.vue
浏览文件 @
1ebb5690
...
...
@@ -4,7 +4,9 @@
:class=
"
{'gap_class':canvasStyleData.panel.gap==='yes'}"
class="component"
@click="handleClick"
@mousedown="elementMouseDown"
>
<edit-bar
v-if=
"config === curComponent"
/>
<de-out-widget
v-if=
"config.type==='custom'"
:id=
"'component' + config.id"
...
...
@@ -33,8 +35,10 @@ import runAnimation from '@/components/canvas/utils/runAnimation'
import
{
mixins
}
from
'@/components/canvas/utils/events'
import
{
mapState
}
from
'vuex'
import
DeOutWidget
from
'@/components/dataease/DeOutWidget'
import
EditBar
from
'@/components/canvas/components/Editor/EditBar'
export
default
{
components
:
{
DeOutWidget
},
components
:
{
DeOutWidget
,
EditBar
},
mixins
:
[
mixins
],
props
:
{
config
:
{
...
...
@@ -60,7 +64,8 @@ export default {
},
computed
:
{
...
mapState
([
'canvasStyleData'
'canvasStyleData'
,
'curComponent'
])
},
mounted
()
{
...
...
@@ -94,6 +99,17 @@ export default {
Object
.
keys
(
events
).
forEach
(
event
=>
{
this
[
event
](
events
[
event
])
})
},
elementMouseDown
(
e
)
{
debugger
// private 设置当前组件数据及状态
this
.
$store
.
commit
(
'setClickComponentStatus'
,
true
)
if
(
this
.
config
.
component
!==
'v-text'
&&
this
.
config
.
component
!==
'rect-shape'
&&
this
.
config
.
component
!==
'de-input-search'
&&
this
.
config
.
component
!==
'de-number-range'
)
{
e
.
preventDefault
()
}
// 阻止冒泡事件
e
.
stopPropagation
()
this
.
$store
.
commit
(
'setCurComponent'
,
{
component
:
this
.
config
,
index
:
this
.
index
})
}
}
}
...
...
frontend/src/components/canvas/components/Editor/EditBar.vue
0 → 100644
浏览文件 @
1ebb5690
<
template
>
<div
class=
"bar-main"
>
<i
v-if=
"curComponent.type==='view'"
class=
"icon iconfont icon-fangda"
@
click
.
stop=
"showViewDetails"
/>
<i
v-if=
"activeModel==='edit'"
class=
"icon iconfont icon-shezhi"
@
click
.
stop=
"showViewDetails"
/>
</div>
</
template
>
<
script
>
import
{
mapState
}
from
'vuex'
import
eventBus
from
'@/components/canvas/utils/eventBus'
export
default
{
props
:
{
active
:
{
type
:
Boolean
,
required
:
false
,
default
:
false
},
// 当前模式 preview 预览 edit 编辑,
activeModel
:
{
type
:
String
,
required
:
false
,
default
:
'preview'
}
},
data
()
{
return
{
componentType
:
null
,
editFilter
:
[
'view'
,
'custom'
]
}
},
computed
:
mapState
([
'menuTop'
,
'menuLeft'
,
'menuShow'
,
'curComponent'
,
'componentData'
,
'canvasStyleData'
]),
methods
:
{
showViewDetails
()
{
eventBus
.
$emit
(
'showViewDetails'
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.bar-main
{
position
:
absolute
;
right
:
0px
;
float
:right
;
z-index
:
2
;
border-radius
:
2px
;
padding-left
:
5px
;
padding-right
:
2px
;
cursor
:pointer
!
important
;
background-color
:
#0a7be0
;
}
.bar-main
i
{
color
:
white
;
float
:
right
;
margin-right
:
3px
;
}
</
style
>
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
1ebb5690
<
template
>
<div
id=
"canvasInfoTemp"
:style=
"customStyle"
class=
"bg"
>
<div
id=
"canvasInfoTemp"
:style=
"customStyle"
class=
"bg"
@
mouseup=
"deselectCurComponent"
@
mousedown=
"handleMouseDown"
>
<el-row
v-if=
"componentDataShow.length===0"
style=
"height: 100%;"
class=
"custom-position"
>
{{
$t
(
'panel.panelNull'
)
}}
</el-row>
...
...
@@ -121,6 +121,8 @@ export default {
return
this
.
componentDataShow
},
...
mapState
([
'isClickComponent'
,
'curComponent'
,
'componentData'
,
'canvasStyleData'
])
...
...
@@ -204,6 +206,17 @@ export default {
},
exportExcel
()
{
this
.
$refs
[
'userViewDialog'
].
exportExcel
()
},
deselectCurComponent
(
e
)
{
debugger
if
(
!
this
.
isClickComponent
)
{
this
.
$store
.
commit
(
'setCurComponent'
,
{
component
:
null
,
index
:
null
})
}
},
handleMouseDown
()
{
// console.log('handleMouseDown123')
this
.
$store
.
commit
(
'setClickComponentStatus'
,
false
)
}
}
}
...
...
frontend/src/components/canvas/custom-component/UserView.vue
浏览文件 @
1ebb5690
...
...
@@ -8,7 +8,7 @@
'rect-shape'
]"
>
<
i
v-if=
"requestStatus==='success'"
style=
"right:25px;position: absolute;z-index: 2"
class=
"icon iconfont icon-fangda"
@
click
.
stop=
"openChartDetailsDialog"
/
>
<
!--
<i
v-if=
"requestStatus==='success'"
style=
"right:25px;position: absolute;z-index: 2"
class=
"icon iconfont icon-fangda"
@
click
.
stop=
"openChartDetailsDialog"
/>
--
>
<div
v-if=
"requestStatus==='error'"
class=
"chart-error-class"
>
<div
style=
"font-size: 12px; color: #9ea6b2;height: 100%;display: flex;align-items: center;justify-content: center;"
>
{{
message
}}
,
{{
$t
(
'chart.chart_show_error'
)
}}
...
...
@@ -128,7 +128,7 @@ export default {
this
.
getData
(
this
.
element
.
propValue
.
viewId
)
},
mounted
()
{
eventBus
.
$on
(
'showViewDetails'
,
this
.
openChartDetailsDialog
)
},
methods
:
{
mergeStyle
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论