zoukankan      html  css  js  c++  java
  • themeleaf引入公共页面

    <div th:include="/top :: html"></div>
    //引用公共页面
    <div th:replace="head"></div>
    //引用公共js
    <!DOCTYPE html>
    <html xmlns:th="http://www.thymeleaf.org"
          xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
          th:with='basePath=${#httpServletRequest.getScheme()+"://"+#httpServletRequest.getServerName()+":"+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()+"/"}'>
    <head th:fragment="head">
        <base th:href="${basePath}"/>
        <meta value="UTF-8"/>
        <script th:src="@{/js/jquery-3.1.1.min.js}"></script>
        <script th:src="@{/js/moment.js}"></script>
        <script th:src="@{/js/vue.min.js}"></script>
        <script th:src="@{/js/vdt.js}"></script>
        <script th:src="@{/js/vue-router.min.js}"></script>
        <script th:src="@{/js/vue-resource.min.js}"></script>
        <script th:src="@{/js/axios.min.js}"></script>
        <script th:src="@{/js/tool.js}"></script>
        <script th:src="@{/element-ui/lib/index.js}"></script>
        <script th:src="@{/js/vee-validate/vee-validate.min.js}"></script>
        <script th:src="@{/js/vee-validate/vee-zh_CN.js}"></script>
        <script th:src="@{/js/fingerprint2.min.js}"></script>
        <link rel="stylesheet" th:href="@{/element-ui/lib/theme-chalk/index.css}" />
        <link rel="stylesheet" th:href="@{/css/main.css}" />
        <link rel="stylesheet" th:href="@{/css/reset.css}" />
        <script th:inline="javascript">
            var basepPath = [[${basePath}]];
        </script>
    </head>
    </html>
  • 相关阅读:
    asp.net 2.0 run
    Regular Expression
    assembly
    asp.net loading..
    session
    asp.net performance
    asp.net page order
    interface
    UVA 562 Dividing coins
    UVA 10003 Cutting Sticks
  • 原文地址:https://www.cnblogs.com/SimonHu1993/p/9243170.html
Copyright © 2011-2022 走看看