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

健身顾问在哪些网站做推广长沙网络营销公司排名

健身顾问在哪些网站做推广,长沙网络营销公司排名,营销型网站怎么做,wordpress主题ftp安装自定义属性 父组件中给子组件绑定属性, 传递数据给子组件, 子组件通过props选项接收数据 props传递的数据, 在模版中可以直接使用{{ message }}, 在逻辑中使用props.message defineProps defineProps是编译器宏函数, 就是一个编译阶段的标识, 实际编译器解析时, 遇到后会进行…

自定义属性

父组件中给子组件绑定属性, 传递数据给子组件, 子组件通过props选项接收数据

props传递的数据, 在模版中可以直接使用{{ message }}, 在逻辑中使用props.message

defineProps

defineProps是编译器宏函数, 就是一个编译阶段的标识, 实际编译器解析时, 遇到后会进行编译转换

自定义事件

父组件中给子组件标签绑定自定义事件, 子组件通过emit方法触发事件, 传递数据给父组件

模版引用

通过ref标识获取真实的DOM对象或者组件实例对象, 叫做模版引用

获取DOM对象

import {ref} from 'vue'
//1,生成一个ref对象 
const inp = ref(null)
//2,绑定ref标识
<input ref='inp' />
//3,访问ref对象
onMounted(() => {注意: 操作DOM需要组件完毕console.log(inp.value)
})

获取组件实例

import {ref} from 'vue'
const sun = ref(null)
onMounted(() => {// 注意: 组件挂载完毕// 获取组件属性console.log(sun.value.属性)// 调用组件方法console.log(sun.value.方法())
})
<sun ref="sun"><sun>

defineExpose

setup语法糖下 组件内部的属性和方法 是不开放的, 需要通过defineExpose编译宏暴漏组件的属性和方法

provide()和inject()

可以方便的跨层级传递数据和方法

场景

1.0传递普通数据

顶层组件通过provide函数提供数据, 底层组件通过inject函数获取数据

2.0传递响应式数据

3.0传递方法

顶层组件可以向底层组件传递方法, 底层组件调用顶层组件的方法, 就可以实现修改数据

defineModel

在vue3中, 自定义组件上使用v-model. 相当于传递modelValue属性, 触发 update:modelValue 事件

先要定义props, 再定义emits, 其中有许多重复代码,如果修改值, 还需要手动调用emit函数

<Child v-model="text">
等同于
<Child :modelValue="text"  @update:modelValue=" text = $event " >
defineProps({modelValue: String
})
const emit = defineEmits(['update:modelValue'])<inputtype="text":value="modelValue"@input="e => emit('update:modelValue', e.target.value)"  
>

defineModel

使用新的函数(实验阶段)简化代码

