vuetify eingebunden + erster Versuch Combobox
This commit is contained in:
+69
@@ -0,0 +1,69 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
||||
// Component level mixins
|
||||
|
||||
// Directives
|
||||
|
||||
|
||||
require('../../../src/stylus/components/_app.styl');
|
||||
|
||||
var _appTheme = require('./mixins/app-theme');
|
||||
|
||||
var _appTheme2 = _interopRequireDefault(_appTheme);
|
||||
|
||||
var _themeable = require('../../mixins/themeable');
|
||||
|
||||
var _themeable2 = _interopRequireDefault(_themeable);
|
||||
|
||||
var _resize = require('../../directives/resize');
|
||||
|
||||
var _resize2 = _interopRequireDefault(_resize);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/* @vue/component */
|
||||
exports.default = {
|
||||
name: 'v-app',
|
||||
directives: {
|
||||
Resize: _resize2.default
|
||||
},
|
||||
mixins: [_appTheme2.default, _themeable2.default],
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default: 'app'
|
||||
},
|
||||
dark: Boolean
|
||||
},
|
||||
computed: {
|
||||
classes: function classes() {
|
||||
return _extends({
|
||||
'application--is-rtl': this.$vuetify.rtl
|
||||
}, this.themeClasses);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dark: function dark() {
|
||||
this.$vuetify.dark = this.dark;
|
||||
}
|
||||
},
|
||||
mounted: function mounted() {
|
||||
this.$vuetify.dark = this.dark;
|
||||
},
|
||||
render: function render(h) {
|
||||
var data = {
|
||||
staticClass: 'application',
|
||||
'class': this.classes,
|
||||
attrs: { 'data-app': true },
|
||||
domProps: { id: this.id }
|
||||
};
|
||||
var wrapper = h('div', { staticClass: 'application--wrap' }, this.$slots.default);
|
||||
return h('div', data, [wrapper]);
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=VApp.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VApp/VApp.js"],"names":[],"mappings":";;;;;;;AAEA;;AAKA;;;;;AAJA;;;;AAEA;;;;AAGA;;;;;;AAEA;kBACe;AACb,UAAM,OADO;AAGb,gBAAY;AACV;AADU,KAHC;AAOb,YAAQ,CACN,kBADM,EAEN,mBAFM,CAPK;AAYb,WAAO;AACL,YAAI;AACF,kBAAM,MADJ;AAEF,qBAAS;AAFP,SADC;AAKL,cAAM;AALD,KAZM;AAoBb,cAAU;AACR,eADQ,qBACD;AACL;AACE,uCAAuB,KAAK,QAAL,CAAc;AADvC,eAEK,KAAK,YAFV;AAID;AANO,KApBG;AA6Bb,WAAO;AACL,YADK,kBACD;AACF,iBAAK,QAAL,CAAc,IAAd,GAAqB,KAAK,IAA1B;AACD;AAHI,KA7BM;AAmCb,WAnCa,qBAmCN;AACL,aAAK,QAAL,CAAc,IAAd,GAAqB,KAAK,IAA1B;AACD,KArCY;AAuCb,UAvCa,kBAuCL,CAvCK,EAuCJ;AACP,YAAM,OAAO;AACX,yBAAa,aADF;AAEX,qBAAS,KAAK,OAFH;AAGX,mBAAO,EAAE,YAAY,IAAd,EAHI;AAIX,sBAAU,EAAE,IAAI,KAAK,EAAX;AAJC,SAAb;AAOA,YAAM,UAAU,EAAE,KAAF,EAAS,EAAE,aAAa,mBAAf,EAAT,EAA+C,KAAK,MAAL,CAAY,OAA3D,CAAhB;AAEA,eAAO,EAAE,KAAF,EAAS,IAAT,EAAe,CAAC,OAAD,CAAf,CAAP;AACD;AAlDY,C","sourcesContent":["import '../../stylus/components/_app.styl'\n\n// Component level mixins\nimport AppTheme from './mixins/app-theme'\n\nimport Themeable from '../../mixins/themeable'\n\n// Directives\nimport Resize from '../../directives/resize'\n\n/* @vue/component */\nexport default {\n name: 'v-app',\n\n directives: {\n Resize\n },\n\n mixins: [\n AppTheme,\n Themeable\n ],\n\n props: {\n id: {\n type: String,\n default: 'app'\n },\n dark: Boolean\n },\n\n computed: {\n classes () {\n return {\n 'application--is-rtl': this.$vuetify.rtl,\n ...this.themeClasses\n }\n }\n },\n\n watch: {\n dark () {\n this.$vuetify.dark = this.dark\n }\n },\n\n mounted () {\n this.$vuetify.dark = this.dark\n },\n\n render (h) {\n const data = {\n staticClass: 'application',\n 'class': this.classes,\n attrs: { 'data-app': true },\n domProps: { id: this.id }\n }\n\n const wrapper = h('div', { staticClass: 'application--wrap' }, this.$slots.default)\n\n return h('div', data, [wrapper])\n }\n}\n"],"sourceRoot":""}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.VApp = undefined;
|
||||
|
||||
var _VApp = require('./VApp');
|
||||
|
||||
var _VApp2 = _interopRequireDefault(_VApp);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
exports.VApp = _VApp2.default;
|
||||
exports.default = _VApp2.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/VApp/index.js"],"names":[],"mappings":";;;;;;;;;;;;;QAES,I,GAAA,c;kBACM,c","sourcesContent":["import VApp from './VApp'\n\nexport { VApp }\nexport default VApp\n"],"sourceRoot":""}
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _theme = require('../../../util/theme');
|
||||
|
||||
var Theme = _interopRequireWildcard(_theme);
|
||||
|
||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||
|
||||
exports.default = {
|
||||
data: function data() {
|
||||
return {
|
||||
style: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
parsedTheme: function parsedTheme() {
|
||||
return Theme.parse(this.$vuetify.theme);
|
||||
},
|
||||
|
||||
/** @return string */
|
||||
generatedStyles: function generatedStyles() {
|
||||
var theme = this.parsedTheme;
|
||||
var css = void 0;
|
||||
if (this.$vuetify.options.themeCache != null) {
|
||||
css = this.$vuetify.options.themeCache.get(theme);
|
||||
if (css != null) return css;
|
||||
}
|
||||
css = Theme.genStyles(theme, this.$vuetify.options.customProperties);
|
||||
if (this.$vuetify.options.minifyTheme != null) {
|
||||
css = this.$vuetify.options.minifyTheme(css);
|
||||
}
|
||||
if (this.$vuetify.options.themeCache != null) {
|
||||
this.$vuetify.options.themeCache.set(theme, css);
|
||||
}
|
||||
return css;
|
||||
},
|
||||
vueMeta: function vueMeta() {
|
||||
if (this.$vuetify.theme === false) return {};
|
||||
var options = {
|
||||
cssText: this.generatedStyles,
|
||||
id: 'vuetify-theme-stylesheet',
|
||||
type: 'text/css'
|
||||
};
|
||||
if (this.$vuetify.options.cspNonce) {
|
||||
options.nonce = this.$vuetify.options.cspNonce;
|
||||
}
|
||||
return {
|
||||
style: [options]
|
||||
};
|
||||
}
|
||||
},
|
||||
// Regular vue-meta
|
||||
metaInfo: function metaInfo() {
|
||||
return this.vueMeta;
|
||||
},
|
||||
|
||||
// Nuxt
|
||||
head: function head() {
|
||||
return this.vueMeta;
|
||||
},
|
||||
|
||||
watch: {
|
||||
generatedStyles: function generatedStyles() {
|
||||
!this.meta && this.applyTheme();
|
||||
}
|
||||
},
|
||||
created: function created() {
|
||||
if (this.$vuetify.theme === false) return;
|
||||
if (this.$meta) {
|
||||
// Vue-meta
|
||||
// Handled by metaInfo()/nuxt()
|
||||
} else if (typeof document === 'undefined' && this.$ssrContext) {
|
||||
// SSR
|
||||
var nonce = this.$vuetify.options.cspNonce ? ' nonce="' + this.$vuetify.options.cspNonce + '"' : '';
|
||||
this.$ssrContext.head = this.$ssrContext.head || '';
|
||||
this.$ssrContext.head += '<style type="text/css" id="vuetify-theme-stylesheet"' + nonce + '>' + this.generatedStyles + '</style>';
|
||||
} else if (typeof document !== 'undefined') {
|
||||
// Client-side
|
||||
this.genStyle();
|
||||
this.applyTheme();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
applyTheme: function applyTheme() {
|
||||
if (this.style) this.style.innerHTML = this.generatedStyles;
|
||||
},
|
||||
genStyle: function genStyle() {
|
||||
var style = document.getElementById('vuetify-theme-stylesheet');
|
||||
if (!style) {
|
||||
style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.id = 'vuetify-theme-stylesheet';
|
||||
if (this.$vuetify.options.cspNonce) {
|
||||
style.setAttribute('nonce', this.$vuetify.options.cspNonce);
|
||||
}
|
||||
document.head.appendChild(style);
|
||||
}
|
||||
this.style = style;
|
||||
}
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=app-theme.js.map
|
||||
+1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user