CN113391808A - Page configuration method and device and electronic equipment - Google Patents

Page configuration method and device and electronic equipment Download PDF

Info

Publication number
CN113391808A
CN113391808A CN202110772507.9A CN202110772507A CN113391808A CN 113391808 A CN113391808 A CN 113391808A CN 202110772507 A CN202110772507 A CN 202110772507A CN 113391808 A CN113391808 A CN 113391808A
Authority
CN
China
Prior art keywords
style
page
configuration
xml
file
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
CN202110772507.9A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun 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 Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110772507.9A priority Critical patent/CN113391808A/en
Publication of CN113391808A publication Critical patent/CN113391808A/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/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/81Indexing, e.g. XML tags; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The disclosure provides a page configuration method and device and electronic equipment, and belongs to the technical field of software development. The method comprises the following steps: under the condition that identification input of a first XML style file is received, a first style is displayed at a first position of a configuration page, the first XML style file is configured in a configuration engine, the configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by analyzing the first XML style file; configuring a first functional element at a first position according to a first style and input first style data, the first style data including at least one of service data and style attribute data; and generating a page adapted to the client according to the functional elements configured at each position in the configuration page. By the page configuration method provided by the embodiment of the disclosure, the problem that the development of the page is not convenient enough can be solved.

Description

Page configuration method and device and electronic equipment
Technical Field
The disclosure belongs to the technical field of software development, and particularly relates to a page configuration method and device and electronic equipment.
Background
With the rapid development of software development technology, more and more applications need to support more functions, and developers need to develop adaptive pages in time.
At present, when a mobile terminal project is developed, taking a project related to a commodity as an example, a page order category page, an order detail page, a commodity detail page, a settlement page, a search page, a login page, a floor and the like are all obtained to obtain a User Interface design draft, and then a developer outputs a User Interface (UI) which is the same as the design draft by using a Cascading Style Sheet (CSS) handwriting Style code.
However, the above page development method is usually to write code manually, and the development efficiency is slow. If the code needs to be modified, for example, information such as a file, a font color, a font size, and the like on the page needs to be modified according to business needs, developers need to manually modify a large amount of codes in project engineering, which wastes manpower, and thus, the development of the page is not convenient enough.
Disclosure of Invention
The embodiment of the disclosure aims to provide a page configuration method, a page configuration device and electronic equipment, which can solve the problem that the development of a page is not convenient enough.
In order to solve the technical problem, the present disclosure is implemented as follows:
in a first aspect, an embodiment of the present disclosure provides a method for configuring a page, where the method includes: displaying a first style at a first position of a configuration page in a case of receiving an identification input to a first extensible markup language (XML) style file; the first XML file is configured in a configuration engine, the configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by analyzing the first XML style file; configuring a first functional element at a first position according to a first style and input first style data, the first style data including at least one item of style attribute data of service data; and generating a page adapted to the client according to the functional elements configured at each position in the configuration page.
In a second aspect, an embodiment of the present disclosure provides a device for configuring a page, where the device for configuring a page includes: the device comprises a display module, a configuration module and a generation module; the display module is used for displaying a first style at a first position of a configuration page under the condition of receiving identification input of a first XML style file; the first XML style file is configured in a configuration engine, the configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by analyzing the first XML style file; the configuration module is used for configuring a first functional element at a first position according to a first style displayed by the display module and input first style data, and the first style data comprises at least one of service data and style attribute data; and the generating module is used for generating a page matched with the client according to the functional elements configured at each position in the configuration page.
In a third aspect, the disclosed embodiments provide an electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, which when executed by the processor implement the steps of the method according to the first aspect.
In a fourth aspect, the disclosed embodiments provide a readable storage medium on which a program or instructions are stored, which when executed by a processor, implement the steps of the method according to the first aspect.
In a fifth aspect, the embodiments of the present disclosure provide a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the present disclosure, first, the electronic device may display a first style at a first position in a configuration page when receiving an identifier input for a first XML style file, where the first style is a style of a first functional element obtained by parsing the first XML style file; then, the electronic device may configure a first functional element at a first position according to the first style and the input first style data, the first style data including an indication one of the service data and the style attribute data; finally, the electronic device can generate a page adapted to the client according to the functional elements configured at each position in the configuration page. Since the configuration engine configures the XML style file of the functional element, and the configuration interface is a page of the client for displaying the configuration, therefore, the electronic device can acquire the styles of the functional elements parsed according to the XML style files through the configuration engine, displaying the style of each functional element at the corresponding position in the configuration page, configuring the functional elements related to the service at the corresponding position of the page to be developed by inputting style data for each functional element, in the development process of the page, the page development can be realized by directly visualizing the configuration in the configuration page through the configuration, developers are not required to write codes of the functional elements to realize the page development, therefore, the efficiency of page development can be improved, the page development time is shortened, and the page development capacity is improved, so that the page development is more convenient.
Drawings
Fig. 1 is a schematic flowchart of a page configuration method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a configuration page provided by an embodiment of the present disclosure;
FIG. 3 is a logic diagram of a page configuration provided by an embodiment of the present disclosure;
FIG. 4 is a data flow diagram of a page configuration provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of page rendering provided by an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating a conversion process of a functional element into an XML style file according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a possible configuration apparatus of a page according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;
fig. 9 is a hardware schematic diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present disclosure are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the disclosure may be practiced other than those illustrated or described herein, and that the objects identified as "first," "second," etc. are generally a class of objects and do not limit the number of objects, e.g., a first object may be one or more. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
The disclosed embodiments provide a configuration engine in which an XML style file of a functional element is configured. In the embodiment of the present disclosure, the XML style file of the functional element may include a pre-stored XML style file of a common function, and may further include a programmer-defined XML style file of a function. A developer can quickly develop a page through the corresponding XML style file of each functional element based on the configuration engine and the configuration method of the page provided by the embodiment of the present disclosure.
It should be noted that the functional element may map elements of the front-end layout, and one functional element may map a block-level element or a row-level element, or may map a plurality of different levels of elements.
In the embodiments of the present disclosure, commonly used functional elements may include: block level element (view), carousel (cursor), picture (image), text (text), loop (iteration), button (button), custom element.
Illustratively, a commonly used functional element name may be defined as a corresponding hypertext Markup Language tag (HTML).
For example, for block-level elements, in the HTML5 development framework, block-level elements map to div tags; in the rn (read native) and Taro (nodess-based multi-end unified development framework) development frameworks, block-level elements are mapped to view tags. For text in line level elements, the text maps to Span tags in the HTML5 framework, and can map to text tags in RN and Taro. The RN is an open-source cross-platform mobile application development framework.
The following describes in detail a configuration method of a page provided by the embodiments of the present disclosure with reference to the accompanying drawings and specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flowchart of a configuration method of a page according to an embodiment of the present disclosure, as shown in fig. 1, the method may include the following steps S101 to S103:
s101, the electronic equipment displays a first style at a first position of a configuration page under the condition that identification input of a first XML style file is received.
The configuration page is used for configuring a page of the client, and the first style is a style of a first functional element obtained by analyzing the first XML style file.
Illustratively, the configuration page may be a display page of the configuration engine, and the styles corresponding to different XML style files may be added to the configuration page for page configuration, where the effect of the page generated by the configuration page is the same as the effect of the page displayed by the actual client.
It should be noted that a style corresponds to a configuration component of a functional element in page development. Wherein, a configuration component can be understood as a code template of a function, in which service data fields and style attribute data fields are reserved and events can be bound.
It is to be understood that the identification of the first XML style file indicates the first XML style file.
Optionally, the first XML file may be obtained by parsing the first XML style file for the server, or may be obtained by downloading and parsing the first XML style file for the electronic device.
Illustratively, after receiving an input for selecting the first XML style file, the electronic device may call an interface of the server through the configuration engine, download and parse the first XML file, and then call the first style, and display the first style in a first position selected by the developer in the configuration page.
S102, the electronic equipment configures a first functional element at a first position of a configuration page according to the first style and the input first style data.
Wherein the first style data includes at least one of service data and style attribute data.
Illustratively, the service data indicates data related to a service in one functional element. For example, the title of a goods page, the business data may include: the name of the item, the price of the item, the delivery location, the delivery time, and other data associated with the service. The style attribute data indicates data related to a specific parameter of the style of one functional element. For example, a style is a box, and the style attribute data may be data related to specific parameters such as length, width, pattern, color, etc. of the box.
Illustratively, the first style is a picture of a box, and after style data of the box with size 1, color 1, and the like is input, the picture of the box with size 1 and color 1 may be displayed in the configuration page.
Alternatively, the electronic device may display an input region of the style data for inputting the style data and a style Identification (ID) in a case where the first style is displayed; or under the condition of displaying the first style, the input area of the style data is not displayed, and after the input of the selected first style is received, the input area of the style data is displayed, so that developers can configure the style data and the style ID for the style according to different service requirements.
S103, the electronic equipment generates a page adaptive to the client according to the functional elements configured at each position of the configuration page.
In software development, the configuration engine is located at the B-side (developer-oriented device), usually at the PC-side, and can be used to develop the C-side interface. And the C end is a client facing to the user.
It is understood that in the software development process, all the commonly used functional elements can be configured in the configuration page in the manner described above.
For example, a developer needs to develop an order page of a commodity, and can drag a picture element to the position of the commodity picture in the configuration page according to the position designed in the UI design draft, and add a specific commodity picture; dragging the commodity title element to the position of the commodity title in the configuration page, adding the commodity title, and modifying business data such as the commodity name, the commodity price and the like in the commodity title; and dragging the payment button to the position of the payment button in the configuration page, and adding the payment button.
Fig. 2 is a schematic diagram of a configuration page provided by an embodiment of the present disclosure, as shown in fig. 2, the configuration page may include a button 21 for displaying an XML style file, a style may be added in the configuration page through the button 21, a right side region of the configuration page displays basic information of the style, Mock data (a service field of style binding), and style information (i.e., a style attribute), a developer may input a Mock data and style attribute data configuration function at the position, and after the developer adds a style in a left side region and configures style data, the generated UI may be displayed in a floating interface 22 on the configuration page.
It should be noted that the UI in fig. 2 is only an exemplary illustration, and in the process of page development, various styles may be quickly added through an XML style file according to the needs of a user, so as to configure each functional element on a page.
Exemplarily, fig. 3 is a logic diagram of a page configuration provided in the embodiment of the present disclosure. After receiving the input of acquiring the XML style file input by a developer, requesting a server interface to acquire the XML style file; then, analyzing the XML style file, generating a style component (namely acquiring a style), and displaying the style in the UI; thereafter, a style component may be invoked, such that a developer may enter a style identification and style data, and finally, a C-side interface may be generated from the style identification (indicated style) and style data.
It should be noted that, in an actual development scenario, a developer may determine, based on a UI design, a component required by a page first, and then configure the page according to the component required by the page. Fig. 4 is a data flow diagram of a page configuration provided in an embodiment of the present disclosure, which takes an order page as an example, and may include the following components: style, item details, orders, scaffolding (UI, web), login components, and other components. The configuration engine can call the commodity detail component and the order component through the server side, and call the style component of the server side to obtain the XML style file. And the style parser of the configuration engine executes style data processing, and the data parser executes service data processing. The style parser can be used for XML style file parsing, configuration parsing and style rendering; the data parser can perform node selection, logic processing and data assembly. After the data processing by the configuration engine, page rendering can be performed to implement the UI, such as large image preview, button processing, popup, and popup layers that can be in the page. Finally, in order to facilitate the adaptation of the multiple ends, the pages configured by the configuration mode can be adapted to the multiple ends by compiling, packaging and the like.
The method for configuring the page includes that firstly, under the condition that identification input of a first XML style file is received by electronic equipment, a first style is displayed at a first position in a configuration page, and the first style is a style of a first functional element obtained by analyzing the first XML style file; then, the electronic device may configure a first functional element at a first position according to the first style and the input first style data, the first style data including an indication one of the service data and the style attribute data; finally, the electronic device can generate a page adapted to the client according to the functional elements configured at each position in the configuration page. Since the configuration engine configures the XML style file of the functional element, and the configuration interface is a page of the client for displaying the configuration, therefore, the electronic device can acquire the styles of the functional elements parsed according to the XML style files through the configuration engine, displaying the style of each functional element at the corresponding position in the configuration page, configuring the functional elements related to the service at the corresponding position of the page to be developed by inputting style data for each functional element, in the development process of the page, the page development can be realized by directly visualizing the configuration in the configuration page through the configuration, developers are not required to write codes of the functional elements to realize the page development, therefore, the efficiency of page development can be improved, the page development time is shortened, and the page development capacity is improved, so that the page development is more convenient.
Optionally, in the method for configuring a page provided in the embodiment of the present disclosure, the step S103 may specifically be implemented by the following steps:
the electronic equipment acquires style identification of each functional element configured in the configuration page and input style data; and then generating a page adapted to the client in case that each style identification is matched to the style data.
It will be appreciated that this process of generating a page may be referred to as page rendering.
It should be noted that, in the embodiment of the present disclosure, the provided page rendering manner may be applied in a process of generating a page by rendering a page after the configuration engine configures each functional element of the configuration page, or in a process of generating a page by rendering a page before the client displays the page. With reference to fig. 5, taking a client-side display page as an example, the client-side pulls a development template, requests a server-side interface, then acquires service data, analyzes each style ID in the page and the version and matching style of the page, generates a page when each style and each style data are matched, reacquires the style if the style and the style data are not matched, stores the style locally, and then re-matches the style and the style data. The processing in the dashed box in fig. 5 is the page rendering process in the embodiment of the present disclosure.
It should be noted that, the obtaining of the service data and the resolving of each style ID in the page and the version of the page are not sequential, and the obtaining of the service data may also be performed after the resolving of each style ID in the page and the version of the page.
It can be understood that a page may include M styles, where M is a positive integer, and the page rendering process includes obtaining M styles and M style data of the page, and if the M styles may all be matched to the style data, the page rendering is completed. And if one style data is not matched with the style in the rendering process, acquiring the style from the server again according to the style ID of the style data, and then storing the style to the local for re-matching.
Based on the scheme, the style and the style data of the page are configured in a configuration mode, and the page rendering can be performed according to the page rendering mode, so that the rendering process is simpler and more convenient, and the rendering is faster.
Optionally, the first XML style file includes at least one of: XML data of the first functional element, a business field bound by the first functional element, a style property bound by the first functional element, and an event bound by the first functional element.
It is to be understood that if the first XML style file does not include the data of the bound event, the first functional element does not bind the event, and if the first XML style file includes the data of the bound event, the first functional element binds the event.
For example, a picture element may bind a skip event, and in the rendered page, a skip action may be performed by a user clicking on the picture.
Based on the scheme, the first XML style file can comprise the configurable service field and the configurable style attribute, so that the page of the service data and the style attribute which meet the service requirements can be rapidly configured for different services according to different service forms, and the functional element for binding the event can be rapidly added into the page according to the element for binding the event in advance under the condition that part of the functional elements in the page need to support the event, so that the method is more flexible to enable, and the page is more flexible and convenient to configure.
Optionally, in the method for configuring a page provided by the embodiment of the present disclosure, each functional element configured in the configuration page corresponds to one style identifier. The configuration engine of the electronic device may save the style identification and style data of each functional element configured in the configuration page.
Specifically, after configuring each functional element in the configuration page, the electronic device may generate a first configuration file adapted to the page of the client according to the functional element configured at each position in the configuration page.
Wherein the first configuration file comprises: the style identification of each function element configured in the page of the client, the style data of each function element configured, the position information of each function element in the page, the development version, the development time and the like.
Furthermore, in the method for configuring a page provided by the embodiment of the present disclosure, a developer may also modify the functional element style data in the page that has been developed quickly, that is, after S103 described above, the method may further include the following steps:
first, in the case that the modified configuration file is a first configuration file, the electronic device displays style identifications of respective functional elements included in the first configuration file. Then, the electronic device modifies the style data of the first style identification corresponding to the first functional element into second style data in response to a modification input. And the electronic equipment displays the first functional element corresponding to the second style data at a first position in the configuration page. Finally, the electronic device can modify the page of the client through the configuration engine according to the first functional element after the style data is modified.
Illustratively, the developer may make modifications to the first configuration file selected based on the identification of the configuration file.
Alternatively, the developer may select the first functional element at a first location in the configuration page, or select the first functional element by style identification, and then modify the style data for the first functional element.
It can be understood that the first functional element after the style data is modified can be displayed in the configuration page, so that a developer can conveniently and quickly determine whether the modification meets the requirement.
Based on the scheme, after the development is completed, if a user needs to modify the style data in the page, such as changing pictures, changing fonts and changing text contents, a developer can rapidly modify the style data of the functional elements in the page through the style identification of each functional element in a configuration engine of the electronic equipment, and the processes of code development online and the like can be avoided under the condition that the interface style is changed.
Optionally, in the method for configuring a page provided by the embodiment of the present disclosure, before the foregoing S101, the electronic device may display an XML style file list in the configuration engine. Wherein the first XML style file is an XML style file selected from an XML style file list.
In an embodiment of the present disclosure, the XML style file list includes XML style files corresponding to the functional elements in the functional element list. The list of functional elements includes: block level elements, loops, carousel pictures, text, buttons, and custom elements.
It can be understood that the dragging margins between the respective XML style files can be set so that it is possible to distinguish which functional element is dragged by a developer, thereby facilitating the setting of style attributes.
Based on the scheme, developers can quickly search and download the used XML style files through the XML style file list in the configuration engine.
Optionally, in the method for configuring a page provided by the embodiment of the present disclosure, an XML style file of a functional element may also be added in the configuration engine.
First, the electronic device parses the second functional element into XML formatted data. And then, the electronic equipment binds target data for the XML format data corresponding to the second functional element to generate a second XML style file. Wherein the target data includes at least one of a service field, a style attribute, and an event. Finally, the electronic device adds the second XML style file to an XML style file list of the configuration engine.
The service field is convenient for developers to input specific service data in the page development process, and the style attribute is convenient for developers to fill in specific style attribute data according to requirements. Fields such as the name of the item, the price of the item in the item title, etc. may be referred to as business fields. In the process of page development, developers can input actual commodity names and actual commodity prices, and therefore pages matched with business requirements are developed. Events facilitate developers adding functional elements that can perform actions at development time. Illustratively, the event may be a jump, such as a page turn, opening a new web address.
In particular, style data may include properties that the functional element binds to when edited using CSS. For example, for a block level element view, the width, height, layout, orientation, background color, gradient color, self-alignment of the element may be tied to the view. For example, for text in a line level element, more than a few line shows, outer margin, inner margin, shadows, borders, rounded corners, click events of the text are bound on the text.
Exemplarily, fig. 6 is a schematic flowchart illustrating a process of converting a functional element into an XML style file according to an embodiment of the present disclosure. As shown in fig. 6, the functional element may be firstly parsed into XML format data, and a real-time preview effect of the functional element may be previewed in a page, then mock data, a binding style attribute, a binding event, and the like may be bound for the XML format data, and in the case of editing, an effect of the edited functional element may be previewed in real time, and after the binding is completed, an XML style file may be generated.
Example 1: if it is desired to display "do you? "currently, the following code needs to be handwritten for the developer to realize with the code:
< div > < p > do you? </p > </div >
The effect of rendering the code in the page is the text "do you? "currently, if used in three projects (or three interfaces), it requires the developer to write 3 times or copy 3 times. In the present disclosure, the section of code may be parsed into an XML style file and stored in the configuration engine, and in a case where a developer needs to input the section of code at which position, the developer may drag the XML style file to the position, and automatically add "how do you? "this text.
Example 2: if a box with a width and a height of 50 pixels (px) and a red background color needs to be implemented in a page, developers need to write the following codes by handwriting at present:
<div style=“width:50px;height:50px;background:red;”
the effect of rendering the code in the page is a red box. If a plurality of boxes with other sizes and colors need to be implemented in a page, developers need to write a plurality of codes with different parameters. In the embodiment of the present disclosure, such a functional element of a box may be parsed into an XML style file, style data such as a size, a color, and the like of the box may be bound and stored in a configuration engine, and in a case where the box needs to be rendered in a page, the corresponding XML file may be dragged to a position corresponding to the configuration page, and the needed style data may be input, so that the box may be quickly configured in the page.
Based on the scheme, the configuration engine can configure one functional element into an XML style file to be stored in the configuration engine or a server, and can directly configure the functional element in the page through the XML style file under the condition that the functional element is required to be used in the developed page subsequently, without inputting codes, and the development mode is convenient and efficient.
Optionally, in the method for configuring a page provided by the embodiment of the present disclosure, after the above S103, an XML style file having a function element with style data may be added to the configuration engine by including the following steps.
Specifically, the electronic device may parse the configured first functional element into a third XML style file, and then store the third XML style file in an XML style file list of the configuration engine based on the first style identifier. The first style identification is a style identification of a first functional element of the configuration.
Illustratively, the identifier of the third XML file in the XML style file list in the configuration engine is a first style identifier, which may be located in the drop-down list of the first functional element.
It is understood that a developer can customize some common functional elements of style data in the configuration engine.
It should be noted that the third style file may be uploaded to the server through the configuration engine, so that other developers may also configure the corresponding first functional element of the first style data in the page quickly through the first style identifier.
Based on the scheme, after configuring the style data for the first functional element, a developer can configure the style identifier for the first functional element configured with the style data, and then can store the functional element configured with the style data by the developer into the configuration engine, so that the developer can not repeatedly input the style data in the subsequent development process if the functional element with the same style data is needed.
Optionally, in the method for configuring a page provided by the embodiment of the present disclosure, after the third XML style file is stored in the XML style file list of the configuration engine, a developer may directly reuse a functional element corresponding to the style file in the configuration page through the configuration engine.
Specifically, under the condition that the input style identification is the first style identification, the configured first functional element is obtained according to the third XML style file corresponding to the first style identification; for example, the electronic device parses the third XML style file corresponding to the first style identifier to obtain a configured first functional element; the electronic device may then display the configured first functional element in a second location of the configuration page based on the developer's input. Note that the second position is any position selected by the developer.
For example, the first style identifier may be selected from a pull-down menu of the XML style file displayed by the configuration engine, and the second location is selected, and then the configuration engine in the electronic device may automatically obtain a third XML style file previously stored by the developer, automatically parse the third XML style file, and display the first functional element configured with the first style data at the second location.
Based on the scheme, the electronic equipment directly calls the first pattern identification stored in the XML pattern file list in the configuration engine, so that the functional element with the pattern data can be quickly multiplexed, the development time is reduced, and the development efficiency is improved.
It should be noted that, in the configuration method of a page provided in the embodiment of the present disclosure, the execution subject may be a configuration device of the page, or a control module of the configuration device of the page, which is used for executing the configuration method of the page. The method for executing the configuration of the page by the page configuration device is taken as an example in the embodiment of the present disclosure, and the device for executing the configuration of the page provided by the embodiment of the present disclosure is explained.
Fig. 7 is a configuration apparatus of a page provided in an embodiment of the present disclosure; as shown in fig. 7, the page configuring apparatus 700 includes: a display module 701, a configuration module 702 and a generation module 703; a first XML style file; a display module 701, configured to display a first style at a first position of a configuration page when an input to a first XML style file is received; the first XML style file is configured in a configuration engine; the configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by analyzing the first XML style file; a configuration module 702, configured to configure a first functional element at a first position according to the first style displayed by the display module 701 and the input first style data, where the first style data includes at least one of service data and style attribute data; a generating module 703, configured to generate a page adapted to the client according to the functional elements configured at each position in the configuration page.
Optionally, the generating module is further configured to generate a first configuration file adapted to the page of the client according to the functional elements configured at each position in the configuration page; wherein the first configuration file comprises: the style identification of each functional element configured in the page of the client and the style data of each functional element configured.
Optionally, the display module is further configured to, after the generation module generates the first configuration file adapted to the page of the client, display the style identifier of each functional element included in the first configuration file when the modified configuration file is the first configuration file; the configuration module is also used for responding to modification input and modifying the style data of the first functional element corresponding to the first style identification into second style data; the display module is further used for displaying a first functional element corresponding to the second style data at a first position in the configuration page; and the generating module is also used for modifying the page of the client according to the first functional element after the style data is modified.
Optionally, the first XML style file includes at least one of: XML format data of the first functional element, a service field bound by the first functional element, a style property bound by the first functional element, and an event bound by the first functional element.
Optionally, the display module is further configured to display an XML style file list in the configuration engine before receiving an identification input for the first XML style file; the XML style file list comprises XML style files corresponding to the functional elements in the functional element list; the list of functional elements includes: block level elements, loops, carousel pictures, text, buttons, and custom elements; the first XML style file is an XML style file selected from the list of XML style files.
Optionally, the configuration device of the page further includes: the device comprises an analysis module, a binding module and an adding module; the analysis module is used for analyzing the second functional element into XML format data before the XML style file list in the configuration engine is displayed; the binding module is used for binding target data for the XML format data of the second functional element to generate a second XML style file; the adding module is used for adding the second XML style file into an XML style file list in the configuration engine; wherein the target data includes at least one of a service field, a style attribute, and an event.
Optionally, the configuration device of the page further includes: a storage module; the storage module is used for storing the third XML style file in an XML style file list in the configuration engine based on the first style identification; wherein the first style identification is a style identification of the first functional element of the configuration.
Optionally, the configuration device of the surface further includes: the obtaining module is further configured to, after the storing module stores the third XML style file in the XML style file list of the configuration engine based on the first style identifier, obtain the configured first functional element according to the third XML style file corresponding to the first style identifier under the condition that the input style identifier is the first style identifier; and the display module is also used for displaying the configured first functional element at a second position of the configuration page.
Optionally, the generating module is specifically configured to: acquiring style identification and input style data of each functional element configured in a configuration page; and generating a page adapting to the client under the condition that each style identification is matched with the style data.
The embodiment of the disclosure provides a configuration device of a page, which may first display a first style at a first position in a configuration page when receiving an identifier input to a first XML style file, where the first style is a style of a first functional element obtained by parsing the first XML style file; then, the configuration device of the page may configure the first functional element at the first position according to the first style and the input first style data, the first style data including one of the service data and the indication item of the style attribute data; finally, the page configuration device can generate a page adapted to the client according to the functional elements configured at each position in the configuration page. Since the configuration engine configures the XML style file of the functional element, and the configuration interface is a page of the client for displaying the configuration, therefore, the configuration device of the page can acquire the styles of the functional elements analyzed according to the required XML style files through the configuration engine, and display the styles of the functional elements at corresponding positions in the configuration page, functional elements related to the service can be configured at corresponding positions of the page to be developed by inputting style data for each functional element, in the development process of the page, the page development can be realized by directly visualizing the configuration in the configuration page through the configuration, developers are not required to write codes of the functional elements to realize the page development, therefore, the efficiency of page development can be improved, the page development time is shortened, and the page development capacity is improved, so that the page development is more convenient.
The configuration device of the page in the embodiment of the present disclosure may be a device, and may also be a component, an integrated circuit, or a chip in the terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the disclosed embodiments are not limited in particular.
The configuration device of the page in the embodiment of the present disclosure may be a device having an operating system. The operating system may be an Android (Android) operating system, an iOS operating system, or other possible operating systems, and the embodiment of the present disclosure is not particularly limited.
The configuration device for pages provided in the embodiment of the present disclosure can implement each process implemented by the method embodiments of fig. 1 to fig. 6, and is not described here again to avoid repetition.
Optionally, as shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure is further provided, and includes a processor 801, a memory 802, and a program or an instruction stored in the memory 802 and capable of running on the processor 801, where the program or the instruction is executed by the processor 801 to implement each process of the foregoing page configuration method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present disclosure includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 9 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present disclosure.
The electronic device 900 includes, but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, and a processor 910.
Those skilled in the art will appreciate that the electronic device 900 may further include a power source (e.g., a battery) for supplying power to various components, and the power source may be logically connected to the processor 910 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is not repeated here.
The disclosed embodiment provides an electronic device, first, the electronic device may display a first style at a first position in a configuration page under the condition of receiving an identifier input for a first XML style file, where the first style is a style of a first functional element obtained by parsing a first XML style file; then, the electronic device may configure a first functional element at a first position according to the first style and the input first style data, the first style data including an indication one of the service data and the style attribute data; finally, the electronic device can generate a page adapted to the client according to the functional elements configured at each position in the configuration page. Since the configuration engine configures the XML style file of the functional element, and the configuration interface is a page of the client for displaying the configuration, therefore, the electronic device can acquire the styles of the functional elements parsed according to the XML style files through the configuration engine, displaying the style of each functional element at the corresponding position in the configuration page, configuring the functional elements related to the service at the corresponding position of the page to be developed by inputting style data for each functional element, in the development process of the page, the page development can be realized by directly visualizing the configuration in the configuration page through the configuration, developers are not required to write codes of the functional elements to realize the page development, therefore, the efficiency of page development can be improved, the page development time is shortened, and the page development capacity is improved, so that the page development is more convenient.
It is to be understood that, in the embodiment of the present disclosure, the input unit 904 may include a Graphics Processing Unit (GPU) 941 and a microphone 942, and the graphics processor 941 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 906 may include a display panel 961, and the display panel 961 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes a touch panel 971 and other input devices 972. A touch panel 971, also referred to as a touch screen. The touch panel 971 may include two portions of a touch detection device and a touch controller. Other input devices 972 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. Memory 909 can be used to store software programs as well as various data including, but not limited to, application programs and operating systems. The processor 910 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 910.
The embodiments of the present disclosure also provide a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned page configuration method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.
The embodiment of the present disclosure further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement each process of the embodiment of the page configuration method, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips mentioned in the embodiments of the present disclosure may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it is noted that the scope of the methods and apparatus in the embodiments of the present disclosure is not limited to performing functions in the order shown or discussed, but may include performing functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present disclosure.
While the present disclosure has been described with reference to the embodiments illustrated in the drawings, which are intended to be illustrative rather than restrictive, it will be apparent to those of ordinary skill in the art in light of the present disclosure that many more modifications may be made without departing from the spirit of the disclosure and the scope of the appended claims.

