A bidirectional visualization conversion system and method based on VUE technology

Through the two-way visual conversion system based on VUE technology, two-way conversion and positioning between code and visual editing are realized, solving the problem of insufficient flexibility of complex page requirements, and improving development efficiency and ease of use.

CN118409745BActive Publication Date: 2024-10-11YANTAI HAIYI SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410888287.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-10-11
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

In existing software front-end development, especially pages with complex or personalized requirements, it is often necessary to manually write code to implement, resulting in insufficient flexibility in visual drag-and-drop development and difficulty in meeting needs.

Method used

Adopting a two-way visual conversion system based on VUE technology, through a two-way visual development framework, including local file operation services, code editors, source code parsers, visual editors and code generators, two-way conversion and positioning between code and visual editing are achieved , allowing users to freely switch between code and visualization modes.

Benefits of technology

It significantly improves development efficiency, achieves real-time synchronization of code and visual editing, enhances development flexibility and ease of use, and avoids the cumbersome operations of frequently switching views and finding code locations in traditional development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118409745B_ABST
    Figure CN118409745B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of software front-end development, and specifically relates to a two-way visual conversion system and method based on VUE technology. When the code editor is opened, the local file operation service reads the page file source code of the local file and provides it to the code editor for display; when the visual editor is opened, the local file operation service reads the page file source code of the local file and provides it to the source code parser; the source code parser uses AST conversion technology to convert the source code into a data model of a JSON structure; the visual editor reads the data model of the JSON structure, reversely parses it into component elements of the page, and displays the content through a visual design page. The present invention uses two-way conversion technology to synchronize changes between the visual editor and the code editor in real time, providing a seamless user experience and meeting the user's dual needs for visualization and code editing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of software front-end development, and in particular relates to a bidirectional visualization conversion system and method based on VUE technology. Background Art

[0002] Currently, there are two main modes for software front-end development: one is to manually write front-end code, and the other is to generate front-end code by visual dragging. For developers, the front-end code generated by visual dragging is not flexible enough. When facing particularly complex or highly personalized businesses, it is often difficult to meet the needs by relying solely on visual dragging, and manual coding is required.

[0003] For a specific function page, if the page requirements involved cannot be fully realized through visual drag and drop, then the whole will be manually written code, which greatly reduces the application effect of visual drag and drop development. The current common solution is to divide the code of the page function into a visual editing area and a code editing area. Visual drag and drop only generates code in the visual editing area, and manual code can only be written in the code editing area, without interfering with each other. However, under this division, flexibility is limited to a certain extent, and it is difficult to expand freely. Summary of the invention

[0004] In order to overcome the problems in the prior art, the present invention proposes a bidirectional visualization conversion system and method based on VUE technology.

[0005] The technical solution of the present invention to solve the above technical problems is as follows:

[0006] In a first aspect, the present invention provides a bidirectional visualization conversion system based on VUE technology, the system comprising a bidirectional visualization development framework based on VUE;

[0007] The VUE-based two-way visual development framework includes: local file operation service, code editor, source code parser, visual editor, code generator;

[0008] A local file operation service is used to read the page file source code of a local file and provide it to a source code parser or a code editor, wherein the page file source code includes HTML source code and JavaScript source code; and is used to receive the page file source code from a code generator so as to write the page file source code into a local file;

[0009] A code editor is used to read the page file source code of the local file from the local file operation service, display it, and write or modify the page code;

[0010] Source code parser, used to convert the written or modified page code or page file source code into a data model of JSON structure using AST conversion technology;

[0011] The visual editor receives the JSON data model from the source code parser and converts it into component elements of the page, presenting the content through the visual design page; it is also used to handle the user's drag and drop and configuration operations, and save these changes back to the JSON data model;

[0012] The code generator is used to read the data model of the JSON structure, generate the page file source code and provide it to the code editor; at the same time, it is used to provide the page file source code to the local file operation service so that the page file source code can be written into the local file.

[0013] Furthermore, it also includes a two-way positioning module for visualization and code, which includes a code locator. The code locator is used to receive component information or component event information of the visual editor, and find the code and calculate the number of lines and position based on the component information or component event information, and send it to the code editor.

