Quellcode durchsuchen

[demo]Update somem file by jsdoc

dufu1991 vor 1 Jahr
Ursprung
Commit
999a0674e6

+ 6 - 4
demo/src/routes/en_US/actionSheet/+page.svelte

@@ -17,26 +17,28 @@
 
 	const actions = [{ content: 'Option one' }, { content: 'Option two' }, { content: 'Option three' }];
 
-	/** @type {import('../../../../../packages/stdf/index.d').Action[]} */
+	/** @typedef {import('../../../../../packages/stdf/index.d').Action[]} Actions */
+
+	/** @type {Actions} */
 	const actions1 = [
 		{ content: 'Normal option' },
 		{ content: 'Theme option', style: 'theme' },
 		{ content: 'Disabled option', style: 'disabled' },
 		{ content: 'Danger option', style: 'danger' },
 	];
-	/** @type {import('../../../../../packages/stdf/index.d').Action[]} */
+	/** @type {Actions} */
 	const actions2 = [
 		{ content: 'Option one' },
 		{ content: 'Option two', desc: 'Here is the description information' },
 		{ content: 'Option three', style: 'danger', desc: 'Here is the description information' },
 	];
-	/** @type {import('../../../../../packages/stdf/index.d').Action[]} */
+	/** @type {Actions} */
 	const actions3 = [
 		{ content: 'Lina', showImg: true, imgSrc: '/assets/images/dota_火女.png', imgRadius: 'base' },
 		{ content: 'SB', showImg: true, imgSrc: '/assets/images/dota_小牛.png', imgRadius: 'base' },
 		{ content: 'Morph', showImg: true, imgSrc: '/assets/images/dota_水人.png', imgRadius: 'base' },
 	];
-	/** @type {import('../../../../../packages/stdf/index.d').Action[]} */
+	/** @type {Actions} */
 	const actions4 = [
 		{ content: 'Apple', showImg: true, imgSrc: '/assets/logos/apple.png', imgRadius: 'none' },
 		{ content: 'Google', showImg: true, imgSrc: '/assets/logos/google.png', imgRadius: 'none' },

+ 54 - 119
demo/src/routes/en_US/steps/+page.svelte

@@ -4,6 +4,8 @@
 	import injCom1 from './injCom1_en.svelte';
 	import injCom2 from './injCom2_en.svelte';
 
+	/** @typedef {import('../../../../../packages/stdf/index.d').StepsItem[]} StepsItems */
+
 	const steps = [
 		{ step: { title: 'Get up' } },
 		{ step: { title: 'Eat' } },
@@ -11,12 +13,13 @@
 		{ step: { title: 'Beat beans' } },
 		{ step: { title: 'sleep' } },
 	];
+	/** @type {StepsItems} */
 	const steps1 = [
-		{ step: { title: 'Get up', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } } },
-		{ step: { title: 'Eat', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } } },
-		{ step: { title: 'Drink', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } } },
-		{ step: { title: 'Beat beans', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } } } },
-		{ step: { title: 'sleep', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } } },
+		{ step: { title: 'Get up', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } } },
+		{ step: { title: 'Eat', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } } },
+		{ step: { title: 'Drink', bar: { type: 'icon', content: { name: 'ri-cup-line' } } } },
+		{ step: { title: 'Beat beans', bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } } } },
+		{ step: { title: 'sleep', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } } },
 	];
 	const steps2 = [
 		{ step: { title: 'Get up' }, finishStep: { title: 'Have got up' } },
@@ -25,26 +28,27 @@
 		{ step: { title: 'Beat beans' }, finishStep: { title: 'Have a good time' } },
 		{ step: { title: 'sleep' }, finishStep: { title: 'Fall asleep' } },
 	];
