当前位置: 首页 > wzjs >正文

怎么发布个人网站网络域名综合查询

怎么发布个人网站,网络域名综合查询,福建网站优化建设,现在进入西安最新通知uni-app开发的页面跳转全局加载中首先需要下载插件创建加载中页面组件app.vue页面中监听跳转首先需要下载插件 https://ext.dcloud.net.cn/plugin?id20613 创建加载中页面组件 <!-- 全局自定义加载中 --> <template><view v-if"visible" class&qu…

uni-app开发的页面跳转全局加载中

    • 首先需要下载插件
    • 创建加载中页面组件
    • app.vue页面中监听跳转

首先需要下载插件

https://ext.dcloud.net.cn/plugin?id=20613

创建加载中页面组件

<!-- 全局自定义加载中 -->
<template><view v-if="visible" class="global-loading"><!-- 使用CSS实现加载动画,避免性能问题 --><xtf-loader6 style="margin-top: 30rpx;"></xtf-loader6><xtf-loader10 class="item" style="margin-top: 10rpx;"></xtf-loader10><text class="loading-text">{{ text }}</text></view>
</template><script>
export default {data() {return {visible: false,text: '加载中...'}},methods: {show(text) {this.text = text || '加载中...'this.visible = true},hide() {this.visible = false}}
}
</script><style scoped>
.global-loading {position: fixed;top: 0;left: 0;right: 0;bottom: 0;background: rgba(255, 255, 255, 1);display: flex;flex-direction: column;justify-content: center;align-items: center;z-index: 9999;
}.loading-spinner {display: flex;margin-bottom: 16px;
}.spinner-dot {width: 12px;height: 12px;margin: 0 6px;background-color: #007aff;border-radius: 100%;animation: spinner-bounce 1.4s infinite ease-in-out both;
}.spinner-dot:nth-child(1) {animation-delay: -0.32s;
}.spinner-dot:nth-child(2) {animation-delay: -0.16s;
}@keyframes spinner-bounce {0%, 80%, 100% { transform: scale(0);opacity: 0.5;} 40% { transform: scale(1);opacity: 1;}
}.loading-text {font-size: 14px;margin-top: 15px;color: #666;
}
</style>


这个就是那个插件里面的小组件,可以用在加载中进行显示,插件下载安装好后,就这样直接使用代码去调用,不用再多做别的配置。

app.vue页面中监听跳转

<template><view><global-loading ref="globalLoading"></global-loading><router-view /></view>
</template>
<script>import GlobalLoading from "@/components/loading/loading.vue"export default {onLaunch: function() {console.log('App Launch')// 初始化路由拦截this.setupRouterInterceptor()},onShow: function() {console.log('App Show')},onHide: function() {console.log('App Hide')},components: { GlobalLoading },methods:{showGlobalLoading(text) {this.$refs.globalLoading.show(text)},hideGlobalLoading() {this.$refs.globalLoading.hide()},setupRouterInterceptor() {const interceptorMethods = ['navigateTo','redirectTo','reLaunch','switchTab']interceptorMethods.forEach(method => {uni.addInterceptor(method, {invoke: (args) => {this.showGlobalLoading('加载中...')return args},success: () => {// 确保页面切换完成后再隐藏setTimeout(() => {this.hideGlobalLoading()}, 1500)},fail: (err) => {this.hideGlobalLoading()console.error('导航失败:', err)},complete: () => {// 兜底确保loading关闭setTimeout(() => {this.hideGlobalLoading()}, 2000)}})})},}}
</script><style>/*每个页面公共css */
</style>

这样就可以实现页面跳转的时候进行加载中显示了!!!

http://www.dtcms.com/wzjs/232509.html

相关文章:

  • win7做网站新闻网最新消息
  • 网站模板站的模板展示怎么做的福州seo顾问
  • ubuntu 做网站 分区个人网站注册平台
  • 推进网站建设引擎网站推广法
  • 专业做京东网站吗百度一下你就知道了官网
  • 网站赌博代理怎么做seo的方法
  • 怎么做关于梦想的网站免费的建站模板免费下载
  • 对网站设计的摘要网络推广员工作好做吗
  • 网站上怎么做返回主页链接西安seo服务培训
  • 优秀网站及网址关键词竞价广告
  • 网站门户建设十大跨界营销案例
  • 怎么做淘客网站建设企业营销型网站
  • 网站文章删除了怎么做404网络营销的盈利模式
  • 网站排名的英文什么叫优化关键词
  • 永久免费的ppt网站可免费投放广告的平台
  • 建设科技信息 网站建设网站优化+山东
  • 想给公司做个网站怎么做的网站seo重庆
  • 做app模板网站有哪些147seo工具
  • 纹身网站建设许昌seo公司
  • 上海袜网站建设广东seo教程
  • 网站建设改版方案ping站长工具
  • 朝阳区住房和城乡建设部网站seo成功的案例和分析
  • 济阳县建设局网站网上推广app怎么做
  • 怎样做打赏网站关键词分类
  • 温州多语言网站建设软文推广产品
  • 怎么建手机网站长春网站建设技术支持
  • 香港公司网站内地主机营销模式
  • 做的网站怎样适配手机哈尔滨百度推广公司
  • 一级建设造师网站苹果看国外新闻的app
  • 江苏住房城乡建设网站南京seo公司