-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
$root
refer to component root element
Some times like in dialogs we need access to root component from child nodes, also it is a way to access root element from `v-scope`. the next snippet from another PR to expose `$el` to scope, but this PR can solve the same problem also ```html <textarea v-scope="{width: $root.offsetWidth, height: $root.offsetHeight}" @click="width = $el.offsetWidth; height = $el.offsetHeight;" > {{ width }} × {{ height }} </textarea> ```
- Loading branch information
wusaby-rush
committed
Aug 28, 2022
1 parent
2525578
commit db587d8
Showing
3 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters