CN114816174A - Navigation bar switching method and device, electronic equipment and storage medium - Google Patents

Navigation bar switching method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114816174A
CN114816174A CN202210448473.2A CN202210448473A CN114816174A CN 114816174 A CN114816174 A CN 114816174A CN 202210448473 A CN202210448473 A CN 202210448473A CN 114816174 A CN114816174 A CN 114816174A
Authority
CN
China
Prior art keywords
navigation bar
page
target
navigation
switching
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
CN202210448473.2A
Other languages
Chinese (zh)
Inventor
刘念
邓兴满
田涛
桂晨
陈康
冯小云
张葳
张添
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dawning Network Technology Co ltd
Original Assignee
Dawning Network 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 Dawning Network Technology Co ltd filed Critical Dawning Network Technology Co ltd
Priority to CN202210448473.2A priority Critical patent/CN114816174A/en
Publication of CN114816174A publication Critical patent/CN114816174A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/954Navigation, e.g. using categorised browsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a switching method and a switching device of a navigation bar, electronic equipment and a storage medium, wherein the switching method comprises the following steps: in the display process of the target page, responding to a navigation bar switching request, and acquiring a navigation bar switching type; identifying a target navigation bar according to the switching type of the navigation bar; switching the navigation bar currently displayed in the navigation page into a target navigation bar; and determining a content display updating area in the target page according to the display area where the target navigation bar is positioned, and carrying out scale adjustment on the content page according to the content display updating area. The technical scheme of the embodiment of the invention can realize that the user can autonomously switch the navigation bar in the application page, and meet the display requirement of the user on the large-area content page.

Description