[0014] Furthermore, the visualization and code bidirectional positioning module also includes a component locator, which is used to receive the code tag name or the JavaScript method name of the code sent by the code editor, find the corresponding component object according to the code tag name, or find the corresponding component event list according to the JavaScript method name of the code, and display the component event list referenced by the JavaScript method in the code editor by popping up a floating layer.

[0015] In a second aspect, the present invention provides a bidirectional visualization conversion method based on VUE technology, comprising the following steps:

[0016] When the code editor is opened, the local file operation service reads the page file source code of the local file and provides it to the code editor for display;

[0017] When the visual editor is opened, the local file operation service reads the page file source code of the local file and provides it to the source code parser; the source code parser uses AST conversion technology to convert the source code into a data model of a JSON structure; the visual editor reads the data model of the JSON structure, reversely parses it into component elements of the page, and displays the content through a visual design page.

[0018] Furthermore, if the page code is written or modified in the code editor, the source code parser reads the page code and converts the page code into a data model of a JSON structure, which is provided to the visual editor for page display; the page code in the code editor is provided to the local file operation service to write the page file source code into a local file.

[0019] Furthermore, if a component is dragged in the visual editor, the visual editor will convert the changed content into a data model of a JSON structure; the code generator reads the data model of the JSON structure, generates a page file source code and provides it to the code editor; at the same time, the code generator provides the page file source code to the local file operation service so that the page file source code can be written into a local file.

[0020] Furthermore, it also includes: positioning of components, specifically including:

[0021] A component is selected in the visual editor, and the visual editor passes the information of the selected component to the code locator; the code locator finds the code and calculates the line number and position according to the component information, and sends it to the code editor; the code editor positions the cursor at the corresponding line number and position according to the received line number and position.

[0022] Furthermore, it also includes: positioning of code tags, specifically including:

[0023] The user clicks on the tag name of the code; the code editor passes the tag name and ID name selected by the user to the component locator; the component locator finds the corresponding component object based on the tag and ID name and sends it to the visual editor; the visual editor receives the component object and sets the component to the selected state in the visual editing interface.

[0024] Furthermore, it also includes: positioning of visual component events, specifically including:

[0025] The user selects a component in the visual editor and clicks the event name of the component. The visual editor passes the event information of the component selected by the user to the code locator. The code locator finds the JavaScript method in the code based on the component event information, calculates the line number and position, and sends it to the code editor. The code editor positions the cursor at the corresponding line number and position based on the received line number and position.

[0026] Furthermore, it also includes: positioning of JavaScript methods, specifically including:

[0027] The user clicks on the JavaScript method name of the code; the code editor passes the JavaScript method name selected by the user to the component locator; the component locator traverses all component objects based on the JavaScript method name, finds the corresponding component event list, and returns it to the code editor; the code editor receives the component event list and displays the component event list referenced by the JavaScript method in the code editor by means of a pop-up floating layer.

[0028] Compared with the prior art, the present invention has the following technical effects:

[0029] The present invention generates front-end page code through visual dragging, so that users can quickly build interfaces without writing cumbersome codes, which significantly improves development efficiency. The present invention allows page source code to be modified directly in the browser interface editor, and these modifications can be completely reverse parsed into a model and reflected in the visual editor, supporting users to switch freely between code and visualization modes, enhancing development flexibility and improving ease of use. The present invention uses two-way conversion technology to synchronize changes between the visual editor and the code editor in real time, providing a seamless user experience and meeting the user's dual needs for visualization and code editing. Through two-way positioning and linkage, the present invention allows users to seamlessly switch development modes during the development process, and no longer needs to manually search and compare code and visualization components, avoiding the cumbersome operations of frequently switching views and searching for code locations in traditional development. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 It is a structural block diagram of a bidirectional visualization development framework based on VUE of the present invention;

[0032] Figure 2 It is a structural block diagram of the bidirectional positioning module of visualization and code of the present invention;

[0033] Figure 3 The figure is a flow chart of the bidirectional visual conversion method based on VUE of the present invention. DETAILED DESCRIPTION

[0034] In order to facilitate understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Typical embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0035] Visual Studio Code is a cross-platform source code editor developed by Microsoft that supports Mac OSX, Windows, and Linux operating systems. It is a lightweight but powerful tool that is particularly suitable for the development of modern Web and cloud applications.

