Extend style sheet and JS

2018-07-16 10:05:30
tengfei
9140
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.


Write a Comment
Comment will be posted after it is reviewed.