@bpui/libs
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -52,3 +52,3 @@ { | ||
"name": "@bpui/libs", | ||
"version": "0.0.22" | ||
"version": "0.0.23" | ||
} |
@@ -21,2 +21,9 @@ import Icons from '../icons'; | ||
required: false | ||
}, | ||
event: { | ||
validator: function (value) { | ||
let type = typeof value; | ||
return !value||type==='string'||Array.isArray(value); | ||
}, | ||
default: 'click', | ||
} | ||
@@ -49,3 +56,20 @@ }, | ||
// event. | ||
const handler = (name)=>{ | ||
return e=> { | ||
this.$emit(name, e); | ||
} | ||
} | ||
const on = {} | ||
if (Array.isArray(this.event)) { | ||
this.event.forEach(e => { | ||
on[e] = handler(e); | ||
}) | ||
} else { | ||
on[this.event] = handler(this.event) | ||
} | ||
dataRender.on = on; | ||
// svg. | ||
@@ -52,0 +76,0 @@ if (icon.type == 'svg') { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2527385
22983