Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
5a1c4fd3
Commit
5a1c4fd3
authored
Aug 24, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(ui): 调试
parent
5bd5f04a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
4 deletions
+65
-4
index.vue
...r/component/DynamicForm/component/BackTopPicker/index.vue
+1
-1
index.vue
...editor/component/DynamicForm/component/FormList/index.vue
+1
-1
formList.mixin.ts
.../component/DynamicForm/component/mixins/formList.mixin.ts
+61
-0
state.ts
app/web/page/store/modules/editor/state.ts
+1
-1
staticData.service.ts
app/web/service/staticData.service.ts
+1
-1
No files found.
app/web/page/editor/component/DynamicForm/component/BackTopPicker/index.vue
View file @
5a1c4fd3
...
...
@@ -17,7 +17,7 @@
</div>
</
template
>
<
script
>
import
FormList
from
'
../mixins/formList.mixin.
j
s
'
;
import
FormList
from
'
../mixins/formList.mixin.
t
s
'
;
import
{
SHOP_CART_CONFIG
,
SHARE_CONFIG
,
DEFAULT_CONFIG
}
from
'
@service/staticData.service
'
;
const
CONFIG_MAP
=
{
...
...
app/web/page/editor/component/DynamicForm/component/FormList/index.vue
View file @
5a1c4fd3
...
...
@@ -17,7 +17,7 @@
</div>
</
template
>
<
script
>
import
FormList
from
'
../mixins/formList.mixin.
j
s
'
;
import
FormList
from
'
../mixins/formList.mixin.
t
s
'
;
export
default
{
mixins
:
[
FormList
]
}
...
...
app/web/page/editor/component/DynamicForm/component/mixins/formList.mixin.ts
0 → 100644
View file @
5a1c4fd3
import
{
Component
,
Prop
,
Watch
,
Vue
}
from
'
vue-property-decorator
'
;
import
ComponentSelect
from
'
../ComponentSelect/index.vue
'
;
import
Upload
from
'
../Upload/index.vue
'
;
import
ColorSelector
from
'
../ColorSelector/index.vue
'
;
import
SwitchBtn
from
'
../SwitchBtn/index.vue
'
;
import
BaseSelect
from
'
../BaseSelect/index.vue
'
;
@
Component
({
name
:
'
formListMixin
'
,
components
:
{
ComponentSelect
,
Upload
,
ColorSelector
,
SwitchBtn
,
BaseSelect
}
})
export
default
class
DynamicFormMixin
extends
Vue
{
@
Prop
({
type
:
Array
,
default
:
()
=>
[]
})
value
;
@
Prop
({
type
:
Array
,
default
:
()
=>
[]
})
formControl
;
@
Prop
({
type
:
Object
,
default
:
()
=>
[]
})
formDefault
;
@
Prop
(
String
)
name
;
list
:
object
[]
=
[];
@
Watch
(
'
list
'
)
onListChange
(
val
)
{
this
.
$emit
(
'
input
'
,
val
);
}
@
Watch
(
'
value
'
,
{
immediate
:
true
})
onValueChange
(
val
)
{
this
.
list
=
val
;
}
getComponent
(
type
)
{
let
result
=
type
;
switch
(
type
)
{
case
'
text
'
:
result
=
'
Input
'
;
break
;
case
'
select
'
:
result
=
'
BaseSelect
'
;
break
;
case
'
checkbox
'
:
result
=
'
Checkbox
'
;
break
;
case
'
textarea
'
:
result
=
'
Textarea
'
;
break
;
case
'
number
'
:
result
=
'
Number
'
;
break
;
case
'
switch
'
:
result
=
'
SwitchBtn
'
;
break
;
}
return
result
;
}
add
()
{
const
object
=
this
.
formControl
.
reduce
((
pre
,
cur
)
=>
{
pre
[
cur
.
key
]
=
this
.
formDefault
[
cur
.
key
]
||
''
;
return
pre
;
},
{});
this
.
list
.
push
(
object
);
}
del
(
index
)
{
this
.
list
.
splice
(
index
,
1
);
}
}
\ No newline at end of file
app/web/page/store/modules/editor/state.ts
View file @
5a1c4fd3
...
...
@@ -91,7 +91,7 @@ export const defaultState = {
{
persets
:
'
购物车
'
,
icon
:
'
shopping-cart-o
'
,
url
:
'
xyqb://shoppingCart
Tab
'
,
url
:
'
xyqb://shoppingCart
?needLogin=1
'
,
color
:
'
#333
'
,
iconColor
:
'
#333
'
,
background
:
'
#fff
'
,
...
...
app/web/service/staticData.service.ts
View file @
5a1c4fd3
...
...
@@ -3,7 +3,7 @@ export const SHOP_CART_CONFIG = {
persets
:
'
购物车
'
,
txt
:
''
,
icon
:
'
shopping-cart-o
'
,
url
:
'
xyqb://shoppingCart
Tab
'
,
url
:
'
xyqb://shoppingCart
?needLogin=1
'
,
color
:
'
#333
'
,
iconColor
:
'
#333
'
,
background
:
'
#fff
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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