Giter Club home page Giter Club logo

Comments (4)

RubyLouvre avatar RubyLouvre commented on July 16, 2024

其实是这样的,vm只是用来定义的,它与define 返回的对象不是同一个对象。而对视图进行绑定时,我们是用返回的login对象。

from avalon.

wghy2004 avatar wghy2004 commented on July 16, 2024
avalon.log(vm.user);//取不到值
avalon.log(login.user);//正常

我只能用login.user?

from avalon.

RubyLouvre avatar RubyLouvre commented on July 16, 2024

是的,你这个是一个事件回调,this是指向绑定事件的元素节点;而它里面想指向viewModel,只能用avalon.define的返回值

from avalon.

RubyLouvre avatar RubyLouvre commented on July 16, 2024

我暂时还没有什么好办法来hack这个vm

from avalon.

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.