[go: up one dir, main page]

CN111813479A - A method and system for constructing a scroll wheel object - Google Patents

A method and system for constructing a scroll wheel object Download PDF

Info

Publication number
CN111813479A
CN111813479A CN202010642414.XA CN202010642414A CN111813479A CN 111813479 A CN111813479 A CN 111813479A CN 202010642414 A CN202010642414 A CN 202010642414A CN 111813479 A CN111813479 A CN 111813479A
Authority
CN
China
Prior art keywords
roller
attribute
item
value
wheel
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
CN202010642414.XA
Other languages
Chinese (zh)
Inventor
魏永明
耿岳
薛淑明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Feynman Software Technology Co ltd
Original Assignee
Beijing Feynman Software Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Feynman Software Technology Co ltd filed Critical Beijing Feynman Software Technology Co ltd
Priority to CN202010642414.XA priority Critical patent/CN111813479A/en
Publication of CN111813479A publication Critical patent/CN111813479A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a system for constructing a roller object, wherein the method comprises the following steps: acquiring operation information of an adjusting roller control, wherein the roller control at least comprises: the roller element comprises a current value attribute; updating the value of the current value attribute of the roller element according to the operation information, wherein the current value attribute is used for defining the current selection item of the roller object; determining user visible items according to the currently selected items, wherein the user visible items comprise forward adjacent items and backward adjacent items of the currently selected items; and constructing a target roller object according to the roller control and the user visible item. According to the technical scheme provided by the invention, the roller control is formed by the newly added roller elements and the current value attributes of the roller elements, and the current options and selectable items of the roller object can be determined by the current value attributes, so that a large number of div elements are avoided, and the memory occupation of the page is reduced.

Description

一种构建滚轮对象的方法及系统A method and system for constructing a scroll wheel object

技术领域technical field

本发明涉及计算机信息处理技术领域,具体涉及一种构建滚轮对象的方法及系统。The invention relates to the technical field of computer information processing, in particular to a method and system for constructing a scroll wheel object.

背景技术Background technique

目前,超文本标记语言(Hypertext Marked Language,HTML)页面主要用于文字和图片混排的文档内容,以及用于网页的布局排版和渲染的层叠样式表(Cascading StyleSheets,CSS)相关规范,其中,主要是基于矩形区域进行的,比如用来控制其宽度和高度的属性(width和height)及用于控制HTML元素布局的属性等。随着HTML5及CSS3技术的发展,很多运行在PC、智能手机上的应用(App),开始使用Web技术来为用户呈现内容,并作为人机交互的界面,但是,基于矩形块的CSS样式表,在通过HTML页面实现滚轮控件时,滚轮控件中的每个可选项都需要一个div元素进行包裹,并且每个div元素又对应多个CSS属性,增加了系统内存的开销,并且执行效率低,占用内存大。At present, Hypertext Marked Language (HTML) pages are mainly used for document content with mixed text and images, and Cascading Style Sheets (CSS) related specifications for layout, layout and rendering of web pages, among which, It is mainly based on rectangular areas, such as attributes (width and height) used to control its width and height, and attributes used to control the layout of HTML elements. With the development of HTML5 and CSS3 technologies, many applications (Apps) running on PCs and smartphones have begun to use Web technology to present content for users and serve as a human-computer interaction interface. However, CSS style sheets based on rectangular blocks , When implementing the scroll wheel control through an HTML page, each option in the scroll wheel control needs to be wrapped by a div element, and each div element corresponds to multiple CSS properties, which increases the overhead of system memory and has low execution efficiency. Takes up a lot of memory.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明实施例提供了一种构建构建滚轮对象的方法及系统,以解决现有技术无法为滚轮控件提供有效支持,并且执行效率低,占用内存大的技术问题。In view of this, the embodiments of the present invention provide a method and system for constructing a scroll wheel object, so as to solve the technical problems that the prior art cannot provide effective support for the scroll wheel control, the execution efficiency is low, and the memory is occupied.

为达到上述目的,本发明提供如下技术方案:To achieve the above object, the present invention provides the following technical solutions:

本发明第一方面提供一种构建滚轮对象的方法,包括:获取调整滚轮控件的操作信息,滚轮控件至少包括:滚轮元素、滚轮元素包括当前值属性;根据操作信息更新滚轮元素的当前值属性的值,当前值属性用于定义滚轮对象的当前选中项;根据当前选中项确定用户可见项,用户可见项包括当前选中项的向前相邻项和向后相邻项;根据滚轮控件及用户可见项,构建目标滚轮对象。A first aspect of the present invention provides a method for constructing a scroll wheel object, including: acquiring operation information for adjusting a scroll wheel control, the scroll wheel control at least including: a scroll wheel element, the scroll wheel element including a current value attribute; updating the current value attribute of the scroll wheel element according to the operation information. Value, the current value attribute is used to define the currently selected item of the scroll wheel object; the user-visible item is determined according to the currently selected item, and the user-visible item includes the forward and backward adjacent items of the currently selected item; according to the scroll wheel control and user-visible items item, constructs the target wheel object.

可选地,在本发明提供的构建滚轮对象的方法中,滚轮元素还包括可选项类型属性、步长属性,若可选项类型属性为整数类型,根据当前选中项确定用户可见项,包括:根据当前选中项与步长属性的值的差确定向前相邻项;根据当前选中项与步长属性的值的和确定向后相邻项。Optionally, in the method for building a scroll wheel object provided by the present invention, the scroll wheel element further includes an option type attribute and a step size attribute. If the option type attribute is an integer type, determining the user-visible item according to the currently selected item includes: according to The difference between the currently selected item and the value of the step attribute determines the forward neighbor; the backward neighbor is determined according to the sum of the currently selected item and the value of the step attribute.

可选地,在本发明提供的构建滚轮对象的方法中,滚轮控件还包括多个可选项元素,多个可选项元素按序排列,可选项元素包括可选值属性,可选值属性用于定义滚轮控件中可选项的值,滚轮元素还包括可选项类型属性,若可选项类型属性为文本类型,根据当前选中项确定用户可见项,包括:将与当前选中项相对应的可选项元素之前的可选项元素的可选值属性的值确定为向前相邻项;将与当前选中项相对应的可选项元素之后的可选项元素的可选值属性的值确定为向后相邻项。Optionally, in the method for constructing a wheel object provided by the present invention, the wheel control further includes a plurality of optional elements, the plurality of optional elements are arranged in sequence, and the optional elements include optional value attributes, and the optional value attributes are used for Defines the value of the optional items in the wheel control. The wheel element also includes the optional item type attribute. If the optional item type attribute is text type, the user-visible item is determined according to the currently selected item, including: before the optional element corresponding to the currently selected item The value of the optional value attribute of the optional element of is determined as the forward neighbor; the value of the optional value attribute of the optional element after the optional element corresponding to the currently selected item is determined as the backward neighbor.

可选地,在本发明提供的构建滚轮对象的方法中,根据滚轮控件及用户可见项,构建目标滚轮对象,包括:对滚轮控件中的各元素、属性进行识别与解析,得到对应的解析控件值;获取预设渲染节点的成员变量;通过预设配置函数,将各解析控件值配置到各成员变量中,得到当前成员变量;根据各成员变量以及预设绘制函数,对当前选中项及用户可见项进行布局及渲染,得到目标滚轮对象。Optionally, in the method for constructing a scroll wheel object provided by the present invention, constructing a target scroll wheel object according to scroll wheel controls and user-visible items includes: identifying and parsing each element and attribute in the scroll wheel controls to obtain corresponding parsing controls. value; obtain the member variables of the preset rendering node; configure the value of each parsing control into each member variable through the preset configuration function to obtain the current member variable; according to each member variable and the preset drawing function, the currently selected item and the user Visible items are laid out and rendered to get the target wheel object.

可选地,在本发明提供的构建滚轮对象的方法中,滚轮控件还包括:CSS属性,用于定义当前选中项和用户可见项的显示特征,根据滚轮控件及用户可见项,构建目标滚轮对象,包括:对滚轮控件中的各元素、属性进行识别与解析,得到对应的解析控件值;对CSS属性进行识别与解析,得到绘制解析值;获取预设渲染节点的成员变量;通过预设配置函数,将各解析控件值和绘制解析值配置到各成员变量中,得到当前成员变量;根据各当前成员变量以及预设绘制函数,对当前选中项及用户可见项进行布局及渲染,得到目标滚轮对象。Optionally, in the method for constructing a scroll wheel object provided by the present invention, the scroll wheel control further includes: CSS properties for defining the display characteristics of the currently selected item and the user-visible item, and constructing the target scroll wheel object according to the scroll wheel control and the user-visible item. , including: identifying and parsing each element and attribute in the scroll wheel control to obtain the corresponding parsing control value; identifying and parsing CSS properties to obtain the drawing parsing value; obtaining the member variables of the preset rendering node; function, configure each analytical control value and drawing analytical value into each member variable, and get the current member variable; according to each current member variable and the preset drawing function, layout and render the currently selected item and user-visible item, and get the target wheel object.

