Shopify 所有配置类型的自定义section

104 阅读1分钟

1.text:一行文本输入框

"id": "heading",
"label": "Heading",
"default": "Default Heading"

2.textarea:多行文本输入框

"type": "textarea",
"id": "subheading",
"label": "Subheading",
"default": "Default Subheading"

3.richtext: 富文本编辑器

"type": "richtext",
"id": "rich_text",
"label": "Rich Text Content",
"default": "<p>Some <strong>bold</strong> text.</p>"

4.image_picker: 图片选择器

"type": "richtext",
"id": "rich_text",
"label": "Rich Text Content",
"default": "<p>Some <strong>bold</strong> text.</p>"

5.color: 颜色选择器

"type": "color",
"id": "text_color",
"label": "Text Color",
"default": "#000000"

6.font_picker: 字体选择器

"type": "font_picker",
"id": "font",
"label": "Font"

7.select: 下拉列表选择器

"type": "select",
"id": "select_option",
"label": "Select Option",
"options": [
{
"value": "option_one",
"label": "Option One"
},
{
"value": "option_two",
"label": "Option Two"
}
],
"default": "option_one"

8.checkbox: 勾选框

"type": "checkbox",
"id": "checkbox_option",
"label": "Checkbox Option",
"default": true

9.range: 范围滑块,用于选择数值

"type": "range",
"id": "range_option",
"label": "Range Option",
"min": 10,
"max": 100,
"step": 1,
"default": 50

10.number: 数字输入框

"type": "number",
"id": "number_option",
"label": "Number Option",
"default": 5

11.url: URL输入框

"type": "url",
"id": "url_option",
"label": "URL Option",
"default": "www.example.com";

12.video_url: 视频URL输入框

"type": "product",
"id": "product_option"
"label": "Product Option"

13.product: 产品选择器

"type": "product",
"id": "product_option"
"label": "Product Option"