Jelajahi Sumber

代码提交

zhangyaowen 4 bulan lalu
induk
melakukan
236c4e85c4

+ 221 - 238
manifest.json

@@ -1,240 +1,223 @@
 {
-  "name": "江苏赢伟达资产管理有限公司",
-  "appid": "__UNI__F082C69",
-  "description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
-  "versionName": "2.1.0",
-  "versionCode": "183",
-  "transformPx": false,
-  "app-plus": {
-    "usingComponents": true,
-    "nvueCompiler": "uni-app",
-    "nvueStyleCompiler": "uni-app",
-    "compilerVersion": 3,
-    "nvueLaunchMode": "fast",
-    "splashscreen": {
-      "alwaysShowBeforeRender": true,
-      "waiting": true,
-      "autoclose": true,
-      "delay": 0
-    },
-    "safearea": {
-      "bottom": {
-        "offset": "none"
-      }
-    },
-    "modules": {
-      "Payment": {},
-      "Share": {},
-      "VideoPlayer": {},
-      "OAuth": {}
-    },
-    "distribute": {
-      "android": {
-        "permissions": [
-          "<uses-feature android:name=\"android.hardware.camera\"/>",
-          "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
-          "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-          "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-          "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-          "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-          "<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
-          "<uses-permission android:name=\"android.permission.INTERNET\"/>",
-          "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
-          "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-          "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-          "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-          "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-          "<uses-permission android:name=\"android.permission.READ_SMS\"/>",
-          "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
-          "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-          "<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
-          "<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
-          "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-          "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
-          "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
-          "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
-          "<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
-          "<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
-        ],
-        "minSdkVersion": 21,
-        "schemes": "shopro"
-      },
-      "ios": {
-        "urlschemewhitelist": [
-          "baidumap",
-          "iosamap"
-        ],
-        "dSYMs": false,
-        "privacyDescription": {
-          "NSPhotoLibraryUsageDescription": "需要同意访问您的相册选取图片才能完善该条目",
-          "NSPhotoLibraryAddUsageDescription": "需要同意访问您的相册才能保存该图片",
-          "NSCameraUsageDescription": "需要同意访问您的摄像头拍摄照片才能完善该条目",
-          "NSUserTrackingUsageDescription": "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
-        },
-        "urltypes": "shopro",
-        "capabilities": {
-          "entitlements": {
-            "com.apple.developer.associated-domains": [
-              "applinks:shopro.sheepjs.com"
-            ]
-          }
-        },
-        "idfa": true
-      },
-      "sdkConfigs": {
-        "speech": {
-          "ifly": {}
-        },
-        "ad": {},
-        "oauth": {
-          "apple": {},
-          "weixin": {
-            "appid": "wxae7a0c156da9383b",
-            "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
-          }
-        },
-        "payment": {
-          "weixin": {
-            "__platform__": [
-              "ios",
-              "android"
-            ],
-            "appid": "wxae7a0c156da9383b",
-            "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
-          },
-          "alipay": {
-            "__platform__": [
-              "ios",
-              "android"
-            ]
-          }
-        },
-        "share": {
-          "weixin": {
-            "appid": "wxae7a0c156da9383b",
-            "UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
-          }
-        }
-      },
-      "orientation": [
-        "portrait-primary"
-      ],
-      "splashscreen": {
-        "androidStyle": "common",
-        "iosStyle": "common",
-        "useOriginalMsgbox": true
-      },
-      "icons": {
-        "android": {
-          "hdpi": "unpackage/res/icons/72x72.png",
-          "xhdpi": "unpackage/res/icons/96x96.png",
-          "xxhdpi": "unpackage/res/icons/144x144.png",
-          "xxxhdpi": "unpackage/res/icons/192x192.png"
-        },
-        "ios": {
-          "appstore": "unpackage/res/icons/1024x1024.png",
-          "ipad": {
-            "app": "unpackage/res/icons/76x76.png",
-            "app@2x": "unpackage/res/icons/152x152.png",
-            "notification": "unpackage/res/icons/20x20.png",
-            "notification@2x": "unpackage/res/icons/40x40.png",
-            "proapp@2x": "unpackage/res/icons/167x167.png",
-            "settings": "unpackage/res/icons/29x29.png",
-            "settings@2x": "unpackage/res/icons/58x58.png",
-            "spotlight": "unpackage/res/icons/40x40.png",
-            "spotlight@2x": "unpackage/res/icons/80x80.png"
-          },
-          "iphone": {
-            "app@2x": "unpackage/res/icons/120x120.png",
-            "app@3x": "unpackage/res/icons/180x180.png",
-            "notification@2x": "unpackage/res/icons/40x40.png",
-            "notification@3x": "unpackage/res/icons/60x60.png",
-            "settings@2x": "unpackage/res/icons/58x58.png",
-            "settings@3x": "unpackage/res/icons/87x87.png",
-            "spotlight@2x": "unpackage/res/icons/80x80.png",
-            "spotlight@3x": "unpackage/res/icons/120x120.png"
-          }
-        }
-      }
-    }
-  },
-  "quickapp": {},
-  "quickapp-native": {
-    "icon": "/static/logo.png",
-    "package": "com.example.demo",
-    "features": [
-      {
-        "name": "system.clipboard"
-      }
-    ]
-  },
-  "quickapp-webview": {
-    "icon": "/static/logo.png",
-    "package": "com.example.demo",
-    "minPlatformVersion": 1070,
-    "versionName": "1.0.0",
-    "versionCode": 100
-  },
-  "mp-weixin": {
-    "appid": "wx66186af0759f47c9",
-    "setting": {
-      "urlCheck": false,
-      "minified": true,
-      "postcss": false,
-      "es6": true
-    },
-    "optimization": {
-      "subPackages": true
-    },
-    "plugins": {},
-    "lazyCodeLoading": "requiredComponents",
-    "usingComponents": {},
-    "permission": {},
-    "requiredPrivateInfos": [
-      "chooseAddress"
-    ]
-  },
-  "mp-alipay": {
-    "usingComponents": true
-  },
-  "mp-baidu": {
-    "usingComponents": true
-  },
-  "mp-toutiao": {
-    "usingComponents": true
-  },
-  "mp-jd": {
-    "usingComponents": true
-  },
-  "h5": {
-    "template": "index.html",
-    "router": {
-      "mode": "history",
-      "base": "/mail"
-    },
-    "sdkConfigs": {
-      "maps": {}
-    },
-    "async": {
-      "timeout": 20000
-    },
-    "title": "江苏赢伟达资产管理有限公司",
-    "optimization": {
-      "treeShaking": {
-        "enable": true
-      }
-    }
-  },
-  "vueVersion": "3",
-  "_spaceID": "192b4892-5452-4e1d-9f09-eee1ece40639",
-  "locale": "zh-Hans",
-  "fallbackLocale": "zh-Hans"
+	"name": "江苏赢伟达资产管理有限公司",
+	"appid": "__UNI__DBF2B01",
+	"description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
+	"versionName": "2.1.0",
+	"versionCode": "183",
+	"transformPx": false,
+	"app-plus": {
+		"usingComponents": true,
+		"nvueCompiler": "uni-app",
+		"nvueStyleCompiler": "uni-app",
+		"compilerVersion": 3,
+		"nvueLaunchMode": "fast",
+		"splashscreen": {
+			"alwaysShowBeforeRender": true,
+			"waiting": true,
+			"autoclose": true,
+			"delay": 0
+		},
+		"safearea": {
+			"bottom": {
+				"offset": "none"
+			}
+		},
+		"modules": {
+			"Payment": {},
+			"Share": {},
+			"VideoPlayer": {},
+			"OAuth": {}
+		},
+		"distribute": {
+			"android": {
+				"permissions": [
+					"<uses-feature android:name=\"android.hardware.camera\"/>",
+					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+					"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
+					"<uses-permission android:name=\"android.permission.INTERNET\"/>",
+					"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
+					"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
+					"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+					"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
+					"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
+					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
+					"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
+				],
+				"minSdkVersion": 21,
+				"schemes": "shopro"
+			},
+			"ios": {
+				"urlschemewhitelist": ["baidumap", "iosamap"],
+				"dSYMs": false,
+				"privacyDescription": {
+					"NSPhotoLibraryUsageDescription": "需要同意访问您的相册选取图片才能完善该条目",
+					"NSPhotoLibraryAddUsageDescription": "需要同意访问您的相册才能保存该图片",
+					"NSCameraUsageDescription": "需要同意访问您的摄像头拍摄照片才能完善该条目",
+					"NSUserTrackingUsageDescription": "开启追踪并不会获取您在其它站点的隐私信息,该行为仅用于标识设备,保障服务安全和提升浏览体验"
+				},
+				"urltypes": "shopro",
+				"capabilities": {
+					"entitlements": {
+						"com.apple.developer.associated-domains": ["applinks:shopro.sheepjs.com"]
+					}
+				},
+				"idfa": true
+			},
+			"sdkConfigs": {
+				"speech": {
+					"ifly": {}
+				},
+				"ad": {},
+				"oauth": {
+					"apple": {},
+					"weixin": {
+						"appid": "wxae7a0c156da9383b",
+						"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
+					}
+				},
+				"payment": {
+					"weixin": {
+						"__platform__": ["ios", "android"],
+						"appid": "wxae7a0c156da9383b",
+						"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
+					},
+					"alipay": {
+						"__platform__": ["ios", "android"]
+					}
+				},
+				"share": {
+					"weixin": {
+						"appid": "wxae7a0c156da9383b",
+						"UniversalLinks": "https://shopro.sheepjs.com/uni-universallinks/__UNI__082C0BA/"
+					}
+				}
+			},
+			"orientation": ["portrait-primary"],
+			"splashscreen": {
+				"androidStyle": "common",
+				"iosStyle": "common",
+				"useOriginalMsgbox": true
+			},
+			"icons": {
+				"android": {
+					"hdpi": "unpackage/res/icons/72x72.png",
+					"xhdpi": "unpackage/res/icons/96x96.png",
+					"xxhdpi": "unpackage/res/icons/144x144.png",
+					"xxxhdpi": "unpackage/res/icons/192x192.png"
+				},
+				"ios": {
+					"appstore": "unpackage/res/icons/1024x1024.png",
+					"ipad": {
+						"app": "unpackage/res/icons/76x76.png",
+						"app@2x": "unpackage/res/icons/152x152.png",
+						"notification": "unpackage/res/icons/20x20.png",
+						"notification@2x": "unpackage/res/icons/40x40.png",
+						"proapp@2x": "unpackage/res/icons/167x167.png",
+						"settings": "unpackage/res/icons/29x29.png",
+						"settings@2x": "unpackage/res/icons/58x58.png",
+						"spotlight": "unpackage/res/icons/40x40.png",
+						"spotlight@2x": "unpackage/res/icons/80x80.png"
+					},
+					"iphone": {
+						"app@2x": "unpackage/res/icons/120x120.png",
+						"app@3x": "unpackage/res/icons/180x180.png",
+						"notification@2x": "unpackage/res/icons/40x40.png",
+						"notification@3x": "unpackage/res/icons/60x60.png",
+						"settings@2x": "unpackage/res/icons/58x58.png",
+						"settings@3x": "unpackage/res/icons/87x87.png",
+						"spotlight@2x": "unpackage/res/icons/80x80.png",
+						"spotlight@3x": "unpackage/res/icons/120x120.png"
+					}
+				}
+			}
+		}
+	},
+	"quickapp": {},
+	"quickapp-native": {
+		"icon": "/static/logo.png",
+		"package": "com.example.demo",
+		"features": [{
+			"name": "system.clipboard"
+		}]
+	},
+	"quickapp-webview": {
+		"icon": "/static/logo.png",
+		"package": "com.example.demo",
+		"minPlatformVersion": 1070,
+		"versionName": "1.0.0",
+		"versionCode": 100
+	},
+	"mp-weixin": {
+		"appid": "wx66186af0759f47c9",
+		"setting": {
+			"urlCheck": false,
+			"minified": true,
+			"postcss": false,
+			"es6": true
+		},
+		"optimization": {
+			"subPackages": true
+		},
+		"plugins": {},
+		"lazyCodeLoading": "requiredComponents",
+		"usingComponents": {},
+		"permission": {},
+		"requiredPrivateInfos": ["chooseAddress"]
+	},
+	"mp-alipay": {
+		"usingComponents": true
+	},
+	"mp-baidu": {
+		"usingComponents": true
+	},
+	"mp-toutiao": {
+		"usingComponents": true
+	},
+	"mp-jd": {
+		"usingComponents": true
+	},
+	"h5": {
+		"template": "index.html",
+		"router": {
+			"mode": "history",
+			"base": "/mail"
+		},
+		"sdkConfigs": {
+			"maps": {}
+		},
+		"async": {
+			"timeout": 20000
+		},
+		"title": "江苏赢伟达资产管理有限公司",
+		"optimization": {
+			"treeShaking": {
+				"enable": true
+			}
+		}
+	},
+	"vueVersion": "3",
+	"_spaceID": "192b4892-5452-4e1d-9f09-eee1ece40639",
+	"locale": "zh-Hans",
+	"fallbackLocale": "zh-Hans"
 }

