File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 1- import template from './vue-toastr.html'
21import toast from './toast/toast.js'
32export default {
4- template : template ,
3+ render : function ( createElement ) {
4+ var toastContainers = [ ]
5+ for ( var i = 0 ; i < this . positions . length ; i ++ ) {
6+ var position = this . positions [ i ]
7+ var toastNodes = [ ]
8+
9+ var listKeys = Object . keys ( this . list [ position ] )
10+ for ( var j = 0 ; j < listKeys . length ; j ++ ) {
11+ var index = listKeys [ j ]
12+ toastNodes . push ( createElement ( 'toast' , {
13+ props : {
14+ data : this . list [ position ] [ index ]
15+ } ,
16+ key : index
17+ } ) )
18+ }
19+
20+ toastContainers . push ( createElement ( 'div' , {
21+ class : 'toast-container ' + position ,
22+ key : position
23+ } , toastNodes ) )
24+ }
25+ return createElement ( 'div' , toastContainers )
26+ } ,
527 name : 'vueToastr' ,
628 props : [ 'options' ] ,
729 data ( ) {
You can’t perform that action at this time.
0 commit comments