fix(buyer端升级node版本): 添加 .npmrc 和 .yarnrc 文件以支持引擎配置,更新 package.json 中的 NODE_OPTIONS 环境变量,替换多个组件中的 /deep/ 选择器为 ::v-deep,优化依赖管理,确保兼容性,兼容node16版本

This commit is contained in:
Ryan Ran
2025-09-30 13:33:22 +08:00
parent ae85f0d612
commit af85493863
12 changed files with 32 additions and 26 deletions

1
buyer/.npmrc Normal file
View File

@@ -0,0 +1 @@
engine-strict=false

1
buyer/.yarnrc Normal file
View File

@@ -0,0 +1 @@
--ignore-engines true

View File

@@ -3,9 +3,12 @@
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
"serve": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
"build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build",
"dev": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve"
},
"engines": {
"node": ">=14"
},
"dependencies": {
"@amap/amap-jsapi-loader": "0.0.7",
@@ -15,11 +18,10 @@
"less": "^2.7.0",
"less-loader": "^5.0.0",
"mv-count-down": "^0.1.15",
"node-sass": "^4.14.1",
"postcss-loader": "^7.0.1",
"sass": "^1.63.6",
"postcss-loader": "^4.3.0",
"psl": "^1.8.0",
"qs": "^6.9.4",
"sass-loader": "^7.3.1",
"uuid": "^8.3.2",
"view-design": "^4.3.2",
"vue": "^2.6.11",
@@ -32,7 +34,7 @@
"devDependencies": {
"@vue/cli-service": "~4.5.0",
"compression-webpack-plugin": "^5.0.0",
"sass-loader": "^7.3.1",
"sass-loader": "^10.4.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"vue-template-compiler": "^2.6.11"
},
@@ -42,6 +44,8 @@
"not dead"
],
"resolutions": {
"minimatch": "^3.1.2"
"minimatch": "^3.1.2",
"node-sass": "npm:sass@^1.63.6",
"@achrinza/node-ipc": "9.2.2"
}
}

View File

@@ -173,7 +173,7 @@ export default {
border-radius: 18.9px;
/deep/ .ivu-input.ivu-input-large {
::v-deep .ivu-input.ivu-input-large {
border: 1.4px solid $theme_color;
box-sizing: border-box;
border-radius: 19.6px;
@@ -188,7 +188,7 @@ export default {
}
}
/deep/ .ivu-input-group-append {
::v-deep .ivu-input-group-append {
border-radius: 19.6px !important;
cursor: pointer;
box-sizing: border-box;

View File

@@ -113,12 +113,12 @@ export default {
}
}
/deep/ .ivu-card, .ivu-card-head, ._Card {
::v-deep .ivu-card, .ivu-card-head, ._Card {
margin-bottom: 20px;
@include white_background_color();
}
/deep/ .ivu-card-head {
::v-deep .ivu-card-head {
position: relative;
padding: 0 14px;
height: 50px;
@@ -140,7 +140,7 @@ export default {
cursor: pointer;
}
/deep/ .ivu-card-body {
::v-deep .ivu-card-body {
padding: 0 !important;
display: none;
}

View File

@@ -147,11 +147,11 @@ export default {
justify-content: center;
flex-direction: column;
}
/deep/.popup .ivu-drawer-body{
::v-deep.popup .ivu-drawer-body{
padding: 0!important;
background-color: #eee;
}
/deep/.popup .ivu-drawer-wrap{
::v-deep.popup .ivu-drawer-wrap{
z-index: 3001;
}
</style>

View File

@@ -326,7 +326,7 @@ export default {
.item-intro-img {
width: 100%;
min-height: 300px;
/deep/ img{
::v-deep img{
margin:0 auto;
}
}
@@ -472,7 +472,7 @@ export default {
.ivu-tabs-ink-bar {
background-color: $theme_color !important;
}
/deep/.ivu-tabs-bar{
::v-deep.ivu-tabs-bar{
border: none;
}
.item-tabs > .ivu-tabs > .ivu-tabs-bar .ivu-tabs-tab{

View File

@@ -84,10 +84,10 @@ export default {
border-top: 1.4px solid #e2e2e2;
}
&:hover {
/deep/ .goods-name {
::v-deep .goods-name {
color: $theme_color;
}
/deep/ .goods-desc {
::v-deep .goods-desc {
color: $theme_color;
}
}

View File

@@ -54,7 +54,7 @@ export default {
</script>
<style scoped lang="scss">
/deep/ .ivu-col-span-2, .ivu-col-span-4 {
::v-deep .ivu-col-span-2, .ivu-col-span-4 {
text-align: center;
color: $theme_color;
}
@@ -71,7 +71,7 @@ export default {
border-bottom: 1px solid $border_color;
padding: 16px 0;
/deep/ .ivu-col {
::v-deep .ivu-col {
padding: 8px 0;
}

View File

@@ -584,7 +584,7 @@ export default {
margin-left: 25px;
margin-top: 5px
}
/deep/ .ivu-alert-message {
::v-deep .ivu-alert-message {
p {
margin: 4px 0;
}

View File

@@ -604,15 +604,15 @@ table {
.layui-layer-wrap > .div-express-log {
max-height: 300px;
}
/deep/ .layui-layer-wrap > .div-express-log::-webkit-scrollbar{
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar{
width: 1px;
height: 5px;
}
/deep/ .layui-layer-wrap > .div-express-log::-webkit-scrollbar-thumb{
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-thumb{
border-radius: 1em;
background-color: rgba(50,50,50,.3);
}
/deep/ .layui-layer-wrap > .div-express-log::-webkit-scrollbar-track{
::v-deep .layui-layer-wrap > .div-express-log::-webkit-scrollbar-track{
border-radius: 1em;
background-color: rgba(50,50,50,.1);
}

View File

@@ -70,7 +70,7 @@ module.exports = {
loaderOptions: {
sass: {
data: `@import "@/assets/styles/global.scss";` //全局加载scss
additionalData: `@import "@/assets/styles/global.scss";` //全局加载scss
},
// 向 CSS 相关的 loader 传递选项
less: {