Merge branch 'base'
This commit is contained in:
commit
d237a19090
45
package.json
45
package.json
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "unibest",
|
||||
"type": "commonjs",
|
||||
"version": "2.6.4",
|
||||
"version": "2.7.0",
|
||||
"description": "unibest - 最好的 uniapp 开发模板",
|
||||
"author": {
|
||||
"name": "feige996",
|
||||
@ -91,21 +91,22 @@
|
||||
"bin-wrapper": "npm:bin-wrapper-china"
|
||||
},
|
||||
"dependencies": {
|
||||
"@dcloudio/uni-app": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-app-harmony": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-components": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-h5": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-alipay": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-baidu": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-jd": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-lark": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-qq": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-toutiao": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-app": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-app-harmony": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-components": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-h5": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-alipay": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-baidu": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-harmony": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-jd": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-lark": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-qq": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-toutiao": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4060520250512001",
|
||||
"@tanstack/vue-query": "^5.62.16",
|
||||
"abortcontroller-polyfill": "^1.7.8",
|
||||
"dayjs": "1.11.10",
|
||||
@ -122,10 +123,10 @@
|
||||
"@commitlint/cli": "^18.6.1",
|
||||
"@commitlint/config-conventional": "^18.6.3",
|
||||
"@dcloudio/types": "^3.4.14",
|
||||
"@dcloudio/uni-automator": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-stacktracey": "3.0.0-4020920240930001",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-automator": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-4060520250512001",
|
||||
"@dcloudio/uni-stacktracey": "3.0.0-4060520250512001",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0-4060520250512001",
|
||||
"@esbuild/darwin-arm64": "0.20.2",
|
||||
"@esbuild/darwin-x64": "0.20.2",
|
||||
"@iconify-json/carbon": "^1.2.4",
|
||||
@ -135,7 +136,7 @@
|
||||
"@typescript-eslint/parser": "^6.21.0",
|
||||
"@uni-helper/uni-types": "1.0.0-alpha.3",
|
||||
"@uni-helper/vite-plugin-uni-layouts": "^0.1.10",
|
||||
"@uni-helper/vite-plugin-uni-manifest": "^0.2.7",
|
||||
"@uni-helper/vite-plugin-uni-manifest": "^0.2.8",
|
||||
"@uni-helper/vite-plugin-uni-pages": "0.2.20",
|
||||
"@uni-helper/vite-plugin-uni-platform": "^0.0.4",
|
||||
"@unocss/preset-legacy-compat": "^0.59.4",
|
||||
@ -169,7 +170,7 @@
|
||||
"stylelint-prettier": "^5.0.2",
|
||||
"terser": "^5.36.0",
|
||||
"typescript": "^5.7.2",
|
||||
"unocss": "^0.58.9",
|
||||
"unocss": "0.58.9",
|
||||
"unocss-applet": "^0.7.8",
|
||||
"unplugin-auto-import": "^0.17.8",
|
||||
"vite": "5.2.8",
|
||||
|
@ -16,6 +16,7 @@ export default defineUniPages({
|
||||
'z-paging/components/z-paging$1/z-paging$1.vue',
|
||||
},
|
||||
},
|
||||
// 如果不需要tabBar,可以注释掉这个配置,或者直接删除
|
||||
tabBar: {
|
||||
color: '#999999',
|
||||
selectedColor: '#018d71',
|
||||
|
11193
pnpm-lock.yaml
generated
11193
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -15,6 +15,7 @@
|
||||
鸽友们好,我是
|
||||
<text class="text-red-500">菲鸽</text>
|
||||
</view>
|
||||
<view class="test-css">测试 scss 样式</view>
|
||||
<RequestComp />
|
||||
<UploadComp />
|
||||
</view>
|
||||
@ -30,7 +31,10 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.test-css {
|
||||
// 16rpx=>0.5rem
|
||||
padding-bottom: 16rpx;
|
||||
// mt-4=>1rem=>16px;
|
||||
margin-top: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
@ -31,7 +31,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { TestEnum } from '@/typings'
|
||||
import PLATFORM from '@/utils/platform'
|
||||
|
||||
defineOptions({
|
||||
@ -46,8 +45,7 @@ const description = ref(
|
||||
)
|
||||
// 测试 uni API 自动引入
|
||||
onLoad(() => {
|
||||
console.log(author)
|
||||
console.log(TestEnum.A)
|
||||
console.log('项目作者:', author.value)
|
||||
})
|
||||
</script>
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { pages, subPackages, tabBar } from '@/pages.json'
|
||||
import pagesConfig from '@/pages.json'
|
||||
import { isMpWeixin } from './platform'
|
||||
|
||||
const { pages, subPackages, tabBar = { list: [] } } = { ...pagesConfig }
|
||||
|
||||
export const getLastPage = () => {
|
||||
// getCurrentPages() 至少有1个元素,所以不再额外判断
|
||||
// const lastPage = getCurrentPages().at(-1)
|
||||
@ -11,16 +13,14 @@ export const getLastPage = () => {
|
||||
|
||||
/** 判断当前页面是否是 tabbar 页 */
|
||||
export const getIsTabbar = () => {
|
||||
if (!tabBar) {
|
||||
return false
|
||||
}
|
||||
if (!tabBar.list.length) {
|
||||
// 通常有 tabBar 的话,list 不能有空,且至少有2个元素,这里其实不用处理
|
||||
return false
|
||||
}
|
||||
try {
|
||||
const lastPage = getLastPage()
|
||||
const currPath = lastPage.route
|
||||
return !!tabBar.list.find((e) => e.pagePath === currPath)
|
||||
const currPath = lastPage?.route
|
||||
|
||||
return Boolean(tabBar?.list?.some((item) => item.pagePath === currPath))
|
||||
} catch {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user