可选地,在本发明提供的构建滚轮对象的方法中,对滚轮控件中的各元素、属性进行识别与解析,得到对应的解析值,包括:将各元素的元素名称以各属性的属性名称保存至对应文件;根据元素名称及属性名称分别为元素和属性生成对应的哈希值;根据滚轮元素的哈希值获取与滚轮元素对应的成员函数;根据成员函数对滚轮元素的属性进行解析,得到对应的解析控件值。Optionally, in the method for building a scroll wheel object provided by the present invention, identifying and parsing each element and attribute in the scroll wheel control to obtain a corresponding analytical value, including: changing the element name of each element to the attribute name of each attribute Save to the corresponding file; generate the corresponding hash value for the element and attribute according to the element name and attribute name; obtain the member function corresponding to the wheel element according to the hash value of the wheel element; parse the attribute of the wheel element according to the member function, Get the corresponding parsed control value.

可选地,在本发明提供的构建滚轮对象的方法中,滚轮控件还包括:事件属性,事件属性用于定义当前滚轮和相邻滚轮的逻辑变化;构建滚轮对象的方法还包括:根据当前值属性的值和事件属性,确定与事件属性相对应的滚轮控件的可选项的取值范围。Optionally, in the method for constructing a scroll wheel object provided by the present invention, the scroll wheel control further includes: an event attribute, and the event attribute is used to define the logical change of the current scroll wheel and the adjacent scroll wheel; the method for constructing the scroll wheel object also includes: according to the current value The value of the property and the event property determine the value range of the options of the wheel control corresponding to the event property.

本发明第二方面提供了一种构建滚轮对象的系统,包括:操作信息获取模块,用于获取调整滚轮控件的操作信息,滚轮控件至少包括:滚轮元素、滚轮元素包括当前值属性;当前值属性更新模块,用于根据操作信息更新滚轮元素的当前值属性的值,当前值属性用于定义滚轮对象的当前选中项;用户可见项确定模块,用于根据当前选中项确定用户可见项,用户可见项包括当前选中项的向前相邻项和向后相邻项;目标滚轮对象构建模块,用于根据滚轮控件及用户可见项,构建目标滚轮对象。A second aspect of the present invention provides a system for constructing a scroll wheel object, including: an operation information acquisition module for acquiring operation information for adjusting a scroll wheel control, the scroll wheel control at least includes: a scroll wheel element, and the scroll wheel element includes a current value attribute; the current value attribute The update module is used to update the value of the current value attribute of the scroll wheel element according to the operation information. The current value attribute is used to define the currently selected item of the scroll wheel object; the user-visible item determination module is used to determine the user-visible item according to the currently selected item. The item includes the forward and backward neighbors of the currently selected item; the target wheel object building module is used to construct the target wheel object according to the wheel control and user-visible items.

本发明第三方面提供了一种计算机可读存储介质,计算机可读存储介质存储计算机指令,计算机指令被处理器执行时实现如本发明第一方面提供的构建滚轮对象的方法。A third aspect of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, implements the method for constructing a scroll wheel object provided in the first aspect of the present invention.

本发明第四方面提供了一种电子设备,包括:存储器和处理器,存储器和处理器之间互相通信连接,存储器中存储有计算机指令,处理器通过执行计算机指令,从而执行如本发明第一方面提供的构建滚轮对象的方法。A fourth aspect of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor are connected in communication with each other, and computer instructions are stored in the memory, and the processor executes the computer instructions by executing the computer instructions to execute the first step of the present invention. The method provided by the aspect to construct the wheel object.

发明技术方案,具有如下优点:The technical solution of the invention has the following advantages:

本发明提供的构建滚轮对象的方法,通过滚轮元素和滚轮元素的当前值属性构成了滚轮控件,在获取到调整滚轮控件的操作信息后,根据操作信息更新滚轮控件的当前选中项,并根据当前选中项确定用户可见项,最终根据滚轮控件及用户可见项构建目标滚轮对象。在本发明实施例提供的构建滚轮对象的方法中,通过新增的滚轮元素和滚轮元素的当前值属性构成了滚轮控件,滚轮对象的当前选中项和可选项都可通过当前值属性确定,避免了使用大量的div元素,从而降低了页面的内存占用。In the method for constructing a wheel object provided by the present invention, the wheel control is formed by the wheel element and the current value attribute of the wheel element. The selected item determines the user-visible item, and finally builds the target scroll wheel object based on the scroll wheel control and the user-visible item. In the method for constructing a scroll wheel object provided by the embodiment of the present invention, a scroll wheel control is formed by the newly added scroll wheel element and the current value attribute of the scroll wheel element. In order to use a large number of div elements, thereby reducing the memory footprint of the page.

附图说明Description of drawings

为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the specific embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the specific embodiments or the prior art. Obviously, the accompanying drawings in the following description The drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.

图1为本发明实施例提供的构建滚轮对象的方法的具体示例的流程图;1 is a flowchart of a specific example of a method for constructing a scroll wheel object provided by an embodiment of the present invention;

图2为本发明实施中的滚轮对象的示意图;2 is a schematic diagram of a scroll wheel object in the implementation of the present invention;

图3-图6为本发明实施例提供的构建滚轮对象的方法的具体示例的流程图;3-6 are flowcharts of specific examples of the method for constructing a scroll wheel object provided by an embodiment of the present invention;

图7为本发明实施中的滚轮对象的示意图;7 is a schematic diagram of a scroll wheel object in the implementation of the present invention;

图8为本发明实施例提供的构建滚轮对象的方法的具体示例的流程图;8 is a flowchart of a specific example of a method for constructing a scroll wheel object provided by an embodiment of the present invention;

图9为本发明实施例提供的构建滚轮对象的系统的示意图;9 is a schematic diagram of a system for constructing a scroll wheel object provided by an embodiment of the present invention;

图10为本发明实施例提供的电子设备一个具体示例的示意框图。FIG. 10 is a schematic block diagram of a specific example of an electronic device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

在本发明的描述中,需要说明的是,下面所描述的本发明不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。In the description of the present invention, it should be noted that the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as there is no conflict with each other.

实施例1Example 1

本发明实施例提供一种构建滚轮对象的方法,如图1所示,该方法包括如下步骤:An embodiment of the present invention provides a method for constructing a wheel object, as shown in FIG. 1 , the method includes the following steps:

步骤S10:获取调整滚轮控件的操作信息,滚轮控件至少包括:滚轮元素、滚轮元素包括当前值属性。滚轮元素用于定义旋转滚轮,滚轮控件的操作信息为用户向滚轮控件所在设备输入的用于操作滚轮的信息,操作信息是用户通过鼠标移动、鼠标滚轮转动、触控等操作输入的。Step S10: Obtaining operation information for adjusting the wheel control, the wheel control at least includes: a wheel element, and the wheel element includes a current value attribute. The wheel element is used to define the rotating wheel. The operation information of the wheel control is the information input by the user to the device where the wheel control is located for operating the wheel, and the operation information is input by the user through operations such as mouse movement, mouse wheel rotation, and touch.

在一具体实施例中,为了实现如图2所示的用于显示日期的滚轮,本发明实施例提供的滚轮控件如下所示:In a specific embodiment, in order to realize the scroll wheel used for displaying the date as shown in FIG. 2 , the scroll wheel control provided by the embodiment of the present invention is as follows:

Figure BDA0002571677260000061
Figure BDA0002571677260000061

Figure BDA0002571677260000071
Figure BDA0002571677260000071

上述过程中,定义了三个滚轮控件,分别为:名称为“year”的滚轮控件、名称为“month”的滚轮控件、名称为“day”的滚轮控件,其中,“hipicker”表示滚轮元素,“value”表示滚轮元素的当前值属性。上述三个滚轮控件中仅被一个div元素包裹,并未使用多余的div元素。In the above process, three wheel controls are defined, namely: a wheel control named "year", a wheel control named "month", and a wheel control named "day", where "hipicker" represents the wheel element, "value" represents the current value attribute of the scroll wheel element. The above three wheel controls are only wrapped by a div element, and no redundant div elements are used.

步骤S20:根据操作信息更新滚轮元素的当前值属性的值,当前值属性用于定义滚轮对象的当前选中项,以上述名称属性(name)为“year”的滚轮控件为例,该滚轮控件的当前值属性为“2019”,则在通过该滚轮控件构建的目标滚轮对象中,当前选中项为2019。Step S20: Update the value of the current value attribute of the wheel element according to the operation information. The current value attribute is used to define the currently selected item of the wheel object. Taking the wheel control whose name attribute (name) is "year" as an example, the value of the wheel control is The current value property is "2019", then in the target wheel object constructed by the wheel control, the currently selected item is 2019.

步骤S30:根据当前选中项确定用户可见项,用户可见项包括当前选中项的向前相邻项和向后相邻项,当前可选项包括当前选中项的n个向前相邻项和当前选中项的m个向后相邻项,n、m为大于或等于1的整数,在如图2所示的滚轮对象中,除显示当前选中项外,还显示了当前选中项的2个向前相邻项和当前选中项的2个向后选中项,因此在本实施例中,n和m都为2。Step S30: Determine the user-visible item according to the currently selected item, the user-visible item includes the forward adjacent item and the backward adjacent item of the currently selected item, and the current optional item includes n forward adjacent items of the currently selected item and the currently selected item. The m backward adjacent items of the item, n and m are integers greater than or equal to 1. In the scroll wheel object shown in Figure 2, in addition to the currently selected item, it also displays 2 forwards of the currently selected item. The adjacent items and the 2 backward selected items of the currently selected item, therefore, in this embodiment, both n and m are 2.

