WO2019134296A1 - Page processing method and device, and readable storage medium - Google Patents

Page processing method and device, and readable storage medium Download PDF

Info

Publication number
WO2019134296A1
WO2019134296A1 PCT/CN2018/082704 CN2018082704W WO2019134296A1 WO 2019134296 A1 WO2019134296 A1 WO 2019134296A1 CN 2018082704 W CN2018082704 W CN 2018082704W WO 2019134296 A1 WO2019134296 A1 WO 2019134296A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
navigation component
size
scroll bar
bar position
Prior art date
Application number
PCT/CN2018/082704
Other languages
French (fr)
Chinese (zh)
Inventor
黄诚
陈少杰
张文明
Original Assignee
武汉斗鱼网络科技有限公司
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 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2019134296A1 publication Critical patent/WO2019134296A1/en

Links

Images

Classifications

    • 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
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • G06F3/04855Interaction with scrollbars

Definitions

  • the present application relates to the field of computer technology, and in particular, to a page processing method, apparatus, and readable storage medium.
  • the purpose of the present application includes providing a page processing method, apparatus, and readable storage medium, which can display different navigation components according to the size of the current page, thereby making the layout of the entire page simpler. , to give the page viewer a consistent reading experience, while the user will always be attracted to the content area of the page, which can effectively avoid interrupting the reader's interaction with the page.
  • the embodiment of the present application provides a page processing method, which is applied to an electronic device, and the method includes:
  • the second navigation component is loaded onto the page for display.
  • the scroll bar position of the above-mentioned acquisition page during the scrolling process includes:
  • the scroll event response function of the window object is called to obtain the scroll bar position.
  • the determining whether the position of the scroll bar reaches a preset condition includes:
  • the preset distance is a height of a view window.
  • the method further includes:
  • the first navigation component being displayed is transitioned to the second navigation component based on a preset animation function.
  • the method further includes:
  • the second navigation component being displayed is transitioned to the first navigation component based on a preset animation function.
  • the obtaining the size of the page in the zooming process includes:
  • Callback function of the resize event of the window object is called to get the size of the page during the zooming process.
  • the foregoing method further includes:
  • the second navigation component is not displayed.
  • the method further includes:
  • the first navigation component and the second navigation component are respectively inserted into different locations of the page.
  • the foregoing method further includes:
  • the embodiment of the present application further provides a page processing apparatus, which is applied to an electronic device, and the device includes:
  • the get module is used to get the position of the scroll bar of the page during scrolling.
  • the first determining module is configured to determine whether the scroll bar position reaches a preset condition.
  • the second determining module is configured to determine, if the preset condition is reached, whether the size of the page is not less than a predetermined size.
  • the first loading module is configured to load the first navigation component to the page for display if the size of the page is not less than a predetermined size.
  • the second loading module is configured to load the second navigation component to the page for display if the size of the page is smaller than a predetermined size.
  • the foregoing obtaining module is specifically configured to:
  • the scroll event response function of the window object is called to obtain the scroll bar position.
  • the foregoing first determining module is specifically configured to:
  • the preset distance is a height of a view window.
  • the page processing apparatus further includes a transition module, configured to:
  • the first navigation component being displayed is transitioned to the second navigation component based on a preset animation function.
  • the foregoing transition module is further configured to:
  • the second navigation component being displayed is transitioned to the first navigation component based on the preset animation function.
  • the process of acquiring the size of the page in the zooming process by using the transition module includes:
  • Callback function of the resize event of the window object is called to get the size of the page during the zooming process.
  • the page processing apparatus further includes a third determining module, configured to:
  • the second navigation component is not displayed.
  • the page processing apparatus further includes a configuration module, configured to:
  • the embodiment of the present application further provides a readable storage medium, where the readable storage medium stores a computer program, and when the computer program is executed, the page processing method described above is implemented.
  • the embodiment of the present invention provides a page processing method, a device, and a readable storage medium. First, obtaining a scroll bar position of a page during scrolling, and determining whether the scroll bar position reaches a preset condition, if the preset is reached. a condition, determining whether the size of the page is not less than a predetermined size: if the size of the page is not less than a predetermined size, loading the first navigation component to the page for display; if the size of the page is smaller than a predetermined size, The second navigation component is loaded into the page for display.
  • FIG. 1 is a schematic flowchart of a page processing method according to an embodiment of the present application
  • step S220 is a schematic flow chart of each sub-step included in step S220 shown in FIG. 1;
  • FIG. 3 is a functional block diagram of a page processing apparatus according to an embodiment of the present disclosure.
  • FIG. 4 is a schematic block diagram of an electronic device for implementing the above page processing method according to an embodiment of the present application.
  • Icon 100-electronic device; 110-bus; 120-processor; 130-storage medium; 140-bus interface; 150-network adapter; 160-user interface; 200-page processing device; 210-acquisition module; a judging module; 230 - a second judging module; 240 - a first loading module; 250 - a second loading module.
  • FIG. 1 is a schematic flowchart of a page processing method according to an embodiment of the present application. It should be noted that the page processing method provided by the embodiment of the present application is not limited to the specific order described in FIG. 2 and the following.
  • the page processing method can be implemented by the following steps:
  • Step S210 Acquire a scroll bar position of the page during scrolling.
  • the page scroll event may be detected by calling the mouse wheel event response function, and when the page scroll event is detected, the scroll event response function of the window object (Window object) is called to obtain the scroll bar. position.
  • the scroll event response function of the window object Window object
  • Step S220 determining whether the scroll bar position reaches a preset condition.
  • step S220 can be implemented by the following sub-steps:
  • Sub-step S221 calculating a distance between the scroll bar position and the start position of the scroll bar of the page.
  • the navigation component when the page viewer enters the page, since the page display will start from the beginning position of the page, that is, the page starts to be displayed at the top of the display window, the navigation component will not be displayed by default because there is no It is necessary to let the user locate the page.
  • whether to display or hide the navigation component can be determined by calculating the distance between the scroll bar position and the start position of the scroll bar of the page in real time.
  • Sub-step S222 determining whether the distance reaches a preset distance.
  • the preset distance may be set in advance, for example, the preset distance may be a height of one (or more) view windows along the page scrolling direction, that is, if the scroll bar position is away from the If the position of the start position of the scroll bar of the page reaches the height of the height of one view window, then sub-step S222a is performed to determine that the position of the scroll bar reaches a preset condition; if the position of the scroll bar is away from the start position of the scroll bar of the page If the position has not reached the height of one view window, then sub-step S222b is performed to determine that the scroll bar position has not reached the preset condition.
  • the preset distance may be a height of one (or more) view windows along the page scrolling direction, that is, if the scroll bar position is away from the If the position of the start position of the scroll bar of the page reaches the height of the height of one view window, then sub-step S222a is performed to determine that the scroll bar position has not reached the preset condition.
  • the scrolling speed of the page may also be acquired, and after the preset condition is reached, the scrolling speed of the page is referenced. The next step is continued when the page is at rest or the scroll speed is less than a preset speed.
  • step S230 is performed to determine whether the size of the page is not less than a predetermined size.
  • step S240 is performed to load the first navigation component to the page for display.
  • the predetermined size may be set in advance, for example, the predetermined size may be set to a width of 1366px (1366 pixels), that is, the width of the page is not less than 1366px, then the first The navigation component is loaded into the page for display.
  • step S250 is performed to load the second navigation component to the page for display. For example, if the width of the page is not less than 1366px, then the second navigation component is loaded into the page for display.
  • the predetermined size may also be set to the height of the page (for example, 800px), or set to a parameter such as the area of the page, the aspect ratio, and the like.
  • a parameter such as the area of the page, the aspect ratio, and the like.
  • different navigation components can be displayed according to the size of the current page, so that the layout of the entire page is more concise, and the page viewer has a consistent reading experience, and the user is always attracted by the content area of the page. Therefore, it is possible to effectively avoid interrupting the reader's interaction with the page.
  • the page processing method provided in this embodiment may further include the step of configuring the first navigation component and the second navigation component, specifically, the first navigation may be responded to by the response. a request for configuration of the component and the second navigation component, configuring component information of the first navigation component and the second navigation component on the page, wherein the component information may include a background, a font, a color At least one.
  • the embodiment may further provide an editing panel of the first navigation component and the second navigation component, when a developer and an operation and maintenance personnel of the page select (eg, click) the first navigation component or the second navigation component.
  • the corresponding navigation component will introduce an editing panel in the page, through which the user of the navigation component such as the developer and the designer of the page can customize the corresponding editing box on the panel according to the design drawing.
  • the navigation component 's background, font, color and other parameters, to customize the navigation component consistent with the design of the page style, and finally the result of the preservation is the final browsing experience of the final page viewer.
  • the use of the navigation component can be made more flexible, and the style suitable for the current page style can be quickly realized, and at the same time, the function package cannot be changed, thus avoiding repeated tests.
  • the user may check whether the second navigation component is enabled, that is, whether the screen adaptation mode is enabled, and if not, the first navigation component is not displayed. Two navigation components.
  • the first navigation component and the second navigation component are respectively inserted into different places of the page (the second navigation component is inserted into the body tag), thus, two The navigation components are independent of each other, so the operation of one of the navigation components does not affect the additional navigation components. Therefore, if the user does not enable the screen adaptation mode, the navigation component only inserts the necessary structural strategy, thereby reducing the number of elements in the page and improving the performance of the page. And, by adopting a manner of delay loading the first navigation component, the performance and loading speed of the page can be improved.
  • the page processing method may also perform responsive processing according to the change of the page size, which may be implemented by the following steps:
  • the callback function of the object's resize event gets the size of the page during the zoom process.
  • the predetermined size may be set in advance, for example, the predetermined size may be set to a width of 1366px, that is, if the page is When the width is less than 1366px, the first navigation component being displayed is transitioned to the second navigation component based on a preset animation function. More specifically, the width of the current page can be obtained by the function $(window).width() provided by the jQuery library. If the width is less than 1366px, then the preset animation function provided by the jQuery library is used to change the first navigation component. Position and visibility to smoothly transition to the second navigation component.
  • the second navigation component being displayed is transitioned to the The first navigation component. That is, when the user zooms the page again, if the page width is greater than 1366px, then the position and visibility of the second navigation component is changed based on the preset animation function to smoothly transition to the first navigation component.
  • the switching of the first navigation component and the second navigation component utilizes an animation implementation, which can make the whole switching process more natural and vivid, and does not bring oysters and cards to the page viewer during the switching process.
  • an animation implementation which can make the whole switching process more natural and vivid, and does not bring oysters and cards to the page viewer during the switching process.
  • Experience enhance the user browsing experience.
  • the embodiment of the present application further provides a page processing apparatus 200, where the apparatus may include:
  • the obtaining module 210 is configured to obtain a scroll bar position of the page during the scrolling process.
  • the first determining module 220 is configured to determine whether the scroll bar position reaches a preset condition.
  • the second determining module 230 is configured to determine, if the preset condition is reached, whether the size of the page is not less than a predetermined size.
  • the first loading module 240 is configured to load the first navigation component to the page for display if the size of the page is not less than a predetermined size.
  • the second loading module 250 is configured to load the second navigation component to the page for display if the size of the page is smaller than a predetermined size.
  • the embodiment of the present application further provides a readable storage medium, where the readable storage medium stores a computer program, and when the computer program is executed, the page processing method described above is implemented.
  • FIG. 4 is a schematic block diagram of a structure of an electronic device 100 according to an embodiment of the present application.
  • the electronic device 100 may be a mobile phone, a tablet computer, a personal computer (PC), a notebook computer, etc., which is not specifically limited in this embodiment.
  • electronic device 100 can be implemented by bus 110 as a general bus architecture.
  • bus 110 may include any number of interconnecting buses and bridges.
  • Bus 110 connects various circuits together, including processor 120, storage medium 130, and bus interface 140.
  • the electronic device 100 may connect the network adapter 150 or the like via the bus 110 using the bus interface 140.
  • the network adapter 150 can be used to implement a signal processing function of a physical layer in the electronic device 100, and realize transmission and reception of radio frequency signals through an antenna.
  • the user interface 160 can be connected to an external device such as a keyboard, a display, a mouse, or a joystick.
  • the bus 110 can also be connected to various other circuits, such as timing sources, peripherals, voltage regulators, or power management circuits, etc., which are well known in the art and therefore will not be described in detail.
  • the electronic device 100 can also be configured as a general purpose processing system, such as generally referred to as a chip, the general purpose processing system including: one or more microprocessors providing processing functionality, and an external memory providing at least a portion of the storage medium 130, All of this is connected to other support circuits through an external bus architecture.
  • a general purpose processing system such as generally referred to as a chip
  • the general purpose processing system including: one or more microprocessors providing processing functionality, and an external memory providing at least a portion of the storage medium 130, All of this is connected to other support circuits through an external bus architecture.
  • the electronic device 100 can be implemented using an ASIC (Application Specific Integrated Circuit) having a processor 120, a bus interface 140, a user interface 160, and at least a portion of the storage medium 130 integrated in a single chip, or
  • the electronic device 100 can be implemented using one or more FPGAs (Field Programmable Gate Arrays), PLDs (Programmable Logic Devices), controllers, state machines, gate logic, discrete hardware components, any other suitable circuitry, Or any combination of circuits capable of performing the various functions described throughout the application.
  • FPGAs Field Programmable Gate Arrays
  • PLDs Programmable Logic Devices
  • controllers state machines, gate logic, discrete hardware components, any other suitable circuitry, Or any combination of circuits capable of performing the various functions described throughout the application.
  • the processor 120 is responsible for managing the bus 110 and general processing (including executing software stored on the storage medium 130).
  • Processor 120 can be implemented using one or more general purpose processors and/or special purpose processors. Examples of processor 120 include a microprocessor, a microcontroller, a DSP processor, and other circuitry capable of executing software.
  • Software should be interpreted broadly to mean instructions, data, or any combination thereof, whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise.
  • Storage medium 130 is shown separated from processor 120 in FIG. 4, however, those skilled in the art will readily appreciate that storage medium 130, or any portion thereof, may be located external to electronic device 100.
  • storage medium 130 may include transmission lines, carrier waveforms modulated with data, and/or computer products separate from wireless nodes, all of which may be accessed by processor 120 through bus interface 140.
  • storage medium 130, or any portion thereof, may be integrated into processor 120, for example, may be a cache and/or a general purpose register.
  • the processor 120 can execute the foregoing embodiment.
  • the page processing device 200 can be stored in the storage medium 130, and the processor 120 can be used to execute the page processing device 200.
  • the embodiment of the present invention provides a page processing method, a device, and a readable storage medium. First, obtaining a scroll bar position of a page during scrolling, and determining whether the scroll bar position reaches a preset condition, if the preset is reached. a condition, determining whether the size of the page is not less than a predetermined size: if the size of the page is not less than a predetermined size, loading the first navigation component to the page for display; if the size of the page is smaller than a predetermined size, The second navigation component is loaded into the page for display.
  • each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings.
  • each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present application may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as an electronic device, server, data center, or the like that includes one or more available media.
  • the usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Landscapes

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

