组件用.vue还是.js
窗口模式 (vue-window-modal)
Simple window like modal for Vue.js.
Vue.js模态之类的简单窗口。
Install
安装
npm install --save https://github.com/ropbla9/vue-window-modal
Init plugin
初始化插件
import VueWindowModal from 'vue-window-modal'
Vue.use(VueWindowModal)
Use
用
<vue-window-modal :active="visibleFormCrud" title="Client 1" v-on:clickClose="visibleFormCrudUpdate(false)">
FOO TEXT ON DEFAULT SLOT :DDDDD 1
</vue-window-modal>
<vue-window-modal :active="visibleFormCrudTwo" title="Client 2" v-on:clickClose="visibleFormCrudUpdateTwo(false)">
FOO TEXT ON DEFAULT SLOT :DDDDD 2
</vue-window-modal>
<vue-window-modal :active="visibleFormCrudThree" title="Client 3" v-on:clickClose="visibleFormCrudThree = false">
FOO TEXT ON DEFAULT SLOT :DDDDD 3
</vue-window-modal>
It's not well written but properly working. Feel free to pull request.
它写得不好,但是可以正常工作。 随意拉请求。
PS: Since it's not pre-compiled you will need a blunder (webpack) to run into your project.
PS:由于尚未预编译,因此需要一个大问题(Webpack)才能运行到您的项目中。
翻译自: https://vuejsexamples.com/windows-like-modal-component-for-vue-js/
组件用.vue还是.js