步骤S40:根据滚轮控件及用户可见项,构建目标滚轮对象。在本发明实施例中,对目标滚轮对象的构建具体包括对滚轮控件中的各元素和元素属性进行识别及解析,然后根据识别及解析结果对当前选中项和用户可见项进行布局及渲染,得到目标滚轮对象。Step S40: Construct a target wheel object according to the wheel control and the user-visible items. In the embodiment of the present invention, the construction of the target scroll wheel object specifically includes identifying and parsing each element and element attribute in the scroll wheel control, and then laying out and rendering the currently selected item and the user-visible item according to the identification and parsing results, to obtain The target wheel object.

本发明提供的构建滚轮对象的方法,通过滚轮元素和滚轮元素的当前值属性构成了滚轮控件,在获取到调整滚轮控件的操作信息后,根据操作信息更新滚轮控件的当前选中项,并根据当前选中项确定用户可见项,最终根据滚轮控件及用户可见项构建目标滚轮对象。在本发明实施例提供的构建滚轮对象的方法中,通过新增的滚轮元素和滚轮元素的当前值属性构成了滚轮控件,滚轮对象的当前选中项和可选项都可通过当前值属性确定,避免了使用大量的div元素,从而降低了页面的内存占用。In the method for constructing a wheel object provided by the present invention, the wheel control is formed by the wheel element and the current value attribute of the wheel element. The selected item determines the user-visible item, and finally builds the target scroll wheel object based on the scroll wheel control and the user-visible item. In the method for constructing a scroll wheel object provided by the embodiment of the present invention, a scroll wheel control is formed by the newly added scroll wheel element and the current value attribute of the scroll wheel element. In order to use a large number of div elements, thereby reducing the memory footprint of the page.

在一可选实施例中,在本发明实施例提供的构建滚轮对象的方法中,滚轮元素还包括可选项类型属性、步长属性,类型属性用于表示滚轮控件中当前选中项和用户可见项的取值类型,步长属性用于表示当前选中项与向前相邻项和向后相邻项之间的步进值,以上述名称属性为“day”的滚轮元素为例,在本发明实施例中通过“type”表示类型属性,通过“step”表示步长属性,若可选项类型属性为整数类型“integer”,如图3所示,上述步骤S30具体包括:In an optional embodiment, in the method for constructing a scroll wheel object provided by the embodiment of the present invention, the scroll wheel element further includes an optional item type attribute and a step size attribute, and the type attribute is used to represent the currently selected item and the user-visible item in the scroll wheel control. The value type of , the step size attribute is used to indicate the step value between the currently selected item and the forward adjacent item and the backward adjacent item. Taking the scroll wheel element whose name attribute is "day" as an example, in the present invention In the embodiment, the type attribute is represented by "type", and the step attribute is represented by "step". If the optional type attribute is the integer type "integer", as shown in FIG. 3, the above step S30 specifically includes:

步骤S31:根据当前选中项与步长属性的值的差确定向前相邻项,以上述名称属性为“day”的滚轮元素为例,步长属性的值为1,则第一个向前相邻项为当前选中项1减去步进值1,第二个向前相邻项为当前选中项1减去2,但是由于在本发明实施例中,通过最小值属性“min”定义了可选项的最小值为1,通过最大值属性“max”定义了可选项的最大值为31,因此在目标滚轮对象中无法显示0和-1,又因为该滚轮属性中包括布尔型属性“endtoend”,通过布尔型属性定义首尾相连循环旋转,因此当前选中项的两个向前相邻项分别为31和30。Step S31: Determine the forward adjacent item according to the difference between the currently selected item and the value of the step attribute. Taking the wheel element whose name attribute is “day” as an example, the value of the step attribute is 1, then the first one moves forward. The adjacent item is the currently selected item 1 minus the step value 1, and the second forward adjacent item is the currently selected item 1 minus 2. However, in this embodiment of the present invention, the minimum value attribute "min" defines The minimum value of the optional item is 1, and the maximum value of the optional item is defined by the maximum value attribute "max" as 31, so 0 and -1 cannot be displayed in the target wheel object, and because the wheel attribute includes the boolean attribute "endtoend" ", the end-to-end circular rotation is defined by the Boolean property, so the two forward neighbors of the currently selected item are 31 and 30, respectively.

步骤S32:根据当前选中项与步长属性的值的和确定向后相邻项,在本发明实施例中,第一个向后相邻项为当前选中项1加上步进值1,值为2,第二个向后相邻项为当前选中项1加上2,值为3。Step S32: Determine the backward adjacent item according to the sum of the value of the currently selected item and the step size attribute. In this embodiment of the present invention, the first backward adjacent item is the currently selected item 1 plus the step value 1, and the value is is 2, the second backward adjacent item is the currently selected item 1 plus 2, and the value is 3.

在一具体实施例中,若滚轮元素中包含布尔型属性,表示该滚轮首尾相连循环旋转,若滚轮元素中不包含布尔型属性,表示该滚轮收尾不相连,不循环旋转,当滚轮中的可选项数量大于预设阈值时,在滚轮元素中加入布尔型属性,在一具体实施例中,可以将预设阈值设定为10,即,可选项数量大于10时,通过布尔型属性控制滚轮收尾相连循环旋转,可选项数量小于或等于10时,无需循环旋转。In a specific embodiment, if the scroll wheel element contains a Boolean attribute, it means that the scroll wheel rotates cyclically end to end; if the scroll wheel element does not contain a Boolean attribute, it means that the scroll wheel is not connected at the end and does not rotate cyclically. When the number of options is greater than the preset threshold, a Boolean attribute is added to the scroll wheel element. In a specific embodiment, the preset threshold can be set to 10, that is, when the number of options is greater than 10, the end of the scroll wheel is controlled by the Boolean attribute Continuous cyclic rotation, when the number of options is less than or equal to 10, there is no need for cyclic rotation.

在本发明实施例中,在滚轮元素中引入了类型属性,且当类型属性为整数类型时,无需对滚轮的可选项进行逐个定义,在确定当前选中项后可自动根据步长属性定义的步进值确定用户可见项,避免了为有规律的整数型可选项构建大量的子元素,降低了定义整数型可选项的复杂性,简化了接口,节约了内存的使用。In the embodiment of the present invention, a type attribute is introduced into the wheel element, and when the type attribute is an integer type, there is no need to define the optional items of the wheel one by one. The input value determines the user-visible items, avoids building a large number of sub-elements for regular integer options, reduces the complexity of defining integer options, simplifies the interface, and saves memory usage.

在一可选实施例中,滚轮控件还包括多个可选项元素,以上述示例中名称属性为“year”的滚轮元素定义的滚轮为例,通过“hiitem”表示可选项元素,多个可选项元素按序排列,可选项元素包括可选值属性“value”,可选值属性用于定义滚轮控件中可选项的值,滚轮元素中的当前值属性的值为其中一个可选项元素的可选值属性的值,滚轮元素还包括可选项类型属性,若可选项类型属性为文本类型,如图4所示,上述步骤S30具体包括:In an optional embodiment, the wheel control further includes a plurality of optional elements. Taking the wheel defined by the wheel element whose name attribute is "year" in the above example as an example, the optional element is represented by "hiitem". The elements are arranged in order. The optional element includes the optional value attribute "value". The optional value attribute is used to define the value of the optional items in the scroll wheel control. The value of the current value attribute in the scroll wheel element is the optional value of one of the optional elements. The value of the value attribute, the wheel element also includes an optional item type attribute. If the optional item type attribute is a text type, as shown in FIG. 4 , the above step S30 specifically includes:

步骤S33:将与当前选中项相对应的可选项元素之前的可选项元素的可选值属性的值确定为向前相邻项,在本发明实施例中,与当前选中项相对应的可选项元素为可选值属性为2019的可选项元素,因此向前相邻项为2018和2017。Step S33: Determine the value of the optional value attribute of the optional element before the optional element corresponding to the currently selected item as the forward adjacent item. In this embodiment of the present invention, the optional item corresponding to the currently selected item is The element is an optional element with an optional value attribute of 2019, so the forward neighbors are 2018 and 2017.

步骤S34:将与当前选中项相对应的可选项元素之后的可选项元素的可选值属性的值确定为向后相邻项,在本发明实施例中,可选值属性为2019的可选项元素之后并没有对可选项元素的定义,且滚轮元素中并没有定义布尔型属性,因此在目标滚轮对象中不显示向后相邻项。Step S34: Determine the value of the optional value attribute of the optional element after the optional element corresponding to the currently selected item as the backward adjacent item. In this embodiment of the present invention, the optional value attribute is the optional item of 2019 There is no definition of an optional element after the element, and no boolean property is defined in the wheel element, so the backward neighbors are not displayed in the target wheel object.

在一可选实施例中,本发明实施例提供的构建滚轮对象的方法中,滚轮控件中的滚轮元素还包括名称属性“name”,用于表示滚轮控件的名称,通过滚轮元素的名称属性方便将滚轮控件整合到表单中。In an optional embodiment, in the method for constructing a scroll wheel object provided by the embodiment of the present invention, the scroll wheel element in the scroll wheel control further includes a name attribute "name", which is used to represent the name of the scroll wheel control. It is convenient to use the name attribute of the scroll wheel element. Integrate scroll wheel controls into forms.

