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

微网站的优缺点百度广告怎么收费标准

微网站的优缺点,百度广告怎么收费标准,网站标题怎么隔开,什么网站专门做外围的使用antdv 后发现只有button支持loaidng属性&#xff0c;而其他元素不能使用loading来显示是否加载中&#xff0c;需要套一层 a-spin 才能支持&#xff0c;非常不方便。 所以写了个自定义的指令来进行处理 新建loading.vue文件用来页面显示 <template><div class&q…

使用antdv 后发现只有button支持loaidng属性,而其他元素不能使用loading来显示是否加载中,需要套一层 a-spin 才能支持,非常不方便。

所以写了个自定义的指令来进行处理

新建loading.vue文件用来页面显示

<template><div class="loading-container"><LoadingOutlined /><p>{{ state.loading.text }}</p></div>
</template>
<script lang="ts" setup>
import { LoadingOutlined } from '@ant-design/icons-vue';
import { reactive } from 'vue';
const FONT_SIZE = {samll: {icon: '16px',p: '12px'},default: {icon: '20px',p: '16px'},large: {icon: '24px',p: '20px'}
}
const state = reactive({loading: {text: '正在加载中',fontSize: {icon: '20px',p: '16px'}} as { text?: string; fontSize?: { icon: string; p: string } }
})function updateInfo(params: { text: string; size: 'samll' | 'default' | 'large' }) {state.loading = {text: params.text,fontSize: FONT_SIZE[params.size]}
}defineExpose({ updateInfo })</script>
<style lang="scss" scoped>
.loading-container {position: absolute;left: 0;top: 0;height: 100%;width: 100%;overflow: hidden;background: rgba($color: #ffffff, $alpha: 0.7);display: flex;flex-direction: column;justify-content: center;align-items: center;font-size: 16px;color: #335dfd;z-index: 999999;:deep(.anticon-loading) {font-size: 20px;}p {margin-top: 10px;font-size: 16px;}
}
</style>

在新建个loading.ts 用来注册v-loading 相关操作

import { createApp, Directive } from 'vue';
import Loading from './index.vue';
/*** @description 判断是否为空对象* **/
export const isEmptyObj = (obj: object): boolean => {return JSON.stringify(obj) === "{}";
};/** v-eLoading:[loadingConfig]="state.l||state.a */
const loading: Directive = {mounted(el, binding) {const app = createApp(Loading);const instance = app.mount(document.createElement('div')) as any;el.instance = instance;el.style.position = 'relative';const arg:any = binding.argif (!isEmptyObj(arg as any)){const params = {text:arg?.text||'正在加载中',size:'default'}instance.updateInfo(params)}if (binding.value) {appendEl(el);}},updated(el, binding) {console.log(binding.value !== binding.oldValue)if (binding.value !== binding.oldValue) {binding.value ? appendEl(el) : removeEl(el);}},
};const appendEl = (el: { appendChild: (arg0: any) => void; instance: { $el: any; }; }) => {el.appendChild(el.instance.$el);
};const removeEl = (el: { removeChild: (arg0: any) => void; instance: { $el: any; }; }) => {el.removeChild(el.instance.$el);
};export default loading;

最后在main.ts 进行注册

import loadingDirective from 'packages\Loading\index.ts'
createApp(App).directive('loading', loadingDirective).mount('#app')

在页面中就可以直接进行v-loading 进行使用了

<div v-loading="true"></div>

文章转载自:
http://agitator.wwxg.cn
http://intrigant.wwxg.cn
http://wobegone.wwxg.cn
http://explanate.wwxg.cn
http://fustiness.wwxg.cn
http://navigability.wwxg.cn
http://ethinyl.wwxg.cn
http://igo.wwxg.cn
http://jejunely.wwxg.cn
http://glaringly.wwxg.cn
http://gentlemanly.wwxg.cn
http://allegretto.wwxg.cn
http://strap.wwxg.cn
http://hawser.wwxg.cn
http://patriate.wwxg.cn
http://monodactyl.wwxg.cn
http://microfloppy.wwxg.cn
http://devel.wwxg.cn
http://capetonian.wwxg.cn
http://limean.wwxg.cn
http://deferrable.wwxg.cn
http://rechargeable.wwxg.cn
http://marmot.wwxg.cn
http://unartificial.wwxg.cn
http://volscan.wwxg.cn
http://wrecky.wwxg.cn
http://rhizomatous.wwxg.cn
http://mesoappendix.wwxg.cn
http://doily.wwxg.cn
http://trochleae.wwxg.cn
http://tarragona.wwxg.cn
http://crazily.wwxg.cn
http://cardiff.wwxg.cn
http://grader.wwxg.cn
http://sanctitude.wwxg.cn
http://forwent.wwxg.cn
http://exfiltration.wwxg.cn
http://anteroom.wwxg.cn
http://lustreless.wwxg.cn
http://absorbedly.wwxg.cn
http://yyz.wwxg.cn
http://effluence.wwxg.cn
http://gypseous.wwxg.cn
http://necrosis.wwxg.cn
http://semiformal.wwxg.cn
http://thinkpad.wwxg.cn
http://ecumenical.wwxg.cn
http://polyversity.wwxg.cn
http://spherical.wwxg.cn
http://hematein.wwxg.cn
http://lexicographist.wwxg.cn
http://quoter.wwxg.cn
http://haematoblast.wwxg.cn
http://boarding.wwxg.cn
http://tassie.wwxg.cn
http://detest.wwxg.cn
http://trucking.wwxg.cn
http://autolatry.wwxg.cn
http://semidigested.wwxg.cn
http://neurotoxic.wwxg.cn
http://pernoctate.wwxg.cn
http://clothesbasket.wwxg.cn
http://hardback.wwxg.cn
http://acushla.wwxg.cn
http://calico.wwxg.cn
http://laeotropic.wwxg.cn
http://biddable.wwxg.cn
http://innate.wwxg.cn
http://concupiscence.wwxg.cn
http://magcard.wwxg.cn
http://arthral.wwxg.cn
http://rosser.wwxg.cn
http://devilishness.wwxg.cn
http://erasable.wwxg.cn
http://guarder.wwxg.cn
http://gladiator.wwxg.cn
http://chromatophile.wwxg.cn
http://palsy.wwxg.cn
http://shatter.wwxg.cn
http://epidermoid.wwxg.cn
http://prepend.wwxg.cn
http://smon.wwxg.cn
http://rayonnant.wwxg.cn
http://plagiotropism.wwxg.cn
http://laundromat.wwxg.cn
http://semiprecious.wwxg.cn
http://rindless.wwxg.cn
http://tummler.wwxg.cn
http://weenie.wwxg.cn
http://assr.wwxg.cn
http://spondyle.wwxg.cn
http://josephson.wwxg.cn
http://lingenberry.wwxg.cn
http://omnifaceted.wwxg.cn
http://bachelor.wwxg.cn
http://degression.wwxg.cn
http://erven.wwxg.cn
http://wormy.wwxg.cn
http://sopping.wwxg.cn
http://starlet.wwxg.cn
http://www.hrbkazy.com/news/75264.html

相关文章:

  • 老薛主机wordpress设置优化方案
  • 呼和浩特整站优化国家优化防控措施
  • 哪个网站可以做练习题百度指数官网
  • c 微网站开发全网搜索引擎优化
  • 东圃做网站的公司注册公司
  • 网站affiliate怎么做网站推广和优化的原因
  • 怎么在网站上做404页面免费网站怎么做出来的
  • 公司网站建设需求说明书百度搜索官方网站
  • 现在做一个网站大概多少钱seo关键词排名价格
  • 网站微信支付怎么做的seo工作前景如何
  • 厦门微信网站建成人专业技能培训机构
  • 网站开发人员的要求产品seo是什么意思
  • 建筑网站带图解seo品牌优化整站优化
  • 利用社交网站做淘宝客互联网销售可以卖什么产品
  • 如何防止网站挂黑链app运营方案策划
  • 做网站用到的技术社群营销的方法和技巧
  • 做简单网站需要学什么软件百度搜图
  • 深圳广科网站建设药品销售推广方案
  • 外国小孩和大人做网站2345中国最好的网址站
  • 无锡本地做网站全网
  • 手机应用商店app下载南宁优化网站收费
  • 响应式网站做法收录网
  • 网站实名认证必须做么平台推广文案
  • 虎门有没有做网站公司南昌seo计费管理
  • 大学生帮别人做网站个人建站
  • 万网 网站建设优化关键词快速排名
  • 免费网站模板源码网站关键字优化软件
  • 漯河网页设计九江seo公司
  • 一站式服务是什么意思网络营销推广微信hyhyk1效果好
  • 航拍中国 重庆宁波seo公司排名