+	/** @type {StepsItems} */
 	const steps3 = [
 		{
-			step: { title: 'Get up', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } },
-			finishStep: { title: 'Have got up', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-fill' } } },
+			step: { title: 'Get up', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } },
+			finishStep: { title: 'Have got up', bar: { type: 'icon', content: { name: 'ri-hotel-bed-fill' } } },
 		},
 		{
-			step: { title: 'Eat', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } },
-			finishStep: { title: 'Have had enough', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-fill' } } },
+			step: { title: 'Eat', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } },
+			finishStep: { title: 'Have had enough', bar: { type: 'icon', content: { name: 'ri-restaurant-2-fill' } } },
 		},
 		{
-			step: { title: 'Drink', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } },
-			finishStep: { title: 'Drink up', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-fill' } } },
+			step: { title: 'Drink', bar: { type: 'icon', content: { name: 'ri-cup-line' } } },
+			finishStep: { title: 'Drink up', bar: { type: 'icon', content: { name: 'ri-cup-fill' } } },
 		},
 		{
-			step: { title: 'Beat beans', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } } },
-			finishStep: { title: 'Have a good time', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-fill' } } },
+			step: { title: 'Beat beans', bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } } },
+			finishStep: { title: 'Have a good time', bar: { type: 'icon', content: { name: 'ri-emotion-sad-fill' } } },
 		},
 		{
-			step: { title: 'sleep', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } },
-			finishStep: { title: 'Fall asleep', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-fill' } } },
+			step: { title: 'sleep', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } },
+			finishStep: { title: 'Fall asleep', bar: { type: 'icon', content: { name: 'ri-zzz-fill' } } },
 		},
 	];
 	const steps4 = [
@@ -59,161 +63,92 @@
 		},
 		{ step: { title: 'sleep', desc: 'Too full to sleep.' } },
 	];
+	/** @type {StepsItems} */
 	const steps5 = [
-		{
-			step: {
-				title: 'Get up',
-				desc: 'Get up and move bricks!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } },
-			},
-		},
-		{
-			step: {
-				title: 'Eat',
-				desc: 'Eat, eat, eat, eat, fat you.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
-			},
-		},
-		{
-			step: {
-				title: 'Drink',
-				desc: 'Walk slowly and drink lots of water.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
-			},
-		},
+		{ step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } } },
+		{ step: { title: 'Eat', desc: 'Eat, eat, eat, eat, fat you.', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } } },
+		{ step: { title: 'Drink', desc: 'Walk slowly and drink lots of water.', bar: { type: 'icon', content: { name: 'ri-cup-line' } } } },
 		{
 			step: {
 				title: 'Beat beans',
 				desc: "Eat, sleep, play peas It's cool, it's cool, it's cool, it's cool, it's cool. By the way to verify the progress bar height adaptive step text height.",
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
+				bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } },
 			},
 		},
-		{
-			step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } },
-		},
+		{ step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } } },
 	];
+	/** @type {StepsItems} */
 	const steps6 = [
 		{
-			step: {
-				title: 'Get up',
-				desc: 'Get up and move bricks!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } },
-			},
-			finishStep: {
-				title: 'Have got up',
-				desc: 'The bricks are gone!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-fill' } },
-			},
+			step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } },
+			finishStep: { title: 'Have got up', desc: 'The bricks are gone!', bar: { type: 'icon', content: { name: 'ri-hotel-bed-fill' } } },
 		},
 		{
-			step: {
-				title: 'Eat',
-				desc: 'Eat, eat, eat, eat, fat you.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
-			},
+			step: { title: 'Eat', desc: 'Eat, eat, eat, eat, fat you.', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } },
 			finishStep: {
 				title: 'Have had enough',
 				desc: 'The meal has been eaten up!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-fill' } },
+				bar: { type: 'icon', content: { name: 'ri-restaurant-2-fill' } },
 			},
 		},
 		{
-			step: {
-				title: 'Drink',
-				desc: 'Walk slowly and drink lots of water.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
-			},
+			step: { title: 'Drink', desc: 'Walk slowly and drink lots of water.', bar: { type: 'icon', content: { name: 'ri-cup-line' } } },
 			finishStep: {
 				title: 'Drink up',
 				desc: 'I drink too much water and it spills out of my eyes!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-fill' } },
+				bar: { type: 'icon', content: { name: 'ri-cup-fill' } },
 			},
 		},
 		{
-			step: {
-				title: 'Beat beans',
-				desc: 'Eat, sleep, play beans.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
-			},
+			step: { title: 'Beat beans', desc: 'Eat, sleep, play beans.', bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } } },
 			finishStep: {
 				title: 'Have a good time',
 				desc: 'Doudou has been beaten to the ground.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-fill' } },
