Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新uniapp依赖问题老的依赖有些bug&&H5多环境打包问题 #188

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from 'node:path'
import { loadEnv } from 'vite'

// 获取环境变量的范例
const env = loadEnv(process.env.NODE_ENV!, path.resolve(process.cwd(), 'env'))
const env = loadEnv(process.env.mode || 'production', path.resolve(process.cwd(), 'env'))
const {
VITE_APP_TITLE,
VITE_UNI_APPID,
Expand Down
31 changes: 21 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,38 @@
"bin-wrapper": "npm:bin-wrapper-china"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-app-plus": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-components": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-h5": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-app": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-app-harmony": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-app-plus": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-components": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-h5": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-jd": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-mp-xhs": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-4030620241126001",
"dayjs": "1.11.10",
"pinia": "2.0.36",
"pinia-plugin-persistedstate": "3.2.1",
"qs": "6.5.3",
"vue": "3.4.21",
"vue-i18n": "^9.1.9",
"wot-design-uni": "^1.3.10",
"z-paging": "^2.7.10"
},
"devDependencies": {
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.3",
"@dcloudio/types": "^3.4.8",
"@dcloudio/uni-automator": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-4010520240507001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-4010520240507001",
"@dcloudio/uni-automator": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-4030620241126001",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-4030620241126001",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-4030620241126001",
"@esbuild/darwin-arm64": "0.20.2",
"@esbuild/darwin-x64": "0.20.2",
"@iconify-json/carbon": "^1.1.35",
Expand Down Expand Up @@ -153,4 +164,4 @@
"vite-plugin-restart": "^0.4.0",
"vue-tsc": "^1.8.27"
}
}
}
6 changes: 6 additions & 0 deletions src/pages/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
模板分支是:
<text class="text-green-500">base</text>
</view>
<view class="flex flex-col gap-4">
<view class="label">测试bug组件</view>
<wd-input-number v-model="num" :step="1" :precision="2"></wd-input-number>
<view>输入小数点光标前移</view>
</view>
</view>
</template>

Expand All @@ -36,6 +41,7 @@ import PLATFORM from '@/utils/platform'
defineOptions({
name: 'Home',
})
const num = ref(0)

// 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getSystemInfoSync()
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export default ({ command, mode }) => {

// mode: 区分生产环境还是开发环境
console.log('command, mode -> ', command, mode)
// 此处赋值用于manifest.config.ts 有用
process.env.mode = mode

// pnpm dev:h5 时得到 => serve development
// pnpm build:h5 时得到 => build production
// pnpm dev:mp-weixin 时得到 => build development (注意区别,command为build)
Expand Down