+ 9 - 1
sheep/components/s-tabbar/s-tabbar.vue

@@ -11,7 +11,8 @@
           <image class="u-page__item__slot-icon" :src="sheep.$url.cdn(item.activeIconUrl)"></image>
         </template>
         <template v-slot:inactive-icon>
-          <image class="u-page__item__slot-icon" :src="sheep.$url.cdn(item.iconUrl)"></image>
+          <image v-if="item.text" class="u-page__item__slot-icon" :src="sheep.$url.cdn(item.iconUrl)"></image>
+          <image v-else class="imageClass" :src="sheep.$url.cdn(item.iconUrl)"></image>
         </template>
       </su-tabbar-item>
     </su-tabbar>
@@ -54,6 +55,13 @@ const props = defineProps({
 </script>
 
 <style lang="scss">
+.imageClass {
+  width: 100px;
+  height: 100px;
+  margin-bottom: 60px;
+  // background: red;
+}
+
 .u-page {
   padding: 0;
 

+ 0 - 1
sheep/store/app.js

@@ -99,7 +99,6 @@ const app = defineStore({
         }
         return Promise.resolve(true);
       } else {
-        $router.error('InitError', res.msg || '加载失败');
       }
     },
   },

+ 183 - 194
sheep/ui/su-tabbar-item/su-tabbar-item.vue

@@ -6,19 +6,11 @@
     </view>
     <template v-else>
       <view class="u-tabbar-item__icon">
-        <uni-badge
-          absolute="rightTop"
-          size="small"
-          :text="badge || (dot ? 1 : null)"
-          :customStyle="badgeStyle"
-          :isDot="dot"
-        >
-          <image
-            v-if="icon"
-            :name="icon"
-            :color="isActive ? parentData.activeColor : parentData.inactiveColor"
-            :size="20"
-          ></image>
+        <uni-badge absolute="rightTop" size="small" :text="badge || (dot ? 1 : null)" :customStyle="badgeStyle"
+          :isDot="dot">
+          <image v-if="icon" :name="icon" :color="isActive ? parentData.activeColor : parentData.inactiveColor"
+            :size="20"></image>
+
           <block v-else>
             <slot v-if="isActive" name="active-icon" />
             <slot v-else name="inactive-icon" />
@@ -27,12 +19,9 @@
       </view>
 
       <slot name="text">
-        <text
-          class="u-tabbar-item__text"
-          :style="{
-            color: isActive ? parentData.activeColor : parentData.inactiveColor,
-          }"
-        >
+        <text class="u-tabbar-item__text" :style="{
+          color: isActive ? parentData.activeColor : parentData.inactiveColor,
+        }">
           {{ text }}
         </text>
       </slot>
