@hlw-uni/mp-vue 2.1.16 → 2.1.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni/mp-vue",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "description": "hlw-uni 小程序运行时 — Vue 组件 + composables + theme + http + 工具集(合并自原 mp-core)",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -1,5 +1,8 @@
1
1
  <template>
2
- <view class="hlw-card-header">
2
+ <view
3
+ class="hlw-card-header"
4
+ :class="{ 'hlw-card-header--divider': divider }"
5
+ >
3
6
  <view class="hlw-card-header__left">
4
7
  <slot name="left">
5
8
  <text v-if="icon" class="hlw-card-header__icon" :class="icon" />
@@ -54,12 +57,15 @@ interface Props {
54
57
  icon?: string;
55
58
  /** 右侧附加文字(无 right slot 时显示) */
56
59
  extra?: string;
60
+ /** 是否在头部底部显示虚线分隔线,默认 false。线型由 CSS 变量 `--card-header-divider-style`(默认 dashed)控制 */
61
+ divider?: boolean;
57
62
  }
58
63
 
59
64
  const props = withDefaults(defineProps<Props>(), {
60
65
  title: "",
61
66
  icon: "",
62
67
  extra: "",
68
+ divider: false,
63
69
  });
64
70
 
65
71
  const slots = useSlots();
@@ -79,6 +85,13 @@ defineOptions({
79
85
  justify-content: space-between;
80
86
  padding: 24rpx 28rpx;
81
87
  box-sizing: border-box;
88
+
89
+ &--divider {
90
+ border-bottom:
91
+ var(--card-header-divider-width, 1rpx)
92
+ var(--card-header-divider-style, dashed)
93
+ var(--card-header-divider-color, var(--border-color, #e2e8f0));
94
+ }
82
95
  }
83
96
 
84
97
  .hlw-card-header__left {