feat(reactivity-transform): support $-shorthands for all ref-creating APIs
This commit is contained in:
parent
93ba6b974e
commit
179fc05a84
@ -24,7 +24,7 @@ import { hasOwn, isArray, isString } from '@vue/shared'
|
|||||||
|
|
||||||
const TO_VAR_SYMBOL = '$'
|
const TO_VAR_SYMBOL = '$'
|
||||||
const TO_REF_SYMBOL = '$$'
|
const TO_REF_SYMBOL = '$$'
|
||||||
const shorthands = ['ref', 'computed', 'shallowRef']
|
const shorthands = ['ref', 'computed', 'shallowRef', 'toRef', 'customRef']
|
||||||
const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/
|
const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/
|
||||||
|
|
||||||
export function shouldTransform(src: string): boolean {
|
export function shouldTransform(src: string): boolean {
|
||||||
|
Loading…
Reference in New Issue
Block a user