在一可选实施例中,本发明实施例提供的构建滚轮对象的方法中,滚轮控件中的滚轮元素还包括宽度属性“width”和高度属性“height”属性,宽度属性和高度属性用于表示滚轮元素的固有尺寸,用于定义滚轮元素所使用的渲染画布大小,当HTML文档未定义这两个属性时,用户代理分别使用200和150作为默认值。In an optional embodiment, in the method for constructing a scroll wheel object provided by the embodiment of the present invention, the scroll wheel element in the scroll wheel control further includes a width attribute "width" and a height attribute "height" attribute, and the width attribute and height attribute are used to represent The intrinsic size of the scroll wheel element, used to define the size of the rendering canvas used by the scroll wheel element. When the HTML document does not define these two attributes, the user agent uses 200 and 150 as the default values, respectively.

在一可选实施例中,本发明实施例提供的构建滚轮对象的方法中,滚轮控件中的滚轮元素还包括声音属性“sound”,用于定义滚轮旋转时的声音文件,不定义时,滚轮旋转时无声音。In an optional embodiment, in the method for constructing a scroll wheel object provided by the embodiment of the present invention, the scroll wheel element in the scroll wheel control further includes a sound attribute "sound", which is used to define the sound file when the scroll wheel rotates. No sound when spinning.

在一可选实施例中,本发明实施例提供的构建滚轮对象的方法中,滚轮控件中的可选项元素还包括禁止项属性,在本发明实施例中通过“disabled”表示禁止项属性,若可选项元素中定义有禁止项属性,则表示该可选项被禁止,该可选项的可选值属性定义的值无法作为当前选中项。In an optional embodiment, in the method for constructing a scroll wheel object provided by the embodiment of the present invention, the optional element in the scroll wheel control further includes a forbidden item attribute. If there is a prohibited item attribute defined in the optional element, it means that the optional item is prohibited, and the value defined by the optional value attribute of the optional item cannot be used as the currently selected item.

在一可选实施例中,本发明实施例提供的构建滚轮对象的方法中,滚轮控件中的滚轮元素还包括事件属性,事件属性用于定义当前滚轮和相邻滚轮的逻辑变化,构建滚轮对象的方法还包括:In an optional embodiment, in the method for constructing a scroll wheel object provided by the embodiment of the present invention, the scroll wheel element in the scroll wheel control further includes an event attribute, and the event attribute is used to define the logical change of the current scroll wheel and the adjacent scroll wheel, and construct the scroll wheel object. The method also includes:

根据当前值属性的值和事件属性,确定与事件属性相对应的滚轮控件的可选项的取值范围。According to the value of the current value attribute and the event attribute, the value range of the optional items of the wheel control corresponding to the event attribute is determined.

在一具体实施例中,可以通过事件属性onchange对滚轮控件的当前选中项的变化进行监控,当滚轮控件中的当前选中项发生变化时,用户代理触发此事件,脚本监听此事件,完成动态调整工作,从而改变相邻滚轮控件中的可选项,例如:In a specific embodiment, the change of the currently selected item of the wheel control can be monitored through the event attribute onchange. When the currently selected item in the wheel control changes, the user agent triggers this event, and the script listens to this event to complete the dynamic adjustment. works, thereby changing the selectable items in the adjacent wheel controls, for example:

Figure BDA0002571677260000121
Figure BDA0002571677260000121

上述过程可根据当前月份(大小月、闰月、平月等)调整相邻滚轮控件中可选的日期范围。The above process can adjust the optional date range in the adjacent scroll wheel controls according to the current month (small and large month, leap month, flat month, etc.).

上述过程中的事件属性onchange表示在当前选中项发生变化时触发事件,还可通过事件属性onpickstart表示在滚轮选择开始(开始旋转)时触发事件,还可通过事件属性onpickend表示在滚轮选择结束(停止旋转)时触发事件。The event attribute onchange in the above process indicates that the event is triggered when the currently selected item changes. The event attribute onpickstart can also be used to indicate that the event is triggered when the wheel selection starts (starts to rotate), and the event attribute onpickend can also be used to indicate that the wheel selection ends (stops). Rotation) triggers an event.

在一可选实施例中,如图5所示,上述步骤S40具体包括:In an optional embodiment, as shown in FIG. 5 , the foregoing step S40 specifically includes:

步骤S41:对滚轮控件中的各元素、属性进行识别与解析,得到对应的解析控件值,因为本发明实施例中的滚轮元素为自定义的元素,因此在用户代理中要实现识别与解析。在本发明实施例中,若滚轮控件中仅有滚轮元素,则仅对滚轮元素及滚轮元素的属性进行识别解析,若滚轮元素还包括可选项元素,还需对可选项元素及可选项元素的属性进行识别解析。Step S41: Identify and parse each element and attribute in the scroll wheel control to obtain the corresponding parsed control value. Because the scroll wheel element in the embodiment of the present invention is a custom element, identification and parsing should be implemented in the user agent. In the embodiment of the present invention, if there is only a scroll wheel element in the scroll wheel control, only the scroll wheel element and the attributes of the scroll wheel element are identified and analyzed. If the scroll wheel element also includes optional element elements, the optional element and the optional element element are also required to be identified and analyzed. Attributes are identified and resolved.

步骤S42:获取预设渲染节点的成员变量。Step S42: Obtain the member variables of the preset rendering node.

步骤S43:通过预设配置函数,将各解析控件值配置到各成员变量中,得到当前成员变量。本发明实施例中,获取预设渲染节点的成员变量后,根据预设函数,将各解析控件值配置到各成员变量中,得到当前成员变量,需要说明的是,本发明中的预设函数是由各解析控件值决定的,本发明并不以此为限。Step S43: Configure each analytical control value into each member variable by using a preset configuration function to obtain the current member variable. In the embodiment of the present invention, after obtaining the member variables of the preset rendering node, according to the preset function, the value of each parsing control is configured into each member variable, and the current member variable is obtained. It should be noted that the preset function in the present invention is It is determined by the value of each analytical control, and the present invention is not limited to this.

步骤S44:根据各成员变量以及预设绘制函数,对当前选中项及用户可见项进行布局及渲染,得到目标滚轮对象。本发明实施例中,根据各当前成员变量及预设的相应函数,对当前选中项和用户可见项进行布局及渲染,其中根据属性取值类型的不同,以及明确的含义,分别根据当前成员变量,在预设的相应函数完成目标滚轮对象的构建。Step S44: Layout and render the currently selected item and the user-visible item according to each member variable and the preset drawing function to obtain the target scroll wheel object. In this embodiment of the present invention, the currently selected items and user-visible items are laid out and rendered according to each current member variable and a preset corresponding function, wherein according to the different attribute value types and clear meanings, according to the current member variables , in the preset corresponding function to complete the construction of the target wheel object.

在一可选实施例中,如图6所示,步骤S41具体包括:In an optional embodiment, as shown in FIG. 6 , step S41 specifically includes:

步骤S411:将各元素的元素名称以及各属性的属性名称保存至对应文件,在本发明实施例中,将滚轮元素及滚轮元素的各属性名称添加到HTMLAttributeNames.in文件中,将可选项元素及可选项元素的各属性名称添加到HTMLTagNames.in文件中。Step S411: Save the element name of each element and the attribute name of each attribute to the corresponding file. In the embodiment of the present invention, add the scroll wheel element and each attribute name of the scroll wheel element to the HTMLAttributeNames.in file, and add the optional element and the attribute name to the HTMLAttributeNames.in file. Each attribute name of the optional element is added to the HTMLTagNames.in file.

步骤S412:根据元素名称及属性名称分别为元素和属性生成对应的哈希值,在一具体实施例中,会根据各个元素和属性的哈希值为各元素和属性赋予唯一固定的ID。Step S412 : respectively generating corresponding hash values for the elements and attributes according to the element names and attribute names. In a specific embodiment, each element and attribute is given a unique and fixed ID according to the hash value of each element and attribute.

在一具体实施例中,分别为滚轮元素和可选项元素创建两个新类,分别为HVMLHiPickerElement和HVMLHiItemElement,其中HVMLHiItemElement类继承于HTMLElement类,HVMLHiPickerElement继承于HTMLFormControlElementWithState类,通过创建的新类以完成在表单中的数据传递,其中,HTMLElement类为页面的基础类,所有页面的元素需要直接获取间接继承该类,HTMLFormControlElementWithState类为表单的基础类,所有的表单元素都是直接或间接继承该类。In a specific embodiment, two new classes are created for the wheel element and the optional element, respectively HVMLHiPickerElement and HVMLHiItemElement, wherein the HVMLHiItemElement class inherits from the HTMLElement class, and the HVMLHiPickerElement inherits from the HTMLFormControlElementWithState class. Among them, the HTMLElement class is the base class of the page, and all the elements of the page need to directly acquire and indirectly inherit this class, and the HTMLFormControlElementWithState class is the base class of the form, and all form elements directly or indirectly inherit this class.

步骤S413:根据滚轮元素的哈希值获取与滚轮元素对应的成员函数。Step S413: Obtain a member function corresponding to the wheel element according to the hash value of the wheel element.

