diff --git a/spring-security/step-2/src/main/resources/static/src/components/HeaderNavs.js b/spring-security/step-2/src/main/resources/static/src/components/HeaderNavs.js new file mode 100644 index 0000000..4f37fdb --- /dev/null +++ b/spring-security/step-2/src/main/resources/static/src/components/HeaderNavs.js @@ -0,0 +1,29 @@ +const {defineComponent} = Vue; + +const HeaderNavs = defineComponent({ + name: 'HeaderNavs', + template: ` +
+ `, + data() { + return { + navList: ref([ + {href: "/login", title: "登录页面"}, + {href: "/user", title: "用户页面"}, + {href: "/role", title: "角色页面"}, + {href: "/permission", title: "权限页面"}, + ]) + }; + }, + methods: { + activeItem(nav) { + const pathname = window.location.pathname; + return pathname === nav.href; + }, + }, +}) \ No newline at end of file diff --git a/spring-security/step-2/src/main/resources/static/src/components/Pagination.js b/spring-security/step-2/src/main/resources/static/src/components/Pagination.js index 0c9229c..5318477 100644 --- a/spring-security/step-2/src/main/resources/static/src/components/Pagination.js +++ b/spring-security/step-2/src/main/resources/static/src/components/Pagination.js @@ -1,4 +1,3 @@ -const {defineComponent} = Vue; /* // pagination 类型 const pagination = { diff --git a/spring-security/step-2/src/main/resources/static/src/lib/css/tablePage.css b/spring-security/step-2/src/main/resources/static/src/lib/css/tablePage.css index aab529d..49ef8bb 100644 --- a/spring-security/step-2/src/main/resources/static/src/lib/css/tablePage.css +++ b/spring-security/step-2/src/main/resources/static/src/lib/css/tablePage.css @@ -1,6 +1,5 @@ body { background-color: #f8f9fa; - padding-top: 20px; } .card { diff --git a/spring-security/step-2/src/main/resources/templates/permissionPage.html b/spring-security/step-2/src/main/resources/templates/permissionPage.html index 96157fc..73bc2ea 100644 --- a/spring-security/step-2/src/main/resources/templates/permissionPage.html +++ b/spring-security/step-2/src/main/resources/templates/permissionPage.html @@ -36,6 +36,7 @@