瀏覽代碼

fix: search 组件传入 param 不生效问题

许俊杰 2 年之前
父節點
當前提交
1e8ae8b5f3
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      Web/src/components/table/search.vue

+ 6 - 6
Web/src/components/table/search.vue

@@ -124,14 +124,14 @@ const onReset = (formEl: FormInstance | undefined) => {
 	emit('reset', state.form);
 	emit('search', state.form);
 };
-// 初始化 form 字段,取自父组件 search.prop
-const initFormField = () => {
-	if (props.search.length <= 0) return false;
-	props.search.forEach((v) => (state.form[v.prop] = ''));
-};
+// // 初始化 form 字段,取自父组件 search.prop
+// const initFormField = () => {
+// 	if (props.search.length <= 0) return false;
+// 	props.search.forEach((v) => (state.form[v.prop] = ''));
+// };
 // 页面加载时
 onMounted(() => {
-	initFormField();
+	// initFormField();
 });
 </script>