Skip to content

Commit d4befe4

Browse files
author
sanguogege
committed
fix some error
1 parent a6ca04e commit d4befe4

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

packages/solid-element-ui/components/carousel/carousel.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from "solid-js";
1212
import { carouselVariants, type CarouselProps } from "./setting";
1313

14-
export const Carousel: Component<CarouselProps> = (props) => {
14+
export const Carousel: ParentComponent<CarouselProps> = (props) => {
1515
// 1. 拆分参数
1616
const [local, variantProps, others] = splitProps(
1717
props,
@@ -88,7 +88,9 @@ export const Carousel: Component<CarouselProps> = (props) => {
8888
<div class={styles().nav()}>
8989
<button
9090
onClick={() =>
91-
setCurrentIndex((prev) => (prev - 1 + count()) % count())
91+
setCurrentIndex(
92+
(prev) => (prev - 1 + count()) % count()
93+
)
9294
}
9395
class={styles().navButton()}
9496
>

packages/solid-element-ui/components/radio/radio-group.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
type RadioGroupContextValue,
77
} from "./setting";
88

9-
export const RadioGroup: Component<RadioGroupProps> = (props) => {
9+
export const RadioGroup: ParentComponent<RadioGroupProps> = (props) => {
1010
// 1. 拆分参数
1111
const [local, variantProps, others] = splitProps(
1212
props,

packages/solid-element-ui/components/result/result.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { splitProps, type Component, Show, createMemo } from "solid-js";
1+
import { splitProps, type ParentComponent, Show, createMemo } from "solid-js";
22
import { resultVariants, type ResultProps } from "./setting";
33

44
export const Result: ParentComponent<ResultProps> = (props) => {

packages/solid-element-ui/components/transfer/transfer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { splitProps, createMemo, type Component, createSignal, For } from "solid-js";
22
import { transferVariants, type TransferProps, type TransferItem } from "./setting";
3-
import { SeCheckbox } from "../checkbox/checkbox"; // 复用之前写的复选框
3+
import { Checkbox } from "../checkbox/checkbox"; // 复用之前写的复选框
44
import { Button } from "../button/button"; // 复用之前写的按钮
55

66
export const Transfer: Component<TransferProps> = (props) => {
@@ -67,7 +67,7 @@ export const Transfer: Component<TransferProps> = (props) => {
6767
itemDisabled: !!item.disabled,
6868
})}
6969
>
70-
<SeCheckbox
70+
<Checkbox
7171
checked={p.checked.includes(item.key)}
7272
disabled={item.disabled || variantProps.disabled}
7373
onChange={(e) => {
@@ -82,7 +82,7 @@ export const Transfer: Component<TransferProps> = (props) => {
8282
}}
8383
>
8484
<span class="text-[14px]">{item.title}</span>
85-
</SeCheckbox>
85+
</Checkbox>
8686
</div>
8787
)}
8888
</For>

0 commit comments

Comments
 (0)