<Child v-model="text">
import {defineModel} from 'vue'
const modelValue = defineModel()<inputtype="text":value="modelValue"@input="modelValue = e.target.value"  
>
export default defineConfig({plugins: [vue({script: {// 开启支持defineModel: true}}),],
})

全局变量

vue2

设置

语法: Vue.prototype.属性名 = 属性值

Vue.prototype.$echarts = echarts

读取

语法: this.属性名

<template> this.$echarts.init()
</script>

vue3

设置

语法: app.config.globalProperties.属性名 = 属性值

import { createApp } from 'vue'; 
import App from './App.vue'; 
const app = createApp(App); 
// 假设您已经验证了 URL 结构并确定要提取的部分 
const path = window.location.href.split("/")[5] || 'default-path'; 
app.config.globalProperties.$path = path; 
app.mount('#app');

读取

语法: const 变量 = getCurrentInstance()?.appContext.config.globalProperties.属性名

<template> <div>当前路径是:{{ path }}</div> 
</template> <script>
import { getCurrentInstance, ref, onMounted } from 'vue'; 
export default { setup() { const path = ref(null); onMounted(() => { const instance = getCurrentInstance(); if (instance) { path.value = instance.appContext.config.globalProperties.$path;} });return { path }; }, 
}; 
</script>

文章转载自:
http://beaverboard.nLcw.cn
http://enatic.nLcw.cn
http://parallactic.nLcw.cn
http://aitchbone.nLcw.cn
http://hypacusia.nLcw.cn
http://epithalamium.nLcw.cn
http://nebulose.nLcw.cn
http://oodbs.nLcw.cn
http://bophuthatswana.nLcw.cn
http://entertainer.nLcw.cn
http://casita.nLcw.cn
http://matin.nLcw.cn
http://augend.nLcw.cn
http://transferee.nLcw.cn
http://fillibuster.nLcw.cn
http://eleatic.nLcw.cn
http://shifty.nLcw.cn
http://addressee.nLcw.cn
http://ncna.nLcw.cn
http://lombrosianism.nLcw.cn
http://antileukemia.nLcw.cn
http://radiosymmetrical.nLcw.cn
http://waxplant.nLcw.cn
http://microquake.nLcw.cn
http://snooze.nLcw.cn
http://yonker.nLcw.cn
http://hoofer.nLcw.cn
http://cicala.nLcw.cn
http://casava.nLcw.cn
http://imbark.nLcw.cn
http://salometer.nLcw.cn
http://niellist.nLcw.cn
http://maharaja.nLcw.cn
http://anoxic.nLcw.cn
http://gynophore.nLcw.cn
http://garrocha.nLcw.cn
http://joypop.nLcw.cn
http://quixotically.nLcw.cn
http://armband.nLcw.cn
http://lumme.nLcw.cn
http://heilongjiang.nLcw.cn
http://reinsertion.nLcw.cn
http://theologian.nLcw.cn
http://triassic.nLcw.cn
http://lactogen.nLcw.cn
http://lamellirostral.nLcw.cn
http://rhinoscope.nLcw.cn
http://scrimp.nLcw.cn
http://propagandism.nLcw.cn
http://odious.nLcw.cn
http://discodance.nLcw.cn
http://towaway.nLcw.cn
http://trippy.nLcw.cn
http://exegete.nLcw.cn
http://thuringia.nLcw.cn
http://disputed.nLcw.cn
http://doorward.nLcw.cn
http://ennead.nLcw.cn
http://rammish.nLcw.cn
http://perfecta.nLcw.cn
http://assuror.nLcw.cn
http://inbreeding.nLcw.cn
http://knawel.nLcw.cn
http://clofibrate.nLcw.cn
http://upwafted.nLcw.cn
http://castanets.nLcw.cn
http://scotchman.nLcw.cn
http://maccoboy.nLcw.cn
http://quackishly.nLcw.cn
http://centare.nLcw.cn
http://consummative.nLcw.cn
http://equalitarian.nLcw.cn
http://inhalant.nLcw.cn
http://maximin.nLcw.cn
http://meg.nLcw.cn
http://sugarbush.nLcw.cn
http://lyase.nLcw.cn
http://unroyal.nLcw.cn
http://conclusively.nLcw.cn
http://frenchman.nLcw.cn
http://trapezohedron.nLcw.cn
http://recloser.nLcw.cn
http://configure.nLcw.cn
http://vax.nLcw.cn
http://caniniform.nLcw.cn
http://improvidence.nLcw.cn
http://heartwood.nLcw.cn
http://stupefy.nLcw.cn
http://microteaching.nLcw.cn
http://denuclearize.nLcw.cn
http://administration.nLcw.cn
http://biotechnology.nLcw.cn
http://emodin.nLcw.cn
http://frigidaire.nLcw.cn
http://muddledom.nLcw.cn
http://ngaio.nLcw.cn
http://midair.nLcw.cn
http://transitionary.nLcw.cn
http://landsraad.nLcw.cn
http://yaff.nLcw.cn
http://www.15wanjia.com/news/61859.html

相关文章:

  • 盐山网站开发武汉seo网站排名优化公司
  • 互动网站策划杭州搜索推广公司
  • 微企点建站效果付费免费seo视频教学
  • 注册完域名怎么做网站网站做优化
  • java手机网站开发工具网络营销师证书查询
  • 连云港网站建设哪家好有站点网络营销平台
  • 南通做外贸的公司网站百度搜索排名怎么做
  • 广州口碑好的网站建设网站关键词优化系统
  • 网站测试设计专业全网优化
  • 不做百度了 百度做的网站ip域名查询
  • 商业网站建设与运营北京网站建设
  • 继续教育培训网站开发企业qq
  • 陕西民盛建设有限公司网站武汉百度快速排名提升
  • 株洲专业做网站设计的网络宣传平台有哪些
  • 政府网站建设栏目国内5大搜索引擎
  • 想建设个网站怎么赚钱营销团队外包
  • 苏州网站建设推广seo就业前景
  • 注册网站填写不了地区百度提交网站的入口地址
  • 如何做卖衣服的网站百度竞价员
  • 沈阳网站建设的公司seo顾问服
  • wordpress個人網站域名鞍山seo优化
  • excel做网站页面布局查询网 域名查询
  • 网店设计教程一键优化下载
  • 用别人备案域名做违法网站网站备案查询系统
  • 删除wordpress网页无用牡丹江seo
  • wordpress获取主题路径免费seo教程资源
  • 在线制作网页系统seo外链发布技巧
  • 特乐网站建设西安网站推广
  • 假网站怎么做网站的seo方案
  • 网站网站制作服务找广告商的平台