Blame view

node_modules/bootstrap-vue/src/components/table/table-simple.js 1.41 KB
4cd4fd28   郭伟龙   feat: 初始化项目
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { extend } from '../../vue'
import { NAME_TABLE_SIMPLE } from '../../constants/components'
import { sortKeys } from '../../utils/object'
import { makePropsConfigurable } from '../../utils/props'
import { attrsMixin } from '../../mixins/attrs'
import { hasListenerMixin } from '../../mixins/has-listener'
import { idMixin, props as idProps } from '../../mixins/id'
import { normalizeSlotMixin } from '../../mixins/normalize-slot'
import { stackedMixin, props as stackedProps } from './helpers/mixin-stacked'
import { tableRendererMixin, props as tableRendererProps } from './helpers/mixin-table-renderer'

// --- Props ---

export const props = makePropsConfigurable(
  sortKeys({
    ...idProps,
    ...stackedProps,
    ...tableRendererProps
  }),
  NAME_TABLE_SIMPLE
)

// --- Main component ---

// @vue/component
export const BTableSimple = /*#__PURE__*/ extend({
  name: NAME_TABLE_SIMPLE,
  // Order of mixins is important!
  // They are merged from first to last, followed by this component
  mixins: [
    // General mixins
    attrsMixin,
    hasListenerMixin,
    idMixin,
    normalizeSlotMixin,
    // Required table mixins
    tableRendererMixin,
    // Table features mixins
    // Stacked requires extra handling by users via
    // the table cell `stacked-heading` prop
    stackedMixin
  ],
  props,
  computed: {
    isTableSimple() {
      return true
    }
  }
  // Render function is provided by `tableRendererMixin`
})