[0036] Vue.js (often referred to as VUE) is a progressive JavaScript framework for building user interfaces. It aims to implement responsive data binding and combined view components through a concise API. VUE's core library focuses on the view layer, making it easy to integrate with other libraries or existing projects.

[0037] JavaScript ("JS" for short) is a lightweight, interpreted or just-in-time compiled programming language with function priority. JavaScript is a prototype-based, multi-paradigm dynamic scripting language that supports object-oriented, imperative, declarative, and functional programming paradigms.

[0038] JSON (JavaScript Object Notation, JS object notation) is a lightweight data exchange format.

[0039] In front-end page development, you need to import the source code of the VUE-based visual development framework in the local Visual Studio Code integrated development environment and start the framework; then, open the front-end visual development function through the browser. Visual dragging is based on Vue.Draggable technology and supports two ways of dragging: one is to drag directly in the interface, and the other is to drag in the layout structure tree. This function can complete the layout development of complex interfaces. Components in the layout interface support copying and deletion, and operations support back and forward.

[0040] The visual drag and drop development and code development of the front-end page are both run in the browser, providing a visual editor and a code editor. The visual editor and the code editor support two-way conversion and two-way positioning, that is, the drag and drop adjustment function in the visual editor can directly generate code, and the code modification can be reversely parsed in the visual editor.

[0041] The visual editor and the code editor are linked with the mouse selection. When the visual editor selects a component, the code editor automatically positions the cursor on the code label; when the visual editor clicks the event name of the component, it will jump to the JavaScript event method of the code editor. When you click the label name in the code editor, the current component will be selected in the visual editor; when you click the JavaScript method name in the code editor, a pop-up window will display the component event list referenced by the method.

[0042] Due to the security restrictions of the browser, direct operation of local files is not allowed. Therefore, when it is necessary to read the page file source code to generate a visual drag interface, corresponding services are needed to support these operations, such as file creation, directory reading and updating. The present invention provides a local file operation service to read the page file source code, which includes two parts: HTML source code and JavaScript source code. All these source codes are converted into corresponding data models through AST (abstract syntax tree) conversion technology. Through these data models, the corresponding content can be displayed in the visual drag interface.

[0043] In order to better understand the above-mentioned technical scheme, the above-mentioned technical scheme will be described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical scheme of the present invention, rather than limitations on the technical scheme of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0044] In one embodiment of the present invention, referring to Figure 1 , provides a bidirectional visual conversion system based on VUE technology, the system includes a bidirectional visual development framework based on VUE;

[0045] The VUE-based two-way visual development framework includes: local file operation service, source code parser, visual editor, and code generator;

[0046] A local file operation service is used to read the page file source code of a local file and provide it to a source code parser or a code editor, wherein the page file source code includes HTML source code and JavaScript source code; and is used to receive the page file source code from a code generator so as to write the page file source code into a local file;

[0047] Specifically, during the visual loading process, when the code editor is opened, the local file operation service reads the local page file source code and provides it to the code editor for display; during the visual loading process, when the visual editor is opened, the local file operation service reads the page file source code and provides it to the source code parser; during the visual development process, the code generator provides the page file source code to the local file operation service, and the local file operation service receives the page file source code from the code generator so as to write the page file source code into the local file.

[0048] A code editor is used to read the page file source code of the local file from the local file operation service, display it, and write or modify the page code;

[0049] Specifically, during the visual loading process, the local file operation service reads the local page file source code, and the code editor reads the local page file source code from the local file operation service for display;

[0050] During the code development process, users write or modify page codes in the code editor and provide the written or modified page codes to the source code parser; the page source code can be modified directly in the browser interface code editor, and these modifications can be completely reverse parsed into a model and reflected in the visual editor. Users are supported to switch freely between code and visualization modes, which enhances development flexibility and improves ease of use.

[0051] Source code parser, used to convert the written or modified page code or page file source code into a data model of JSON structure using AST conversion technology;

[0052] Specifically, during the visual loading process, when the code editor is opened, the source code parser uses AST conversion technology to convert the page file source code into a data model with a JSON structure;

[0053] During the code development process, when the user writes or modifies the page code in the code editor, the source code parser reads the written or modified page code and converts it into a data model with a JSON structure, which is then provided to the visual editor for page display.

