Skip to content

[feature] new api this.id('abc') === 'component_instance_id + abc' to make html have scope. #12339

@xialvjun

Description

@xialvjun

HTML doesn't have a concept of scope, but it do use concept like variable at many where(like <input id="abc"/><label for="abc">abc</label>). We should add scope to html.

Maybe you say "for label, we can wrap input in label", but it changes the html structure, and there are many other scene using html variable like spectre.

So why not add an api this.instance_id or this.generate_id(abc: string) => this.instance_id + '/' + abc or whatever others can make html scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions