提问人:kevin halili 提问时间:10/13/2023 最后编辑:yoduhkevin halili 更新时间:10/14/2023 访问量:19
重用 Vue 组件
Reusing a Vue component
问:
就我而言,我有一个使用 Syncfusion 作为模板的 Vue 应用程序。我想将组件中的一些元素重用到第二个组件中。我的问题是:我如何在另一个组件中重用一个组件并排除它的某些元素?
我问的一个例子是
<! -- Component A template-->
<input type="text" id="name">
<input type="text" id="lastname">
<input type="number" id="age">
<! -- Component B template -->
<input type="text" id="workplace">
<input type="email" id="email">
我希望组件 A 中的字段(元素)是组件 B 的一部分,但年龄输入除外。 上面的例子只是我试图做的事情的一个简单和简化的想法。 除此之外,我想对脚本做同样的事情,但排除任何与年龄输入相关的脚本。 任何想法、学习资源建议或示例将不胜感激!
答: 暂无答案
评论