{"id":1908,"date":"2025-09-18T18:42:04","date_gmt":"2025-09-18T10:42:04","guid":{"rendered":"https:\/\/zero-zl.cn\/?p=1908"},"modified":"2025-09-18T18:42:04","modified_gmt":"2025-09-18T10:42:04","slug":"12-springboot3vue3%e5%ae%9e%e7%8e%b0%e7%b3%bb%e7%bb%9f%e5%85%ac%e5%91%8a%e5%8a%9f%e8%83%bd","status":"publish","type":"post","link":"https:\/\/zero-zl.cn\/index.php\/2025\/09\/18\/12-springboot3vue3%e5%ae%9e%e7%8e%b0%e7%b3%bb%e7%bb%9f%e5%85%ac%e5%91%8a%e5%8a%9f%e8%83%bd\/","title":{"rendered":"12. Springboot3+Vue3\u5b9e\u73b0\u7cfb\u7edf\u516c\u544a\u529f\u80fd"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u521b\u5efa\u7cfb\u7edf\u516c\u544a\u8868<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE `notice` (\n  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '\u4e3b\u952eID',\n  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '\u516c\u544a\u6807\u9898',\n  `content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '\u516c\u544a\u5185\u5bb9',\n  `time` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '\u53d1\u5e03\u65f6\u95f4',\n  PRIMARY KEY (`id`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='\u7cfb\u7edf\u516c\u544a\u8868';<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u516c\u544a\u9996\u9875\u6e32\u67d3<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Home.vue<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"card\" style=\"margin-top: 10px; width: 50%\">\n      &lt;div style=\"font-size: 18px; margin-bottom: 20px\">\u7cfb\u7edf\u516c\u544a&lt;\/div>\n      &lt;el-timeline style=\"max-width: 600px\">\n        &lt;el-timeline-item :timestamp=\"item.time\" color=\"#0bbd87\" placement=\"top\" v-for=\"item in data.noticeDate\">\n          &lt;el-card>\n            &lt;h4>{{ item.title }}&lt;\/h4>\n            &lt;p>{{ item.content }}&lt;\/p>\n          &lt;\/el-card>\n        &lt;\/el-timeline-item>\n      &lt;\/el-timeline>\n    &lt;\/div><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>const loadNotice = () => {\n  request.get('\/notice\/selectAll').then(res => {\n    if (res.code === '200') {\n      data.noticeDate = res.data\n      if (data.noticeDate.length > 3) {\n        data.noticeDate = data.noticeDate.slice(0, 3)\n      }\n    } else {\n      ElMessage.error(res.msg)\n    }\n  })\n}\nloadNotice()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u521b\u5efa\u7cfb\u7edf\u516c\u544a\u8868 \u516c\u544a\u9996\u9875\u6e32\u67d3 Home.vue<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[114,102],"tags":[],"class_list":["post-1908","post","type-post","status-publish","format-standard","hentry","category-spring-boot3vue3","category-102"],"_links":{"self":[{"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/posts\/1908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1908"}],"version-history":[{"count":2,"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/posts\/1908\/revisions"}],"predecessor-version":[{"id":1910,"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/posts\/1908\/revisions\/1910"}],"wp:attachment":[{"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zero-zl.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}