This article mainly introduces the release content of the dialog plug-in art-dialog-vue2.0 based on vue.js. It has a certain reference value. Now I share it with you. Friends in need can refer to it
Supports normal and 12-direction bubble dialog boxes
Support ARIA standard
Future-oriented: API based on HTML5 Dialog
Support standard and modal dialog boxes
Rich and friendly programming interface
Adaptable content size
npm install art-dialog-vue //插件文件在plugin目录下
<script src="plugin/dist/static/css/dialog.min.css"></script> <script src="plugin/dist/static/js/dialog.js"></script> <script> Vue.use(Dialog.default)//使用插件,注意以url引入时use的参数是Dialog.default </script>
import Dialog from 'art-dialog-vue' //esm const Dialog = require('art-dialog-vue').default //RequireJS,非esm形式要加.default Vue.use(Dialog)//使用插件
const d = Vue.dialog({ title: 'art-dialog-vue', content: { template: '<p>{{name}},欢迎使用</p>', data() { return { name: 'hello' } } }, button: [ { id: '1', value: '确定', callcack() { //do something return false;//返回false 表示弹窗不关闭 } }, { id: '2', value: '取消', callcack() { //do something return false;//返回false 表示弹窗不关闭 } }, ] }); d.show();
The above is the entire content of this article, I hope it will be helpful to everyone's learning, more Please pay attention to the PHP Chinese website for related content!
Related recommendations:
In-depth understanding of the test method and its pitfalls of JS regular expressions
The above is the detailed content of Release content of art-dialog-vue2.0, a dialog plug-in based on vue.js. For more information, please follow other related articles on the PHP Chinese website!