Navigation bar switching method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for switching a navigation bar, an electronic device, and a storage medium.
Background
Page menu navigation is a way, technical means and prompting tool provided for web page visitors to conveniently access required contents. In the page layout, menu navigation is an indispensable part, and with the development of front-end layout, currently, commonly used menu navigation is a top navigation bar and a side navigation bar.
The side navigation bar is a menu navigation bar positioned at the left and right sides of the page, and usually takes the left navigation bar as the main point. The side navigation bar enables a user to see each navigation menu more clearly, and the top navigation bar can reserve more display space for the content page.
However, the position of the navigation bar in the existing page layout is usually fixed. Because the display spaces possibly needed by different content pages are different in size and the operation habits of different users on the pages are also inconsistent, a method for facilitating the user to autonomously switch the position of the navigation bar is lacked in the prior art.
Disclosure of Invention
The invention provides a navigation bar switching method and device, electronic equipment and a storage medium, which can realize that a user can autonomously switch a navigation bar in an application page and meet the display requirement of the user on a large-area content page.
According to an aspect of the present invention, there is provided a method for switching a navigation bar, including:
in the display process of the target page, responding to a navigation bar switching request, and acquiring a navigation bar switching type; the target page comprises: a navigation page and a content page;
identifying a target navigation bar according to the navigation bar switching type, wherein different navigation bars correspond to different display areas in the target page;
switching the navigation bar currently displayed in the navigation page into the target navigation bar;
and determining a content display updating area in the target page according to the display area where the target navigation bar is located, and carrying out scale adjustment on the content page according to the content display updating area.
Optionally, switching the currently displayed navigation bar in the navigation page to the target navigation bar includes:
acquiring a parameter configuration file matched with the navigation page, acquiring a service logic code corresponding to the currently displayed navigation bar in the parameter configuration file, and setting the display parameter corresponding to the currently displayed navigation bar to be hidden in the service logic code;
acquiring a target service logic code corresponding to the target navigation bar in the parameter configuration file, and setting display parameters corresponding to the target navigation bar in the target service logic code to be displayed;
and completing the switching from the currently displayed navigation bar to the target navigation bar by operating the parameter configuration file.
Optionally, determining a content display update area in the target page according to the display area where the target navigation bar is located, and performing scale adjustment on the content page according to the content display update area, where the content display update area includes:
determining a content display updating area according to a side display area and/or a top display area in the navigation page;
and according to the display area where the target navigation bar is located, stretching or shrinking the content page in at least one direction according to the size of the content display updating area.
Optionally, before responding to the navigation bar switching request, the method further includes:
establishing a plurality of menu components corresponding to different display areas and configuration parameters corresponding to the menu components in a front-end interface design engine;
generating service logic codes respectively corresponding to navigation bars in different display areas according to configuration parameters corresponding to each menu component by the front-end interface design engine;
the navigation bar comprises a plurality of menu components.
Optionally, establishing a plurality of menu components corresponding to different display areas includes:
judging whether all menu components are supported to be displayed in the target display area or not according to the size of the target display area;
and if not, arranging the menu components according to the preset priority, and combining a plurality of menu components at the tail end according to the arrangement result to obtain the navigation bar corresponding to the target display area.
Optionally, after performing a scale adjustment on the content page according to the content display update area, the method further includes:
saving the parameter configuration file matched with the navigation page into a preset storage unit;
and responding to a display request of a target page, acquiring a parameter configuration file matched with the navigation page from the storage unit, and operating the parameter configuration file to obtain the navigation page.
According to another aspect of the present invention, there is provided a switching apparatus of a navigation bar, the apparatus including:
the conversion type acquisition module is used for responding to the navigation bar switching request in the display process of the target page and acquiring the navigation bar switching type; the target page comprises: a navigation page and a content page;
the navigation bar identification module is used for identifying a target navigation bar according to the switching type of the navigation bar, wherein different navigation bars correspond to different display areas in the target page;
the navigation bar switching module is used for switching the navigation bar currently displayed in the navigation page into the target navigation bar;
and the page adjusting module is used for determining a content display updating area in the target page according to the display area where the target navigation bar is located, and carrying out scale adjustment on the content page according to the content display updating area.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the method for switching the navigation bar according to any embodiment of the present invention.
According to another aspect of the present invention, a computer-readable storage medium is provided, and computer instructions are stored in the computer-readable storage medium, and when the computer instructions are executed, the computer instructions are used for causing a processor to implement the method for switching the navigation bar according to any embodiment of the present invention.
According to another aspect of the present invention, a computer program product is provided, which comprises a computer program, which when executed by a processor implements the method for switching a navigation bar according to any of the embodiments of the present invention.
According to the technical scheme provided by the embodiment of the invention, in the display process of the target page, the navigation bar switching type is obtained in response to the navigation bar switching request, the target navigation bar is identified according to the navigation bar switching type, the navigation bar currently displayed in the navigation page is switched to the target navigation bar, the content display updating area is determined in the target page according to the display area where the target navigation bar is located, and the scale of the content page is adjusted according to the content display updating area, so that the navigation bar in the application page can be autonomously switched by a user; ensuring the validity of the switching result of the navigation bar; when the navigation bar is switched, the service logic code corresponding to the target navigation bar can be quickly acquired, the switching time of the navigation bar is saved, and the switching efficiency of the navigation bar is improved; page resources occupied by menu components can be saved; the content page is displayed without using an independent window, and the display requirement of a user on a large-area content page can be met by automatically stretching the content page, so that the viewing experience of the user on the content page is improved; by recording the configuration file of the user for the navigation bar last time, the target page can be automatically matched with the use habit of the user, and the use experience of the user on the application program is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1a is a flowchart of a method for switching a navigation bar according to an embodiment of the present invention;
FIG. 1b is a schematic diagram of a target page according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of another target page provided in accordance with an embodiment of the present invention;
FIG. 1d is a schematic diagram of another target page provided in accordance with an embodiment of the present invention;
FIG. 1e is a diagram of another target page provided in accordance with an embodiment of the present invention;
FIG. 2a is a flowchart of another method for switching a navigation bar according to an embodiment of the present invention;
FIG. 2b is a schematic diagram of another target page provided in accordance with an embodiment of the present invention;
FIG. 2c is a schematic diagram of another target page provided in accordance with an embodiment of the present invention;
FIG. 2d is a schematic diagram of another target page provided in accordance with an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a switching device of a navigation bar according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a method for switching a navigation bar according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1a is a flowchart of a method for switching a navigation bar according to an embodiment of the present invention, where the method is applicable to a case where a user switches a position of a navigation bar in an application page, and the method may be executed by a switching device of the navigation bar, where the switching device of the navigation bar may be implemented in a form of hardware and/or software, and the switching device of the navigation bar may be configured in an electronic device (e.g., a terminal or a server) having a data processing function. As shown in fig. 1a, the method comprises:
and step 110, responding to the navigation bar switching request in the display process of the target page, and acquiring the navigation bar switching type.
In this embodiment, the target page may be a display page of an application, and the target page includes a navigation page and a content page. The navigation page is used for displaying a navigation bar of an application program, and the content page may be a page in which the application program displays specific content or resources to a user. Specifically, the navigation bar may include a plurality of menu components for linking various sites and pages in the application.
In a specific embodiment, fig. 1b may be a schematic diagram of a target page, as shown in fig. 1b, the target page may include a navigation page 101 and a content page 102. The navigation page 101 may include a top display area for displaying the top navigation bar and a side display area for displaying the side navigation bar. During the presentation of the target page, only the top navigation bar or the side navigation bar is usually presented.
In this embodiment, after detecting that the user triggers the display request of the target page for the first time, the application program may display the navigation bar in the display area corresponding to the navigation page according to the default display position of the navigation bar. In the display process of the target page, if the user wants to switch the position of the navigation bar, a navigation bar switching button in the target page can be triggered to initiate a navigation bar switching request.
In this step, after detecting that the user triggers the navigation bar switching button, the navigation bar switching type may be determined according to the attribute of the navigation bar switching button. Specifically, assuming that the name of the navigation bar switching button triggered by the user is "side navigation bar", it may be determined that the navigation bar switching type is to switch the currently displayed navigation bar to the side navigation bar; assuming that the name of the navigation bar switching button triggered by the user is "top navigation bar", it may be determined that the navigation bar switching type is to switch the currently presented navigation bar to the top navigation bar.
And 120, identifying a target navigation bar according to the navigation bar switching type, wherein different navigation bars correspond to different display areas in the target page.
In this step, the final navigation bar pointed to in the navigation bar switching type may be taken as the target navigation bar. For example, if the navigation bar switching type is to switch the currently displayed navigation bar to the sidebar navigation bar, the sidebar navigation bar may be used as the target navigation bar; assuming that the navigation bar switching type is to switch the currently displayed navigation bar to the top navigation bar, the top navigation bar may be used as the target navigation bar.
In this embodiment, different navigation bars correspond to different display areas. For example, the side navigation bar corresponds to a side presentation area of the navigation page and the top navigation bar corresponds to a top presentation area of the navigation page.
And step 130, switching the currently displayed navigation bar in the navigation page into the target navigation bar.
In this step, optionally, the navigation bar currently displayed in the navigation page may be hidden, and the target navigation bar may be displayed in the corresponding display area.
In a specific embodiment, in the configuration information corresponding to the target page, the display attribute of the currently displayed navigation bar may be set to "off", and the display attribute of the target navigation bar may be set to "on", so as to complete the switching process from the currently displayed navigation bar to the target navigation bar.
In a specific embodiment, it is assumed that after the user first triggers the display request of the target page, the target page displayed by the application program is as shown in fig. 1c, wherein the navigation field is located in the top display area of the navigation page, and the navigation field includes menu component 1, menu component 2 … … and menu component 5. Assuming that the user triggers the switch button of the "side navigation bar", the target page after the navigation bar is switched can be obtained, as shown in fig. 1 d.
The method has the advantages that the navigation bar in the application page can be switched autonomously by the user, the operation habits of different users on the application page are met, and the use experience of the user on the application program is improved.
Step 140, determining a content display updating area in the target page according to the display area where the target navigation bar is located, and performing scale adjustment on the content page according to the content display updating area.
In this embodiment, after the position of the navigation bar is switched, a blank area in another navigation bar display area may be acquired as a content display update area according to the display area where the target navigation bar is located, and a scale of the content page may be adjusted according to the content display update area.
In a specific embodiment, assuming that the display area where the target navigation bar is located is a top display area, since fewer elements need to be displayed in the side display area, a blank area in the side display area may be used as a content display update area, and the content page is laterally stretched according to the content display update area. On the contrary, when the display area where the target navigation bar is located is the side display area, because the number of elements to be displayed in the top display area is reduced, the blank area in the top display area can be used as the content display updating area, and the content page is longitudinally stretched according to the content display updating area.
Taking the target page in fig. 1d as an example, assuming that the user triggers the switch button of the "top navigation bar", the side navigation bar may be switched to the top navigation bar, and the content page is stretched horizontally, so as to obtain the target page shown in fig. 1 e.
The display method has the advantages that the display requirement of a user on a large-area content page can be met, and the flexibility of the display mode of the navigation bar is improved.
According to the technical scheme provided by the embodiment of the invention, in the display process of the target page, the navigation bar switching type is obtained in response to the navigation bar switching request, the target navigation bar is identified according to the navigation bar switching type, the navigation bar currently displayed in the navigation page is switched to the target navigation bar, the content display updating area is determined in the target page according to the display area where the target navigation bar is located, and the scale adjustment is carried out on the content page according to the content display updating area.
Fig. 2a is a flowchart of a method for switching a navigation bar according to a second embodiment of the present invention, where the relationship between the present embodiment and the above-mentioned embodiments is to add technical features for switching a navigation bar. As shown in fig. 2a, the method comprises:
and step 210, responding to the navigation bar switching request in the display process of the target page, and acquiring the navigation bar switching type.
And step 220, identifying a target navigation bar according to the switching type of the navigation bar.
Step 230, obtaining a parameter configuration file matched with the navigation page, obtaining a service logic code corresponding to the currently displayed navigation bar in the parameter configuration file, and setting a display parameter corresponding to the currently displayed navigation bar as hidden in the service logic code.
In this step, a parameter configuration file matched with the navigation page may be obtained from a preset memory, where the parameter configuration file includes service logic codes corresponding to all components in the navigation page. Specifically, the corresponding service logic code may be obtained in the parameter configuration file according to the component identifier corresponding to the currently displayed navigation bar, and the display parameter corresponding to the currently displayed navigation bar may be set to be hidden in the service logic code.
Step 240, obtaining a target service logic code corresponding to the target navigation bar in the parameter configuration file, and setting a display parameter corresponding to the target navigation bar in the target service logic code to be displayed.
In this step, a target service logic code corresponding to the target navigation bar may be obtained in the parameter configuration file according to the component identifier corresponding to the target navigation bar, and a display parameter corresponding to the target navigation bar may be set to be displayed in the target service logic code.
And step 250, switching the currently displayed navigation bar to the target navigation bar by operating the parameter configuration file.
In this step, a new navigation page may be rendered by running the service logic code of each component in the parameter file, so as to complete the switching from the currently displayed navigation bar to the target navigation bar.
The method has the advantages that the display parameters in the service logic codes are modified in the parameter configuration file, so that the validity of the switching result of the navigation bar can be ensured, and the switching efficiency of the navigation bar is improved.
In an implementation manner of this embodiment, before responding to the navigation bar switching request, the method further includes: establishing a plurality of menu components corresponding to different display areas and configuration parameters corresponding to each menu component in a preset front-end interface design engine; generating service logic codes respectively corresponding to navigation bars in different display areas according to configuration parameters corresponding to each menu component by the front-end interface design engine; the navigation bar comprises a plurality of menu components. The front-end interface design engine may be an elementui or other development engine supporting the configuration of page components.
In a specific embodiment, corresponding menu components and configuration parameters (such as coordinates, display styles, colors, fonts and the like) corresponding to the menu components may be established according to different positions corresponding to different display areas, and then, through a front-end interface design engine, service logic codes respectively corresponding to navigation bars (such as a top navigation bar and a side navigation bar) in different display areas are generated according to the configuration parameters corresponding to the menu components.
The configuration parameters corresponding to the menu components can be packaged according to the dependency relationship among the menu components, and the front-end interface design engine can generate corresponding business logic codes according to the packaged configuration parameters. Specifically, if the menu component a includes a sub-menu component B and a sub-menu component C, the display parameter of the menu component a may be set to menu, and the display parameter corresponding to the sub-menu component B and the sub-menu component C may be set to submenu.
The method has the advantages that the service logic codes corresponding to the target navigation bar can be conveniently and quickly acquired when the navigation bar is switched by pre-establishing a plurality of menu components corresponding to different display areas and configuration parameters corresponding to the menu components, so that the switching time of the navigation bar can be saved, and the switching efficiency of the navigation bar is improved.
In this embodiment, establishing a plurality of menu components corresponding to different display areas includes: judging whether all menu components are displayed in the target display area or not according to the size of the target display area; and if not, arranging the menu components according to the preset priority, and combining a plurality of menu components at the tail end according to the arrangement result to obtain the navigation bar corresponding to the target display area.
Judging whether all menu components can be displayed in the target display area or not according to the size of the target display area and the size of each menu component, and if so, generating a corresponding business logic code according to configuration parameters of each menu component through a front-end interface design engine; if not, combining the plurality of menu components with lower priority to obtain menu component blocks, and taking the remaining menu components and menu component blocks as navigation bars of the target display area.
In a specific embodiment, assuming that the navigation bar includes menu component 1, menu component 2, menu component 3, menu component 4 … … and menu component 8, when the area of the top display area is small and all menu components cannot be displayed, the menu components may be arranged according to priority, several menu components with lower priorities (assumed to be menu component 2, menu component 4, menu component 7 and menu component 8) are combined to obtain a menu component block, and then the remaining menu components and menu component blocks are displayed together in the top display area, as shown in fig. 2 b.
The advantage that sets up like this lies in, can save the page resource that menu component occupy on the one hand, and on the other hand directly demonstrates the user through the menu component with higher priority, is convenient for the user to obtain the menu component that needs to trigger fast, improves the user and experiences to application.
And 260, determining a content display updating area in the target page according to the display area where the target navigation bar is located, and carrying out scale adjustment on the content page according to the content display updating area.
In an embodiment of this embodiment, determining a content display update area in the target page according to the display area where the target navigation bar is located, and performing a scale adjustment on the content page according to the content display update area includes: determining a content display updating area according to a side display area and/or a top display area in the navigation page; and according to the display area where the target navigation bar is located, stretching or shrinking the content page in at least one direction according to the content display updating area.
In a specific embodiment, the side display area in the navigation page can be directly used as the content display updating area. If the display area where the target navigation bar is located is the top display area, the content page can be transversely stretched according to the width of the content display updating area; if the display area where the target navigation bar is located is a side display area, the content page can be transversely contracted according to the width of the content display updating area.
Taking the target page in FIG. 2c as an example, the sidebar navigation bar includes the following menu components: home, Menu two, Menu3, basic, form, pop-up, table, icon, and others. When the user triggers the "top menu" button, each menu component may be switched to the top display area, and the content page is laterally stretched according to the width of the side display area, so as to obtain the target page shown in fig. 2 d.
In another specific embodiment, the side presentation area and the top presentation area in the navigation page may be used as the content presentation update area. If the display area where the target navigation bar is located is a top display area, the content page can be transversely stretched according to the width of the side display area, and the content page can be longitudinally contracted according to the height of the top display area; if the display area where the target navigation bar is located is a side display area, the content page can be transversely contracted according to the width of the side display area, and the content page can be longitudinally stretched according to the height of the top display area.
The advantage of setting up like this lies in, need not use solitary window show content page, through to content page automatic stretching, can satisfy the user to the show demand of large tracts of land content page, can improve the user and watch the experience to content page from this.
The technical proposal provided by the embodiment of the invention obtains the switching type of the navigation bar in response to the switching request of the navigation bar in the display process of the target page, identifying a target navigation bar according to the switching type of the navigation bar, acquiring a parameter configuration file matched with a navigation page, setting the display parameter corresponding to the currently displayed navigation bar as hidden and the display parameter corresponding to the target navigation bar as displayed in the parameter configuration file, the switching from the currently displayed navigation bar to the target navigation bar is completed by operating the parameter configuration file, determining a content display updating area in the target page according to the display area of the target navigation bar, displaying the updating area according to the content, the technical means for carrying out the scale adjustment on the content page can realize that the user can carry out the autonomous switching on the navigation bar in the application page, and the display requirement of the user on the large-area content page is met.
On the basis of the above embodiment, after performing the scaling adjustment on the content page according to the content presentation update area, the method further includes: saving the parameter configuration file matched with the navigation page into a preset storage unit; and responding to the display request of the target page, acquiring a parameter configuration file matched with the navigation page from the storage unit, and operating the parameter configuration file to obtain the navigation page.
In this embodiment, after the user completes switching the navigation bar, if the user triggers the display request of the target page again, the parameter configuration file of the navigation page that is stored last time may be obtained from the storage unit, and the navigation page is obtained by operating the parameter configuration file.
The method has the advantages that the configuration file of the navigation bar which is used by the user for the last time is recorded, so that the target page can be automatically matched with the use habit of the user, and the use experience of the user on the application program is improved.
Fig. 3 is a schematic structural diagram of a switching device of a navigation bar according to a third embodiment of the present invention, as shown in fig. 3, the switching device includes: a conversion type acquisition module 310, a navigation bar recognition module 320, a navigation bar switching module 330, and a page adjustment module 340.
The conversion type obtaining module 310 is configured to, in a display process of a target page, respond to a navigation bar switching request and obtain a navigation bar switching type; the target page comprises: a navigation page and a content page;
the navigation bar identification module 320 is configured to identify a target navigation bar according to the navigation bar switching type, where in the target page, different navigation bars correspond to different display areas;
a navigation bar switching module 330, configured to switch a currently displayed navigation bar in the navigation page to the target navigation bar;
and the page adjusting module 340 is configured to determine a content display updating area in the target page according to the display area where the target navigation bar is located, and perform scale adjustment on the content page according to the content display updating area.
According to the technical scheme provided by the embodiment of the invention, in the display process of the target page, the navigation bar switching type is obtained in response to the navigation bar switching request, the target navigation bar is identified according to the navigation bar switching type, the navigation bar currently displayed in the navigation page is switched to the target navigation bar, the content display updating area is determined in the target page according to the display area where the target navigation bar is located, and the scale adjustment is carried out on the content page according to the content display updating area.
On the basis of the above embodiment, the navigation bar switching module 330 includes:
the hiding unit is used for acquiring a parameter configuration file matched with the navigation page, acquiring a service logic code corresponding to the currently displayed navigation bar in the parameter configuration file, and setting the display parameter corresponding to the currently displayed navigation bar in the service logic code to be hidden;
the display unit is used for acquiring a target service logic code corresponding to the target navigation bar in the parameter configuration file, and setting display parameters corresponding to the target navigation bar in the target service logic code to be displayed;
and the file operation unit is used for completing the switching from the currently displayed navigation bar to the target navigation bar by operating the parameter configuration file.
The page adjustment module 340 includes:
the area determining unit is used for determining a content display updating area according to a side display area and/or a top display area in the navigation page;
and the page size adjusting unit is used for stretching or shrinking the content page in at least one direction according to the size of the content display updating area according to the display area where the target navigation bar is located.
The switching device of the navigation bar further comprises:
the menu component establishing module is used for establishing a plurality of menu components corresponding to different display areas and configuration parameters corresponding to the menu components in the front-end interface design engine;
the code generation module is used for generating business logic codes respectively corresponding to the navigation bars in different display areas according to the configuration parameters corresponding to the menu components through a front-end interface design engine;
the navigation bar comprises a plurality of menu components;
the region judgment module is used for judging whether all menu components are displayed in the target display region or not according to the size of the target display region;
the menu arrangement module is used for arranging all menu components according to a preset priority level when all menu components are not supported to be displayed in the target display area, and combining a plurality of menu components at the tail end according to an arrangement result to obtain a navigation bar corresponding to the target display area;
the configuration file storage module is used for storing the parameter configuration file matched with the navigation page into a preset storage unit;
and the configuration file acquisition module is used for responding to a display request of a target page, acquiring the parameter configuration file matched with the navigation page from the storage unit, and operating the parameter configuration file to obtain the navigation page.
The device can execute the methods provided by all the embodiments of the invention, and has corresponding functional modules and beneficial effects for executing the methods. For technical details which are not described in detail in the embodiments of the present invention, reference may be made to the methods provided in all the aforementioned embodiments of the present invention.
FIG. 4 shows a schematic block diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to the bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as the switching method of the navigation bar.
In some embodiments, the switching method of the navigation bar may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for switching the navigation bar described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured by any other suitable means (e.g. by means of firmware) to perform the switching method of the navigation bar.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for switching a navigation bar is characterized by comprising the following steps:
in the display process of the target page, responding to a navigation bar switching request, and acquiring a navigation bar switching type; the target page comprises: a navigation page and a content page;
identifying a target navigation bar according to the navigation bar switching type, wherein different navigation bars correspond to different display areas in the target page;
switching the navigation bar currently displayed in the navigation page into the target navigation bar;
and determining a content display updating area in the target page according to the display area where the target navigation bar is located, and carrying out scale adjustment on the content page according to the content display updating area.
2. The method of claim 1, wherein switching the currently displayed navigation bar in the navigation page to the target navigation bar comprises:
acquiring a parameter configuration file matched with the navigation page, acquiring a service logic code corresponding to the currently displayed navigation bar in the parameter configuration file, and setting the display parameter corresponding to the currently displayed navigation bar to be hidden in the service logic code;
acquiring a target service logic code corresponding to the target navigation bar in the parameter configuration file, and setting display parameters corresponding to the target navigation bar in the target service logic code to be displayed;
and completing the switching from the currently displayed navigation bar to the target navigation bar by operating the parameter configuration file.
3. The method according to claim 1, wherein determining a content display update area in the target page according to the display area where the target navigation bar is located, and performing a scaling adjustment on the content page according to the content display update area comprises:
determining a content display updating area according to a side display area and/or a top display area in the navigation page;
and according to the display area where the target navigation bar is located, stretching or shrinking the content page in at least one direction according to the size of the content display updating area.
4. The method of claim 2, prior to responding to a navigation bar toggle request, further comprising:
establishing a plurality of menu components corresponding to different display areas and configuration parameters corresponding to each menu component in a preset front-end interface design engine;
generating service logic codes respectively corresponding to navigation bars in different display areas according to configuration parameters corresponding to each menu component by the front-end interface design engine;
the navigation bar comprises a plurality of menu components.
5. The method of claim 4, wherein establishing a plurality of menu components corresponding to different display areas comprises:
judging whether all menu components are supported to be displayed in the target display area or not according to the size of the target display area;
and if not, arranging the menu components according to the preset priority, and combining a plurality of menu components at the tail end according to the arrangement result to obtain the navigation bar corresponding to the target display area.
6. The method of claim 2, further comprising, after scaling the content page according to the content presentation update region:
saving the parameter configuration file matched with the navigation page into a preset storage unit;
and responding to a display request of a target page, acquiring a parameter configuration file matched with the navigation page from the storage unit, and operating the parameter configuration file to obtain the navigation page.
7. A switching apparatus of a navigation bar, comprising:
the conversion type acquisition module is used for responding to the navigation bar switching request in the display process of the target page and acquiring the navigation bar switching type; the target page comprises: a navigation page and a content page;
the navigation bar identification module is used for identifying a target navigation bar according to the switching type of the navigation bar, wherein in the target page, different navigation bars correspond to different display areas;
the navigation bar switching module is used for switching the navigation bar currently displayed in the navigation page into the target navigation bar;
and the page adjusting module is used for determining a content display updating area in the target page according to the display area where the target navigation bar is located, and carrying out scale adjustment on the content page according to the content display updating area.
8. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of switching a navigation bar of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions for causing a processor to implement the method of switching a navigation bar of any one of claims 1-6 when executed.
10. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, implements a method of switching a navigation bar according to any one of claims 1-6.
CN202210448473.2A 2022-04-26 2022-04-26 Navigation bar switching method and device, electronic equipment and storage medium Pending CN114816174A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210448473.2A CN114816174A (en) 2022-04-26 2022-04-26 Navigation bar switching method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210448473.2A CN114816174A (en) 2022-04-26 2022-04-26 Navigation bar switching method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114816174A true CN114816174A (en) 2022-07-29

