sard-uniapp 1.12.2 → 1.12.3

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 CHANGED
@@ -1,3 +1,12 @@
1
+ ## [1.12.3](https://github.com/sutras/sard-uniapp/compare/v1.12.2...v1.12.3) (2025-04-03)
2
+
3
+
4
+ ### Features
5
+
6
+ * card 组件新增点击态 ([cf7fbde](https://github.com/sutras/sard-uniapp/commit/cf7fbde33998fa003765eee7761228896a7766db))
7
+
8
+
9
+
1
10
  ## [1.12.2](https://github.com/sutras/sard-uniapp/compare/v1.12.1...v1.12.2) (2025-04-02)
2
11
 
3
12
 
@@ -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,7 @@ export interface CardProps {
5
5
  title?: string;
6
6
  extra?: string;
7
7
  footer?: string;
8
+ hover?: boolean;
8
9
  }
9
10
  export interface CardSlots {
10
11
  default?(props: Record<string, never>): any;
@@ -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;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "id": "sard-uniapp",
3
3
  "name": "sard-uniapp",
4
4
  "displayName": "sard-uniapp",
5
- "version": "1.12.2",
5
+ "version": "1.12.3",
6
6
  "description": "sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库",
7
7
  "main": "index.js",
8
8
  "scripts": {