sard-uniapp 1.12.2 → 1.12.4
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/CHANGELOG.md +18 -0
- package/components/card/card.vue +3 -1
- package/components/card/common.d.ts +1 -0
- package/components/card/index.scss +8 -0
- package/components/card/variables.scss +1 -0
- package/components/tabbar/common.d.ts +3 -1
- package/components/tabbar-item/tabbar-item.vue +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [1.12.4](https://github.com/sutras/sard-uniapp/compare/v1.12.3...v1.12.4) (2025-04-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* tabbar-item 组件 icon 插槽新增 active 属性 ([0704e46](https://github.com/sutras/sard-uniapp/commit/0704e46cb1a87a27d62076bd962a3925086598e7))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.12.3](https://github.com/sutras/sard-uniapp/compare/v1.12.2...v1.12.3) (2025-04-03)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* card 组件新增点击态 ([cf7fbde](https://github.com/sutras/sard-uniapp/commit/cf7fbde33998fa003765eee7761228896a7766db))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
## [1.12.2](https://github.com/sutras/sard-uniapp/compare/v1.12.1...v1.12.2) (2025-04-02)
|
|
2
20
|
|
|
3
21
|
|
package/components/card/card.vue
CHANGED
|
@@ -39,7 +39,8 @@ export default _defineComponent({
|
|
|
39
39
|
rootClass: { type: String, required: false },
|
|
40
40
|
title: { type: String, required: false },
|
|
41
41
|
extra: { type: String, required: false },
|
|
42
|
-
footer: { type: String, required: false }
|
|
42
|
+
footer: { type: String, required: false },
|
|
43
|
+
hover: { type: Boolean, required: false }
|
|
43
44
|
},
|
|
44
45
|
emits: ["click"],
|
|
45
46
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -60,6 +61,7 @@ export default _defineComponent({
|
|
|
60
61
|
const cardClass = computed(() => {
|
|
61
62
|
return classNames(
|
|
62
63
|
bem.b(),
|
|
64
|
+
bem.m("hover", props.hover),
|
|
63
65
|
bem.m("headless", headless.value),
|
|
64
66
|
bem.m("footless", footless.value),
|
|
65
67
|
props.rootClass
|
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
@include universal;
|
|
6
6
|
background-color: var(--sar-card-bg);
|
|
7
7
|
border-radius: var(--sar-card-border-radius);
|
|
8
|
+
|
|
9
|
+
@include m(hover) {
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
|
|
12
|
+
&:active {
|
|
13
|
+
background-color: var(--sar-card-active-bg);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
8
16
|
}
|
|
9
17
|
|
|
10
18
|
@include e(header) {
|
|
@@ -3,6 +3,7 @@ page {
|
|
|
3
3
|
--sar-card-border-radius: var(--sar-rounded-lg);
|
|
4
4
|
--sar-card-border-color: var(--sar-border-color);
|
|
5
5
|
--sar-card-bg: var(--sar-emphasis-bg);
|
|
6
|
+
--sar-card-active-bg: var(--sar-active-bg);
|
|
6
7
|
|
|
7
8
|
--sar-card-header-padding-y: 20rpx;
|
|
8
9
|
--sar-card-header-padding-x: 32rpx;
|
|
@@ -30,7 +30,9 @@ export interface TabbarItemProps {
|
|
|
30
30
|
}
|
|
31
31
|
export interface TabbarItemSlots {
|
|
32
32
|
default?(props: Record<string, never>): any;
|
|
33
|
-
icon?(props:
|
|
33
|
+
icon?(props: {
|
|
34
|
+
active: boolean;
|
|
35
|
+
}): any;
|
|
34
36
|
}
|
|
35
37
|
export interface TabbarItemEmits {
|
|
36
38
|
(e: 'click', event: any): void;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view :class="tabbarItemClass" :style="tabbarItemStyle" @click="onClick">
|
|
3
3
|
<slot>
|
|
4
4
|
<view :class="bem.e('icon')">
|
|
5
|
-
<slot name="icon">
|
|
5
|
+
<slot name="icon" :active="isCurrent">
|
|
6
6
|
<sar-icon :name="icon" :family="iconFamily" :size="iconSize" />
|
|
7
7
|
</slot>
|
|
8
8
|
<sar-badge v-if="badge || dot" :value="badge" :dot="dot" fixed />
|