Family

ID=82506701

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210448473.2A Pending CN114816174A (en) 2022-04-26 2022-04-26 Navigation bar switching method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114816174A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104364752A (en) * 2012-04-10 2015-02-18 谷歌公司 Floating navigational controls in a tablet computer
CN106293380A (en) * 2015-06-10 2017-01-04 联想(北京)有限公司 Information processing method and electronic equipment
CN107145277A (en) * 2017-06-30 2017-09-08 深圳传音通讯有限公司 The switching handling method and mobile terminal of navigation bar position
CN112579927A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Method and device for displaying navigation bar
CN114356177A (en) * 2021-12-31 2022-04-15 上海洛轲智能科技有限公司 Display method and device of vehicle-mounted system menu bar and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104364752A (en) * 2012-04-10 2015-02-18 谷歌公司 Floating navigational controls in a tablet computer
CN106293380A (en) * 2015-06-10 2017-01-04 联想(北京)有限公司 Information processing method and electronic equipment
CN107145277A (en) * 2017-06-30 2017-09-08 深圳传音通讯有限公司 The switching handling method and mobile terminal of navigation bar position
CN112579927A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Method and device for displaying navigation bar
CN114356177A (en) * 2021-12-31 2022-04-15 上海洛轲智能科技有限公司 Display method and device of vehicle-mounted system menu bar and electronic equipment

