{"id":1044,"date":"2022-04-08T12:35:23","date_gmt":"2022-04-08T04:35:23","guid":{"rendered":"http:\/\/blog.yyhcw.com\/?p=1044"},"modified":"2022-04-08T12:35:23","modified_gmt":"2022-04-08T04:35:23","slug":"bootstrap4%e4%b8%adcard%e5%9b%be%e7%89%87%e5%88%97%e8%a1%a8%e5%ae%8c%e7%be%8e%e6%98%be%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/blog.yyhcw.com\/post\/1044.html","title":{"rendered":"bootstrap4\u4e2dcard\u56fe\u7247\u5217\u8868\u5b8c\u7f8e\u663e\u793a"},"content":{"rendered":"<!--wp-compress-html--><!--wp-compress-html no compression--><p>\u4f7f\u7528<a href=\"https:\/\/blog.yyhcw.com\/post\/tag\/thinkcmf\" class=\"tag-tooltip\" data-toggle=\"tooltip\" title=\"\u67e5\u770b\u66f4\u591a\u5173\u4e8e thinkcmf \u7684\u6587\u7ae0\" target=\"_blank\">thinkcmf<\/a>\u641e\u7ad9\uff0c\u7cfb\u7edf\u4e2d\u81ea\u5e26\u4e00\u4e2a\u8d44\u6e90\u7ba1\u7406\uff0c\u5c31\u662f\u4f60\u6240\u4e0a\u4f20\u7684\u56fe\u7247\u3001\u6587\u4ef6\u7b49\u90fd\u7edf\u4e00\u5217\u8868\u5f62\u5f0f\u5c55\u793a\u51fa\u6765\uff0c\u90a3\u4e9b\u6587\u4ef6\u56fe\u7247\u5728\u4f7f\u7528\u6216\u8005\u5df2\u7ecf\u88ab\u5220\u9664\u4e86\uff0c\u90fd\u53ef\u4ee5\u6e05\u695a\u7684\u5c55\u793a\u51fa\u6765\uff0c\u4f46\u662f\u4e2a\u4eba\u611f\u89c9\u6587\u4ef6\u5217\u8868\u5f62\u5f0f\u5c55\u793a\u7684\u5f88\u662f\u4e0d\u5b8c\u7f8e\uff0c\u60f3\u770b\u5177\u4f53\u7684\u56fe\u7247\u8fd8\u9700\u8981\u70b9\u51fb\u67e5\u770b\uff0c\u6240\u6709\u60f3\u5230\u5c06\u8fd9\u4e2a\u9875\u9762\u6539\u6210\u76f4\u63a5\u663e\u793a\u56fe\u7247\u7684\u5f62\u5f0f\uff0c\u8fd9\u6837\u53ef\u4ee5\u4e00\u76ee\u4e86\u7136\u7684\u770b\u5230\u56fe\u7247\u4fe1\u606f\uff0c\u6700\u7ec8\u6548\u679c\u5982\u4e0b\uff1a<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-1045\" src=\"http:\/\/blog.yyhcw.com\/wp-content\/uploads\/2022\/04\/bdd9343fe66a2c64.png\" alt=\"\" width=\"938\" height=\"658\" \/><\/p>\n<p>\u6211\u4eec\u5e73\u65f6\u4e0a\u4f20\u7684\u56fe\u7247\u5927\u5c0f\u662f\u4e0d\u786e\u5b9a\u7684\uff0c\u90a3\u4e48\u600e\u4e48\u624d\u80fd\u8ba9\u56fe\u7247\u5b8c\u7f8e\u7684\u5c55\u73b0\u51fa\u6765\u5462\uff1f\u7ecf\u8fc7\u67e5\u8be2\u8d44\u6599\u5f97\u77e5<a href=\"https:\/\/blog.yyhcw.com\/post\/tag\/bootstrap\" class=\"tag-tooltip\" data-toggle=\"tooltip\" title=\"\u67e5\u770b\u66f4\u591a\u5173\u4e8e bootstrap \u7684\u6587\u7ae0\" target=\"_blank\">bootstrap<\/a>4\u4e2d\u6709\u4e00\u4e2a<a href=\"https:\/\/getbootstrap.com\/docs\/4.3\/utilities\/embed\/\">embed<\/a>\u5b9e\u7528\u7a0b\u5e8f\uff0c\u4f60\u53ef\u4ee5\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u4f7f\u7528\u5b83\u3002\u5b83\u670916x9\u548c4x3\u7684\u5bbd\u9ad8\u6bd4\uff0c\u4f46\u4f60\u53ef\u4ee5\u5f88\u5bb9\u6613\u5730\u6dfb\u52a0\u4f60\u81ea\u5df1\u7684\u3002<\/p>\n<p>\u5728\u8fd9\u4e2a\u6f14\u793a\u4e2d\uff0c\u63d0\u4f9b\u4e86\u4e24\u4e2a\u56fe\u50cf\uff0c\u4e00\u4e2a\u662f<a href=\"https:\/\/iot.21863.cn\/mall\/brand\/iqiyi.html\">\u7231\u5947\u827a<\/a>\u56fe\u7247\uff0c\u53e6\u4e00\u4e2a\u662f\u652f\u4ed8\u5b9d\u9886\u7ea2\u5305\u7684\uff0c\u8fd9\u4e24\u4e2a\u56fe\u50cf\u770b\u8d77\u6765\u662f\u4e00\u6837\u7684\uff0c\u5e76\u4e14\u586b\u5145\u4e86\u53ef\u7528\u7684\u7eb5\u6a2a\u6bd4\u3002<\/p>\n<pre class=\"lang:php decode:true\">&lt;link href=\"https:\/\/stackpath.bootstrapcdn.com\/bootstrap\/4.3.1\/css\/bootstrap.min.css\" rel=\"stylesheet\" \/&gt;\r\n\r\n&lt;div class=\"container\"&gt;\r\n  &lt;div class=\"row\"&gt;\r\n    &lt;div class=\"col-6\"&gt;\r\n      &lt;div class=\"card h-100 border-0 shadow\"&gt;\r\n        &lt;div class=\"card-img-top\"&gt;\r\n          &lt;div class=\"embed-responsive embed-responsive-4by3\"&gt;\r\n            &lt;div class=\"embed-responsive-item\"&gt;\r\n              &lt;img src=\"https:\/\/iot.21863.cn\/upload\/default\/20220107\/e8b32f81ad2403ca95deb9b0432718c9.jpeg\" alt=\"\" class=\"img-fluid w-100\" \/&gt;\r\n            &lt;\/div&gt;\r\n          &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"card-body\"&gt;\r\n          &lt;p&gt;Card content goes here&lt;\/p&gt;\r\n        &lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    &lt;div class=\"col-6\"&gt;\r\n      &lt;div class=\"card h-100 border-0 shadow\"&gt;\r\n        &lt;div class=\"card-img-top\"&gt;\r\n          &lt;div class=\"embed-responsive embed-responsive-4by3\"&gt;\r\n            &lt;div class=\"embed-responsive-item\"&gt;\r\n              &lt;img src=\"https:\/\/iot.21863.cn\/upload\/default\/20211012\/6c24f5b0f055afdeef5c416a83e881d2.jpg\" alt=\"\" class=\"img-fluid w-100\" \/&gt;\r\n            &lt;\/div&gt;\r\n          &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"card-body\"&gt;\r\n          &lt;p&gt;Card content goes here&lt;\/p&gt;\r\n        &lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>\u53ef\u4ee5\u5f88\u5b8c\u7f8e\u7684\u89e3\u51b3\u56fe\u7247\u5927\u5c0f\u4e0d\u540c\u7684\u7f29\u653e\u95ee\u9898\u4e86\uff0c\u4e0b\u9762\u6211\u5c06<a href=\"https:\/\/blog.yyhcw.com\/post\/tag\/thinkcmf\" class=\"tag-tooltip\" data-toggle=\"tooltip\" title=\"\u67e5\u770b\u66f4\u591a\u5173\u4e8e thinkcmf \u7684\u6587\u7ae0\" target=\"_blank\">thinkcmf<\/a>\u4e2d\u7684\u8d44\u6e90\u7ba1\u7406\u7684\u6a21\u677f\u4e00\u5e76\u653e\u4e0a\uff0c\u7ed9\u6709\u9700\u8981\u7684\u4eba\uff1a<\/p>\n<pre class=\"lang:php decode:true \" title=\"THINKCMF\u8d44\u6e90\u7ba1\u7406\u6a21\u677f\u6587\u4ef6\">&lt;php&gt;$status=['\u4e0d\u53ef\u7528', '\u53ef\u7528'];\r\n             $asset_img_suffixes=['bmp','jpg','jpeg','png','gif','tiff'];\r\n             $asset_ile_suffixes=['csv','xls','doc','docx'];\r\n        &lt;\/php&gt;\r\n        &lt;div class=\"row\"&gt;\r\n            &lt;foreach name=\"assets\" item=\"vo\"&gt;\r\n                &lt;div class=\"col-lg-3 col-xl-2 col-md-3 col-6\"&gt;\r\n                    &lt;div class=\"card mb-3\"&gt;\r\n                        &lt;div class=\"card-img-top\"&gt;\r\n                            &lt;div class=\"embed-responsive embed-responsive-4by3\"&gt;\r\n                                &lt;div class=\"embed-responsive-item\"&gt;\r\n                                  &lt;if condition=\"in_array(strtolower($vo['suffix']),$asset_img_suffixes)\"&gt;\r\n                                        &lt;img src=\"{:cmf_get_image_preview_url($vo['file_path'])}\" title=\"{$vo.file_path}\" alt=\"{$vo.filename}\" class=\"img-fluid w-100\"&gt;\r\n                                  &lt;elseif condition=\"in_array(strtolower($vo['suffix']),$asset_ile_suffixes)\"&gt;\r\n                                        &lt;i class=\"fa fa-file-word-o fa-fw\"&gt;&lt;\/i&gt;\r\n                                  &lt;\/if&gt;\r\n                                &lt;\/div&gt;\r\n                            &lt;\/div&gt;\r\n                            \r\n                        &lt;\/div&gt;\r\n                      &lt;div class=\"card-body\"&gt;\r\n                        &lt;h6 class=\"card-subtitle mb-2 text-muted\"&gt;\u7528\u6237ID:{$vo.user_id} {$vo.user_login} {$vo.user_nickname}&lt;\/h6&gt;\r\n                        &lt;a class=\"card-link\"&gt;{$vo.file_size\/1024|round}KB&lt;\/a&gt;\r\n                        &lt;a class=\"card-link\"&gt;&lt;if condition=\"!file_exists('upload\/'.$vo['file_path'])\"&gt;&lt;span class=\"text-danger\"&gt;\u6587\u4ef6\u4e22\u5931&lt;\/span&gt;&lt;else \/&gt;{$status[$vo['status']]}&lt;\/if&gt;&lt;\/a&gt;\r\n                        &lt;a href=\"{:url('AdminAsset\/delete',array('id'=&gt;$vo['id']))}\" class=\"card-link btn btn-sm btn-danger js-ajax-delete float-right mb-0\"&gt;{:lang('DELETE')}&lt;\/a&gt;\r\n                      &lt;\/div&gt;\r\n                    &lt;\/div&gt;\r\n                &lt;\/div&gt;\r\n            &lt;\/foreach&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"pagination\"&gt;{$page|default=''}&lt;\/div&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<!--wp-compress-html no compression--><!--wp-compress-html-->","protected":false},"excerpt":{"rendered":"\u4f7f\u7528thinkcmf\u641e\u7ad9\uff0c\u7cfb\u7edf\u4e2d\u81ea\u5e26\u4e00\u4e2a\u8d44\u6e90\u7ba1\u7406\uff0c\u5c31\u662f\u4f60\u6240\u4e0a\u4f20\u7684\u56fe\u7247\u3001\u6587\u4ef6\u7b49\u90fd\u7edf\u4e00\u5217\u8868\u5f62\u5f0f\u5c55\u793a\u51fa\u6765\uff0c\u90a3\u4e9b\u6587\u4ef6\u56fe \u00b7\u00b7\u00b7","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[288,58],"views":65329,"_links":{"self":[{"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/1044"}],"collection":[{"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/comments?post=1044"}],"version-history":[{"count":0,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/posts\/1044\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/media?parent=1044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/categories?post=1044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.yyhcw.com\/api\/wp\/v2\/tags?post=1044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}