Vue.js的最小模态组件– Modaltor

Vue.js的最小模态组件– Modaltor
插件名称 Modaltor
发布时间 2020年9月13日
插件作者 davodaslanifakor

Modaltor是最小的模式组件,可在Vue.js应用程序中创建响应式,可自定义,动画和可滚动的模式窗口。

安装和下载:

# Yarn
$ yarn add vue-modaltor

# NPM
$ npm install vue-modaltor --save

<vue-modaltor :visible="open" @hide="hideModal">
  <template slot="close-icon">
    <svg
      version="1.1"
      xmlns="http://www.w3.org/2000/svg"
      viewBox="0 0 40 40"
      width="20"
      height="20"
      xml:space="preserve"
    >
      <path
        class="st0"
        fill="#41b883"
        d="M8.7,7.6c-0.4-0.4-1-0.4-1.4,0C6.9,8,6.9,8.6,7.3,9l11,11l-11,11c-0.4,0.4-0.4,1,0,1.4c0.4,0.4,1,0.4,1.4,0 l11-11l11,11c0.4,0.4,1,0.4,1.4,0c0.4-0.4,0.4-1,0-1.4l-11-11L32,9c0.4-0.4,0.4-1,0-1.4c-0.4-0.4-1-0.4-1.4,0l-11,11L8.7,7.6z"
      />
    </svg>
  </template>
  <p>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
    consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
    non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  </p>
</vue-modaltor>
<button @click="open=true">modal-basic</button>