Explorar o código

拆分表格插件,按需引入

RuoYi %!s(int64=4) %!d(string=hai) anos
pai
achega
c8b42c5b82

+ 1 - 0
ruoyi-admin/src/main/resources/templates/demo/table/export.html

@@ -12,6 +12,7 @@
 		</div>
 	</div>
     <div th:include="include :: footer"></div>
+    <th:block th:include="include :: bootstrap-table-export-js" />
     <script th:inline="javascript">
         var prefix = ctx + "demo/table";
         var datas = [[${@dict.getType('sys_normal_disable')}]];

+ 1 - 0
ruoyi-admin/src/main/resources/templates/demo/table/fixedColumns.html

@@ -23,6 +23,7 @@
 		</div>
 	</div>
     <div th:include="include :: footer"></div>
+    <th:block th:include="include :: bootstrap-table-fixed-columns-js" />
     <script th:inline="javascript">
         var prefix = ctx + "demo/table";
         var datas = [[${@dict.getType('sys_normal_disable')}]];

+ 12 - 6
ruoyi-admin/src/main/resources/templates/include.html

@@ -25,17 +25,12 @@
 	<script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js?v=20200529}"></script>
 	<script th:src="@{/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
 	<script th:src="@{/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js}"></script>
-	<script th:src="@{/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js}"></script>
-	<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js}"></script>
 	<!-- jquery-validate 表单验证插件 -->
 	<script th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
 	<script th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
 	<script th:src="@{/ajax/libs/validate/jquery.validate.extend.js}"></script>
 	<!-- jquery-validate 表单树插件 -->
 	<script th:src="@{/ajax/libs/bootstrap-treetable/bootstrap-treetable.js}"></script>
-	<!-- jquery-export 表格导出插件 -->
-	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
-	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
 	<!-- 遮罩层 -->
 	<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
     <script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
@@ -188,4 +183,15 @@
 <div th:fragment="bootstrap-table-editable-js">
 	<script th:src="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-editable.min.js}"></script>
     <script th:src="@{/ajax/libs/bootstrap-table/extensions/editable/bootstrap-table-editable.js}"></script>
-</div>
+</div>
+
+<!-- 表格导出插件 -->
+<div th:fragment="bootstrap-table-export-js">
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/bootstrap-table-export.js}"></script>
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/export/tableExport.js}"></script>
+</div>
+
+<!-- 表格冻结列插件 -->
+<div th:fragment="bootstrap-table-fixed-columns-js">
+	<script th:src="@{/ajax/libs/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js}"></script>
+</div>

+ 1 - 0
ruoyi-admin/src/main/resources/templates/monitor/online/online.html

@@ -37,6 +37,7 @@
 		</div>
 	</div>
 	<th:block th:include="include :: footer" />
+	<th:block th:include="include :: bootstrap-table-export-js" />
 	<script th:inline="javascript">
 		var forceFlag = [[${@permission.hasPermi('monitor:online:forceLogout')}]];
 		var prefix = ctx + "monitor/online";

+ 1 - 0
ruoyi-generator/src/main/resources/templates/tool/gen/gen.html

@@ -52,6 +52,7 @@
 		</div>
 	</div>
 	<th:block th:include="include :: footer" />
+	<th:block th:include="include :: bootstrap-table-export-js" />
 	<script th:inline="javascript">
 		var prefix = ctx + "tool/gen";
 		var editFlag = [[${@permission.hasPermi('tool:gen:edit')}]];