+				bar: { type: 'icon', content: { name: 'ri-emotion-sad-fill' } },
 			},
 		},
 		{
-			step: {
-				title: 'sleep',
-				desc: 'Too full to sleep.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } },
-			},
-			finishStep: {
-				title: 'Fall asleep',
-				desc: 'Asleep and dreaming!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-fill' } },
-			},
+			step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } },
+			finishStep: { title: 'Fall asleep', desc: 'Asleep and dreaming!', bar: { type: 'icon', content: { name: 'ri-zzz-fill' } } },
 		},
 	];
+	/** @type {StepsItems} */
 	const steps7 = [
-		{ step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: /** @type {"string"} */ ('string'), content: '1' } } },
-		{ step: { title: 'Eat', desc: 'Eat, eat, eat, eat, fat you.', bar: { type: /** @type {"string"} */ ('string'), content: 'eat' } } },
-		{
-			step: {
-				title: 'Drink',
-				desc: 'Walk slowly and drink lots of water.',
-				bar: { type: /** @type {"string"} */ ('string'), content: '3' },
-			},
-		},
-		{
-			step: {
-				title: 'Beat beans',
-				desc: 'Eat, sleep, play beans.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
-			},
-		},
-		{ step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: /** @type {"string"} */ ('string'), content: '😴' } } },
+		{ step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: 'string', content: '1' } } },
+		{ step: { title: 'Eat', desc: 'Eat, eat, eat, eat, fat you.', bar: { type: 'string', content: 'eat' } } },
+		{ step: { title: 'Drink', desc: 'Walk slowly and drink lots of water.', bar: { type: 'string', content: '3' } } },
+		{ step: { title: 'Beat beans', desc: 'Eat, sleep, play beans.', bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } } } },
+		{ step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: 'string', content: '😴' } } },
 	];
+	/** @type {StepsItems} */
 	const steps8 = [
-		{ step: { title: 'Get up', bar: { type: /** @type {"image"} */ ('image'), content: '/assets/images/avatar_2.png' } } },
-		{ step: { title: 'Eat', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } } },
-		{ step: { title: 'Drink', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } } },
-		{ step: { title: 'Beat beans', bar: { type: /** @type {"image"} */ ('image'), content: '/assets/images/avatar_1.jpg' } } },
-		{ step: { title: 'sleep', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } } },
+		{ step: { title: 'Get up', bar: { type: 'image', content: '/assets/images/avatar_2.png' } } },
+		{ step: { title: 'Eat', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } } },
+		{ step: { title: 'Drink', bar: { type: 'icon', content: { name: 'ri-cup-line' } } } },
+		{ step: { title: 'Beat beans', bar: { type: 'image', content: '/assets/images/avatar_1.jpg' } } },
+		{ step: { title: 'sleep', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } } },
 	];
+	/** @type {StepsItems} */
 	const steps9 = [
-		{
-			step: {
-				title: 'Get up',
-				desc: 'Get up and move bricks!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } },
-			},
-		},
+		{ step: { title: 'Get up', desc: 'Get up and move bricks!', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } } },
 		{
 			step: {
 				title: 'Eat',
 				desc: 'Eat, eat, eat, eat, fat you.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
+				bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } },
 				injComponent: injCom1,
 			},
 		},
-		{
-			step: {
-				title: 'Drink',
-				desc: 'Walk slowly and drink lots of water.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
-			},
-		},
+		{ step: { title: 'Drink', desc: 'Walk slowly and drink lots of water.', bar: { type: 'icon', content: { name: 'ri-cup-line' } } } },
 		{
 			step: {
 				title: 'Beat beans',
 				desc: 'Eat, sleep, play beans.',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
+				bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } },
 				injComponent: injCom2,
 			},
 		},
-		{
-			step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } },
-		},
+		{ step: { title: 'sleep', desc: 'Too full to sleep.', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } } },
 	];
 
 	let current = $state(1);

+ 6 - 4
demo/src/routes/zh_CN/actionSheet/+page.svelte

@@ -17,26 +17,28 @@
 
 	const actions = [{ content: '选项一' }, { content: '选项二' }, { content: '选项三' }];
 
-	/** @type {import('../../../../../packages/stdf/index.d').Action[]} */
+	/** @typedef {import('../../../../../packages/stdf/index.d').Action[]} Actions */
+
+	/** @type {Actions} */
 	const actions1 = [
 		{ content: '常规选项' },
 		{ content: '主题选项', style: 'theme' },
 		{ content: '禁用选项', style: 'disabled' },
 		{ content: '警告选项', style: 'danger' },
 	];
-	/** @type {import('../../../../../packages/stdf/index.d').Action[]} */
+	/** @type {Actions} */
 	const actions2 = [
 		{ content: '选项一' },
 		{ content: '选项二', desc: '这里是描述信息' },
 		{ content: '选项三', style: 'danger', desc: '这里是描述信息' },
 	];
-	/** @type {import('../../../../../packages/stdf/index.d').Action[]} */
+	/** @type {Actions} */
 	const actions3 = [
 		{ content: '火女', showImg: true, imgSrc: '/assets/images/dota_火女.png', imgRadius: 'base' },
 		{ content: '小牛', showImg: true, imgSrc: '/assets/images/dota_小牛.png', imgRadius: 'base' },
 		{ content: '水人', showImg: true, imgSrc: '/assets/images/dota_水人.png', imgRadius: 'base' },
 	];
-	/** @type {import('../../../../../packages/stdf/index.d').Action[]} */
+	/** @type {Actions} */
 	const actions4 = [
 		{ content: 'Apple', showImg: true, imgSrc: '/assets/logos/apple.png', imgRadius: 'none' },
 		{ content: 'Google', showImg: true, imgSrc: '/assets/logos/google.png', imgRadius: 'none' },

+ 54 - 109
demo/src/routes/zh_CN/steps/+page.svelte

@@ -4,6 +4,8 @@
 	import injCom1 from './injCom1.svelte';
 	import injCom2 from './injCom2.svelte';
 
+	/** @typedef {import('../../../../../packages/stdf/index.d').StepsItem[]} StepsItems */
+
 	const steps = [
 		{ step: { title: '起床' } },
 		{ step: { title: '吃饭' } },
@@ -11,12 +13,13 @@
 		{ step: { title: '打豆豆' } },
 		{ step: { title: '睡觉' } },
 	];
+	/** @type {StepsItems} */
 	const steps1 = [
-		{ step: { title: '起床', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } } },
-		{ step: { title: '吃饭', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } } },
-		{ step: { title: '喝水', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } } },
-		{ step: { title: '打豆豆', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } } } },
-		{ step: { title: '睡觉', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } } },
+		{ step: { title: '起床', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } } },
+		{ step: { title: '吃饭', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } } },
+		{ step: { title: '喝水', bar: { type: 'icon', content: { name: 'ri-cup-line' } } } },
+		{ step: { title: '打豆豆', bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } } } },
+		{ step: { title: '睡觉', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } } },
 	];
 	const steps2 = [
 		{ step: { title: '起床' }, finishStep: { title: '已起床' } },
@@ -25,26 +28,27 @@
 		{ step: { title: '打豆豆' }, finishStep: { title: '打爽了' } },
 		{ step: { title: '睡觉' }, finishStep: { title: '睡着了' } },
 	];
+	/** @type {StepsItems} */
 	const steps3 = [
 		{
-			step: { title: '起床', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } },
-			finishStep: { title: '已起床', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-fill' } } },
+			step: { title: '起床', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } },
+			finishStep: { title: '已起床', bar: { type: 'icon', content: { name: 'ri-hotel-bed-fill' } } },
 		},
 		{
-			step: { title: '吃饭', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } },
-			finishStep: { title: '吃饱了', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-fill' } } },
+			step: { title: '吃饭', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } },
+			finishStep: { title: '吃饱了', bar: { type: 'icon', content: { name: 'ri-restaurant-2-fill' } } },
 		},
 		{
-			step: { title: '喝水', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } },
-			finishStep: { title: '喝足了', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-fill' } } },
+			step: { title: '喝水', bar: { type: 'icon', content: { name: 'ri-cup-line' } } },
+			finishStep: { title: '喝足了', bar: { type: 'icon', content: { name: 'ri-cup-fill' } } },
 		},
 		{
-			step: { title: '打豆豆', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } } },
-			finishStep: { title: '打爽了', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-fill' } } },
+			step: { title: '打豆豆', bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } } },
+			finishStep: { title: '打爽了', bar: { type: 'icon', content: { name: 'ri-emotion-sad-fill' } } },
 		},
 		{
-			step: { title: '睡觉', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } },
-			finishStep: { title: '睡着了', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-fill' } } },
+			step: { title: '睡觉', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } },
+			finishStep: { title: '睡着了', bar: { type: 'icon', content: { name: 'ri-zzz-fill' } } },
 		},
 	];
 	const steps4 = [
@@ -59,139 +63,80 @@
 		},
 		{ step: { title: '睡觉', desc: '吃太饱,睡不着。' } },
 	];
