杜府 3 лет назад
Родитель
Сommit
b4f3ec7be9

+ 1 - 1
components/package.json

@@ -1,6 +1,6 @@
 {
 {
     "name": "stdf",
     "name": "stdf",
-    "version": "0.0.10",
+    "version": "0.0.11",
     "description": "Mobile Web component library based on Svelte and Tailwind",
     "description": "Mobile Web component library based on Svelte and Tailwind",
     "main": "index.js",
     "main": "index.js",
     "scripts": {
     "scripts": {

+ 6 - 4
components/src/input/Input.svelte

@@ -77,7 +77,7 @@
 
 
     //垂直间距
     //垂直间距
     //Vertical spacing
     //Vertical spacing
-    export let py = '1';
+    export let py = '2';
 
 
     // 是否禁用
     // 是否禁用
     // Whether to disable
     // Whether to disable
@@ -202,14 +202,16 @@
         slower: 'duration-1000',
         slower: 'duration-1000',
     };
     };
 
 
-    // 山下间距样式
+    // 垂直间距样式
     // Vertical spacing style
     // Vertical spacing style
     const pyObj = {
     const pyObj = {
         '0': 'py-0',
         '0': 'py-0',
         '0.5': 'py-0.5',
         '0.5': 'py-0.5',
         '1': 'py-1',
         '1': 'py-1',
         '2': 'py-2',
         '2': 'py-2',
+        '3': 'py-3',
         '4': 'py-4',
         '4': 'py-4',
+        '6': 'py-6',
     };
     };
 
 
     // 获取焦点是派发事件
     // 获取焦点是派发事件
@@ -303,7 +305,7 @@
     };
     };
 </script>
 </script>
 
 
-<div class={`px-2 ${pyObj[py] || pyObj['1']}`}>
+<div class={`px-2 ${pyObj[py] || pyObj['2']}`}>
     <!-- svelte-ignore a11y-label-has-associated-control -->
     <!-- svelte-ignore a11y-label-has-associated-control -->
     <label>
     <label>
         <div class={`flex px-2 ${title === '' ? 'justify-end' : 'justify-between'}`}>
         <div class={`flex px-2 ${title === '' ? 'justify-end' : 'justify-between'}`}>
@@ -313,7 +315,7 @@
                 {:else if title === 'slot'}
                 {:else if title === 'slot'}
                     <slot name="title">title {commonLang.slotEmpty}</slot>
                     <slot name="title">title {commonLang.slotEmpty}</slot>
                 {:else}
                 {:else}
-                    <div class="text-sm font-semibold">{title}</div>
+                    <div class="text-sm font-semibold mb-1">{title}</div>
                 {/if}
                 {/if}
             {/if}
             {/if}
             <div class="flex space-x-2 text-xs">
             <div class="flex space-x-2 text-xs">

+ 32 - 32
doc/components/input/api.md

@@ -1,37 +1,37 @@
 ## Input Props
 ## Input Props
 
 
