vuetify eingebunden + erster Versuch Combobox
This commit is contained in:
+88
@@ -0,0 +1,88 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
require('../../../src/stylus/components/_bottom-navs.styl');
|
||||
|
||||
var _applicationable = require('../../mixins/applicationable');
|
||||
|
||||
var _applicationable2 = _interopRequireDefault(_applicationable);
|
||||
|
||||
var _buttonGroup = require('../../mixins/button-group');
|
||||
|
||||
var _buttonGroup2 = _interopRequireDefault(_buttonGroup);
|
||||
|
||||
var _colorable = require('../../mixins/colorable');
|
||||
|
||||
var _colorable2 = _interopRequireDefault(_colorable);
|
||||
|
||||
var _themeable = require('../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _mixins = require('../../util/mixins');
|
||||
|
||||
var _mixins2 = _interopRequireDefault(_mixins);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// Styles
|
||||
exports.default = (0, _mixins2.default)((0, _applicationable2.default)('bottom', ['height', 'value']), _colorable2.default, _themeable2.default
|
||||
/* @vue/component */
|
||||
).extend({
|
||||
name: 'v-bottom-nav',
|
||||
props: {
|
||||
active: [Number, String],
|
||||
mandatory: Boolean,
|
||||
height: {
|
||||
default: 56,
|
||||
type: [Number, String],
|
||||
validator: function validator(v) {
|
||||
return !isNaN(parseInt(v));
|
||||
}
|
||||
},
|
||||
shift: Boolean,
|
||||
value: null
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return {
|
||||
'v-bottom-nav--absolute': this.absolute,
|
||||
'v-bottom-nav--fixed': !this.absolute && (this.app || this.fixed),
|
||||
'v-bottom-nav--shift': this.shift,
|
||||
'v-bottom-nav--active': this.value
|
||||
};
|
||||
},
|
||||
computedHeight: function computedHeight() {
|
||||
return parseInt(this.height);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateApplication: function updateApplication() {
|
||||
return !this.value ? 0 : this.computedHeight;
|
||||
},
|
||||
updateValue: function updateValue(val) {
|
||||
this.$emit('update:active', val);
|
||||
}
|
||||
},
|
||||
render: function render(h) {
|
||||
return h(_buttonGroup2.default, this.setBackgroundColor(this.color, {
|
||||
staticClass: 'v-bottom-nav',
|
||||
class: this.classes,
|
||||
style: {
|
||||
height: parseInt(this.computedHeight) + 'px'
|
||||
},
|
||||
props: {
|
||||
mandatory: Boolean(this.mandatory || this.active !== undefined),
|
||||
value: this.active
|
||||
},
|
||||
on: { change: this.updateValue }
|
||||
}), this.$slots.default);
|
||||
}
|
||||
});
|
||||
// Util
|
||||
|
||||
// Mixins
|
||||
//# sourceMappingURL=VBottomNav.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBottomNav/VBottomNav.ts"],"names":[],"mappings":";;;;;;AACA;;AAGA;;;;AACA;;;;AACA;;;;AACA;;;;AAGA;;;;;;;kBAMe,sBACb,+BAAgB,QAAhB,EAA0B,CACxB,QADwB,EAExB,OAFwB,CAA1B,CADa,EAKb,mBALa,EAMb;AACA;AAPa,EAQb,MARa,CAQN;AACP,UAAM,cADC;AAGP,WAAO;AACL,gBAAQ,CAAC,MAAD,EAAS,MAAT,CADH;AAEL,mBAAW,OAFN;AAGL,gBAAQ;AACN,qBAAS,EADH;AAEN,kBAAM,CAAC,MAAD,EAAS,MAAT,CAFA;AAGN,uBAAW,mBAAC,CAAD;AAAA,uBAAiC,CAAC,MAAM,SAAS,CAAT,CAAN,CAAlC;AAAA;AAHL,SAHH;AAQL,eAAO,OARF;AASL,eAAO;AATF,KAHA;AAeP,cAAU;AACR,eADQ,qBACD;AACL,mBAAO;AACL,0CAA0B,KAAK,QAD1B;AAEL,uCAAuB,CAAC,KAAK,QAAN,KAAmB,KAAK,GAAL,IAAY,KAAK,KAApC,CAFlB;AAGL,uCAAuB,KAAK,KAHvB;AAIL,wCAAwB,KAAK;AAJxB,aAAP;AAMD,SARO;AASR,sBATQ,4BASM;AACZ,mBAAO,SAAS,KAAK,MAAd,CAAP;AACD;AAXO,KAfH;AA6BP,aAAS;AACP,yBADO,+BACU;AACf,mBAAO,CAAC,KAAK,KAAN,GACH,CADG,GAEH,KAAK,cAFT;AAGD,SALM;AAMP,mBANO,uBAMM,GANN,EAMc;AACnB,iBAAK,KAAL,CAAW,eAAX,EAA4B,GAA5B;AACD;AARM,KA7BF;AAwCP,UAxCO,kBAwCC,CAxCD,EAwCE;AACP,eAAO,EAAE,qBAAF,EAAe,KAAK,kBAAL,CAAwB,KAAK,KAA7B,EAAoC;AACxD,yBAAa,cAD2C;AAExD,mBAAO,KAAK,OAF4C;AAGxD,mBAAO;AACL,wBAAW,SAAS,KAAK,cAAd,CAAX;AADK,aAHiD;AAMxD,mBAAO;AACL,2BAAW,QAAQ,KAAK,SAAL,IAAkB,KAAK,MAAL,KAAgB,SAA1C,CADN;AAEL,uBAAO,KAAK;AAFP,aANiD;AAUxD,gBAAI,EAAE,QAAQ,KAAK,WAAf;AAVoD,SAApC,CAAf,EAWH,KAAK,MAAL,CAAY,OAXT,CAAP;AAYD;AArDM,CARM,C;AAPf;;AANA","sourcesContent":["// Styles\nimport '../../stylus/components/_bottom-navs.styl'\n\n// Mixins\nimport Applicationable from '../../mixins/applicationable'\nimport ButtonGroup from '../../mixins/button-group'\nimport Colorable from '../../mixins/colorable'\nimport Themeable from '../../mixins/themeable'\n\n// Util\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue'\nimport { PropValidator } from 'vue/types/options'\n\nexport default mixins(\n Applicationable('bottom', [\n 'height',\n 'value'\n ]),\n Colorable,\n Themeable\n /* @vue/component */\n).extend({\n name: 'v-bottom-nav',\n\n props: {\n active: [Number, String],\n mandatory: Boolean,\n height: {\n default: 56,\n type: [Number, String],\n validator: (v: string | number): boolean => !isNaN(parseInt(v))\n },\n shift: Boolean,\n value: null as any as PropValidator<any>\n },\n\n computed: {\n classes (): object {\n return {\n 'v-bottom-nav--absolute': this.absolute,\n 'v-bottom-nav--fixed': !this.absolute && (this.app || this.fixed),\n 'v-bottom-nav--shift': this.shift,\n 'v-bottom-nav--active': this.value\n }\n },\n computedHeight (): number {\n return parseInt(this.height)\n }\n },\n\n methods: {\n updateApplication (): number {\n return !this.value\n ? 0\n : this.computedHeight\n },\n updateValue (val: any) {\n this.$emit('update:active', val)\n }\n },\n\n render (h): VNode {\n return h(ButtonGroup, this.setBackgroundColor(this.color, {\n staticClass: 'v-bottom-nav',\n class: this.classes,\n style: {\n height: `${parseInt(this.computedHeight)}px`\n },\n props: {\n mandatory: Boolean(this.mandatory || this.active !== undefined),\n value: this.active\n },\n on: { change: this.updateValue }\n }), this.$slots.default)\n }\n})\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VBottomNav = undefined;
|
||||
|
||||
var _VBottomNav = require('./VBottomNav');
|
||||
|
||||
var _VBottomNav2 = _interopRequireDefault(_VBottomNav);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VBottomNav = _VBottomNav2.default;
|
||||
exports.default = _VBottomNav2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VBottomNav/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;QAES,U,GAAA,oB;kBACM,oB","sourcesContent":["import VBottomNav from './VBottomNav'\n\nexport { VBottomNav }\nexport default VBottomNav\n"],"sourceRoot":""}
|
||||
Reference in New Issue
Block a user