CN117724715A - Methods, devices, electronic equipment and storage media for realizing data dynamic effects - Google Patents
Methods, devices, electronic equipment and storage media for realizing data dynamic effects Download PDFInfo
- Publication number
- CN117724715A CN117724715A CN202311686594.1A CN202311686594A CN117724715A CN 117724715 A CN117724715 A CN 117724715A CN 202311686594 A CN202311686594 A CN 202311686594A CN 117724715 A CN117724715 A CN 117724715A
- Authority
- CN
- China
- Prior art keywords
- dynamic effect
- vue
- effect
- animation
- dynamic
- 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
Links
Landscapes
- Processing Or Creating Images (AREA)
Abstract
本申请提供一种数据动态效果的实现方法、装置、电子设备及存储介质,涉及计算机技术领域,以解决相关技术中在前端页面中需要手动开发对应的功能组件,导致生成前端页面的效率比较低的问题。该方法包括:响应于用户在前端数据开发页面的目标VUE插件安装操作,安装目标VUE插件,并在前端数据开发页面激活目标VUE插件对应的数据动态效果组件库;数据动态效果组件库包括多个动态效果功能组件;一个动态效果功能组件对应一个动态效果参数;响应于用户在目标VUE插件中输入的动态效果指令,确定动态效果指令的输入参数;确定与输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。
This application provides a method, device, electronic equipment and storage medium for realizing dynamic effects of data, involving the field of computer technology, to solve the problem of the need to manually develop corresponding functional components in front-end pages in related technologies, resulting in relatively low efficiency in generating front-end pages. The problem. The method includes: responding to the user's target VUE plug-in installation operation on the front-end data development page, installing the target VUE plug-in, and activating the data dynamic effect component library corresponding to the target VUE plug-in on the front-end data development page; the data dynamic effect component library includes multiple Dynamic effect function component; a dynamic effect function component corresponds to a dynamic effect parameter; responds to the dynamic effect instruction input by the user in the target VUE plug-in, determines the input parameter of the dynamic effect instruction; determines the target dynamic effect parameter that is the same as the input parameter, and Displays the target dynamic effect corresponding to the target dynamic effect parameter.
Description
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种数据动态效果的实现方法、装置、电子设备及存储介质。The present application relates to the field of computer technology, and in particular to a method, device, electronic equipment and storage medium for realizing dynamic effects of data.
背景技术Background technique
VUE是一套用于构建用户界面的渐进式JavaScript框架。组件(Component)是Vue.js最强大的功能之一。组件可以扩展HTML元素,封装可重用的代码。组件系统可以用独立可复用的小组件来构建大型应用。VUE is a progressive JavaScript framework for building user interfaces. Component is one of the most powerful features of Vue.js. Components can extend HTML elements and encapsulate reusable code. The component system can use independent and reusable small components to build large applications.
目前几乎所有的WEB可视化项目追求的界面炫,其实就是动画效果要好,现有技术中如果一些文本的显示,比如标题,如果将文本同时显示出来,就会显得很生硬。At present, almost all WEB visualization projects pursue a dazzling interface. In fact, the animation effect is better. In the existing technology, if some texts, such as titles, are displayed at the same time, it will look very stiff.
现有技术中无法实现基于VUE根据文本字数实现动态显示效果组件,不方便用户在多个页面引用,在每个页如果需要显示同样的效果都要对每个页面处业务逻辑,操作繁琐。In the existing technology, it is impossible to implement dynamic display effect components based on the number of text words based on VUE, which is inconvenient for users to reference on multiple pages. If the same effect needs to be displayed on each page, business logic must be applied to each page, which is cumbersome.
发明内容Contents of the invention
本申请提供一种数据动态效果的实现方法、装置、电子设备及存储介质,以解决相关技术中在前端页面中需要手动开发对应的功能组件,导致生成前端页面的效率比较低的问题。This application provides a method, device, electronic device and storage medium for realizing dynamic effects of data to solve the problem in related technologies that corresponding functional components need to be manually developed in the front-end page, resulting in relatively low efficiency in generating the front-end page.
为达到上述目的,本申请采用如下技术方案:In order to achieve the above purpose, this application adopts the following technical solutions:
第一方面,提供一种数据动态效果的实现方法,该方法包括:响应于用户在前端数据开发页面的目标VUE插件安装操作,安装目标VUE插件,并在前端数据开发页面激活目标VUE插件对应的数据动态效果组件库;数据动态效果组件库包括多个动态效果功能组件;一个动态效果功能组件对应一个动态效果参数;响应于用户在目标VUE插件中输入的动态效果指令,确定动态效果指令的输入参数;确定与输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。The first aspect provides a method for realizing the dynamic effect of data. The method includes: responding to the user's target VUE plug-in installation operation on the front-end data development page, installing the target VUE plug-in, and activating the target VUE plug-in corresponding to the front-end data development page. Data dynamic effect component library; the data dynamic effect component library includes multiple dynamic effect functional components; one dynamic effect functional component corresponds to one dynamic effect parameter; in response to the dynamic effect command input by the user in the target VUE plug-in, determine the input of the dynamic effect command Parameters; determine the target dynamic effect parameters that are the same as the input parameters, and display the target dynamic effect corresponding to the target dynamic effect parameters.
可选的,方法还包括:创建数据动态效果项目的目录结构,目录结构中设置有组件文件夹;根据数据动态效果项目的展示需求,将需要开发的组件至少拆分为动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件;使用VUE开发动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件;将开发完成的组件存放在组件文件夹中;在数据动态效果项目开发完成后,至少将数据动态效果项目中的组件打包并发布,以得到能够供前端用户下载使用的数据动态效果组件库。Optionally, the method also includes: creating a directory structure of the data dynamic effect project, with component folders set in the directory structure; according to the display requirements of the data dynamic effect project, split the components to be developed into at least dynamic effect functional components, animation Effect functional components, animation optimization functional components, and transition effect functional components; use VUE to develop dynamic effect functional components, animation effect functional components, animation optimization functional components, and transition effect functional components; store the developed components in the component folder; in After the development of the data dynamic effect project is completed, at least the components in the data dynamic effect project will be packaged and published to obtain a data dynamic effect component library that can be downloaded and used by front-end users.
可选的,使用VUE开发动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件,包括:获取开发人员输入的动态效果配置文件;动态效果配置文件包括第一VUE代码;响应于封装指令,封装第一VUE代码,得到动态效果功能组件;获取开发人员输入的动画效果配置文件;动画效果配置文件包括第二VUE代码;响应于封装指令,封装第二VUE代码,得到动画效果功能组件;获取开发人员输入的动画优化配置文件;动画优化配置文件包括第三VUE代码;响应于封装指令,封装第三VUE代码,得到动画优化功能组件;获取开发人员输入的过渡效果配置文件;过渡效果配置文件包括第四VUE代码;响应于封装指令,封装第四VUE代码,得到过渡效果功能组件。Optionally, use VUE to develop dynamic effect functional components, animation effect functional components, animation optimization functional components, and transition effect functional components, including: obtaining the dynamic effect configuration file input by the developer; the dynamic effect configuration file includes the first VUE code; responding In the encapsulation instruction, encapsulate the first VUE code to obtain the dynamic effect functional component; obtain the animation effect configuration file input by the developer; the animation effect configuration file includes the second VUE code; in response to the encapsulation instruction, encapsulate the second VUE code to obtain the animation effect Functional component; obtain the animation optimization configuration file input by the developer; the animation optimization configuration file includes the third VUE code; respond to the encapsulation instruction, encapsulate the third VUE code to obtain the animation optimization functional component; obtain the transition effect configuration file input by the developer; The transition effect configuration file includes the fourth VUE code; in response to the encapsulation instruction, the fourth VUE code is encapsulated to obtain the transition effect functional component.
可选的,第一VUE代码包括动态效果的第一配置参数,第一配置参数包括动态效果的持续时间、旋转角度、缩放比例;第二VUE代码包括动画效果的第二配置参数,第二配置参数包括动画效果的渲染方式、播放方式;第三VUE代码包括动画优化的第三配置参数,第三配置参数包括动画优化的动画曲线调整方式;第四VUE代码包括过渡效果的第四配置参数,第四配置参数包括过渡效果的颜色变化、大小变化。Optionally, the first VUE code includes the first configuration parameters of the dynamic effect, and the first configuration parameters include the duration, rotation angle, and scaling ratio of the dynamic effect; the second VUE code includes the second configuration parameters of the animation effect, and the second configuration parameter The parameters include the rendering method and playback method of the animation effect; the third VUE code includes the third configuration parameter of animation optimization, and the third configuration parameter includes the animation curve adjustment method of animation optimization; the fourth VUE code includes the fourth configuration parameter of the transition effect, The fourth configuration parameter includes color changes and size changes of the transition effect.
第二方面,提供一种数据动态效果的实现装置,该装置包括处理单元、确定单元以及显示单元;处理单元,用于响应于用户在前端数据开发页面的目标VUE插件安装操作,安装目标VUE插件,并在前端数据开发页面激活目标VUE插件对应的数据动态效果组件库;数据动态效果组件库包括多个动态效果功能组件;一个动态效果功能组件对应一个动态效果参数;确定单元,用于响应于用户在目标VUE插件中输入的动态效果指令,确定动态效果指令的输入参数;显示单元,用于确定与输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。In a second aspect, a device for realizing a data dynamic effect is provided. The device includes a processing unit, a determination unit and a display unit; the processing unit is used to install the target VUE plug-in in response to the user's target VUE plug-in installation operation on the front-end data development page. , and activate the data dynamic effect component library corresponding to the target VUE plug-in on the front-end data development page; the data dynamic effect component library includes multiple dynamic effect functional components; one dynamic effect functional component corresponds to one dynamic effect parameter; the determination unit is used to respond to The dynamic effect instructions input by the user in the target VUE plug-in determine the input parameters of the dynamic effect instructions; the display unit is used to determine the target dynamic effect parameters that are the same as the input parameters, and display the target dynamic effects corresponding to the target dynamic effect parameters.
可选的,处理单元还用于:创建数据动态效果项目的目录结构,目录结构中设置有组件文件夹;根据数据动态效果项目的展示需求,将需要开发的组件至少拆分为动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件;使用VUE开发动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件;将开发完成的组件存放在组件文件夹中;在数据动态效果项目开发完成后,至少将数据动态效果项目中的组件打包并发布,以得到能够供前端用户下载使用的数据动态效果组件库。Optionally, the processing unit is also used to: create a directory structure of the data dynamic effect project, with component folders set in the directory structure; and split the components that need to be developed into at least dynamic effect functional components according to the display requirements of the data dynamic effect project , animation effect functional components, animation optimization functional components, transition effect functional components; use VUE to develop dynamic effect functional components, animation effect functional components, animation optimization functional components, and transition effect functional components; store the developed components in the component folder ; After the development of the data dynamic effect project is completed, at least the components in the data dynamic effect project will be packaged and released to obtain a data dynamic effect component library that can be downloaded and used by front-end users.
可选的,处理单元,具体用于:获取开发人员输入的动态效果配置文件;动态效果配置文件包括第一VUE代码;响应于封装指令,封装第一VUE代码,得到动态效果功能组件;获取开发人员输入的动画效果配置文件;动画效果配置文件包括第二VUE代码;响应于封装指令,封装第二VUE代码,得到动画效果功能组件;获取开发人员输入的动画优化配置文件;动画优化配置文件包括第三VUE代码;响应于封装指令,封装第三VUE代码,得到动画优化功能组件;获取开发人员输入的过渡效果配置文件;过渡效果配置文件包括第四VUE代码;响应于封装指令,封装第四VUE代码,得到过渡效果功能组件。Optional, processing unit, specifically used to: obtain the dynamic effect configuration file input by the developer; the dynamic effect configuration file includes the first VUE code; respond to the encapsulation instruction, encapsulate the first VUE code to obtain the dynamic effect functional component; obtain the development The animation effect configuration file input by the personnel; the animation effect configuration file includes the second VUE code; in response to the encapsulation instruction, the second VUE code is encapsulated to obtain the animation effect functional component; the animation optimization configuration file input by the developer is obtained; the animation optimization configuration file includes The third VUE code; in response to the encapsulation instruction, encapsulate the third VUE code to obtain the animation optimization functional component; obtain the transition effect configuration file input by the developer; the transition effect configuration file includes the fourth VUE code; in response to the encapsulation instruction, encapsulate the fourth VUE code to get the transition effect functional component.
可选的,第一VUE代码包括动态效果的第一配置参数,第一配置参数包括动态效果的持续时间、旋转角度、缩放比例;第二VUE代码包括动画效果的第二配置参数,第二配置参数包括动画效果的渲染方式、播放方式;第三VUE代码包括动画优化的第三配置参数,第三配置参数包括动画优化的动画曲线调整方式;第四VUE代码包括过渡效果的第四配置参数,第四配置参数包括过渡效果的颜色变化、大小变化。Optionally, the first VUE code includes the first configuration parameters of the dynamic effect, and the first configuration parameters include the duration, rotation angle, and scaling ratio of the dynamic effect; the second VUE code includes the second configuration parameters of the animation effect, and the second configuration parameter The parameters include the rendering method and playback method of the animation effect; the third VUE code includes the third configuration parameter of animation optimization, and the third configuration parameter includes the animation curve adjustment method of animation optimization; the fourth VUE code includes the fourth configuration parameter of the transition effect, The fourth configuration parameter includes color changes and size changes of the transition effect.
第三方面,提供一种电子设备,包括:处理器、用于存储处理器可执行的指令的存储器;其中,处理器被配置为执行指令,以实现上述第一方面的数据动态效果的实现方法。In a third aspect, an electronic device is provided, including: a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to execute instructions to implement the method for implementing the data dynamic effect of the first aspect. .
第四方面,提供一种计算机可读存储介质,计算机可读存储介质上存储有指令,当计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如上述第一方面的数据动态效果的实现方法。In a fourth aspect, a computer-readable storage medium is provided. Instructions are stored on the computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can execute the above-mentioned first step. Methods to achieve dynamic effects on data.
本申请实施例提供的技术方案至少带来以下有益效果:响应于用户在前端数据开发页面的目标VUE插件安装操作,安装目标VUE插件,并在前端数据开发页面激活目标VUE插件对应的数据动态效果组件库。由于数据动态效果组件库包括多个动态效果功能组件,一个动态效果功能组件对应一个动态效果参数。因此,响应于用户在目标VUE插件中输入的动态效果指令,确定动态效果指令的输入参数,确定与输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。这样一来,用户在进行前端开发时仅需输入动态效果指令,以将想要实现的动态效果的参数赋予到动态效果指令中,即可以调用相应的动态效果功能组件,实现对应的动态效果,避免了手动开发对应的功能组件,进而达到了提高生成前端页面的效率的效果。The technical solution provided by the embodiment of the present application at least brings the following beneficial effects: in response to the user's target VUE plug-in installation operation on the front-end data development page, the target VUE plug-in is installed, and the data dynamic effect corresponding to the target VUE plug-in is activated on the front-end data development page Component library. Since the data dynamic effect component library includes multiple dynamic effect functional components, one dynamic effect functional component corresponds to one dynamic effect parameter. Therefore, in response to the dynamic effect instruction input by the user in the target VUE plug-in, the input parameter of the dynamic effect instruction is determined, the target dynamic effect parameter that is the same as the input parameter is determined, and the target dynamic effect corresponding to the target dynamic effect parameter is displayed. In this way, users only need to enter dynamic effect instructions when performing front-end development to assign the parameters of the dynamic effect they want to achieve to the dynamic effect instructions, and then the corresponding dynamic effect functional components can be called to achieve the corresponding dynamic effects. It avoids the manual development of corresponding functional components, thereby improving the efficiency of generating front-end pages.
附图说明Description of the drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present application or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.
图1为本申请实施例提供的一种数据动态效果的实现系统的结构示意图;Figure 1 is a schematic structural diagram of a system for realizing dynamic data effects provided by an embodiment of the present application;
图2为本申请实施例提供的一种数据动态效果的实现方法的流程示意图一;Figure 2 is a schematic flowchart 1 of a method for realizing a data dynamic effect provided by an embodiment of the present application;
图3为本申请实施例提供的一种数据动态效果的实现方法的流程示意图二;Figure 3 is a schematic flowchart 2 of a method for realizing a data dynamic effect provided by an embodiment of the present application;
图4为本申请实施例提供的一种封装VueMotion库的流程示意图;Figure 4 is a schematic flowchart of encapsulating the VueMotion library provided by an embodiment of the present application;
图5为本申请实施例提供的一种实现装置的结构示意图;Figure 5 is a schematic structural diagram of an implementation device provided by an embodiment of the present application;
图6为本申请实施例提供的一种电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.
需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that in the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "such as" in the embodiments of the present application is not to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary" or "such as" is intended to present the concept in a concrete manner.
还需要说明的是,本申请实施例中,“的(英文:of)”,“相应的(英文:corresponding,relevant)”和“对应的(英文:corresponding)”有时可以混用,应当指出的是,在不强调其区别时,其所要表达的含义是一致的。It should also be noted that in the embodiments of this application, "of", "corresponding (English: corresponding, relevant)" and "corresponding (English: corresponding)" can sometimes be used interchangeably. It should be noted that , when the difference is not emphasized, the meaning they want to express is the same.
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分,本领域技术人员可以理解“第一”、“第二”等字样并不是在对数量和执行次序进行限定。In order to facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as “first” and “second” are used to distinguish the same or similar items with basically the same functions and effects. Skilled persons can understand that words such as "first" and "second" do not limit the quantity and execution order.
在对本申请实施例进行详细地解释说明之前,先对本申请实施例涉及到的一些技术术语以及相关技术进行介绍。Before explaining the embodiments of the present application in detail, some technical terms and related technologies involved in the embodiments of the present application are first introduced.
现有技术中都在探索低代码,无代码开发的平台,不过这些平台往往支持的功能和场景会比较单一,在复杂的前端功能页面的开发中,必须根据自己所选的前端框架和UI组件自行根据需求来手动完成需求的开发。且若是存量代码中存在大量重复代码,目前的技术方案无法快速把这些重复代码快速地整合起来。The existing technology is exploring low-code and no-code development platforms. However, these platforms often support relatively single functions and scenarios. In the development of complex front-end functional pages, you must choose the front-end framework and UI components according to your choice. Complete the development of requirements manually according to the requirements. And if there are a large number of duplicate codes in the existing code, the current technical solution cannot quickly integrate these duplicate codes.
在开发复杂前端页面的过程中,一定会面临抽取公共组件的问题,因为单纯得堆叠代码会导致项目后期无法维护,代码会出现无法共用,可读性差等问题。但是在现有技术中抽取组件的过程中如果没有标准的方法和规范,也会出现组件的复用度低下,相同组件重复抽取等问题。In the process of developing complex front-end pages, you will definitely face the problem of extracting common components, because simply stacking codes will cause the project to be unable to be maintained later, and the code will be unable to be shared and have poor readability. However, if there are no standard methods and specifications in the process of extracting components in the existing technology, problems such as low reusability of components and repeated extraction of the same components will also occur.
针对相关技术中在前端页面中需要手动开发对应的功能组件,导致生成前端页面的效率比较低的问题,目前尚未提出有效的解决方案。Regarding the problem in related technologies that corresponding functional components need to be manually developed in the front-end page, resulting in relatively low efficiency in generating the front-end page, no effective solution has yet been proposed.
鉴于此,本申请实施例提供了一种数据动态效果的实现方法,通过使用VueMotion库,前端开发者可以轻松地为他们的Vue应用程序添加各种动态效果和过渡效果,避免了手动开发对应的功能组件,进而达到了提高生成前端页面的效率的效果。In view of this, the embodiment of this application provides a method for realizing dynamic effects of data. By using the VueMotion library, front-end developers can easily add various dynamic effects and transition effects to their Vue applications, avoiding the need to manually develop the corresponding Functional components, thereby achieving the effect of improving the efficiency of generating front-end pages.
下面结合附图对本申请实施例提供的数据动态效果的实现方法进行详细说明。The method for realizing the data dynamic effect provided by the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
本申请实施例提供的数据动态效果的实现方法可以适用于数据动态效果的实现系统,图1示出了该数据动态效果的实现系统的一种结构示意图。如图1所示,数据动态效果的实现系统包括数据动态效果的实现装置(以下实现装置)11以及服务器12。其中,实现装置11与服务器12连接。实现装置11与服务器12之间可以采用有线方式连接,也可以采用无线方式连接,本申请实施例对此不作限定。The method for realizing the data dynamic effect provided by the embodiment of the present application can be applied to the system for realizing the data dynamic effect. Figure 1 shows a schematic structural diagram of the system for realizing the data dynamic effect. As shown in FIG. 1 , the data dynamic effect implementation system includes a data dynamic effect implementation device (hereinafter implementation device) 11 and a server 12 . Among them, the device 11 is connected to the server 12 . The implementation device 11 and the server 12 may be connected in a wired manner or in a wireless manner, which is not limited in the embodiment of the present application.
实现装置11可以从服务器12中获取数据动态效果组件库。响应于用户在前端数据开发页面的目标VUE插件安装操作,实现装置11可以安装所述目标VUE插件,并在所述前端数据开发页面激活所述目标VUE插件对应的数据动态效果组件库。响应于用户在所述目标VUE插件中输入的动态效果指令,实现装置11可以确定所述动态效果指令的输入参数;实现装置11可以确定与所述输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。The implementation device 11 can obtain the data dynamic effect component library from the server 12 . In response to the user's target VUE plug-in installation operation on the front-end data development page, the implementation device 11 can install the target VUE plug-in, and activate the data dynamic effect component library corresponding to the target VUE plug-in on the front-end data development page. In response to the dynamic effect instruction input by the user in the target VUE plug-in, the implementation device 11 may determine the input parameters of the dynamic effect instruction; the implementation device 11 may determine the target dynamic effect parameter that is the same as the input parameter, and display the target The target dynamic effect corresponding to the dynamic effect parameter.
实现装置11可以是具有计算处理功能的电子设备。例如,实现装置11可以为手机、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、桌上型计算机、云端服务器等,本申请实施例对电子设备的具体类型不作限制。The implementation device 11 may be an electronic device with computing processing functions. For example, the implementation device 11 can be a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), a desktop computer, a cloud server, etc. , the embodiments of this application do not limit the specific type of electronic equipment.
服务器12可以是单独的一个服务器,或者,也可以是有多个服务器构成的服务器集群。部分实施方式中,服务器集群还可以是分布式集群。可选地,服务器还可以在云平台上实现,例如,云平台可以包括私有云、公有云、混合云、社区云(community cloud)、分布式云、跨云(inter-cloud)、以及多云(multi-cloud)等,或者它们的任意组合。本申请实施例对此不作限制。The server 12 may be a single server, or may be a server cluster composed of multiple servers. In some implementations, the server cluster may also be a distributed cluster. Optionally, the server can also be implemented on a cloud platform. For example, the cloud platform can include private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, inter-cloud, and multi-cloud ( multi-cloud), etc., or any combination thereof. The embodiments of the present application do not limit this.
需要说明的是,上述图1中以实现装置11和服务器12为各自独立的装置为例进行了介绍,可选地,实现装置11和服务器12还可以合设为一个装置。例如,服务器12或其对应的功能、以及实现装置11或其对应的功能可以集成在一个装置中。本申请实施例对此不作限制。It should be noted that the above-mentioned FIG. 1 takes the implementation device 11 and the server 12 as independent devices as an example. Alternatively, the implementation device 11 and the server 12 can also be combined into one device. For example, the server 12 or its corresponding functions, and the implementation device 11 or its corresponding functions may be integrated in one device. The embodiments of the present application do not limit this.
本申请实施例提供的数据动态效果的实现方法的执行主体可以是上述实现装置11。如上,该实现装置11可以是计算机或服务器等具有计算处理功能的电子设备。可选地,该实现装置11也可以是前述电子设备中的处理器(例如中央处理器(central processingunit,CPU));或者,该实现装置11还可以是前述电子设备中安装的具有模型训练功能的应用程序(application,APP);再或者,该实现装置11还可以是前述电子设备中具有模型训练功能的功能模块等。本申请实施例对此不作限制。The execution subject of the method for implementing data dynamic effects provided by the embodiment of the present application may be the above-mentioned implementation device 11. As mentioned above, the implementation device 11 may be an electronic device with computing processing functions such as a computer or a server. Optionally, the implementation device 11 may also be a processor (such as a central processing unit (CPU)) in the aforementioned electronic device; or, the implementation device 11 may also be a model training function installed in the aforementioned electronic device. An application (APP); or, the implementation device 11 may also be a functional module with a model training function in the aforementioned electronic device. The embodiments of the present application do not limit this.
图2是根据一些示例性实施例示出的一种数据动态效果的实现方法的流程示意图。在一些实施例中,上述数据动态效果的实现方法可以应用到如图1所示的实现装置、电子设备,也可以应用到其他类似设备。Figure 2 is a schematic flowchart of a method for implementing a data dynamic effect according to some exemplary embodiments. In some embodiments, the above method for implementing dynamic data effects can be applied to the implementation device and electronic equipment shown in Figure 1 , and can also be applied to other similar equipment.
如图2所示,本申请实施例提供的数据动态效果的实现方法,包括下述S201-S203。As shown in Figure 2, the implementation method of data dynamic effects provided by the embodiment of the present application includes the following S201-S203.
S201、响应于用户在前端数据开发页面的目标VUE插件安装操作,安装目标VUE插件,并在前端数据开发页面激活目标VUE插件对应的数据动态效果组件库。S201. In response to the user's target VUE plug-in installation operation on the front-end data development page, install the target VUE plug-in, and activate the data dynamic effect component library corresponding to the target VUE plug-in on the front-end data development page.
其中,数据动态效果组件库包括多个动态效果功能组件;一个动态效果功能组件对应一个动态效果参数。Among them, the data dynamic effect component library includes multiple dynamic effect functional components; one dynamic effect functional component corresponds to one dynamic effect parameter.
需要说明的,数据动态效果组件库为预先创建得到的,例如,数据动态效果组件库可以为预先创建的VueMotion库。It should be noted that the data dynamic effect component library is pre-created. For example, the data dynamic effect component library can be a pre-created VueMotion library.
数据动态效果组件库可配置动态效果、物理引擎的应用、轻量级动画引擎、动画曲线优化和过渡合并优化等功能。通过封装的组件或指令,开发者可以方便地应用这些预先配置的动态效果和过渡效果,从而提升用户体验和页面交互的吸引力。The data dynamic effect component library can configure dynamic effects, physics engine applications, lightweight animation engines, animation curve optimization, transition merge optimization and other functions. Through encapsulated components or instructions, developers can easily apply these pre-configured dynamic effects and transition effects, thereby improving the user experience and the attractiveness of page interactions.
作为一种可能的实现方式,开发人员(即用户)在进行前端开发时,可以通过指令接收的方式应用数据动态效果组件库。为了方便开发人员的使用,实现装置可以通过数据动态效果组件库对应的VUE插件的形式,为开发人员提供数据动态效果组件库中的服务。开发人员只需在VUE应用程序中安装VueMotion插件,即可使用其中提供的指令和功能。As a possible implementation method, developers (i.e. users) can apply the data dynamic effect component library by receiving instructions when performing front-end development. In order to facilitate the use of developers, the implementation device can provide developers with services in the data dynamic effect component library in the form of VUE plug-ins corresponding to the data dynamic effect component library. Developers only need to install the VueMotion plug-in in their VUE application to use the instructions and functions provided there.
示例性的,实现装置可以创建一个Vue插件,用于注册VueMotion指令和组件。实现装置可以在一个单独的JavaScript文件vue-motion.js中定义Vue插件:For example, the implementation device can create a Vue plug-in for registering VueMotion instructions and components. The implementation can define the Vue plug-in in a separate JavaScript file vue-motion.js:
import VueMotion from‘vue-motion’;import VueMotion from ‘vue-motion’;
export default{export default{
install(Vue){install(Vue){
Vue.use(VueMotion);Vue.use(VueMotion);
}}
}}
在上述代码中,实现装置导入VueMotion模块,然后定义一个名为VueMotion的Vue插件。在插件的install方法中,实现装置使用Vue.use方法来注册VueMotion指令和组件。In the above code, the implementation device imports the VueMotion module, and then defines a Vue plug-in named VueMotion. In the plug-in's install method, the implementation uses the Vue.use method to register the VueMotion directive and component.
一些实施例中,在Vue应用程序中,实现装置可以将上述Vue插件注册为全局插件,以便在整个应用程序中使用。具体的,实现装置可以在Vue实例的入口文件中注册插件:In some embodiments, in a Vue application, the implementation device can register the above-mentioned Vue plug-in as a global plug-in so that it can be used in the entire application. Specifically, the implementation device can register the plug-in in the entry file of the Vue instance:
import Vue from‘vue’;import Vue from‘vue’;
import VueMotion from‘./vue-motion’;import VueMotion from‘./vue-motion’;
Vue.use(VueMotion);Vue.use(VueMotion);
new Vue({newVue({
});});
在上述代码中,实现装置导入Vue和VueMotion插件,然后使用Vue.use方法来注册VueMotion插件。如此一来,在开发人员进行前端开发时,实现装置就可以在整个应用程序中使用VueMotion指令和组件了。In the above code, the implementation device imports Vue and VueMotion plug-ins, and then uses the Vue.use method to register the VueMotion plug-in. This way, when developers do front-end development, the implementation can use VueMotion directives and components throughout the application.
S202、响应于用户在目标VUE插件中输入的动态效果指令,确定动态效果指令的输入参数。S202. In response to the dynamic effect instruction input by the user in the target VUE plug-in, determine the input parameters of the dynamic effect instruction.
作为一种可能的实现方式,实现装置接收用户在目标VUE插件中输入的动态效果指令,并确定用户在该动态效果指令下输入的输入参数。As a possible implementation manner, the implementation device receives the dynamic effect instruction input by the user in the target VUE plug-in, and determines the input parameters input by the user under the dynamic effect instruction.
示例性的,在目标Vue组件中,用户可以使用v-motion指令来添加动态效果。例如,可以在一个按钮组件中使用v-motion指令来添加淡入淡出效果,例如:For example, in the target Vue component, the user can use the v-motion directive to add dynamic effects. For example, you can use the v-motion directive in a button component to add a fade effect, for example:
<template><template>
<burron v-motion=”’fade’”>Click me</button><burron v-motion="’fade’”>Click me</button>
</template></template>
在以上代码中,用户使用v-motion指令,传入一个字符串参数'fade',表示添加淡入淡出效果。实现装置则可以通过上述代码,获取到该字符串参数。In the above code, the user uses the v-motion command to pass in a string parameter 'fade', which means adding a fade effect. The implementation device can obtain the string parameter through the above code.
需要说明的,用户可以根据实际需求,传入不同的字符串参数,来添加不同的动态效果,本申请对此不作限定。It should be noted that users can add different dynamic effects by passing in different string parameters according to actual needs. This application does not limit this.
S203、确定与输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。S203. Determine the target dynamic effect parameter that is the same as the input parameter, and display the target dynamic effect corresponding to the target dynamic effect parameter.
作为一种可能的实现方式,实现装置基于输入参数,遍历各动态效果参数,以确定出与输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。As a possible implementation method, the implementation device traverses each dynamic effect parameter based on the input parameter to determine the target dynamic effect parameter that is the same as the input parameter, and displays the target dynamic effect corresponding to the target dynamic effect parameter.
本申请实施例提供的技术方案至少带来以下有益效果:响应于用户在前端数据开发页面的目标VUE插件安装操作,安装目标VUE插件,并在前端数据开发页面激活目标VUE插件对应的数据动态效果组件库。由于数据动态效果组件库包括多个动态效果功能组件,一个动态效果功能组件对应一个动态效果参数。因此,响应于用户在目标VUE插件中输入的动态效果指令,确定动态效果指令的输入参数,确定与输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。这样一来,用户在进行前端开发时仅需输入动态效果指令,以将想要实现的动态效果的参数赋予到动态效果指令中,即可以调用相应的动态效果功能组件,实现对应的动态效果,避免了手动开发对应的功能组件,进而达到了提高生成前端页面的效率的效果。The technical solution provided by the embodiment of the present application at least brings the following beneficial effects: in response to the user's target VUE plug-in installation operation on the front-end data development page, the target VUE plug-in is installed, and the data dynamic effect corresponding to the target VUE plug-in is activated on the front-end data development page Component library. Since the data dynamic effect component library includes multiple dynamic effect functional components, one dynamic effect functional component corresponds to one dynamic effect parameter. Therefore, in response to the dynamic effect instruction input by the user in the target VUE plug-in, the input parameter of the dynamic effect instruction is determined, the target dynamic effect parameter that is the same as the input parameter is determined, and the target dynamic effect corresponding to the target dynamic effect parameter is displayed. In this way, users only need to enter dynamic effect instructions when performing front-end development to assign the parameters of the dynamic effect they want to achieve to the dynamic effect instructions, and then the corresponding dynamic effect functional components can be called to achieve the corresponding dynamic effects. It avoids the manual development of corresponding functional components, thereby improving the efficiency of generating front-end pages.
在一种设计中,为了创建数据动态效果组件库,如图3所示,本申请实施例提供的数据动态效果的实现方法还可以包括:In one design, in order to create a data dynamic effect component library, as shown in Figure 3, the implementation method of the data dynamic effect provided by the embodiment of the present application may also include:
S301、创建数据动态效果项目的目录结构,目录结构中设置有组件文件夹。S301. Create a directory structure of the data dynamic effect project, and a component folder is set in the directory structure.
作为一种可能的实现方式,实现装置确定待创建的数据动态效果项目名称,并创建该项目对应的文件结构。As a possible implementation manner, the implementation device determines the name of the data dynamic effect project to be created, and creates a file structure corresponding to the project.
示例性的,实现装置通过Vue CLI或用户输出,创建一个新的Vue项目。实现装置在项目中生成一个名为"vue-motion"的文件夹作为VueMotion库的存放位置。实现装置在"vue-motion"文件夹中创建以下文件和文件夹:For example, the implementation device creates a new Vue project through Vue CLI or user output. The implementation device generates a folder named "vue-motion" in the project as the storage location of the VueMotion library. The implementation creates the following files and folders in the "vue-motion" folder:
-"src"文件夹:用于存放源代码。-"src" folder: used to store source code.
-"examples"文件夹:用于存放示例代码和演示页面。-"examples" folder: used to store sample code and demonstration pages.
-"dist"文件夹:用于存放构建后的库文件。-"dist" folder: used to store built library files.
S302、根据数据动态效果项目的展示需求,将需要开发的组件至少拆分为动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件。S302. According to the display requirements of the data dynamic effect project, split the components to be developed into at least dynamic effect functional components, animation effect functional components, animation optimization functional components, and transition effect functional components.
作为一种可能的实现方式,实现装置根据开发人员的对数据动态效果项目的展示需求,将需要开发的组件至少拆分为动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件。As a possible implementation method, the implementation device splits the components to be developed into at least dynamic effect functional components, animation effect functional components, animation optimization functional components, and transition effect functions based on the developer's display requirements for data dynamic effect projects. components.
S303、使用VUE开发动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件。S303. Use VUE to develop dynamic effect functional components, animation effect functional components, animation optimization functional components, and transition effect functional components.
作为一种可能的实现方式,实现装置获取开发人员输入的动态效果配置文件;动态效果配置文件包括第一VUE代码;响应于封装指令,封装第一VUE代码,得到动态效果功能组件。As a possible implementation method, the implementation device obtains the dynamic effect configuration file input by the developer; the dynamic effect configuration file includes the first VUE code; in response to the encapsulation instruction, the first VUE code is encapsulated to obtain the dynamic effect functional component.
在实际应用中,实现装置可以创建一个名为"VueMotion"的核心模块,用于提供主要的动态效果功能。在核心模块中,生成一个高度可配置的动态效果引擎,允许开发者通过配置文件或代码来定义、组合和定制各种动画效果。实现装置可以整合物理引擎库,如"physic.js",将其作为动态效果引擎的一部分,使动态效果更加真实、逼真。In actual applications, the implementation device can create a core module named "VueMotion" to provide the main dynamic effect function. In the core module, a highly configurable dynamic effects engine is generated, allowing developers to define, combine and customize various animation effects through configuration files or code. The implementation device can integrate the physics engine library, such as "physic.js", and use it as part of the dynamic effects engine to make the dynamic effects more realistic and realistic.
可选的,实现装置获取开发人员输入的动画效果配置文件;动画效果配置文件包括第二VUE代码;响应于封装指令,封装第二VUE代码,得到动画效果功能组件。Optionally, the implementation device obtains the animation effect configuration file input by the developer; the animation effect configuration file includes the second VUE code; in response to the encapsulation instruction, the second VUE code is encapsulated to obtain the animation effect functional component.
在实际应用中,实现装置可以创建一个名为"AnimationEngine"的轻量级动画引擎模块,用于管理动画的播放和渲染。在"AnimationEngine"中,实现对关键渲染路径的优化,使用requestAnimationFrame进行渲染,支持硬件加速等技术,提高动画的性能和流畅度。实现装置创建一个名为"AnimationOptimizer"的模块,用于优化动画曲线。在该模块中,实现算法来平滑和自然化动画曲线,去除抖动、停顿或过度振荡等不良效果。In actual applications, the implementation device can create a lightweight animation engine module named "AnimationEngine" to manage the playback and rendering of animations. In "AnimationEngine", we optimize the key rendering path, use requestAnimationFrame for rendering, and support technologies such as hardware acceleration to improve the performance and fluency of animation. The implementation device creates a module called "AnimationOptimizer" for optimizing animation curves. In this module, algorithms are implemented to smooth and naturalize animation curves and remove undesirable effects such as jitter, stuttering, or excessive oscillation.
可选的,实现装置获取开发人员输入的动画优化配置文件;动画优化配置文件包括第三VUE代码;响应于封装指令,封装第三VUE代码,得到动画优化功能组件。Optionally, the implementation device obtains the animation optimization configuration file input by the developer; the animation optimization configuration file includes the third VUE code; in response to the encapsulation instruction, the third VUE code is encapsulated to obtain the animation optimization functional component.
在实际应用中,实现装置可以创建一个名为"TransitionOptimizer"的模块,用于自动合并和优化过渡效果。在"TransitionOptimizer"中,实现算法来减少重绘和重排的次数,提高性能,同时保持过渡效果的混合效果。实现装置通过"TransitionOptimizer"模块来优化响应式过渡,并模拟现实交互行为的过渡效果。实现装置可以整合支持3D动态效果的库,如"three.js",将其作为VueMotion库的一部分。在VueMotion库中提供用于创建和处理3D动态效果的组件或指令。In practical applications, the implementation device can create a module called "TransitionOptimizer" for automatically merging and optimizing transition effects. In "TransitionOptimizer", implement algorithms to reduce the number of redraws and reflows, improving performance while maintaining the blending effect of transition effects. The implementation device uses the "TransitionOptimizer" module to optimize responsive transitions and simulate the transition effects of real-life interaction behaviors. Implementation devices can integrate libraries that support 3D dynamic effects, such as "three.js", as part of the VueMotion library. The VueMotion library provides components or instructions for creating and processing 3D dynamic effects.
可选的,实现装置获取开发人员输入的过渡效果配置文件;过渡效果配置文件包括第四VUE代码;响应于封装指令,封装第四VUE代码,得到过渡效果功能组件。Optionally, the implementation device obtains the transition effect configuration file input by the developer; the transition effect configuration file includes the fourth VUE code; in response to the encapsulation instruction, the fourth VUE code is encapsulated to obtain the transition effect functional component.
在实际应用中,实现装置可以在"src"文件夹中创建一个文件,例如"transitionOptimizer.js",用于合并和优化过渡效果的算法。实现装置在"transitionOptimizer.js"文件中,定义一个单例对象,用于自动合并和优化过渡效果。In actual applications, the implementation can create a file in the "src" folder, such as "transitionOptimizer.js", for merging and optimizing algorithms for transition effects. The implementation is implemented in the "transitionOptimizer.js" file, defining a singleton object for automatically merging and optimizing transition effects.
可选的,第一VUE代码包括动态效果的第一配置参数,第一配置参数包括动态效果的持续时间、旋转角度、缩放比例;第二VUE代码包括动画效果的第二配置参数,第二配置参数包括动画效果的渲染方式、播放方式;第三VUE代码包括动画优化的第三配置参数,第三配置参数包括动画优化的动画曲线调整方式;第四VUE代码包括过渡效果的第四配置参数,第四配置参数包括过渡效果的颜色变化、大小变化。Optionally, the first VUE code includes the first configuration parameters of the dynamic effect, and the first configuration parameters include the duration, rotation angle, and scaling ratio of the dynamic effect; the second VUE code includes the second configuration parameters of the animation effect, and the second configuration parameter The parameters include the rendering method and playback method of the animation effect; the third VUE code includes the third configuration parameter of animation optimization, and the third configuration parameter includes the animation curve adjustment method of animation optimization; the fourth VUE code includes the fourth configuration parameter of the transition effect, The fourth configuration parameter includes color changes and size changes of the transition effect.
S304、将开发完成的组件存放在组件文件夹中。S304. Store the developed component in the component folder.
作为一种可能的实现方式,响应于开发人员的封装指令,实现装置将开发完成的组件存放在组件文件夹中。As a possible implementation manner, in response to the developer's packaging instruction, the implementation device stores the developed component in the component folder.
示例性的,开发人员可以创建名为"VueMotion"的Vue组件或指令,用于将核心模块的功能暴露给开发者使用。在"VueMotion"组件或指令中,提供适当的属性和事件接口,以便开发者可以配置和控制动态效果的行为,包括配置高度个性化的动画效果、启用物理引擎、设置动画曲线等。在组件或指令中,使用前面提到的动画引擎和优化器模块,确保动画的播放和渲染以及过渡的合并和优化功能。For example, developers can create a Vue component or directive named "VueMotion" to expose the functions of the core module to developers. In the "VueMotion" component or directive, provide appropriate properties and event interfaces so that developers can configure and control the behavior of dynamic effects, including configuring highly personalized animation effects, enabling physics engines, setting animation curves, etc. In components or directives, use the previously mentioned animation engine and optimizer modules to ensure the playback and rendering of animations and the merging and optimization of transitions.
在"src"文件夹中创建一个文件,例如"VueMotion.vue",用于封装Vue组件或指令。Create a file in the "src" folder, such as "VueMotion.vue", to encapsulate Vue components or instructions.
在"VueMotion.vue"文件中,使用上述动态效果引擎、动画引擎等,定义Vue组件或指令的行为和功能。In the "VueMotion.vue" file, use the above dynamic effects engine, animation engine, etc. to define the behavior and functions of Vue components or instructions.
提供适当的属性和事件接口,以便开发者可以配置和控制动态效果的行为。Provides appropriate property and event interfaces so that developers can configure and control the behavior of dynamic effects.
S305、在数据动态效果项目开发完成后,至少将数据动态效果项目中的组件打包并发布,以得到能够供前端用户下载使用的数据动态效果组件库。S305. After the development of the data dynamic effect project is completed, at least package and publish the components in the data dynamic effect project to obtain a data dynamic effect component library that can be downloaded and used by front-end users.
作为一种可能的实现方式,实现装置使用Vue CLI或其他构建工具,将源代码构建为库文件。进一步的,实现装置将构建后的库文件放置在"dist"文件夹中,以便其他开发者可以通过CDN或npm安装使用。As a possible implementation method, the implementation device uses Vue CLI or other build tools to build the source code into a library file. Furthermore, the implementation device places the built library files in the "dist" folder so that other developers can install and use them through CDN or npm.
一些实施例中,为了方便开发人员的使用,实现装置可以在"examples"文件夹中,创建演示页面,展示VueMotion库的各种功能和用法,包括高度个性化的动画效果、物理引擎的应用、响应式过渡和3D动态效果等。编写详细的文档,介绍VueMotion库的特性、API和示例代码,以便其他开发者能够理解和使用该库。In some embodiments, in order to facilitate developers' use, the implementation device can create a demonstration page in the "examples" folder to demonstrate various functions and usages of the VueMotion library, including highly personalized animation effects, physics engine applications, Responsive transitions and 3D dynamic effects, etc. Write detailed documentation to introduce the features, API and sample code of the VueMotion library so that other developers can understand and use the library.
图4示出了封装VueMotion库的流程,包括项目确定、创建Vue插件、实现基础组件、设计应用程序编程接口(Application Programming Interface,API)、功能实现、构建和打包、编写文档和示例、测试和修复。通过上述流程,可以成功封装VueMotion库,以供开发人员在前端开发时使用。Figure 4 shows the process of encapsulating the VueMotion library, including project determination, creating Vue plug-ins, implementing basic components, designing application programming interfaces (Application Programming Interface, API), function implementation, building and packaging, writing documents and examples, testing and repair. Through the above process, the VueMotion library can be successfully encapsulated for developers to use in front-end development.
上述实施例主要从装置(设备)的角度对本申请实施例提供的方案进行了介绍。可以理解的是,为了实现上述方法,装置或设备包含了执行各个方法流程相应的硬件结构和/或软件模块,这些执行各个方法流程相应的硬件结构和/或软件模块可以构成一个物料信息的确定装置。本领域技术人员应该很容易意识到,结合本文中所发明的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The above embodiments mainly introduce the solutions provided by the embodiments of the present application from the perspective of devices (equipment). It can be understood that in order to implement the above method, the device or equipment includes hardware structures and/or software modules corresponding to the execution of each method flow. These hardware structures and/or software modules corresponding to the execution of each method flow can constitute a determination of material information. device. Persons skilled in the art should readily appreciate that, in conjunction with the algorithm steps of each example described in the embodiments of the invention herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对装置或设备进行功能模块的划分,例如,装置或设备可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。Embodiments of the present application can divide the device or equipment into functional modules according to the above method examples. For example, the device or equipment can be divided into functional modules corresponding to each function, or two or more functions can be integrated into one processing module. . The above integrated modules can be implemented in the form of hardware or software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. In actual implementation, there may be other division methods.
图5是根据一示例性实施例示出的实现装置的结构示意图。参照图5所示,本申请实施例提供的实现装置40包括处理单元401、确定单元402以及显示单元403。Figure 5 is a schematic structural diagram of an implementation device according to an exemplary embodiment. Referring to FIG. 5 , the implementation device 40 provided by the embodiment of the present application includes a processing unit 401, a determining unit 402, and a display unit 403.
处理单元401,用于响应于用户在前端数据开发页面的目标VUE插件安装操作,安装目标VUE插件,并在前端数据开发页面激活目标VUE插件对应的数据动态效果组件库;数据动态效果组件库包括多个动态效果功能组件;一个动态效果功能组件对应一个动态效果参数;确定单元,用于响应于用户在目标VUE插件中输入的动态效果指令,确定动态效果指令的输入参数;显示单元,用于确定与输入参数相同的目标动态效果参数,并显示目标动态效果参数对应的目标动态效果。The processing unit 401 is configured to respond to the user's target VUE plug-in installation operation on the front-end data development page, install the target VUE plug-in, and activate the data dynamic effect component library corresponding to the target VUE plug-in on the front-end data development page; the data dynamic effect component library includes Multiple dynamic effect function components; one dynamic effect function component corresponds to one dynamic effect parameter; a determination unit is used to determine the input parameters of the dynamic effect instruction in response to the dynamic effect instruction input by the user in the target VUE plug-in; a display unit is used to Determine the target dynamic effect parameters that are the same as the input parameters, and display the target dynamic effect corresponding to the target dynamic effect parameters.
可选的,处理单元401还用于:创建数据动态效果项目的目录结构,目录结构中设置有组件文件夹;根据数据动态效果项目的展示需求,将需要开发的组件至少拆分为动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件;使用VUE开发动态效果功能组件、动画效果功能组件、动画优化功能组件、过渡效果功能组件;将开发完成的组件存放在组件文件夹中;在数据动态效果项目开发完成后,至少将数据动态效果项目中的组件打包并发布,以得到能够供前端用户下载使用的数据动态效果组件库。Optionally, the processing unit 401 is also used to: create a directory structure of the data dynamic effect project, with component folders set in the directory structure; and split the components that need to be developed into at least dynamic effect functions according to the display requirements of the data dynamic effect project. Components, animation effect functional components, animation optimization functional components, and transition effect functional components; use VUE to develop dynamic effect functional components, animation effect functional components, animation optimization functional components, and transition effect functional components; store the developed components in the component folder Medium; After the development of the data dynamic effects project is completed, at least the components in the data dynamic effects project will be packaged and released to obtain a data dynamic effects component library that can be downloaded and used by front-end users.
可选的,处理单元401,具体用于:获取开发人员输入的动态效果配置文件;动态效果配置文件包括第一VUE代码;响应于封装指令,封装第一VUE代码,得到动态效果功能组件;获取开发人员输入的动画效果配置文件;动画效果配置文件包括第二VUE代码;响应于封装指令,封装第二VUE代码,得到动画效果功能组件;获取开发人员输入的动画优化配置文件;动画优化配置文件包括第三VUE代码;响应于封装指令,封装第三VUE代码,得到动画优化功能组件;获取开发人员输入的过渡效果配置文件;过渡效果配置文件包括第四VUE代码;响应于封装指令,封装第四VUE代码,得到过渡效果功能组件。Optionally, the processing unit 401 is specifically configured to: obtain the dynamic effect configuration file input by the developer; the dynamic effect configuration file includes the first VUE code; respond to the encapsulation instruction, encapsulate the first VUE code to obtain the dynamic effect function component; obtain The animation effect configuration file input by the developer; the animation effect configuration file includes the second VUE code; in response to the encapsulation instruction, the second VUE code is encapsulated to obtain the animation effect functional component; the animation optimization configuration file input by the developer is obtained; the animation optimization configuration file Includes the third VUE code; in response to the encapsulation instruction, encapsulates the third VUE code to obtain the animation optimization functional component; obtains the transition effect configuration file input by the developer; the transition effect configuration file includes the fourth VUE code; in response to the encapsulation instruction, encapsulates the third VUE code Four VUE codes to get the transition effect functional component.
可选的,第一VUE代码包括动态效果的第一配置参数,第一配置参数包括动态效果的持续时间、旋转角度、缩放比例;第二VUE代码包括动画效果的第二配置参数,第二配置参数包括动画效果的渲染方式、播放方式;第三VUE代码包括动画优化的第三配置参数,第三配置参数包括动画优化的动画曲线调整方式;第四VUE代码包括过渡效果的第四配置参数,第四配置参数包括过渡效果的颜色变化、大小变化。Optionally, the first VUE code includes the first configuration parameters of the dynamic effect, and the first configuration parameters include the duration, rotation angle, and scaling ratio of the dynamic effect; the second VUE code includes the second configuration parameters of the animation effect, and the second configuration parameter The parameters include the rendering method and playback method of the animation effect; the third VUE code includes the third configuration parameter of animation optimization, and the third configuration parameter includes the animation curve adjustment method of animation optimization; the fourth VUE code includes the fourth configuration parameter of the transition effect, The fourth configuration parameter includes color changes and size changes of the transition effect.
图6是本申请提供的一种电子设备的结构示意图。如图6,该电子设备50可以包括至少一个处理器501以及用于存储处理器可执行指令的存储器502其中,处理器501被配置为执行存储器502中的指令,以实现上述实施例中的数据动态效果的实现方法。Figure 6 is a schematic structural diagram of an electronic device provided by this application. As shown in Figure 6, the electronic device 50 may include at least one processor 501 and a memory 502 for storing instructions executable by the processor. The processor 501 is configured to execute instructions in the memory 502 to implement the data in the above embodiments. How to achieve dynamic effects.
另外,电子设备50还可以包括通信总线503以及至少一个通信接口504。In addition, the electronic device 50 may also include a communication bus 503 and at least one communication interface 504.
处理器501可以是一个处理器(central processing units,CPU),微处理单元,ASIC,或一个或多个用于控制本申请方案程序执行的集成电路。The processor 501 may be a central processing unit (CPU), a microprocessing unit, an ASIC, or one or more integrated circuits used to control the execution of the program of the present application.
通信总线503可包括一通路,在上述组件之间传送信息。Communication bus 503 may include a path that carries information between the above-mentioned components.
通信接口504,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local areanetworks,WLAN)等。The communication interface 504 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, wireless access network (radio access network, RAN), wireless local area networks (WLAN), etc.
存储器502可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electricallyerasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器501相连接。存储器也可以和处理器501集成在一起。The memory 502 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory (RAM)) or other type that can store information and instructions. The dynamic storage device can also be electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, optical disc storage ( Including compressed optical discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be stored by a computer. any other medium, but not limited to this. The memory may exist independently and be connected to the processor 501 through a bus. Memory may also be integrated with processor 501.
其中,存储器502用于存储执行本申请方案的指令,并由处理器501来控制执行。处理器501用于执行存储器502中存储的指令,从而实现本申请方法中的功能。Among them, the memory 502 is used to store instructions for executing the solution of the present application, and the processor 501 controls the execution. The processor 501 is used to execute instructions stored in the memory 502 to implement the functions in the method of the present application.
作为一个示例,结合图5,实现装置40中的处理单元401、确定单元402以及显示单元403实现的功能与图6中的处理器501的功能相同。As an example, with reference to FIG. 5 , the functions implemented by the processing unit 401 , the determining unit 402 and the display unit 403 in the device 40 are the same as those of the processor 501 in FIG. 6 .
在具体实现中,作为一种实施例,处理器501可以包括一个或多个CPU,例如图6中的CPU0和CPU1。In specific implementation, as an embodiment, the processor 501 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 6 .
在具体实现中,作为一种实施例,电子设备50可以包括多个处理器,例如图6中的处理器501和处理器507。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In specific implementation, as an embodiment, the electronic device 50 may include multiple processors, such as the processor 501 and the processor 507 in FIG. 6 . Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor here may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).
在具体实现中,作为一种实施例,电子设备50还可以包括输出设备505和输入设备506。输出设备505和处理器501通信,可以以多种方式来显示信息。例如,输出设备505可以是液晶显示器(liquid crystal display,LCD),发光二级管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备506和处理器501通信,可以以多种方式接受用户对象的输入。例如,输入设备506可以是鼠标、键盘、触摸屏设备或传感设备等。In specific implementation, as an embodiment, the electronic device 50 may also include an output device 505 and an input device 506. Output device 505 communicates with processor 501 and can display information in a variety of ways. For example, the output device 505 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. wait. Input device 506 communicates with processor 501 and can accept input from user objects in a variety of ways. For example, the input device 506 may be a mouse, a keyboard, a touch screen device, a sensing device, or the like.
本领域技术人员可以理解,图6中示出的结构并不构成对电子设备50的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。Those skilled in the art can understand that the structure shown in FIG. 6 does not constitute a limitation on the electronic device 50, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
另外,本申请还提供一种计算机可读存储介质,当计算机可读存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行如上述实施例所提供的数据动态效果的实现方法。In addition, the present application also provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device can execute the method for realizing the data dynamic effect provided in the above embodiments. .
另外,本申请还提供一种计算机程序产品,包括计算机指令,当计算机指令在电子设备上运行时,使得电子设备执行如上述实施例所提供的数据动态效果的实现方法。In addition, this application also provides a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device causes the electronic device to execute the method for realizing the dynamic effect of data provided in the above embodiments.
本领域技术人员在考虑说明书及实践这里发明的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未发明的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由权利要求指出。Other embodiments of the present application will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary technical means in the technical field not invented by this application. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311686594.1A CN117724715A (en) | 2023-12-08 | 2023-12-08 | Methods, devices, electronic equipment and storage media for realizing data dynamic effects |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311686594.1A CN117724715A (en) | 2023-12-08 | 2023-12-08 | Methods, devices, electronic equipment and storage media for realizing data dynamic effects |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117724715A true CN117724715A (en) | 2024-03-19 |
Family
ID=90199136
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311686594.1A Pending CN117724715A (en) | 2023-12-08 | 2023-12-08 | Methods, devices, electronic equipment and storage media for realizing data dynamic effects |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117724715A (en) |
-
2023
- 2023-12-08 CN CN202311686594.1A patent/CN117724715A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| ES2991807T3 (en) | Stateful model-based micro frontends | |
| CN108292231B (en) | Method and system for generating applications from data | |
| US9824473B2 (en) | Cross-platform data visualizations using common descriptions | |
| CN105593813B (en) | A rendering interpreter for visualizing data served from constrained environment containers | |
| CN108351765B (en) | Method, system and computer storage medium for generating applications | |
| US9122658B2 (en) | Webpage display system leveraging OSGi | |
| WO2014028655A1 (en) | User interface control framework for stamping out controls using a declarative template | |
| WO2018228211A1 (en) | Application conversion method, apparatus and device | |
| JP5244826B2 (en) | Separation, management and communication using user interface elements | |
| CN114510231A (en) | Application construction method, device, equipment and computer readable storage medium | |
| KR20130086138A (en) | Cross-platform application framework | |
| CN111324833A (en) | Page display method, device, electronic design and computer readable medium | |
| CN112955865B (en) | Static coordination of the application view hierarchy | |
| US20230169138A1 (en) | Rendering primitive child elements corresponding to child components of a user interface without instantiating the child components | |
| CA2686367A1 (en) | Dynamic native editor code view facade | |
| CN115248680A (en) | Software construction method, system, apparatus, medium and program product | |
| KR102644170B1 (en) | Method for assisting select of screen components and collect of coordinate information | |
| CN117724715A (en) | Methods, devices, electronic equipment and storage media for realizing data dynamic effects | |
| CN113741891B (en) | Page processing method, device, electronic device and storage medium | |
| CN116166251A (en) | Media file display method and device, media and electronic equipment | |
| Shackles | Mobile Development with C | |
| Yosifovich | Windows Presentation Foundation 4.5 Cookbook | |
| US20230059754A1 (en) | Methods, apparatuses and systems for managing a multi-tenant application system | |
| CN105183491A (en) | Cross-platform desktop GIS and starting method thereof | |
| CN114780082A (en) | Component management method, device, electronic device and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |