@@ -1,3 +1,8 @@
+## 1.0.7 <font size=1>2025-04-30</font>
+
+- 修复部分类型错误。
+- 修复 `id_ID` 语言文件错误。
## 1.0.6 <font size=1>2025-04-27</font>
- 修复 Input 组件,详见 [Input](https://stdf.design/components?nav=input&tab=4)。
+- Fixed some type errors.
+- Fixed `id_ID` language file error.
- Fixed Input component, please see [Input](https://stdf.design/components?nav=input&tab=4).
@@ -1,6 +1,6 @@
{
"name": "stdf",
- "version": "1.0.6",
+ "version": "1.0.7",
"description": "Mobile web component library based on Svelte and Tailwind",
"author": "any-tdf",
"funding": "https://stdf.design?fund",
@@ -390,7 +390,7 @@
class:!rounded-r-sm={radius === 'sm' &&
mode === 'range' &&
(selectedDateStr.indexOf(`${item.year}${item.month}${day.text}`) === selectedDateStr.length - 8 || day.end)}
- class:!rounded-sm={radius === 'sn' && mode !== 'range'}
+ class:!rounded-sm={radius === 'sm' && mode !== 'range'}
>
<div
class="{radiusClass[radius] || 'rounded-xl'} relative flex h-full w-full flex-col justify-center {day.info
@@ -18,7 +18,7 @@
{#if children}
{@render children()}
{:else}
- <svg width={size} height={size === 'full' ? '100%' : size} style="fill: currentColor;fill-opacity: {alpha};display: inline;">
+ <svg width={size} height={size === 'full' ? '100%' : size} class="inline fill-current" style="fill-opacity: {alpha};">
<use xlink:href="/{path}#{name}" />
</svg>
{/if}
@@ -57,7 +57,7 @@
//垂直滚动时的处理
//Processing when scrolling vertically
- let times: number | null = null;
+ let times: NodeJS.Timeout | null = null;
let currentIndex = $state(0);
let textListVertical = [...textList, textList[0]];
let isTransition = $state(true);
@@ -5,8 +5,8 @@
pageCol: number;
Pages: number[];
maxShowPage: number;
- radius: string;
- type: string;
+ radius: 'sm' | 'md' | 'lg' | 'xl' | 'full' | 'none';
+ type: 'border' | 'block' | 'bold';
onclickItem: (index: number) => void;
};
let { pageCol = 3, Pages = [], maxShowPage = 9, radius = 'md', type = 'bold', onclickItem }: Props = $props();
let { pageCol = 3, Pages = [], maxShowPage = 7, radius = 'md', type = 'bold', onclickItem }: Props = $props();
@@ -63,7 +63,7 @@
<div class="flex flex-col space-y-2">
<!-- eslint-disable-next-line @typescript-eslint/no-unused-vars -->
{#each new Array(lines - 1) as _}
- <div class="bg-black/20 dark:bg-white/20 w-full{heightObj[height] || heightObj['6']}{radiusObj[radius] || radiusObj.base}"></div>
+ <div class="bg-black/20 dark:bg-white/20 w-full{heightObj[height] || heightObj['6']}{radiusObj[radius] || radiusObj.sm}"></div>
{/each}
class="bg-black/20 dark:bg-white/20 {randomArr[Math.floor(Math.random() * randomArr.length)]}{heightObj[height] ||
@@ -181,7 +181,7 @@
//定时器
// timer
- let intervalTime: number | null = null;
+ let intervalTime: ReturnType<typeof setInterval>;
//定时器执行函数
// timer function
const intervalTimeFun = () => {
@@ -65,7 +65,7 @@ const id_ID: LangProps = {
defaultMinute: 'Menit',
defaultSecond: 'Kedua'
},
- kalender: {
+ calendar: {
weekTextList: ['Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab', 'Ming'],
weekSundayStartTextList: ['Ming', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
monthTextList: [
@@ -29,10 +29,10 @@
</a>
<div class="flex flex-col py-4">
<div>
- {#each menuList as menu}
+ {#each menuList as menu (menu.class)}
<div class="mb-2 mt-8 px-4 text-sm text-gray-500">{isZh ? menu.class : menu.class_en}</div>
<CellGroup>
- {#each menu.childs as child, i}
+ {#each menu.childs as child, i (child.nav)}
<a href={child.nav + (isZh ? '/zh_CN' : '/en_US')}>
<Cell
title={isZh ? child.title : child.title_en}
@@ -36,7 +36,7 @@
let visible32 = $state(false);
let time = $state(4);
- let timer: number | null = null;
+ let timer: ReturnType<typeof setInterval>;
const useSnippetFun = () => {
visible25 = true;
timer = setInterval(() => {