0.1.20 • Published 2 years ago

xuanchengxmcachetabs v0.1.20

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

xuanchengxmcachetabs

Project setup

yarn install xuanchengxmcachetabs

How to use

正式环境 vue 库需要使用 https://img-bulky.xunmengvip.com/cdn/js/img-bulky.xunmengvip.com_cdn_js_vue.global_2.min.js

import "xuanchengxmcachetabs/dist/cacheTabs.css";
    const cacheFn = () => {
      return remf.value;
    };


<div style="margin-left:10px">
    <Cachetab
        key={this.route.path}
        cacheFn={async () => {
        return new Promise((resolve, reject) => {
            setTimeout(() => {
            resolve(this.cacheFn());
            }, 1);
        });
        }}
    />
 </div>

在使用 KeepAlive 的地方需要使用以下格式,特别是 ref

       <a-layout-content class="content">
       <router-view
           v-slots={{
           default: ({ Component, route }) => {
               return (
               <KeepAlive ref={"remf"}>
                   <Component
                   key={this.route.path}
                   fullPath={this.route.fullPath}
                   name={route.meta.cn}
                   />
               </KeepAlive>
               );
           },
           }}
       ></router-view>
       </a-layout-content>
0.1.20

2 years ago

0.1.18

2 years ago

0.1.17

2 years ago

0.1.16

2 years ago

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago