Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
6f7a8c56
提交
6f7a8c56
authored
1月 26, 2022
作者:
wangjiahao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 组件在矩阵模式下增加最小宽高的限制
上级
2307af50
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
100 行增加
和
25 行删除
+100
-25
index.vue
frontend/src/components/DeDrag/index.vue
+18
-2
EditBar.vue
frontend/src/components/canvas/components/Editor/EditBar.vue
+12
-0
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+2
-1
component-list.js
.../src/components/canvas/custom-component/component-list.js
+32
-10
ButtonSureServiceImpl.js
...rc/components/widget/serviceImpl/ButtonSureServiceImpl.js
+3
-1
NumberRangeServiceImpl.js
...c/components/widget/serviceImpl/NumberRangeServiceImpl.js
+3
-1
NumberSelectGridServiceImpl.js
...ponents/widget/serviceImpl/NumberSelectGridServiceImpl.js
+3
-1
NumberSelectServiceImpl.js
.../components/widget/serviceImpl/NumberSelectServiceImpl.js
+3
-1
TextInputServiceImpl.js
...src/components/widget/serviceImpl/TextInputServiceImpl.js
+3
-1
TextSelectGridServiceImpl.js
...omponents/widget/serviceImpl/TextSelectGridServiceImpl.js
+3
-1
TextSelectServiceImpl.js
...rc/components/widget/serviceImpl/TextSelectServiceImpl.js
+3
-1
TimeDateRangeServiceImpl.js
...components/widget/serviceImpl/TimeDateRangeServiceImpl.js
+3
-1
TimeDateServiceImpl.js
.../src/components/widget/serviceImpl/TimeDateServiceImpl.js
+3
-1
TimeMonthServiceImpl.js
...src/components/widget/serviceImpl/TimeMonthServiceImpl.js
+3
-1
TimeQuarterServiceImpl.js
...c/components/widget/serviceImpl/TimeQuarterServiceImpl.js
+3
-1
TimeYearServiceImpl.js
.../src/components/widget/serviceImpl/TimeYearServiceImpl.js
+3
-1
没有找到文件。
frontend/src/components/DeDrag/index.vue
浏览文件 @
6f7a8c56
...
@@ -539,6 +539,20 @@ export default {
...
@@ -539,6 +539,20 @@ export default {
curGap
()
{
curGap
()
{
return
(
this
.
canvasStyleData
.
panel
.
gap
===
'yes'
&&
this
.
element
.
auxiliaryMatrix
)
?
this
.
componentGap
:
0
return
(
this
.
canvasStyleData
.
panel
.
gap
===
'yes'
&&
this
.
element
.
auxiliaryMatrix
)
?
this
.
componentGap
:
0
},
},
miniWidth
()
{
return
this
.
element
.
auxiliaryMatrix
?
this
.
curCanvasScale
.
matrixStyleWidth
*
(
this
.
element
.
miniSizex
||
1
)
:
0
},
miniHeight
()
{
if
(
this
.
element
.
auxiliaryMatrix
)
{
if
(
this
.
element
.
component
===
'de-number-range'
)
{
return
this
.
element
.
auxiliaryMatrix
?
this
.
curCanvasScale
.
matrixStyleHeight
*
(
this
.
element
.
miniSizey
||
2
)
:
0
}
else
{
return
this
.
element
.
auxiliaryMatrix
?
this
.
curCanvasScale
.
matrixStyleHeight
*
(
this
.
element
.
miniSizey
||
1
)
:
0
}
}
else
{
return
0
}
},
...
mapState
([
...
mapState
([
'editor'
,
'editor'
,
'curCanvasScale'
,
'curCanvasScale'
,
...
@@ -1190,8 +1204,10 @@ export default {
...
@@ -1190,8 +1204,10 @@ export default {
newH
=
restrictToBounds
(
newH
,
0
,
this
.
parentHeight
)
newH
=
restrictToBounds
(
newH
,
0
,
this
.
parentHeight
)
}
}
// 外部传参限制大小
// 外部传参限制大小
newW
=
restrictToBounds
(
newW
,
this
.
minW
||
0
,
this
.
maxW
)
// newW = restrictToBounds(newW, this.minW || 0, this.maxW)
newH
=
restrictToBounds
(
newH
,
this
.
minH
||
0
,
this
.
maxH
)
// newH = restrictToBounds(newH, this.minH || 0, this.maxH)
newW
=
restrictToBounds
(
newW
,
this
.
miniWidth
||
0
,
this
.
maxW
)
newH
=
restrictToBounds
(
newH
,
this
.
miniHeight
||
0
,
this
.
maxH
)
// 纵横比
// 纵横比
if
(
this
.
lockAspectRatio
)
{
if
(
this
.
lockAspectRatio
)
{
// console.log(this.lockAspectRatio, this.aspectFactor)
// console.log(this.lockAspectRatio, this.aspectFactor)
...
...
frontend/src/components/canvas/components/Editor/EditBar.vue
浏览文件 @
6f7a8c56
...
@@ -102,6 +102,16 @@ export default {
...
@@ -102,6 +102,16 @@ export default {
linkageInfo
()
{
linkageInfo
()
{
return
this
.
targetLinkageInfo
[
this
.
element
.
propValue
.
viewId
]
return
this
.
targetLinkageInfo
[
this
.
element
.
propValue
.
viewId
]
},
},
miniHeight
()
{
let
miniHeight
=
this
.
curComponent
.
miniSizey
||
1
if
(
this
.
element
.
component
===
'de-number-range'
)
{
miniHeight
=
this
.
curComponent
.
miniSizey
||
2
}
return
miniHeight
},
miniWidth
()
{
return
this
.
curComponent
.
miniSizex
||
1
},
...
mapState
([
...
mapState
([
'menuTop'
,
'menuTop'
,
'menuLeft'
,
'menuLeft'
,
...
@@ -146,6 +156,8 @@ export default {
...
@@ -146,6 +156,8 @@ export default {
this
.
curComponent
.
y
=
Math
.
round
(
this
.
curComponent
.
style
.
top
/
this
.
curCanvasScale
.
matrixStyleOriginHeight
)
+
1
this
.
curComponent
.
y
=
Math
.
round
(
this
.
curComponent
.
style
.
top
/
this
.
curCanvasScale
.
matrixStyleOriginHeight
)
+
1
this
.
curComponent
.
sizex
=
Math
.
round
(
this
.
curComponent
.
style
.
width
/
this
.
curCanvasScale
.
matrixStyleOriginWidth
)
this
.
curComponent
.
sizex
=
Math
.
round
(
this
.
curComponent
.
style
.
width
/
this
.
curCanvasScale
.
matrixStyleOriginWidth
)
this
.
curComponent
.
sizey
=
Math
.
round
(
this
.
curComponent
.
style
.
height
/
this
.
curCanvasScale
.
matrixStyleOriginHeight
)
this
.
curComponent
.
sizey
=
Math
.
round
(
this
.
curComponent
.
style
.
height
/
this
.
curCanvasScale
.
matrixStyleOriginHeight
)
this
.
curComponent
.
sizey
=
this
.
curComponent
.
sizey
>
this
.
miniHeight
?
this
.
curComponent
.
sizey
:
this
.
miniHeight
this
.
curComponent
.
sizex
=
this
.
curComponent
.
sizex
>
this
.
miniWidth
?
this
.
curComponent
.
sizex
:
this
.
miniWidth
this
.
curComponent
.
auxiliaryMatrix
=
true
this
.
curComponent
.
auxiliaryMatrix
=
true
this
.
$emit
(
'amAddItem'
)
this
.
$emit
(
'amAddItem'
)
}
}
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
6f7a8c56
...
@@ -939,7 +939,8 @@ export default {
...
@@ -939,7 +939,8 @@ export default {
'curLinkageView'
,
'curLinkageView'
,
'doSnapshotIndex'
,
'doSnapshotIndex'
,
'componentGap'
,
'componentGap'
,
'mobileLayoutStatus'
'mobileLayoutStatus'
,
'curCanvasScale'
])
])
},
},
watch
:
{
watch
:
{
...
...
frontend/src/components/canvas/custom-component/component-list.js
浏览文件 @
6f7a8c56
...
@@ -11,6 +11,8 @@ export const BASE_MOBILE_STYLE = {
...
@@ -11,6 +11,8 @@ export const BASE_MOBILE_STYLE = {
y
:
1
,
y
:
1
,
sizex
:
6
,
sizex
:
6
,
sizey
:
4
,
sizey
:
4
,
miniSizex
:
1
,
miniSizey
:
1
,
auxiliaryMatrix
:
true
auxiliaryMatrix
:
true
}
}
...
@@ -158,7 +160,9 @@ const list = [
...
@@ -158,7 +160,9 @@ const list = [
x
:
1
,
x
:
1
,
y
:
1
,
y
:
1
,
sizex
:
10
,
sizex
:
10
,
sizey
:
2
sizey
:
2
,
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'10002'
,
id
:
'10002'
,
...
@@ -181,7 +185,9 @@ const list = [
...
@@ -181,7 +185,9 @@ const list = [
textAlign
:
''
,
textAlign
:
''
,
color
:
''
,
color
:
''
,
backgroundColor
:
''
backgroundColor
:
''
}
},
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'10003'
,
id
:
'10003'
,
...
@@ -199,7 +205,9 @@ const list = [
...
@@ -199,7 +205,9 @@ const list = [
x
:
1
,
x
:
1
,
y
:
1
,
y
:
1
,
sizex
:
10
,
sizex
:
10
,
sizey
:
6
sizey
:
6
,
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'10003-1'
,
id
:
'10003-1'
,
...
@@ -215,7 +223,9 @@ const list = [
...
@@ -215,7 +223,9 @@ const list = [
width
:
600
,
width
:
600
,
height
:
300
,
height
:
300
,
borderRadius
:
''
borderRadius
:
''
}
},
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'10004'
,
id
:
'10004'
,
...
@@ -237,7 +247,9 @@ const list = [
...
@@ -237,7 +247,9 @@ const list = [
x
:
1
,
x
:
1
,
y
:
1
,
y
:
1
,
sizex
:
10
,
sizex
:
10
,
sizey
:
6
sizey
:
6
,
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'10005'
,
id
:
'10005'
,
...
@@ -256,7 +268,9 @@ const list = [
...
@@ -256,7 +268,9 @@ const list = [
y
:
36
,
y
:
36
,
sizex
:
10
,
sizex
:
10
,
sizey
:
6
,
sizey
:
6
,
auxiliaryMatrix
:
true
auxiliaryMatrix
:
true
,
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'10006'
,
id
:
'10006'
,
...
@@ -285,7 +299,9 @@ const list = [
...
@@ -285,7 +299,9 @@ const list = [
x
:
1
,
x
:
1
,
y
:
1
,
y
:
1
,
sizex
:
10
,
sizex
:
10
,
sizey
:
10
sizey
:
10
,
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'30001'
,
id
:
'30001'
,
...
@@ -322,7 +338,9 @@ const list = [
...
@@ -322,7 +338,9 @@ const list = [
x
:
1
,
x
:
1
,
y
:
1
,
y
:
1
,
sizex
:
10
,
sizex
:
10
,
sizey
:
2
sizey
:
2
,
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'20001'
,
id
:
'20001'
,
...
@@ -341,7 +359,9 @@ const list = [
...
@@ -341,7 +359,9 @@ const list = [
x
:
1
,
x
:
1
,
y
:
1
,
y
:
1
,
sizex
:
10
,
sizex
:
10
,
sizey
:
5
sizey
:
5
,
miniSizex
:
1
,
miniSizey
:
1
},
},
{
{
id
:
'20002'
,
id
:
'20002'
,
...
@@ -360,7 +380,9 @@ const list = [
...
@@ -360,7 +380,9 @@ const list = [
x
:
1
,
x
:
1
,
y
:
1
,
y
:
1
,
sizex
:
10
,
sizex
:
10
,
sizey
:
5
sizey
:
5
,
miniSizex
:
1
,
miniSizey
:
1
}
}
]
]
...
...
frontend/src/components/widget/serviceImpl/ButtonSureServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -25,7 +25,9 @@ const drawPanel = {
...
@@ -25,7 +25,9 @@ const drawPanel = {
},
},
value
:
'测试按钮'
value
:
'测试按钮'
},
},
component
:
'de-button'
component
:
'de-button'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
class
ButtonSureServiceImpl
extends
WidgetService
{
class
ButtonSureServiceImpl
extends
WidgetService
{
...
...
frontend/src/components/widget/serviceImpl/NumberRangeServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -34,7 +34,9 @@ const drawPanel = {
...
@@ -34,7 +34,9 @@ const drawPanel = {
textAlign
:
''
,
textAlign
:
''
,
color
:
''
color
:
''
},
},
component
:
'de-number-range'
component
:
'de-number-range'
,
miniSizex
:
1
,
miniSizey
:
2
}
}
class
NumberRangeServiceImpl
extends
WidgetService
{
class
NumberRangeServiceImpl
extends
WidgetService
{
...
...
frontend/src/components/widget/serviceImpl/NumberSelectGridServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -24,7 +24,9 @@ const dialogPanel = {
...
@@ -24,7 +24,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'tree-filter'
,
defaultClass
:
'tree-filter'
,
component
:
'de-select-grid'
component
:
'de-select-grid'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
frontend/src/components/widget/serviceImpl/NumberSelectServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -24,7 +24,9 @@ const dialogPanel = {
...
@@ -24,7 +24,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'tree-filter'
,
defaultClass
:
'tree-filter'
,
component
:
'de-select'
component
:
'de-select'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
frontend/src/components/widget/serviceImpl/TextInputServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -19,7 +19,9 @@ const dialogPanel = {
...
@@ -19,7 +19,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'text-filter'
,
defaultClass
:
'text-filter'
,
component
:
'de-input-search'
component
:
'de-input-search'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
frontend/src/components/widget/serviceImpl/TextSelectGridServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -24,7 +24,9 @@ const dialogPanel = {
...
@@ -24,7 +24,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'text-filter'
,
defaultClass
:
'text-filter'
,
component
:
'de-select-grid'
component
:
'de-select-grid'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
frontend/src/components/widget/serviceImpl/TextSelectServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -24,7 +24,9 @@ const dialogPanel = {
...
@@ -24,7 +24,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'text-filter'
,
defaultClass
:
'text-filter'
,
component
:
'de-select'
component
:
'de-select'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -33,7 +33,9 @@ const dialogPanel = {
...
@@ -33,7 +33,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'time-filter'
,
defaultClass
:
'time-filter'
,
component
:
'de-date'
component
:
'de-date'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
frontend/src/components/widget/serviceImpl/TimeDateServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -44,7 +44,9 @@ const dialogPanel = {
...
@@ -44,7 +44,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'time-filter'
,
defaultClass
:
'time-filter'
,
component
:
'de-date'
component
:
'de-date'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
frontend/src/components/widget/serviceImpl/TimeMonthServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -39,7 +39,9 @@ const dialogPanel = {
...
@@ -39,7 +39,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'time-filter'
,
defaultClass
:
'time-filter'
,
component
:
'de-date'
component
:
'de-date'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
frontend/src/components/widget/serviceImpl/TimeQuarterServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -28,7 +28,9 @@ const drawPanel = {
...
@@ -28,7 +28,9 @@ const drawPanel = {
textAlign
:
''
,
textAlign
:
''
,
color
:
''
color
:
''
},
},
component
:
'de-quarter'
component
:
'de-quarter'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
class
TimeQuarterServiceImpl
extends
WidgetService
{
class
TimeQuarterServiceImpl
extends
WidgetService
{
...
...
frontend/src/components/widget/serviceImpl/TimeYearServiceImpl.js
浏览文件 @
6f7a8c56
...
@@ -38,7 +38,9 @@ const dialogPanel = {
...
@@ -38,7 +38,9 @@ const dialogPanel = {
manualModify
:
false
manualModify
:
false
},
},
defaultClass
:
'time-filter'
,
defaultClass
:
'time-filter'
,
component
:
'de-date'
component
:
'de-date'
,
miniSizex
:
1
,
miniSizey
:
1
}
}
const
drawPanel
=
{
const
drawPanel
=
{
type
:
'custom'
,
type
:
'custom'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论