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

谷歌建站做视频网站需要多大带宽

谷歌建站,做视频网站需要多大带宽,如何修改wordpress的登录,安徽六安市地图位置1.Vue.extend(options) 参数: {Object} options用法#xff1a; 使用基础Vue构造器#xff0c;创建一个子类。参数是一个包含组件选项的对象。 data选项是特例#xff0c;需要注意#xff0c;在Vue.extend()中它必须是函数。 htmlheadtit…1.Vue.extend(options) 参数: {Object} options用法 使用基础Vue构造器创建一个子类。参数是一个包含组件选项的对象。 data选项是特例需要注意在Vue.extend()中它必须是函数。 htmlheadtitleVue.extend 用法/titlescript srchttps://cdn.jsdelivr.net/npm/vue/dist/vue.js/script/headbodydiv idmount-point/divscript// 创建构造器var Profile Vue.extend({template: p{{firstName}} {{lastName}} aka {{alias}}/p,data: function () {return {firstName: Walter,lastName: White,alias: Heisenberg}}})// 创建 Profile 实例并挂载到一个元素上。new Profile().$mount(#mount-point)/script/body /html结果显示如下 可以看到extend 创建的是 Vue 构造器而不是我们平时常写的组件实例所以不可以通过 new Vue({ components: testExtend }) 来直接使用需要通过 new Profile().$mount(’#mount-point’) 来挂载到指定的元素上。 我个人的理解来看extend提供了一个能够构造组件的函数也就是构造器。在一些特定的应用场景如自己构建一个复杂弹窗下我们使用这种函数式的构造组件的方法会更灵活一些。 2.Vue.extend实现加载效果 htmlheadtitleVue.extend 用法2/titlescript srchttps://cdn.jsdelivr.net/npm/vue/dist/vue.js/scriptstyle#loading-wrapper {position: fixed;top: 0;left: 0;display: flex;justify-content: center;align-items: center;width: 100%;height: 100%;background: rgba(0,0,0,.7);color: #fff;}/style/headbodydiv idrootbutton clickshowLoading显示Loading/button/divscriptfunction Loading(msg) {const LoadingComponent Vue.extend({template: div idloading-wrapper{{msg}}/div,props: {msg: {type: String,default: msg}},name: LoadingComponent})const div document.createElement(div)div.setAttribute(id, loading-wrapper)document.body.append(div)new LoadingComponent().$mount(#loading-wrapper)return () {document.body.removeChild(document.getElementById(loading-wrapper))}}Vue.prototype.$loading Loadingnew Vue({el: #root,methods: {showLoading() {const hide this.$loading(正在加载请稍等...)setTimeout(() {hide()}, 2000)}}})/script/body /html 3.Vue.extend()实现MessageBox弹窗 1新建一个messageBox.vue templatediv idconfirm v-ifflagdiv classcontents div classcontent-top{{text.title}}/divdiv classcontent-center{{text.msg}}/divdiv classcontent-bottombutton typeprimary clickok classleft{{text.btn.ok}}/buttonbutton typeinfo clickno classright{{text.btn.no}}/button/div/div/div /templatescript export default {data () {return {flag:true,text:{title:标题,msg:这是一个弹出框组件,btn:{ok:确定,no:取消}}}},methods: {ok(){this.flagfalse;},no(){this.flagfalse;}} } /scriptstyle scoped#confirm{position:fixed;left:0;top:0;right:0;bottom:0;background:rgba(0,0,0,0.3); }.contents{width:250px;height:180px;border:1px solid #ccc;border-radius:10px;background-color:#fff;position:fixed;top:50%;left:50%;margin-top:-90px;margin-left:-125px; } .content-top{width:100%;height:40px;border-bottom:1px solid #ccc;text-align: center;font-size:20px;font-weight: 700;line-height:40px; } .content-center{width:90%;height:80px;margin:5px auto; } .content-bottom{width:85%;height:40px;margin:0 auto;/* border:1px solid red; */position:relative; } .left{position:absolute;left:0;width:40%; } .right{position:absolute;right:0;width:40%; } /style (2) 新建messageBox.js import Vue from vue import Confirm from ./MessageBox.vuelet confirmStructorVue.extend(Confirm) //返回一个实例创建的构造器但实例构造器需要进行挂载到页面中let theConfirmfunction(text){return new Promise((res,rej){ //返回一个promise进行异步操作成功时返回失败时返回let confirmDomnew confirmStructor({el:document.createElement(div)})//在body中动态创建一个div元素之后此div将会替换成整个vue文件的内容//此时的confirmDom通俗讲就是相当于是整个组件对象通过对象调用属性的方法来进行组件中数据的使用//可以通过$el属性来访问创建的组件实例document.body.appendChild(confirmDom.$el)//此时进行创建组件的逻辑处理confirmDom.texttext //将需要传入的文本内容传给组件实例confirmDom.ok(){ //箭头函数在和{}之间增加,且去掉functionres() //正确时返回的操作confirmDom.flagfalse;}confirmDom.no(){rej() //失败时返回的操作confirmDom.flagfalse;} }) }//将逻辑函数进行导出和暴露 export default theConfirm (3)mian.js引入挂载到全局 import Vue from vue; import store from ./store/index import App from ./App.vue; import router from ./router; import theConfirm from ./components/messageBox.js Vue.config.productionTip false;Vue.prototype.$MyconfirmtheConfirmnew Vue({router,store,render: h h(App), }).$mount(#app) (4)页面使用 this.$Myconfirm({title:标题,msg:内容,btn:{ ok:确定, no:取消}}).then((){console.log(ok)}).catch((){console.log(no)})(5)效果如下:
http://www.zqtcl.cn/news/143260/

相关文章:

  • 网站app生成器天河网站建设服务
  • 南京移动网站建设哪里强新网站建设都需要哪些
  • .net网站制作wordpress配置多语言包
  • 上海源码网站建设公司做短视频的网站都有哪些
  • 网络推广公司联系昔年下拉网络优化seo
  • 网站开发语言识别网站众筹该怎么做
  • 长春做网站公司长春seo公司云主机和云服务器的区别
  • 打开网站乱码怎么做网件路由器登陆网址
  • wordpress 怎么删除主题seo神马网站推广器
  • 番禺网站推广公司宣传片拍摄方案范本
  • 网站建设的公司收费建筑英才网app
  • 作风建设活动网站知名景观设计公司的官网
  • 网站的模块做网站的图片要多少像素
  • 网站建设需要什么书企信网企业信用信息系统贵州
  • 做网站是什么鬼新浪虚拟主机做网站
  • 青岛网站设计如何做注册网店需要多少费用
  • 空白网站怎么建立网站默认主页设置
  • wordpress外网访问不seo综合查询是什么
  • 曲阜网站建设价格做5173这样的网站要多少人
  • 深圳网站建设服务合同wordpress 增删改查
  • 网站建设好处wordpress评论积分
  • 珠海网站策划网站不能自行备案吗
  • 在vs中做网站如何连接数据库wordpress模板如何安装教程
  • 10g空间网站做视频网站手机网站搜索
  • 服务器上面建设网站网站为什么显示正在建设中
  • 德阳网站优化网络顾问
  • 大淘客可以做几个网站hm网上商城
  • 网站建设分配人员方案呼市网站制作招聘
  • 电商网站建设方案100例用什么做php网站
  • 网站开发设计课程教案南宁网站建设招聘