Front-end component library construction method and device and storage medium
A technology of front-end components and construction methods, applied in the computer field, can solve the problems of incompatibility with different WEB development frameworks, unfavorable project development, testing and maintenance, poor reusability and portability, etc., to improve reusability and portability, guaranteeing validity and usability, and reducing the cost of testing
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0039] Such as figure 1 As shown, a front-end component library construction method includes the following steps:
[0040] S1. Build the underlying processing module. The underlying processing module includes the underlying element unit and the visual model unit. The underlying element unit is used to initialize components, mount components, unload components, trigger binding events, and manage component status and life cycle;
[0041] Visual model units are used to implement internal two-way binding;
[0042] Wherein, the underlying element unit is provided with a template management subunit and a core subunit, and the template management subunit is used to process the HTML template set of the custom element and realize the separation of HTML and script;
[0043] The core subunit is used to coordinate the relationship between the scope, the visualization model and the underlying processing modules.
[0044] The core subunit is connected with an event bus, and the event bus ...
Embodiment 2
[0085] In this embodiment, the method proposed by the present invention is applied and the React framework is used. First, a project based on React needs to be prepared, and a component library is obtained by introducing the construction into the project. Using the component tags, properties and methods provided by the component library documents, the combined use of drop-down boxes and buttons and the two-way binding scenario are realized. The application code is as follows Figure 7 As shown, in this embodiment, eui-select represents a select drop-down component, eui-button represents a button; eui-width, eui-multiple, and eui-value represent component attributes, eui-change represents an event attribute, and onClick represents component event triggering; eui-model is two-way binding and interacts with eui-value.
Embodiment 3
[0087] This embodiment also uses the React framework to implement Figure 8 The combined usage scenario of the form, input box, drop-down box, and check box shown in Figure 9 is a schematic diagram of the application code of this embodiment, where eui-form represents a form component, eui-input represents an input box component, and eui- label indicates the label label, eui-checkbox indicates the check box component; eui-width, eui-multiple, eui-value indicate the component attribute, and eui-value indicates the assignment attribute.
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com