Abstract

Embodiments of the present application provide a page processing method and device, and a readable storage medium. The method comprises: obtaining a scroll bar position of a page during scrolling; determining whether the scroll bar position meets a preset condition; if the preset condition is met, determining whether the dimensions of the page are not smaller than predetermined dimensions; and loading a first navigation component onto the page for display if the dimensions of the page are not smaller than the predetermined dimensions; or loading a second navigation component onto the page for display if the dimensions of the page are smaller than the predetermined dimensions. In the above method, different navigation components are displayed according to the dimensions of a current page, thereby ensuring a simpler layout of the entire page and providing a consistent reading experience for page viewers. In addition, users remain continuously engaged with content areas of the page, thereby effectively preventing an interruption to interaction between readers and the page.

Description

页面处理方法、装置及可读存储介质Page processing method, device and readable storage medium
本申请要求于2018年1月2日提交中国专利局的申请号为201810001167.8,名称为“页面处理方法、装置及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201810001167.8, entitled "Page Processing Method, Apparatus, and Readable Storage Medium", filed on January 2, 2018, the entire contents of which are incorporated herein by reference. In the application.
技术领域Technical field
本申请涉及计算机技术领域,具体而言,涉及一种页面处理方法、装置及可读存储介质。The present application relates to the field of computer technology, and in particular, to a page processing method, apparatus, and readable storage medium.
背景技术Background technique
现阶段,当一个网页的长度过长的时候,为了让用户自由方便地在不同页面的段落进行导航和跳转,通常,页面的开发人员会在页面提供固定于浏览器窗口的导航栏。但是,当用户的浏览器或者显示器的窗口过小时,这种类型的导航栏可能会被定位到页面的内容区域,从而遮挡了页面的内容,这样就对页面的浏览者阅读体验带来了干扰,另外,当页面具有某种程度的交互时,也会中断阅读者对于页面的交互操作。At this stage, when the length of a web page is too long, in order to allow users to navigate and jump in paragraphs of different pages freely and conveniently, usually, the developer of the page provides a navigation bar fixed to the browser window on the page. However, when the user's browser or display window is too small, this type of navigation bar may be located in the content area of the page, thereby obscuring the content of the page, thus causing interference to the viewer's reading experience of the page. In addition, when the page has a certain degree of interaction, it also interrupts the reader's interaction with the page.
发明内容Summary of the invention
为了克服现有技术中的上述不足,本申请的目的包括提供一种页面处理方法、装置及可读存储介质,能够根据当前页面的尺寸显示不同的导航组件,从而使整个页面的布局更为简洁,带给页面浏览者一致性的阅读体验,同时用户始终将会被页面的内容区域吸引,从而可以有效避免中断阅读者对于页面的交互操作。In order to overcome the above-mentioned deficiencies in the prior art, the purpose of the present application includes providing a page processing method, apparatus, and readable storage medium, which can display different navigation components according to the size of the current page, thereby making the layout of the entire page simpler. , to give the page viewer a consistent reading experience, while the user will always be attracted to the content area of the page, which can effectively avoid interrupting the reader's interaction with the page.
为了实现上述目的,本申请实施例采用的技术方案如下:In order to achieve the above object, the technical solution adopted by the embodiment of the present application is as follows:
本申请实施例提供一种页面处理方法,应用于电子设备,所述方法包括:The embodiment of the present application provides a page processing method, which is applied to an electronic device, and the method includes:
获取页面在滚动过程中的滚动条位置;Get the scrollbar position of the page during scrolling;
判断所述滚动条位置是否达到预设条件;Determining whether the scroll bar position reaches a preset condition;
若达到所述预设条件,判断所述页面的尺寸是否不小于预定尺寸;If the preset condition is reached, determining whether the size of the page is not less than a predetermined size;
若所述页面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示;If the size of the page is not less than a predetermined size, loading the first navigation component to the page for display;
若所述页面的尺寸小于预定尺寸,将第二导航组件加载到所述页面进行显示。If the size of the page is smaller than a predetermined size, the second navigation component is loaded onto the page for display.
在本申请实施例中,上述获取页面在滚动过程中的滚动条位置,包括:In the embodiment of the present application, the scroll bar position of the above-mentioned acquisition page during the scrolling process includes:
调用鼠标滚轮事件响应函数检测所述页面是否存在页面滚动事件;Calling a mouse wheel event response function to detect whether there is a page scrolling event on the page;
在检测到存在页面滚动事件时,调用视窗对象的scroll事件响应函数获取滚动条位置。When a page scrolling event is detected, the scroll event response function of the window object is called to obtain the scroll bar position.
在本申请实施例中,上述判断所述滚动条位置是否达到预设条件,包括:In the embodiment of the present application, the determining whether the position of the scroll bar reaches a preset condition includes:
计算所述滚动条位置与所述页面的滚动条起始位置之间的距离;Calculating a distance between the scroll bar position and a start position of a scroll bar of the page;
判断所述距离是否达到预设距离;Determining whether the distance reaches a preset distance;
在判断结果为是时,判定所述滚动条位置达到预设条件;When the determination result is yes, determining that the scroll bar position reaches a preset condition;
在判断结果为否时,判定所述滚动条位置未达到预设条件。When the judgment result is no, it is determined that the scroll bar position does not reach the preset condition.
在本申请实施例中,上述预设距离为一个视图窗口的高度。In the embodiment of the present application, the preset distance is a height of a view window.
在本申请实施例中,上述若所述页面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示之后,所述方法还包括:In the embodiment of the present application, if the size of the page is not less than a predetermined size, and the first navigation component is loaded into the page for display, the method further includes:
在检测到所述页面被缩放时,获取所述页面在缩放过程中的尺寸;Obtaining a size of the page during the zooming process when detecting that the page is zoomed;
判断所述页面在缩放过程中的尺寸是否小于所述预定尺寸;Determining whether the size of the page during the zooming process is smaller than the predetermined size;
在判断结果为是时,基于预设动画函数将正在显示的第一导航组件过渡到所述第二导航组件。When the determination result is YES, the first navigation component being displayed is transitioned to the second navigation component based on a preset animation function.
在本申请实施例中,上述基于预设动画函数将正在显示的第一导航组件过渡到所述第二导航组件之后,所述方法还包括:In the embodiment of the present application, after the first navigation component that is being displayed is transitioned to the second navigation component based on the preset animation function, the method further includes:
当所述页面在缩放过程中的尺寸不小于所述预定尺寸时,基于预设动画函数将正在显示的第二导航组件过渡到所述第一导航组件。When the size of the page in the zooming process is not less than the predetermined size, the second navigation component being displayed is transitioned to the first navigation component based on a preset animation function.
在本申请实施例中,上述获取所述页面在缩放过程中的尺寸,包括:In the embodiment of the present application, the obtaining the size of the page in the zooming process includes:
调用视窗对象的resize事件的回调函数获取所述页面在缩放过程中的尺寸。Callback function of the resize event of the window object is called to get the size of the page during the zooming process.
在本申请实施例中,上述方法还包括:In the embodiment of the present application, the foregoing method further includes:
判断所述页面是否开启屏幕适配模式;Determining whether the page has a screen adaptation mode enabled;
如果未开启,则不显示所述第二导航组件。If not turned on, the second navigation component is not displayed.
在本申请实施例中,上述判断所述页面是否开启屏幕适配模式之后,所述方法还包括:In the embodiment of the present application, after the determining whether the page is in the screen adaptation mode, the method further includes:
如果已开启,则将所述第一导航组件和所述第二导航组件分别插入到页面的不同位置。If enabled, the first navigation component and the second navigation component are respectively inserted into different locations of the page.
在本申请实施例中,上述方法还包括:In the embodiment of the present application, the foregoing method further includes:
响应对所述第一导航组件和所述第二导航组件进行配置的请求,配置所述第一导航组件和所述第二导航组件在所述页面的组件信息,其中,所述组件信息包括背景、字体、颜色中的至少一种。Configuring component information of the first navigation component and the second navigation component on the page in response to a request to configure the first navigation component and the second navigation component, wherein the component information includes a background At least one of font, color, and color.
本申请实施例还提供一种页面处理装置,应用于电子设备,所述装置包括:The embodiment of the present application further provides a page processing apparatus, which is applied to an electronic device, and the device includes:
获取模块,用于获取页面在滚动过程中的滚动条位置。The get module is used to get the position of the scroll bar of the page during scrolling.
第一判断模块,用于判断所述滚动条位置是否达到预设条件。The first determining module is configured to determine whether the scroll bar position reaches a preset condition.
第二判断模块,用于若达到所述预设条件,判断所述页面的尺寸是否不小于预定尺寸。The second determining module is configured to determine, if the preset condition is reached, whether the size of the page is not less than a predetermined size.
第一加载模块,用于若所述页面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示。The first loading module is configured to load the first navigation component to the page for display if the size of the page is not less than a predetermined size.
第二加载模块,用于若所述页面的尺寸小于预定尺寸,将第二导航组件加载到所述页面进行显示。The second loading module is configured to load the second navigation component to the page for display if the size of the page is smaller than a predetermined size.
在本申请实施例中,上述获取模块,具体用于:In the embodiment of the present application, the foregoing obtaining module is specifically configured to:
调用鼠标滚轮事件响应函数检测所述页面是否存在页面滚动事件;Calling a mouse wheel event response function to detect whether there is a page scrolling event on the page;
在检测到存在页面滚动事件时,调用视窗对象的scroll事件响应函数获取滚动条位置。When a page scrolling event is detected, the scroll event response function of the window object is called to obtain the scroll bar position.
在本申请实施例中,上述第一判断模块,具体用于:In the embodiment of the present application, the foregoing first determining module is specifically configured to:
计算所述滚动条位置与所述页面的滚动条起始位置之间的距离;Calculating a distance between the scroll bar position and a start position of a scroll bar of the page;
判断所述距离是否达到预设距离;Determining whether the distance reaches a preset distance;
在判断结果为是时,判定所述滚动条位置达到预设条件;When the determination result is yes, determining that the scroll bar position reaches a preset condition;
在判断结果为否时,判定所述滚动条位置未达到预设条件。When the judgment result is no, it is determined that the scroll bar position does not reach the preset condition.
在本申请实施例中,上述预设距离为一个视图窗口的高度。In the embodiment of the present application, the preset distance is a height of a view window.
在本申请实施例中,该页面处理装置还包括过渡模块,用于:In this embodiment of the present application, the page processing apparatus further includes a transition module, configured to:
在检测到所述页面被缩放时,获取所述页面在缩放过程中的尺寸;Obtaining a size of the page during the zooming process when detecting that the page is zoomed;
判断所述页面在缩放过程中的尺寸是否小于所述预定尺寸;Determining whether the size of the page during the zooming process is smaller than the predetermined size;
在判断结果为是时,基于预设动画函数将正在显示的第一导航组件过渡到所述第二导航组件。When the determination result is YES, the first navigation component being displayed is transitioned to the second navigation component based on a preset animation function.
在本申请实施例中,上述过渡模块,还用于:In the embodiment of the present application, the foregoing transition module is further configured to:
当所述页面在缩放过程中的尺寸不小于所述预定尺寸时,基于预设动画函 数将正在显示的第二导航组件过渡到所述第一导航组件。When the size of the page in the zooming process is not less than the predetermined size, the second navigation component being displayed is transitioned to the first navigation component based on the preset animation function.
在本申请实施例中,上述过渡模块获取所述页面在缩放过程中的尺寸的过程,包括:In the embodiment of the present application, the process of acquiring the size of the page in the zooming process by using the transition module includes:
调用视窗对象的resize事件的回调函数获取所述页面在缩放过程中的尺寸。Callback function of the resize event of the window object is called to get the size of the page during the zooming process.
在本申请实施例中,该页面处理装置还包括第三判断模块,用于:In the embodiment of the present application, the page processing apparatus further includes a third determining module, configured to:
判断所述页面是否开启屏幕适配模式;Determining whether the page has a screen adaptation mode enabled;
如果未开启,则不显示所述第二导航组件。If not turned on, the second navigation component is not displayed.
在本申请实施例中,该页面处理装置还包括配置模块,用于:In this embodiment of the present application, the page processing apparatus further includes a configuration module, configured to:
响应对所述第一导航组件和所述第二导航组件进行配置的请求,配置所述第一导航组件和所述第二导航组件在所述页面的组件信息,其中,所述组件信息包括背景、字体、颜色中的至少一种。Configuring component information of the first navigation component and the second navigation component on the page in response to a request to configure the first navigation component and the second navigation component, wherein the component information includes a background At least one of font, color, and color.
本申请实施例还提供一种可读存储介质,所述可读存储介质中存储有计算机程序,所述计算机程序被执行时实现上述的页面处理方法。The embodiment of the present application further provides a readable storage medium, where the readable storage medium stores a computer program, and when the computer program is executed, the page processing method described above is implemented.
相对于现有技术而言,本申请包括以下有益效果:Compared with the prior art, the present application includes the following beneficial effects:
本申请实施例提供一种页面处理方法、装置及可读存储介质,首先,获取页面在滚动过程中的滚动条位置,并判断所述滚动条位置是否达到预设条件,若达到所述预设条件,则判断所述页面的尺寸是否不小于预定尺寸:若所述页面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示;若所述页面的尺寸小于预定尺寸,将第二导航组件加载到所述页面进行显示。由此,能够根据当前页面的尺寸显示不同的导航组件,从而使整个页面的布局更为简洁,带给页面浏览者一致性的阅读体验,同时用户始终将会被页面的内容区域吸引,从而可以有效避免中断阅读者对于页面的交互操作。The embodiment of the present invention provides a page processing method, a device, and a readable storage medium. First, obtaining a scroll bar position of a page during scrolling, and determining whether the scroll bar position reaches a preset condition, if the preset is reached. a condition, determining whether the size of the page is not less than a predetermined size: if the size of the page is not less than a predetermined size, loading the first navigation component to the page for display; if the size of the page is smaller than a predetermined size, The second navigation component is loaded into the page for display. Thereby, different navigation components can be displayed according to the size of the current page, thereby making the layout of the entire page more concise, giving the page viewer a consistent reading experience, and the user will always be attracted by the content area of the page, thereby Effectively avoid interrupting the reader's interaction with the page.
附图说明DRAWINGS
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings to be used in the embodiments will be briefly described below. It should be understood that the following drawings show only certain embodiments of the present application, and therefore It should be seen as a limitation on the scope, and those skilled in the art can obtain other related drawings according to these drawings without any creative work.
图1为本申请实施例提供的页面处理方法的一种流程示意图;FIG. 1 is a schematic flowchart of a page processing method according to an embodiment of the present application;
图2为图1中所示的步骤S220包括的各个子步骤的一种流程示意图;2 is a schematic flow chart of each sub-step included in step S220 shown in FIG. 1;
图3为本申请实施例提供的页面处理装置的一种功能模块图;FIG. 3 is a functional block diagram of a page processing apparatus according to an embodiment of the present disclosure;
图4为本申请实施例提供的用于实现上述页面处理方法的电子设备的方框示意图。FIG. 4 is a schematic block diagram of an electronic device for implementing the above page processing method according to an embodiment of the present application.
图标:100-电子设备;110-总线;120-处理器;130-存储介质;140-总线接口;150-网络适配器;160-用户接口;200-页面处理装置;210-获取模块;220-第一判断模块;230-第二判断模块;240-第一加载模块;250-第二加载模块。Icon: 100-electronic device; 110-bus; 120-processor; 130-storage medium; 140-bus interface; 150-network adapter; 160-user interface; 200-page processing device; 210-acquisition module; a judging module; 230 - a second judging module; 240 - a first loading module; 250 - a second loading module.
具体实施方式Detailed ways
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in various different configurations. The detailed description of the embodiments of the present application, which is set forth in the claims All other embodiments obtained by a person skilled in the art based on the embodiments of the present application without creative efforts are within the scope of the present application.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that similar reference numerals and letters indicate similar items in the following figures, and therefore, once an item is defined in a drawing, it is not necessary to further define and explain it in the subsequent drawings.
请参阅图1,为本申请实施例提供的页面处理方法的一种流程示意图。所应说明的是,本申请实施例提供的页面处理方法不以图2及以下所述的具体顺序为限制。所述页面处理方法可以通过如下步骤实现:Please refer to FIG. 1 , which is a schematic flowchart of a page processing method according to an embodiment of the present application. It should be noted that the page processing method provided by the embodiment of the present application is not limited to the specific order described in FIG. 2 and the following. The page processing method can be implemented by the following steps:
步骤S210,获取页面在滚动过程中的滚动条位置。Step S210: Acquire a scroll bar position of the page during scrolling.
详细地,本实施例中,可以通过调用鼠标滚轮事件响应函数检测所述页面是否存在页面滚动事件,在检测到存在页面滚动事件时,调用视窗对象(Window对象)的scroll事件响应函数获取滚动条位置。In detail, in this embodiment, the page scroll event may be detected by calling the mouse wheel event response function, and when the page scroll event is detected, the scroll event response function of the window object (Window object) is called to obtain the scroll bar. position.
步骤S220,判断所述滚动条位置是否达到预设条件。Step S220, determining whether the scroll bar position reaches a preset condition.
作为一种实施方式,请参阅图2,所述步骤S220可以通过如下子步骤实现:As an implementation manner, referring to FIG. 2, the step S220 can be implemented by the following sub-steps:
子步骤S221,计算所述滚动条位置与所述页面的滚动条起始位置之间的距离。Sub-step S221, calculating a distance between the scroll bar position and the start position of the scroll bar of the page.
本实施例中,当页面浏览者进入页面时,由于页面的展示将会从页面的起始位置,也即页面在显示窗口的顶部开始展示,此时导航组件将默认不显示,因为此时没有必要让用户进行页面中的定位。In this embodiment, when the page viewer enters the page, since the page display will start from the beginning position of the page, that is, the page starts to be displayed at the top of the display window, the navigation component will not be displayed by default because there is no It is necessary to let the user locate the page.
当页面浏览者滚动鼠标滚轮或者拖动浏览器窗口的滚动条的时候,可通过实时计算所述滚动条位置与所述页面的滚动条起始位置之间的距离判断是否展示或者隐藏导航组件。When the page viewer scrolls the mouse wheel or drags the scroll bar of the browser window, whether to display or hide the navigation component can be determined by calculating the distance between the scroll bar position and the start position of the scroll bar of the page in real time.
子步骤S222,判断所述距离是否达到预设距离。Sub-step S222, determining whether the distance reaches a preset distance.
具体地,所述预设距离可以预先进行设定,例如,所述预设距离可以为一个(或多个)视图窗口沿所述页面滚动方向的高度,也即,如果滚动条位置距离所述页面的滚动条起始位置的位置达到一个视图窗口的高度大小,那么则执行子步骤S222a,判定所述滚动条位置达到预设条件;如果滚动条位置距离所 述页面的滚动条起始位置的位置还未达到一个视图窗口的高度大小,那么则执行子步骤S222b,判定所述滚动条位置未达到预设条件。Specifically, the preset distance may be set in advance, for example, the preset distance may be a height of one (or more) view windows along the page scrolling direction, that is, if the scroll bar position is away from the If the position of the start position of the scroll bar of the page reaches the height of the height of one view window, then sub-step S222a is performed to determine that the position of the scroll bar reaches a preset condition; if the position of the scroll bar is away from the start position of the scroll bar of the page If the position has not reached the height of one view window, then sub-step S222b is performed to determine that the scroll bar position has not reached the preset condition.
进一步的,在所述子步骤S222的同时,还可以获取页面的滚动速度,并且在达到预设条件之后,再参考页面的滚动速度。当页面处于静止状态或滚动速度小于一预设速度时,才继续进行后续步骤。Further, at the same time as the sub-step S222, the scrolling speed of the page may also be acquired, and after the preset condition is reached, the scrolling speed of the page is referenced. The next step is continued when the page is at rest or the scroll speed is less than a preset speed.
进一步地,请再次参阅图1,在上述基础上,若达到所述预设条件,则执行步骤S230,判断所述页面的尺寸是否不小于预定尺寸。Further, referring to FIG. 1 again, on the basis of the foregoing, if the preset condition is reached, step S230 is performed to determine whether the size of the page is not less than a predetermined size.
若所述页面的尺寸不小于预定尺寸,则执行步骤S240,将第一导航组件加载到所述页面进行显示。If the size of the page is not less than the predetermined size, step S240 is performed to load the first navigation component to the page for display.
本实施例中,所述预定尺寸可以预先进行设定,例如所述预定尺寸可以设定为宽度1366px(1366个像素),也即所述页面的宽度不小于1366px,那么则将所述第一导航组件加载到所述页面进行显示。In this embodiment, the predetermined size may be set in advance, for example, the predetermined size may be set to a width of 1366px (1366 pixels), that is, the width of the page is not less than 1366px, then the first The navigation component is loaded into the page for display.
若所述页面的尺寸小于预定尺寸,则执行步骤S250,将第二导航组件加载到所述页面进行显示。例如所述页面的宽度不小于1366px,那么则将所述第二导航组件加载到所述页面进行显示。If the size of the page is smaller than the predetermined size, step S250 is performed to load the second navigation component to the page for display. For example, if the width of the page is not less than 1366px, then the second navigation component is loaded into the page for display.
在其他实施方式中,也可以将所述预定尺寸设定为页面的高度(比如800px),或者设定为页面的面积、宽高比例等参数。当然,也可以综合宽度、高度、面积、宽高比例中的多项参数,作为所述预定尺寸的设定条件。In other embodiments, the predetermined size may also be set to the height of the page (for example, 800px), or set to a parameter such as the area of the page, the aspect ratio, and the like. Of course, it is also possible to integrate a plurality of parameters in the width, height, area, and aspect ratio as the setting conditions of the predetermined size.
通过上述实施例,能够根据当前页面的尺寸显示不同的导航组件,从而使整个页面的布局更为简洁,带给页面浏览者一致性的阅读体验,同时用户始终将会被页面的内容区域吸引,从而可以有效避免中断阅读者对于页面的交互操作。Through the above embodiment, different navigation components can be displayed according to the size of the current page, so that the layout of the entire page is more concise, and the page viewer has a consistent reading experience, and the user is always attracted by the content area of the page. Therefore, it is possible to effectively avoid interrupting the reader's interaction with the page.
在上述实施例的基础上,值得说明的是,所述第二导航组件的作用是在较小尺寸的屏幕中取代所述第一导航组件,从而达到适配小尺寸屏幕的目的。进一步地,在所述步骤S210之前,本实施例提供的页面处理方法还可以包括配置所述第一导航组件和所述第二导航组件的步骤,具体地,可以通过响应对所 述第一导航组件和所述第二导航组件进行配置的请求,配置所述第一导航组件和所述第二导航组件在所述页面的组件信息,其中,所述组件信息可以包括背景、字体、颜色中的至少一种。Based on the above embodiments, it is worth noting that the second navigation component functions to replace the first navigation component in a smaller-sized screen, thereby achieving the purpose of adapting to a small-sized screen. Further, before the step S210, the page processing method provided in this embodiment may further include the step of configuring the first navigation component and the second navigation component, specifically, the first navigation may be responded to by the response. a request for configuration of the component and the second navigation component, configuring component information of the first navigation component and the second navigation component on the page, wherein the component information may include a background, a font, a color At least one.
详细地,由于所述第一导航组件和所述第二导航组件的默认样式和配置可能无法与各种不同的页面搭配,为了让所述第一导航组件和所述第二导航组件更具有通用性,因此本实施例还可以提供所述第一导航组件和所述第二导航组件的编辑面板,当页面的开发人员和运营维护人员在选择(例如点击)第一导航组件或者第二导航组件的时候,对应的导航组件会在页面中引入一个编辑面板,通过该编辑面板,页面的开发人员和设计人员等这些导航组件的使用者可以根据设计图在面板上通过填写对应的编辑框来定制导航组件的背景,字体,颜色等参数,从而定制出与设计的页面风格一致的导航组件,最后保存之后的结果也即最终页面浏览者最终体验到的浏览效果。由此,可以使得导航组件的使用更为灵活,能够快速实现出适合当前页面风格的样式,同时由于功能封装,无法改变,这样就避免了重复测试。In detail, since the default styles and configurations of the first navigation component and the second navigation component may not be matched with various different pages, in order to make the first navigation component and the second navigation component more general Therefore, the embodiment may further provide an editing panel of the first navigation component and the second navigation component, when a developer and an operation and maintenance personnel of the page select (eg, click) the first navigation component or the second navigation component. At the same time, the corresponding navigation component will introduce an editing panel in the page, through which the user of the navigation component such as the developer and the designer of the page can customize the corresponding editing box on the panel according to the design drawing. The navigation component's background, font, color and other parameters, to customize the navigation component consistent with the design of the page style, and finally the result of the preservation is the final browsing experience of the final page viewer. Thereby, the use of the navigation component can be made more flexible, and the style suitable for the current page style can be quickly realized, and at the same time, the function package cannot be changed, thus avoiding repeated tests.
进一步地,在定义完成了第一导航组件和第二导航组件之后,用户可以勾选是否启用第二导航组件,也即可以选择是否开启屏幕适配模式,如果未开启,则不显示所述第二导航组件。Further, after the definition of the first navigation component and the second navigation component is completed, the user may check whether the second navigation component is enabled, that is, whether the screen adaptation mode is enabled, and if not, the first navigation component is not displayed. Two navigation components.
如果已开启屏幕适配模式,则将所述第一导航组件和所述第二导航组件分别插入到页面不同的地方(所述第二导航组件会被插入到body标签中),如此,两个导航组件就互相独立,因此对于其中一个导航组件的操作不会影响到另外的导航组件。由此,如果用户没有开启屏幕适配模式,那么导航组件采取的只插入必要的结构策略,从而可以减少页面的中元素的数量,达到提升页面性能的目的。并且,通过采用延迟加载所述第一导航组件的方式,能够提升页面的性能和加载速度。同时,只在必要的时候才显示可以避免带给用户突兀的感觉,因为在页面起始位置没有必要采用导航组件对页面进行定位,且页面其实位置通常显示比较重要的内容,如此可以让页面浏览者能够集中精力获取主要信 息。If the screen adaptation mode has been turned on, the first navigation component and the second navigation component are respectively inserted into different places of the page (the second navigation component is inserted into the body tag), thus, two The navigation components are independent of each other, so the operation of one of the navigation components does not affect the additional navigation components. Therefore, if the user does not enable the screen adaptation mode, the navigation component only inserts the necessary structural strategy, thereby reducing the number of elements in the page and improving the performance of the page. And, by adopting a manner of delay loading the first navigation component, the performance and loading speed of the page can be improved. At the same time, it is only necessary to display the feeling of avoiding the user's suddenness, because it is not necessary to use the navigation component to locate the page at the beginning of the page, and the actual position of the page usually displays more important content, so that the page can be browsed. People can concentrate on getting the main information.
进一步地,在这一情形下,所述页面处理方法还可以根据页面尺寸的变化情况进行响应式处理,具体可以通过如下步骤实现:Further, in this case, the page processing method may also perform responsive processing according to the change of the page size, which may be implemented by the following steps:
首先,在所述第一导航组件的显示过程中,检测所述页面是否处于被缩放状态,如果在检测到所述页面被缩放时,获取所述页面在缩放过程中的尺寸,例如可以调用视窗对象的resize事件的回调函数获取所述页面在缩放过程中的尺寸。First, in the display process of the first navigation component, detecting whether the page is in a zoomed state, and if detecting that the page is zoomed, acquiring a size of the page during the zooming process, for example, calling the window The callback function of the object's resize event gets the size of the page during the zoom process.
接着,判断所述页面在缩放过程中的尺寸是否小于所述预定尺寸,其中,所述预定尺寸可以预先进行设定,例如所述预定尺寸可以设定为宽度1366px,也即如果所述页面的宽度小于1366px时,则基于预设动画函数将正在显示的第一导航组件过渡到所述第二导航组件。更为具体地可以通过jQuery库提供的功能$(window).width()来获得当前页面的宽度,如果宽度小于1366px,那么则利用jQuery库提供的预设动画函数来通过改变第一导航组件的位置和可见性来流畅地过渡到所述第二导航组件。Next, it is determined whether the size of the page in the zooming process is smaller than the predetermined size, wherein the predetermined size may be set in advance, for example, the predetermined size may be set to a width of 1366px, that is, if the page is When the width is less than 1366px, the first navigation component being displayed is transitioned to the second navigation component based on a preset animation function. More specifically, the width of the current page can be obtained by the function $(window).width() provided by the jQuery library. If the width is less than 1366px, then the preset animation function provided by the jQuery library is used to change the first navigation component. Position and visibility to smoothly transition to the second navigation component.
进一步地,在过渡到所述第二导航组件的过程中,当所述页面在缩放过程中的尺寸不小于所述预定尺寸时,基于预设动画函数将正在显示的第二导航组件过渡到所述第一导航组件。也即,当用户再次缩放页面时,如果页面宽度大于1366px,那么则基于预设动画函数来改变第二导航组件的位置和可见性来流畅地过渡到所述第一导航组件。Further, in the process of transitioning to the second navigation component, when the size of the page in the zooming process is not less than the predetermined size, the second navigation component being displayed is transitioned to the The first navigation component is described. That is, when the user zooms the page again, if the page width is greater than 1366px, then the position and visibility of the second navigation component is changed based on the preset animation function to smoothly transition to the first navigation component.
由此,上述第一导航组件和所述第二导航组件的切换利用了动画实现,可以使得整个切换过程更为自然和生动,在切换过程中,也不会给页面浏览者带来生涩和卡顿的体验,增强用户浏览体验。Thereby, the switching of the first navigation component and the second navigation component utilizes an animation implementation, which can make the whole switching process more natural and vivid, and does not bring oysters and cards to the page viewer during the switching process. Experience, enhance the user browsing experience.
值得说明的是,在某些特定的需求中,可能不需要导航组件的自动处理,因此用户还可以将当前导航组件手动切换到所述第一导航组件或者所述第二导航组件。由此可以满足用户的特殊需求。It is worth noting that in some specific requirements, automatic processing of the navigation component may not be required, so the user may also manually switch the current navigation component to the first navigation component or the second navigation component. This can meet the special needs of users.
进一步地,请参阅图3,本申请实施例还提供一种页面处理装置200,所 述装置可以包括:Further, referring to FIG. 3, the embodiment of the present application further provides a page processing apparatus 200, where the apparatus may include:
获取模块210,用于获取页面在滚动过程中的滚动条位置。The obtaining module 210 is configured to obtain a scroll bar position of the page during the scrolling process.
第一判断模块220,用于判断所述滚动条位置是否达到预设条件。The first determining module 220 is configured to determine whether the scroll bar position reaches a preset condition.
第二判断模块230,用于若达到所述预设条件,判断所述页面的尺寸是否不小于预定尺寸。The second determining module 230 is configured to determine, if the preset condition is reached, whether the size of the page is not less than a predetermined size.
第一加载模块240,用于若所述页面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示。The first loading module 240 is configured to load the first navigation component to the page for display if the size of the page is not less than a predetermined size.
第二加载模块250,用于若所述页面的尺寸小于预定尺寸,将第二导航组件加载到所述页面进行显示。The second loading module 250 is configured to load the second navigation component to the page for display if the size of the page is smaller than a predetermined size.
可以理解的是,本实施例中的各功能模块的具体操作方法可参照上述方法实施例中相应步骤的详细描述,在此不再重复赘述综上所述。It can be understood that the specific operation method of each functional module in this embodiment can refer to the detailed description of the corresponding steps in the foregoing method embodiments, and the details are not repeated herein.
进一步地,本申请实施例还提供一种可读存储介质,所述可读存储介质中存储有计算机程序,所述计算机程序被执行时实现上述的页面处理方法。Further, the embodiment of the present application further provides a readable storage medium, where the readable storage medium stores a computer program, and when the computer program is executed, the page processing method described above is implemented.
进一步地,请参阅图4,为本申请实施例提供的电子设备100的一种结构示意框图。本实施例中,所述电子设备100可以是手机、平板电脑、个人电脑(PC)、笔记本电脑等,本实施例对此不作具体限制。Further, please refer to FIG. 4 , which is a schematic block diagram of a structure of an electronic device 100 according to an embodiment of the present application. In this embodiment, the electronic device 100 may be a mobile phone, a tablet computer, a personal computer (PC), a notebook computer, etc., which is not specifically limited in this embodiment.
如图4所示,电子设备100可以由总线110作一般性的总线体系结构来实现。根据电子设备100的具体应用和整体设计约束条件,总线110可以包括任意数量的互连总线和桥接。总线110将各种电路连接在一起,这些电路包括处理器120、存储介质130和总线接口140。可选地,电子设备100可以使用总线接口140将网络适配器150等经由总线110连接。网络适配器150可用于实现电子设备100中物理层的信号处理功能,并通过天线实现射频信号的发送和接收。用户接口160可以连接外部设备,例如:键盘、显示器、鼠标或者操纵杆等。总线110还可以连接各种其它电路,如定时源、外围设备、电压调节器或者功率管理电路等,这些电路是本领域所熟知的,因此不再详述。As shown in FIG. 4, electronic device 100 can be implemented by bus 110 as a general bus architecture. Depending on the particular application of electronic device 100 and overall design constraints, bus 110 may include any number of interconnecting buses and bridges. Bus 110 connects various circuits together, including processor 120, storage medium 130, and bus interface 140. Alternatively, the electronic device 100 may connect the network adapter 150 or the like via the bus 110 using the bus interface 140. The network adapter 150 can be used to implement a signal processing function of a physical layer in the electronic device 100, and realize transmission and reception of radio frequency signals through an antenna. The user interface 160 can be connected to an external device such as a keyboard, a display, a mouse, or a joystick. The bus 110 can also be connected to various other circuits, such as timing sources, peripherals, voltage regulators, or power management circuits, etc., which are well known in the art and therefore will not be described in detail.
可以替换的,电子设备100也可配置成通用处理系统,例如通称为芯片, 该通用处理系统包括:提供处理功能的一个或多个微处理器,以及提供存储介质130的至少一部分的外部存储器,所有这些都通过外部总线体系结构与其它支持电路连接在一起。Alternatively, the electronic device 100 can also be configured as a general purpose processing system, such as generally referred to as a chip, the general purpose processing system including: one or more microprocessors providing processing functionality, and an external memory providing at least a portion of the storage medium 130, All of this is connected to other support circuits through an external bus architecture.
可替换的,电子设备100可以使用下述来实现:具有处理器120、总线接口140、用户接口160的ASIC(专用集成电路);以及集成在单个芯片中的存储介质130的至少一部分,或者,电子设备100可以使用下述来实现:一个或多个FPGA(现场可编程门阵列)、PLD(可编程逻辑器件)、控制器、状态机、门逻辑、分立硬件部件、任何其它适合的电路、或者能够执行本申请通篇所描述的各种功能的电路的任意组合。Alternatively, the electronic device 100 can be implemented using an ASIC (Application Specific Integrated Circuit) having a processor 120, a bus interface 140, a user interface 160, and at least a portion of the storage medium 130 integrated in a single chip, or The electronic device 100 can be implemented using one or more FPGAs (Field Programmable Gate Arrays), PLDs (Programmable Logic Devices), controllers, state machines, gate logic, discrete hardware components, any other suitable circuitry, Or any combination of circuits capable of performing the various functions described throughout the application.
其中,处理器120负责管理总线110和一般处理(包括执行存储在存储介质130上的软件)。处理器120可以使用一个或多个通用处理器和/或专用处理器来实现。处理器120的例子包括微处理器、微控制器、DSP处理器和能够执行软件的其它电路。应当将软件广义地解释为表示指令、数据或其任意组合,而不论是将其称作为软件、固件、中间件、微代码、硬件描述语言还是其它。Among other things, the processor 120 is responsible for managing the bus 110 and general processing (including executing software stored on the storage medium 130). Processor 120 can be implemented using one or more general purpose processors and/or special purpose processors. Examples of processor 120 include a microprocessor, a microcontroller, a DSP processor, and other circuitry capable of executing software. Software should be interpreted broadly to mean instructions, data, or any combination thereof, whether referred to as software, firmware, middleware, microcode, hardware description language, or otherwise.
在图4中存储介质130被示为与处理器120分离,然而,本领域技术人员很容易明白,存储介质130或其任意部分可位于电子设备100之外。举例来说,存储介质130可以包括传输线、用数据调制的载波波形、和/或与无线节点分离开的计算机制品,这些介质均可以由处理器120通过总线接口140来访问。可替换地,存储介质130或其任意部分可以集成到处理器120中,例如,可以是高速缓存和/或通用寄存器。 Storage medium 130 is shown separated from processor 120 in FIG. 4, however, those skilled in the art will readily appreciate that storage medium 130, or any portion thereof, may be located external to electronic device 100. For example, storage medium 130 may include transmission lines, carrier waveforms modulated with data, and/or computer products separate from wireless nodes, all of which may be accessed by processor 120 through bus interface 140. Alternatively, storage medium 130, or any portion thereof, may be integrated into processor 120, for example, may be a cache and/or a general purpose register.
所述处理器120可执行上述实施例,具体地,所述存储介质130中可以存储有所述页面处理装置200,所述处理器120可以用于执行所述页面处理装置200。The processor 120 can execute the foregoing embodiment. Specifically, the page processing device 200 can be stored in the storage medium 130, and the processor 120 can be used to execute the page processing device 200.
本申请实施例提供一种页面处理方法、装置及可读存储介质,首先,获取页面在滚动过程中的滚动条位置,并判断所述滚动条位置是否达到预设条件,若达到所述预设条件,则判断所述页面的尺寸是否不小于预定尺寸:若所述页 面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示;若所述页面的尺寸小于预定尺寸,将第二导航组件加载到所述页面进行显示。由此,能够根据当前页面的尺寸显示不同的导航组件,从而使整个页面的布局更为简洁,带给页面浏览者一致性的阅读体验,同时用户始终将会被页面的内容区域吸引,从而可以有效避免中断阅读者对于页面的交互操作。The embodiment of the present invention provides a page processing method, a device, and a readable storage medium. First, obtaining a scroll bar position of a page during scrolling, and determining whether the scroll bar position reaches a preset condition, if the preset is reached. a condition, determining whether the size of the page is not less than a predetermined size: if the size of the page is not less than a predetermined size, loading the first navigation component to the page for display; if the size of the page is smaller than a predetermined size, The second navigation component is loaded into the page for display. Thereby, different navigation components can be displayed according to the size of the current page, thereby making the layout of the entire page more concise, giving the page viewer a consistent reading experience, and the user will always be attracted by the content area of the page, thereby Effectively avoid interrupting the reader's interaction with the page.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置和方法实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the embodiments provided by the present application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The above described apparatus and method embodiments are merely illustrative, for example, the flowcharts and block diagrams in the figures illustrate the architecture of possible implementations of systems, methods, and computer program products according to various embodiments of the present application, Features and operations. In this regard, each block of the flowchart or block diagram can represent a module, a program segment, or a portion of code that includes one or more of the Executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may also occur in a different order than those illustrated in the drawings. For example, two consecutive blocks may be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented in a dedicated hardware-based system that performs the specified function or function. Or it can be implemented by a combination of dedicated hardware and computer instructions.
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present application may be integrated to form a separate part, or each module may exist separately, or two or more modules may be integrated to form a separate part.
可以替换的,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其它可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可 读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的电子设备、服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。Alternatively, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are generated in whole or in part. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be from a website site, computer, server or data center Transfer to another website site, computer, server, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL), or wireless (eg, infrared, wireless, microwave, etc.). The computer readable storage medium can be any available media that can be accessed by a computer or a data storage device such as an electronic device, server, data center, or the like that includes one or more available media. The usable medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (such as a solid state disk (SSD)).
需要说明的是,在本文中,术语"包括"、"包含"或者其任何其它变体意在涵盖非排它性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句"包括一个……"限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It is to be understood that the term "comprising", "including" or any other variants thereof is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a Elements, but also other elements not explicitly listed, or elements that are inherent to such a process, method, item, or device. An element defined by the phrase "comprising a ..." does not exclude the presence of additional elements in the process, method, item, or device that comprises the element.
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其它的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化囊括在本申请内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。It is apparent to those skilled in the art that the present application is not limited to the details of the above-described exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the application. Therefore, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the invention is defined by the appended claims instead All changes in the meaning and scope of equivalent elements are included in this application. Any reference signs in the claims should not be construed as limiting the claim.
工业实用性:Industrial applicability:
通过应用本申请的技术方案,能够根据当前页面的尺寸显示不同的导航组件,从而使整个页面的布局更为简洁,带给页面浏览者一致性的阅读体验,同时用户始终将会被页面的内容区域吸引,从而可以有效避免中断阅读者对于页面的交互操作。By applying the technical solution of the present application, different navigation components can be displayed according to the size of the current page, so that the layout of the entire page is more concise, and the page viewer has a consistent reading experience, and the user will always be the content of the page. Area attraction, which can effectively avoid interrupting the reader's interaction with the page.

