<xcy-page
:configList="getterConfigList"
:componentDatas="getterComponentDatas"
></xcy-page>
const configList = [
{
id: 1,
name: 'x-NavBar',
message: '导航组件',
schema: {
title: {
type: 'input',
label: '标题'
},
leftText: {
type: 'input',
label: '标题左侧文案'
},
rightText: {
type: 'input',
label: '标题右侧文案'
},
baseStyle: {
type: 'input',
label: '容器css样式'
}
}
},
{
id: 3,
name: 'x-Cell',
message: '单元格组件',
schema: {
title: {
type: 'input',
label: '单元格组件标题'
},
value: {
type: 'input',
label: '单元格组件右侧文案'
},
baseStyle: {
type: 'input',
label: '容器css样式'
},
size: {
type: 'input',
label: 'large(支持 large、small)'
},
label: {
type: 'input',
label: '单元格组件描述信息'
}
}
},
{
id: 5,
name: 'x-Image',
message: '图片组件',
schema: {
baseStyle: {
type: 'input',
label: '容器css样式'
},
src: {
type: 'input',
label: '图片链接地址'
},
}
},
{
id: 2,
name: 'x-Button',
message: '按钮组件',
schema: {
type: {
type: 'input',
label: '按钮类型(支持default、primary、info、warning、danger五种类型)'
},
baseStyle: {
type: 'input',
label: '容器css样式'
},
style: {
type: 'input',
label: '按钮样式'
},
value: {
type: 'input',
label: '按钮文案'
}
}
}
]
const componentDatas = {
'1': {
title: '配置化页面模版层案例',
leftText: '返回',
baseStyle: {
margin: '0 0 10px 0',
},
},
'2': {
type: 'primary',
baseStyle: {
fontSize: '25px',
margin: '20px 0 10px 0',
'text-align': 'center',
},
style: {
width: '80%'
},
value: '确定',
},
'3': {
style: {
margin: '0 0 10px 0',
},
list: [
{
title: '单元格1',
value: '内容1',
size: 'large1',
label: '描述信息1'
},
{
title: '单元格2',
value: '内容2',
size: 'large2',
label: '描述信息2'
}
]
},
'5': {
width: '350',
height: '350',
baseStyle: {
'text-align': 'center',
},
src: "https://img.yzcdn.cn/vant/cat.jpeg"
}
}