dufu1991 3 anni fa
parent
commit
ce0f65891a

+ 4 - 0
doc/components/cell/version.md

@@ -1,3 +1,7 @@
+## 0.2.11
+
+- [!tag|B|2|]修复左右区域上下居中对齐问题。
+
 ## 0.2.10
 
 - [!tag|A|0|]增加 `clickAll` 参数,用于控制是否点击整行都触发事件。关联 [Issues](https://github.com/dufu1991/stdf/issues/7)。[!issue|yuedanlabs|]

+ 4 - 0
doc/components/cell/version_en.md

@@ -1,3 +1,7 @@
+## 0.2.11
+
+- [!tag|B|2|]Fix the problem of up and down alignment in the left and right areas.
+
 ## 0.2.10
 
 - [!tag|A|0|]Add the `clickAll` parameter to control whether clicking on the entire row triggers an event. Related [Issues](https://github.com/dufu1991/stdf/issues/7). [!issue|yuedanlabs|]

+ 4 - 0
doc/components/icon/version.md

@@ -1,3 +1,7 @@
+## 0.2.11
+
+- [!tag|B|1|] Icon 组件区域不再是 `inline-block`。
+
 ## 0.2.5
 
 - [!tag|O|0|] path 默认值由 `/assets/fonts/symbol.svg` 修改为 `fonts/symbol.svg`。

+ 4 - 0
doc/components/icon/version_en.md

@@ -1,3 +1,7 @@
+## 0.2.11
+
+- [!tag|B|1|] The Icon component area is no longer `inline-block`.
+
 ## 0.2.5
 
 - [!tag|O|0|] The default value of `path` has been changed from `/assets/fonts/symbol.svg` to `fonts/symbol.svg`.

+ 3 - 0
doc/components/skeleton/version.md

@@ -0,0 +1,3 @@
+## 0.2.11
+
+- [!tag|B|2|]修复当使用 'img'/'video'/'code'/'qrcode'/'barcode' 等内容时,图标上下居中的问题。

+ 3 - 0
doc/components/skeleton/version_en.md

@@ -0,0 +1,3 @@
+## 0.2.11
+
+- [!tag|B|2|] Fix the problem of vertical centering of icons when using 'img'/'video'/'code'/'qrcode'/'barcode' and other content.

+ 6 - 0
doc/guide/changelog.md

@@ -1,3 +1,9 @@
+## 0.2.11
+
+- 修复 Cell,详见 [Cell](https://stdf.design/#/components?nav=cell&tab=4)。
+- 修复 Icon,详见 [Cell](https://stdf.design/#/components?nav=icon&tab=4)。
+- 修复 Skeleton,详见 [Cell](https://stdf.design/#/components?nav=skeleton&tab=4)。
+
 ## 0.2.10
 
 - 增强 Cell 组件,详见 [Cell](https://stdf.design/#/components?nav=cell&tab=4)。

+ 6 - 0
doc/guide/changelog_en.md

@@ -1,3 +1,9 @@
+## 0.2.11
+
+- Fix Cell, please see [Cell](https://stdf.design/#/components?nav=cell&tab=4).
+- Fix Icon, please see [Cell](https://stdf.design/#/components?nav=icon&tab=4).
+- Fix Skeleton, please see [Cell](https://stdf.design/#/components?nav=skeleton&tab=4).
+
 ## 0.2.10
 
 - Enhanced the Cell component. For details, see [Cell](https://stdf.design/#/components?nav=cell&tab=4).

+ 2 - 2
packages/stdf/components/cell/Cell.svelte

@@ -147,7 +147,7 @@
 >
 	<div class={`flex justify-between gap-4 py-4${line && my === '0' ? ' border-b border-black/5 dark:border-white/5' : ''}`}>
 		<!-- left -->
-		<div class="flex justify-between">
+		<div class="flex justify-between items-center">
 			{#if left === ''}
 				<!-- none -->
 			{:else if left === 'slot'}
@@ -165,7 +165,7 @@
 			</div>
 		</div>
 		<!-- right -->
-		<div class="flex justify-between">
+		<div class="flex justify-between items-center">
 			<div class={`flex flex-col ${info === '' ? 'justify-center' : 'justify-between'} text-right `}>
 				{#if detail === 'slot'}
 					<slot name="detail">

+ 1 - 1
packages/stdf/components/icon/Icon.svelte

@@ -28,7 +28,7 @@
 	export let injClass = '';
 </script>
 
-<i class={`cursor-pointer inline-block relative ${theme ? 'text-primary dark:text-dark' : ''} ${injClass}`} style="top:{top}px;">
+<i class={`cursor-pointer relative ${theme ? 'text-primary dark:text-dark' : ''} ${injClass}`} style="top:{top}px;">
 	{#if name === 'slot'}
 		<slot><span>无插槽内容!</span></slot>
 	{:else}

+ 1 - 1
packages/stdf/components/progress/Progress.svelte

@@ -37,7 +37,7 @@
 
 	// 动画时间
 	// duration
-	export let duration = '300'; //动画时间
+	export let duration = '300';
 
 	// 高度样式
 	// height class

+ 2 - 2
packages/stdf/components/skeleton/Skeleton.svelte

@@ -90,10 +90,10 @@
 		<div
 			class={`bg-gray7 dark:bg-gray6${widthObj[width] || widthObj.full}${heightObj[height] || heightObj['6']}${
 				radiusObj[radius] || radiusObj.base
-			} flex justify-center`}
+			} flex flex-col justify-center`}
 		>
 			{#if type === 'img' || type === 'video' || type === 'code' || type === 'qrcode' || type === 'barcode'}
-				<div class={`m-auto`} style="width:{iconRatio * 100 + '%'}">
+				<div class="m-auto" style="width:{iconRatio * 100 + '%'}">
 					<Icon name={typeIconFun(type)} size="100%" alpha={0.2} />
 				</div>
 			{/if}

+ 72 - 23
packages/stdf/components/toast/Toast.svelte

@@ -1,30 +1,81 @@
 <script>
 	import { createEventDispatcher } from 'svelte';
 	import Loading from '../loading/Loading.svelte';
-
 	import Icon from '../icon/Icon.svelte';
 	import Mask from '../mask/Mask.svelte';
 	import Transition from './Transition.svelte';
 
-	export let message = ''; //提示内容  toast content
-	export let visible = false; //是否显示  is show
-	export let duration = 2000; //显示时间,ms  show time,ms
-	export let position = 'center'; //显示位置,center,top,bottom  show position,center,top,bottom
-	export let py = '0'; //top和bottom时距离顶部或底部的距离  top and bottom distance from top or bottom
-	export let radius = 'base'; //圆角  radius
-	export let useSlot = false; //是否使用slot  is use slot
-	export let transitionType = 'scale'; //出现动画类型,可选值:fade, fly,scale,slide,none  transition type
-	export let transitionParams = {}; //出现动画参数  show transition params
-	export let outDuration = 0; //过渡动画退出时间  transition out duration
-	export let zIndex = 1000; //z-index
-	export let type = ''; //提示类型,success、error、warning、info、loading,不传则不显示图标  toast type,success,error,warning,info,loading
-	export let mask = {}; //遮罩层参数  mask params
-	export let loading = {}; //loading参数  loading params
-	export let icon = {}; //图标参数  icon params
-	export let clickable = false; //是否可点击穿透  is clickable
-	export let dynamicFixed = true; //是否动态固定  is dynamic fixed
-
-	const dispatch = createEventDispatcher(); //创建事件派发器  create event dispatcher
+	// 提示内容
+	// toast content
+	export let message = '';
+
+	// 是否显示
+	// is show
+	export let visible = false;
+
+	// 显示时间,ms
+	// show time,ms
+	export let duration = 2000;
+
+	// 显示位置,center,top,bottom
+	// show position,center,top,bottom
+	export let position = 'center';
+
+	// top和bottom时距离顶部或底部的距离
+	// top and bottom distance from top or bottom
+	export let py = '0';
+
+	// 圆角
+	// radius
+	export let radius = 'base';
+
+	// 是否使用slot
+	// is use slot
+	export let useSlot = false;
+
+	// 过渡动画类型,可选值:fade, fly,scale,slide,none
+	// transition type,fade, fly,scale,slide,none
+	export let transitionType = 'scale';
+
+	// 过渡动画参数
+	// transition params
+	export let transitionParams = {};
+
+	// 过渡动画退出时间
+	// transition out duration
+	export let outDuration = 0;
+
+	// z-index
+	export let zIndex = 1000;
+
+	// 提示类型,success、error、warning、info、loading,不传则不显示图标
+	// toast type,success,error,warning,info,loading
+	export let type = '';
+
+	// 遮罩层参数
+	// mask params
+	export let mask = {};
+
+	// loading 参数
+	// loading params
+	export let loading = {};
+
+	// 图标参数
+	// icon params
+	export let icon = {};
+
+	// 是否可点击穿透
+	// is clickable
+	export let clickable = false;
+
+	// 是否动态固定
+	// is dynamic fixed
+	export let dynamicFixed = true;
+
+	// 创建事件派发器
+	// create event dispatcher
+	const dispatch = createEventDispatcher();
+
 	$: {
 		if (visible) {
 			if (duration === 0) {
@@ -39,6 +90,7 @@
 			dispatch('open');
 		}
 	}
+
 	const typeObj = {
 		success: 'checkbox-circle',
 		error: 'close-circle',
@@ -101,9 +153,6 @@
 		} w-full h-full${clickable ? ' pointer-events-none' : ''}`}
 		style={`z-index:${zIndex};height:${innerHeight}px`}
 	>
-		<!-- height: calc(var(--vh, 1vh) * 100 - ${
-        !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) ? 0 : 0
-    }px); -->
 		<Transition {visible} {transitionType} {transitionParams} {outDuration}>
 			<div class="flex justify-center px-10">
 				<div

+ 1 - 1
packages/stdf/package.json

@@ -1,6 +1,6 @@
 {
 	"name": "stdf",
-	"version": "0.2.10",
+	"version": "0.2.11",
 	"description": "Mobile web component library based on Svelte and Tailwind",
 	"main": "./components/index.js",
 	"svelte": "./components/index.js",