-
Notifications
You must be signed in to change notification settings - Fork 150
feat: scoped include #226
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
Open
fengzilong
wants to merge
11
commits into
next
Choose a base branch
from
feature-196
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: scoped include #226
Changes from 3 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
99062ce
feat: support scoped include
fengzilong 169ed2b
fix: only update scoped locals in extra instead of re-compiling
fengzilong 9b1e29c
refactor: tweaks
fengzilong 0eeb7cc
Merge branch 'next' into feature-196
fengzilong 52ebed6
test: add tests for scoped include
fengzilong 6a30932
chore: fix comments
fengzilong 4d2ef87
refactor: remove check in compile time, leave it to runtime
fengzilong 61874a5
feat: hide if string is included
fengzilong 158869b
refactor: cleanup unused vars
fengzilong be669d3
chore: rebuild dist files
fengzilong 3f758ee
chore: resolve conflicts
fengzilong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| *.idea* | ||
| example | ||
| npm-debug.log | ||
| yarn-error.log | ||
| */tmp/* | ||
| test/tmp/* | ||
| test/runner/dom* | ||
|
|
||
This file contains hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个貌似有问题,是假设了 使用
this.$body就是fragment类型 么? 理论上使用this.$body和使用 其他 fragment类型的变量是一样的处理方式。 比如<Scope title = {~ <div> {title} </div>} />配和{#inc title}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http://regularjs.github.io/guide/advanced/composite.html#fragment
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是指这里的一堆if判断嘛,这个是为了限制复杂表达式的
比如
{#inc x + y with { item: item }},复杂表达式x + y不允许和scoped include一起使用Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段if/else对后面的scoped include实现没帮助的,只影响下面的this.error,去掉也没事,目前的实现已经支持
{#inc title}这种类型的fragment了Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以精简一次pr的内容,即使有坑,但之前也是没这个逻辑的,可以换个pr处理。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done