File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ import AlertPlugin from 'vux/src/plugins/alert/index.js';
3131// import Clocker from 'vux/src/components/clocker/index.vue';
3232// import ColorPicker from 'vux/src/components/color-picker/index.vue';
3333// import Confirm from 'vux/src/components/confirm/index.vue';
34- // import ConfirmPlugin from 'vux/src/plugins/confirm/index.js';
34+ import ConfirmPlugin from 'vux/src/plugins/confirm/index.js' ;
3535// import cookie from 'vux/src/tools/cookie/index.js';
3636// import Countdown from 'vux/src/components/countdown/index.vue';
3737import Countup from 'vux/src/components/countup/index.vue' ;
@@ -280,6 +280,7 @@ const install = function (Vue) {
280280 } ) ;
281281
282282 Vue . use ( AlertPlugin ) ;
283+ Vue . use ( ConfirmPlugin ) ;
283284 Vue . use ( ToastPlugin ) ;
284285 Vue . prototype . $space = space ;
285286
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export default {
6767 title: ' hello' ,
6868 onShow () {
6969 _this .$info (' alert show' )
70+ _this .showConfirm ()
7071 },
7172 onHide () {
7273 _this .$error (' alert hide' )
@@ -76,6 +77,18 @@ export default {
7677 }
7778 })
7879 })
80+ },
81+ showConfirm () {
82+ const _this = this
83+ this .$vux .confirm .show ({
84+ title: ' Hello' ,
85+ content: ' World !' ,
86+ confirmText: ' Yes' ,
87+ cancelText: ' No' ,
88+ onConfirm () {
89+ _this .$info (' confirm !' )
90+ }
91+ })
7992 }
8093 }
8194}
You can’t perform that action at this time.
0 commit comments