From 86cbf346204232ba9a4ffea6fbcb4d9d2b521916 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期一, 26 五月 2025 14:33:59 +0800 Subject: [PATCH] 分包之uview组件的引入方式调整 --- pages.json | 368 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 311 insertions(+), 57 deletions(-) diff --git a/pages.json b/pages.json index 95c0015..8da58f3 100644 --- a/pages.json +++ b/pages.json @@ -1,8 +1,18 @@ { - - "easycom": { - "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue" - }, + "easycom": { + "autoscan": true, + "custom": { + "^u-(.*)": "@/uview-components/uview-ui/components/u-$1/u-$1.vue"//uview + } + }, + "preloadRule": { + "pages/tabbar/index/home": // 椤甸潰璺緞 + // 椤甸潰鐨勯涓嬭浇閰嶇疆 + { + "network": "all", // all(涓嶉檺缃戠粶) wifi(浠厀ifi涓嬮涓嬭浇) + "packages": ["uview-components"] // 棰勪笅杞藉垎鍖呯殑 root 鎴� name銆俖_APP__ 琛ㄧず涓诲寘 + } + }, "pages": [ // 绗竴涓氨鏄椤� { @@ -24,18 +34,6 @@ } }, { - "path":"pages/tabbar/screen/fullScreen", - "style": { - "navigationStyle": "custom", // 闅愯棌绯荤粺瀵艰埅鏍� - "app-plus":{ - "animationType": "fade-in", // 璁剧疆fade-in娣″叆鍔ㄧ敾锛屼负鏈�鍚堢悊鐨勫姩鐢荤被鍨� - "background": "transparent", // 鑳屾櫙閫忔槑 - "backgroundColor": "rgba(0,0,0,0)", // 鑳屾櫙閫忔槑 - "popGesture": "none" // 鍏抽棴IOS灞忓箷宸﹁竟婊戝姩鍏抽棴褰撳墠椤甸潰鐨勫姛鑳� - } - } - }, - { "path": "pages/tabbar/home/title", "style": { "navigationBarTitleText": "娑堟伅" @@ -47,8 +45,19 @@ "navigationBarTitleText": "璐墿杞�", "navigationStyle": "custom", // 闅愯棌绯荤粺瀵艰埅鏍� "navigationBarBackgroundColor": "#fff", - "enablePullDownRefresh":true //瀹炵幇涓嬫媺鍒锋柊鏍峰紡 - + "enablePullDownRefresh":true, //瀹炵幇涓嬫媺鍒锋柊鏍峰紡 + "componentPlaceholder": { + "u-navbar": "view", + "u-checkbox-group": "view", + "u-checkbox": "view", + "u-swipe-action": "view", + "u-image": "view", + "u-icon": "view", + "u-count-down": "view", + "u-modal": "view", + "u-popup": "view", + "u-toast": "view" + } } }, { "path": "pages/tabbar/category/category", @@ -57,19 +66,20 @@ "navigationStyle": "custom", // 闅愯棌绯荤粺瀵艰埅鏍� "navigationBarTextStyle": "black", "disableScroll": true, - "bounce": "none", - "scrollIndicator": "none" - - + "bounce": "none", + "scrollIndicator": "none", + "componentPlaceholder": { + "u-navbar": "view", + "u-search": "view", + "u-image": "view" + } } }, - { - "path": "pages/navigation/search/searchPage", + "path": "components/m-search-revision/m-search-revision", "style": { - "navigationBarTitleText": "鎼滅储", + "navigationBarTitleText": "", "navigationStyle": "custom", - "app-plus": { //app椤甸潰涓嶆樉绀烘粴鍔ㄦ潯 "scrollIndicator": "none", @@ -79,6 +89,55 @@ "safearea": { "bottom": "none" } + }, + "componentPlaceholder": { + "u-icon": "view" + } + } + }, + { + "path": "components/m-goods-list/list", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom", + "app-plus": { + //app椤甸潰涓嶆樉绀烘粴鍔ㄦ潯 + "scrollIndicator": "none", + "bottom": "0", + "contentAdjust": "false", + "bounce": "none", + "safearea": { + "bottom": "none" + } + }, + "componentPlaceholder": { + "u-image": "view", + "u-loading": "view", + "u-tag": "view", + "u-icon": "view" + } + } + }, + { + "path": "pages/navigation/search/searchPage", + "style": { + "navigationBarTitleText": "鎼滅储", + "navigationStyle": "custom", + "app-plus": { + //app椤甸潰涓嶆樉绀烘粴鍔ㄦ潯 + "scrollIndicator": "none", + "bottom": "0", + "contentAdjust": "false", + "bounce": "none", + "safearea": { + "bottom": "none" + } + }, + "componentPlaceholder": { + "u-navbar": "view", + "u-popup": "view", + "u-input": "view", + "u-back-top": "view" } } }, { @@ -86,7 +145,12 @@ "style": { "navigationBarTextStyle": "white", "enablePullDownRefresh": true, - "navigationStyle": "custom" + "navigationStyle": "custom", + "componentPlaceholder": { + "u-icon": "view", + "u-row": "view", + "u-col": "view" + } } }, @@ -107,14 +171,35 @@ "style" : { "navigationBarTitleText" : "鍙戝竷瑙嗛", - "enablePullDownRefresh" : false + "enablePullDownRefresh" : false, + "componentPlaceholder": { + "u-icon": "view", + "u-button": "view", + "u-form": "view", + "u-form-item": "view", + "u-input": "view", + "u-popup": "view", + "u-search": "view" + } } } ], "subPackages": [ - + { + "root": "uview-components", // 蹇呴』涓巔reloadRule涓殑鍚嶇О瀹屽叏涓�鑷� + "name": "uview-components", + "pages": [ + { + "path": "pages/empty-page/empty-page", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, { "root": "pages/mine", "pages": [ @@ -122,14 +207,25 @@ { "path": "signIn", "style": { - "navigationBarTitleText": "绛惧埌" + "navigationBarTitleText": "绛惧埌", + "componentPlaceholder": { + "u-icon": "view" + } } }, { "path": "myTracks", "style": { "navigationBarTitleText": "鎴戠殑瓒宠抗", "enablePullDownRefresh": true, - "navigationStyle": "custom" + "navigationStyle": "custom", + "componentPlaceholder": { + "u-navbar": "view", + "u-notice-bar": "view", + "u-empty": "view", + "u-swipe-action": "view", + "u-checkbox-group": "view", + "u-checkbox": "view" + } } }, { "path": "myCollect", @@ -139,6 +235,15 @@ "navigationStyle": "custom", "app-plus": { "scrollIndicator": "none" + }, + "componentPlaceholder": { + "u-navbar": "view", + "u-tabs": "view", + "u-empty": "view", + "u-swipe-action": "view", + "u-image": "view", + "u-loading": "view", + "u-tag": "view" } } }, @@ -149,6 +254,11 @@ "app-plus": { //app椤甸潰涓嶆樉绀烘粴鍔ㄦ潯 "scrollIndicator": "none" + }, + "componentPlaceholder": { + "u-swipe-action": "view", + "u-image": "view", + "u-modal": "view" } } }, @@ -159,6 +269,9 @@ "app-plus": { //app椤甸潰涓嶆樉绀烘粴鍔ㄦ潯 "scrollIndicator": "none" + }, + "componentPlaceholder": { + "u-input": "view" } } }, @@ -170,35 +283,50 @@ "app-plus": { //app椤甸潰涓嶆樉绀烘粴鍔ㄦ潯 "scrollIndicator": "none" + }, + "componentPlaceholder": { + "u-tabs": "view", + "u-form": "view", + "u-form-item": "view", + "u-input": "view", + "u-button": "view" } } }, { "path": "distribution/history", "style": { - "navigationBarTitleText": "鎻愮幇鍘嗗彶" - + "navigationBarTitleText": "鎻愮幇鍘嗗彶", + "componentPlaceholder": { + "u-loadmore": "view" + } } }, { "path": "distribution/auth", "style": { - "navigationBarTitleText": "浼氬憳瀹炲悕璁よ瘉" - + "navigationBarTitleText": "浼氬憳瀹炲悕璁よ瘉", + "componentPlaceholder": { + "u-form": "view", + "u-form-item": "view", + "u-input": "view", + "u-button": "view" + } } }, { "path": "distribution/achievement", "style": { "navigationBarTitleText": "鎴戠殑鍒嗛攢涓氱哗" - } }, { "path": "distribution/home", "style": { - "navigationBarTitleText": "鎺ㄥ箍鍒嗕剑" - + "navigationBarTitleText": "鎺ㄥ箍鍒嗕剑", + "componentPlaceholder": { + "u-icon": "view" + } } }, { @@ -254,13 +382,27 @@ { "path": "address/add", "style": { - "navigationBarTitleText": "鏀惰揣浜�" + "navigationBarTitleText": "鏀惰揣浜�", + "componentPlaceholder": { + "u-form": "view", + "u-form-item": "view", + "u-input": "view", + "u-icon": "view", + "u-action-sheet": "view", + "u-checkbox-group": "view", + "u-checkbox": "view" + } } }, { "path": "address/addressManage", "style": { - "navigationBarTitleText": "鍦板潃绠$悊" + "navigationBarTitleText": "鍦板潃绠$悊", + "componentPlaceholder": { + "u-empty": "view", + "u-icon": "view", + "u-action-sheet": "view" + } } }, { @@ -327,7 +469,11 @@ { "path": "set/feedBack", "style": { - "navigationBarTitleText": "鎰忚鍙嶉" + "navigationBarTitleText": "鎰忚鍙嶉", + "componentPlaceholder": { + "u-input": "view", + "u-upload": "view" + } } }, { @@ -340,13 +486,23 @@ { "path": "set/editionIntro", "style": { - "navigationBarTitleText": "鍏充簬鎴戜滑" + "navigationBarTitleText": "鍏充簬鎴戜滑", + "componentPlaceholder": { + "u-cell-group": "view", + "u-cell-item": "view" + } } }, { "path": "set/setUp", "style": { - "navigationBarTitleText": "璁剧疆" + "navigationBarTitleText": "璁剧疆", + "componentPlaceholder": { + "u-image": "view", + "u-icon": "view", + "u-cell-group": "view", + "u-cell-item": "view" + } } }, { @@ -368,12 +524,19 @@ }, { "path": "help/tips", "style": { - "navigationBarTitleText": "" + "navigationBarTitleText": "", + "componentPlaceholder": { + "u-parse": "view" + } } }, { "path": "point/myPoint", "style": { - "navigationBarTitleText": "鎴戠殑绉垎" + "navigationBarTitleText": "鎴戠殑绉垎", + "componentPlaceholder": { + "u-row": "view", + "u-col": "view" + } } }, { @@ -517,14 +680,59 @@ "path": "entry/seller/index", "style": { "navigationBarTitleText": "搴楅摵鍏ラ┗", - "navigationStyle": "custom" + "navigationStyle": "custom", + "componentPlaceholder": { + "u-navbar": "view" + } + } + }, + { + "path": "entry/seller/step1", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom", + "componentPlaceholder": { + "u-form": "view", + "u-form-item": "view", + "u-input": "view", + "u-upload": "view" + } + } + }, + { + "path": "entry/seller/step2", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom", + "componentPlaceholder": { + "u-form": "view", + "u-form-item": "view", + "u-input": "view" + } + } + }, + { + "path": "entry/seller/step3", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom", + "componentPlaceholder": { + "u-form": "view", + "u-form-item": "view", + "u-input": "view", + "u-upload": "view", + "u-select": "view" + } } }, { "path": "entry/seller/control", "style": { "navigationBarTitleText": "", - "navigationStyle": "custom" + "navigationStyle": "custom", + "componentPlaceholder": { + "u-navbar": "view" + } } }, { @@ -538,7 +746,12 @@ "style": { "navigationBarTitleText": "灏忕▼搴忕櫥褰�", "navigationStyle": "custom", - "navigationBarTextStyle": "black" + "navigationBarTextStyle": "black", + "componentPlaceholder": { + "u-navbar": "view", + "u-modal": "view", + "u-checkbox": "view" + } } }, { @@ -604,7 +817,11 @@ },{ "path": "bargain/log", "style": { - "navigationBarTitleText": "鐮嶄环璁板綍" + "navigationBarTitleText": "鐮嶄环璁板綍", + "componentPlaceholder": { + "u-image": "view", + "u-empty": "view" + } } },{ "path": "point/detail", @@ -633,7 +850,10 @@ "navigationBarTitleText": "鎴戠殑浼樻儬鍒�", "app-plus": { "bounce": "coupon/none" - + }, + "componentPlaceholder": { + "u-empty": "view", + "u-icon": "view" } } }, @@ -654,8 +874,10 @@ "path": "coupon/couponCenter", "style": { "navigationBarTitleText": "棰嗗埜涓績", - "enablePullDownRefresh": true - + "enablePullDownRefresh": true, + "componentPlaceholder": { + "u-empty": "view" + } } }, { @@ -710,7 +932,14 @@ { "path": "complain/complainList", "style": { - "navigationBarTitleText": "鎶曡瘔鍒楄〃" + "navigationBarTitleText": "鎶曡瘔鍒楄〃", + "componentPlaceholder": { + "u-line": "view", + "u-image": "view", + "u-tag": "view", + "u-empty": "view", + "u-modal": "view" + } } }, { @@ -720,7 +949,17 @@ "enablePullDownRefresh": true, "app-plus": { "bounce": "none" - + }, + "componentPlaceholder": { + "u-empty": "view", + "u-modal": "view", + "u-image": "view", + "u-popup": "view", + "u-radio-group": "view", + "u-radio": "view", + "u-button": "view", + "u-toast": "view", + "u-modal": "view" } } }, @@ -758,7 +997,14 @@ { "path": "evaluate/myEvaluate", "style": { - "navigationBarTitleText": "鎴戠殑璇勪环" + "navigationBarTitleText": "鎴戠殑璇勪环", + "componentPlaceholder": { + "u-empty": "view", + "u-tabs": "view", + "u-image": "view", + "u-read-more": "view", + "u-tag": "view" + } } }, @@ -812,7 +1058,15 @@ "path": "afterSales/afterSales", "style": { "navigationBarTitleText": "鍞悗绠$悊", - "enablePullDownRefresh": true + "enablePullDownRefresh": true, + "componentPlaceholder": { + "u-modal": "view", + "u-tabs": "view", + "u-image": "view", + "u-search": "view", + "u-icon": "view", + "u-loadmore": "view" + } } }, { @@ -826,7 +1080,7 @@ ], "globalStyle": { "navigationBarTextStyle": "black", - "navigationBarTitleText": "Lili鍟嗗煄", + "navigationBarTitleText": "缁挎弧绛�", "titleColor": "#303133", "navigationBarBackgroundColor": "#fff", "backgroundColor": "#fff", -- Gitblit v1.8.0