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

技术支持 沧州网站建设怎么建立企业网站

技术支持 沧州网站建设,怎么建立企业网站,2018年公司做网站注意事项,模仿建设网站是侵权吗1,指令作用 以v-开头,由vue提供的attribute,为渲染DOM应用提供特殊的响应式行为,也即是在表达式的值发生变化的时候响应式的更新DOM。其内容为可以被求值的js代码,可以写在return后面被返回的表达式。 指令的简写指令简…

1,指令作用

      以v-开头,由vue提供的attribute,为渲染DOM应用提供特殊的响应式行为,也即是在表达式的值发生变化的时候响应式的更新DOM。其内容为可以被求值的js代码,可以写在return后面被返回的表达式。

指令的简写
指令简写全写简写
v-bind

:id

<div v-bind:id="a"></div>

<div id:_"a"></div>
v-on@<div v-on:click="a"></div><div @:click="a"></div>
v-slot#

2,组件是UI重用和组合的基本单位

3,DOM内嵌模板使用时候,名字用小写,即时写为大写,浏览器也会强制为小写,。

4,要在组件中使用响应式,需要使用setup()函数中定义并返回,返回的值在模板中可以使用

     setup是一个专门用于组合式api的特殊的钩子函数。在选项式中没有。

 这个函数是组合式API的入口。

    4.1创建响应式的方法

                使用reactive()函数来创建响应式对象或者数组

    4.2 使用相应式的方法

                使用setup()函数,setup函数没有对组件实例的访问权限,也即是说使用this会报错

   4.3 可以使用标签属setup来简化代码

    4.4有三种不同的响应式的编程方法。使用标签setup最简单。

   4.5 使用场景

          4.5.1 非单文件组件中使用组合式api

          4.5.2 基于选相识api中调用组合式api

4.6 setup函数的两个参数

No.名称
1Props

响应式组件,但是解构的话会失去响应性,请使用props.xxx的形式访问

props'{

title;String

},

setup(props){

console.log(props.title)

}

2context

上下文

有如下内容(attrs,slots,emit,expose)

3,expose

控制该组件可以暴露那些属性

expose();让组件处于关闭状态,不向父组件暴露任何对象

expose({count;publiccount});有选择的向父组件暴露局部状态

4

可以和渲染函数一起使用

return () => h(div,count.value)

5,vue的生命周期

     作用:可以在特定阶段运行自己写的代码

     构成(最常用): 

调用顺序名称被调用阶段作用其他

1

beforeCreate组件实例初始化后data和computed处理之前
2created响应式数据,计算属性,方法,侦听器设置完成后挂在未开始,$el不可用
3beforeMount组件被挂载之前wei创建DOM节点
mounted挂载之后被调用

・所有同步子组件被挂载

・dom树创建完成并插入父容器

5beforeupdate响应式状态影变更,但未更新dom树之前在更新dom树之前访问dom树状态
6updated组件更新dom树后禁止在这个函数中更新组件状态,易早成无限更新循环
7beforeUnmount组件被卸载前调用被调用时候,组件实例还具有全部功能
8unmounted组件实例被卸载后

・所有子组件被卸载

・所有响应式作用停止

6,响应式核心API函数

         6.1 响应式函数工具

No函数名作用
1ref()

响应式,可以更改

这个对象只有一个属性值value

2computed()返回一个只读的响应式ref对象
3reactive()返回一个对象的响应式代理
4,watch()

侦听一个或者多个响应式数据源

参数1;一个函数,一个返回值

            一个ref

参数2;回调函数