步骤S414:根据成员函数对滚轮元素的属性进行解析,得到对应的解析控件值,在本发明实施例中,对滚轮元素进行解析的成员函数为parseAttribute。Step S414: Parse the attributes of the scroll wheel element according to the member function to obtain the corresponding parsing control value. In the embodiment of the present invention, the member function for parsing the scroll wheel element is parseAttribute.

在一具体实施例中,在本发明实施例提供的构建滚轮对象的方法中,对滚轮元素进行识别与解析时,还在HVMLHiPickerElement类中实现了appendFormData成员函数,当浏览器需要将该滚轮对象的信息发送到服务器时,该函数用于将滚轮控件的数据添加到向服务器发送信息时的请求中。In a specific embodiment, in the method for building a wheel object provided by the embodiment of the present invention, when the wheel element is identified and parsed, the appendFormData member function is also implemented in the HVMLHiPickerElement class. When the information is sent to the server, this function is used to add the data of the wheel control to the request when sending the information to the server.

在一可选实施例中,为了使构建的目标滚轮对象的视觉效果更好,本发明提供的构建滚轮对象的方法中,滚轮控件还包括:CSS属性,用于定义当前选中项和用户可见项的显示特征。In an optional embodiment, in order to make the constructed target scroll wheel object have a better visual effect, in the method for constructing a scroll wheel object provided by the present invention, the scroll wheel control further includes: CSS properties for defining the currently selected item and the user-visible item. display characteristics.

在一可选实施例中,为了定义目标滚轮对象的显示特征,可以先定义CSS伪元素,然后在CSS伪元素中定义CSS属性,通过CSS属性定义显示特征。例如,可以在滚轮元素中定义CSS伪元素“::-hi-picker-selected”,然后通过该CSS伪元素中定义的CSS属性定义当前选中项的尺寸、边框、字体以及文本颜色等;可以在滚轮元素中定义CSS伪元素“::-hi-picker-selected-before”,通过该CSS伪元素中定义的CSS属性定义当前选中项之前追加的文本内容及属性,当前选中项包括当前值和追加文本,可选项元素中的可选值属性定义的值包含当前值,追加文本是当前值之后的内容和/或当前值之前的内容,当前值之前的追加文本的内容和属性可通过“::-hi-picker-selected-before”定义;可以在滚轮元素中定义CSS伪元素“::-hi-picker-selected-after”,通过该CSS伪元素中定义的CSS属性定义当前选中项之后追加的文本内容及属性;可以在滚轮元素中定义CSS伪元素“::-hi-picker-items”,通过该CSS伪元素中定义的CSS属性定义用户可见项的颜色、字体、蒙板的渐变过渡效果等(使用标准的mask属性)。In an optional embodiment, in order to define the display feature of the target scroll wheel object, a CSS pseudo-element may be defined first, and then a CSS property may be defined in the CSS pseudo-element, and the display feature may be defined by the CSS property. For example, the CSS pseudo-element "::-hi-picker-selected" can be defined in the scroll wheel element, and then the size, border, font and text color of the currently selected item can be defined through the CSS properties defined in the CSS pseudo-element; The CSS pseudo-element "::-hi-picker-selected-before" is defined in the scroll wheel element. The CSS properties defined in the CSS pseudo-element define the text content and properties added before the currently selected item. The currently selected item includes the current value and the appended Text, the value defined by the optional value attribute in the optional element contains the current value, the appended text is the content after the current value and/or the content before the current value, the content and attribute of the appended text before the current value can be passed ":: -hi-picker-selected-before" definition; the CSS pseudo-element "::-hi-picker-selected-after" can be defined in the scroll wheel element, and the CSS attribute defined in the CSS pseudo-element defines the current selected item to be appended Text content and attributes; CSS pseudo-element "::-hi-picker-items" can be defined in the scroll wheel element, and the color, font, and mask gradient transition effect of user-visible items can be defined through the CSS attributes defined in the CSS pseudo-element. etc. (using the standard mask property).

在一具体实施例中,为了实现图7中的“小时”滚轮对象,可以如下定义CSS伪元素的CSS属性:In a specific embodiment, in order to realize the "hour" wheel object in Figure 7, the CSS properties of the CSS pseudo-element can be defined as follows:

Figure BDA0002571677260000151
Figure BDA0002571677260000151

Figure BDA0002571677260000161
Figure BDA0002571677260000161

在上述过程中,定义了三个CSS伪元素:“picker::-hi-picker-items”、“hipicker.hour::-hi-picker-selected”、“hipicker.hour::-hi-picker-selected-after”,通过CSS伪元素“picker::-hi-picker-items”中的font-size属性定义用户可见项的字体大小为12px,color属性定义用户可见项的字体颜色为深灰色,mask属性定义用户可见项的蒙版的渐变过渡效果为线性渐变;通过CSS伪元素“hipicker.hour::-hi-picker-selected”中的color属性定义当前选中项的字体颜色为黑色,font-size属性定义当前选中项的字体大小为14px,border-style属性定义当前选中项的边框形状为左右无边框,上下单线,border-width属性定义当前选中项的边框宽为1px,border-color属性定义当前选中项的边框颜色为灰色;通过CSS伪元素“hipicker.hour::-hi-picker-selected-after”中的content属性定义当前选中项中,当前值之后的追加显示内容为“小时”。In the above process, three CSS pseudo-elements are defined: "picker::-hi-picker-items", "hipicker.hour::-hi-picker-selected", "hipicker.hour::-hi-picker- selected-after", the font-size attribute in the CSS pseudo-element "picker::-hi-picker-items" defines the font size of user-visible items as 12px, the color attribute defines the font color of user-visible items as dark gray, mask The attribute defines that the gradient transition effect of the mask of the user-visible item is a linear gradient; the color attribute in the CSS pseudo-element "hipicker.hour::-hi-picker-selected" defines the font color of the currently selected item as black, font-size The attribute defines the font size of the currently selected item as 14px, the border-style attribute defines the border shape of the currently selected item as left and right without borders, and the top and bottom single lines, the border-width attribute defines the border width of the currently selected item as 1px, and the border-color attribute defines the current The border color of the selected item is gray; the content attribute in the CSS pseudo-element "hipicker.hour::-hi-picker-selected-after" defines the currently selected item, and the additional display content after the current value is "hour".

在一可选实施例中,图7所示的滚轮中,三列滚轮有不同的倾角:中间的滚轮是竖直的,而左边的滚轮向右倾斜,右边的滚轮向左倾斜,因此,本发明实施例中需要引入“-hi-picker-rotate-y:”属性来控制滚轮的整体倾角,整个滚轮的水平倾角(绕y轴旋转)的初始值为0度(0deg),并且,为了提高用户的操作体验,本发明实施例中使用“-hi-picker-damping-factor:”属性来控制旋转的滚轮到静止状态时的阻尼系数,该属性用来模拟旋转滚轮时的物理特性:滚轮的旋转阻尼系数,浮点数,初始值为100,表示默认阻尼系数,用户可调整该属性的值获得更快(减少)或者更慢(增加)的旋转效果:In an optional embodiment, among the rollers shown in FIG. 7 , the three rows of rollers have different inclination angles: the middle roller is vertical, the left roller is inclined to the right, and the right roller is inclined to the left. Therefore, the present In the embodiment of the invention, the "-hi-picker-rotate-y:" attribute needs to be introduced to control the overall inclination of the wheel. The initial value of the horizontal inclination (rotation around the y-axis) of the entire wheel is 0 degrees (0deg). The user's operation experience, in the embodiment of the present invention, the "-hi-picker-damping-factor:" attribute is used to control the damping coefficient of the rotating scroll wheel when it is in a static state. This attribute is used to simulate the physical characteristics of the rotating scroll wheel: Rotation damping coefficient, a floating point number, the initial value is 100, which means the default damping coefficient, the user can adjust the value of this property to obtain faster (decrease) or slower (increase) rotation effect:

Figure BDA0002571677260000171
Figure BDA0002571677260000171

在上述过程中,定义了三个CSS伪元素:“hipicker.hour”、“hipicker.minute”、“hipicker.second”,通过三个CSS伪元素分别定义了“小时”滚轮、“分钟”滚轮、“秒”轮的特征,display属性定义元素的布局级别,width属性定义滚轮的宽,height属性定义滚轮的高,-hi-picker-rotate-y属性定义滚轮沿y轴的倾斜角度,-hi-picker-damping-factor定义滚轮的旋转速度,y轴为垂直于水平轴的纵轴。In the above process, three CSS pseudo-elements are defined: "hipicker.hour", "hipicker.minute", "hipicker.second", and the "hour" wheel, "minute" wheel, The characteristics of the "second" wheel, the display attribute defines the layout level of the element, the width attribute defines the width of the scroll wheel, the height attribute defines the height of the scroll wheel, the -hi-picker-rotate-y attribute defines the inclination angle of the scroll wheel along the y-axis, and the -hi- The picker-damping-factor defines the rotation speed of the wheel, and the y-axis is the vertical axis perpendicular to the horizontal axis.

