{"id":1429,"date":"2024-11-10T17:47:29","date_gmt":"2024-11-10T09:47:29","guid":{"rendered":"https:\/\/fwq.ai\/blog\/1429\/"},"modified":"2024-11-10T17:47:29","modified_gmt":"2024-11-10T09:47:29","slug":"vue-element-ui-%e5%a6%82%e4%bd%95%e5%8a%a8%e6%80%81%e8%ae%be%e7%bd%ae%e8%a1%a8%e5%a4%b4%ef%bc%8c%e5%ae%9e%e7%8e%b0%e4%b8%8a%e5%91%a8%e5%92%8c%e6%9c%ac%e5%91%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/1429\/","title":{"rendered":"Vue + Element UI \u5982\u4f55\u52a8\u6001\u8bbe\u7f6e\u8868\u5934\uff0c\u5b9e\u73b0\u201c\u4e0a\u5468\u201d\u548c\u201c\u672c\u5468\u201d\u7684\u6548\u679c\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173043184420357.jpg\" class=\"aligncenter\" title=\"Vue + Element UI \u5982\u4f55\u52a8\u6001\u8bbe\u7f6e\u8868\u5934\uff0c\u5b9e\u73b0\u201c\u4e0a\u5468\u201d\u548c\u201c\u672c\u5468\u201d\u7684\u6548\u679c\uff1f\u63d2\u56fe\" alt=\"Vue + Element UI \u5982\u4f55\u52a8\u6001\u8bbe\u7f6e\u8868\u5934\uff0c\u5b9e\u73b0\u201c\u4e0a\u5468\u201d\u548c\u201c\u672c\u5468\u201d\u7684\u6548\u679c\uff1f\u63d2\u56fe\" \/><\/p>\n<p>\u5982\u4f55\u4f7f\u7528  + element ui \u52a8\u6001\u8bbe\u7f6e\u8868\u5934\uff1f<\/p>\n<p>\u60f3\u5b9e\u73b0\u7c7b\u4f3c\u56fe\u7247\u7684\u6548\u679c\uff0c\u4ee5\u201c\u4e0a\u5468\u201d\u548c\u201c\u672c\u5468\u201d\u4f5c\u4e3a\u8868\u5934\uff0c\u5982\u4f55\u5b9e\u73b0\uff1f<\/p>\n<p>\u89e3\u51b3\u4e4b\u9053\uff1a<\/p>\n<p>\u4f7f\u7528\u4e24\u4e2a\u53d8\u91cf\u5206\u522b\u8868\u793a\u4e0a\u5468\u548c\u672c\u5468\u7684\u65f6\u95f4\u8303\u56f4\uff0c\u7136\u540e\u5c06\u5176\u8bbe\u7f6e\u5728 el-table-column \u7ec4\u4ef6\u7684 label \u5c5e\u6027\u4e2d\u5373\u53ef\u3002<\/p>\n<p>\u81f3\u4e8e\u4e0a\u5468\u548c\u672c\u5468\u7684\u65f6\u95f4\u8303\u56f4\uff0c\u53ef\u4ee5\u53c2\u8003 JS \u83b7\u53d6\u5f53\u524d\u4e0a\u5468\u548c\u5f53\u524d\u5468\u7684\u5468\u4e00\u548c\u5468\u65e5\u65e5\u671f\u7684\u65b9\u6cd5\u3002<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p>\u4e3e\u4f8b\uff1a<\/p>\n<pre>let lastweek = '11-14 ~ 11-20'\nlet thisweek = '11-21 ~ 11-22'<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<pre>&lt;el-table-column label=\"\u4e0a\u5468\"&gt;\n  &lt;el-table-column prop=\"state\" :label=\"lastweek\" width=\"120\" \/&gt;\n&lt;\/el-table-column&gt;\n&lt;el-table-column label=\"\u672c\u5468\"&gt;\n  &lt;el-table-column prop=\"state\" :label=\"thisweek\" width=\"120\" \/&gt;\n&lt;\/el-table-column&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fVue + Element UI \u5982\u4f55\u52a8\u6001\u8bbe\u7f6e\u8868\u5934\uff0c\u5b9e\u73b0\u201c\u4e0a\u5468\u201d\u548c\u201c\u672c\u5468\u201d\u7684\u6548\u679c\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4f7f\u7528 + element ui \u52a8\u6001\u8bbe\u7f6e\u8868\u5934\uff1f \u60f3\u5b9e\u73b0\u7c7b\u4f3c\u56fe\u7247\u7684\u6548\u679c\uff0c\u4ee5\u201c\u4e0a\u5468\u201d\u548c\u201c\u672c\u5468\u201d\u4f5c\u4e3a\u8868\u5934\uff0c\u5982\u4f55\u5b9e\u73b0\uff1f \u89e3\u51b3\u4e4b\u9053\uff1a \u4f7f\u7528\u4e24\u4e2a\u53d8\u91cf\u5206\u522b\u8868\u793a\u4e0a\u5468\u548c\u672c\u5468\u7684\u65f6\u95f4\u8303\u56f4\uff0c\u7136\u540e\u5c06\u5176\u8bbe\u7f6e\u5728 el-table-column \u7ec4\u4ef6\u7684 label \u5c5e\u6027\u4e2d\u5373\u53ef\u3002 \u81f3\u4e8e\u4e0a\u5468\u548c\u672c\u5468\u7684\u65f6\u95f4\u8303\u56f4\uff0c\u53ef\u4ee5\u53c2\u8003 JS \u83b7\u53d6\u5f53\u524d\u4e0a\u5468\u548c\u5f53\u524d\u5468\u7684\u5468\u4e00\u548c\u5468\u65e5\u65e5\u671f\u7684\u65b9\u6cd5\u3002 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u4e3e\u4f8b\uff1a let lastweek = &#8217;11-14 ~ 11-20&#8242; let thisweek = &#8217;11-21 ~ 11-22&#8242; \u767b\u5f55\u540e\u590d\u5236 &lt;el-table-column label=&#8221;\u4e0a\u5468&#8221;&gt; &lt;el-table-column prop=&#8221;state&#8221; :label=&#8221;lastweek&#8221; width=&#8221;120&#8243; \/&gt; &lt;\/el-table-column&gt; &lt;el-table-column label=&#8221;\u672c\u5468&#8221;&gt; &lt;el-table-column prop=&#8221;state&#8221; :label=&#8221;thisweek&#8221; width=&#8221;120&#8243; \/&gt; &lt;\/el-table-column&gt; \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u5c31\u662fVue + Element UI \u5982\u4f55\u52a8\u6001\u8bbe\u7f6e\u8868\u5934\uff0c\u5b9e\u73b0\u201c\u4e0a\u5468\u201d\u548c\u201c\u672c\u5468\u201d\u7684\u6548\u679c\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-1429","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=1429"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/1429\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=1429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=1429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=1429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}