Claims (12)

1. A method for configuring a page, the method comprising:
displaying a first style at a first position of a configuration page under the condition of receiving identification input of a first extensible markup language (XML) style file; the first XML style file is configured in a configuration engine, the configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by analyzing the first XML style file;
configuring the first functional element at the first position according to the first style and input first style data, the first style data including at least one of service data and style attribute data;
and generating a page adapted to the client according to the functional elements configured at each position in the configuration page.
2. The method of claim 1, further comprising:
generating a first configuration file adapted to the page of the client according to the functional elements configured at each position in the configuration page;
wherein the first configuration file comprises: the style identification of each functional element configured in the page of the client and the style data of each configured functional element.
3. The method of claim 2, wherein after generating the first configuration file that fits the page of the client, the method further comprises:
displaying the style identification of each functional element included in the first configuration file under the condition that the modified configuration file is the first configuration file;
in response to a modification input, modifying the style data of the first functional element corresponding to the first style identification into second style data;
displaying the first functional element corresponding to the second style data at the first position in the configuration page;
and modifying the page of the client according to the first functional element after the style data is modified.
4. The method of claim 1, wherein the first XML style file comprises at least one of:
XML format data of the first functional element, a service field bound by the first functional element, a style property bound by the first functional element, and an event bound by the first functional element.
5. The method of claim 1, further comprising:
displaying a list of XML style files in the configuration engine prior to receiving an identification input for a first extensible markup language (XML) style file;
the XML style file list comprises XML style files corresponding to the functional elements in the functional element list; the list of functional elements includes: block level elements, loops, carousel pictures, text, buttons, and custom elements; the first XML style file is an XML style file selected from the XML style file list.
6. The method of claim 5, wherein prior to displaying the list of XML style files in the configuration engine, the method further comprises:
analyzing the second functional element into XML format data;
binding target data for the XML format data of the second functional element to generate a second XML style file;
adding the second XML style file to the XML style file list;
wherein the target data includes at least one of a business field, a style attribute, and an event.
7. The method of claim 5, wherein after configuring the first functional element in the first position, the method further comprises:
parsing the configured first functional element into a third XML style file;
storing the third XML style file in the XML style file list based on a first style identification;
wherein the first style identification is a style identification of the first functional element of the configuration.
8. The method of claim 7, wherein after storing the third XML style file in the list of XML style files, the method further comprises:
under the condition that the input style identification is the first style identification, acquiring the configured first functional element according to the third XML style file corresponding to the first style identification;
displaying the configured first functional element at a second position of the configuration page.
9. The method according to claim 1, wherein the generating a page adapted to the client according to the functional elements configured at the respective positions in the configuration page comprises:
acquiring style identification and input style data of each functional element configured in the configuration page;
and generating a page adapting to the client under the condition that each style identification is matched with the style data.
10. An apparatus for page configuration, the apparatus for page configuration comprising: the device comprises a downloading module, an analysis module, a display module, a configuration module and a generation module;
the display module is used for displaying a first style at a first position of a configuration page under the condition of receiving identification input of a first extensible markup language (XML) style file, wherein the first XML style file is configured in a configuration engine, the configuration page is used for configuring a page of a client, and the first style is a style of a first functional element obtained by analyzing the first XML style file;
the configuration module is used for configuring the first functional element at the first position according to the first style displayed by the display module and input first style data, and the first style data comprises at least one of service data and style attribute data;
and the generating module is used for generating a page adapted to the client according to the functional elements configured at each position in the configuration page.
11. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method of configuring a page according to any one of claims 1 to 9.
12. A readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method of configuring a page according to any one of claims 1 to 9.
CN202110772507.9A 2021-07-08 2021-07-08 Page configuration method and device and electronic equipment Pending CN113391808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110772507.9A CN113391808A (en) 2021-07-08 2021-07-08 Page configuration method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110772507.9A CN113391808A (en) 2021-07-08 2021-07-08 Page configuration method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113391808A true CN113391808A (en) 2021-09-14

