上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 25 下一页

2025年2月5日

transition appear

摘要: <template> <div @click="flag = !flag">switch</div> <transition appear appear-from-class="from" appear-active-class="active" appear-to-class="to"> <div 阅读全文

posted @ 2025-02-05 15:26 ChoZ 阅读(35) 评论(0) 推荐(0)

transition生命周期配合gsap

摘要: <template> <div @click="flag = !flag">switch</div> <transition name="fade" @before-enter="beforeEnter" @enter="enter" @after-enter="afterEnter" @enter 阅读全文

posted @ 2025-02-05 15:14 ChoZ 阅读(38) 评论(0) 推荐(0)

transition配合animate.js

摘要: <template> <div @click="flag = !flag">switch</div> 不根据name来设置动画效果,指定自定义的class名 <transition :duration="{ enter: 1000, leave: 5000 }" enter-active-class 阅读全文

posted @ 2025-02-05 13:44 ChoZ 阅读(27) 评论(0) 推荐(0)

transition

摘要: <template> <div @click="flag = !flag">switch</div> <transition name="fade"> <div v-if="flag" class="box">Hello World</div> </transition> </template> < 阅读全文

posted @ 2025-02-05 13:07 ChoZ 阅读(44) 评论(0) 推荐(0)

2025年2月4日

keepAlive

摘要: <template> include是指缓存的组件,如果不写,则所有组件都会被缓存 exclude是指不缓存的组件,如果不写,则所有组件都会被缓存 <keep-alive include="A"> <A v-if="showA" /> <B v-else /> </keep-alive> <butt 阅读全文

posted @ 2025-02-04 22:49 ChoZ 阅读(25) 评论(0) 推荐(0)

teleport

摘要: <template> <div class="warp"> // body是指将teleport组件挂载到body上,to可以写元素名/类名/ID名 <teleport to='body'> <TeleportComponent /> </teleport> </div> </template> < 阅读全文

posted @ 2025-02-04 22:23 ChoZ 阅读(36) 评论(0) 推荐(0)

异步组件defineAsyncComponent - 骨架屏

摘要: <template> 实现骨架屏效果 <Suspense> <template #default> <sync /> </template> <template #fallback> <skeleton /> </template> </Suspense> </template> <script s 阅读全文

posted @ 2025-02-04 21:48 ChoZ 阅读(42) 评论(0) 推荐(0)

slot全家桶

摘要: <template> <SlotComponent> <!-- <template v-slot>123</template> --> <template #default>不同写法</template> <!-- <template v-slot:middle>456</template> --> 阅读全文

posted @ 2025-02-04 17:38 ChoZ 阅读(30) 评论(0) 推荐(0)

component的is写法优化

摘要: <template> <component :is='component'></component> </template> <script setup lang='ts'> import { ref, shallowRef } from 'vue' import A from './A.vue' 阅读全文

posted @ 2025-02-04 16:38 ChoZ 阅读(21) 评论(0) 推荐(0)

2025年2月2日

组件全局注册和递归调用

摘要: import { createApp } from 'vue' import './style.css' import App from './App.vue' import SelfComponent from './study/selfComponent/component.vue' const 阅读全文

posted @ 2025-02-02 20:09 ChoZ 阅读(35) 评论(0) 推荐(0)

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 25 下一页

导航