@@ -41,197 +30,197 @@
 </template>
 
 <script>
-  /**
-   * TabbarItem 底部导航栏子组件
-   * @description 此组件提供了自定义tabbar的能力。
-   * @property {String | Number}  name    item标签的名称,作为与u-tabbar的value参数匹配的标识符
-   * @property {String}      icon    uView内置图标或者绝对路径的图片
-   * @property {String | Number}  badge    右上角的角标提示信息
-   * @property {Boolean}      dot      是否显示圆点,将会覆盖badge参数(默认 false )
-   * @property {String}      text    描述文本
-   * @property {Object | String}  badgeStyle  控制徽标的位置,对象或者字符串形式,可以设置top和right属性(默认 'top: 6px;right:2px;' )
-   * @property {Object}      customStyle  定义需要用到的外部样式
-   *
-   */
-  import { $parent, addStyle } from '@/sheep/helper';
+/**
+ * TabbarItem 底部导航栏子组件
+ * @description 此组件提供了自定义tabbar的能力。
+ * @property {String | Number}  name    item标签的名称,作为与u-tabbar的value参数匹配的标识符
+ * @property {String}      icon    uView内置图标或者绝对路径的图片
+ * @property {String | Number}  badge    右上角的角标提示信息
+ * @property {Boolean}      dot      是否显示圆点,将会覆盖badge参数(默认 false )
+ * @property {String}      text    描述文本
+ * @property {Object | String}  badgeStyle  控制徽标的位置,对象或者字符串形式,可以设置top和right属性(默认 'top: 6px;right:2px;' )
+ * @property {Object}      customStyle  定义需要用到的外部样式
+ *
+ */
+import { $parent, addStyle } from '@/sheep/helper';
 
