mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2026-08-29 03:45:12 +08:00
perf: 下拉菜单显示优化
This commit is contained in:
Generated
+2
-2
@@ -4569,7 +4569,7 @@
|
||||
},
|
||||
"node_modules/pptxtojson": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/pptxtojson/-/pptxtojson-2.0.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/pptxtojson/-/pptxtojson-2.0.3.tgz",
|
||||
"integrity": "sha512-uUUT2qYvxaSXunqAIgSCHOHPbpinmsMgKQeOoJU4j03l9sTM3TvKeeZsJ7IKIMgxCqhq2g7dbY2eusGJZ4UZkw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -9174,7 +9174,7 @@
|
||||
},
|
||||
"pptxtojson": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/pptxtojson/-/pptxtojson-2.0.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/pptxtojson/-/pptxtojson-2.0.3.tgz",
|
||||
"integrity": "sha512-uUUT2qYvxaSXunqAIgSCHOHPbpinmsMgKQeOoJU4j03l9sTM3TvKeeZsJ7IKIMgxCqhq2g7dbY2eusGJZ4UZkw==",
|
||||
"requires": {
|
||||
"jszip": "^3.10.1",
|
||||
|
||||
@@ -65,11 +65,13 @@ const props = withDefaults(defineProps<{
|
||||
options: SelectOption[]
|
||||
disabled?: boolean
|
||||
autofocus?: boolean
|
||||
defaultLabel?: string
|
||||
search?: boolean
|
||||
searchLabel?: string
|
||||
}>(), {
|
||||
disabled: false,
|
||||
autofocus: false,
|
||||
defaultLabel: '',
|
||||
search: false,
|
||||
searchLabel: '搜索',
|
||||
})
|
||||
@@ -86,7 +88,7 @@ const optionsRef = useTemplateRef<HTMLElement>('optionsRef')
|
||||
const searchInputRef = useTemplateRef<InstanceType<typeof Input>>('searchInputRef')
|
||||
|
||||
const showLabel = computed(() => {
|
||||
return props.options.find(item => item.value === props.value)?.label || props.value
|
||||
return props.options.find(item => item.value === props.value)?.label || props.defaultLabel || props.value
|
||||
})
|
||||
|
||||
const showOptions = computed(() => {
|
||||
|
||||
@@ -101,6 +101,7 @@
|
||||
<div class="row">
|
||||
<Select
|
||||
style="width: 100%;"
|
||||
defaultLabel="自定义"
|
||||
:value="viewportRatio"
|
||||
@update:value="value => updateViewportRatio(value as number)"
|
||||
:options="[
|
||||
|
||||
Reference in New Issue
Block a user