chore: webpack编译优化
This commit is contained in:
69
dist/common.js
vendored
69
dist/common.js
vendored
@@ -1,67 +1,2 @@
|
||||
"use strict";
|
||||
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["common"],{
|
||||
|
||||
/***/ "./src/pages/components/TabbarCom/index.tsx":
|
||||
/*!**************************************************!*\
|
||||
!*** ./src/pages/components/TabbarCom/index.tsx ***!
|
||||
\**************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _antmjs_vantui_es_tabbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @antmjs/vantui/es/tabbar */ "./node_modules/@antmjs/vantui/es/tabbar/index.js");
|
||||
/* harmony import */ var _antmjs_vantui_es_tabbar_item__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @antmjs/vantui/es/tabbar-item */ "./node_modules/@antmjs/vantui/es/tabbar-item/index.js");
|
||||
/* harmony import */ var _Users_eric_Desktop_citynew_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
|
||||
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var TabbarCom = function TabbarCom(props) {
|
||||
var _props$active;
|
||||
var _react$useState = react__WEBPACK_IMPORTED_MODULE_3___default().useState((_props$active = props === null || props === void 0 ? void 0 : props.active) !== null && _props$active !== void 0 ? _props$active : 0),
|
||||
_react$useState2 = (0,_Users_eric_Desktop_citynew_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_react$useState, 2),
|
||||
active = _react$useState2[0],
|
||||
setActive = _react$useState2[1];
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_6__.View, {
|
||||
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsxs)(_antmjs_vantui_es_tabbar__WEBPACK_IMPORTED_MODULE_0__["default"], {
|
||||
active: active,
|
||||
onChange: function onChange(e) {
|
||||
console.log("e", e);
|
||||
setActive(e === null || e === void 0 ? void 0 : e.detail);
|
||||
if ((e === null || e === void 0 ? void 0 : e.detail) === 2) {
|
||||
_tarojs_taro__WEBPACK_IMPORTED_MODULE_2___default().navigateTo({
|
||||
url: "/pages/my/index"
|
||||
});
|
||||
}
|
||||
},
|
||||
safeAreaInsetBottom: false,
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_antmjs_vantui_es_tabbar_item__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
||||
icon: "home-o",
|
||||
children: "\u9996\u9875"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_antmjs_vantui_es_tabbar_item__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
||||
icon: "friends-o",
|
||||
children: "\u6D3B\u52A8"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_antmjs_vantui_es_tabbar_item__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
||||
icon: "setting-o",
|
||||
children: "\u6211\u7684"
|
||||
})]
|
||||
})
|
||||
});
|
||||
};
|
||||
/* harmony default export */ __webpack_exports__["default"] = (TabbarCom);
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=common.js.map
|
||||
/*! For license information please see common.js.LICENSE.txt */
|
||||
"use strict";(wx.webpackJsonp=wx.webpackJsonp||[]).push([["common"],{"./src/pages/components/TabbarCom/index.tsx":function(e,n,t){var o=t("./node_modules/@antmjs/vantui/es/tabbar/index.js"),a=t("./node_modules/@antmjs/vantui/es/tabbar-item/index.js"),i=t("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),s=t("./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js"),r=t("webpack/container/remote/@tarojs/taro"),l=t.n(r),d=t("webpack/container/remote/react"),c=t.n(d),u=t("webpack/container/remote/react/jsx-runtime");n.default=function TabbarCom(e){var n,t=c().useState(null!==(n=null==e?void 0:e.active)&&void 0!==n?n:0),r=(0,i.default)(t,2),d=r[0],m=r[1];return(0,u.jsx)(s.View,{style:{marginTop:"40px"},children:(0,u.jsxs)(o.default,{active:d,onChange:function onChange(e){console.log("e",e),m(null==e?void 0:e.detail),0===(null==e?void 0:e.detail)&&l().redirectTo({url:"/pages/home/index"}),1===(null==e?void 0:e.detail)&&l().redirectTo({url:"/pages/activityList/index"}),2===(null==e?void 0:e.detail)&&l().redirectTo({url:"/pages/my/index"})},safeAreaInsetBottom:!1,children:[(0,u.jsx)(a.default,{icon:"home-o",children:"首页"}),(0,u.jsx)(a.default,{icon:"friends-o",children:"活动"}),(0,u.jsx)(a.default,{icon:"setting-o",children:"我的"})]})})}}}]);
|
||||
Reference in New Issue
Block a user