Commit 57c4b0c2 authored by Xuguangxing's avatar Xuguangxing

feat: 增加是否强制登录配置

parent f1ac94b5
...@@ -33,6 +33,13 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) { ...@@ -33,6 +33,13 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
type: 'ColorSelector' type: 'ColorSelector'
} }
]; ];
baseConfigSchema: object[] = [
{
key: 'pageNeedLogin',
name: '是否登录',
type: 'SwitchBtn'
},
]; ,
titleSchema: object[] = [ titleSchema: object[] = [
{ {
key: 'titleBgColor', key: 'titleBgColor',
...@@ -179,7 +186,7 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) { ...@@ -179,7 +186,7 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
}, },
]; ];
get propsSchema() { get propsSchema() {
return [...this.titleSchema, ...this.bottomSchema, ...this.floatSchema, ...this.otherProps, ...this.floatModal]; return [...this.titleSchema, ...this.bottomSchema, ...this.floatSchema, ...this.otherProps, ...this.floatModal, ...this.baseConfigSchema];
} }
@Watch('cartAndShareBtn', { immediate: true }) @Watch('cartAndShareBtn', { immediate: true })
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
<h2>{{title}}</h2> <h2>{{title}}</h2>
<Form class="dynamic-form-component" :label-width="80" :model="propsForm" @submit.native.prevent> <Form class="dynamic-form-component" :label-width="80" :model="propsForm" @submit.native.prevent>
<h3>基础属性</h3> <h3>基础属性</h3>
<h4>基础配置</h4>
<template v-for="(item, index) in baseConfigSchema">
<FormItem class="Df-component-formitem" :label="item.name" :key="'baseConfigSchema_' + index">
<component :is="item.type" :options="item.options" v-bind="item.props" v-model="propsForm[item.key]" :formControl="item.formControl" />
</FormItem>
</template>
<h4>标题栏</h4> <h4>标题栏</h4>
<template v-for="(item, index) in titleSchema"> <template v-for="(item, index) in titleSchema">
<FormItem class="Df-component-formitem" :label="item.name" :key="'titleSchema_' + index"> <FormItem class="Df-component-formitem" :label="item.name" :key="'titleSchema_' + index">
......
...@@ -95,6 +95,7 @@ export const defaultState = { ...@@ -95,6 +95,7 @@ export const defaultState = {
backgroundImage: '', backgroundImage: '',
}, },
props: { props: {
pageNeedLogin: false,
titleBgColor: '#fff', titleBgColor: '#fff',
titleUseUrl: false, titleUseUrl: false,
showPageBottomTip: true, showPageBottomTip: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment