Coder Social home page Coder Social logo

Comments (12)

Array-Huang avatar Array-Huang commented on August 16, 2024

看漏了,原来slots里有这个状态值,这样我上面说的第二条就可以做了,只是第一条还做不了

from vue-clamp.

Justineo avatar Justineo commented on August 16, 2024

可以暴露一个 clampchange 事件出来?

from vue-clamp.

Array-Huang avatar Array-Huang commented on August 16, 2024

可以暴露一个 clampchange 事件出来?

我觉得可以

from vue-clamp.

Array-Huang avatar Array-Huang commented on August 16, 2024

我又想了一下,在default的slot里传出来可能更好,因为如果是循环渲染的场景,用clampchange事件把值传出来后我还要想怎么保存这个值

from vue-clamp.

Justineo avatar Justineo commented on August 16, 2024

现在 default slot 只能传纯文本,你用不了。

from vue-clamp.

Array-Huang avatar Array-Huang commented on August 16, 2024

嗯?是什么原因default slot不能提供slot-scope呢?

from vue-clamp.

Justineo avatar Justineo commented on August 16, 2024

提供了你也用不了啊。

from vue-clamp.

Array-Huang avatar Array-Huang commented on August 16, 2024

为嘛用不到啊,官方文档:

<slot-example>
  <template slot="default" slot-scope="slotProps">
    {{ slotProps.msg }}
  </template>
</slot-example>

from vue-clamp.

Justineo avatar Justineo commented on August 16, 2024

vue-clamp 的 default slot 目前只支持纯文本。你在 default slot 参数里拿到了状态也没有地方可以用。

from vue-clamp.

Array-Huang avatar Array-Huang commented on August 16, 2024

哦,明白了

from vue-clamp.

smelyakov avatar smelyakov commented on August 16, 2024

@Array-Huang
this is exactly why I'd like to have something like this #30

from vue-clamp.

Justineo avatar Justineo commented on August 16, 2024

Implemented in #30.

from vue-clamp.

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.