-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
54 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,21 @@ | ||
<template> | ||
<FSelect | ||
filterable | ||
valueField="key" | ||
labelField="name" | ||
:options="optionList" | ||
> | ||
<template #addon> | ||
<div class="addon">如果你点开了这个例子,可能你需要它</div> | ||
<FSelect filterable :options="optionList"> | ||
<template #header> | ||
<div>如果你点开了这个例子</div> | ||
</template> | ||
<template #footer> | ||
<div>可能你需要它</div> | ||
</template> | ||
</FSelect> | ||
</template> | ||
<script> | ||
import { reactive } from 'vue'; | ||
const TOTAL_COUNT = 10000; | ||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
const DataItems = []; | ||
let count = TOTAL_COUNT; | ||
while (count--) { | ||
const index = TOTAL_COUNT - count; | ||
DataItems.push({ | ||
name: index, | ||
key: index, | ||
}); | ||
} | ||
const TOTAL_COUNT = 20; | ||
export default { | ||
setup() { | ||
const optionList = reactive(DataItems); | ||
return { | ||
optionList, | ||
}; | ||
}, | ||
}; | ||
const optionList = ref( | ||
new Array(TOTAL_COUNT) | ||
.fill(undefined) | ||
.map((_, index) => ({ value: index + 1, label: index + 1 })), | ||
); | ||
</script> | ||
<style scoped> | ||
.fes-select { | ||
width: 200px; | ||
} | ||
.action { | ||
border-top: 1px; | ||
} | ||
</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