CN112631571A - Linkage method and device for components in web editor - Google Patents

Linkage method and device for components in web editor Download PDF

Info

Publication number
CN112631571A
CN112631571A CN202011337378.2A CN202011337378A CN112631571A CN 112631571 A CN112631571 A CN 112631571A CN 202011337378 A CN202011337378 A CN 202011337378A CN 112631571 A CN112631571 A CN 112631571A
Authority
CN
China
Prior art keywords
linkage
action
component
asynchronous
code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011337378.2A
Other languages
Chinese (zh)
Inventor
姚炜
陈英杰
韩志万
黄冬朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Lanzhuo Industrial Internet Information Technology Co ltd
Original Assignee
Zhejiang Lanzhuo Industrial Internet Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Lanzhuo Industrial Internet Information Technology Co ltd filed Critical Zhejiang Lanzhuo Industrial Internet Information Technology Co ltd
Priority to CN202011337378.2A priority Critical patent/CN112631571A/en
Publication of CN112631571A publication Critical patent/CN112631571A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a linkage method and a device for components in a web editor, wherein the linkage method comprises the following steps: determining the binding relationship between a first component and a second component in a web editor, and selecting the linkage action of the triggering action of the first component and the second component based on the binding relationship; configuring linkage modes of a first assembly and a second assembly, wherein the linkage modes comprise synchronous linkage and asynchronous linkage; and if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component. The triggering action, the linkage action and the linkage mode among the components are configured in advance, and when the web page is edited, scripts do not need to be written, so that the technical threshold of web page editing is reduced, and the development efficiency of engineers is improved.

Description

