feat: ssr support for <style vars>

This commit is contained in:
Evan You
2020-07-12 18:04:09 -04:00
parent b6cdd5621e
commit b9595e64cf
17 changed files with 256 additions and 15 deletions

View File

@@ -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) {

View File

@@ -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
) {