Skip to content

Commit fb0fe46

Browse files
authored
Merge pull request #529 from VividLemon/main
ci fix and bnavbarbrand finish
2 parents 5649f9f + 7ed7c47 commit fb0fe46

File tree

2 files changed

+21
-40
lines changed

2 files changed

+21
-40
lines changed

.github/workflows/npm-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ jobs:
3939
run: pnpm test
4040

4141
- name: Publish
42-
run: pnpm publish --tag develop --filter .\packages\bootstrap-vue-3\
42+
run: pnpm publish --tag develop --filter bootstrap-vue-3
4343
env:
4444
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
Lines changed: 20 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,29 @@
11
<template>
2-
<component :is="computedTag" v-bind="attrs">
2+
<component :is="computedTag" class="navbar-brand" v-bind="props">
33
<slot />
44
</component>
55
</template>
66

7-
<script setup lang="ts">
8-
// TODO refactor this to use old setup containing BLINKPROPS and pluckprops utility
9-
import type {LinkTarget} from '../../types'
10-
import {computed} from 'vue'
11-
import type {RouteLocationRaw} from 'vue-router'
12-
// TODO this components is not done
13-
interface Props {
14-
active?: boolean
15-
activeClass?: string
16-
append?: boolean
17-
disabled?: boolean
18-
exact?: boolean
19-
exactActiveClass?: string
20-
exactPath?: boolean
21-
exactPathActiveClass?: string
22-
href?: string
23-
noPrefetch?: boolean
24-
prefetch?: boolean
25-
rel?: string
26-
replace?: boolean
27-
routerComponentName?: string
28-
tag?: string
29-
target?: LinkTarget
30-
to?: RouteLocationRaw
31-
}
7+
<script lang="ts">
8+
import {isLink, omit, pluckProps} from '../../utils'
9+
import {computed, defineComponent} from 'vue'
10+
import {BLINK_PROPS} from '../BLink/BLink.vue'
3211
33-
const props = withDefaults(defineProps<Props>(), {
34-
active: false,
35-
append: false,
36-
disabled: false,
37-
exact: false,
38-
exactPath: false,
39-
noPrefetch: false,
40-
replace: false,
41-
target: '_self',
42-
tag: 'div',
43-
})
12+
const linkProps = omit(BLINK_PROPS, ['event', 'routerTag'])
4413
45-
const computedTag = computed<string>(() => (props.to ? 'b-link' : props.href ? 'a' : props.tag))
14+
export default defineComponent({
15+
props: {
16+
tag: {type: String, default: 'div'},
17+
...linkProps,
18+
},
19+
setup(props) {
20+
const link = computed<boolean>(() => isLink(props))
21+
const computedTag = computed<string>(() => (link.value ? 'b-link' : props.tag))
4622
47-
const attrs = computed(() => ({target: props.target, href: props.href, to: props.to}))
23+
return {
24+
props: link.value ? pluckProps(linkProps, props) : {},
25+
computedTag,
26+
}
27+
},
28+
})
4829
</script>

0 commit comments

Comments
 (0)