世界是个球
世界是个球
  • 发布:2023-09-30 21:11
  • 更新:2023-09-30 21:11
  • 阅读:139

请问:复杂数据格式怎么用schema设置?

分类:uniCloud
[  
    {  
        _id: 0,  
        templateNamee: '图例1',  
        posterImgUrl: '/static/template/man_yl_yali_min.png',  
        dragList: [{  
                id: 0,  
                type: 'text',  
                text: '刘能',  
                color: '#000000',  
                fontFamily: 'zzgf-lh',  
                fontSize: 22,  
            },  
            {  
                id: 1,  
                type: 'img',  
                url: '/static/template/man_yl_yali1.png',  
                width: 57.55,  
                height: 52.45  
            },  
            {  
                id: 3,  
                type: 'text',  
                text: '哥习惯了',  
                color: '#000000',  
                fontFamily: 'hkhbt-w12',  
                fontSize: 8  
            }  
        ],  
        dragBg: { // 背景图  
            url: '/static/template/bg_blue1.png',  
            width: 100,  
            height: 100  
        }  
    },  
    {  
        _id: 1,  
        templateNamee: '图例2',  
        posterImgUrl: '/static/template/female_yl_yali_min.png',  
        dragList: [ // 贴片/文字  
            {  
                id: 0,  
                type: 'img',  
                url: '/static/template/female_yl_yali2.png',  
                width: 47.25,  
                height: 37.95  
            },  
            {  
                id: 1,  
                type: 'text',  
                text: '姐不在乎',  
                color: '#000000',  
                fontFamily: 'hkhbt-w12',  
                fontSize: 8  
            }  
        ],  
        dragBg: { // 背景图  
            url: '/static/template/bg_pink1.png',  
            width: 100,  
            height: 100  
        }  
    }  
]

请教一下,我数据表里要创建如上格式数据,其中dragList项需要添加的内容可能是上传图片,也可能是一段文字,图片和文字各自会有固定的一些设置项,dragList里添加的图片或文字数量也不固定,要怎么做呢?能用schema设置吗?

多谢!!!

2023-09-30 21:11 负责人:无 分享
已邀请:

要回复问题请先登录注册