+	/** @type {StepsItems} */
 	const steps5 = [
-		{
-			step: { title: '起床', desc: '起床搬砖了!', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } },
-		},
-		{
-			step: {
-				title: '吃饭',
-				desc: '吃吃吃,肥死你。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
-			},
-		},
-		{
-			step: {
-				title: '喝水',
-				desc: '慢慢走路,多多喝水。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
-			},
-		},
+		{ step: { title: '起床', desc: '起床搬砖了!', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } } },
+		{ step: { title: '吃饭', desc: '吃吃吃,肥死你。', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } } },
+		{ step: { title: '喝水', desc: '慢慢走路,多多喝水。', bar: { type: 'icon', content: { name: 'ri-cup-line' } } } },
 		{
 			step: {
 				title: '打豆豆',
 				desc: '吃饭睡觉,打豆豆很爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽爽。顺便验证进度条高度自适应步骤文字高度。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
+				bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } },
 			},
 		},
-		{ step: { title: '睡觉', desc: '吃太饱,睡不着。', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } } },
+		{ step: { title: '睡觉', desc: '吃太饱,睡不着。', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } } },
 	];
+	/** @type {StepsItems} */
 	const steps6 = [
 		{
-			step: { title: '起床', desc: '起床搬砖了!', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } },
-			finishStep: {
-				title: '已起床',
-				desc: '砖已经搬完了!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-fill' } },
-			},
+			step: { title: '起床', desc: '起床搬砖了!', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } },
+			finishStep: { title: '已起床', desc: '砖已经搬完了!', bar: { type: 'icon', content: { name: 'ri-hotel-bed-fill' } } },
 		},
 		{
-			step: {
-				title: '吃饭',
-				desc: '吃吃吃,肥死你。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
-			},
-			finishStep: {
-				title: '吃饱了',
-				desc: '饭已经全部被吃完了!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-fill' } },
-			},
+			step: { title: '吃饭', desc: '吃吃吃,肥死你。', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } },
+			finishStep: { title: '吃饱了', desc: '饭已经全部被吃完了!', bar: { type: 'icon', content: { name: 'ri-restaurant-2-fill' } } },
 		},
 		{
-			step: {
-				title: '喝水',
-				desc: '慢慢走路,多多喝水。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
-			},
-			finishStep: {
-				title: '喝足了',
-				desc: '水喝太多,从眼睛里溢出来了!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-fill' } },
-			},
+			step: { title: '喝水', desc: '慢慢走路,多多喝水。', bar: { type: 'icon', content: { name: 'ri-cup-line' } } },
+			finishStep: { title: '喝足了', desc: '水喝太多,从眼睛里溢出来了!', bar: { type: 'icon', content: { name: 'ri-cup-fill' } } },
 		},
 		{
-			step: {
-				title: '打豆豆',
-				desc: '吃饭睡觉,打豆豆。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
-			},
-			finishStep: {
-				title: '打爽了',
-				desc: '豆豆已经被打趴下了。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-fill' } },
-			},
+			step: { title: '打豆豆', desc: '吃饭睡觉,打豆豆。', bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } } },
+			finishStep: { title: '打爽了', desc: '豆豆已经被打趴下了。', bar: { type: 'icon', content: { name: 'ri-emotion-sad-fill' } } },
 		},
 		{
-			step: {
-				title: '睡觉',
-				desc: '吃太饱,睡不着。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } },
-			},
-			finishStep: {
-				title: '睡着了',
-				desc: '睡着了正在做梦呢!',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-fill' } },
-			},
+			step: { title: '睡觉', desc: '吃太饱,睡不着。', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } },
+			finishStep: { title: '睡着了', desc: '睡着了正在做梦呢!', bar: { type: 'icon', content: { name: 'ri-zzz-fill' } } },
 		},
 	];
