Blame view

node_modules/bootstrap-vue/src/components/input-group/input-group-prepend.js 855 Bytes
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
import { extend, mergeData } from '../../vue'
import { NAME_INPUT_GROUP_PREPEND } from '../../constants/components'
import { omit } from '../../utils/object'
import { makePropsConfigurable } from '../../utils/props'
import { BInputGroupAddon, props as BInputGroupAddonProps } from './input-group-addon'

// --- Props ---

export const props = makePropsConfigurable(
  omit(BInputGroupAddonProps, ['append']),
  NAME_INPUT_GROUP_PREPEND
)

// --- Main component ---

// @vue/component
export const BInputGroupPrepend = /*#__PURE__*/ extend({
  name: NAME_INPUT_GROUP_PREPEND,
  functional: true,
  props,
  render(h, { props, data, children }) {
    // Pass all our data down to child, and set `append` to `true`
    return h(
      BInputGroupAddon,
      mergeData(data, {
        props: { ...props, append: false }
      }),
      children
    )
  }
})