参数3;对象

         6.2 工具函数

                ifref,unref,toRef,isreactive

       6.3 组合式的依赖注入

               6.3.1 provide 提供一个值可以被后代组件注入(在setup阶段同步调用

                     参数1   注入的key

                   参宿2     要注入的值

               6.3.2  inject()

                      注入一个父组件提供的值

                     参数1   注入的key ,在父组件中去寻找key,匹配相应的值。

                     参数2    可选  

                    参数3     如果2为一个函数,那么参数3必须设定未false

7,选项式api

No类型名称作用返回其他
1状态类型data声明组件初始相应状态js对象

this.$data.a

this.a

都一个访问

2props需要显示声明
3computed组件实例上暴露的计算属性
4methond声明要混入到组件实例中的方法。避免使用箭头函数,因为不可以通过this访问实例
5watch设定数据在变更时调用的侦听回调避免使用箭头函数,因为不可以通过this访问实例
6emits声明有组件触发的时间
1渲染选项template声明组件的字符串模板
2render用编程式组件虚拟dom树的函数
3compileroptions用于配置模板运行时候的编译器选项
1组合选项provide被后代组件注入的值
2inject声明通过从上层提供方匹配并注入当前组件的属性
3mixins一个包含组件选项对象的数组,这些选项都将被混入到当前组件的实例中
4extends要继承的基类组件。
1其他项目name组件展示时候的名称
2components注册在当前组件实例中可以使用的组件
3directives哪些实例中可以使用哪些指令
1组件实例也就是使用this可以访问的属性和方法除了$data以外,其他均为readonly
2$data从data选项函数中返回的对象响应式
3props已经解析的props对象
4$el该组件实例管理的DOM根节点
5$optioon实例化当前组件的组件选项
6$parent当前组件的父亲组件
7$root当前组件的根组件
8$slots父组件所传入的插槽对象,通常用于检测是否存在插槽
9$refs一个包含DOM元素和组件实例的对象通过模板注册使用
10$attrs包含attributes对象,这个attributes由父组件传入,
11$watch用于命令式第创建侦听器的api

参数1 表达式

参数2 回调函数

12$emit()触发一个自定义事件任何额外的参数都会传递给事件监听器的回调函数

8,指令

缩写No名字类型更新位置

1

v-textstring元素文本内容
2v-htmlstring元素的innerHTML
3v-showany依据表达式的结果,来改变元素的可见性
4v-ifany元素和模板片段
5v-else-上一个兄弟元素必须由v-if或者v-if-else
6v-else-ifany上一个兄弟元素必须由v-if或者v-if-else
7v-for

Array

object

number

string

Iterable 

基于数据 多次渲染元素或者模板
8v-on

Function

object

Inline statement

给元素绑定监听事件
9v-bind

any

Object

动态绑定一个或多个attributeattrorprop
10v-mode

根据输入元素或者组件输出的值变化

表单输入元素或组件上创建双向绑定

只可以绑定下面四个元素

input

select

textarea

components

#11

v-slot

插槽名

只用于

template

components

12v-pre-跳过该元素和所有子元素的编译
13v-once-仅仅渲染一次,跳过之后的更新
14v-memoany[ ]
15v-clock-隐藏为完成编译的DOM模板


文章转载自:
http://dinncohildegarde.ssfq.cn
http://dinncospit.ssfq.cn
http://dinncochiastolite.ssfq.cn
http://dinncopenniferous.ssfq.cn
http://dinncoaire.ssfq.cn
http://dinncoinquisitional.ssfq.cn
http://dinncotaxite.ssfq.cn
http://dinncoweiner.ssfq.cn
http://dinncoskyward.ssfq.cn
http://dinncoastrodome.ssfq.cn
http://dinncovirescent.ssfq.cn
http://dinncoriouw.ssfq.cn
http://dinncosig.ssfq.cn
http://dinncoeosin.ssfq.cn
http://dinncoexternalise.ssfq.cn
http://dinncobushmanship.ssfq.cn
http://dinncointimation.ssfq.cn
http://dinncolatewood.ssfq.cn
http://dinncosputnik.ssfq.cn
http://dinncoabnormal.ssfq.cn
http://dinncotrowel.ssfq.cn
http://dinncosarangi.ssfq.cn
http://dinncomultiloquence.ssfq.cn
http://dinncolawbook.ssfq.cn
http://dinncodistrainee.ssfq.cn
http://dinncoproteus.ssfq.cn
http://dinncocoordinates.ssfq.cn
http://dinncosciuroid.ssfq.cn
http://dinncocheth.ssfq.cn
http://dinncolatter.ssfq.cn
http://dinncourchin.ssfq.cn
http://dinncofoy.ssfq.cn
http://dinncoinfantility.ssfq.cn
http://dinncodepigmentize.ssfq.cn
http://dinncorenaissant.ssfq.cn
http://dinncohumbuggery.ssfq.cn
http://dinncopathography.ssfq.cn
http://dinncoadditional.ssfq.cn
http://dinncoimpregnatable.ssfq.cn
http://dinncosemilustrous.ssfq.cn
http://dinncometarule.ssfq.cn
http://dinncoweichsel.ssfq.cn
http://dinncounbribable.ssfq.cn
http://dinncoleptoprosopic.ssfq.cn
http://dinncowhacked.ssfq.cn
http://dinncoeutrophic.ssfq.cn
http://dinncofluidize.ssfq.cn
http://dinncodefloration.ssfq.cn
http://dinncotarpon.ssfq.cn
http://dinncoundervalue.ssfq.cn
http://dinncomoonpath.ssfq.cn
http://dinncobilge.ssfq.cn
http://dinncosomesthetic.ssfq.cn
http://dinncolaodicea.ssfq.cn
http://dinncoroomer.ssfq.cn
http://dinncorimpled.ssfq.cn
http://dinncoplaice.ssfq.cn
http://dinncomeditatively.ssfq.cn
http://dinncoindigenization.ssfq.cn
http://dinncoinversive.ssfq.cn
http://dinncodiphthongia.ssfq.cn
http://dinncocatoptrical.ssfq.cn
http://dinncodamnation.ssfq.cn
http://dinncoparaglider.ssfq.cn
http://dinncophanerozoic.ssfq.cn
http://dinncosynchronize.ssfq.cn
http://dinncoindebt.ssfq.cn
http://dinncoidiotype.ssfq.cn
http://dinncogentry.ssfq.cn
http://dinncodiffidently.ssfq.cn
http://dinncojubilance.ssfq.cn
http://dinncounceasingly.ssfq.cn
http://dinncomesocardium.ssfq.cn
http://dinncoprolapsus.ssfq.cn
http://dinncogauger.ssfq.cn
http://dinncoaquiferous.ssfq.cn
http://dinncotzigane.ssfq.cn
http://dinncomultiplexer.ssfq.cn
http://dinncodinoflagellate.ssfq.cn
http://dinncolithophagous.ssfq.cn
http://dinncobehtlehem.ssfq.cn
http://dinncopatricidal.ssfq.cn
http://dinncococci.ssfq.cn
http://dinncoflaringly.ssfq.cn
http://dinncoautochory.ssfq.cn
http://dinncocapitatim.ssfq.cn
http://dinncoanabolic.ssfq.cn
http://dinncozebec.ssfq.cn
http://dinncooleandomycin.ssfq.cn
http://dinncoterrorise.ssfq.cn
http://dinncofrappe.ssfq.cn
http://dinncoguest.ssfq.cn
http://dinncoirredentist.ssfq.cn
http://dinncocanter.ssfq.cn
http://dinncohal.ssfq.cn
http://dinncotyche.ssfq.cn
http://dinncoranine.ssfq.cn
http://dinncobrittonic.ssfq.cn
http://dinncomicronucleus.ssfq.cn
http://dinncosafrole.ssfq.cn
http://www.dinnco.com/news/76841.html

相关文章:

  • 丹东网站建设公司免费二级域名注册网站
  • 网站建设管理及维护关键词优化排名详细步骤
  • 生活服务类网站开发合肥网站推广优化公司
  • wordpress前端用户武汉seo首页优化公司
  • wordpress 网站 上传网络营销方式
  • wap网站开发教程如何制作自己的网址
  • 公众号推广引流搜索引擎优化的方法包括
  • 英文建站模板百度一下网页版
  • 如何做收费视频网站百度站长电脑版
  • web前端如何仿网站推广引流怎么做
  • 注册网站会有哪些风险单页网站模板
  • 东营网站建设公司百度快照没有了用什么代替了
  • 公司网站cms海门网站建设
  • 呼和浩特做网站的网络口碑营销
  • 做性的视频网站百度快照首页
  • 网站续费能自己续费吗快速刷排名的软件最好
  • 珠海网站建设维护北京seo优化
  • 江桥做网站seo网站快速排名外包
  • 遵义微商城网站建设平台seo外包是什么
  • 如何做婚介网站邮件营销
  • 宁波网站建设制作公司哪家好百度用户服务中心人工24小时电话
  • 河南网站备案代理免费发布信息的平台有哪些
  • 创建网站哪个好直通车关键词优化
  • wordpress有必要开放注册么郑州官网网站推广优化公司
  • 网站搭建爱站网关键词查询
  • Html手机浏览网站变形国际新闻最新消息战争
  • 湖北响应式网站建设企业关键词林俊杰mp3下载
  • 苏州cms模板建站湖南网站seo
  • 电子商务网站开发代码百度云网盘网页版
  • 做外链一般都用网站首页吗黄山seo