-| 属性                | 类型                 | 默认值     | 可选值                                                                                | 必传  | 说明                   |
-|-------------------|--------------------|---------|------------------------------------------------------------------------------------|-----|----------------------|
-| title             | String/slot        | ''      | -                                                                                  | N   | 标题内容。                |
-| placeholder       | String             | ''      | -                                                                                  | N   | 输入框提示文本。             |
-| titlePosition     | String             | 'out'   | 'out'/'in'/'none'                                                                  | N   | 标题位置。                |
-| inputPosition     | String             | 'left'  | 'left'/'right'                                                                     | N   | 输入框文字位置。             |
-| radius            | String             | 'base'  | 'none'/'base'/'xl'/'full'                                                          | N   | 圆角风格。                |
-| inputStyle        | String             | 'block' | 'block'/'line'                                                                     | N   | 输入框风格。               |
-| py                | String             | '1'     | '0'/'0.5'/'1'/'2'/'4'                                                              | N   | 垂直间距。                |
-| lineTransition    | String             | 'none'  | 'none'/'center'/'left'                                                             | N   | 线性过渡位置。              |
-| duration          | String             | 'base'  | 'fast'/'base'/'slow'/'slower'                                                      | N   | 过渡时间。                |
-| value             | String             | ''      | -                                                                                  | N   | 输入框值。                |
-| type              | String             | 'text'  | 'text'/'decimal'/'email'/'none'/'numeric'/'search'/'tel'/'url'/'password'/'number' | N   | 输入框类型。               |
-| inputmode         | String             | ''      | 'text'/'decimal'/'email'/'none'/'numeric'/'search'/'tel'/'url'                     | N   | 指定输入的数据类型。           |
-| state             | String             | 'theme' | 'theme'/'success'/'warning'/'error'/'info'                                         | N   | 状态。                  |
-| maxlength         | Number             | 24      | -                                                                                  | N   | 最多可输入文本长度。           |
-| rows              | Number             | 2       | -                                                                                  | N   | textarea 时行数。        |
-| autosize          | Boolean            | false   | true/false                                                                         | N   | textarea 时是否自动调整高度。  |
-| textareaMaxlength | Number             | 200     | -                                                                                  | N   | textarea 时最多可输入文本长度。 |
-| clear             | Boolean            | false   | true/false                                                                         | N   | 是否可清空。               |
-| autocomplete      | Boolean            | true    | true/false                                                                         | N   | 是否开启自动填充功能。          |
-| disabled          | Boolean            | false   | true/false                                                                         | N   | 是否禁用。                |
-| label1            | String/Object/slot | ''      | ''/Icon Props/slot                                                                 | N   | 标签 1 内容。             |
-| label2            | String/slot        | ''      | ''/Any String/slot                                                                 | N   | 标签 2 内容。             |
-| label3            | String/Object/slot | ''      | ''/Icon Props/slot                                                                 | N   | 标签 3 内容。             |
-| label4            | String/Object/slot | ''      | ''/Icon Props/slot                                                                 | N   | 标签 4 内容。             |
-| label5            | String/slot        | ''      | ''/Any String/slot                                                                 | N   | 标签 5 内容。             |
-| label6            | String/Object/slot | ''      | ''/Icon Props/slot                                                                 | N   | 标签 6 内容。             |
-| tip               | String/slot        | ''      | ''/Any String/slot                                                                 | N   | 提示信息内容。              |
-| data1             | String/slot        | ''      | ''/Any String/slot                                                                 | N   | 数据项 1 内容。            |
-| data2             | String/slot        | ''      | ''/Any String/slot                                                                 | N   | 数据项 2 内容。            |
-| data3             | String/slot        | ''      | ''/Any String/slot                                                                 | N   | 数据项 3 内容。            |
+| 属性              | 类型               | 默认值  | 可选值                                                                             | 必传 | 说明                            |
+| ----------------- | ------------------ | ------- | ---------------------------------------------------------------------------------- | ---- | ------------------------------- |
+| title             | String/slot        | ''      | -                                                                                  | N    | 标题内容。                      |
+| placeholder       | String             | ''      | -                                                                                  | N    | 输入框提示文本。                |
+| titlePosition     | String             | 'out'   | 'out'/'in'/'none'                                                                  | N    | 标题位置。                      |
+| inputPosition     | String             | 'left'  | 'left'/'right'                                                                     | N    | 输入框文字位置。                |
+| radius            | String             | 'base'  | 'none'/'base'/'xl'/'full'                                                          | N    | 圆角风格。                      |
+| inputStyle        | String             | 'block' | 'block'/'line'                                                                     | N    | 输入框风格。                    |
+| py                | String             | '2'     | '0'/'0.5'/'1'/'2'/'3'/'4'/'6'                                                      | N    | 垂直间距。                      |
+| lineTransition    | String             | 'none'  | 'none'/'center'/'left'                                                             | N    | 线性过渡位置。                  |
+| duration          | String             | 'base'  | 'fast'/'base'/'slow'/'slower'                                                      | N    | 过渡时间。                      |
+| value             | String             | ''      | -                                                                                  | N    | 输入框值。                      |
+| type              | String             | 'text'  | 'text'/'decimal'/'email'/'none'/'numeric'/'search'/'tel'/'url'/'password'/'number' | N    | 输入框类型。                    |
+| inputmode         | String             | ''      | 'text'/'decimal'/'email'/'none'/'numeric'/'search'/'tel'/'url'                     | N    | 指定输入的数据类型。            |
+| state             | String             | 'theme' | 'theme'/'success'/'warning'/'error'/'info'                                         | N    | 状态。                          |
+| maxlength         | Number             | 24      | -                                                                                  | N    | 最多可输入文本长度。            |
+| rows              | Number             | 2       | -                                                                                  | N    | textarea 时行数。               |
+| autosize          | Boolean            | false   | true/false                                                                         | N    | textarea 时是否自动调整高度。   |
+| textareaMaxlength | Number             | 200     | -                                                                                  | N    | textarea 时最多可输入文本长度。 |
+| clear             | Boolean            | false   | true/false                                                                         | N    | 是否可清空。                    |
+| autocomplete      | Boolean            | true    | true/false                                                                         | N    | 是否开启自动填充功能。          |
+| disabled          | Boolean            | false   | true/false                                                                         | N    | 是否禁用。                      |
+| label1            | String/Object/slot | ''      | ''/Icon Props/slot                                                                 | N    | 标签 1 内容。                   |
+| label2            | String/slot        | ''      | ''/Any String/slot                                                                 | N    | 标签 2 内容。                   |
+| label3            | String/Object/slot | ''      | ''/Icon Props/slot                                                                 | N    | 标签 3 内容。                   |
+| label4            | String/Object/slot | ''      | ''/Icon Props/slot                                                                 | N    | 标签 4 内容。                   |
+| label5            | String/slot        | ''      | ''/Any String/slot                                                                 | N    | 标签 5 内容。                   |
+| label6            | String/Object/slot | ''      | ''/Icon Props/slot                                                                 | N    | 标签 6 内容。                   |
+| tip               | String/slot        | ''      | ''/Any String/slot                                                                 | N    | 提示信息内容。                  |
+| data1             | String/slot        | ''      | ''/Any String/slot                                                                 | N    | 数据项 1 内容。                 |
+| data2             | String/slot        | ''      | ''/Any String/slot                                                                 | N    | 数据项 2 内容。                 |
+| data3             | String/slot        | ''      | ''/Any String/slot                                                                 | N    | 数据项 3 内容。                 |
 
 
 ## Input Events
 ## Input Events
 
 