-  export default {
-    name: 'su-tabbar-item',
-    props: {
-      customStyle: {
-        type: [Object, String],
-        default: () => ({}),
-      },
-      customClass: {
-        type: String,
-        default: '',
-      },
-      // 跳转的页面路径
-      url: {
-        type: String,
-        default: '',
-      },
-      // 页面跳转的类型
-      linkType: {
-        type: String,
-        default: 'navigateTo',
-      },
-      // item标签的名称,作为与u-tabbar的value参数匹配的标识符
-      name: {
-        type: [String, Number, null],
-        default: '',
-      },
-      // uView内置图标或者绝对路径的图片
-      icon: {
-        icon: String,
-        default: '',
-      },
-      // 右上角的角标提示信息
-      badge: {
-        type: [String, Number, null],
-        default: '',
-      },
-      // 是否显示圆点,将会覆盖badge参数
-      dot: {
-        type: Boolean,
-        default: false,
-      },
-      // 描述文本
-      text: {
-        type: String,
-        default: '',
-      },
-      // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
-      badgeStyle: {
-        type: Object,
-        default: ()=>{},
-      },
-      isCenter: {
-        type: Boolean,
-        default: false,
-      },
-      centerImage: {
-        type: String,
-        default: '',
-      },
+export default {
+  name: 'su-tabbar-item',
+  props: {
+    customStyle: {
+      type: [Object, String],
+      default: () => ({}),
+    },
+    customClass: {
+      type: String,
+      default: '',
+    },
+    // 跳转的页面路径
+    url: {
+      type: String,
+      default: '',
+    },
+    // 页面跳转的类型
+    linkType: {
+      type: String,
+      default: 'navigateTo',
+    },
+    // item标签的名称,作为与u-tabbar的value参数匹配的标识符
+    name: {
+      type: [String, Number, null],
+      default: '',
+    },
+    // uView内置图标或者绝对路径的图片
+    icon: {
+      icon: String,
+      default: '',
+    },
+    // 右上角的角标提示信息
+    badge: {
+      type: [String, Number, null],
+      default: '',
+    },
+    // 是否显示圆点,将会覆盖badge参数
+    dot: {
+      type: Boolean,
+      default: false,
+    },
+    // 描述文本
+    text: {
+      type: String,
+      default: '',
+    },
+    // 控制徽标的位置,对象或者字符串形式,可以设置top和right属性
+    badgeStyle: {
+      type: Object,
+      default: () => { },
+    },
+    isCenter: {
+      type: Boolean,
+      default: false,
     },
-    data() {
-      return {
-        isActive: false, // 是否处于激活状态
-        addStyle,
-        parentData: {
-          value: null,
-          activeColor: '', // 选中标签的颜色
-          inactiveColor: '', // 未选中标签的颜色
-        },
-        parent: {},
-      };
-    },
-    created() {
+    centerImage: {
+      type: String,
+      default: '',
+    },
+  },
+  data() {
+    return {
+      isActive: false, // 是否处于激活状态
+      addStyle,
+      parentData: {
+        value: null,
+        activeColor: '', // 选中标签的颜色
+        inactiveColor: '', // 未选中标签的颜色
+      },
+      parent: {},
+    };
+  },
+  created() {
+    this.init();
+  },
+  methods: {
+    getParentData(parentName = '') {
+      // 避免在created中去定义parent变量
+      if (!this.parent) this.parent = {};
+      // 这里的本质原理是,通过获取父组件实例(也即类似u-radio的父组件u-radio-group的this)
+      // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
+      // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
+      // 此处并不会自动更新子组件的数据,而是依赖父组件u-radio-group去监听data的变化,手动调用更新子组件的方法去重新获取
+      this.parent = $parent.call(this, parentName);
+      if (this.parent.children) {
+        // 如果父组件的children不存在本组件的实例,才将本实例添加到父组件的children中
+        this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
+      }
+      if (this.parent && this.parentData) {
+        // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
+        Object.keys(this.parentData).map((key) => {
+          this.parentData[key] = this.parent[key];
+        });
+      }
+    },
+    init() {
+      // 支付宝小程序不支持provide/inject,所以使用这个方法获取整个父组件,在created定义,避免循环引用
+      this.updateParentData();
+      if (!this.parent) {
+        console.log('u-tabbar-item必须搭配u-tabbar组件使用');
+      }
+      // 本子组件在u-tabbar的children数组中的索引
+      const index = this.parent.children.indexOf(this);
+      // 判断本组件的name(如果没有定义name,就用index索引)是否等于父组件的value参数
+      this.isActive = (this.name.split('?')[0] || index) === this.parentData.value;
+    },
+    updateParentData() {
+      // 此方法在mixin中
+      this.getParentData('su-tabbar');
+    },
+    // 此方法将会被父组件u-tabbar调用
+    updateFromParent() {
+      // 重新初始化
       this.init();
     },
-    methods: {
-      getParentData(parentName = '') {
-        // 避免在created中去定义parent变量
-        if (!this.parent) this.parent = {};
-        // 这里的本质原理是,通过获取父组件实例(也即类似u-radio的父组件u-radio-group的this)
-        // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
-        // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
-        // 此处并不会自动更新子组件的数据,而是依赖父组件u-radio-group去监听data的变化,手动调用更新子组件的方法去重新获取
-        this.parent = $parent.call(this, parentName);
-        if (this.parent.children) {
-          // 如果父组件的children不存在本组件的实例,才将本实例添加到父组件的children中
-          this.parent.children.indexOf(this) === -1 && this.parent.children.push(this);
-        }
-        if (this.parent && this.parentData) {
-          // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
-          Object.keys(this.parentData).map((key) => {
-            this.parentData[key] = this.parent[key];
-          });
-        }
-      },
-      init() {
-        // 支付宝小程序不支持provide/inject,所以使用这个方法获取整个父组件,在created定义,避免循环引用
-        this.updateParentData();
-        if (!this.parent) {
-          console.log('u-tabbar-item必须搭配u-tabbar组件使用');
-        }
-        // 本子组件在u-tabbar的children数组中的索引
+    clickHandler() {
+      this.$nextTick(() => {
         const index = this.parent.children.indexOf(this);
-        // 判断本组件的name(如果没有定义name,就用index索引)是否等于父组件的value参数
-        this.isActive = (this.name.split('?')[0] || index) === this.parentData.value;
-      },
-      updateParentData() {
-        // 此方法在mixin中
-        this.getParentData('su-tabbar');
-      },
-      // 此方法将会被父组件u-tabbar调用
-      updateFromParent() {
-        // 重新初始化
-        this.init();
-      },
-      clickHandler() {
-        this.$nextTick(() => {
-          const index = this.parent.children.indexOf(this);
-          const name = this.name || index;
-          // 点击的item为非激活的item才发出change事件
-          if (name !== this.parent.value) {
-            this.parent.$emit('change', name);
-          }
-          this.$emit('click', name);
-        });
-      },
+        const name = this.name || index;
+        // 点击的item为非激活的item才发出change事件
+        if (name !== this.parent.value) {
+          this.parent.$emit('change', name);
+        }
+        this.$emit('click', name);
+      });
     },
-  };
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-  .tabbar-center-item {
-    height: 40px;
-    width: 40px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    border-radius: 50%;
-    background-color: rebeccapurple;
-    transform: scale(1.3) translateY(-6px);
-    position: absolute;
-    z-index: 2;
+.tabbar-center-item {
+  height: 40px;
+  width: 40px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 50%;
+  background-color: rebeccapurple;
+  transform: scale(1.3) translateY(-6px);
+  position: absolute;
+  z-index: 2;
 
-    .center-image {
-      width: 25px;
-      height: 25px;
-    }
+  .center-image {
+    width: 25px;
+    height: 25px;
   }
+}
+
+.u-tabbar-item {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  flex: 1;
+  position: relative;
+  z-index: 1;
 
-  .u-tabbar-item {
+  &__icon {
     display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    flex: 1;
     position: relative;
-    z-index: 1;
-
-    &__icon {
-      display: flex;
-      position: relative;
-      width: 150rpx;
-      justify-content: center;
-    }
-
-    &__text {
-      margin-top: 2px;
-      font-size: 12px;
-      color: var(--textSize);
-    }
+    width: 150rpx;
+    justify-content: center;
   }
 
-  /* #ifdef MP */
-  // 由于小程序都使用shadow DOM形式实现,需要给影子宿主设置flex: 1才能让其撑开
-  :host {
-    flex: 1;
+  &__text {
+    margin-top: 2px;
+    font-size: 12px;
+    color: var(--textSize);
   }
+}
+
+/* #ifdef MP */
+// 由于小程序都使用shadow DOM形式实现,需要给影子宿主设置flex: 1才能让其撑开
+:host {
+  flex: 1;
+}
 
-  /* #endif */
+/* #endif */
 </style>