update src/components/iconSelector/index.vue.
This commit is contained in:
parent
4f36e46f7b
commit
65c953a613
@ -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 时,类型 ali、ele、awe 回显问题
|
// 处理 icon type 类型为 all 时,类型 ali、ele、awe 回显问题
|
||||||
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();
|
||||||
|
Loading…
Reference in New Issue
Block a user