+ 1 - 1
doc/components/input/api_en.md

@@ -8,7 +8,7 @@
 | inputPosition     | String             | 'left'        | 'left'/'right'                                                                     | No       | The position of the input text.                               |
 | inputPosition     | String             | 'left'        | 'left'/'right'                                                                     | No       | The position of the input text.                               |
 | radius            | String             | 'base'        | 'none'/'base'/'xl'/'full'                                                          | No       | The style of the corner radius.                               |
 | radius            | String             | 'base'        | 'none'/'base'/'xl'/'full'                                                          | No       | The style of the corner radius.                               |
 | inputStyle        | String             | 'block'       | 'block'/'line'                                                                     | No       | The style of the input field.                                 |
 | inputStyle        | String             | 'block'       | 'block'/'line'                                                                     | No       | The style of the input field.                                 |
-| py                | String             | '1'           | '0'/'0.5'/'1'/'2'/'4'                                                              | No       | The vertical spacing.                                         |
+| py                | String             | '2'           | '0'/'0.5'/'1'/'2'/'3'/'4'/'6'                                                      | No       | The vertical spacing.                                         |
 | lineTransition    | String             | 'none'        | 'none'/'center'/'left'                                                             | No       | The position of linear transition.                            |
 | lineTransition    | String             | 'none'        | 'none'/'center'/'left'                                                             | No       | The position of linear transition.                            |
 | duration          | String             | 'base'        | 'fast'/'base'/'slow'/'slower'                                                      | No       | The transition duration.                                      |
 | duration          | String             | 'base'        | 'fast'/'base'/'slow'/'slower'                                                      | No       | The transition duration.                                      |
 | value             | String             | ''            | -                                                                                  | No       | The value of the input field.                                 |
 | value             | String             | ''            | -                                                                                  | No       | The value of the input field.                                 |

+ 6 - 0
doc/components/input/version.md

@@ -0,0 +1,6 @@
+## 0.0.11
+
+-   [!tag|O|0|]垂直间距 py 默认值改为 2,并新增 3 与 6 两个可选值。
+-   [!tag|O|0|]标题与输入框增加一点间距。
+
+<font size=1>2023-06-17</font>

+ 6 - 0
doc/components/input/version_en.md

@@ -0,0 +1,6 @@
+## 0.0.11
+
+- [!tag|O|0|] The default vertical spacing of py has been changed to 2, and two optional values of 3 and 6 have been added.
+- [!tag|O|0|] A little extra spacing has been added between the title and input box.
+
+<font size=1>2023-06-17</font>

+ 4 - 0
doc/guide/changelog.md

@@ -1,3 +1,7 @@
+## 0.0.11
+
+- 优化 Input,详见 [Input](https://stdf.design/#/components?nav=input&tab=4)。
+
 ## 0.0.10
 ## 0.0.10
 
 
 - 优化 Cell,详见 [Cell](https://stdf.design/#/components?nav=cell&tab=4)。
 - 优化 Cell,详见 [Cell](https://stdf.design/#/components?nav=cell&tab=4)。

+ 4 - 0
doc/guide/changelog_en.md

@@ -1,3 +1,7 @@
+## 0.0.11
+
+-   Optimize Input, please see [Input](https://stdf.design/#/components?nav=input&tab=4).
+
 ## 0.0.10
 ## 0.0.10
 
 
 -   Optimize Cell, please see [Cell](https://stdf.design/#/components?nav=cell&tab=4).
 -   Optimize Cell, please see [Cell](https://stdf.design/#/components?nav=cell&tab=4).