在本发明实施例中,引入新的CSS伪元素和属性后,用户可通过CSS伪元素和属性定义滚轮控件不同部分的渲染属性,一方面充分利用了CSS带来的便利,另一方面带给前端开发者更多的灵活性。In the embodiment of the present invention, after introducing new CSS pseudo-elements and attributes, the user can define the rendering attributes of different parts of the scroll wheel control through CSS pseudo-elements and attributes. On the one hand, the convenience brought by CSS is fully utilized; More flexibility for front-end developers.

在一可选实施例中,在增加CSS属性后,如图8所示,上述步骤S40具体包括:In an optional embodiment, after adding the CSS property, as shown in FIG. 8 , the foregoing step S40 specifically includes:

步骤S45:对滚轮控件中的各元素、属性进行识别与解析,得到对应的解析控件值,详细描述见上述步骤S41中的描述。步骤S45的具体过程见上述步骤S411-步骤S414,由于CSS属性用于定义当前选中项和用户可见项的显示特征,因此在对滚轮控件中的滚轮元素进行识别与解析时,还包括,为滚轮元素创建类,在该类中实现用于监控滚轮元素中属性的值的变化,以及完成与CSS相关属性(property)的关联的成员函数,在本发明实施例中,为滚轮元素创建的类为HVMLHiPickerElement,成员函数为collectStyleForPresentationAttribute。Step S45 : Identify and parse each element and attribute in the scroll wheel control to obtain a corresponding parsed control value. For a detailed description, see the description in step S41 above. The specific process of step S45 is shown in the above-mentioned steps S411-step S414. Since the CSS property is used to define the display characteristics of the currently selected item and the user-visible item, when identifying and analyzing the scroll wheel element in the scroll wheel control, it also includes, for the scroll wheel. The element creation class, in which the member functions used to monitor the change of the attribute value in the scroll wheel element and complete the association with CSS-related properties (property) are implemented. In the embodiment of the present invention, the class created for the scroll wheel element is HVMLHiPickerElement, the member function is collectStyleForPresentationAttribute.

步骤S46:对CSS属性进行识别与解析,得到绘制解析值。在本发明实施例中,对CSS属性进行识别与解析的步骤具体包括:Step S46: Identifying and parsing the CSS property to obtain a drawing parsing value. In the embodiment of the present invention, the steps of identifying and parsing CSS properties specifically include:

将CSS属性名称添加至预设文件中,预设文件根据CSS属性的所需的取值类型设置有与所需的取值类型相对应格式,本发明实施例中,预设文件为CSSProperties.json文件。The CSS property name is added to the preset file, and the preset file is set with a format corresponding to the required value type according to the required value type of the CSS property. In the embodiment of the present invention, the preset file is CSSProperties.json document.

根据CSS属性的哈希值确定CSS属性的ID;Determine the ID of the CSS property according to the hash value of the CSS property;

根据CSS属性所需的取值类型、含义、ID编写CSS属性的解析代码,并根据解析代码将CSS属性的取值类型转化为所需的取值类型,在本发明实施例中,对解析代码的编写是在CSSPropertyParser.cpp中完成的。The parsing code of the CSS property is written according to the value type, meaning, and ID required by the CSS property, and the value type of the CSS property is converted into the required value type according to the parsing code. In the embodiment of the present invention, the parsing code is The writing is done in CSSPropertyParser.cpp.

若CSS属性的所需的取值类型为简写类型,在第二预设文件中显示定义CSS属性包含的各独立属性,在本发明实施例中,第二预设文件为StylePropertyShorthandFunctions.cpp。If the required value type of the CSS property is a shorthand type, each independent property included in the defined CSS property is displayed in the second preset file. In the embodiment of the present invention, the second preset file is StylePropertyShorthandFunctions.cpp.

步骤S47:获取预设渲染节点的成员变量;Step S47: obtaining the member variables of the preset rendering node;

步骤S48:通过预设配置函数,将各解析控件值和绘制解析值配置到各成员变量中,得到当前成员变量,在本发明实施例中,每个CSS属性有与其对应的getter()和setter()函数,对CSS属性解析后,通过getter()和setter()函数将绘制解析值设置到渲染节点的成员节点的变量中。Step S48: configure each parsing control value and drawing parsing value into each member variable through a preset configuration function to obtain the current member variable. In the embodiment of the present invention, each CSS property has a getter() and a setter corresponding to it () function, after parsing the CSS property, set the drawing parsing value to the variable of the member node of the rendering node through the getter() and setter() functions.

步骤S49:根据各当前成员变量以及预设绘制函数,对当前选中项及用户可见项进行布局及渲染,得到目标滚轮对象。Step S49: Layout and render the currently selected item and the user-visible item according to each current member variable and the preset drawing function to obtain the target wheel object.

在一可选实施例中,本发明实施例提供的构建滚轮对象的方法中,滚轮元素通过如下方式处理用户交互事件(如鼠标移动、鼠标滚轮转动、触控操作等),使之呈现出符合物理特性的滚轮旋转效果:In an optional embodiment, in the method for constructing a wheel object provided by the embodiment of the present invention, the wheel element processes user interaction events (such as mouse movement, mouse wheel rotation, touch operation, etc.) Physical properties of the wheel spin effect:

首先,因为滚轮的动态效果是绕X轴做连续旋转的,X轴为滚轮旋转时围绕的水平轴,因此,本发明实施例中用角度来定义当前的选中项位置;初始角度值按0deg表示,向上旋转时角度变大,向下旋转时角度变小;First of all, because the dynamic effect of the scroll wheel is continuously rotated around the X axis, and the X axis is the horizontal axis around which the scroll wheel rotates, therefore, in the embodiment of the present invention, the current selected item position is defined by an angle; the initial angle value is represented by 0deg , the angle becomes larger when you rotate up, and the angle becomes smaller when you rotate down;

其次,根据用户的交互操作力度(速度)以及CSS属性-hi-picker-damping-factor定义的值作为参数,确定一个由用户交互产生的滚轮旋转的目标角度值;Secondly, according to the user's interactive operation strength (speed) and the value defined by the CSS property -hi-picker-damping-factor as parameters, determine a target angle value of the wheel rotation generated by the user interaction;

然后,在旋转角度为参数的一维空间内,建立一个从某个角度(比如0度)到目标角度(比如720度)的函数,该函数可以按照CSS属性-hi-picker-damping-factor定义的值作为参数,可计算滚轮从旋转状态到自然停止所需的时间,并可根据已经旋转的时间确定中间的过渡目标角度值。以1/20秒(每秒更新50次)为时间间隔计算中间的过渡目标角度值,并对hipicker元素进行绘制,重复渲染在这些角度值下的滚轮;Then, in the one-dimensional space with the rotation angle as the parameter, create a function from a certain angle (such as 0 degrees) to the target angle (such as 720 degrees), which can be defined according to the CSS property -hi-picker-damping-factor The value of , as a parameter, can calculate the time required for the wheel to stop naturally from the rotating state, and can determine the intermediate transition target angle value according to the time it has rotated. Calculate the intermediate transition target angle values at intervals of 1/20 second (50 updates per second), draw the hipicker element, and repeatedly render the scroll wheel under these angle values;

最后,在旋转时播放sound属性定义的声音。Finally, play the sound defined by the sound property while rotating.

需要说明的是,以上事件是通过文件HVMLHiPickerElement.cpp中的defaultEventHandler、listBoxDefaultEventHandler、willRespondToMouseClickEvents等成员函数执行的。It should be noted that the above events are executed through member functions such as defaultEventHandler, listBoxDefaultEventHandler, and willRespondToMouseClickEvents in the file HVMLHiPickerElement.cpp.

在一节选实施例中,绘制目标滚轮对象前,还需要完成渲染的计算,例如:In an optional embodiment, before drawing the target wheel object, the rendering calculation needs to be completed, for example:

用户可见项高度的确定:根据CSS伪元素(::-hi-picker-selected)中设置的font-size的取值获取选中项的字体大小,如果未设置font-size,则使用默认字体大小;根据CSS伪元素(::-hi-picker-items)中设置的font-size的取值获取非选中项的字体大小,如果未设置font-size,则使用默认字体大小;根据选中项的字体大小和非选中项的字体大小,以及Row space计算出用户可见项的高度。User-visible item height determination: Obtain the font size of the selected item according to the font-size value set in the CSS pseudo-element (::-hi-picker-selected), if the font-size is not set, the default font size is used; Get the font size of non-selected items according to the value of font-size set in CSS pseudo-element (::-hi-picker-items), if font-size is not set, the default font size is used; according to the font size of selected items and the font size of unselected items, and the Row space calculates the height of user-visible items.

滚轮旋转半径的确定:计算得出用户可见项的高度;根据用户可见项的高度和可选项显示数量,计算出滚轮旋转的半径;Determination of the wheel rotation radius: Calculate the height of the user-visible item; calculate the wheel rotation radius according to the height of the user-visible item and the number of options displayed;

可选项沿X轴转动角度确定:根据滚轮旋转半径和用户可见项的高度,计算可选项在占用圆周的范围和角度;根据滚轮旋转位移计算出可选项沿X轴旋转的角度。The rotation angle of the optional item along the X axis is determined: according to the rotation radius of the wheel and the height of the user-visible item, calculate the range and angle of the optional item in the occupied circle; according to the rotation displacement of the wheel, calculate the rotation angle of the optional item along the X axis.

