{
"componentName": "Page",
"children": [],
"size": "76x130",
"canvasSize": "389x666",
"isSplit": true
}| 属性 | 值 | 说明 |
|---|---|---|
| componentName | Page | 固定值 |
| children | 数组 | 每个元素是一个物料组件 |
| size | 页尺寸宽*高,单位mm | 例如一联尺寸:76*130 |
| canvasSize | 页尺寸,单位px | 小红书云打印系统渲染的尺寸,ISV可以不用关心 |
| isSplit | true或者false | 是否分页 |
| 属性 | 值 | 说明 注意所有坐标长宽相关的字段传值,只能用数字,不允许使用字符串,也不要在字体大小末尾加上px |
|---|---|---|
| props.basic.left | 横向坐标 | 绝对坐标,单位mm,整数 |
| props.basic.top | 纵向坐标 | 绝对坐标,单位mm,整数 |
| props.basic.width | 宽度 | 单位mm,线条的线宽支持小数,其余组件如果为浮点数时会向上取整 |
| props.basic.height | 高度 | 单位mm,整数 |
| props.textSection.fontSize | 字号 | 单位px,整数 |
| 属性字段 | 字段说明 | 使用建议 | 默认数据 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| height | 组件高度 | 必传 | ||||
| contentSection | value | 静态/动态内容 | 必传 | ✅ | ||
| content | 云打印系统上配置动态内容时,取该字段展示预览效果 | |||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicQrcode",
"props": {
"basic": {
"left": 29,
"top": 28,
"width": 20,
"height": 20
},
"contentSection": {
"value": "#data.orderNo"
}
}
} {
"componentName": "OnixBarleyElectronicQrcode",
"props": {
"basic": {
"left": 29,
"top": 28,
"width": 20,
"height": 20
},
"contentSection": {
"content": "http://www.xiaohongshu.com",
"value": "#data.orderNo"
},
"visibleSection": {
"visible": true,
"value": "#data.qrcodeVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| height | 组件高度 | 必传 | ||||
| materialSection | isDescribeShow | 是否展示条形码文本内容 | true | |||
| type | 条形码格式,所有支持的参考附录 | CODE128 | ||||
| contentSection | value | 静态/动态内容 | 必传 | ✅ | ||
| content | 云打印系统上配置动态内容时,取该字段展示预览效果 | |||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicBarcode",
"props": {
"basic": {
"left": 13,
"top": 17,
"width": 48,
"height": 19
},
"contentSection": {
"value": "#data.orderNo"
}
}
} {
"componentName": "OnixBarleyElectronicBarcode",
"props": {
"basic": {
"left": 13,
"top": 17,
"width": 48,
"height": 19
},
"materialSection": {
"isDescribeShow": true,
"type": "CODE128"
},
"contentSection": {
"content": "LP123456789",
"value": "#data.orderNo"
},
"visibleSection": {
"visible": true,
"value": "#data.barcodeVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| height | 组件高度 | 必传 | ||||
| materialSection | isDescribeShow | 是否展示条形码文本内容 | true | |||
| type | 条形码格式,所有支持的参考附录 | CODE128 | ||||
| contentSection | value | 静态/动态内容 | 必传 | ✅ | ||
| content | 云打印系统上配置动态内容时,取该字段展示预览效果 | |||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicBarcodeVertical",
"props": {
"basic": {
"left": 28,
"top": 21,
"width": 22,
"height": 44
},
"contentSection": {
"value": "#data.orderNo"
}
}
} {
"componentName": "OnixBarleyElectronicBarcodeVertical",
"props": {
"basic": {
"left": 28,
"top": 21,
"width": 22,
"height": 44
},
"materialSection": {
"isDescribeShow": true,
"type": "CODE128"
},
"key": "65",
"contentSection": {
"content": "LP123456789",
"value": "#data.orderNo"
},
"visibleSection": {
"visible": true,
"value": "#data.barcodeVerticalVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| height | 组件高度 | 必传 | ||||
| textSection | backgroundColor | 文本区域背景色 | 无 | |||
| color | 字体颜色 | #000 | ||||
| rotate | 旋转角度 | 0 | ||||
| fontFamily | 字体,当前只支持黑体 | SimHei, Arial, sans-serif(黑体) | ||||
| fontSize | 字号,单位px,字段属性是纯数字并且末尾不要加上px | 建议传递 | 15px | |||
| fontWeight | 字体粗细,暂不支持修改 | 正常 | ||||
| letterSpace | 字体间距 | 0 | ||||
| lineHeight | 行高 | 1倍字体高度 | ||||
| opacity | 透明度 | 100% | ||||
| fontStyle | 字体样式 | 无 | ||||
| fontJustifyContent | 水平列表方式 | 左对齐 | ||||
| fontAlignItems | 垂直列表方式 | 上对齐 | ||||
| contentSection | value | 静态/动态内容 | 必传 | ✅ | ||
| content | 云打印系统上配置动态内容时,取该字段展示预览效果 | |||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicText",
"props": {
"basic": {
"left": 17,
"top": 30,
"width": 40,
"height": 20
},
"textSection": {
"fontSize": 3
},
"contentSection": {
"value": "#data.text"
}
}
} {
"componentName": "OnixBarleyElectronicText",
"props": {
"basic": {
"left": 17,
"top": 30,
"width": 40,
"height": 20
},
"textSection": {
"rotate": 0,
"fontFamily": "SimSun, Arial, sans-serif",
"fontSize": 3,
"fontWeight": "normal",
"letterSpace": 0,
"lineHeight": 1,
"opacity": 10,
"fontStyle": "normal",
"fontJustifyContent": "flex-start",
"fontAlignItems": "flex-start",
"backgroundColor": "#FFFFFFFF",
"color": "#000000FF"
},
"contentSection": {
"content": "小红书",
"value": "#data.text"
},
"visibleSection": {
"visible": true,
"value": "#data.textVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| height | 组件高度 | 必传 | ||||
| styleSection | borderStyle | 边框样式,实线、虚线 | 实线 | |||
| bgColor | 矩形区域内背景色 | 无 | ||||
| borderSize | 边框粗细 | 1 | ||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicRectangle",
"props": {
"basic": {
"left": 28,
"top": 28,
"width": 20,
"height": 20
}
}
} {
"componentName": "OnixBarleyElectronicRectangle",
"props": {
"basic": {
"left": 28,
"top": 28,
"width": 20,
"height": 20
},
"styleSection": {
"borderStyle": "solid",
"bgColor": "#fff",
"borderSize": 1,
"borderRadius": 0
},
"visibleSection": {
"visible": true,
"value": "#data.rectAngleVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| styleSection | borderStyle | 边框样式,实线、虚线 | 实线 | |||
| bgColor | 矩形区域内背景色 | 无 | ||||
| borderSize | 边框粗细 | 1 | ||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicLine",
"props": {
"basic": {
"left": 17,
"top": 36,
"width": 46,
"height": 19
}
}
} {
"componentName": "OnixBarleyElectronicLine",
"props": {
"basic": {
"left": 17,
"top": 36,
"width": 46,
"height": 19
},
"styleSection": {
"borderStyle": "solid",
"borderSize": 1,
"bgColor": "#000"
},
"visibleSection": {
"visible": true,
"value": "#data.lineVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| styleSection | borderStyle | 边框样式,实线、虚线 | 实线 | |||
| bgColor | 矩形区域内背景色 | 无 | ||||
| borderSize | 边框粗细 | 1 | ||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicLineVertical",
"props": {
"basic": {
"left": 38,
"top": 28,
"height": 55,
"width": 11
}
}
} {
"componentName": "OnixBarleyElectronicLineVertical",
"props": {
"basic": {
"left": 38,
"top": 28,
"height": 55,
"width": 11
},
"styleSection": {
"borderStyle": "solid",
"borderSize": 1,
"bgColor": "#000"
},
"visibleSection": {
"visible": true,
"value": "#data.lineVerticalVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| height | 组件高度 | 必传 | ||||
| textSection | backgroundColor | 文本区域背景色 | 无 | |||
| color | 字体颜色 | #000 | ||||
| rotate | 旋转角度 | 0 | ||||
| fontFamily | 字体,当前只支持黑体 | SimHei, Arial, sans-serif(黑体) | ||||
| fontSize | 字号,单位px | 建议传递 | 15px | |||
| fontWeight | 字体粗细,暂不支持修改 | 正常 | ||||
| letterSpace | 字体间距 | 0 | ||||
| lineHeight | 行高 | 1倍字体高度 | ||||
| opacity | 透明度 | 100% | ||||
| fontStyle | 字体样式 | 无 | ||||
| fontJustifyContent | 水平列表方式 | 左对齐 | ||||
| fontAlignItems | 垂直列表方式 | 上对齐 | ||||
| contentSection | value | 静态/动态内容 | 必传 | ✅ | ||
| content | 云打印系统上配置动态内容时,取该字段展示预览效果 | |||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自 定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicTextVertical",
"props": {
"basic": {
"left": 17,
"top": 30,
"width": 40,
"height": 20
},
"textSection": {
"fontSize": 3
},
"contentSection": {
"value": "#data.text"
}
}
} {
"componentName": "OnixBarleyElectronicTextVertical",
"props": {
"basic": {
"left": 17,
"top": 30,
"width": 40,
"height": 20
},
"textSection": {
"rotate": 0,
"fontFamily": "SimSun, Arial, sans-serif",
"fontSize": 3,
"fontWeight": "normal",
"letterSpace": 0,
"lineHeight": 1,
"opacity": 10,
"fontStyle": "normal",
"fontJustifyContent": "flex-start",
"fontAlignItems": "flex-start",
"backgroundColor": "#FFFFFFFF",
"color": "#000000FF"
},
"contentSection": {
"content": "小红书",
"value": "#data.text"
},
"visibleSection": {
"visible": true,
"value": "#data.textVerticalVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | height | 组件高度 | 必传 | ||
| top | 纵向坐标 | 必传 |
{
"componentName": "OnixBarleyElectronicIsv",
"props": {
"basic": {
"top": 98,
"height": 27
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| height | 组件高度 | 必传 | ||||
| cover | url | 图片链接 | 必传 | |||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ |
{
"componentName": "OnixBarleyElectronicImage",
"props": {
"basic": {
"left": 0,
"top": 0,
"width": 28,
"height": 23
},
"cover": {
"url": "https://growth-img.xhscdn.com/ditto/104100n03186pn6tcjk06d44hi09g0000000000j7d5q4s"
}
}
} {
"componentName": "OnixBarleyElectronicImage",
"props": {
"basic": {
"left": 0,
"top": 0,
"width": 28,
"height": 23
},
"cover": {
"url": "https://growth-img.xhscdn.com/ditto/104100n03186pn6tcjk06d44hi09g0000000000j7d5q4s"
},
"visibleSection": {
"visible": true,
"value": "#data.imageVisible"
}
}
}| 属性字段 | 字段说明 | 使用建议 | 默认值 | 支持自定义数据#data.xxx | ||
|---|---|---|---|---|---|---|
| props | basic | left | 横向坐标 | 必传 | ||
| top | 纵向坐标 | 必传 | ||||
| width | 组件宽度 | 必传 | ||||
| height | 组件高度 | 必传 | ||||
| tableSection | rowHeight | 表格单行高度,单位mm | 必传 | 8 | ||
| columnCount | 表格列数 | 注意:该配置只在云打系统预览时生效,实际以数据为准 | ||||
| fontSize | 表格文本字体大小,单位px | 12px | ||||
| showHeader | 使用固定表头 | false | ||||
| headerList | 固定表头数据 | [ ] | ||||
| visibleSection | visible | 默认是否展示 | true | |||
| value | 根据自定义数据控制是否展示当前组件 | ✅ 示例:模板中配置#data.tableData,详细数据格式见3.11.4 |
{
"componentName": "OnixBarleyElectronicTable",
"props": {
"basic": {
"left": 9,
"top": 1,
"width": 50,
"height": 28
},
"tableSection": {
"rowHeight": 6,
"fontSize": 12,
"showHeader": true,
"columnWidth": 8,
"headerList": [
{
"headerName": "第一列"
},
{
"headerName": "第二列"
},
{
"headerName": "第三列"
},
{
"headerName": "第四列"
}
]
},
"contentSection": {
"content": [],
"value": "#data.tableData"
}
}
} {
"componentName": "OnixBarleyElectronicTable",
"props": {
"basic": {
"left": 9,
"top": 1,
"width": 50,
"height": 28
},
"tableSection": {
"rowHeight": 6,
"fontSize": 12,
"columnWidth": 8
},
"contentSection": {
"content": [],
"value": "#data.tableData"
}
}
} {
"componentName": "OnixBarleyElectronicTable",
"props": {
"basic": {
"left": 9,
"top": 1,
"width": 50,
"height": 28
},
"tableSection": {
"rowHeight": 6,
"fontSize": 12,
"showHeader": true,
"columnWidth": 8,
"headerList": [
{
"headerName": "第一列"
},
{
"headerName": "第二列"
},
{
"headerName": "第三列"
},
{
"headerName": "第四列"
}
]
},
"contentSection": {
"content": [],
"value": "#data.tableData"
},
"visibleSection": {
"visible": true
}
}
}"data":{
"tableData": [
{
"columns": [
"产品规格",
"手工烘焙蛋黄酥"
]
},
{
"columns": [
"数量",
"1"
]
}
]
}{
"data": {
"array1": [
"iphone14 红色 256G/1",
"iphone14 黑色 256G/1"
],
"array2": [
"1/1"
],
"text1": "1/2",
"text2": "2/2",
}[
"iphone14 红色 256G/1",
"iphone14 黑色 256G/1",
"1/1"
][
"1/2",
"2/2"
]1/2\n2/2"data":{
"orders":["order1", "order2"]
}// 示例
((arr, splitChar) => {
var result = '';
for (var i = 0; i < arr.length; i++) {
if(i>0) {
result += splitChar;
}
result += arr[i];
}
return result;
})(#data.orders || [], ',');(#data.orders || []).join(',')| 属性名 | value | name |
|---|---|---|
| 条形码格式type | [ { name: 'CODE128 auto', value: 'CODE128', }, { name: 'CODE128A', value: 'CODE128A', }, { name: 'CODE128 B', value: 'CODE128B', }, { name: 'CODE128 C', value: 'CODE128C', }, { name: 'EAN13', value: 'EAN13', }, { name: 'EAN8', value: 'EAN8', }, { name: 'UPC', value: 'UPC', }, { name: 'CODE39', value: 'CODE39', }, { name: 'ITF14', value: 'ITF14', }, { name: 'ITF', value: 'ITF', }, { name: 'MSI', value: 'MSI', }, { name: 'MSI10', value: 'MSI10', }, { name: 'MSI11', value: 'MSI11', }, { name: 'MSI1010', value: 'MSI1010', }, { name: 'MSI1110', value: 'MSI1110', }, { name: 'pharmacode', value: 'pharmacode', }] | 左侧的数组name是展示名字,value是值 |
| 字体fontFamily | SimHei, Arial, sans-serif | 黑体 |
| 字号fontWeight | lighter | 偏细 |
| normal | 正常 | |
| bold | 加粗 | |
| 字体样式fontStyle | italic | 斜体 |
| underline | 下划线 | |
| normal | 无 | |
| 水平排列fontJustifyContent | flex-start | 左对齐 |
| center | 居中 | |
| flex-end | 右对齐 | |
| 垂直排列fontAlignItems | flex-start | 顶部对齐 |
| center | 居中 | |
| flex-end | 底部对齐 | |
| 线条形状borderStyle | solid | 实线 |
| dashed | 虚线 |