add namespace

main v0.2.0
HerrHase 4 weeks ago
parent 9fdb4b1b1e
commit 92af34001e

@ -1,6 +1,6 @@
{
"name": "@tiny-components/datepicker",
"version": "0.1.0",
"version": "0.2.0",
"description": "Datepicker for Desktop and Mobile",
"repository": {
"type": "git",

@ -32,7 +32,8 @@ export default {
weekFormat: 'isoWeek',
isoFormat: true
isoFormat: true,
namespace: ''
},
/**
@ -49,6 +50,10 @@ export default {
this.state.date = dayjs()
}
if (this.props.namespace) {
this.state.namespace = this.props.namespace + '.'
}
// change
if (this.props.isoFormat === 0) {
this.state.isoFormat = false
@ -69,7 +74,7 @@ export default {
*
*/
onBeforeUpdate() {
store.trigger('change', {
store.trigger(this.state.namespace + 'change', {
date: this.state.date
})
},

Loading…
Cancel
Save