滚轮元素惯性滑动初速度的确定:记录用户滑动操作按下和抬起的位置和时间;根据滑动的时间和距离计算出抬起时的速度,作为惯性滑动的初速度;Determination of the initial speed of inertial sliding of the scroll wheel element: record the position and time of the user's sliding operation pressing and lifting; calculate the speed when lifting according to the sliding time and distance, as the initial speed of inertial sliding;

滚轮元素惯性滑动距离的确定:计算出滚轮元素惯性滑动初速度;根据惯性滑动的初速度和动画时间计算得出滑动距离;Determination of the inertial sliding distance of the wheel element: Calculate the initial speed of the inertial sliding of the wheel element; calculate the sliding distance according to the initial speed of the inertial sliding and the animation time;

滚轮元素惯性滑动位置和速度变化:计算出滚轮元素惯性滑动初速度;Scroll wheel element inertial sliding position and speed change: Calculate the initial speed of the scroll wheel element inertial sliding;

计算出滚轮元素惯性滑动距离;根据惯性滑动初速度,惯性滑动距离和当前时间,使用贝塞尔曲线算法计算当前位置和速度。Calculate the inertial sliding distance of the wheel element; according to the initial inertial sliding speed, inertial sliding distance and current time, use the Bezier curve algorithm to calculate the current position and speed.

以上几项计算仅为举例说明,目标滚轮对象的构建需要基于滚轮控件完成大量的计算,滚轮控件只对外暴露出简单的接口,大量的计算和逻辑被封装运行。The above calculations are just examples. The construction of the target wheel object requires a lot of calculations based on the wheel control. The wheel control only exposes a simple interface, and a large number of calculations and logic are encapsulated and run.

本发明实施例提供的构建滚轮对象的方法是通过用户代理实现的,由于用户代理往往使用C/C++语言实现,故而可获得更好的性能以及交互体验,并且,在本发明实施例提供的构建滚轮对象的方法中,新定义的元素、属性可方便整合到表单中,简化了前端开发者开发脚本的工作量,降低了前端开发者的学习难度。The method for constructing a wheel object provided by the embodiment of the present invention is implemented by a user agent. Since the user agent is often implemented in C/C++ language, better performance and interactive experience can be obtained. In the method of the wheel object, the newly defined elements and attributes can be easily integrated into the form, which simplifies the workload of front-end developers to develop scripts and reduces the learning difficulty of front-end developers.

实施例2Example 2

本发明实施例提供了一种构建滚轮对象的系统,如图9所示,包括:An embodiment of the present invention provides a system for constructing a wheel object, as shown in FIG. 9 , including:

操作信息获取模块10,用于获取调整滚轮控件的操作信息,滚轮控件至少包括:滚轮元素、滚轮元素包括当前值属性,详细描述见上述实施例1中对步骤S10的描述。The operation information acquisition module 10 is used for acquiring operation information for adjusting the scroll wheel control. The scroll wheel control includes at least the scroll wheel element, and the scroll wheel element includes the current value attribute. For a detailed description, see the description of step S10 in Embodiment 1 above.

当前值属性更新模块20,用于根据操作信息更新滚轮元素的当前值属性的值,当前值属性用于定义滚轮对象的当前选中项,详细描述见上述实施例1中对步骤S20的描述。The current value attribute updating module 20 is used to update the value of the current value attribute of the scroll wheel element according to the operation information, and the current value attribute is used to define the currently selected item of the scroll wheel object.

用户可见项确定模块30,用于根据当前选中项确定用户可见项,用户可见项包括当前选中项的向前相邻项和向后相邻项,详细描述见上述实施例1中对步骤S30的描述。The user-visible item determining module 30 is configured to determine the user-visible item according to the currently selected item. The user-visible item includes the forward adjacent item and the backward adjacent item of the currently selected item. For a detailed description, see the step S30 in the above-mentioned embodiment 1. describe.

目标滚轮对象构建模块40,用于根据滚轮控件及用户可见项,构建目标滚轮对象,详细描述见上述实施例1中对步骤S40的描述。The target scroll wheel object construction module 40 is configured to construct a target scroll wheel object according to the scroll wheel control and the user-visible items. For a detailed description, see the description of step S40 in the above-mentioned Embodiment 1.

本发明提供的构建滚轮对象的系统,通过滚轮元素和滚轮元素的当前值属性构成了滚轮控件,在获取到调整滚轮控件的操作信息后,根据操作信息更新滚轮控件的当前选中项,并根据当前选中项确定用户可见项,最终根据滚轮控件及用户可见项构建目标滚轮对象。在本发明实施例提供的构建滚轮对象的系统中,通过新增的滚轮元素和滚轮元素的当前值属性构成了滚轮控件,滚轮对象的当前选中项和可选项都可通过当前值属性确定,避免了使用大量的div元素,从而降低了页面的内存占用。The system for constructing a wheel object provided by the present invention constitutes a wheel control by using the wheel element and the current value attribute of the wheel element. After obtaining the operation information for adjusting the wheel control, the currently selected item of the wheel control is updated according to the operation information, and according to the current The selected item determines the user-visible item, and finally builds the target scroll wheel object based on the scroll wheel control and the user-visible item. In the system for constructing a scroll wheel object provided by the embodiment of the present invention, the scroll wheel control is formed by the newly added scroll wheel element and the current value attribute of the scroll wheel element. In order to use a large number of div elements, thereby reducing the memory footprint of the page.

实施例3Example 3

本发明实施例提供了一种电子设备,如图10所示,该电子设备主要包括一个或多个处理器51以及存储器52,图10中以一个处理器51为例。An embodiment of the present invention provides an electronic device. As shown in FIG. 10 , the electronic device mainly includes one or more processors 51 and a memory 52 . In FIG. 10 , one processor 51 is used as an example.

该电子设备还可以包括:输入装置53和输出装置54。The electronic device may further include: an input device 53 and an output device 54 .

处理器51、存储器52、输入装置53和输出装置54可以通过总线或者其他方式连接,图10中以通过总线连接为例。The processor 51 , the memory 52 , the input device 53 and the output device 54 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 10 .

处理器51可以为中央处理器(Central Processing Unit,CPU)。处理器51还可以为其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等芯片,或者上述各类芯片的组合。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。存储器52可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据构建滚轮对象的系统的使用所创建的数据等。此外,存储器52可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器52可选包括相对于处理器51远程设置的存储器,这些远程存储器可以通过网络连接至构建滚轮对象的系统。输入装置53可接收用户输入的计算请求(或其他数字或字符信息),以及产生与构建滚轮对象的系统有关的键信号输入。输出装置54可包括显示屏等显示设备,用以输出计算结果。The processor 51 may be a central processing unit (Central Processing Unit, CPU). The processor 51 may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or Other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components and other chips, or a combination of the above types of chips. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory 52 may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the system constructing the wheel object, and the like. Additionally, memory 52 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 52 may optionally include memory located remotely from processor 51, which may be connected via a network to the system that constructs the scroll wheel object. The input device 53 may receive a calculation request (or other numerical or character information) entered by the user, and generate key signal input related to the system for constructing the scroll wheel object. The output device 54 may include a display device such as a display screen, and is used to output the calculation result.

实施例4Example 4

本发明第四方面提供一种计算机可读存储介质,该计算机可读存储介质存储计算机指令,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的构建滚轮对象的方法。其中,所述存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)、随机存储记忆体(Random Access Memory,RAM)、快闪存储器(Flash Memory)、硬盘(Hard Disk Drive,缩写:HDD)或固态硬盘(Solid-StateDrive,SSD)等;所述存储介质还可以包括上述种类的存储器的组合。A fourth aspect of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions can execute any of the foregoing method embodiments. A method to construct the wheel object. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a flash memory (Flash Memory), a hard disk (Hard) Disk Drive, abbreviation: HDD) or solid-state drive (Solid-State Drive, SSD), etc.; the storage medium may also include a combination of the above-mentioned types of memories.

显然,上述实施例仅仅是为清楚地说明所作的举例,而并非对实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。而由此所引申出的显而易见的变化或变动仍处于本发明创造的保护范围之中。Obviously, the above-mentioned embodiments are only examples for clear description, and are not intended to limit the implementation manner. For those of ordinary skill in the art, changes or modifications in other different forms can also be made on the basis of the above description. There is no need and cannot be exhaustive of all implementations here. However, the obvious changes or changes derived from this are still within the protection scope of the present invention.

Claims (10)

