update src/components/iconSelector/index.vue.

This commit is contained in:
lyt-Top 2022-04-26 11:21:48 +00:00 committed by Gitee
parent 4f36e46f7b
commit 65c953a613
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -125,7 +125,7 @@ export default defineComponent({
if (!props.modelValue) return false; if (!props.modelValue) return false;
state.fontIconSearch = ''; state.fontIconSearch = '';
state.fontIconPlaceholder = props.modelValue; state.fontIconPlaceholder = props.modelValue;
initFontTypeEcho(); initFontIconTypeEcho();
}; };
// input input // input input
const onIconBlur = () => { const onIconBlur = () => {
@ -141,7 +141,7 @@ export default defineComponent({
(<string | undefined>state.fontIconPrefix) = props.modelValue; (<string | undefined>state.fontIconPrefix) = props.modelValue;
}; };
// icon type all alieleawe // icon type all alieleawe
const initFontTypeEcho = () => { const initFontIconTypeEcho = () => {
if ((<any>props.modelValue)?.indexOf('iconfont') > -1) onIconChange('ali'); if ((<any>props.modelValue)?.indexOf('iconfont') > -1) onIconChange('ali');
else if ((<any>props.modelValue)?.indexOf('ele-') > -1) onIconChange('ele'); else if ((<any>props.modelValue)?.indexOf('ele-') > -1) onIconChange('ele');
else if ((<any>props.modelValue)?.indexOf('fa') > -1) onIconChange('awe'); else if ((<any>props.modelValue)?.indexOf('fa') > -1) onIconChange('awe');
@ -214,7 +214,7 @@ export default defineComponent({
// //
onMounted(() => { onMounted(() => {
// tab // tab
if (props.type === 'all') initFontTypeEcho(); if (props.type === 'all') initFontIconTypeEcho();
else onIconChange(props.type); else onIconChange(props.type);
initResize(); initResize();
getInputWidth(); getInputWidth();