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
29a6c92d
Commit
29a6c92d
authored
Oct 19, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增优惠券弹窗选择器
parent
54cfcb1f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
2 deletions
+68
-2
index.vue
...onent/DynamicForm/component/CouponModalSelector/index.vue
+52
-0
index.ts
app/web/page/editor/component/DynamicPageForm/index.ts
+9
-1
index.vue
app/web/page/editor/component/DynamicPageForm/index.vue
+7
-1
No files found.
app/web/page/editor/component/DynamicForm/component/CouponModalSelector/index.vue
0 → 100644
View file @
29a6c92d
<
template
>
<div
class=
"snapUpActivityContainer"
>
<Select
v-model=
"activityInfoId"
filterable
>
<Option
v-for=
"item in list"
:value=
"item.id"
:key=
"item.id"
>
{{
`id ${item.id
}
- ${item.title
}
`
}}
<
/Option
>
<
/Select
>
<!--
<
Button
type
=
"
primary
"
@
click
=
"
save
"
>
保存
<
/Button> --
>
<
/div
>
<
/template
>
<
script
>
import
operationApi
from
'
@api/operation.api
'
;
export
default
{
props
:
{
value
:
{
type
:
String
,
default
:
''
}
}
,
watch
:
{
activityInfoId
(
val
)
{
this
.
$emit
(
'
input
'
,
val
);
}
}
,
components
:
{
}
,
data
()
{
return
{
list
:
[],
activityInfoId
:
''
}
}
,
created
()
{
this
.
activityInfoId
=
this
.
value
;
this
.
getActivityList
();
console
.
log
(
this
.
value
)
}
,
methods
:
{
async
getActivityList
()
{
const
res
=
await
operationApi
.
getActivityList
({
templateType
:
11
,
crowdType
:
[
1
],
userType
:[]
}
);
for
(
let
i
=
0
;
i
<
res
.
length
;
i
++
)
{
res
[
i
].
id
=
res
[
i
].
id
.
toString
();
}
this
.
list
=
res
;
}
}
}
<
/script
>
<
style
scoped
lang
=
"
less
"
>
<
/style
>
app/web/page/editor/component/DynamicPageForm/index.ts
View file @
29a6c92d
...
...
@@ -4,6 +4,7 @@ import { reduce, ceil, subtract, divide, cloneDeep, assign } from 'lodash';
import
ContextMenuMixin
from
'
@editor/mixins/contextMenu.mixin
'
;
import
Upload
from
'
../DynamicForm/component/Upload/index.vue
'
;
import
ColorSelector
from
'
../DynamicForm/component/ColorSelector/index.vue
'
;
import
CouponModalSelector
from
'
../DynamicForm/component/CouponModalSelector/index.vue
'
;
// 用于选择优惠券弹窗
import
BaseSelect
from
'
../DynamicForm/component/BaseSelect/index.vue
'
;
import
Textarea
from
'
../DynamicForm/component/Textarea/index.vue
'
;
import
Number
from
'
../DynamicForm/component/Number/index.vue
'
;
...
...
@@ -12,7 +13,7 @@ import BackTopPicker from '../DynamicForm/component/BackTopPicker/index.vue';
import
SwitchBtn
from
'
../DynamicForm/component/SwitchBtn/index.vue
'
;
import
{
SHOP_CART_CONFIG
,
DEFAULT_CONFIG
}
from
'
@service/staticData.service
'
;
@
Component
({
components
:
{
Upload
,
ColorSelector
,
BaseSelect
,
Textarea
,
Number
,
FormList
,
BackTopPicker
,
SwitchBtn
},
name
:
'
DynamicPageForm
'
})
@
Component
({
components
:
{
Upload
,
ColorSelector
,
BaseSelect
,
Textarea
,
Number
,
FormList
,
BackTopPicker
,
SwitchBtn
,
CouponModalSelector
},
name
:
'
DynamicPageForm
'
})
export
default
class
DynamicPageForm
extends
Mixins
(
ContextMenuMixin
)
{
@
Getter
(
'
pageData
'
)
pageData
;
@
State
(
state
=>
state
.
tenant
.
cartAndShareBtn
)
cartAndShareBtn
;
...
...
@@ -158,6 +159,13 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
formDefault
:
{}
}
];
floatModal
:
object
[]
=
[
{
key
:
'
couponModal
'
,
name
:
'
优惠券弹窗
'
,
type
:
'
CouponModalSelector
'
},
];
// 这块用于让被污染的pageInfo的page.props返回shareOpenMethod
otherProps
:
object
[]
=
[
{
...
...
app/web/page/editor/component/DynamicPageForm/index.vue
View file @
29a6c92d
...
...
@@ -21,6 +21,12 @@
<component
:is=
"item.type"
:options=
"item.options"
v-bind=
"item.props"
v-model=
"propsForm[item.key]"
:formDefault=
"item.formDefault"
:formControl=
"item.formControl"
/>
</FormItem>
</
template
>
<h4>
弹窗
</h4>
<
template
v-for=
"(item, index) in floatModal"
>
<FormItem
class=
"Df-component-formitem"
:label=
"item.name"
:key=
"'floatModal_' + index"
>
<component
:is=
"item.type"
:options=
"item.options"
v-bind=
"item.props"
v-model=
"propsForm[item.key]"
:formDefault=
"item.formDefault"
:formControl=
"item.formControl"
/>
</FormItem>
</
template
>
</Form>
<Form
class=
"dynamic-form-component"
:label-width=
"80"
:model=
"commonStyleForm"
@
submit
.
native
.
prevent
>
<h3>
基础样式
</h3>
...
...
@@ -57,7 +63,7 @@
}
}
/deep/ .ivu-form-item-label {
font-size: 1
4
px;
font-size: 1
2
px;
}
/deep/ .ivu-input-number {
...
...
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