实例:

<script setup>
const v命令名字 = {//声明一个对象,名字需要用v开头
  beforeMount: (el) => {
    // 在元素上做些操作
  },
  mount:(el)=>{
	  // 在元素上做些操作
  },
}
/* 导入的指令同样能够工作,并且能够通过重命名来使其符合命名规范 */
import { myDirective as vMyDirective } from './MyDirective.js'

1. 说明:

  1. child::声明体中的可用api