index.ts 1.1 KB
Newer Older
fxy060608's avatar
fxy060608 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13
import {
  camelize,
  extend,
  hyphenate,
  normalizeClass,
  toDisplayString,
} from '@vue/shared'
import { vOn } from './vOn'
import { vFor, VForItem } from './vFor'
import { renderSlot } from './renderSlot'
import { withScopedSlot } from './withScopedSlot'
import { stringifyStyle } from './style'

fxy060608's avatar
fxy060608 已提交
14
export { setupDevtoolsPlugin } from './devtools'
fxy060608's avatar
fxy060608 已提交
15 16 17 18 19 20

export const o: typeof vOn = (value) => vOn(value)
export const f: typeof vFor = (
  source: any,
  renderItem: (...args: any[]) => VForItem
) => vFor(source, renderItem)
fxy060608's avatar
fxy060608 已提交
21 22
export const r: typeof renderSlot = (name, props, key) =>
  renderSlot(name, props, key)
fxy060608's avatar
fxy060608 已提交
23 24 25 26 27 28 29 30 31 32
export const w: typeof withScopedSlot = (fn, options) =>
  withScopedSlot(fn, options)
export const s: typeof stringifyStyle = (value) => stringifyStyle(value)

export const c: typeof camelize = (str) => camelize(str)
export const e: typeof extend = (target: object, ...sources: any[]) =>
  extend(target, ...sources)
export const h: typeof hyphenate = (str) => hyphenate(str)
export const n: typeof normalizeClass = (value) => normalizeClass(value)
export const t: typeof toDisplayString = (val) => toDisplayString(val)