GithubHelp home page GithubHelp logo

Comments (4)

chongyangwang avatar chongyangwang commented on May 31, 2024

父子: prop refs $children $parent $emit发送 v-on监听

兄弟: 子传父 父传子 vue-bus vuex

from step-by-step.

acgta5 avatar acgta5 commented on May 31, 2024

最常用的就是vuex , 当然 如果项目比较小,就不需要考虑,反而会累赘,
父子常用的就是 $children和$parent这两个api,prop也可以使用
兄弟之间就是事件订阅$emit和$on

from step-by-step.

dogLin avatar dogLin commented on May 31, 2024

父子:

  1. props $emit
  2. $resf $children $parent
  3. provide/inject

兄弟: $on/$emit vuex

from step-by-step.

YanCastle avatar YanCastle commented on May 31, 2024

我用的自己的库,hook库,全局随便传。
@ctsy/hook
文档地址:https://www.yuque.com/fbfmru/qcllb6/oqtqgf

from step-by-step.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.