gpt4 book ai didi

javascript - aurelia 1.0 中的可替换属性是否已过时?

转载 作者:行者123 更新时间:2023-11-30 11:53:15 25 4
gpt4 key购买 nike

我的印象是 slot 取代了 replaceable,但我听说 replaceable 在 1.0 版本中重新引入,是吗真的吗?

最佳答案

replaceable 仍然存在,因为 Shadow DOM v1 规范中的插槽未涵盖的用例:

The new Shadow DOM v1 spec has support for slot "fallback content". As a result, our replaceable attribute is no longer needed and has been removed in favor of slot fallbacks. However, slots do not solve the problem of replacing a template that is used by a repeat, if or other template controller. So, we still support placing the part attribute on a template controller's element and overriding it by using replace-part in the element's content.

http://blog.durandal.io/2016/06/08/getting-prepared-for-aurelia-1-0-0-rc/

关于javascript - aurelia 1.0 中的可替换属性是否已过时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38838725/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com