Просмотр исходного кода

修复组件iconSelector页面大小改变时计算错误

zuohuaijun 3 лет назад
Родитель
Сommit
343c3e202f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      vue-next-admin/src/components/iconSelector/index.vue

+ 1 - 1
vue-next-admin/src/components/iconSelector/index.vue

@@ -165,7 +165,7 @@ export default defineComponent({
 		// 获取 input 的宽度
 		const getInputWidth = () => {
 			nextTick(() => {
-				state.fontIconWidth = inputWidthRef.value.$el.offsetWidth;
+				state.fontIconWidth = inputWidthRef.value?.$el.offsetWidth;
 			});
 		};
 		// 监听页面宽度改变