Skip to content

Commit

Permalink
feat: 🎸 complete simple input component feature
Browse files Browse the repository at this point in the history
complete simple input component feature
  • Loading branch information
hanxiaoluan committed May 29, 2022
1 parent 6f85a0d commit 6011126
Show file tree
Hide file tree
Showing 594 changed files with 31,167 additions and 4,948 deletions.
4 changes: 3 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const sidebar = {
},
{ text: '导航' },
{ text: '反馈' },
{ text: '数据录入' },
{ text: '数据录入' ,
children: [{ text: 'Input 输入框', link: '/components/input/' }]
},
{ text: '数据展示' },
{ text: '布局',
children:[
Expand Down
6 changes: 3 additions & 3 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import Theme from 'vitepress/dist/client/theme-default'
import HelloWorld from '../../../src/components/HelloWorld.vue'
// import HelloWorld from '../../../src/components/HelloWorld'
import Test from '../../../src/components/Test'

import 'vitepress-theme-demoblock/theme/styles/index.css'
import '../../../src/index.scss'
import '../sheepui-theme/styles/index.scss'
import {registerComponents} from './register-components'
import SheepUI from '../../../scripts/entry'
import SheepUI from '../../../src/index'

export default {
...Theme,
// 扩展应用程序实例
enhanceApp({app}) {
// 注册组件
app.component('HelloWorld', HelloWorld)
// app.component('HelloWorld', HelloWorld)
app.component('Test', Test)
registerComponents(app)
app.use(SheepUI)
Expand Down
65 changes: 65 additions & 0 deletions docs/components/input/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# 间距 - Space

### 基础用法

输入框组件的基本用法。

:::demo


```vue
<template>
<SSpace>
<SInput :style="{width:'320px'}" placeholder="Please enter something" allow-clear v-model="text" />
<SInput :style="{width:'320px'}" default-value="content" placeholder="Please enter something" allow-clear />
</SSpace>
</template>
<script>
import { ref, defineComponent } from 'vue'
export default defineComponent({
setup() {
return {
text: ref('')
}
}
})
</script>
```
:::

### 垂直间距

可以设置垂直方向排列的间距。

:::demo


```vue
<template>
<SSpace direction="vertical" fill>
<SButton>hello</SButton>
<SButton>world</SButton>
<SButton>haha</SButton>
</SSpace>
</template>
```
:::

### 尺寸

内置 4 个尺寸,mini - 4px small - 8px (默认) medium - 16px large - 24px,也支持传数字来自定义尺寸。

:::demo


```vue
<template>
<SSpace size="large">
<SButton>hello</SButton>
<SButton>world</SButton>
<SButton>haha</SButton>
</SSpace>
</template>
```
:::
Loading

0 comments on commit 6011126

Please sign in to comment.