chore: remove deprecated defineEmit & useContext APIs
This commit is contained in:
@@ -109,11 +109,6 @@ export function defineEmits() {
|
||||
return null as any
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use `defineEmits` instead.
|
||||
*/
|
||||
export const defineEmit = defineEmits
|
||||
|
||||
/**
|
||||
* Vue `<script setup>` compiler macro for declaring a component's exposed
|
||||
* instance properties when it is accessed by a parent component via template
|
||||
@@ -178,19 +173,6 @@ export function withDefaults<Props, Defaults extends InferDefaults<Props>>(
|
||||
return null as any
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use `useSlots` and `useAttrs` instead.
|
||||
*/
|
||||
export function useContext(): SetupContext {
|
||||
if (__DEV__) {
|
||||
warn(
|
||||
`\`useContext()\` has been deprecated and will be removed in the ` +
|
||||
`next minor release. Use \`useSlots()\` and \`useAttrs()\` instead.`
|
||||
)
|
||||
}
|
||||
return getContext()
|
||||
}
|
||||
|
||||
export function useSlots(): SetupContext['slots'] {
|
||||
return getContext().slots
|
||||
}
|
||||
|
||||
@@ -65,9 +65,6 @@ export {
|
||||
// internal
|
||||
mergeDefaults,
|
||||
withAsyncContext,
|
||||
// deprecated
|
||||
defineEmit,
|
||||
useContext,
|
||||
useAttrs,
|
||||
useSlots
|
||||
} from './apiSetupHelpers'
|
||||
|
||||
Reference in New Issue
Block a user