{"id":186013,"date":"2023-09-24T00:20:03","date_gmt":"2023-09-23T16:20:03","guid":{"rendered":"http:\/\/www.idc.net\/help\/186013\/"},"modified":"2023-09-24T00:20:03","modified_gmt":"2023-09-23T16:20:03","slug":"%e5%90%8e%e6%b5%aa%e4%ba%91%e7%99%be%e5%ba%a6%e5%b0%8f%e7%a8%8b%e5%ba%8f%e6%95%99%e7%a8%8b%ef%bc%9agrid-%e5%ae%ab%e6%a0%bc","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/186013\/","title":{"rendered":"\u540e\u6d6a\u4e91\u767e\u5ea6\u5c0f\u7a0b\u5e8f\u6559\u7a0b\uff1agrid \u5bab\u683c"},"content":{"rendered":"<ul>\n<li>grid \u5bab\u683c\n<ul>\n<li>\u5c5e\u6027\u8bf4\u660e<\/li>\n<li>\u793a\u4f8b\n<ul>\n<li>\u4ee3\u7801\u793a\u4f8b\n<ul><\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h1><span><\/span>grid \u5bab\u683c<\/h1>\n<p><strong>\u89e3\u91ca<\/strong>\uff1a\u5bab\u683c\u7ec4\u4ef6\uff0c\u5305\u542b\u4e0a\u56fe\u4e0b\u6587\u548c\u5de6\u56fe\u53f3\u6587\u4e24\u79cd\u6837\u5f0f\u3002\u53ef\u914d\u7f6e\u56fe\u7247\u3001\u4e3b\u6807\u9898\u6587\u6848\u3001\u526f\u6807\u9898\u6587\u6848\u3002\u9002\u7528\u4e8e\u4fe1\u606f\u5c55\u793a\uff0c\u5e76\u53ef\u653e\u7f6e\u5728\u9875\u9762\u7684\u4efb\u4f55\u4f4d\u7f6e\u3002<\/p>\n<h2><span><\/span>\u5c5e\u6027\u8bf4\u660e<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u5c5e\u6027\u540d<\/th>\n<th>\u7c7b\u578b<\/th>\n<th>\u5fc5\u586b<\/th>\n<th>\u9ed8\u8ba4\u503c<\/th>\n<th>\u8bf4\u660e<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n<p>list<\/p>\n<\/td>\n<td>\n<p>Array<\/p>\n<\/td>\n<td>\n<p>\u662f<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u5bab\u683c\u6570\u636e\uff0c\u793a\u4f8b <code>[{imageSrc: \u2018\u56fe\u7247\u5730\u5740\u2019, title: \u2018\u6700\u591a\u5c55\u793a\u516d\u4e2a\u5b57\u4e3b\u6807\u9898\u2019, subTitle: \u2018\u526f\u6807\u9898\u6587\u6848\u2019}]<\/code> \u5de6\u56fe\u53f3\u6587\u4e0d\u652f\u6301\u663e\u793a\u526f\u6807\u9898\uff0c\u8be6\u7ec6\u8bf7\u9605\u8bfb\u4ee3\u7801\u793a\u4f8b<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>type<\/p>\n<\/td>\n<td>\n<p>String<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td>\n<p>vertical<\/p>\n<\/td>\n<td>\n<p>\u6837\u5f0f\u7c7b\u578b vertical \u4e0a\u56fe\u4e0b\u6587\u3001horizontal \u5de6\u56fe\u53f3\u6587<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>columnNum<\/p>\n<\/td>\n<td>\n<p>Number<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td>\n<p>2<\/p>\n<\/td>\n<td>\n<p>\u5bab\u683c\u5c55\u793a\u5217\u6570\uff0c\u6700\u5c11\u652f\u6301\u4e24\u5217\uff0c\u4e0a\u56fe\u4e0b\u6587\u6700\u591a\u652f\u6301 4 \u5217\uff0c\u5de6\u56fe\u53f3\u6587\u6700\u591a\u652f\u6301 3 \u5217<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>imgBorderRadius<\/p>\n<\/td>\n<td>\n<p>Number<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td>\n<p>3<\/p>\n<\/td>\n<td>\n<p>\u56fe\u7247\u5706\u89d2\uff08\u5355\u4f4d\uff1arpx\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>hasBorder<\/p>\n<\/td>\n<td>\n<p>Boolean<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td>\n<p>true<\/p>\n<\/td>\n<td>\n<p>\u884c\u4e0e\u884c\u4e4b\u95f4\u7684\u4e0b\u8fb9\u6846<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>disable<\/p>\n<\/td>\n<td>\n<p>Boolean<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td>\n<p>false<\/p>\n<\/td>\n<td>\n<p>\u662f\u5426\u6709\u70b9\u51fb\u6001<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>imageBorder<\/p>\n<\/td>\n<td>\n<p>Boolean<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td>\n<p>false<\/p>\n<\/td>\n<td>\n<p>\u56fe\u7247\u662f\u5426\u6709 1px \u63cf\u8fb9<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>hasSeparateLine<\/p>\n<\/td>\n<td>\n<p>Boolean<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td>\n<p>true<\/p>\n<\/td>\n<td>\n<p>\u5bab\u683c\u6bcf\u4e00\u9879\u4e4b\u95f4\u7684\u675f\u5206\u5272\u7ebf<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>smt-item-class<\/p>\n<\/td>\n<td>\n<p>String<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u63d0\u4f9b\u5bab\u683c\u6269\u5c55\u6837\u5f0f\u7c7b\uff0c\u4f9b\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u6837\u5f0f\uff0c\u53ef\u901a\u8fc7\u6b64 class \u6539\u53d8\u5355\u4e2a\u5bab\u683c\u5916\u90e8\u6837\u5f0f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>smt-title-class<\/p>\n<\/td>\n<td>\n<p>String<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u63d0\u4f9b\u5bab\u683c\u6269\u5c55\u6837\u5f0f\u7c7b\uff0c\u4f9b\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u6837\u5f0f\uff0c\u53ef\u901a\u8fc7\u6b64 class \u6539\u53d8\u5355\u4e2a\u5bab\u683c\u4e3b\u6807\u9898\u6837\u5f0f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>smt-sub-title-class<\/p>\n<\/td>\n<td>\n<p>String<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u63d0\u4f9b\u5bab\u683c\u6269\u5c55\u6837\u5f0f\u7c7b\uff0c\u4f9b\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49\u7ec4\u4ef6\u6837\u5f0f\uff0c\u53ef\u901a\u8fc7\u6b64 class \u6539\u53d8\u5355\u4e2a\u5bab\u683c\u526f\u6807\u9898\u6837\u5f0f<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>bind:clickhld<\/p>\n<\/td>\n<td>\n<p>EventHandle<\/p>\n<\/td>\n<td>\n<p>\u5426<\/p>\n<\/td>\n<td><\/td>\n<td>\n<p>\u70b9\u51fb\u4e8b\u4ef6\uff0c\u4e8b\u4ef6\u8be6\u60c5\u4e3a\u70b9\u51fb\u9879\u5c55\u793a\u6570\u636e<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span><\/span>\u793a\u4f8b<\/h2>\n<p>\u8df3\u8f6c\u7f16\u8f91\u5de5\u5177<\/p>\n<p>\u5728\u5f00\u53d1\u8005\u5de5\u5177\u4e2d\u6253\u5f00<\/p>\n<p>\u5728 WEB IDE \u4e2d\u6253\u5f00<\/p>\n<p>\u626b\u7801\u4f53\u9a8c<\/p>\n<p>\u4ee3\u7801\u793a\u4f8b<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/static.sitestack.cn\/projects\/smartprogram-20210306\/97ebf63311ffac886baad1c970c1b97b.png\" class=\"aligncenter\"><\/p>\n<p>\u8bf7\u4f7f\u7528\u767e\u5ea6APP\u626b\u7801<\/p>\n<h3><span><\/span>\u4ee3\u7801\u793a\u4f8b<\/h3>\n<ul>\n<li>SWAN<\/li>\n<li>JS<\/li>\n<li>CSS<\/li>\n<li>JSON<\/li>\n<\/ul>\n<pre>\n \n \n <ol>\n  \n  \n  <li><code><span>&lt;!-- \u9ed8\u8ba4 --&gt;<\/span><\/code><\/li>\n  \n  \n  <li><code><span>&lt;smt-grid<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>bind:clickhld<\/span><span>=<\/span><span>\"clickHld\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>list<\/span><span>=<\/span><span>\"{{list}}\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span>&gt;&lt;\/smt-grid&gt;<\/span><\/code><\/li>\n  \n  \n  <li><code><span>&lt;!-- \u4e09\u5217 + \u4e0a\u56fe\u4e0b\u6587 --&gt;<\/span><\/code><\/li>\n  \n  \n  <li><code><span>&lt;smt-grid<\/span><span> <\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>bind:clickhld<\/span><span>=<\/span><span>\"clickHld\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>item-class<\/span><span>=<\/span><span>\"item\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>title-class<\/span><span>=<\/span><span>\"title\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>sub-title-class<\/span><span>=<\/span><span>\"sub-title\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>list<\/span><span>=<\/span><span>\"{{list}}\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>column-num<\/span><span>=<\/span><span>\"{{3}}\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span>&gt;&lt;\/smt-grid&gt;<\/span><\/code><\/li>\n  \n  \n  <li><code><span>&lt;!-- \u4e09\u5217 + \u5de6\u56fe\u53f3\u6587 --&gt;<\/span><\/code><\/li>\n  \n  \n  <li><code><span>&lt;smt-grid<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>type<\/span><span>=<\/span><span>\"horizontal\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>bind:clickhld<\/span><span>=<\/span><span>\"clickHld\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>item-class<\/span><span>=<\/span><span>\"item\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>title-class<\/span><span>=<\/span><span>\"title\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>list<\/span><span>=<\/span><span>\"{{horizontalList}}\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span> <\/span><span>column-num<\/span><span>=<\/span><span>\"{{3}}\"<\/span><\/code><\/li>\n  \n  \n  <li><code><span>&gt;&lt;\/smt-grid&gt;<\/span><\/code><\/li>\n \n \n <\/ol><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>grid \u5bab\u683c \u5c5e\u6027\u8bf4\u660e \u793a\u4f8b \u4ee3\u7801\u793a\u4f8b grid \u5bab\u683c \u89e3\u91ca\uff1a\u5bab\u683c\u7ec4\u4ef6\uff0c\u5305\u542b\u4e0a\u56fe\u4e0b\u6587\u548c\u5de6\u56fe\u53f3\u6587\u4e24\u79cd\u6837\u5f0f\u3002\u53ef\u914d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":186014,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[182398],"tags":[],"class_list":["post-186013","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mini-program"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/186013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=186013"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/186013\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media\/186014"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=186013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=186013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=186013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}