Claims (20)

  1. 一种页面处理方法,其特征在于,应用于电子设备,所述方法包括:A page processing method is characterized in that it is applied to an electronic device, and the method includes:
    获取页面在滚动过程中的滚动条位置;Get the scrollbar position of the page during scrolling;
    判断所述滚动条位置是否达到预设条件;Determining whether the scroll bar position reaches a preset condition;
    若达到所述预设条件,判断所述页面的尺寸是否不小于预定尺寸;If the preset condition is reached, determining whether the size of the page is not less than a predetermined size;
    若所述页面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示;If the size of the page is not less than a predetermined size, loading the first navigation component to the page for display;
    若所述页面的尺寸小于预定尺寸,将第二导航组件加载到所述页面进行显示。If the size of the page is smaller than a predetermined size, the second navigation component is loaded onto the page for display.
  2. 根据权利要求1所述的页面处理方法,其特征在于,所述获取页面在滚动过程中的滚动条位置,包括:The page processing method according to claim 1, wherein the obtaining a scroll bar position of the page during the scrolling process comprises:
    调用鼠标滚轮事件响应函数检测所述页面是否存在页面滚动事件;Calling a mouse wheel event response function to detect whether there is a page scrolling event on the page;
    在检测到存在页面滚动事件时,调用视窗对象的scroll事件响应函数获取滚动条位置。When a page scrolling event is detected, the scroll event response function of the window object is called to obtain the scroll bar position.
  3. 根据权利要求1或2所述的页面处理方法,其特征在于,所述判断所述滚动条位置是否达到预设条件,包括:The page processing method according to claim 1 or 2, wherein the determining whether the scroll bar position reaches a preset condition comprises:
    计算所述滚动条位置与所述页面的滚动条起始位置之间的距离;Calculating a distance between the scroll bar position and a start position of a scroll bar of the page;
    判断所述距离是否达到预设距离;Determining whether the distance reaches a preset distance;
    在判断结果为是时,判定所述滚动条位置达到预设条件;When the determination result is yes, determining that the scroll bar position reaches a preset condition;
    在判断结果为否时,判定所述滚动条位置未达到预设条件。When the judgment result is no, it is determined that the scroll bar position does not reach the preset condition.
  4. 根据权利要求3所述的页面处理方法,其特征在于,所述预设距离为一个视图窗口的高度。The page processing method according to claim 3, wherein the preset distance is a height of a view window.
  5. 根据权利要求1-4中任一项所述的页面处理方法,其特征在于,所述若所述页面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示之后,所述方法还包括:The page processing method according to any one of claims 1 to 4, wherein, if the size of the page is not smaller than a predetermined size, after loading the first navigation component to the page for display, The method also includes:
    在检测到所述页面被缩放时,获取所述页面在缩放过程中的尺寸;Obtaining a size of the page during the zooming process when detecting that the page is zoomed;
    判断所述页面在缩放过程中的尺寸是否小于所述预定尺寸;Determining whether the size of the page during the zooming process is smaller than the predetermined size;
    在判断结果为是时,基于预设动画函数将正在显示的第一导航组件过渡到所述第二导航组件。When the determination result is YES, the first navigation component being displayed is transitioned to the second navigation component based on a preset animation function.
  6. 根据权利要求5所述的页面处理方法,其特征在于,所述基于预设动画函数将正在显示的第一导航组件过渡到所述第二导航组件之后,所述方法还包括:The page processing method according to claim 5, wherein after the transitioning the first navigation component being displayed to the second navigation component based on the preset animation function, the method further comprises:
    当所述页面在缩放过程中的尺寸不小于所述预定尺寸时,基于预设动画函数将正在显示的第二导航组件过渡到所述第一导航组件。When the size of the page in the zooming process is not less than the predetermined size, the second navigation component being displayed is transitioned to the first navigation component based on a preset animation function.
  7. 根据权利要求5所述的页面处理方法,其特征在于,所述获取所述页面在缩放过程中的尺寸,包括:The page processing method according to claim 5, wherein the obtaining the size of the page in the zooming process comprises:
    调用视窗对象的resize事件的回调函数获取所述页面在缩放过程中的尺寸。Callback function of the resize event of the window object is called to get the size of the page during the zooming process.
  8. 根据权利要求1-7中任一项所述的页面处理方法,其特征在于,所述方法还包括:The page processing method according to any one of claims 1 to 7, wherein the method further comprises:
    判断所述页面是否开启屏幕适配模式;Determining whether the page has a screen adaptation mode enabled;
    如果未开启,则不显示所述第二导航组件。If not turned on, the second navigation component is not displayed.
  9. 根据权利要求8所述的页面处理方法,其特征在于,所述判断所述页面是否开启屏幕适配模式之后,所述方法还包括:The page processing method according to claim 8, wherein after the determining whether the page is in the screen adaptation mode, the method further comprises:
    如果已开启,则将所述第一导航组件和所述第二导航组件分别插入到页面的不同位置。If enabled, the first navigation component and the second navigation component are respectively inserted into different locations of the page.
  10. 根据权利要求1-9中任意一项所述的页面处理方法,其特征在于,所述方法还包括:The page processing method according to any one of claims 1 to 9, wherein the method further comprises:
    响应对所述第一导航组件和所述第二导航组件进行配置的请求,配置所述第一导航组件和所述第二导航组件在所述页面的组件信息,其中,所述组件信息包括背景、字体和颜色中的至少一种。Configuring component information of the first navigation component and the second navigation component on the page in response to a request to configure the first navigation component and the second navigation component, wherein the component information includes a background At least one of a font, a font, and a color.
  11. 一种页面处理装置,其特征在于,应用于电子设备,所述装置包括:A page processing device is characterized in that it is applied to an electronic device, and the device includes:
    获取模块,配置成获取页面在滚动过程中的滚动条位置;Obtaining a module configured to obtain a scroll bar position of the page during scrolling;
    第一判断模块,配置成判断所述滚动条位置是否达到预设条件;The first determining module is configured to determine whether the scroll bar position reaches a preset condition;
    第二判断模块,配置成若达到所述预设条件,判断所述页面的尺寸是否不小于预定尺寸;The second determining module is configured to determine, if the preset condition is reached, whether the size of the page is not less than a predetermined size;
    第一加载模块,配置成若所述页面的尺寸不小于预定尺寸,将第一导航组件加载到所述页面进行显示;The first loading module is configured to load the first navigation component to the page for display if the size of the page is not less than a predetermined size;
    第二加载模块,配置成若所述页面的尺寸小于预定尺寸,将第二导航组件加载到所述页面进行显示。The second loading module is configured to load the second navigation component to the page for display if the size of the page is smaller than a predetermined size.
  12. 根据权利要求1所述的页面处理装置,其特征在于,所述获取模块,具体配置成:The page processing apparatus according to claim 1, wherein the obtaining module is specifically configured to:
    调用鼠标滚轮事件响应函数检测所述页面是否存在页面滚动事件;Calling a mouse wheel event response function to detect whether there is a page scrolling event on the page;
    在检测到存在页面滚动事件时,调用视窗对象的scroll事件响应函数获取滚动条位置。When a page scrolling event is detected, the scroll event response function of the window object is called to obtain the scroll bar position.
  13. 根据权利要求11或12所述的页面处理装置,其特征在于,所述第一判断模块,具体配置成:The page processing apparatus according to claim 11 or 12, wherein the first determining module is specifically configured to:
    计算所述滚动条位置与所述页面的滚动条起始位置之间的距离;Calculating a distance between the scroll bar position and a start position of a scroll bar of the page;
    判断所述距离是否达到预设距离;Determining whether the distance reaches a preset distance;
    在判断结果为是时,判定所述滚动条位置达到预设条件;When the determination result is yes, determining that the scroll bar position reaches a preset condition;
    在判断结果为否时,判定所述滚动条位置未达到预设条件。When the judgment result is no, it is determined that the scroll bar position does not reach the preset condition.
  14. 根据权利要求13所述的页面处理装置,其特征在于,所述预设距离为一个视图窗口的高度。The page processing apparatus according to claim 13, wherein the preset distance is a height of a view window.
  15. 根据权利要求11-14中任一项所述的页面处理装置,其特征在于,还包括过渡模块,配置成:The page processing apparatus according to any one of claims 11 to 14, further comprising a transition module configured to:
    在检测到所述页面被缩放时,获取所述页面在缩放过程中的尺寸;Obtaining a size of the page during the zooming process when detecting that the page is zoomed;
    判断所述页面在缩放过程中的尺寸是否小于所述预定尺寸;Determining whether the size of the page during the zooming process is smaller than the predetermined size;
    在判断结果为是时,基于预设动画函数将正在显示的第一导航组件过渡到所述第二导航组件。When the determination result is YES, the first navigation component being displayed is transitioned to the second navigation component based on a preset animation function.
  16. 根据权利要求15所述的页面处理装置,其特征在于,所述过渡模块,还配置成:The page processing apparatus according to claim 15, wherein the transition module is further configured to:
    当所述页面在缩放过程中的尺寸不小于所述预定尺寸时,基于预设动画函数将正在显示的第二导航组件过渡到所述第一导航组件。When the size of the page in the zooming process is not less than the predetermined size, the second navigation component being displayed is transitioned to the first navigation component based on a preset animation function.
  17. 根据权利要求15所述的页面处理装置,其特征在于,所述过渡模块获取所述页面在缩放过程中的尺寸的过程,包括:The page processing apparatus according to claim 15, wherein the transition module acquires a size of the page during the zooming process, including:
    调用视窗对象的resize事件的回调函数获取所述页面在缩放过程中的尺寸。Callback function of the resize event of the window object is called to get the size of the page during the zooming process.
  18. 根据权利要求11-17中任一项所述的页面处理装置,其特征在于,还包括第三判断模块,配置成:The page processing apparatus according to any one of claims 11-17, further comprising a third determining module configured to:
    判断所述页面是否开启屏幕适配模式;Determining whether the page has a screen adaptation mode enabled;
    如果未开启,则不显示所述第二导航组件。If not turned on, the second navigation component is not displayed.
  19. 根据权利要求11-18中任意一项所述的页面处理装置,其特征在于,还包括配置模块,配置成:The page processing apparatus according to any one of claims 11 to 18, further comprising a configuration module configured to:
    响应对所述第一导航组件和所述第二导航组件进行配置的请求,配置所述第一导航组件和所述第二导航组件在所述页面的组件信息,其中,所述组件信息包括背景、字体和颜色中的至少一种。Configuring component information of the first navigation component and the second navigation component on the page in response to a request to configure the first navigation component and the second navigation component, wherein the component information includes a background At least one of a font, a font, and a color.
  20. 一种可读存储介质,其特征在于,所述可读存储介质中存储有计算机程序,所述计算机程序被执行时实现权利要求1-10中任意一项所述的页面处理方法。A readable storage medium, characterized in that the readable storage medium stores a computer program, and when the computer program is executed, the page processing method according to any one of claims 1 to 10 is implemented.
