-
-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(select): add prepend and append slots
- Loading branch information
Showing
14 changed files
with
295 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<Select v-model:value="value" :options="options"> | ||
<template #prepend> | ||
<div | ||
style=" | ||
width: 100%; | ||
padding: 4px 16px 8px; | ||
margin-bottom: 8px; | ||
border-bottom: var(--vxp-border-light-2); | ||
" | ||
> | ||
Put something here | ||
</div> | ||
</template> | ||
<template #append> | ||
<div | ||
style=" | ||
width: 100%; | ||
padding: 8px 16px 4px; | ||
margin-top: 8px; | ||
border-top: var(--vxp-border-light-2); | ||
" | ||
> | ||
Put something here | ||
</div> | ||
</template> | ||
</Select> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const value = ref('') | ||
const options = ['Option 1', 'Option 2', 'Option 3'] | ||
</script> | ||
|
||
<style scoped> | ||
.vxp-select { | ||
max-width: 400px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<Select v-model:value="value" :options="options"> | ||
<template #prepend> | ||
<div | ||
style=" | ||
width: 100%; | ||
padding: 4px 16px 8px; | ||
margin-bottom: 8px; | ||
border-bottom: var(--vxp-border-light-2); | ||
" | ||
> | ||
随便放点东西 | ||
</div> | ||
</template> | ||
<template #append> | ||
<div | ||
style=" | ||
width: 100%; | ||
padding: 8px 16px 4px; | ||
margin-top: 8px; | ||
border-top: var(--vxp-border-light-2); | ||
" | ||
> | ||
随便放点东西 | ||
</div> | ||
</template> | ||
</Select> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const value = ref('') | ||
const options = ['选项1', '选项2', '选项3'] | ||
</script> | ||
|
||
<style scoped> | ||
.vxp-select { | ||
max-width: 400px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<Space vertical> | ||
<Select v-model:value="value" :prefix="User" :options="options"></Select> | ||
<Select v-model:value="value" :suffix="ArrowUp" :options="options"></Select> | ||
<Select | ||
v-model:value="value" | ||
:suffix="ArrowUp" | ||
static-suffix | ||
:options="options" | ||
></Select> | ||
<Select v-model:value="value" :options="options" no-suffix></Select> | ||
</Space> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
import { ArrowUp, User } from '@vexip-ui/icons' | ||
const value = ref('') | ||
const options = ['Option 1', 'Option 2', 'Option 3'] | ||
</script> | ||
|
||
<style scoped> | ||
.vxp-select { | ||
max-width: 400px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<Space vertical> | ||
<Select v-model:value="value" :prefix="User" :options="options"></Select> | ||
<Select v-model:value="value" :suffix="ArrowUp" :options="options"></Select> | ||
<Select | ||
v-model:value="value" | ||
:suffix="ArrowUp" | ||
static-suffix | ||
:options="options" | ||
></Select> | ||
<Select v-model:value="value" :options="options" no-suffix></Select> | ||
</Space> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
import { ArrowUp, User } from '@vexip-ui/icons' | ||
const value = ref('') | ||
const options = ['选项1', '选项2', '选项3'] | ||
</script> | ||
|
||
<style scoped> | ||
.vxp-select { | ||
max-width: 400px; | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.