-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
feat(compiler): compiler supports search tag #9249
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
base: minor
Are you sure you want to change the base?
Changes from 4 commits
835fc82
5fe3299
912853f
b66dd91
bf3a41d
db78752
52369c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ import { | |
createObjectProperty, | ||
createSimpleExpression, | ||
createVNodeCall, | ||
getSetupReturnedHelper, | ||
} from '../ast' | ||
import { | ||
PatchFlags, | ||
|
@@ -344,10 +345,13 @@ function resolveSetupReference(name: string, context: TransformContext) { | |
checkType(BindingTypes.SETUP_REACTIVE_CONST) || | ||
checkType(BindingTypes.LITERAL_CONST) | ||
if (fromConst) { | ||
const helper = context.helperString | ||
return context.inline | ||
? // in inline mode, const setup bindings (e.g. imports) can be used as-is | ||
fromConst | ||
: `$setup[${JSON.stringify(fromConst)}]` | ||
: `${helper(getSetupReturnedHelper())}(${JSON.stringify( | ||
fromConst, | ||
)}, $setup)` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here we should use |
||
} | ||
|
||
const fromMaybeRef = | ||
|
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.
I think
resolveLateAddedTag
would be a more appropriate name. Perhaps this runtimehelper isn't necessary, for late add tag we can directly use resolveComponent