Family

ID=77625649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110772507.9A Pending CN113391808A (en) 2021-07-08 2021-07-08 Page configuration method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113391808A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114371889A (en) * 2022-01-19 2022-04-19 苏州峰之鼎信息科技有限公司 Event configuration method and device, electronic equipment and storage medium
CN114518906A (en) * 2022-01-25 2022-05-20 厦门锐谷通信设备有限公司 XML (extensive markup language) description file-based equipment configuration parameter management system and method
CN115562652A (en) * 2022-11-24 2023-01-03 金现代信息产业股份有限公司 Component style processing method and system for low-code development platform

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114371889A (en) * 2022-01-19 2022-04-19 苏州峰之鼎信息科技有限公司 Event configuration method and device, electronic equipment and storage medium
CN114371889B (en) * 2022-01-19 2023-10-13 苏州峰之鼎信息科技有限公司 Event configuration method, device, electronic equipment and storage medium
CN114518906A (en) * 2022-01-25 2022-05-20 厦门锐谷通信设备有限公司 XML (extensive markup language) description file-based equipment configuration parameter management system and method
CN115562652A (en) * 2022-11-24 2023-01-03 金现代信息产业股份有限公司 Component style processing method and system for low-code development platform
CN115562652B (en) * 2022-11-24 2023-08-15 金现代信息产业股份有限公司 Component style processing method and system for low-code development platform

