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;
state.fontIconSearch = '';
state.fontIconPlaceholder = props.modelValue;
initFontTypeEcho();
initFontIconTypeEcho();
};
// input input
const onIconBlur = () => {
@ -141,7 +141,7 @@ export default defineComponent({
(<string | undefined>state.fontIconPrefix) = props.modelValue;
};
// icon type all alieleawe
const initFontTypeEcho = () => {
const initFontIconTypeEcho = () => {
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('fa') > -1) onIconChange('awe');
@ -214,7 +214,7 @@ export default defineComponent({
//
onMounted(() => {
// tab
if (props.type === 'all') initFontTypeEcho();
if (props.type === 'all') initFontIconTypeEcho();
else onIconChange(props.type);
initResize();
getInputWidth();