@dcloudio/uni-cli-shared 3.0.0-alpha-4020120240618001 → 3.0.0-alpha-4020220240622001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/app/pages/definePage.d.ts +1 -1
- package/dist/json/app/pages/definePage.js +3 -3
- package/dist/json/app/pages/index.d.ts +1 -1
- package/dist/json/app/pages/index.js +2 -2
- package/dist/json/pages.js +9 -0
- package/dist/postcss/plugins/uniapp.js +1 -0
- package/dist/vite/plugins/uts/uni_modules.js +1 -0
- package/package.json +4 -4
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function definePageCode(pagesJson: Record<string, any
|
|
1
|
+
export declare function definePageCode(pagesJson: Record<string, any>, platform?: UniApp.PLATFORM): string;
|
|
2
2
|
export declare function defineNVuePageCode(pagesJson: Record<string, any>): string;
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defineNVuePageCode = exports.definePageCode = void 0;
|
|
4
4
|
const utils_1 = require("../../../utils");
|
|
5
|
-
function definePageCode(pagesJson) {
|
|
5
|
+
function definePageCode(pagesJson, platform = 'app') {
|
|
6
6
|
const importPagesCode = [];
|
|
7
7
|
const definePagesCode = [];
|
|
8
8
|
pagesJson.pages.forEach((page) => {
|
|
9
|
-
if (page.style.isNVue) {
|
|
9
|
+
if (platform === 'app' && page.style.isNVue) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
const pagePath = page.path;
|
|
13
13
|
const pageIdentifier = (0, utils_1.normalizeIdentifier)(pagePath);
|
|
14
|
-
const pagePathWithExtname = (0, utils_1.normalizePagePath)(pagePath,
|
|
14
|
+
const pagePathWithExtname = (0, utils_1.normalizePagePath)(pagePath, platform);
|
|
15
15
|
if (pagePathWithExtname) {
|
|
16
16
|
if (process.env.UNI_APP_CODE_SPLITING) {
|
|
17
17
|
// 拆分页面
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function normalizeAppPagesJson(pagesJson: Record<string, any
|
|
1
|
+
export declare function normalizeAppPagesJson(pagesJson: Record<string, any>, platform?: UniApp.PLATFORM): string;
|
|
2
2
|
export declare function normalizeAppNVuePagesJson(pagesJson: Record<string, any>): string;
|
|
3
3
|
export declare function normalizeAppConfigService(pagesJson: UniApp.PagesJson, manifestJson: Record<string, any>): string;
|
|
@@ -5,8 +5,8 @@ const code_1 = require("./code");
|
|
|
5
5
|
const definePage_1 = require("./definePage");
|
|
6
6
|
const uniConfig_1 = require("./uniConfig");
|
|
7
7
|
const uniRoutes_1 = require("./uniRoutes");
|
|
8
|
-
function normalizeAppPagesJson(pagesJson) {
|
|
9
|
-
return (0, definePage_1.definePageCode)(pagesJson);
|
|
8
|
+
function normalizeAppPagesJson(pagesJson, platform = 'app') {
|
|
9
|
+
return (0, definePage_1.definePageCode)(pagesJson, platform);
|
|
10
10
|
}
|
|
11
11
|
exports.normalizeAppPagesJson = normalizeAppPagesJson;
|
|
12
12
|
function normalizeAppNVuePagesJson(pagesJson) {
|
package/dist/json/pages.js
CHANGED
|
@@ -155,6 +155,15 @@ exports.validatePages = validatePages;
|
|
|
155
155
|
function normalizePages(pages, platform) {
|
|
156
156
|
pages.forEach((page) => {
|
|
157
157
|
page.style = normalizePageStyle(page.path, page.style, platform);
|
|
158
|
+
if (platform === 'app-harmony') {
|
|
159
|
+
// 鸿蒙下强制 isNVue 为 false,增加额外的 isNVueStyle 来标记样式处理
|
|
160
|
+
// 因为已有的代码里太多根据 isNVue 来处理的逻辑,这些逻辑在鸿蒙都不适用
|
|
161
|
+
// 鸿蒙仅需要将 nvue 当做 vue,并补充 css 即可
|
|
162
|
+
if (page.style.isNVue) {
|
|
163
|
+
page.style.isNVue = false;
|
|
164
|
+
page.style.isNVueStyle = true;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
158
167
|
});
|
|
159
168
|
if (platform !== 'app') {
|
|
160
169
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/uni-cli-shared",
|
|
3
|
-
"version": "3.0.0-alpha-
|
|
3
|
+
"version": "3.0.0-alpha-4020220240622001",
|
|
4
4
|
"description": "@dcloudio/uni-cli-shared",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"@babel/core": "^7.23.3",
|
|
27
27
|
"@babel/parser": "^7.23.9",
|
|
28
28
|
"@babel/types": "^7.20.7",
|
|
29
|
-
"@dcloudio/uni-i18n": "3.0.0-alpha-
|
|
30
|
-
"@dcloudio/uni-shared": "3.0.0-alpha-
|
|
29
|
+
"@dcloudio/uni-i18n": "3.0.0-alpha-4020220240622001",
|
|
30
|
+
"@dcloudio/uni-shared": "3.0.0-alpha-4020220240622001",
|
|
31
31
|
"@intlify/core-base": "9.1.9",
|
|
32
32
|
"@intlify/shared": "9.1.9",
|
|
33
33
|
"@intlify/vue-devtools": "9.1.9",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@dcloudio/uni-uts-v1": "3.0.0-alpha-
|
|
74
|
+
"@dcloudio/uni-uts-v1": "3.0.0-alpha-4020220240622001",
|
|
75
75
|
"@types/adm-zip": "^0.5.5",
|
|
76
76
|
"@types/babel__code-frame": "^7.0.6",
|
|
77
77
|
"@types/babel__core": "^7.1.19",
|