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

做网站收录推广方案的内容有哪些

做网站收录,推广方案的内容有哪些,wordpress的导航菜单,北京网站优化外包公司经过几个小时的努力&#xff0c;终于实现了&#xff0c;根据组件名异常加载组件&#xff0c;直接上代码&#xff0c;网上的很多代码方都有坑&#xff0c;先贴出比较坑的代码&#xff1a; <template><view class"main"> <view class"tops"…

经过几个小时的努力,终于实现了,根据组件名异常加载组件,直接上代码,网上的很多代码方都有坑,先贴出比较坑的代码:

<template><view class="main">		<view class="tops"><view class="info"><view class="item"><view class="tit">姓名:</view><view class="txt">{{qyUser.name}}</view></view></view></view><view><component :is="dycomp" v-if="isShow"></component></view></view>
</template>
<script setup>
import {  ref, defineAsyncComponent,markRaw } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
import api from '../../api/api.js';
const qyUser = ref({});
//markRaw方法将组件对象标记为非响应式对象
//shallowRef代替ref来创建一个浅响应式对象
const dycomp = ref(null);
const isShow = ref(false);
onLoad(()=>{geQyUserInfo();loadAsyncComponent("mdIndex");	
});
const loadAsyncComponent = (componentName)=>{console.log(componentName);dycomp.value = defineAsyncComponent(() =>{import("../components/"+componentName+".vue");});isShow.value = true;}
const geQyUserInfo = ()=>{console.log(uni.getStorageSync("qyuserid"));api.geQyUserInfo({"qyuserid":uni.getStorageSync("qyuserid"),},(res)=>{qyUser.value = res.data.qyUser;	});
}
</script>
<style lang="scss" scoped>.main {background-color: #f5f6f8;width: 100%;height: 100vh;box-sizing: border-box;padding: 20rpx;.tops {background: #fff;border-radius: 20rpx;padding: 20rpx 20rpx 10rpx;.title {margin-bottom: 25rpx;border-left: 6rpx solid #1296db;padding-left: 10rpx;}.info {.item {display: flex;align-items: center;font-size: 26rpx;margin-bottom: 10rpx;.tit {flex: 1;color: #666;}.txt {flex: 4;}}}}}
</style>

最后优化后成功异步加载组件的代码:

<template><view class="main">		<view class="tops"><view class="info"><view class="item"><view class="tit">姓名:</view><view class="txt">{{qyUser.name}}</view></view></view></view><view><component :is="dycomp" v-if="isShow"></component></view></view>
</template>
<script setup>
import {  ref, defineAsyncComponent,markRaw,shallowRef } from 'vue';
import { onLoad } from "@dcloudio/uni-app";
import api from '../../api/api.js';
const qyUser = ref({});
//markRaw方法将组件对象标记为非响应式对象
//shallowRef代替ref来创建一个浅响应式对象
const dycomp = shallowRef(null);
const isShow = ref(false);
onLoad(()=>{geQyUserInfo();});
const loadAsyncComponent = (componentName)=>{console.log(componentName);dycomp.value = defineAsyncComponent({loader: () => import("../../components/"+componentName+".vue"),delay: 200,timeout: 3000});isShow.value = true;}
const geQyUserInfo = ()=>{api.geQyUserInfo({"qyuserid":uni.getStorageSync("qyuserid"),},(res)=>{qyUser.value = res.data.qyUser;loadAsyncComponent("mdIndex");});
}
</script>
<style lang="scss" scoped>.main {background-color: #f5f6f8;width: 100%;height: 100vh;box-sizing: border-box;padding: 20rpx;.tops {background: #fff;border-radius: 20rpx;padding: 20rpx 20rpx 10rpx;.title {margin-bottom: 25rpx;border-left: 6rpx solid #1296db;padding-left: 10rpx;}.info {.item {display: flex;align-items: center;font-size: 26rpx;margin-bottom: 10rpx;.tit {flex: 1;color: #666;}.txt {flex: 4;}}}}}
</style>
http://www.ds6.com.cn/news/111413.html

相关文章:

  • 楚雄网站开发cx189全球网站排行榜
  • 北京网站设计价格软文广告的案例
  • 长沙电子商务网站建设游戏推广员平台
  • 深圳定制建设网站app广告投放价格表
  • 社会信用体系建设网站采集站seo提高收录
  • 武汉 开发 公司 网站建设网站seo报价
  • 西安制作网站公司关键词优化价格
  • 政府网站建设合同.doc网店运营推广平台
  • 网站模版更新公告今日十大头条新闻
  • 武汉做网站选华企加速器重庆网站推广软件
  • 建设论坛网站创建网站的流程
  • 网站图片水印东营优化路网
  • 网站排名数据武汉百度推广公司
  • wordpress短信宝天津seo外包平台
  • 遵义做网站的百度搜索页
  • 做设计的有什么网站知识搜索引擎
  • 政府门户网站建设任务百度贴吧网页入口
  • tk网站免费上海网站seo外包
  • 如何建设一个社交网站奖券世界推广网站
  • 网站建设价格热线网站建设费用多少钱
  • 武汉网站建设网站推广花西子网络营销案例分析
  • 鼠标放上去图片放大的网站全国各城市感染高峰进度查询
  • 优质网站建设报价优化方案官网
  • 商家网站建设模板淘宝客推广平台
  • 静态网站分页网推公司干什么的
  • 网站制作公司扬州百度seo
  • 工程师报考网站谷歌网站
  • 无聊网站建设seo网络培训学校
  • 怎样免费推广自己的网站青岛做网站的公司哪家好
  • 网站编辑工作免费域名注册查询