PCT/CN2018/082704 2018-01-02 2018-04-11 Page processing method and device, and readable storage medium WO2019134296A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810001167.8A CN108052677A (en) 2018-01-02 2018-01-02 Page processing method, device and readable storage medium storing program for executing
CN201810001167.8 2018-01-02

Publications (1)

Publication Number Publication Date
WO2019134296A1 true WO2019134296A1 (en) 2019-07-11

Family

ID=62126183

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/082704 WO2019134296A1 (en) 2018-01-02 2018-04-11 Page processing method and device, and readable storage medium

Country Status (2)

Country Link
CN (1) CN108052677A (en)
WO (1) WO2019134296A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712676B (en) * 2018-05-30 2021-08-10 浙江口碑网络技术有限公司 Method and device for automatically playing video based on React framework
CN112347403B (en) * 2020-10-26 2022-11-15 长沙市到家悠享网络科技有限公司 Page checking method, device, equipment and storage medium
CN113448478A (en) * 2021-06-25 2021-09-28 亿企赢网络科技有限公司 Control method and device for scroll bar, electronic equipment and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005096132A1 (en) * 2004-03-30 2005-10-13 Nokia Corporation Method of navigating, electronic device, user interface and computer program product
CN102169410A (en) * 2011-03-15 2011-08-31 宇龙计算机通信科技(深圳)有限公司 Method and device for displaying terminal information
US20120066634A1 (en) * 2010-09-14 2012-03-15 Microsoft Corporation Branded browser frame
CN103049560A (en) * 2012-12-28 2013-04-17 北京小米科技有限责任公司 Webpage navigation method, webpage navigation device and mobile terminal
CN103678496A (en) * 2013-11-18 2014-03-26 乐视网信息技术(北京)股份有限公司 Method and system for adjusting screening display of search page
CN104050171A (en) * 2013-03-12 2014-09-17 腾讯科技(深圳)有限公司 Method, device and system for navigating pages presented on mobile terminal
CN106293380A (en) * 2015-06-10 2017-01-04 联想(北京)有限公司 Information processing method and electronic equipment
CN106648710A (en) * 2017-01-12 2017-05-10 郑州云海信息技术有限公司 Display method and system for interface status bar

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855124B (en) * 2011-06-27 2016-01-20 腾讯科技(深圳)有限公司 A kind of method of the navigation bar of self-adaptative adjustment on a web browser, device and browser
CN103345388B (en) * 2013-06-05 2016-11-23 中国电子科技集团公司第十五研究所 Software based on Android operation system adapts to the method and device of mobile terminal
CN103324741B (en) * 2013-06-28 2016-12-28 北京奇虎科技有限公司 A kind of webpage zoom on electronic equipment and the method and apparatus of alignment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005096132A1 (en) * 2004-03-30 2005-10-13 Nokia Corporation Method of navigating, electronic device, user interface and computer program product
US20120066634A1 (en) * 2010-09-14 2012-03-15 Microsoft Corporation Branded browser frame
CN102169410A (en) * 2011-03-15 2011-08-31 宇龙计算机通信科技(深圳)有限公司 Method and device for displaying terminal information
CN103049560A (en) * 2012-12-28 2013-04-17 北京小米科技有限责任公司 Webpage navigation method, webpage navigation device and mobile terminal
CN104050171A (en) * 2013-03-12 2014-09-17 腾讯科技(深圳)有限公司 Method, device and system for navigating pages presented on mobile terminal
CN103678496A (en) * 2013-11-18 2014-03-26 乐视网信息技术(北京)股份有限公司 Method and system for adjusting screening display of search page
CN106293380A (en) * 2015-06-10 2017-01-04 联想(北京)有限公司 Information processing method and electronic equipment
CN106648710A (en) * 2017-01-12 2017-05-10 郑州云海信息技术有限公司 Display method and system for interface status bar

