Browse Source
feat(IconPicker): IconPicker could allowClear and readonly for form (#3414)
pull/3421/head
xachary
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
-
src/components/Icon/src/IconPicker.vue
|
|
|
@ -1,11 +1,12 @@ |
|
|
|
<template> |
|
|
|
<Input |
|
|
|
readonly |
|
|
|
:style="{ width }" |
|
|
|
:placeholder="t('component.icon.placeholder')" |
|
|
|
:class="prefixCls" |
|
|
|
v-model:value="currentSelect" |
|
|
|
@click="triggerPopover" |
|
|
|
:allowClear="props.allowClear" |
|
|
|
:readonly="props.readonly" |
|
|
|
> |
|
|
|
<template #addonAfter> |
|
|
|
<Popover |
|
|
|
@ -103,6 +104,8 @@ |
|
|
|
pageSize?: number; |
|
|
|
copy?: boolean; |
|
|
|
mode?: 'svg' | 'iconify'; |
|
|
|
allowClear?: boolean; |
|
|
|
readonly?: boolean; |
|
|
|
} |
|
|
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), { |
|
|
|
@ -111,6 +114,8 @@ |
|
|
|
pageSize: 140, |
|
|
|
copy: false, |
|
|
|
mode: 'iconify', |
|
|
|
allowClear: true, |
|
|
|
readonly: false, |
|
|
|
}); |
|
|
|
|
|
|
|
// Don't inherit FormItem disabled、placeholder... |
|
|
|
|