perf : 从首页标签进入搜索页,不自动聚焦搜索输入框
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<input
|
||||
class="inputed"
|
||||
type="text"
|
||||
focus
|
||||
:focus="autoFocus"
|
||||
v-model="searchValue"
|
||||
:placeholder="searchType === 'job' ? '搜索职位名称' : '搜索专业名称'"
|
||||
placeholder-class="placeholder"
|
||||
@@ -136,6 +136,7 @@ const historyList = ref([]);
|
||||
const listCom = ref([]);
|
||||
const showSuggestions = ref(false);
|
||||
const searchFocus = ref(false);
|
||||
const autoFocus = ref(false)
|
||||
|
||||
// 专业数据源(示例数据,可以替换为实际数据)
|
||||
const majorDataSource = ref([]);
|
||||
@@ -211,6 +212,9 @@ onLoad((options) => {
|
||||
if (options.keyWord) {
|
||||
searchValue.value = decodeURIComponent(options.keyWord);
|
||||
searchBtn();
|
||||
}else{
|
||||
//从标签点进来不自动聚焦
|
||||
autoFocus.value = true
|
||||
}
|
||||
let arr = uni.getStorageSync('searchList');
|
||||
if (arr) {
|
||||
|
||||
@@ -138,7 +138,7 @@ const useUserStore = defineStore("user", () => {
|
||||
userInfo.value = values.data;
|
||||
// role.value = values.role;
|
||||
hasLogin.value = true;
|
||||
isAuth.value = values.data?.isCert == 1 ? true : false
|
||||
isAuth.value = values.data?.isCert == 1 ? true : false //是否认证
|
||||
}
|
||||
|
||||
const checkAuth = () => {
|
||||
|
||||
Reference in New Issue
Block a user