Browse Source

修改返回

wangxy 15 hours ago
parent
commit
382044a5da
1 changed files with 15 additions and 16 deletions
  1. 15 16
      pages/admin/Hetong/components/search.vue

+ 15 - 16
pages/admin/Hetong/components/search.vue

@@ -27,10 +27,10 @@
 </template>
 
 <script setup>
-	import {
-		ref,
-		computed
-	} from 'vue';
+import {
+  ref,
+  computed, nextTick
+} from 'vue';
 	const $emit = defineEmits(['search-btn', 'reset-search'])
 	const searchPopup = ref(null); // 索引
 
@@ -64,19 +64,18 @@
 		}
 	})
 
-	let txt = computed(() => {
-		if (props.shenfen == 'kh') {
-			return '请输入客户名'
-		} else if (props.shenfen == 'jz') {
-			return '请输入家政阿姨名'
-		} else {
-			return '请输入客户名'
-		}
-	})
-
+	let txt = () => {
+    if (props.shenfen == 'kh') {
+      return '请输入客户名'
+    } else if (props.shenfen == 'jz') {
+      return '请输入家政阿姨名'
+    } else {
+      return '请输入客户名'
+    }
+  }
 
 	const options = ref(arr);
-	const searchPlaceholder = ref(txt);
+	const searchPlaceholder = ref(txt());
 	const searchInput = ref('');
 	// 存储当前选中的选项对象
 	const selectedOption = ref(options.value[0]);
@@ -98,7 +97,7 @@
 		if (option.value == 2) {
 			searchPlaceholder.value = '请输入客户名'
 		} else {
-			searchPlaceholder.value = '请输入家政阿姨名'
+        searchPlaceholder.value = '请输入家政阿姨名'
 		}
 	};