FooterToolBar.vue 877 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div :class="prefixCls" :style="{ width: barWidth, transition: '0.3s all' }">
  3. <div style="float: left">
  4. <slot name="extra">{{ extra }}</slot>
  5. </div>
  6. <div style="float: right">
  7. <slot></slot>
  8. </div>
  9. </div>
  10. </template>
  11. <script>
  12. export default {
  13. name: 'FooterToolBar',
  14. props: {
  15. prefixCls: {
  16. type: String,
  17. default: 'ant-pro-footer-toolbar'
  18. },
  19. collapsed: {
  20. type: Boolean,
  21. default: false
  22. },
  23. isMobile: {
  24. type: Boolean,
  25. default: false
  26. },
  27. siderWidth: {
  28. type: Number,
  29. default: undefined
  30. },
  31. extra: {
  32. type: [String, Object],
  33. default: ''
  34. }
  35. },
  36. computed: {
  37. barWidth () {
  38. return this.isMobile ? undefined : `calc(100% - ${this.collapsed ? 80 : this.siderWidth || 256}px)`
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="less" scoped>
  44. </style>