Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vue-unistra
formbuilder
Commits
998065d3
Commit
998065d3
authored
Feb 24, 2022
by
MARCO Jonathan
Browse files
🔀
Merge branch 'release/3.0.35'
parents
cdc4105c
b2fa205d
Pipeline
#74082
passed with stage
in 12 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
998065d3
{
"name"
:
"@vue-unistra/formbuilder"
,
"version"
:
"3.0.3
4
"
,
"version"
:
"3.0.3
5
"
,
"main"
:
"dist/index.js"
,
"files"
:
[
"dist/*"
,
...
...
src/components/formbuilder/settings/tabs/conditional/UsfTabConditionalDraggableContainer/UsfTabConditionalDraggableContainer.vue
View file @
998065d3
...
...
@@ -2,26 +2,26 @@
<v-chip-group
column
>
<draggable
:value=
"items"
class=
"draggableContainer"
@
change=
"onMoveItem"
v-if=
"!readOnly"
>
<v-chip
draggable
outlined
color=
"
primary
"
v-for=
"(item, i) in items"
:key=
"`$
{item.id}_${i}`"
class="draggableItem"
close-icon="mdi-close"
close
@click:close="onDeleteItem(item)"
draggable
outlined
:
color=
"
getColor(item)
"
v-for=
"(item, i) in items"
:key=
"`$
{item.id}_${i}`"
class="draggableItem"
close-icon="mdi-close"
close
@click:close="onDeleteItem(item)"
>
{{
displayItem
(
item
)
}}
</v-chip>
</draggable>
<div
v-else
>
<v-chip
:ripple=
"false"
outlined
color=
"
primary
"
v-for=
"(item, i) in items"
:key=
"`$
{item.id}_${i}-readonly`"
:ripple=
"false"
outlined
:
color=
"
getColor(item)
"
v-for=
"(item, i) in items"
:key=
"`$
{item.id}_${i}-readonly`"
>
{{
displayItem
(
item
)
}}
</v-chip>
...
...
@@ -60,6 +60,18 @@ export default vue.extend({
},
methods
:
{
getColor
(
item
:
FieldCondition
):
'
#afbb00
'
|
'
#0060ab
'
|
'
#ff4d00
'
|
'
#9800ff
'
{
if
(
item
.
type
===
'
field
'
)
{
return
'
#ff4d00
'
;
}
else
if
(
item
.
type
===
'
item
'
)
{
if
(
item
.
value
===
'
&&
'
||
item
.
value
===
'
||
'
)
{
return
'
#0060ab
'
;
}
return
'
#afbb00
'
;
}
return
'
#9800ff
'
;
},
displayItem
(
item
:
FieldCondition
):
string
{
switch
(
item
.
type
)
{
case
'
field
'
:
...
...
@@ -80,10 +92,10 @@ export default vue.extend({
},
onDeleteItem
(
itemDeleted
:
FieldCondition
):
void
{
this
.
items
.
splice
(
this
.
items
.
findIndex
(
(
item
:
FieldCondition
)
=>
(
item
.
id
===
itemDeleted
.
id
&&
item
.
value
===
itemDeleted
.
value
),
),
1
,
this
.
items
.
findIndex
(
(
item
:
FieldCondition
)
=>
(
item
.
id
===
itemDeleted
.
id
&&
item
.
value
===
itemDeleted
.
value
),
),
1
,
);
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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