Similar Documents

Publication Publication Date Title
US8370750B2 (en) Technology for generating service program
US11048484B2 (en) Automated responsive grid-based layout design system
CN113391808A (en) Page configuration method and device and electronic equipment
US10008009B1 (en) Method for generating dynamic vector graphics
US11449573B2 (en) System and method for smart interaction between website components
CN101308489B (en) Electronic table statement type size variable list
US10410606B2 (en) Rendering graphical assets on electronic devices
JP7420911B2 (en) Systems and methods for smart interactions between website components
WO2006051958A1 (en) Information distribution system
US11349902B2 (en) System and method to standardize and improve implementation efficiency of user interface content
US20130080879A1 (en) Methods and apparatus providing document elements formatting
CN112800370A (en) Business document processing method and device, computer equipment and storage medium
WO2013109858A1 (en) Design canvas
US8869048B2 (en) Declarative and multi-mode wizard framework
US10802660B1 (en) Metadata-driven binding of platform-agnostic content to platform-specific user-interface elements
Khan et al. A retargetable model-driven framework for the development of mobile user interfaces
CN115437608A (en) Intelligent research and development assisting method and device
KR102191458B1 (en) Apparatus and method for scrapping web data
US11960695B2 (en) Metadata-driven binding of platform-agnostic content to platform-specific user-interface elements
Sundar et al. Content Management System and Automation of Model Cloning Scalable EAV Model in GNEISYS Framework
CN115469870A (en) File online processing method and device, electronic equipment and medium
Giani et al. A set of languages for context-aware adaptation
CN117193728A (en) Development method and device of software as-a-service platform
CN114237589A (en) Skeleton screen generation method and device, terminal device and storage medium
CN117270847A (en) Front-end page generation method and device, equipment and storage 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