magic-page-designer
Version:
magic-page-designer 是一个基于 vue 的在线页面快速开发平台,主要把所有的 vue 代码都改为在线配置,最终获得一个 json 格式的页面,你可以把它存放到服务器的任何地方:数据库、静态文件、redis 等。最方便的是可以在线修改页面,再也不用担心生产出问题了,还得打开 IDE,修改测试打包,直接在线编码,所见即所得。还可以配合 [magic-api](https://gitee.com/ssssssss-team/magic-api) 使用,完全抛弃 IDE,随时随地 code w
57 lines (52 loc) • 1.35 kB
text/typescript
import { ComponentGroupInfo, ConfigDetailType, InputListConfig } from '../page-object'
import general from './general'
import layout from './layout'
import dataEntry from './data-entry'
import dataDisplay from './data-display'
// 按照官网文档顺序排序,https://1x.antdv.com/docs/vue/introduce-cn/
const data: Array<ComponentGroupInfo> = [general, layout, dataEntry, dataDisplay]
export default data
// 获取一个Boolean的选择框
export function getBooleanSelect(trueLabel: string = '是', falseLabel: string = '否'): InputListConfig {
return {
title: 'Select',
component: ConfigDetailType.Select,
attr: {
allowClear: true,
options: [
{
value: '$:true',
label: trueLabel
},
{
value: '$:false',
label: falseLabel
}
]
}
}
}
// 获取一个Size的选择框
export function getSizeSelect(): InputListConfig {
return {
title: 'Select',
component: ConfigDetailType.Select,
attr: {
allowClear: true,
options: [
{
value: 'default',
label: '默认'
},
{
value: 'small',
label: '小'
},
{
value: 'large',
label: '大'
}
]
}
}
}