feat: ssr support for <style vars>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { warn, getCurrentInstance } from '@vue/runtime-core'
|
||||
import { EMPTY_OBJ } from '@vue/shared'
|
||||
|
||||
export function useCSSModule(name = '$style'): Record<string, string> {
|
||||
export function useCssModule(name = '$style'): Record<string, string> {
|
||||
if (!__GLOBAL__) {
|
||||
const instance = getCurrentInstance()!
|
||||
if (!instance) {
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
} from '@vue/runtime-core'
|
||||
import { ShapeFlags } from '@vue/shared/src'
|
||||
|
||||
export function useCSSVars(
|
||||
export function useCssVars(
|
||||
getter: (ctx: ComponentPublicInstance) => Record<string, string>,
|
||||
scoped = false
|
||||
) {
|
||||
|
||||
@@ -114,8 +114,8 @@ function normalizeContainer(container: Element | string): Element | null {
|
||||
}
|
||||
|
||||
// SFC CSS utilities
|
||||
export { useCSSModule } from './helpers/useCssModule'
|
||||
export { useCSSVars } from './helpers/useCssVars'
|
||||
export { useCssModule } from './helpers/useCssModule'
|
||||
export { useCssVars } from './helpers/useCssVars'
|
||||
|
||||
// DOM-only components
|
||||
export { Transition, TransitionProps } from './components/Transition'
|
||||
|
||||
Reference in New Issue
Block a user