更新
This commit is contained in:
1 parent
8fc52c574f
commit
fb04d66e61
7 files changed
+284
-9
No files matched your search
@@ -56,12 +56,19 @@ const DEFAULT_TABS = [
|
||||
{ name: 'home', text: '概览', icon: 'gauge' },
|
||||
{ name: 'functions', text: '功能', icon: 'table-cells' },
|
||||
{ name: 'todo', text: '待办', icon: 'circle-check' },
|
||||
{ name: 'mine', text: '我的', icon: 'user' }
|
||||
// 末位不再是「我的」,而是回平台(模块选择页);name 保留 mine 以兼容 current="mine"
|
||||
{ name: 'mine', text: '回平台', icon: 'arrow-left' }
|
||||
]
|
||||
|
||||
const list = computed(() => (props.tabs && props.tabs.length ? props.tabs : DEFAULT_TABS))
|
||||
|
||||
function onTap(name) {
|
||||
// 「回平台」:清空页面栈回到模块选择页。必须放在 current 判重之前,
|
||||
// 否则停在原「我的」页时点击会被判重拦下。
|
||||
if (name === 'mine' || name === 'platform') {
|
||||
uni.reLaunch({ url: '/pages/nav/nav' })
|
||||
return
|
||||
}
|
||||
if (name === props.current) return
|
||||
if (props.variant === 'switch') {
|
||||
emit('change', name)
|
||||
|
||||
Reference in new issue
Block a user