[0054] The visual editor receives the JSON data model from the source code parser and converts it into the component elements of the page, including the component definition, property configuration, event configuration, etc., and displays the content through the visual design page; it is also used to handle the user's drag and drop and configuration operations, and save these changes back to the JSON data model;

[0055] Specifically, during the visual loading process, the visual editor reads the data model of the JSON structure and reversely parses it into the component elements of the page, including the definition, property configuration, event configuration, etc. of the component, and displays the content through the visual design page;

[0056] When users drag and drop components in the visual editor for development, the visual editor converts the changes into a data model with a JSON structure.

[0057] The code generator is used to read the data model of the JSON structure, generate the page file source code and provide it to the code editor; at the same time, it is used to provide the page file source code to the local file operation service so that the page file source code can be written into the local file.

[0058] Specifically, during the visual development process, the code generator reads the data model of the JSON structure, generates the page file source code and provides it to the code editor; at the same time, the code generator provides the page file source code to the local file operation service so that the page file source code can be written into the local file. The code generator needs to ensure that the generated code has as little difference as possible from the original code to facilitate merging and version control.

[0059] In this embodiment, refer to Figure 2 , also includes a two-way positioning module for visualization and code, the two-way positioning module for visualization and code includes a code locator, the code locator is used to receive component information or component event information of the visual editor, and find the code and calculate the number of lines and position according to the component information or component event information, and send it to the code editor.

[0060] Specifically, when a component is selected in the visual editor, the code locator is used to receive information about the component selected by the visual editor, and find the code and calculate the number of lines and position based on the component information, and send it to the code editor; the code editor is used to receive the number of lines and position information sent by the code locator, and position the cursor at the corresponding number of lines and position.

[0061] Specifically, in the process of locating a visual component event, the user selects a component in the visual editor and clicks the event name of the component; the visual editor is used to pass the component event information selected by the user to the code locator; the code locator is used to find the JavaScript method in the code based on the component event information and calculate the line number and position, and send it to the code editor; the code editor is used to receive the line number and position information sent by the code locator, and position the cursor at the corresponding line number and position.

[0062] In this embodiment, the visualization and code bidirectional positioning module also includes a component locator, which is used to receive the code tag name or the JavaScript method name of the code sent by the code editor, find the corresponding component object according to the code tag name, or find the corresponding component event list according to the JavaScript method name of the code, and display the component event list referenced by the JavaScript method in the code editor by popping up a floating layer. The component locator serves as a bridge connecting the code editor and the visual editor, realizing the bidirectional positioning and linkage between the code and the visual component.

[0063] Specifically, when the user clicks on the tag name of the code, the code editor passes the tag name and ID name selected by the user to the component locator. The component locator is used to find the corresponding component object according to the tag and ID name and send it to the visual editor; the visual editor is used to receive the component object and set the component to a selected state in the visual editing interface.

[0064] Specifically, during the JavaScript method locating process, the user clicks on the JavaScript method name of the code; the code editor is used to pass the JavaScript method name selected by the user to the component locator; the component locator is used to traverse all component objects according to the JavaScript method name, find the corresponding component event list, and return it to the code editor; the code editor is used to receive the component event list and display the method reference information by popping up a floating layer.

[0065] In the present invention, the page code no longer distinguishes between the visual editing area and the code editing area, and all supports manual code writing. When it is necessary to convert to visual drag, the system can parse the code structure and reversely parse it into visual content, so as to realize free switching between visual editing and code editing. At the same time, the component elements in the page and the labels and JavaScript method elements in the code can be bidirectionally positioned according to the identification information. When a component is selected, the code editor can automatically locate the code tag to which the component belongs; when the event name of the component is clicked, it can be located in the event method in the code. Conversely, you can also click the tag name or method name in the code to select the component and display the information referenced by the method.

[0066] Based on the same inventive concept, an embodiment of the present invention further provides a bidirectional visualization conversion system based on VUE technology for implementing the above-mentioned bidirectional visualization conversion method based on VUE technology. The implementation solution provided by the system to solve the problem is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more system embodiments provided below can refer to the above-mentioned limitations on a bidirectional visualization conversion method based on VUE technology, which will not be repeated here.

