Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
b191c845
提交
b191c845
authored
12月 21, 2021
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 移动端布局适配
上级
73391ba2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
67 行增加
和
10 行删除
+67
-10
enshrine.js
frontend/src/api/panel/enshrine.js
+6
-6
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+1
-0
PreviewEject.vue
.../src/components/canvas/components/Editor/PreviewEject.vue
+2
-2
index.vue
frontend/src/views/panel/edit/index.vue
+58
-2
没有找到文件。
frontend/src/api/panel/enshrine.js
浏览文件 @
b191c845
import
request
from
'@/utils/request'
import
request
from
'@/utils/request'
export
function
saveEnshrine
(
panelGroupId
)
{
export
function
saveEnshrine
(
panelGroupId
,
loading
=
true
)
{
return
request
({
return
request
({
url
:
'/api/store/'
+
panelGroupId
,
url
:
'/api/store/'
+
panelGroupId
,
method
:
'post'
,
method
:
'post'
,
loading
:
true
loading
:
loading
})
})
}
}
export
function
deleteEnshrine
(
id
)
{
export
function
deleteEnshrine
(
id
,
loading
=
true
)
{
return
request
({
return
request
({
url
:
'/api/store/remove/'
+
id
,
url
:
'/api/store/remove/'
+
id
,
method
:
'post'
,
method
:
'post'
,
loading
:
true
loading
:
loading
})
})
}
}
export
function
enshrineList
(
data
)
{
export
function
enshrineList
(
data
,
loading
=
true
)
{
return
request
({
return
request
({
url
:
'/api/store/list'
,
url
:
'/api/store/list'
,
method
:
'post'
,
method
:
'post'
,
loading
:
true
,
loading
:
loading
,
data
data
})
})
}
}
...
...
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
b191c845
...
@@ -207,6 +207,7 @@ export default {
...
@@ -207,6 +207,7 @@ export default {
console
.
log
(
'navigator.userAgent:'
+
navigator
.
userAgent
)
console
.
log
(
'navigator.userAgent:'
+
navigator
.
userAgent
)
const
flag
=
navigator
.
userAgent
.
match
(
/
(
phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone
)
/i
)
const
flag
=
navigator
.
userAgent
.
match
(
/
(
phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone
)
/i
)
this
.
terminal
=
flag
?
'mobile'
:
'pc'
this
.
terminal
=
flag
?
'mobile'
:
'pc'
// this.terminal = 'mobile'
},
},
canvasStyleDataInit
()
{
canvasStyleDataInit
()
{
// 数据刷新计时器
// 数据刷新计时器
...
...
frontend/src/components/canvas/components/Editor/PreviewEject.vue
浏览文件 @
b191c845
...
@@ -80,8 +80,8 @@ export default {
...
@@ -80,8 +80,8 @@ export default {
.bg
{
.bg
{
width
:
100%
;
width
:
100%
;
height
:
100vh
!
important
;
height
:
100vh
!
important
;
min-width
:
8
00px
;
min-width
:
2
00px
;
min-height
:
6
00px
;
min-height
:
3
00px
;
background-color
:
#f7f8fa
;
background-color
:
#f7f8fa
;
}
}
</
style
>
</
style
>
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
b191c845
...
@@ -122,12 +122,24 @@
...
@@ -122,12 +122,24 @@
@
scroll=
"canvasScroll"
@
scroll=
"canvasScroll"
>
>
<el-row
class=
"this_mobile_canvas_top"
/>
<el-row
class=
"this_mobile_canvas_top"
/>
<el-row
class=
"this_mobile_canvas_inner_top"
>
{{
panelInfo
.
name
}}
</el-row>
<el-row
<el-row
id=
"canvasInfoMobile"
id=
"canvasInfoMobile"
class=
"this_mobile_canvas_main"
class=
"this_mobile_canvas_main"
:style=
"mobileCanvasStyle"
:style=
"mobileCanvasStyle"
>
>
<Editor
ref=
"editorMobile"
:matrix-count=
"mobileMatrixCount"
:out-style=
"outStyle"
:scroll-top=
"scrollTop"
/>
<Editor
v-if=
"mobileEditorShow"
ref=
"editorMobile"
:matrix-count=
"mobileMatrixCount"
:out-style=
"outStyle"
:scroll-top=
"scrollTop"
/>
</el-row>
<el-row
class=
"this_mobile_canvas_inner_bottom"
>
<el-col
:span=
"12"
>
<i
v-if=
"!hasStar"
class=
"el-icon-star-off"
size=
"mini"
@
click=
"star"
/>
<i
v-if=
"hasStar"
class=
"el-icon-star-on"
style=
"color: #0a7be0;font-size: 18px"
size=
"mini"
@
click=
"unstar"
/>
</el-col>
<el-col
:span=
"12"
style=
"float: right"
>
<i
class=
"el-icon-refresh-right"
size=
"mini"
@
click=
"mobileRefresh"
/>
</el-col>
</el-row>
</el-row>
<el-row
class=
"this_mobile_canvas_bottom"
/>
<el-row
class=
"this_mobile_canvas_bottom"
/>
</div>
</div>
...
@@ -233,6 +245,7 @@ import generateID from '@/components/canvas/utils/generateID'
...
@@ -233,6 +245,7 @@ import generateID from '@/components/canvas/utils/generateID'
import
TextAttr
from
'@/components/canvas/components/TextAttr'
import
TextAttr
from
'@/components/canvas/components/TextAttr'
import
{
queryPanelJumpInfo
}
from
'@/api/panel/linkJump'
import
{
queryPanelJumpInfo
}
from
'@/api/panel/linkJump'
import
ComponentWait
from
'@/views/panel/edit/ComponentWait'
import
ComponentWait
from
'@/views/panel/edit/ComponentWait'
import
{
deleteEnshrine
,
saveEnshrine
,
starStatus
}
from
'@/api/panel/enshrine'
export
default
{
export
default
{
name
:
'PanelEdit'
,
name
:
'PanelEdit'
,
...
@@ -256,6 +269,8 @@ export default {
...
@@ -256,6 +269,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
mobileEditorShow
:
true
,
hasStar
:
false
,
drawerSize
:
'300px'
,
drawerSize
:
'300px'
,
visible
:
false
,
visible
:
false
,
show
:
false
,
show
:
false
,
...
@@ -453,6 +468,7 @@ export default {
...
@@ -453,6 +468,7 @@ export default {
},
},
methods
:
{
methods
:
{
init
(
panelId
)
{
init
(
panelId
)
{
this
.
initHasStar
()
// 如果临时画布有数据 则使用临时画布数据(视图编辑的时候 会保存临时画布数据)
// 如果临时画布有数据 则使用临时画布数据(视图编辑的时候 会保存临时画布数据)
const
componentDataTemp
=
this
.
$store
.
state
.
panel
.
componentDataTemp
const
componentDataTemp
=
this
.
$store
.
state
.
panel
.
componentDataTemp
const
canvasStyleDataTemp
=
this
.
$store
.
state
.
panel
.
canvasStyleDataTemp
const
canvasStyleDataTemp
=
this
.
$store
.
state
.
panel
.
canvasStyleDataTemp
...
@@ -512,6 +528,27 @@ export default {
...
@@ -512,6 +528,27 @@ export default {
})
})
}
}
},
},
star
()
{
this
.
panelInfo
&&
saveEnshrine
(
this
.
panelInfo
.
id
,
false
).
then
(
res
=>
{
this
.
hasStar
=
true
})
},
unstar
()
{
this
.
panelInfo
&&
deleteEnshrine
(
this
.
panelInfo
.
id
,
false
).
then
(
res
=>
{
this
.
hasStar
=
false
})
},
initHasStar
()
{
starStatus
(
this
.
panelInfo
.
id
,
false
).
then
(
res
=>
{
this
.
hasStar
=
res
.
data
})
},
mobileRefresh
()
{
this
.
mobileEditorShow
=
false
this
.
$nextTick
(()
=>
{
this
.
mobileEditorShow
=
true
})
},
save
()
{
save
()
{
},
},
...
@@ -964,11 +1001,30 @@ export default {
...
@@ -964,11 +1001,30 @@ export default {
background-size
:
100%
100%
!
important
;
background-size
:
100%
100%
!
important
;
}
}
.this_mobile_canvas_inner_top
{
vertical-align
:
middle
;
text-align
:
center
;
background-color
:
#f7f8fa
;
height
:
30px
;
line-height
:
30px
;
font-size
:
14px
;
width
:
100%
;
}
.this_mobile_canvas_top
{
.this_mobile_canvas_top
{
height
:
30px
;
height
:
30px
;
width
:
100%
;
width
:
100%
;
}
}
.this_mobile_canvas_inner_bottom
{
background-color
:
#f7f8fa
;
line-height
:
30px
;
vertical-align
:
middle
;
color
:
gray
;
height
:
30px
;
width
:
100%
;
}
.this_mobile_canvas_bottom
{
.this_mobile_canvas_bottom
{
height
:
30px
;
height
:
30px
;
width
:
100%
;
width
:
100%
;
...
@@ -977,7 +1033,7 @@ export default {
...
@@ -977,7 +1033,7 @@ export default {
.this_mobile_canvas_main
{
.this_mobile_canvas_main
{
overflow-x
:
hidden
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
overflow-y
:
auto
;
height
:
calc
(
100%
-
6
0px
);;
height
:
calc
(
100%
-
12
0px
);;
background-color
:
#d7d9e3
;
background-color
:
#d7d9e3
;
background-size
:
100%
100%
!
important
;
background-size
:
100%
100%
!
important
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论