开开发消息页
This commit is contained in:
@@ -51,12 +51,8 @@
|
||||
const _freshing = ref(false)
|
||||
const offset = ref(0)
|
||||
const scrollRef = ref(null)
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
searchText: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0
|
||||
@@ -75,8 +71,8 @@
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
const getData = (from = '') => {
|
||||
console.log('getDatagetDatagetDatagetDatagetDatagetDatagetData');
|
||||
const getData = (from = '', searchText='') => {
|
||||
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) return;
|
||||
status.value = 'loading'
|
||||
@@ -91,7 +87,7 @@
|
||||
|
||||
setTimeout(() => {
|
||||
let params = {
|
||||
papersName: props.searchText,
|
||||
papersName: searchText,
|
||||
page: page.value,
|
||||
limit: limit,
|
||||
}
|
||||
@@ -119,9 +115,13 @@
|
||||
const scrolltolower = () => {
|
||||
getData()
|
||||
};
|
||||
|
||||
const search = (value) => {
|
||||
console.log('searchvalue', value);
|
||||
total.value = -1
|
||||
getData('first', value)
|
||||
}
|
||||
defineExpose({
|
||||
getData
|
||||
getData, search
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user