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