|
|
@@ -1,5 +1,5 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { onUnmounted, ref, computed, type Ref, onMounted, reactive, h } from "vue";
|
|
|
+import { onUnmounted, ref, computed, type Ref, onMounted, reactive, h, watch } from "vue";
|
|
|
import { useRoute } from "vue-router";
|
|
|
import { LoadingOutlined } from '@ant-design/icons-vue';
|
|
|
import { useSideBarStore } from "@/stores/side-bar";
|
|
|
@@ -30,6 +30,7 @@ const keyword = ref("");
|
|
|
const field = ref("TP");
|
|
|
// 排序
|
|
|
const sort: Ref<Sort> = ref("Relevance");
|
|
|
+const placeholder = ref("请输入文献主题")
|
|
|
|
|
|
const pagination = reactive({
|
|
|
page: 1,
|
|
|
@@ -271,6 +272,22 @@ function onUnitFilterChange(selected: string[]) {
|
|
|
doSearch()
|
|
|
}
|
|
|
|
|
|
+watch(field, (newValue) => {
|
|
|
+ if (newValue == 'TI') {
|
|
|
+ placeholder.value = "请输入文献标题"
|
|
|
+ } else if (newValue == 'AU') {
|
|
|
+ placeholder.value = "请输入文献作者"
|
|
|
+ } else if (newValue == 'KW') {
|
|
|
+ placeholder.value = "请输入文献关键词"
|
|
|
+ } else if (newValue == 'AB') {
|
|
|
+ placeholder.value = "请输入文献摘要"
|
|
|
+ } else if (newValue == 'UN') {
|
|
|
+ placeholder.value = "请输入文献机构"
|
|
|
+ } else {
|
|
|
+ placeholder.value = "请输入文献主题"
|
|
|
+ }
|
|
|
+});
|
|
|
+
|
|
|
onUnmounted(() => {
|
|
|
sideBarStore.setCollapse(false);
|
|
|
});
|
|
|
@@ -282,6 +299,7 @@ onUnmounted(() => {
|
|
|
<SearchBox
|
|
|
v-model:keyword="keyword"
|
|
|
v-model:field="field"
|
|
|
+ :placeholder="placeholder"
|
|
|
@search="onSimpleSearch"
|
|
|
@update:field="changeField"
|
|
|
@update:keyword="changKeyword"
|