- 1 Introduction
- 2 Extension Mechanism
- 2.1 Introduction
- 2.2 Add a Module
- 2.3 Extend control
- 2.4 Extend model
- 2.5 Extend view
- 2.6 Extend style sheet and JS
- 2.7 Extend language and configuration
- 2.8 Add Class Library
- 3 API Mechanism
- 4 Command Line
Extend style sheet and JS
- 2018-07-16 10:05:30
- tengfei
- 9306
- Last edited by tengfei on 2019-01-08 09:45:12
1. Stylesheet extension
If you want to modify the style of a page, there are two ways. One is to extend the view file as mentioned in the last article, the other is to define styles for this page. For example, redefine the style of the Create page of the bug module. It can be defined as:
Create a directory named Create under module/bug/ext/css/, then create a CSS file name in that directory, and define the style in it.
Note: When loading the Create method, all the CSS files under the module/bug/ext/css/create will be loaded.
2. JS extension
The extension of JS on a page is similar to extend a style sheet. For example, extend the Create page of the bug module. Create a directory named Create under bug/ext/js/, and then define the JS script in it.
Note: When loading the Create method, all the JS files under the module/bug/ext/js/create will be loaded.