# 如何正确地将我的脚本移动到组件的新 JS 选项卡中？

**URL:** <https://meta.discourse.org/t/how-to-properly-move-my-script-to-the-new-js-tab-in-my-component/377603>\
**Category:** Development\
**Tags:** composer, tags\
**Created:** [2025年八月6日 19:23 UTC](https://meta.discourse.org/t/how-to-properly-move-my-script-to-the-new-js-tab-in-my-component/377603 "2025-08-06T19:23:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)\
**Post date:** [2025年八月6日 19:51 UTC](https://meta.discourse.org/t/how-to-properly-move-my-script-to-the-new-js-tab-in-my-component/377603/2 "2025-08-06T19:51:11Z")

</div>

我猜你可以使用 CSS 来根据 `body` 上的类别类来显示/隐藏标签字段，但这是否更优雅还有待商榷 🙂

---

_[View the full topic](https://meta.discourse.org/t/how-to-properly-move-my-script-to-the-new-js-tab-in-my-component/377603)._
