@@ -44,6 +44,11 @@ export default {
})
this.page = detail.name;
try {
+ console.log(this.$refs[detail.name].updatePage)
+ if (this.$refs[detail.name].updatePage) uni.pageScrollTo({
+ scrollTop: 0,
+ duration: 0,
+ })
this.$refs[detail.name].init(detail.callBack, detail.params)
} catch (error) {
detail.callBack()
@@ -77,10 +77,6 @@ export default {
methods: {
onClick(item) {
if (item.itemId) {
- uni.pageScrollTo({
- scrollTop: 0,
- duration: 0,
- })
this.$emit("appsToPage", item.itemId, item.page || item.label, item.params || '')
} else if (item.path) {
uni.navigateTo({
@@ -38,13 +38,7 @@ export default {
},
init(callBack, params) {
- if (params) {
- this.tabsActive = params.active;
- }
+ if (params) this.tabsActive = params.active;
console.log(this.tabsActive)
if (!this.$refs[this.tabsActive].isInitialize) this.$refs[this.tabsActive].getList(true).then(res => {
callBack()