first commit
This commit is contained in:
13
uni_modules/tdesign-uniapp/components/common/route.js
Normal file
13
uni_modules/tdesign-uniapp/components/common/route.js
Normal file
@@ -0,0 +1,13 @@
|
||||
export function goBackOrGoHome(home = '/pages/home/home') {
|
||||
const pages = getCurrentPages();
|
||||
|
||||
if (pages.length > 1) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: home,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default goBackOrGoHome;
|
||||
Reference in New Issue
Block a user