+	/** @type {StepsItems} */
 	const steps7 = [
-		{ step: { title: '起床', desc: '起床搬砖了!', bar: { type: /** @type {"string"} */ ('string'), content: '1' } } },
-		{ step: { title: '吃饭', desc: '吃吃吃,肥死你。', bar: { type: /** @type {"string"} */ ('string'), content: '吃' } } },
-		{ step: { title: '喝水', desc: '慢慢走路,多多喝水。', bar: { type: /** @type {"string"} */ ('string'), content: '3' } } },
-		{
-			step: {
-				title: '打豆豆',
-				desc: '吃饭睡觉,打豆豆。',
-				bar: { type: /** @type {"string"} */ ('string'), content: '5' },
-			},
-		},
-		{ step: { title: '睡觉', desc: '吃太饱,睡不着。', bar: { type: /** @type {"string"} */ ('string'), content: '😴' } } },
+		{ step: { title: '起床', desc: '起床搬砖了!', bar: { type: 'string', content: '1' } } },
+		{ step: { title: '吃饭', desc: '吃吃吃,肥死你。', bar: { type: 'string', content: '吃' } } },
+		{ step: { title: '喝水', desc: '慢慢走路,多多喝水。', bar: { type: 'string', content: '3' } } },
+		{ step: { title: '打豆豆', desc: '吃饭睡觉,打豆豆。', bar: { type: 'string', content: '5' } } },
+		{ step: { title: '睡觉', desc: '吃太饱,睡不着。', bar: { type: 'string', content: '😴' } } },
 	];
+	/** @type {StepsItems} */
 	const steps8 = [
-		{ step: { title: '起床', bar: { type: /** @type {"image"} */ ('image'), content: '/assets/images/avatar_2.png' } } },
-		{ step: { title: '吃饭', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } } } },
-		{ step: { title: '喝水', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } } } },
-		{ step: { title: '打豆豆', bar: { type: /** @type {"image"} */ ('image'), content: '/assets/images/avatar_1.jpg' } } },
-		{ step: { title: '睡觉', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } } },
+		{ step: { title: '起床', bar: { type: 'image', content: '/assets/images/avatar_2.png' } } },
+		{ step: { title: '吃饭', bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } } } },
+		{ step: { title: '喝水', bar: { type: 'icon', content: { name: 'ri-cup-line' } } } },
+		{ step: { title: '打豆豆', bar: { type: 'image', content: '/assets/images/avatar_1.jpg' } } },
+		{ step: { title: '睡觉', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } } },
 	];
+	/** @type {StepsItems} */
 	const steps9 = [
-		{
-			step: { title: '起床', desc: '起床搬砖了!', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-hotel-bed-line' } } },
-		},
+		{ step: { title: '起床', desc: '起床搬砖了!', bar: { type: 'icon', content: { name: 'ri-hotel-bed-line' } } } },
 		{
 			step: {
 				title: '吃饭',
 				desc: '吃吃吃,肥死你。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-restaurant-2-line' } },
+				bar: { type: 'icon', content: { name: 'ri-restaurant-2-line' } },
 				injComponent: injCom1,
 			},
 		},
-		{
-			step: {
-				title: '喝水',
-				desc: '慢慢走路,多多喝水。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-cup-line' } },
-			},
-		},
+		{ step: { title: '喝水', desc: '慢慢走路,多多喝水。', bar: { type: 'icon', content: { name: 'ri-cup-line' } } } },
 		{
 			step: {
 				title: '打豆豆',
 				desc: '吃饭睡觉,打豆豆。',
-				bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-emotion-sad-line' } },
+				bar: { type: 'icon', content: { name: 'ri-emotion-sad-line' } },
 				injComponent: injCom2,
 			},
 		},
-		{ step: { title: '睡觉', desc: '吃太饱,睡不着。', bar: { type: /** @type {"icon"} */ ('icon'), content: { name: 'ri-zzz-line' } } } },
+		{ step: { title: '睡觉', desc: '吃太饱,睡不着。', bar: { type: 'icon', content: { name: 'ri-zzz-line' } } } },
 	];
 
 	let current = $state(1);