Also Published As

Publication number Publication date
CN108052677A (en) 2018-05-18

Similar Documents

Publication Publication Date Title
WO2023010903A1 (en) Desktop management method for terminal device, and terminal device
KR102027612B1 (en) Thumbnail-image selection of applications
US9262051B2 (en) Method and apparatus for displaying pop-up
US10460016B2 (en) Method and apparatus for playing multimedia in browser
CN104834637B (en) Webpage picture display method and device
US20120240036A1 (en) E-Book Reading Location Indicator
CN109508128B (en) Search control display method, device and equipment and computer readable storage medium
US20120306930A1 (en) Techniques for zooming in and out with dynamic content
US8952912B1 (en) Selection of elements on paginated touch sensitive display
US20170228545A1 (en) Apparatus and Method for Displaying Computer Health Index
WO2019134296A1 (en) Page processing method and device, and readable storage medium
WO2021254201A1 (en) Page display method and apparatus, storage medium, and electronic device
US8593427B1 (en) System and method for managing display power consumption
US20190279594A1 (en) Method and device for controlling display of a flexible display screen
KR20150111221A (en) Method for constructing page and electronic device supporting the same
US20190250790A1 (en) Managing content displayed on a touch screen enabled device
CN103713844A (en) Method for zooming screen and electronic apparatus
US9495332B2 (en) Detection and repositioning of pop-up dialogs
US20150092102A1 (en) System and method for capturing images
CN110909274A (en) Page browsing method and device and electronic equipment
CN103324438A (en) Electronic equipment, and page turning method and page turning device for browser
AU2016205616A1 (en) Method of displaying content and electronic device implementing same
WO2024169740A1 (en) Card opening method for application program and related device thereof
CN111209503B (en) Processing method and device for popup window in webpage, electronic equipment and storage medium
WO2018137470A1 (en) User terminal and webpage image resource loading device and method, storage medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18898017

Country of ref document: EP

Kind code of ref document: A1