<template>
  <a-modal
    @ok="${2}"
    :maskClosable="false"
    title="${0}"
    :visible="${1}"
    :width="550"
    @cancel="close"
  >
  </a-modal>
</template>

<script>
export default {
  props:{
    ${1}: {
      type: Boolean.required: true}},data() {
    return {
      loading: false}},methods: {
    // actionThe ${2{}} (),// modal
    close() {
      this.\$emit('update:${1}'.false)},update() {
      this.\$emit('update')}}}</script>

<style lang="scss" scoped></style>
Copy the code

The vscode block needed to separate popovers into components

Method of use

Create a new vue file, copy the code into it, and then put it in the vscode vetur installation directory in the specified folder, and then type reload window in VScode. For details, see the custom Vetur shortcut block Snippet in the previous article