This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/mixins/picker-button/index.js

32 lines
898 B
JavaScript
Raw Permalink Normal View History

2019-08-11 18:48:02 +00:00
// Mixins
import Colorable from '../colorable'; // Utilities
import mixins from '../../util/mixins';
import { kebabCase } from '../../util/helpers';
/* @vue/component */
export default mixins(Colorable).extend({
methods: {
genPickerButton(prop, value, content, readonly = false, staticClass = '') {
const active = this[prop] === value;
const click = event => {
event.stopPropagation();
this.$emit(`update:${kebabCase(prop)}`, value);
};
return this.$createElement('div', {
staticClass: `v-picker__title__btn ${staticClass}`.trim(),
class: {
'v-picker__title__btn--active': active,
'v-picker__title__btn--readonly': readonly
},
on: active || readonly ? undefined : {
click
}
}, Array.isArray(content) ? content : [content]);
}
}
});
//# sourceMappingURL=index.js.map