块属性的对象类型(Gutenberg)

时间:2019-05-03 作者:Douara Abderrahman

是否支持块属性的类型对象??

谢谢

1 个回复
SO网友:Bican M. Valeriu

是的,有。它将是这样的:

spacing: {
    type: \'object\',
    default: {
        margin: {
            global: { ...DIRECTIONS },
            tablet: { ...DIRECTIONS },
            desktop: { ...DIRECTIONS },
            unit: \'px\',
            size: 0,
            sync: false,
            syncTablet: false,
            syncDesktop: false
        },
        padding: {
            global: { ...DIRECTIONS },
            tablet: { ...DIRECTIONS },
            desktop: { ...DIRECTIONS },
            unit: \'px\',
            size: 0,
            syncGlobal: false,
            syncTablet: false,
            syncDesktop: false
        }
    },
},

相关推荐