{"id":9596,"date":"2022-08-18T10:40:52","date_gmt":"2022-08-18T02:40:52","guid":{"rendered":"https:\/\/blog.ywdevops.cn\/?p=9596"},"modified":"2023-11-08T11:07:35","modified_gmt":"2023-11-08T03:07:35","slug":"vue-admin-template","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2022\/08\/18\/vue-admin-template\/","title":{"rendered":"vue-admin-template\u4f7f\u7528\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u5b8c\u540e\uff0c\u9996\u6b21\u767b\u5f55\uff0c\u754c\u9762\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"291\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/3-2.png\" alt=\"\" class=\"wp-image-9599\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/3-2.png 706w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/3-2-300x124.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/3-2-600x247.png 600w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u4fee\u6539\u754c\u9762\u4e3a\u4e2d\u6587\u663e\u793a\uff0c\u7f16\u8f91src\/main.js\u5185\u5bb9\uff0c\u6ce8\u91ca\u6389locale\u4f4d\u7f6e\uff0c\u6253\u5f00\u6ce8\u91caVue.use(ElementUI)\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"117\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/4-2.png\" alt=\"\" class=\"wp-image-9602\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/4-2.png 706w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/4-2-300x50.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/4-2-600x99.png 600w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4fee\u6539\u540e\uff0c\u67e5\u770b\u5185\u5bb9\u5df2\u7ecf\u53d8\u6210\u4e2d\u6587\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"277\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/5-2.png\" alt=\"\" class=\"wp-image-9604\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/5-2.png 707w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/5-2-300x118.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/5-2-600x235.png 600w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/figure>\n\n\n\n<p class=\"has-luminous-vivid-amber-background-color has-background wp-block-paragraph\">\u6ce8\uff1a\u767b\u5f55\u754c\u9762\u5de6\u4fa7\u7684\u529f\u80fd\u680f\u540d\u79f0\u9700\u8981\u624b\u52a8\u6539\uff0c\u9ed8\u8ba4\u5199\u6b7b\u5728\u4ee3\u7801\u4e2d\uff0c\u56e0\u6b64\u662f\u82f1\u6587\u7684<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u4fee\u6539\u5de6\u4fa7\u529f\u80fd\u680f\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5de6\u4fa7\u7684\u529f\u80fd\u680f\u663e\u793a\u7684\u4e3b\u8981\u662f\u8def\u7531\uff0c\u5728src\/router\/index.js\u4e2d\u8bbe\u7f6e<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u4f8b\u5b50\u8868\u793a\u6dfb\u52a0\u4e00\u4e2a\u5bc6\u7801\u672c\u8def\u7531\uff0c\u5b50\u8def\u7531\u4e3a\u666e\u901a\u5bc6\u7801\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"339\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/8-2.png\" alt=\"\" class=\"wp-image-9611\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/8-2.png 710w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/8-2-300x143.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/8-2-600x286.png 600w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>path\uff1a\u8bbe\u7f6e\u8def\u7531\u8def\u5f84\uff0c\u53ef\u81ea\u5b9a\u4e49<\/li>\n\n\n\n<li>component\uff1acomponent\uff0c\u7ec4\u6210\u90e8\u5206\uff0c\u8bbe\u7f6e\u4e3aLayout\u5373\u53ef<\/li>\n\n\n\n<li>redirect\uff1aredirect\uff0c\u91cd\u5b9a\u5411\u5730\u5740\uff0c\u5982\u679c\u8bbe\u7f6e\u4e3anoRedirect\u65f6\u8be5\u8def\u7531\u5728\u9762\u5305\u5c51\u5bfc\u822a\u4e0d\u53ef\u88ab\u70b9\u51fb\uff0c\u53ef\u4ee5\u7559\u7a7a<\/li>\n\n\n\n<li>alwaysShow\uff1a\u5982\u679c\u5b50\u8def\u7531\u53ea\u6709\u4e00\u4e2a\uff0c\u90a3\u4e48\u9700\u8981\u8bbe\u7f6ealwaysShow\u4e3atrue\uff0c\u7136\u540e\u624d\u80fd\u770b\u5230\u7236\u8def\u7531\u540d\u5b57\uff0c\u5982\u679c\u591a\u4e2a\u5b50\u8def\u7531\u5c31\u4e0d\u9700\u8981\u8bbe\u7f6ealwaysShow<\/li>\n\n\n\n<li>name\uff1a\u8bbe\u5b9a\u8def\u7531\u540d\u5b57\uff0c\u6ca1\u5565\u5b9e\u9645\u610f\u4e49<\/li>\n\n\n\n<li>meta\uff1ameta\u8bbe\u7f6e\u5143\u7d20\uff0c\u4e00\u822c\u8bbe\u7f6etitle\u548cicon\u5373\u53ef<\/li>\n\n\n\n<li>children\u884c\uff1a\u8bbe\u7f6e\u5b50\u8def\u7531<\/li>\n\n\n\n<li>children\u91cc\u7684component\uff1a\u6307\u5b9a\u5bfc\u5165\u7684\u9875\u9762\u8def\u5f84\uff0c\u5bf9\u5e94\u7684\u9875\u9762\u540d\u5b57\u4e3acommonpass.vue<\/li>\n\n\n\n<li>hidden: true\uff0c\u53ef\u4ee5\u9690\u85cf\u8def\u7531\uff0c\u8fd9\u91cc\u6ca1\u5199<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6dfb\u52a0\u5b8c\u6210\u540e\u9875\u9762\u81ea\u52a8\u5237\u65b0\uff0c\u7236\u8def\u7531\u4e3a\u5bc6\u7801\u672c\uff0c\u5b50\u8def\u7531\u4e3a\u666e\u901a\u5bc6\u7801\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"706\" height=\"235\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/9-2.png\" alt=\"\" class=\"wp-image-9614\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/9-2.png 706w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/9-2-300x100.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2022\/08\/9-2-600x200.png 600w\" sizes=\"auto, (max-width: 706px) 100vw, 706px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u5b8c\u540e\uff0c\u9996\u6b21\u767b\u5f55\uff0c\u754c\u9762\u5982\u56fe\uff1a 1\u3001\u4fee\u6539\u754c\u9762\u4e3a\u4e2d\u6587\u663e\u793a\uff0c\u7f16\u8f91src\/main.js\u5185\u5bb9\uff0c\u6ce8\u91ca\u6389locale\u4f4d\u7f6e [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":9597,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[155,23],"tags":[],"class_list":["post-9596","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vue","category-rong"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/9596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=9596"}],"version-history":[{"count":17,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/9596\/revisions"}],"predecessor-version":[{"id":15493,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/9596\/revisions\/15493"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/9597"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=9596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=9596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=9596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}