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
c4f00fdb
Commit
c4f00fdb
authored
Nov 20, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(pageData): 默认值修复
parent
e595a044
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
index.ts
app/web/page/editor/component/DynamicPageForm/index.ts
+3
-2
index.ts
app/web/page/store/modules/tenant/index.ts
+4
-1
No files found.
app/web/page/editor/component/DynamicPageForm/index.ts
View file @
c4f00fdb
...
...
@@ -10,7 +10,7 @@ import Number from '../DynamicForm/component/Number/index.vue';
import
FormList
from
'
../DynamicForm/component/FormList/index.vue
'
;
import
BackTopPicker
from
'
../DynamicForm/component/BackTopPicker/index.vue
'
;
import
SwitchBtn
from
'
../DynamicForm/component/SwitchBtn/index.vue
'
;
import
{
SHOP_CART_CONFIG
}
from
'
@service/staticData.service
'
;
import
{
SHOP_CART_CONFIG
,
DEFAULT_CONFIG
}
from
'
@service/staticData.service
'
;
@
Component
({
components
:
{
Upload
,
ColorSelector
,
BaseSelect
,
Textarea
,
Number
,
FormList
,
BackTopPicker
,
SwitchBtn
},
name
:
'
DynamicPageForm
'
})
export
default
class
DynamicPageForm
extends
Mixins
(
ContextMenuMixin
)
{
...
...
@@ -149,7 +149,7 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
type
:
'
checkbox
'
}
],
formDefault
:
SHOP_CART_CONFIG
formDefault
:
{}
}
];
get
propsSchema
()
{
...
...
@@ -160,6 +160,7 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
onAuthStateChange
(
val
)
{
const
options
=
val
?
[
'
购物车
'
,
'
分享
'
,
'
自定义
'
]
:
[
'
自定义
'
];
this
.
$set
(
this
.
floatSchema
[
1
].
formControl
[
0
],
'
options
'
,
options
);
this
.
$set
(
this
.
floatSchema
[
1
],
'
formDefault
'
,
val
?
SHOP_CART_CONFIG
:
DEFAULT_CONFIG
);
}
@
Watch
(
'
pageData
'
,
{
immediate
:
true
,
deep
:
true
})
...
...
app/web/page/store/modules/tenant/index.ts
View file @
c4f00fdb
...
...
@@ -46,7 +46,10 @@ export default class TenantModule implements Module<EditorAuthInfo, RootState> {
mutations
:
MutationTree
<
EditorAuthInfo
>
=
{
[
FETCH_AUTH_INFO
](
state
,
data
)
{
// ! 此处存取存在问题
console
.
log
(
this
.
state
.
editor
.
pageInfo
.
uuid
);
if
(
!
data
.
cartAndShareBtn
&&
!
this
.
state
.
editor
.
pageInfo
.
uuid
)
{
Vue
.
set
(
this
.
state
.
editor
.
pageInfo
.
page
.
props
,
'
btAttachVal
'
,
[]);
}
Vue
.
set
(
this
.
state
,
'
tenant
'
,
data
);
}
};
...
...
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