Linkage method and device for components in web editor
Technical Field
The invention belongs to the field of web editors, and particularly relates to a linkage method and device for components in a web editor.
Background
With the improvement of browser performance, more and more editors start to be web-based, more and more web editors are applied, and a large number of web editors are generated at present, so that a user can generate a self-defined webpage by using a mouse dragging function. There are typically many web components available in a web editor, such as a date component, an input box component, a button component, etc.
However, a problem that rapid linkage cannot be achieved among a plurality of web components exists, generally, linkage among the components includes two aspects of text input and format attribute modification, wherein the text input is for example to modify the content of an input box component, and the format attribute modification is for example to reset the background color of the input box component by clicking a button component.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a linkage method of components in a web editor, which comprises the following steps:
determining the binding relationship between a first component and a second component in a web editor, and selecting the linkage action of the triggering action of the first component and the second component based on the binding relationship;
configuring linkage modes of a first assembly and a second assembly, wherein the linkage modes comprise synchronous linkage and asynchronous linkage;
and if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component.
Optionally, the determining a binding relationship between a first component and a second component in the web editor, and selecting a linkage action between a trigger action of the first component and the second component based on the binding relationship includes:
respectively dragging a first component and a second component in a web editor to a preset area, and establishing a binding relationship between the first component and the second component by binding IDs of the components in the preset area;
selecting a trigger action from the action list of the first component, acquiring an action list of the second component based on the binding relationship, and selecting a linkage action corresponding to the trigger action from the action list of the second component.
Optionally, configuring a linkage mode of the first assembly and the second assembly, where the linkage mode includes a synchronous linkage and an asynchronous linkage, includes:
judging whether the time for starting to execute the linkage action is related to the execution result of the trigger action;
and if the linkage mode is related, configuring the linkage mode as asynchronous linkage, and if the linkage mode is not related, configuring the linkage mode as synchronous linkage.
Optionally, if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component, where the method includes:
if the linkage action is taken as a text input action, acquiring a universal code template for inputting a text;
when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, acquiring specific execution content of the trigger action;
inquiring a pre-stored database according to the specific execution content of the trigger action, and filling an inquiry result into a general code template to generate an asynchronous linkage code;
and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component.
Optionally, if the linkage mode is asynchronous linkage, generating an asynchronous linkage code based on the linkage action, executing the asynchronous linkage code when feedback information of the trigger action is acquired, and executing the asynchronous linkage code through the second component, further comprising:
if the execution action is a format modification action, acquiring a universal code template for modifying the format;
when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, filling modified format information into a universal code template to generate an asynchronous linkage code;
and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component.
The invention also provides a linkage device of components in a web editor based on the same idea, which is characterized by comprising the following components:
a binding unit: the web editor system is used for determining the binding relationship between a first component and a second component in the web editor, and selecting the linkage action of the trigger action of the first component and the second component based on the binding relationship;
a linkage unit: a linkage mode for configuring the first assembly and the second assembly, the linkage mode comprising a synchronous linkage and an asynchronous linkage;
an execution unit: and if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component.
Optionally, the binding unit is specifically configured to:
respectively dragging a first component and a second component in a web editor to a preset area, and establishing a binding relationship between the first component and the second component by binding IDs of the components in the preset area;
selecting a trigger action from the action list of the first component, acquiring an action list of the second component based on the binding relationship, and selecting a linkage action corresponding to the trigger action from the action list of the second component.
Optionally, the linkage unit is specifically configured to:
judging whether the time for starting to execute the linkage action is related to the execution result of the trigger action;
and if the linkage mode is related, configuring the linkage mode as asynchronous linkage, and if the linkage mode is not related, configuring the linkage mode as synchronous linkage.
Optionally, the execution unit is specifically configured to:
if the linkage action is taken as a text input action, acquiring a universal code template for inputting a text;
when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, acquiring specific execution content of the trigger action;
inquiring a pre-stored database according to the specific execution content of the trigger action, and filling an inquiry result into a general code template to generate an asynchronous linkage code;
and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component.
Optionally, the execution unit is further specifically configured to:
if the linkage mode is asynchronous linkage, acquiring a universal code template for inputting a text;
if the execution action is a format modification action, acquiring a universal code template for modifying the format;
when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, filling modified format information into a universal code template to generate an asynchronous linkage code;
and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component.
The technical scheme provided by the invention has the beneficial effects that:
the method configures the triggering action, the linkage action and the linkage mode among the components in the web editor, realizes the linkage action to be executed only after receiving the feedback information of the triggering action by configuring asynchronous linkage, ensures that the success and the failure of the execution result can not be influenced by network factors or the configuration of a computer where a browser is positioned, and automatically adjusts the execution time according to dynamic factors to finish the execution result. When the linkage editing of the components in the web is carried out, since the linkage code is generated by the linkage method provided by the invention in advance, an engineer only needs to determine the trigger action and the linkage action during actual development, and linkage configuration can be automatically realized without independently writing a JavaScript script, so that the technical threshold of web page editing is reduced, and the development efficiency of the engineer is improved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for linking components in a web editor according to the present invention;
FIG. 2 is a block diagram of a linkage of components in a web editor according to the present invention.
Detailed Description
To make the structure and advantages of the present invention clearer, the structure of the present invention will be further described with reference to the accompanying drawings.
Example one
As shown in FIG. 1, the present invention provides a method for linking components in a web editor, comprising:
s1: determining the binding relationship between a first component and a second component in the web editor, and selecting the linkage action of the trigger action of the first component and the second component based on the binding relationship.
And selecting a first component and a second component according to actual association requirements, wherein the first component is an employee name input box, and the actual association requirements are that after the employee name is input into the input box of the first component, the department where the employee is located is automatically filled into the employee department input box, so that the employee department input box is determined to be the second component. In this embodiment, a visual web editor is used for linkage configuration of components, a first component and a second component in the web editor are respectively dragged to a preset area, and a binding relationship between the first component and the second component is established by binding IDs of the components in the preset area. And then, displaying an action list of the first component in a linkage function tab of the web editor, and selecting a trigger action in the action list of the first component. The action list includes but is not limited to single click, double click, text input and other actions, and the user selects one action in the action list as a trigger action. And after the triggering action of the first component is determined, acquiring an action list of the second component based on the binding relationship, wherein the action list comprises various actions which can be executed by the second component, such as text content modification, background color change, date format change and the like, the web editor displays the action list of the second component in a linkage column of the linkage function tab, and the linkage action corresponding to the triggering action is selected from the action list of the second component. For example, selecting "enter text" in the action list of the first component as the trigger action and selecting "enter text" in the action list of the second component as the linkage action.
The component IDs are fixed numbers that are pre-configured for components in the web editor, i.e., each ID uniquely specifies a component. In practical application, one component and a plurality of components may have linkage relation at the same time, so that the triggering action is bound with the component ID, the component with the linkage relation when the first component executes the triggering action can be accurately determined, the linkage relation among the components is conveniently determined, and disordered linkage relation definition is avoided.
S2: and configuring linkage modes of the first assembly and the second assembly, wherein the linkage modes comprise synchronous linkage and asynchronous linkage.
In practical applications, the execution of the linkage action may be related to the execution result of the trigger action, such as inputting the name of the employee in the input box as the first component, and automatically linking and inputting the department where the employee is located in the input box as the second component. When the execution of the trigger action is in a problem, the linkage action continues to be ordered, resulting in linkage disorder or linkage error. Therefore, it is necessary to determine the timing of executing the linkage action according to the execution result of the trigger action, and to restart the execution of the linkage action when the trigger action is successfully executed. The conventional linkage method only guarantees linkage success by uniformly delaying for a period of time, but when the triggering action fails to be executed due to network failure or too low equipment performance, linkage errors can be caused even if the triggering action is delayed for a period of time. Therefore, in order to solve the problems, a linkage mode of the first ship and the second assembly is set. The method specifically comprises the following steps:
judging whether the time for starting to execute the linkage action is related to the execution result of the trigger action; and if the linkage mode is related, configuring the linkage mode as asynchronous linkage, and if the linkage mode is not related, configuring the linkage mode as synchronous linkage.
In a general application scenario, it is determined whether the time when the linkage action is started to be executed is related to the execution result of the trigger action. The specific execution content of the trigger action and the linkage action refers to specific input text information or changed format information. For example, the specific execution content of the trigger action is "click" and the specific execution content of the linkage action is "background color changed to red"; for another example, the specific execution content of the trigger action is "input employee name", the specific execution content of the linkage action is "department where input employee is located", and the specific execution contents are different. Based on experience of linkage configuration, when specific execution contents of the trigger action and the linkage action are the same, the linkage action is generally unrelated to an execution result of the trigger action, so that a conventional linkage mode can meet requirements, namely, whether the trigger action is executed successfully or not, the linkage action is executed after the execution result of the trigger action. When the specific execution content of the triggering action and the linkage action is different, for example, the first component is an input box of the name of the employee, the second component is an input box of a department where the employee is located, and the contents of the input boxes are different, that is, the triggering action and the linkage action are different, the database query is required to be carried out on the name of the employee, the department where the employee is located can be input in the second component, that is, the linkage action is required to be executed according to the execution result of the triggering action. Therefore, by adopting the asynchronous linkage mode, even if the trigger action fails to be executed for some reason, the execution time of the linkage action can be dynamically adjusted, and the linkage error is avoided.
The linkage mode of the first assembly and the second assembly is defined, the linkage diversity is increased, the second assembly can be synchronously linked with the second assembly, linkage can be carried out after the trigger action of the first assembly is successfully executed according to actual conditions, and the configuration requirement of practical application is facilitated.
S3: and if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component.
The embodiment generates different types of asynchronous linkage codes according to the type of the linkage action, and specifically includes:
if the linkage action is taken as a text input action, acquiring a universal code template for inputting a text; when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, acquiring specific execution content of the trigger action; inquiring a pre-stored database according to the specific execution content of the trigger action, and filling an inquiry result into a general code template to generate an asynchronous linkage code; and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component. The universal code template for inputting the text, that is, the universal code template for the database query code, only needs to be filled with the query condition and the queried database during actual linkage configuration, and a person skilled in the art should know how to set the universal code template, which is not described herein again. For example, the triggering action of the first component is inputting the name of the employee, the linkage action of the second component is inputting the department where the employee is located, an asynchronous linkage code is generated based on a universal code template of an input text, the asynchronous linkage code is used for searching the department where the employee is located in a pre-stored database according to the name of the employee in the input box of the first component, and the searched department result is filled in the universal code template for inputting the text to obtain the asynchronous linkage code.
If the execution action is a format modification action, acquiring a universal code template for modifying the format; when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, filling modified format information into a universal code template to generate an asynchronous linkage code; and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component. The general code template for format modification only needs to be filled with modified specific format information during actual linkage configuration, and a person skilled in the art should know how to set the general code template, which is not described herein again. For example, the first component is a button component, the trigger action is a click, the linkage action of the second component is used as a modified date format, the specific execution content is to change the date format of 'xx month/xx day' in the input frame into the date format of 'xx month/xx day/xxxx year', modified format information, namely 'xx month/xx day/xxxx year' is filled in a general code template based on a changed format attribute to generate a linkage code, the linkage code is used for changing the date format in the input frame, and 'xx month/xx day/xxxx year' is format information, and the format information is filled in the general code template used for modifying the format to obtain the asynchronous linkage code.
The execution condition of the trigger action is monitored by taking a preset web server as a third party, if the execution of the trigger action fails, the linkage action is suspended, and the asynchronous linkage code is executed by the second component until the first component sends a feedback signal of successful execution, so that the linkage action can automatically adjust the execution time according to the execution result of the trigger action and the dynamic factor, and the linkage action is not influenced by network factors or the configuration of a computer where a browser is located, and the error rate of linkage is reduced. In this embodiment, a waiting time may also be set, and if the feedback signal of successful execution is not received all the time within the waiting time, a prompt of linkage failure is sent.
In this embodiment, the universal code template is artificially preset, and by means of the preset universal code template and the judgment on the trigger action, it is not necessary to compile a corresponding JavaScript script for each linkage action, so that the technical threshold of web page linkage component development is reduced, and the development efficiency is improved.
In this embodiment, the first component may be linked with a plurality of components, and each component linked with the first component may perform a linking action based on a different linking mode.
Example two
As shown in FIG. 2, the present invention provides a linkage 4 for components in a web editor, comprising:
the binding unit 41: the method is used for determining the binding relationship between the first component and the second component in the web editor, and selecting the linkage action of the trigger action of the first component and the second component based on the binding relationship.
And selecting a first component and a second component according to actual association requirements, wherein the first component is an employee name input box, and the actual association requirements are that after the employee name is input into the input box of the first component, the department where the employee is located is automatically filled into the employee department input box, so that the employee department input box is determined to be the second component. In this embodiment, a visual web editor is used for linkage configuration of components, a first component and a second component in the web editor are respectively dragged to a preset area, and a binding relationship between the first component and the second component is established by binding IDs of the components in the preset area. And then, displaying an action list of the first component in a linkage function tab of the web editor, and selecting a trigger action in the action list of the first component. The action list includes but is not limited to single click, double click, text input and other actions, and the user selects one action in the action list as a trigger action. And after the triggering action of the first component is determined, acquiring an action list of the second component based on the binding relationship, wherein the action list comprises various actions which can be executed by the second component, such as text content modification, background color change, date format change and the like, the web editor displays the action list of the second component in a linkage column of the linkage function tab, and the linkage action corresponding to the triggering action is selected from the action list of the second component. For example, selecting "enter text" in the action list of the first component as the trigger action and selecting "enter text" in the action list of the second component as the linkage action.
The component IDs are fixed numbers that are pre-configured for components in the web editor, i.e., each ID uniquely specifies a component. In practical application, one component and a plurality of components may have linkage relation at the same time, so that the triggering action is bound with the component ID, the component with the linkage relation when the first component executes the triggering action can be accurately determined, the linkage relation among the components is conveniently determined, and disordered linkage relation definition is avoided.
The linkage unit 42: a linkage mode for configuring the first and second assemblies, the linkage mode including synchronous and asynchronous linkages.
In practical applications, the execution of the linkage action may be related to the execution result of the trigger action, such as inputting the name of the employee in the input box as the first component, and automatically linking and inputting the department where the employee is located in the input box as the second component. When the execution of the trigger action is in a problem, the linkage action continues to be ordered, resulting in linkage disorder or linkage error. Therefore, it is necessary to determine the timing of executing the linkage action according to the execution result of the trigger action, and to restart the execution of the linkage action when the trigger action is successfully executed. The conventional linkage method only guarantees linkage success by uniformly delaying for a period of time, but when the triggering action fails to be executed due to network failure or too low equipment performance, linkage errors can be caused even if the triggering action is delayed for a period of time. Therefore, in order to solve the problems, a linkage mode of the first ship and the second assembly is set. The method specifically comprises the following steps:
judging whether the time for starting to execute the linkage action is related to the execution result of the trigger action; and if the linkage mode is related, configuring the linkage mode as asynchronous linkage, and if the linkage mode is not related, configuring the linkage mode as synchronous linkage.
In a general application scenario, it is determined whether the time when the linkage action is started to be executed is related to the execution result of the trigger action. The specific execution content of the trigger action and the linkage action refers to specific input text information or changed format information. For example, the specific execution content of the trigger action is "click" and the specific execution content of the linkage action is "background color changed to red"; for another example, the specific execution content of the trigger action is "input employee name", the specific execution content of the linkage action is "department where input employee is located", and the specific execution contents are different. Based on experience of linkage configuration, when specific execution contents of the trigger action and the linkage action are the same, the linkage action is generally unrelated to an execution result of the trigger action, so that a conventional linkage mode can meet requirements, namely, whether the trigger action is executed successfully or not, the linkage action is executed after the execution result of the trigger action. When the specific execution content of the triggering action and the linkage action is different, for example, the first component is an input box of the name of the employee, the second component is an input box of a department where the employee is located, and the contents of the input boxes are different, that is, the triggering action and the linkage action are different, the database query is required to be carried out on the name of the employee, the department where the employee is located can be input in the second component, that is, the linkage action is required to be executed according to the execution result of the triggering action. Therefore, by adopting the asynchronous linkage mode, even if the trigger action fails to be executed for some reason, the execution time of the linkage action can be dynamically adjusted, and the linkage error is avoided.
The linkage mode of the first assembly and the second assembly is defined, the linkage diversity is increased, the second assembly can be synchronously linked with the second assembly, linkage can be carried out after the trigger action of the first assembly is successfully executed according to actual conditions, and the configuration requirement of practical application is facilitated.
The execution unit 43: and if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component.
The embodiment generates different types of asynchronous linkage codes according to the type of the linkage action, and specifically includes:
if the linkage action is taken as a text input action, acquiring a universal code template for inputting a text; when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, acquiring specific execution content of the trigger action; inquiring a pre-stored database according to the specific execution content of the trigger action, and filling an inquiry result into a general code template to generate an asynchronous linkage code; and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component. The universal code template for inputting the text, that is, the universal code template for the database query code, only needs to be filled with the query condition and the queried database during actual linkage configuration, and a person skilled in the art should know how to set the universal code template, which is not described herein again. For example, the triggering action of the first component is inputting the name of the employee, the linkage action of the second component is inputting the department where the employee is located, an asynchronous linkage code is generated based on a universal code template of an input text, the asynchronous linkage code is used for searching the department where the employee is located in a pre-stored database according to the name of the employee in the input box of the first component, and the searched department result is filled in the universal code template for inputting the text to obtain the asynchronous linkage code.
If the execution action is a format modification action, acquiring a universal code template for modifying the format; when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, filling modified format information into a universal code template to generate an asynchronous linkage code; and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component. The general code template for format modification only needs to be filled with modified specific format information during actual linkage configuration, and a person skilled in the art should know how to set the general code template, which is not described herein again. For example, the first component is a button component, the trigger action is a click, the linkage action of the second component is used as a modified date format, the specific execution content is to change the date format of 'xx month/xx day' in the input frame into the date format of 'xx month/xx day/xxxx year', modified format information, namely 'xx month/xx day/xxxx year' is filled in a general code template based on a changed format attribute to generate a linkage code, the linkage code is used for changing the date format in the input frame, and 'xx month/xx day/xxxx year' is format information, and the format information is filled in the general code template used for modifying the format to obtain the asynchronous linkage code.
The execution condition of the trigger action is monitored by taking a preset web server as a third party, if the execution of the trigger action fails, the linkage action is suspended, and the asynchronous linkage code is executed by the second component until the first component sends a feedback signal of successful execution, so that the linkage action can automatically adjust the execution time according to the execution result of the trigger action and the dynamic factor, and the linkage action is not influenced by network factors or the configuration of a computer where a browser is located, and the error rate of linkage is reduced. In this embodiment, a waiting time may also be set, and if the feedback signal of successful execution is not received all the time within the waiting time, a prompt of linkage failure is sent.
In this embodiment, the universal code template is artificially preset, and by means of the preset universal code template and the judgment on the trigger action, it is not necessary to compile a corresponding JavaScript script for each linkage action, so that the technical threshold of web page linkage component development is reduced, and the development efficiency is improved.
In this embodiment, the first component may be linked with a plurality of components, and each component linked with the first component may perform a linking action based on a different linking mode.
The sequence numbers in the above embodiments are merely for description, and do not represent the sequence of the assembly or the use of the components.
The above description is only exemplary of the present invention and should not be taken as limiting the invention, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for linking components within a web editor, the method comprising:
determining the binding relationship between a first component and a second component in a web editor, and selecting the linkage action of the triggering action of the first component and the second component based on the binding relationship;
configuring linkage modes of a first assembly and a second assembly, wherein the linkage modes comprise synchronous linkage and asynchronous linkage;
and if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component.
2. The method for linkage of components in a web editor according to claim 1, wherein the determining of the binding relationship between the first component and the second component in the web editor, and the selecting of the linkage action of the triggering action of the first component and the second component based on the binding relationship comprise:
respectively dragging a first component and a second component in a web editor to a preset area, and establishing a binding relationship between the first component and the second component by binding IDs of the components in the preset area;
selecting a trigger action from the action list of the first component, acquiring an action list of the second component based on the binding relationship, and selecting a linkage action corresponding to the trigger action from the action list of the second component.
3. The method of claim 1, wherein configuring the linkage mode of the first component and the second component comprises synchronous linkage and asynchronous linkage, and comprises:
judging whether the time for starting to execute the linkage action is related to the execution result of the trigger action;
and if the linkage mode is related, configuring the linkage mode as asynchronous linkage, and if the linkage mode is not related, configuring the linkage mode as synchronous linkage.
4. The method according to claim 1, wherein if the linkage mode is asynchronous linkage, acquiring feedback information of a trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code by the second component, comprises:
if the linkage action is taken as a text input action, acquiring a universal code template for inputting a text;
when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, acquiring specific execution content of the trigger action;
inquiring a pre-stored database according to the specific execution content of the trigger action, and filling an inquiry result into a general code template to generate an asynchronous linkage code;
and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component.
5. The method of claim 1, wherein if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component, further comprising:
if the execution action is a format modification action, acquiring a universal code template for modifying the format;
when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, filling modified format information into a universal code template to generate an asynchronous linkage code;
and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component.
6. A linkage for components within a web editor, the linkage comprising:
a binding unit: the web editor system is used for determining the binding relationship between a first component and a second component in the web editor, and selecting the linkage action of the trigger action of the first component and the second component based on the binding relationship;
a linkage unit: a linkage mode for configuring the first assembly and the second assembly, the linkage mode comprising a synchronous linkage and an asynchronous linkage;
an execution unit: and if the linkage mode is asynchronous linkage, acquiring feedback information of the trigger action, generating an asynchronous linkage code by combining the linkage action and the feedback information, and executing the asynchronous linkage code through the second component.
7. The linkage of components within a web editor of claim 6, wherein the binding unit is specifically configured to:
respectively dragging a first component and a second component in a web editor to a preset area, and establishing a binding relationship between the first component and the second component by binding IDs of the components in the preset area;
selecting a trigger action from the action list of the first component, acquiring an action list of the second component based on the binding relationship, and selecting a linkage action corresponding to the trigger action from the action list of the second component.
8. A linkage arrangement for a component within a web editor as claimed in claim 6, wherein the linkage unit is particularly adapted to:
judging whether the time for starting to execute the linkage action is related to the execution result of the trigger action;
and if the linkage mode is related, configuring the linkage mode as asynchronous linkage, and if the linkage mode is not related, configuring the linkage mode as synchronous linkage.
9. The linkage of components within a web editor of claim 6, wherein the execution unit is specifically configured to:
if the linkage action is taken as a text input action, acquiring a universal code template for inputting a text;
when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, acquiring specific execution content of the trigger action;
inquiring a pre-stored database according to the specific execution content of the trigger action, and filling an inquiry result into a general code template to generate an asynchronous linkage code;
and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component.
10. The linkage of components within a web editor of claim 6, wherein the execution unit is further configured to:
if the execution action is a format modification action, acquiring a universal code template for modifying the format;
when the trigger action occurs, monitoring feedback information containing a trigger action execution result through a preset web server, and if the feedback information shows that the trigger action is successfully executed, filling modified format information into a universal code template to generate an asynchronous linkage code;
and sending the asynchronous linkage code to the second component based on the binding relationship, and executing the asynchronous linkage code through the second component.
CN202011337378.2A 2020-11-25 2020-11-25 Linkage method and device for components in web editor Pending CN112631571A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011337378.2A CN112631571A (en) 2020-11-25 2020-11-25 Linkage method and device for components in web editor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011337378.2A CN112631571A (en) 2020-11-25 2020-11-25 Linkage method and device for components in web editor

