This commit is contained in:
darenhsu
2022-07-17 13:16:16 +08:00
parent 84759556ff
commit befd344ab0
28070 changed files with 4008428 additions and 1 deletions
+42
View File
@@ -0,0 +1,42 @@
// Styles
import "../../../src/components/VTimeline/VTimeline.sass";
import mixins from '../../util/mixins'; // Mixins
import Themeable from '../../mixins/themeable';
export default mixins(Themeable
/* @vue/component */
).extend({
name: 'v-timeline',
provide() {
return {
timeline: this
};
},
props: {
alignTop: Boolean,
dense: Boolean,
reverse: Boolean
},
computed: {
classes() {
return {
'v-timeline--align-top': this.alignTop,
'v-timeline--dense': this.dense,
'v-timeline--reverse': this.reverse,
...this.themeClasses
};
}
},
render(h) {
return h('div', {
staticClass: 'v-timeline',
class: this.classes
}, this.$slots.default);
}
});
//# sourceMappingURL=VTimeline.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/components/VTimeline/VTimeline.ts"],"names":[],"mappings":"AAAA;AACA,OAAO,kDAAP;AAIA,OAAO,MAAP,MAAmB,mBAAnB,C,CAEA;;AACA,OAAO,SAAP,MAAsB,wBAAtB;AAEA,eAAe,MAAM,CACnB;AACF;AAFqB,CAAN,CAGb,MAHa,CAGN;AACP,EAAA,IAAI,EAAE,YADC;;AAGP,EAAA,OAAO,GAAA;AACL,WAAO;AAAE,MAAA,QAAQ,EAAE;AAAZ,KAAP;AACD,GALM;;AAOP,EAAA,KAAK,EAAE;AACL,IAAA,QAAQ,EAAE,OADL;AAEL,IAAA,KAAK,EAAE,OAFF;AAGL,IAAA,OAAO,EAAE;AAHJ,GAPA;AAaP,EAAA,QAAQ,EAAE;AACR,IAAA,OAAO,GAAA;AACL,aAAO;AACL,iCAAyB,KAAK,QADzB;AAEL,6BAAqB,KAAK,KAFrB;AAGL,+BAAuB,KAAK,OAHvB;AAIL,WAAG,KAAK;AAJH,OAAP;AAMD;;AARO,GAbH;;AAwBP,EAAA,MAAM,CAAE,CAAF,EAAG;AACP,WAAO,CAAC,CAAC,KAAD,EAAQ;AACd,MAAA,WAAW,EAAE,YADC;AAEd,MAAA,KAAK,EAAE,KAAK;AAFE,KAAR,EAGL,KAAK,MAAL,CAAY,OAHP,CAAR;AAID;;AA7BM,CAHM,CAAf","sourcesContent":["// Styles\nimport './VTimeline.sass'\n\n// Types\nimport { VNode } from 'vue'\nimport mixins from '../../util/mixins'\n\n// Mixins\nimport Themeable from '../../mixins/themeable'\n\nexport default mixins(\n Themeable\n/* @vue/component */\n).extend({\n name: 'v-timeline',\n\n provide (): object {\n return { timeline: this }\n },\n\n props: {\n alignTop: Boolean,\n dense: Boolean,\n reverse: Boolean,\n },\n\n computed: {\n classes (): {} {\n return {\n 'v-timeline--align-top': this.alignTop,\n 'v-timeline--dense': this.dense,\n 'v-timeline--reverse': this.reverse,\n ...this.themeClasses,\n }\n },\n },\n\n render (h): VNode {\n return h('div', {\n staticClass: 'v-timeline',\n class: this.classes,\n }, this.$slots.default)\n },\n})\n"],"sourceRoot":"","file":"VTimeline.js"}
+103
View File
@@ -0,0 +1,103 @@
// Types
import mixins from '../../util/mixins';
import VIcon from '../VIcon'; // Mixins
import Themeable from '../../mixins/themeable';
import Colorable from '../../mixins/colorable';
const baseMixins = mixins(Colorable, Themeable
/* @vue/component */
);
export default baseMixins.extend().extend({
name: 'v-timeline-item',
inject: ['timeline'],
props: {
color: {
type: String,
default: 'primary'
},
fillDot: Boolean,
hideDot: Boolean,
icon: String,
iconColor: String,
large: Boolean,
left: Boolean,
right: Boolean,
small: Boolean
},
computed: {
hasIcon() {
return !!this.icon || !!this.$slots.icon;
}
},
methods: {
genBody() {
return this.$createElement('div', {
staticClass: 'v-timeline-item__body'
}, this.$slots.default);
},
genIcon() {
if (this.$slots.icon) {
return this.$slots.icon;
}
return this.$createElement(VIcon, {
props: {
color: this.iconColor,
dark: !this.theme.isDark,
small: this.small
}
}, this.icon);
},
genInnerDot() {
const data = this.setBackgroundColor(this.color);
return this.$createElement('div', {
staticClass: 'v-timeline-item__inner-dot',
...data
}, [this.hasIcon && this.genIcon()]);
},
genDot() {
return this.$createElement('div', {
staticClass: 'v-timeline-item__dot',
class: {
'v-timeline-item__dot--small': this.small,
'v-timeline-item__dot--large': this.large
}
}, [this.genInnerDot()]);
},
genDivider() {
const children = [];
if (!this.hideDot) children.push(this.genDot());
return this.$createElement('div', {
staticClass: 'v-timeline-item__divider'
}, children);
},
genOpposite() {
return this.$createElement('div', {
staticClass: 'v-timeline-item__opposite'
}, this.$slots.opposite);
}
},
render(h) {
const children = [this.genBody(), this.genDivider()];
if (this.$slots.opposite) children.push(this.genOpposite());
return h('div', {
staticClass: 'v-timeline-item',
class: {
'v-timeline-item--fill-dot': this.fillDot,
'v-timeline-item--before': this.timeline.reverse ? this.right : this.left,
'v-timeline-item--after': this.timeline.reverse ? this.left : this.right,
...this.themeClasses
}
}, children);
}
});
//# sourceMappingURL=VTimelineItem.js.map
File diff suppressed because one or more lines are too long
+10
View File
@@ -0,0 +1,10 @@
import VTimeline from './VTimeline';
import VTimelineItem from './VTimelineItem';
export { VTimeline, VTimelineItem };
export default {
$_vuetify_subcomponents: {
VTimeline,
VTimelineItem
}
};
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/components/VTimeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAP,MAAsB,aAAtB;AACA,OAAO,aAAP,MAA0B,iBAA1B;AAEA,SAAS,SAAT,EAAoB,aAApB;AAEA,eAAe;AACb,EAAA,uBAAuB,EAAE;AACvB,IAAA,SADuB;AAEvB,IAAA;AAFuB;AADZ,CAAf","sourcesContent":["import VTimeline from './VTimeline'\nimport VTimelineItem from './VTimelineItem'\n\nexport { VTimeline, VTimelineItem }\n\nexport default {\n $_vuetify_subcomponents: {\n VTimeline,\n VTimelineItem,\n },\n}\n"],"sourceRoot":"","file":"index.js"}