Front end data bidirectional binding realization method based on accessor hijack
An implementation method and accessor technology, applied in the direction of electrical digital data processing, instruments, program control devices, etc., can solve the problems of limited amount of monitoring data, page cycle time suspended animation, etc., to improve monitoring efficiency, simplify complexity, and improve development The effect of efficiency and maintenance efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment
[0046] The first step is to add various necessary binding attributes in the label of the interface template, and specify the monitoring data name bound to the attribute. Various binding attributes are shown in Table 1. code show as below:
[0047]
[0048]
[0049]
[0050] Table 1 Binding attribute table
[0051]
[0052]
[0053] The second step is to create a ViewModel object to which the monitoring data belongs, and declare and initialize the monitoring data under it. code show as below:
[0054] var model = gs.define('hello', function(vm){
[0055] vm.name = null;
[0056]});
[0057] The third step is to scan the binding attribute on the interface label. When the monitoring data name bound by the binding property is the same as the monitoring data name under the ViewModel to which the label belongs, bind the DOM object corresponding to the label with the monitoring data .
[0058] The fourth step is to use the Object.defineProperty (define standard prop...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 