1. A method of building a roller object, comprising:
obtaining operation information of an adjusting roller control, wherein the roller control at least comprises: a wheel element, the wheel element including a current value attribute;
updating the value of a current value attribute of the roller element according to the operation information, wherein the current value attribute is used for defining a current selection item of the roller object;
determining user-visible items from the currently selected item, the user-visible items including forward-adjacent items and backward-adjacent items of the currently selected item;
and constructing a target roller object according to the roller control and the user visible item.
2. The method of building a roller object of claim 1, wherein the roller element further comprises a selectable type attribute, a step attribute,
if the selectable item type attribute is an integer type, determining a user visible item according to the currently selected item includes:
determining the forward neighbor according to a difference between the current selected item and the value of the stride attribute;
and determining the backward adjacent item according to the sum of the currently selected item and the value of the step length attribute.
3. A method of constructing a roller object according to claim 1, wherein the roller control further comprises a plurality of selectable elements, the plurality of selectable elements being in order, the selectable elements comprising a selectable value property for defining a value of a selectable in the roller control, the roller element further comprising a selectable type property,
if the selectable item type attribute is a text type, determining a user visible item according to the currently selected item includes:
determining a value of a selectable value attribute of a selectable item element preceding a selectable item element corresponding to the currently selected item as the forward neighbor;
determining a value of a selectable value attribute of a selectable item element subsequent to the selectable item element corresponding to the currently selected item as the backward-adjacent item.
4. A method for building a roller object according to any of claims 1-3, wherein said building a target roller object from the roller control and user visible items comprises:
identifying and analyzing each element and attribute in the roller control to obtain a corresponding analysis control value;
acquiring member variables of preset rendering nodes;
configuring each analysis control value into each member variable through a preset configuration function to obtain a current member variable;
and according to the member variables and a preset drawing function, the currently selected item and the user visible item are laid out and rendered to obtain the target roller wheel object.
5. A method of building a roller object according to any of claims 1-3, wherein the roller control further comprises: CSS attributes defining display characteristics of the currently selected item and the user-viewable item,
the constructing a target roller object according to the roller control and the user visible item comprises:
identifying and analyzing each element and attribute in the roller control to obtain a corresponding analysis control value;
identifying and analyzing the CSS attribute to obtain a drawing analysis value;
acquiring member variables of preset rendering nodes;
configuring each analysis control value and a drawing analysis value into each member variable through a preset configuration function to obtain a current member variable;
and according to each current member variable and a preset drawing function, carrying out layout and rendering on the current selected item and the user visible item to obtain the target roller wheel object.
6. The method for constructing a roller object according to claim 4 or 5, wherein the identifying and parsing each element and attribute in the roller control to obtain a corresponding parsed value comprises:
storing the element names of the elements and the attribute names of the attributes to corresponding files;
generating corresponding hash values for the element and the attribute according to the element name and the attribute name respectively;
acquiring a member function corresponding to the roller element according to the hash value of the roller element;
and analyzing the attribute of the roller element according to the member function to obtain a corresponding analysis control value.
7. The method of building a roller object of claim 1, wherein the roller control further comprises: event attributes for defining logical changes of a current wheel and an adjacent wheel;
the method for constructing the roller object further comprises the following steps:
and determining the value range of the selectable items of the roller control corresponding to the event attribute according to the value of the current value attribute and the event attribute.
8. A system for building a roller object, comprising:
an operation information obtaining module, configured to obtain operation information for adjusting a roller control, where the roller control at least includes: a wheel element, the wheel element including a current value attribute;
a current value attribute updating module, configured to update a value of a current value attribute of the roller element according to the operation information, where the current value attribute is used to define a current option of the roller object;
a user visible item determining module for determining a user visible item according to the currently selected item, wherein the user visible item comprises a forward adjacent item and a backward adjacent item of the currently selected item;
and the target roller object building module is used for building a target roller object according to the roller control and the user visible item.
9. A computer-readable storage medium storing computer instructions which, when executed by a processor, implement a method of constructing a roller object according to any one of claims 1-7.
10. An electronic device, comprising:
a memory and a processor communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of building a roller object according to any one of claims 1-7.
CN202010642414.XA 2020-07-06 2020-07-06 A method and system for constructing a scroll wheel object Pending CN111813479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010642414.XA CN111813479A (en) 2020-07-06 2020-07-06 A method and system for constructing a scroll wheel object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010642414.XA CN111813479A (en) 2020-07-06 2020-07-06 A method and system for constructing a scroll wheel object

Publications (1)

Publication Number Publication Date
CN111813479A true CN111813479A (en) 2020-10-23

Family

ID=72842977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010642414.XA Pending CN111813479A (en) 2020-07-06 2020-07-06 A method and system for constructing a scroll wheel object

Country Status (1)

Country Link
CN (1) CN111813479A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051507A (en) * 2021-03-29 2021-06-29 北京智慧星光信息技术有限公司 Method and system for constructing bidirectional binding web page front end display based on json data
CN114138159A (en) * 2021-11-25 2022-03-04 海南车智易通信息技术有限公司 Method and device for switching tabs, computing equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140143700A1 (en) * 2010-12-02 2014-05-22 Microsoft Corporation Render transform based scrolling and panning for smooth effects
CN105677212A (en) * 2015-12-31 2016-06-15 浙江慧脑信息科技有限公司 Multi-functional time input method
CN105824606A (en) * 2015-01-05 2016-08-03 腾讯科技(深圳)有限公司 Scroll input method and terminal
CN108509189A (en) * 2018-04-13 2018-09-07 南京新贝金服科技有限公司 A kind of component of the H5 time gates based on DOM unifies implementation method
CN109062793A (en) * 2018-07-23 2018-12-21 广州云测信息技术有限公司 A kind of test method, device and the electronic equipment of idler wheel control
CN109426415A (en) * 2017-08-31 2019-03-05 北京国双科技有限公司 A kind of method and device generating cascade selector
CN110134255A (en) * 2019-05-20 2019-08-16 浙江慧脑信息科技有限公司 A kind of Multi-function Time input method
CN111324845A (en) * 2020-02-27 2020-06-23 北京飞漫软件技术有限公司 Method and system for constructing dial plate object

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140143700A1 (en) * 2010-12-02 2014-05-22 Microsoft Corporation Render transform based scrolling and panning for smooth effects
CN105824606A (en) * 2015-01-05 2016-08-03 腾讯科技(深圳)有限公司 Scroll input method and terminal
CN105677212A (en) * 2015-12-31 2016-06-15 浙江慧脑信息科技有限公司 Multi-functional time input method
CN109426415A (en) * 2017-08-31 2019-03-05 北京国双科技有限公司 A kind of method and device generating cascade selector
CN108509189A (en) * 2018-04-13 2018-09-07 南京新贝金服科技有限公司 A kind of component of the H5 time gates based on DOM unifies implementation method
CN109062793A (en) * 2018-07-23 2018-12-21 广州云测信息技术有限公司 A kind of test method, device and the electronic equipment of idler wheel control
CN110134255A (en) * 2019-05-20 2019-08-16 浙江慧脑信息科技有限公司 A kind of Multi-function Time input method
CN111324845A (en) * 2020-02-27 2020-06-23 北京飞漫软件技术有限公司 Method and system for constructing dial plate object

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CASEYWEI: ""css布局 三个按钮一排显示如何居中对齐"", Retrieved from the Internet <URL:https://blog.csdn.net/caseywei/article/details/101274639> *
HOBER.Z: ""css实现三个button分别居左、居中、居右"", Retrieved from the Internet <URL:https://blog.csdn.net/somehow1002/article/details/103104744> *
USTBHUANGYI: ""picker"", pages 1 - 8, Retrieved from the Internet <URL:https://github.com/ustbhuangyi/picker> *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051507A (en) * 2021-03-29 2021-06-29 北京智慧星光信息技术有限公司 Method and system for constructing bidirectional binding web page front end display based on json data
CN113051507B (en) * 2021-03-29 2023-11-21 北京智慧星光信息技术有限公司 Method and system for constructing bidirectional binding web page front-end display based on json data
CN114138159A (en) * 2021-11-25 2022-03-04 海南车智易通信息技术有限公司 Method and device for switching tabs, computing equipment and storage medium

Similar Documents

Publication Publication Date Title
US20220236866A1 (en) Method and system for section-based editing of a website page
US11287967B2 (en) Graphical user interface list content density adjustment
US20140059488A1 (en) System and method for viewing selected descendant nodes in a tree hierarchy displayed in tabular form
CN101308489B (en) Electronic table statement type size variable list
US11112927B2 (en) Digital content automated layout system
KR20130083832A (en) Spin control user interface for selecting options
US10169307B2 (en) Method and system for the use of adjustment handles to facilitate dynamic layout editing
US8732615B2 (en) Unified interface for display and modification of data arrays
US9548042B2 (en) Responsive document breakpoints systems and methods
CN111813479A (en) A method and system for constructing a scroll wheel object
CN106162302B (en) Layout method and device for Launcher main interface and smart television
WO2025016095A1 (en) Interaction method and apparatus, device, and medium
CN117055987A (en) Webpage display method and device, electronic equipment and computer readable storage medium
CN106488298B (en) Method and device for drawing image in UI (user interface) and television
WO2022228209A1 (en) Method and apparatus for constructing visual view
CN113934959A (en) Program preview method and device, computer equipment and storage medium
CN113791760B (en) Business intelligence dashboard generation method, device, electronic device and storage medium
CN119538351A (en) A real-time preview method and device for prototype dynamic components based on design tools
CN111880889B (en) Interface display method and device, electronic equipment and storage medium
US10983679B2 (en) Selectively enabling trackpad functionality in graphical interfaces
CN111324845B (en) Method and system for constructing dial object
CN113168412B (en) Data filtering equipment
JP2019175460A (en) Display controller, display control method, and control program
CN116719456A (en) Icon style switching method and device, electronic equipment and storage medium
CN115033226A (en) Page display method, apparatus, terminal device, and computer-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

Application publication date: 20201023

RJ01 Rejection of invention patent application after publication