@bagelink/vue 1.15.239 → 1.15.241
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Image.vue.d.ts.map +1 -1
- package/dist/components/layout/Tabs.vue.d.ts +14 -1
- package/dist/components/layout/Tabs.vue.d.ts.map +1 -1
- package/dist/index.cjs +26 -26
- package/dist/index.mjs +1275 -1270
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Image.vue +6 -2
- package/src/components/layout/Tabs.vue +11 -3
package/package.json
CHANGED
package/src/components/Image.vue
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
defineOptions({ name: 'BglImage', inheritAttrs:
|
|
2
|
+
defineOptions({ name: 'BglImage', inheritAttrs: false })
|
|
3
3
|
import { Skeleton, normalizeDimension, Icon, useImageSrc } from '@bagelink/vue'
|
|
4
4
|
import { Comment, computed, useSlots, type StyleValue, type VNode } from 'vue'
|
|
5
5
|
|
|
@@ -68,14 +68,18 @@ const imgFit = computed(() => props.fit ?? 'cover')
|
|
|
68
68
|
</script>
|
|
69
69
|
|
|
70
70
|
<template>
|
|
71
|
-
<!-- Framed mode: ratio box with gradient base, blended photo, and overlay slot.
|
|
71
|
+
<!-- Framed mode: ratio box with gradient base, blended photo, and overlay slot.
|
|
72
|
+
Multi-root component → bind $attrs explicitly so class/style (e.g. flex-shrink-0) land on the frame. -->
|
|
72
73
|
<div
|
|
73
74
|
v-if="framed"
|
|
75
|
+
v-bind="$attrs"
|
|
74
76
|
class="bgl-image-frame relative overflow-hidden"
|
|
75
77
|
:class="ratioClass"
|
|
76
78
|
:style="{
|
|
77
79
|
width: normalizeDimension(width),
|
|
80
|
+
minWidth: normalizeDimension(width),
|
|
78
81
|
height: ratio ? undefined : normalizeDimension(height),
|
|
82
|
+
minHeight: ratio ? undefined : normalizeDimension(height),
|
|
79
83
|
background: gradientCss,
|
|
80
84
|
borderRadius: radiusStyle,
|
|
81
85
|
}"
|
|
@@ -20,6 +20,8 @@ const props = defineProps<{
|
|
|
20
20
|
fullWidthMobile?: boolean
|
|
21
21
|
alignTxt?: 'center' | 'start' | 'end'
|
|
22
22
|
alignTxtMobile?: 'center' | 'start' | 'end'
|
|
23
|
+
/** Horizontally center the tab bar (content panels stay full-width). */
|
|
24
|
+
center?: boolean
|
|
23
25
|
icon?: IconType
|
|
24
26
|
iconEnd?: IconType
|
|
25
27
|
iconSize?: number | string
|
|
@@ -41,6 +43,12 @@ const slctTab = computed({
|
|
|
41
43
|
},
|
|
42
44
|
})
|
|
43
45
|
|
|
46
|
+
/** Props forwarded to TabsNav — omit `center` (layout-only here). */
|
|
47
|
+
const navProps = computed(() => {
|
|
48
|
+
const { center: _center, modelValue: _mv, ...rest } = props
|
|
49
|
+
return rest
|
|
50
|
+
})
|
|
51
|
+
|
|
44
52
|
const tabComponent = defineComponent({
|
|
45
53
|
render() {
|
|
46
54
|
const currentTabIndex = props.tabs.findIndex(
|
|
@@ -55,10 +63,10 @@ const tabComponent = defineComponent({
|
|
|
55
63
|
</script>
|
|
56
64
|
|
|
57
65
|
<template>
|
|
58
|
-
<div class="bgl_tabs
|
|
59
|
-
<div class="flex justify-content-center">
|
|
66
|
+
<div class="bgl_tabs">
|
|
67
|
+
<div :class="center ? 'flex justify-content-center' : undefined">
|
|
60
68
|
<TabsNav
|
|
61
|
-
v-bind="{ ...
|
|
69
|
+
v-bind="{ ...navProps, ...attrs }"
|
|
62
70
|
v-model="slctTab"
|
|
63
71
|
:group="group"
|
|
64
72
|
/>
|