Similar Documents

Publication Publication Date Title
CN108363593A (en) Application program preloads method, apparatus, storage medium and terminal
CN109361948B (en) Interface management method, intelligent terminal and readable storage medium
CN113552988A (en) Interface focus control method and device, electronic equipment and storage medium
CN113655895B (en) Information recommendation method and device applied to input method and electronic equipment
CN114816578A (en) Method, device and equipment for generating program configuration file based on configuration table
CN114816184A (en) Display method, device, equipment and storage medium of operation control
CN108762838A (en) Application program preloads method, apparatus, storage medium and terminal
CN114816174A (en) Navigation bar switching method and device, electronic equipment and storage medium
CN115238652A (en) Table data generation method and device, electronic equipment and readable storage medium
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
CN114756468A (en) Test data creating method, device, equipment and storage medium
CN113377473A (en) Task creation method and device, electronic equipment and computer readable storage medium
CN112861504A (en) Text interaction method, device, equipment, storage medium and program product
CN114371889B (en) Event configuration method, device, electronic equipment and storage medium
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN114510189B (en) Label switching method and device, electronic equipment and storage medium
CN115202538B (en) Menu configuration method and device, electronic equipment and storage medium
CN107179914A (en) Application processing method and device
EP4216097A1 (en) Method, system, equipment and medium for modifying the layering layer information of finite element model unit
CN113986112B (en) Soft keyboard display method, related device and computer program product
CN114564133A (en) Application program display method, device, equipment and medium
CN114416040A (en) Page construction method, device, equipment and storage medium
CN116560778A (en) Input method calling method, device, equipment and storage medium
CN117742545A (en) Page turning information processing method, device, equipment and medium
CN113343005A (en) Searching method, searching device, electronic equipment and readable 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220729