Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
df841373
提交
df841373
authored
5月 20, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复画布中组件加载多次
上级
39a282dd
隐藏空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
46 行增加
和
16 行删除
+46
-16
ContextMenu.vue
...d/src/components/canvas/components/Editor/ContextMenu.vue
+1
-0
Preview.vue
frontend/src/components/canvas/components/Editor/Preview.vue
+5
-1
PreviewEject.vue
.../src/components/canvas/components/Editor/PreviewEject.vue
+1
-1
index.vue
frontend/src/components/canvas/components/Editor/index.vue
+4
-2
index.vue
frontend/src/components/canvas/index.vue
+2
-2
DeSelect.vue
frontend/src/components/widget/DeWidget/DeSelect.vue
+6
-1
conditions.js
frontend/src/store/modules/conditions.js
+19
-2
index.vue
frontend/src/views/link/view/index.vue
+1
-1
shareTree.vue
frontend/src/views/panel/GrantAuth/shareTree.vue
+2
-2
index.vue
frontend/src/views/panel/edit/index.vue
+2
-2
index.vue
frontend/src/views/panel/enshrine/index.vue
+1
-1
PanelList.vue
frontend/src/views/panel/list/PanelList.vue
+2
-1
没有找到文件。
frontend/src/components/canvas/components/Editor/ContextMenu.vue
浏览文件 @
df841373
...
...
@@ -89,6 +89,7 @@ export default {
deleteCurCondition
()
{
if
(
this
.
curComponent
.
type
===
'custom'
)
{
this
.
$store
.
dispatch
(
'conditions/delete'
,
{
componentId
:
this
.
curComponent
.
id
})
bus
.
$emit
(
'delete-condition'
,
{
componentId
:
this
.
curComponent
.
id
})
}
},
...
...
frontend/src/components/canvas/components/Editor/Preview.vue
浏览文件 @
df841373
...
...
@@ -92,6 +92,10 @@ export default {
})
})
},
created
()
{
// 先清除查询条件
this
.
$store
.
dispatch
(
'conditions/clear'
)
},
methods
:
{
changeStyleWithScale
,
getStyle
,
...
...
@@ -105,7 +109,7 @@ export default {
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
(
)
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
()
)
})
}
return
data
...
...
frontend/src/components/canvas/components/Editor/PreviewEject.vue
浏览文件 @
df841373
...
...
@@ -118,7 +118,7 @@ export default {
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
(
)
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
()
)
})
}
return
data
...
...
frontend/src/components/canvas/components/Editor/index.vue
浏览文件 @
df841373
...
...
@@ -29,7 +29,6 @@
class=
"component"
:style=
"item.style"
:element=
"item"
@
set-condition-value=
"setConditionValue"
/>
<component
...
...
@@ -109,7 +108,7 @@ export default {
height
:
this
.
changeStyleWithScale
(
this
.
canvasStyleData
.
height
)
+
'px'
}
if
(
this
.
canvasStyleData
.
openCommonStyle
)
{
if
(
this
.
canvasStyleData
.
panel
.
backgroundType
===
'image'
&&
this
.
canvasStyleData
.
panel
.
imageUrl
)
{
if
(
this
.
canvasStyleData
.
panel
.
backgroundType
===
'image'
&&
this
.
canvasStyleData
.
panel
.
imageUrl
)
{
style
=
{
width
:
this
.
changeStyleWithScale
(
this
.
canvasStyleData
.
width
)
+
'px'
,
height
:
this
.
changeStyleWithScale
(
this
.
canvasStyleData
.
height
)
+
'px'
,
...
...
@@ -148,6 +147,9 @@ export default {
this
.
deleteCondition
(
condition
)
})
},
created
()
{
this
.
$store
.
dispatch
(
'conditions/clear'
)
},
methods
:
{
changeStyleWithScale
,
...
...
frontend/src/components/canvas/index.vue
浏览文件 @
df841373
...
...
@@ -69,9 +69,9 @@ export default {
},
resetID
(
data
)
{
if
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
(
)
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
()
)
})
}
...
...
frontend/src/components/widget/DeWidget/DeSelect.vue
浏览文件 @
df841373
...
...
@@ -44,6 +44,7 @@ export default {
created
()
{
this
.
options
=
this
.
element
.
options
this
.
setCondition
()
},
mounted
()
{
this
.
$nextTick
(()
=>
{
...
...
@@ -52,8 +53,12 @@ export default {
},
methods
:
{
changeValue
(
value
)
{
this
.
inDraw
&&
this
.
$store
.
dispatch
(
'conditions/add'
,
{
component
:
this
.
element
,
value
:
[
this
.
options
.
value
],
operator
:
this
.
operator
}
)
this
.
setCondition
(
)
this
.
inDraw
&&
this
.
$emit
(
'set-condition-value'
,
{
component
:
this
.
element
,
value
:
[
value
],
operator
:
this
.
operator
})
},
setCondition
()
{
this
.
inDraw
&&
this
.
$store
.
dispatch
(
'conditions/add'
,
{
component
:
this
.
element
,
value
:
[
this
.
options
.
value
],
operator
:
this
.
operator
})
}
}
}
...
...
frontend/src/store/modules/conditions.js
浏览文件 @
df841373
...
...
@@ -5,11 +5,13 @@ const state = {
const
mutations
=
{
ADD_CONDITION
:
(
state
,
condition
)
=>
{
!
condition
&&
(
condition
=
[])
state
.
conditions
.
push
(
condition
)
condition
&&
valueValid
(
condition
)
&&
state
.
conditions
.
push
(
condition
)
},
REDUCE_CONDITION
:
(
state
,
index
)
=>
{
state
.
conditions
&&
state
.
conditions
.
length
>
index
&&
state
.
conditions
.
splice
(
index
,
1
)
},
CLEAR
:
(
state
)
=>
{
state
.
conditions
=
[]
}
}
...
...
@@ -30,6 +32,17 @@ const actions = {
},
reduce
({
commit
},
index
)
{
commit
(
'ADD_CONDITION'
,
index
)
},
delete
({
commit
},
component
)
{
for
(
let
index
=
0
;
index
<
state
.
conditions
.
length
;
index
++
)
{
const
element
=
state
.
conditions
[
index
]
if
(
element
.
componentId
===
component
.
componentId
)
{
commit
(
'REDUCE_CONDITION'
,
index
)
}
}
},
clear
({
commit
})
{
commit
(
'CLEAR'
)
}
}
...
...
@@ -61,6 +74,10 @@ const isValid = condition => {
return
validResult
}
const
valueValid
=
condition
=>
{
return
condition
&&
condition
.
value
&&
condition
.
value
.
length
>
0
&&
condition
.
value
[
0
]
}
const
formatCondition
=
obj
=>
{
const
{
component
,
value
,
operator
}
=
obj
const
fieldId
=
component
.
options
.
attrs
.
fieldId
...
...
frontend/src/views/link/view/index.vue
浏览文件 @
df841373
...
...
@@ -38,7 +38,7 @@ export default {
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
(
)
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
()
)
})
}
return
data
...
...
frontend/src/views/panel/GrantAuth/shareTree.vue
浏览文件 @
df841373
...
...
@@ -51,9 +51,9 @@ export default {
})
},
resetID
(
data
)
{
if
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
(
)
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
()
)
})
}
...
...
frontend/src/views/panel/edit/index.vue
浏览文件 @
df841373
...
...
@@ -270,7 +270,7 @@ export default {
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
(
)
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
()
)
})
}
return
data
...
...
@@ -372,7 +372,7 @@ export default {
},
closeLeftPanel
()
{
this
.
show
=
false
this
.
beforeDestroy
()
//
this.beforeDestroy()
}
}
}
...
...
frontend/src/views/panel/enshrine/index.vue
浏览文件 @
df841373
...
...
@@ -53,7 +53,7 @@ export default {
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
(
)
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
()
)
})
}
...
...
frontend/src/views/panel/list/PanelList.vue
浏览文件 @
df841373
...
...
@@ -486,6 +486,7 @@ export default {
// 加载视图数据
get
(
'panel/group/findOne/'
+
data
.
id
).
then
(
response
=>
{
this
.
$store
.
commit
(
'setComponentData'
,
this
.
resetID
(
JSON
.
parse
(
response
.
data
.
panelData
)))
// this.$store.commit('setComponentData', sourceInfo.type === 'custom' ? sourceInfo : this.resetID(sourceInfo))
const
temp
=
JSON
.
parse
(
response
.
data
.
panelStyle
)
this
.
$store
.
commit
(
'setCanvasStyle'
,
temp
)
this
.
$store
.
dispatch
(
'panel/setPanelInfo'
,
data
)
...
...
@@ -535,7 +536,7 @@ export default {
resetID
(
data
)
{
if
(
data
)
{
data
.
forEach
(
item
=>
{
item
.
id
=
uuid
.
v1
(
)
item
.
type
!==
'custom'
&&
(
item
.
id
=
uuid
.
v1
()
)
})
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论