background

When I was making a management system, I finished the development of the server interface and started to make the page. When I saw layUI by accident, I saw the system effect made by others was quite good. So used to do their own system UI, feel relatively easy to use. After that, I found that the official documents were too simple. Some realized their own exploration, and some referred to others’ examples. Here’s how to use it.

practice

First, the use of steps

  • Download and use from the official website: www.layui.com/, text Dan and examples are together, like a convenient developer to refer to.

  • The file structure is as follows and can be imported directly into the project directory.

  • Use it with jQuery, so start with jQuery and then layUI.

  • After the page is introduced, refer to the official documentation to operate the interface based on the actual components used. Note: In order to make the effect, it is necessary to strictly follow the format of layUI. If you define it too arbitrarily, it will be uncontrollable, and it is very inconvenient to check. At the beginning, I just defined it by myself, but there was no effect. It took me a lot of time to troubleshoot problems, and finally I returned to the format of the document. I hope you will not jump into a similar pit.

Second, the summary

  • Suggest small partners from the top to the bottom bit by bit learning, so that the use of the components behind the logical. I use what to find the corresponding component, because itself is not very familiar with, so take some detours. But in practice, most of you have similar experiences with me. Take the time to go over the results first, but be sure to spend some time in your spare time or when you have more time on your project to go over them from beginning to end, so that they are more holistic and understood and used in a deeper way.
  • Plug-in extensions are also good. I mainly used Excel extension plug-in, export Excel implementation is very convenient. The plug-in uses the following figure, data reference documentation

  • LayUI’s official documentation is too simple, hopefully the official author will realize this and cover the scene more fully.
  • There are many components in the plugin extension, if you want to do any function first check whether there is already written, to prevent duplicate wheel.