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

纺织面料做哪个网站好开的免费网站能赚钱吗

纺织面料做哪个网站好,开的免费网站能赚钱吗,个人电脑做网站主机,网站开发程序员需要会的技能在 uni-app 中#xff0c;实现数据组件间传递可以使用 Props 或 Vuex。 Props 是一种组件通信的方式#xff0c;通过向子组件传递数据来实现组件间的数据传递。下面是一个示例#xff1a; 父组件#xff1a; templatechild :messagehello实现数据组件间传递可以使用 Props 或 Vuex。 Props 是一种组件通信的方式通过向子组件传递数据来实现组件间的数据传递。下面是一个示例 父组件 templatechild :messagehello/child /template scriptimport Child from /components/Child.vue;export default {components: {Child},data() {return {hello: Hello World};}} /script子组件 templatediv{{ message }}/div /template scriptexport default {props: {message: {type: String,default: }}} /script在上面的示例中父组件通过向子组件传递一个 message 属性来实现数据传递。子组件则通过 props 属性定义这个属性并进行接收然后在模板中使用。 另一种方式是使用 Vuex 进行组件间数据共享。下面是一个简单的示例 // store/index.jsimport Vue from vue; import Vuex from vuex;Vue.use(Vuex);export default new Vuex.Store({state: {count: 0},mutations: {increment(state) {state.count;}},actions: {increment(context) {context.commit(increment);}} });// components/Child.vuetemplatediv{{ count }}/div /template scriptimport { mapState } from vuex;export default {computed: {...mapState({count: count})}} /script// components/Parent.vuetemplatebutton clickincrement/buttonchild/child /template scriptimport Child from /components/Child.vue;import { mapActions } from vuex;export default {components: {Child},methods: {...mapActions({increment: increment})}} /script在上面的示例中创建了一个简单的 Vuex store其中包含了一个 count 状态和一个 increment mutation。然后在子组件中使用了 mapState 辅助函数来获取 count 状态值而在父组件中使用了 mapActions 辅助函数来触发 increment mutation。这样就可以通过 Vuex 实现组件间数据传递了。
http://www.w-s-a.com/news/172263/

相关文章:

  • 网站建设与维护培训网页制作专业用语
  • 建站特别慢wordpress网页制作与设计项目策划书
  • 视频制作素材免费网站头像制作在线生成器
  • 网站建设是不是可以免费建站广州做网站 信科网络
  • 闸北区网站设计叫别人做网站后怎么更改密码
  • 为什么想做网站运营建设工程教育网站
  • 站长基地百度推广整体优化网站
  • 门窗 东莞网站建设wordpress外链论坛
  • 安徽省建设部网站官网还能用的wap网站
  • 企业网站设计开发网站关键词优化seo
  • 郑州高档网站建设台州网站建设推广
  • 广东省建设信息港网站WordPress手机缩略图设置
  • 优秀网站主题平顶山专业做网站公司
  • wordpress返回顶部插件wordpress站群seo
  • 企业网站建设报价表百度竞价托管哪家好
  • 织梦网站首页打开慢淄博网站推广那家好
  • 苏州高端网站建设kgwl互动网站建设的主页
  • 宿州网站建设哪家公司好个人网站制作方法
  • 网站正能量晚上在线观看视频站长之家关键词挖掘工具
  • 建设网站怎么判断是电脑还是手机仿租号网站源码网站开发
  • seo百度网站排名软件重庆巫山网站设计公司
  • 搭建视频播放网站网站排名诊断
  • 网站域名注册网站centos做网站服务器
  • 网站服务器共享的 vpsh5页面制作软件电脑版
  • 免费手机网站申请上海网站建设设计公司哪家好
  • 站长工具大全企业网上书店网站建设设计
  • 做网站的专业公司公司网站是做的谷歌的
  • 做网站前期工作wordpress图片并排
  • 免费注册网站哪个好wordpress评论修改
  • 合肥模板网站建设软件赤峰公司网站建设