Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

A Vue-based multi-tab instance caching method

A tab and caching technology, which is applied in the field of Vue-based multi-tab instance caching, can solve problems such as not being able to satisfy dynamic updates well, and achieve the effect of satisfying personalized experience and multiple possibilities

Active Publication Date: 2022-02-18
中邮消费金融有限公司
View PDF9 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This kind of Vue original plug-in can only realize the caching at the level of the tab component, and cannot well satisfy our dynamic update of the cache at the granularity of the tab component instance

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A Vue-based multi-tab instance caching method
  • A Vue-based multi-tab instance caching method
  • A Vue-based multi-tab instance caching method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] The technical scheme of the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, so that those skilled in the art can better understand the present invention and implement it, but the examples given are not intended to limit the present invention.

[0038] Such as Figure 1-3 As shown, the embodiment of the present invention provides a vue-based multi-tab instance caching method, including the following steps:

[0039] S1. In the keep-alive mechanism, use the abstract component to wrap the routing component, generate a unique key value according to the current routing configuration, and use the key value to mark each tab component instance, so that the abstract component is based on the unique The key value identifies the corresponding tab component instance;

[0040] S2. The abstract component includes a cache collection for caching tab component instances, a non-caching tab queue for stori...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The present invention relates to a method for caching multi-tab instances based on Vue. S1. Use the abstract component to wrap the routing component, and use the key value to mark each tab component instance; S2. The abstract component includes a cache set and does not cache Tab queue, cache tab queue; S3, initialize a global non-cached tab queue and a global cache tab queue; S4, trigger the rendering of the abstract component when the route changes, so as to obtain the currently rendered tab component, and then get The unique key value of the tab component instance; S5. According to the key value, the abstract component controls the tab component to re-render, or reads the tab component in the cache, thereby completing the opening of the tab, the switching of the tab, or the tab Close; thus realize the multi-tab caching solution at the granularity of the tab component instance.

Description

technical field [0001] The invention relates to the technical field of multi-tab webpage development, in particular to a Vue-based multi-tab instance caching method. Background technique [0002] Currently, in the field of WEB applications, more and more websites adopt the method of single-page application. In this way, users will not frequently switch browsing pages when visiting application pages. It simulates the traditional multi-page operation mode through multiple tabs, and dynamically rewrites the current page to interact with users. Reload the entire page, thus avoiding the performance waste caused by traditional multi-page reloading. The three popular SPA frameworks currently include React, Vue, and Angular. Vue has won the favor of many front-end developers because of its low learning cost, easy to use, and complete ecosystem. Combined with some popular Vue-based UI frameworks, a Vue SPA multi-tab WEB application can be quickly implemented. Users often switch ba...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/20
CPCG06F8/24
Inventor 孙娉娉吴锦旭龙逊敏
Owner 中邮消费金融有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products