Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 运行时解析模板支持动态标签名 #41

Open
SoloJiang opened this issue Apr 8, 2022 · 0 comments
Open

[Feature] 运行时解析模板支持动态标签名 #41

SoloJiang opened this issue Apr 8, 2022 · 0 comments
Assignees
Labels

Comments

@SoloJiang
Copy link
Contributor

Example:

@customElement(parentLocalName)
class Parent extends HTMLElement {
  itemTitle = 'title';
  get template() {
    return html`<${childLocalName} item-title=${this.itemTitle} />`;
  }
}

背景:某些场景开发者需要从服务端动态拉取需要渲染的组件列表进行渲染

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants