This application claims priority to Chinese Patent Application No. 201910584261.5, entitled “Visualized Edition Method, Device and Apparatus, and Storage Medium”, and filed on Jun. 28, 2019, which is hereby incorporated by reference in its entirety
The present disclosure relates to a field of the computer technology, and particularly to a visualized edition method, device and apparatus, and a storage medium.
In the existing code edition methods, edition is generally performed in a sequential manner, while an edition method according to a framework and a hierarchy is not provided, which results in an inconvenient code edition and a low edition and modification efficiency.
A visualized edition method, device and apparatus are provided according to embodiments of the present disclosure, and a storage medium, so as to at least solve the above technical problem in the existing technology.
In a first aspect, a visualized edition method is provided according to the embodiments of the present disclosure, comprising: displaying an edition interface; in a page presentation state of the edition interface, displaying, on the edition interface, a structure presentation area and an edition area, wherein the structure presentation area comprises a framework structure and a hierarchy of components described with an interface presentation language, and the edition area comprises an editable attribute of each component; in response to a component selection operation, selecting a target component from the components in the framework structure and the hierarchy of the structure presentation area; and in response to an edition operation on the target component, editing logical description codes of an attribute of the target component in the edition area.
In one embodiment, the visualized edition method further comprises in the page presentation state of the edition interface, displaying, on the edition interface, a global control management area, wherein the global control management is configured to perform at least one of a code management, a resource management and a style management.
In one embodiment, the visualized edition method further comprises: in a code edition state of the edition interface, displaying, on the edition interface, logical description codes of a currently edited component.
In one embodiment, the visualized edition method further comprises: displaying a device selection control and a simulated image presentation area on the edition interface; in response to an operation on the device selection control, determining information on a selected device; and presenting, in the simulated image presentation area, a simulated presentation result representing a fit relationship between logical description codes currently edited and the information on the selected device.
In one embodiment, the visualized edition method further comprises: displaying a code export control on the edition interface; and in response to an operation on the code export control, exporting logical description codes currently edited into codes in a format defined by the interface presentation language, and storing the exported codes to a designated storage location.
In one embodiment, the visualized edition method further comprises: displaying a template selection interface that comprises a selectable layout template, a control creation option and a code uploading option.
In a second aspect, a visualized edition device is provided according to the embodiments of the present disclosure, comprising: a displaying module configured to display an edition interface; in a page presentation state of the edition interface, display, on the edition interface, a structure presentation area and an edition area, wherein the structure presentation area comprises a framework structure and a hierarchy of components described with an interface presentation language, and the edition area comprises an editable attribute of each component; a selecting module configured to, in response to a component selection operation, select a target component from the components in the framework structure and the hierarchy of the structure presentation area; and an editing module configured to, in response to an edition operation on the target component, edit logical description codes of an attribute of the target component in the edition area.
In one embodiment, in the page presentation state of the edition interface, a global control management area is displayed on the edition interface, wherein the global control management is configured to perform at least one of a code management, a resource management and a style management.
In one embodiment, in a code edition state of the edition interface, logical description codes of a component currently edited are displayed on the edition interface.
In one embodiment, the displaying module is further configured to display a device selection control and a simulated image presentation area on the edition interface; the device further comprises: a presenting module configured to, in response to an operation on the device selection control, determine information on a selected device; and present, in the simulated image presentation area, a simulated presentation result representing a fit relationship between logical description codes currently edited and the information on the selected device.
In one embodiment, the displaying module is further configured to display a code export control in the edition interface; the device further comprises: an exporting module configured to, in response to an operation on the code export control, export logical description codes currently edited into codes in a format defined by the interface presentation language, and store the exported codes to a designated storage location.
In one embodiment, the displaying module is further configured to display a template selection interface that comprises a selectable layout template, a control creation option and a code uploading option.
In a third aspect, a visualized edition apparatus is provided according to the embodiments of the present disclosure, the functions thereof can be realized by hardware or by executing corresponding software through the hardware. The hardware or the software comprises one or more modules corresponding to the above functions.
In a possible implementation, the structure of the device comprises a memory configured to store a program supporting the device to perform a method for a visualized edition, and a processor configured to execute the program stored in the memory. The device may further comprise a communication interface configured to be communicated with other device or a communication network.
In a fourth aspect, a computer readable storage medium is provided according to the embodiments of the present disclosure, configured to store computer software instructions used by a device for a visualized edition, and comprising a program involved in performing a method for a visualized edition.
One of the above technical solutions has the following advantages or beneficial effects:
According to the embodiments of the present disclosure, a visualized edition interface is provided for code edition, so as to display a framework structure and a hierarchy of components described with an interface presentation language. Herein, a target component is selected from the framework structure and the hierarchy when a component selection operation is received, and logical description codes are edited according to an edition operation on the target component. In this way, the code edition efficiency is improved.
The above summary is for the purpose of description, and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present disclosure will be readily apparent with reference to the drawings and the following detailed descriptions.
In the drawings, unless otherwise designated, the same reference numeral refers to the same or similar parts or elements throughout the drawings. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in accordance with the present disclosure and should not be considered as limitations to the scope of the present disclosure.
In the following, certain embodiments are briefly described. As will be recognized by persons skilled in the art, the described embodiments can be modified in a variety of different ways without departing from the spirit or scope of the present disclosure. Accordingly, the drawings and descriptions are regarded as illustrative in nature rather than restrictive.
A visualized edition method and device are mainly provided according to the embodiments of the present disclosure, and the technical solutions are described in details below through the following embodiments respectively.
In S11, an edition interface is displayed.
In a page presentation state of the edition interface, a structure presentation area and an edition area are displayed on the edition interface. The structure presentation area comprises a framework structure and a hierarchy of components described with an interface presentation language, and the edition area comprises an editable attribute of each component.
In S12, in response to a component selection operation, a target component is selected from the components in the framework structure and the hierarchy of the structure presentation area.
In S13, in response to an edition operation on the target component, logical description codes of an attribute of the target component are edited in the edition area.
The edition interface may be in a page presentation state and a code edition state, and a user may select the state of the edition interface by clicking and the like.
In one possible embodiment, in the page presentation state of the edition interface, a global control management area is displayed on the edition interface. The global control management area is configured for performing at least one of a code management, a resource management and a style management.
In the code edition state of the edition interface, codes of a component currently edited are displayed on the edition interface.
In both of the above states of the edition interface, the edition interface can present a simulated presentation, and support export of the logical description codes.
In S21, a device selection control and a simulated image presentation area are displayed on the edition interface.
In S22, information on a selected device is determined in response to an operation on the device selection control.
In S23, in the simulated presentation area, a simulated presentation result representing a fit relationship between logical description codes currently edited and the information on the selected device is presented.
In S31, a code export control is displayed on the edition interface.
In S32: in response to an operation on the code export control, logical description codes currently edited are exported to be codes in a format defined by the interface presentation language, and the exported codes are stored to a designated storage location.
The interface presentation language may be a DuerOS Presentation Language (DPL). Specifically, the above codes may be a DPL file. By executing the method in a visualized editor, a file described with the DPL can be obtained through edition.
As illustrated in
1) Directly presenting a presentable attribute through a page presentation block diagram.
For example, a left part of a lower half of
In the framework structure and the hierarchy illustrated in
A first Container component nests an Image component, a ScrollView component, and a Container component that serves as a subcomponent. The Container component that serves as a sub-component comprises a Header component and three Text components.
A second Container component nests an Image component and a Header component.
The middle part of the lower half of
2) Illustrating a global attribute at a right part of the lower half of
3) Selecting different devices. For example, if the user clicks a device selection control at the top, different simulated presentation results will be presented below (the screen types of various devices may be different from each other).
4) Exporting the codes. A code export control is located at the upper right corner, and may be clicked by the user to export the codes.
As illustrated in
In one possible embodiment, the method proposed by the embodiments of the present disclosure further comprises: displaying a template selection interface that comprises a selectable layout template, a control creation option and a code uploading option.
1) Creating a new presentation form. For example, in response to a selection operation on a control “create”, a page for creating a new presentation form is presented.
2) Uploading a code file, a resource file, and the like. For example, in response to a selection operation on “uploading codes (a JSON file exported with the DPL)”, a page for uploading a code file or a resource file is presented.
3) Selecting a default presentation form or template of the system. For example, in response to a selection operation on a certain template, this template is uploaded.
In the template selection interface, the user may select a preferred layout template to create a feature by uploading a code file or creating a new feature. The layout template comprises many types, such as a simple image, a long text, a short text, and a combination of images and texts.
The visualized editor has the following advantages.
1. A complex front-end edition interface is presented through a flow block diagram, with a clear hierarchical structure, and can be directly edited by clicking, which is convenient for the operation.
2. Different devices can be selected so as to simulate the presentation results for different devices. Moreover, each time the edition is performed, simulated display results for different devices are displayed in real time.
3. The presentations of the framework diagram and the code selection are supported, which greatly improves the development efficiency.
4. The code export is supported, with a variety of built-in templates.
5. The modules of a core logical part are separated for a selection and codes of each of the modules directly edited.
A visualized edition device is provided according to the embodiments of the present disclosure. Referring to
In one possible embodiment, in the page presentation state of the edition interface, a global control management area is displayed on the edition interface, wherein the global control management is configured to perform at least one of a code management, a resource management and a style management.
In one possible embodiment, in a code edition state of the edition interface, logical description codes of a component currently edited are displayed on the edition interface.
In one possible embodiment, the displaying module is further configured to display a device selection control and a simulated image presentation area on the edition interface.
In one possible embodiment, the displaying module 510 is further configured to display a code export control on the edition interface.
As illustrated in
In one possible embodiment, the displaying module 510 is further configured to display a template selection interface that comprises a selectable layout template, a control creation option and a code uploading option.
The function of each of the modules in the apparatus according to the embodiments of the present disclosure can refer to corresponding descriptions in the above method, and will not be repeated here.
A visualized edition apparatus is provided according to the embodiments of the present disclosure.
The visualized edition apparatus may further comprise: a communication interface 13 configured to be communicated with an external device for a data interactive transmission.
The memory 11 may comprise a high-speed random access memory (RAM), and may also comprise a non-volatile memory, such as at least one disk memory.
If being implemented independently, the memory 11, the processor 12 and the communication interface 13 may be connected to each other through a bus and perform communications with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be classified into an address bus, a data bus, a control bus, etc. For the convenience of representation, a single thick line is used in
Alternatively, during implementation, if being integrated onto one chip, the memory 11, the processor 12 and the communication interface 13 can perform communications with each other through internal interfaces.
Among the descriptions herein, a description referring to the terms ‘one embodiment’, ‘some embodiments’, ‘example’, ‘specific example’, ‘some examples’, or the like means that specific features, structures, materials, or characteristics described in conjunction with the embodiment(s) or example(s) are included in at least one embodiment or example of the present disclosure. Moreover, the specific features, structures, materials, or characteristics described may be incorporated in any one or more embodiments or examples in a suitable manner. In addition, persons skilled in the art may incorporate and combine different embodiments or examples described herein and the features thereof without a contradiction therebetween.
In addition, the terms ‘first’ and ‘second’ are used for descriptive purposes only and cannot be understood as indicating or implying a relative importance or implicitly pointing out the number of the technical features indicated. Thus, the features defined with ‘first’ and ‘second’ may explicitly or implicitly include at least one of the features. In the description of the present disclosure, ‘a (the) plurality of’ means ‘two or more’, unless otherwise designated explicitly.
Any process or method description in the flow chart or otherwise described herein may be understood to mean a module, a segment, or a part including codes of executable instructions of one or more steps for implementing a specific logical function or process, and the scope of preferred embodiments of the present disclosure comprises additional implementations, wherein the functions may be performed without in a sequence illustrated or discussed, including being performed in a substantially simultaneous manner according to the functions involved or in a reverse sequence, which should be understood by skilled persons in the technical field to which the embodiments of the present disclosure belong.
At least one of the logics and the steps represented in the flow chart or otherwise described herein, for example, may be considered as a sequencing list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium for being used by or in conjunction with an instruction execution system, an apparatus or a device (e.g., a computer-based system, a system including a processor, or any other system capable of fetching and executing instructions from the instruction execution system, the apparatus, or the device). Regarding this specification, the ‘computer readable medium’ may be any means that can contain, store, communicate, propagate, or transfer a program for being used by or in conjunction with the instruction execution system, the apparatus, or the device. More specific examples (non-exhaustive list) of the computer readable medium include an electrical connection portion (electronic device) having one or more wires, a portable computer enclosure (magnetic device), a random access memory (RAM), a read only memory (ROM), an erasable editable read only memory (EPROM or flash memory), an optical fiber device, and a portable read only memory (CDROM). In addition, the computer readable medium may even be paper or any other suitable medium on which the program is printed, because the program can be electronically obtained, for example, by optically scanning the paper or other medium, and editing, interpreting, or processing in other suitable ways if necessary, and then stored in a computer memory.
It should be understood that various parts of the present disclosure may be implemented by hardware, software, firmware, or combinations thereof. In the above embodiments, a plurality of steps or methods may be implemented by software or firmware stored in a memory and executed with a suitable instruction execution system. For example, if hardware is employed for implementation, like in another embodiment, the implementation may be made by any one or combinations of the following technologies known in the art: a discreet logical circuit having a logical gate circuit for implementing logical functions on data signals, an application specific integrated circuit having an appropriate combinational logical gate circuit, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
Persons of ordinary skill in the art can understand that all or part of the steps carried by the above method embodiments can be implemented by instructing relevant hardware through a program, wherein the program may be stored in a computer readable storage medium, and it includes one or combinations of the steps of the method embodiments when being executed.
In addition, the functional units in various embodiments of the present disclosure may be integrated into one processing module, or may be physically presented separately, or two or more units may be integrated into one module. The above integrated module may be implemented in the form of one of hardware and a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer readable storage medium that may be a read only memory, a magnetic disk or an optical disk, etc.
Those described above are only embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Within the technical scope revealed in the present disclosure, any skilled person familiar with the technical field can easily conceive of various changes or replacements thereof, which should be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to that of the accompanied claims.
Number | Date | Country | Kind |
---|---|---|---|
201910584261.5 | Jun 2019 | CN | national |