WXL
5 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
1
2
3
4
5
6
7
8
import { addProp } from 'compiler/helpers'
import { ASTDirective, ASTElement } from 'types/compiler'
 
export default function text(el: ASTElement, dir: ASTDirective) {
  if (dir.value) {
    addProp(el, 'textContent', `_s(${dir.value})`, dir)
  }
}