[0067] In another embodiment of the present invention, referring to Figure 3 , provides a bidirectional visual conversion method based on VUE, including the following steps:

[0068] Step 1: Import the VUE-based two-way visual development framework into the Visual Studio Code integrated development environment;

[0069] Step 2: Run the VUE-based two-way visual development framework in Visual Studio Code, and start the local file operation service locally;

[0070] Step 3: Open the front-end page list through the browser, and click a page to open an editor, which includes a visual editor and a code editor;

[0071] Step 4: When the code editor is opened, the local file operation service reads the page file source code of the local file and provides it to the code editor for display.

[0072] If you write or modify the page code in the code editor, the source code parser reads the page code and converts it into a data model with a JSON structure, which is provided to the visual editor for page display; the page code in the code editor is provided to the local file operation service to write the page file source code into a local file.

[0073] Step 5: When the visual editor is opened, the local file operation service reads the page file source code of the local file and provides it to the source code parser; the source code parser uses AST conversion technology to convert the source code into a data model of JSON structure; the visual editor reads the data model of JSON structure and reversely parses it into component elements of the page. The component elements of the page include component definition, property configuration, and event configuration, and the content is displayed through a visual design page.

[0074] If you drag and drop components in the visual editor, the visual editor will convert the changed content into a data model with a JSON structure; the code generator reads the data model with a JSON structure, generates the page file source code and provides it to the code editor; at the same time, the code generator provides the page file source code to the local file operation service so that the page file source code can be written into the local file.

[0075] Specifically, the local page file source code is passed to the source code parser, and the source code parser uses AST conversion technology to convert the source code into a data model with a JSON structure. The internal steps include:

[0076] Read the page file source code, if the extracted string starts with <script>开头,将<script>与< / script> The content in the middle is converted into a JSON structure as a JavaScript code segment through the Babel JavaScript compiler and AST technology, and then stored in the data model;

[0077] If the extracted string is under the label At the beginning, Tags and internal HTML codes are converted into JSON structure through AST technology and stored in the data model;

[0078] Merge the data models of JavaScript and HTML to generate a complete data model for the source code.

[0079] In this embodiment, the positioning of the components is also included, which specifically includes:

[0080] A component is selected in the visual editor, and the visual editor passes the information of the selected component to the code locator; the code locator finds the code and calculates the line number and position according to the component information, and sends it to the code editor; the code editor positions the cursor at the corresponding line number and position according to the received line number and position.

[0081] In this embodiment, the positioning of the code label is also included, which specifically includes:

[0082] The user clicks on the tag name of the code; the code editor passes the tag name and ID name selected by the user to the component locator; the component locator finds the corresponding component object based on the tag and ID name and sends it to the visual editor; the visual editor receives the component object and sets the component to the selected state in the visual editing interface.

[0083] In this embodiment, it also includes: positioning of the visualization component event, specifically including:

[0084] The user selects a component in the visual editor and clicks the event name of the component. The visual editor passes the event information of the component selected by the user to the code locator. The code locator finds the JavaScript method in the code based on the component event information, calculates the line number and position, and sends it to the code editor. The code editor positions the cursor at the corresponding line number and position based on the received line number and position.

[0085] In this embodiment, it also includes: positioning of JavaScript methods, specifically including:

[0086] The user clicks on the JavaScript method name of the code; the code editor passes the JavaScript method name selected by the user to the component locator; the component locator traverses all component objects based on the JavaScript method name, finds the corresponding component event list, and returns it to the code editor; the code editor receives the component event list and displays the method reference information in the code editor by popping up a floating layer.

[0087] The visual development framework and two-way visual conversion of the present invention not only support the generation of front-end page code through visual dragging, but also allow the source code of the page to be modified directly in the browser code editor, and the modified page source code can be completely reverse parsed into a data model and reflected in the visual editor, allowing it to be adjusted again in the visual editor; the two-way positioning of visualization and code, the visual selection of components and the selection of tags in the code can all be linked to each other, as well as the mutual linkage of the event method bound to the component and the JavaScript method in the code, which allows the user to seamlessly switch the development mode during the development process without having to worry too much about positioning issues.

