项目原始demo,不改动
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Este repositório está arquivado. Pode ver ficheiros e cloná-lo, mas não pode fazer envios ou lançar questões ou pedidos de integração.
 
 
 
 

88 linhas
2.3 KiB

  1. // Styles
  2. import "../../../src/components/VFooter/VFooter.sass"; // Mixins
  3. import Applicationable from '../../mixins/applicationable';
  4. import VSheet from '../VSheet/VSheet';
  5. import SSRBootable from '../../mixins/ssr-bootable'; // Utilities
  6. import mixins from '../../util/mixins';
  7. import { convertToUnit } from '../../util/helpers';
  8. /* @vue/component */
  9. export default mixins(VSheet, Applicationable('footer', ['height', 'inset']), SSRBootable).extend({
  10. name: 'v-footer',
  11. props: {
  12. height: {
  13. default: 'auto',
  14. type: [Number, String]
  15. },
  16. inset: Boolean,
  17. padless: Boolean,
  18. tile: {
  19. type: Boolean,
  20. default: true
  21. }
  22. },
  23. computed: {
  24. applicationProperty() {
  25. return this.inset ? 'insetFooter' : 'footer';
  26. },
  27. classes() {
  28. return { ...VSheet.options.computed.classes.call(this),
  29. 'v-footer--absolute': this.absolute,
  30. 'v-footer--fixed': !this.absolute && (this.app || this.fixed),
  31. 'v-footer--padless': this.padless,
  32. 'v-footer--inset': this.inset
  33. };
  34. },
  35. computedBottom() {
  36. if (!this.isPositioned) return undefined;
  37. return this.app ? this.$vuetify.application.bottom : 0;
  38. },
  39. computedLeft() {
  40. if (!this.isPositioned) return undefined;
  41. return this.app && this.inset ? this.$vuetify.application.left : 0;
  42. },
  43. computedRight() {
  44. if (!this.isPositioned) return undefined;
  45. return this.app && this.inset ? this.$vuetify.application.right : 0;
  46. },
  47. isPositioned() {
  48. return Boolean(this.absolute || this.fixed || this.app);
  49. },
  50. styles() {
  51. const height = parseInt(this.height);
  52. return { ...VSheet.options.computed.styles.call(this),
  53. height: isNaN(height) ? height : convertToUnit(height),
  54. left: convertToUnit(this.computedLeft),
  55. right: convertToUnit(this.computedRight),
  56. bottom: convertToUnit(this.computedBottom)
  57. };
  58. }
  59. },
  60. methods: {
  61. updateApplication() {
  62. const height = parseInt(this.height);
  63. return isNaN(height) ? this.$el ? this.$el.clientHeight : 0 : height;
  64. }
  65. },
  66. render(h) {
  67. const data = this.setBackgroundColor(this.color, {
  68. staticClass: 'v-footer',
  69. class: this.classes,
  70. style: this.styles
  71. });
  72. return h('footer', data, this.$slots.default);
  73. }
  74. });
  75. //# sourceMappingURL=VFooter.js.map