Skip to content

Commit 47109da

Browse files
committed
added ui-tab menu slots
1 parent 83b3ef2 commit 47109da

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

dist/vue-typed-ui.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,6 @@ var NumericBase = function (_NumericBaseBase2) {
11211121
}, {
11221122
key: 'mounted',
11231123
value: function mounted() {
1124-
console.log('called mounted');
11251124
this.setupUI();
11261125
}
11271126
}, {
@@ -1148,7 +1147,7 @@ var NumericBase = function (_NumericBaseBase2) {
11481147
opt.aSep = '';
11491148
}
11501149
var target = $(this.$el).find('input').autoNumeric('init', this.buildOptions(opt)).autoNumeric('set', this.value || 0).on('keyup change paste propertychange', function (v) {
1151-
var value = $(v.target).autoNumeric('get');
1150+
var value = _.toNumber($(v.target).autoNumeric('get'));
11521151
_this2.$emit('input', value);
11531152
_this2.$emit(_NumericBaseEvents.change, value);
11541153
});
@@ -2075,7 +2074,7 @@ var Tab = function (_TabBase2) {
20752074
}(_TabBase);
20762075
__decorate([vueTyped.Watch('kind')], Tab.prototype, "onStyleChanged", null);
20772076
Tab = __decorate([vueTyped.Options({
2078-
template: '<div>\n\t\t<div :class="css">\n\t\t\t<a v-for="i in items" class="item" v-bind:data-tab="i.dataTab">\n \t\t\t{{i.caption}}\n\t\t\t</a>\n\t\t</div>\n\t\t<slot></slot>\n\t</div>'
2077+
template: '<div>\n\t\t<div :class="css">\n\t\t\t<slot name="left-menu"></slot>\n\t\t\t<a v-for="i in items" class="item" v-bind:data-tab="i.dataTab">\n \t\t\t{{i.caption}}\n\t\t\t</a>\n\t\t\t<slot name="right-menu"></slot>\n\t\t</div>\n\t\t<slot></slot>\n\t</div>'
20792078
})], Tab);
20802079

20812080
/**

src/components/containers/tab/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ import { ITab } from '../../../../lib/interface'
66
@Options({
77
template: `<div>
88
<div :class="css">
9+
<slot name="left-menu"></slot>
910
<a v-for="i in items" class="item" v-bind:data-tab="i.dataTab">
1011
{{i.caption}}
1112
</a>
13+
<slot name="right-menu"></slot>
1214
</div>
1315
<slot></slot>
1416
</div>`

src/components/form-inputs/auto-numeric/numeric-base/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Watch } from 'vue-typed';
22
import { Util } from '../../../../utils';
33
import { _NumericBaseBase, _NumericBaseEvents } from './_base';
4+
import * as _ from 'lodash'
45

56
require('autonumeric')
67

@@ -33,7 +34,6 @@ export abstract class NumericBase extends _NumericBaseBase {
3334
}
3435

3536
mounted() {
36-
console.log('called mounted');
3737
this.setupUI();
3838
}
3939

@@ -63,7 +63,7 @@ export abstract class NumericBase extends _NumericBaseBase {
6363
var target = $(this.$el).find('input')
6464
.autoNumeric('init', this.buildOptions(opt))
6565
.autoNumeric('set', this.value || 0).on('keyup change paste propertychange', (v) => {
66-
var value = $(v.target).autoNumeric('get')
66+
var value = _.toNumber($(v.target).autoNumeric('get'))
6767
this.$emit('input', value)
6868
this.$emit(_NumericBaseEvents.change, value)
6969
})

0 commit comments

Comments
 (0)