[0088] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A bidirectional visual conversion system based on VUE technology, characterized in that: The system includes a bidirectional visual development framework based on VUE; The VUE-based two-way visual development framework includes: local file operation service, code editor, source code parser, visual editor, code generator; A local file operation service is used to read the page file source code of a local file and provide it to a source code parser or a code editor, wherein the page file source code includes HTML source code and JavaScript source code; and is used to receive the page file source code from a code generator so as to write the page file source code into a local file; A code editor is used to read the page file source code of the local file from the local file operation service, display it, and write or modify the page code; Source code parser, used to convert the written or modified page code or page file source code into a data model of JSON structure using AST conversion technology; The visual editor receives the JSON data model from the source code parser and converts it into component elements of the page, presenting the content through the visual design page; it is also used to handle the user's drag and drop and configuration operations, and save these changes back to the JSON data model; The code generator is used to read the data model of the JSON structure, generate the page file source code and provide it to the code editor; at the same time, it is used to provide the page file source code to the local file operation service so as to write the page file source code into the local file; It also includes a visualization and code bidirectional positioning module, the visualization and code bidirectional positioning module includes a code locator, the code locator is used to receive component information or component event information of the visual editor, and find the code and calculate the number of lines and position according to the component information or component event information, and send it to the code editor; The visualization and code bidirectional positioning module also includes a component locator, which is used to receive a code tag name or a JavaScript method name of the code sent by the code editor, find the corresponding component object according to the code tag name, or find the corresponding component event list according to the JavaScript method name of the code, and display the component event list referenced by the JavaScript method in the code editor by popping up a floating layer; The positioning of code tags includes: The user clicks on the tag name of the code; the code editor passes the tag name and ID name selected by the user to the component locator; the component locator finds the corresponding component object based on the tag and ID name and sends it to the visual editor; the visual editor receives the component object and sets the component to the selected state in the visual editing interface; The positioning of JavaScript methods includes: The user clicks on the JavaScript method name of the code; the code editor passes the JavaScript method name selected by the user to the component locator; the component locator traverses all component objects based on the JavaScript method name, finds the corresponding component event list, and returns it to the code editor; the code editor receives the component event list and displays the component event list referenced by the JavaScript method in the code editor by means of a pop-up floating layer.

2. A bidirectional visualization conversion method based on VUE technology applied to a bidirectional visualization conversion system based on VUE technology as claimed in claim 1, characterized in that: The following steps are involved: When the code editor is opened, the local file operation service reads the page file source code of the local file and provides it to the code editor for display; When the visual editor is opened, the local file operation service reads the page file source code of the local file and provides it to the source code parser; the source code parser uses AST conversion technology to convert the source code into a data model of a JSON structure; the visual editor reads the data model of the JSON structure, reversely parses it into component elements of the page, and displays the content through a visual design page.

3. According to the bidirectional visualization conversion method based on VUE technology in claim 2, it is characterized in that: If you write or modify the page code in the code editor, the source code parser reads the page code and converts it into a data model with a JSON structure, which is provided to the visual editor for page display; the page code in the code editor is provided to the local file operation service to write the page file source code into a local file.

4. According to the VUE technology-based two-way visualization conversion method of claim 3, it is characterized in that: If you drag and drop components in the visual editor, the visual editor will convert the changed content into a data model with a JSON structure; the code generator reads the data model with a JSON structure, generates the page file source code and provides it to the code editor; at the same time, the code generator provides the page file source code to the local file operation service so that the page file source code can be written into the local file.

5. According to the bidirectional visualization conversion method based on VUE technology as described in claim 2, it is characterized in that: Also includes: Positioning of components, including: A component is selected in the visual editor, and the visual editor transmits information of the selected component to the code locator; The code locator finds the code according to the component information, calculates the line number and position, and sends the result to the code editor; the code editor positions the cursor at the corresponding line number and position according to the received line number and position.

6. According to the VUE technology-based two-way visualization conversion method of claim 2, it is characterized in that: Also includes: Positioning of visual component events, including: The user selects a component in the visual editor and clicks the event name of the component. The visual editor then passes the event information of the component selected by the user to the code locator. The code locator finds the JavaScript method in the code according to the component event information, calculates the line number and position, and sends it to the code editor; the code editor positions the cursor at the corresponding line number and position according to the received line number and position.