Publications (1)

Publication Number Publication Date
CN112631571A true CN112631571A (en) 2021-04-09

Family

ID=75303803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011337378.2A Pending CN112631571A (en) 2020-11-25 2020-11-25 Linkage method and device for components in web editor

Country Status (1)

Country Link
CN (1) CN112631571A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114547519A (en) * 2022-02-24 2022-05-27 京东方数字科技有限公司 Page editing method and device, electronic equipment and readable storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573700A (en) * 2003-06-13 2005-02-02 微软公司 Mechanism for asynchronous components to be application framework agnostic
US20090259934A1 (en) * 2008-04-11 2009-10-15 Go Hazel Llc System and method for rendering dynamic web pages with automatic ajax capabilities
EP2151773A1 (en) * 2008-08-05 2010-02-10 Accenture Global Services GmbH Synchronous to asynchronous web page conversion
CN104423932A (en) * 2013-08-21 2015-03-18 上海科泰世纪科技有限公司 Method for calling binary element in Javascript
CN107122185A (en) * 2017-04-21 2017-09-01 国网福建省电力有限公司 One kind shows method for the visualization of distribution network parameters category information
CN108572817A (en) * 2017-03-07 2018-09-25 北京京东尚科信息技术有限公司 The method, apparatus and medium of dynamic resource allocation based on business model
CN109375916A (en) * 2018-10-30 2019-02-22 成都四方伟业软件股份有限公司 Interactive Web Page method of combination and device
CN110007917A (en) * 2019-03-08 2019-07-12 国电南瑞科技股份有限公司 A kind of visual page generation and browsing method based on browser
CN110543350A (en) * 2019-09-09 2019-12-06 广州华多网络科技有限公司 Method and device for generating page component
CN111443911A (en) * 2020-03-24 2020-07-24 五八有限公司 Page development method and device, electronic equipment and computer storage medium
CN111639278A (en) * 2020-05-26 2020-09-08 北京三快在线科技有限公司 Webpage loading method and device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1573700A (en) * 2003-06-13 2005-02-02 微软公司 Mechanism for asynchronous components to be application framework agnostic
US20090259934A1 (en) * 2008-04-11 2009-10-15 Go Hazel Llc System and method for rendering dynamic web pages with automatic ajax capabilities
EP2151773A1 (en) * 2008-08-05 2010-02-10 Accenture Global Services GmbH Synchronous to asynchronous web page conversion
CN104423932A (en) * 2013-08-21 2015-03-18 上海科泰世纪科技有限公司 Method for calling binary element in Javascript
CN108572817A (en) * 2017-03-07 2018-09-25 北京京东尚科信息技术有限公司 The method, apparatus and medium of dynamic resource allocation based on business model
CN107122185A (en) * 2017-04-21 2017-09-01 国网福建省电力有限公司 One kind shows method for the visualization of distribution network parameters category information
CN109375916A (en) * 2018-10-30 2019-02-22 成都四方伟业软件股份有限公司 Interactive Web Page method of combination and device
CN110007917A (en) * 2019-03-08 2019-07-12 国电南瑞科技股份有限公司 A kind of visual page generation and browsing method based on browser
CN110543350A (en) * 2019-09-09 2019-12-06 广州华多网络科技有限公司 Method and device for generating page component
CN111443911A (en) * 2020-03-24 2020-07-24 五八有限公司 Page development method and device, electronic equipment and computer storage medium
CN111639278A (en) * 2020-05-26 2020-09-08 北京三快在线科技有限公司 Webpage loading method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114547519A (en) * 2022-02-24 2022-05-27 京东方数字科技有限公司 Page editing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US10325012B2 (en) Filtered stylesheets
JP7316349B2 (en) Customizable enterprise automation test framework
US6269460B1 (en) Dynamic enhancement of error condition handling and displayed error messages in computer operations
US8438418B2 (en) Simplifying automated software maintenance of data centers
CN107562556B (en) Failure recovery method, recovery device and storage medium
US20090287643A1 (en) Context based script generation
JP2000003347A (en) Computer system constitution change tracking method
JPH0727504B2 (en) System for defining network configuration, method for generating configuration parameters for network, and system for configuring network
JPH09185538A (en) Method and device for front end navigator and network architecture
US9646103B2 (en) Client-side template engine and method for constructing a nested DOM module for a website
US11625290B2 (en) Remote product invocation framework
CN103744680A (en) Method and device for business process processing
US20210117313A1 (en) Language agnostic automation scripting tool
US20160012147A1 (en) Asynchronous Initialization of Document Object Model (DOM) Modules
US20160012144A1 (en) Javascript-based, client-side template driver system
CN109284488B (en) Method, device and medium for modifying front-end table column data based on local storage
CN112506854B (en) Page template file storage and page generation methods, devices, equipment and media
CN111949607B (en) Method, system and device for monitoring UDT file
US20220229767A1 (en) Test script generation apparatus, test script generation method and program
CN114661375A (en) Application integration method and device
CN112631571A (en) Linkage method and device for components in web editor
CN114610334A (en) Product visualization deployment method, device, system and storage medium
CN104166551A (en) Application interface developing method and developing device
US20160012023A1 (en) Self-Referencing of Running Script Elements in Asynchronously Loaded DOM Modules
CN114860240A (en) Low-code page creating method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination