Giter VIP home page Giter VIP logo

Comments (3)

erik168 avatar erik168 commented on July 17, 2024
  1. 好提议。在支持之前,要用的话可以自己先实现个,应该也不难,就是for + set。
  2. 拿到dom对业务开发者其实没啥用,而且绝大多数场景我们不希望使用者去拿这个东西,所有的数据和事件绑定都应该尽量通过声明式。在 https://ecomfe.github.io/san/tutorial/component/#ref 有说明
  3. data操作和�view update之间是异步的,在操作data前就应该处理好相关数据。我们理解component是viewmodel
  4. 我有空试试。。。
  5. san是一套独立的组件体系,san渲染会忠于template的原始形态,你写id说明你希望写id
  6. 我理解这种场景应该是把checked属性绑到一个数据上,而不是用if...else

from san.

otakustay avatar otakustay commented on July 17, 2024
  1. 加个merge之类的
  2. 拿DOM显然是不应该的,不过我调研了一下一些实际的需求,确实存在这样的情况,主要的目的就是拿到一个元素的宽高位置等信息,所以如果我们要封装的话,需要给组件加一个measure()这样的功能,先用ref拿到组件(DOM也变成组件),然后用measure()拿尺寸信息
  3. 他指的应该是before data update吧,类似一些“计算属性”的事情要在这个阶段做

from san.

homfen avatar homfen commented on July 17, 2024

6弄懂了,可以同时绑定value和checked实现
<input type="checkbox" value="{{value}}" checked="{{checked}}">

from san.

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.