商品浏览页构建上传1.1.0版本
This commit is contained in:
Vendored
+1
-94
@@ -1,94 +1 @@
|
||||
"use strict";
|
||||
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["custom-tab-bar/index"],{
|
||||
|
||||
/***/ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./src/custom-tab-bar/index.tsx":
|
||||
/*!**********************************************************************************************************************!*\
|
||||
!*** ./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./src/custom-tab-bar/index.tsx ***!
|
||||
\**********************************************************************************************************************/
|
||||
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": function() { return /* binding */ CustomTabBar; }
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "./node_modules/@tarojs/taro/index.js");
|
||||
/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "./node_modules/react/cjs/react-jsx-runtime.production.min.js");
|
||||
|
||||
|
||||
|
||||
|
||||
var TABS = [{
|
||||
pagePath: '/pages/index/index',
|
||||
text: '首页',
|
||||
icon: '/icon/首页.png'
|
||||
}, {
|
||||
pagePath: '/pages/designList/index',
|
||||
text: '设计清单',
|
||||
icon: '/icon/调色盘.png'
|
||||
}, {
|
||||
pagePath: '/pages/orders/index',
|
||||
text: '订单',
|
||||
icon: '/icon/包裹.png'
|
||||
}, {
|
||||
pagePath: '/pages/profile/index',
|
||||
text: '我的',
|
||||
icon: '/icon/个人.png'
|
||||
}];
|
||||
function CustomTabBar() {
|
||||
var _Taro$getCurrentInsta;
|
||||
var currentPath = "/".concat(((_Taro$getCurrentInsta = _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getCurrentInstance().router) === null || _Taro$getCurrentInsta === void 0 ? void 0 : _Taro$getCurrentInsta.path) || 'pages/index/index');
|
||||
var switchTab = function switchTab(url) {
|
||||
_tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().switchTab({
|
||||
url: url
|
||||
});
|
||||
};
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.View, {
|
||||
className: "custom-tab-bar",
|
||||
children: TABS.map(function (tab) {
|
||||
var isActive = currentPath === tab.pagePath;
|
||||
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.View, {
|
||||
className: "tab-item ".concat(isActive ? 'active' : ''),
|
||||
onTap: function onTap() {
|
||||
return switchTab(tab.pagePath);
|
||||
},
|
||||
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Image, {
|
||||
className: "tab-icon-img ".concat(isActive ? 'active' : ''),
|
||||
src: tab.icon,
|
||||
mode: "aspectFit"
|
||||
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Text, {
|
||||
className: "tab-label",
|
||||
children: tab.text
|
||||
})]
|
||||
}, tab.pagePath);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/custom-tab-bar/index.tsx":
|
||||
/*!**************************************!*\
|
||||
!*** ./src/custom-tab-bar/index.tsx ***!
|
||||
\**************************************/
|
||||
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
||||
|
||||
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "./node_modules/@tarojs/runtime/dist/runtime.esm.js");
|
||||
/* harmony import */ var _node_modules_tarojs_taro_loader_lib_entry_cache_js_name_custom_tab_bar_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !!../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./index.tsx */ "./node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./src/custom-tab-bar/index.tsx");
|
||||
|
||||
|
||||
var inst = Component((0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.createComponentConfig)(_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_custom_tab_bar_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"], 'custom-tab-bar/index'))
|
||||
|
||||
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_custom_tab_bar_index_index_tsx__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
||||
/******/ __webpack_require__.O(0, ["taro","vendors"], function() { return __webpack_exec__("./src/custom-tab-bar/index.tsx"); });
|
||||
/******/ var __webpack_exports__ = __webpack_require__.O();
|
||||
/******/ }
|
||||
]);
|
||||
//# sourceMappingURL=index.js.map
|
||||
"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[777],{653:function(n,e,t){var a=t(7842),c=t(118),i=t(758),o=t.n(i),s=t(4848),p=[{pagePath:"/pages/index/index",text:"\u9996\u9875",icon:"/icon/\u9996\u9875.png"},{pagePath:"/pages/shop/index",text:"\u5546\u54c1",icon:"/icon/\u5546\u54c1.png"},{pagePath:"/pages/designList/index",text:"\u8bbe\u8ba1\u6e05\u5355",icon:"/icon/\u8c03\u8272\u76d8.png"},{pagePath:"/pages/orders/index",text:"\u8ba2\u5355",icon:"/icon/\u5305\u88f9.png"},{pagePath:"/pages/profile/index",text:"\u6211\u7684",icon:"/icon/\u4e2a\u4eba.png"}];function r(){var n,e="/".concat((null===(n=o().getCurrentInstance().router)||void 0===n?void 0:n.path)||"pages/index/index"),t=function(n){o().switchTab({url:n})};return(0,s.jsx)(c.Ss,{className:"custom-tab-bar",children:p.map(function(n){var a=e===n.pagePath;return(0,s.jsxs)(c.Ss,{className:"tab-item ".concat(a?"active":""),onTap:function(){return t(n.pagePath)},children:[(0,s.jsx)(c._V,{className:"tab-icon-img ".concat(a?"active":""),src:n.icon,mode:"aspectFit"}),(0,s.jsx)(c.EY,{className:"tab-label",children:n.text})]},n.pagePath)})})}Component((0,a.createComponentConfig)(r,"custom-tab-bar/index"))}},function(n){var e=function(e){return n(n.s=e)};n.O(0,[907,96],function(){return e(653)});n.O()}]);
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"custom-tab-bar/index.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA","sources":["webpack://smart-engraving-miniapp/./src/custom-tab-bar/index.tsx?65a5","webpack://smart-engraving-miniapp/._src_custom-tab-bar_index.tsx"],"sourcesContent":["import { View, Text, Image } from '@tarojs/components';\nimport Taro from '@tarojs/taro';\nimport './index.scss';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nvar TABS = [{\n pagePath: '/pages/index/index',\n text: '首页',\n icon: '/icon/首页.png'\n}, {\n pagePath: '/pages/designList/index',\n text: '设计清单',\n icon: '/icon/调色盘.png'\n}, {\n pagePath: '/pages/orders/index',\n text: '订单',\n icon: '/icon/包裹.png'\n}, {\n pagePath: '/pages/profile/index',\n text: '我的',\n icon: '/icon/个人.png'\n}];\nexport default function CustomTabBar() {\n var _Taro$getCurrentInsta;\n var currentPath = \"/\".concat(((_Taro$getCurrentInsta = Taro.getCurrentInstance().router) === null || _Taro$getCurrentInsta === void 0 ? void 0 : _Taro$getCurrentInsta.path) || 'pages/index/index');\n var switchTab = function switchTab(url) {\n Taro.switchTab({\n url: url\n });\n };\n return /*#__PURE__*/_jsx(View, {\n className: \"custom-tab-bar\",\n children: TABS.map(function (tab) {\n var isActive = currentPath === tab.pagePath;\n return /*#__PURE__*/_jsxs(View, {\n className: \"tab-item \".concat(isActive ? 'active' : ''),\n onTap: function onTap() {\n return switchTab(tab.pagePath);\n },\n children: [/*#__PURE__*/_jsx(Image, {\n className: \"tab-icon-img \".concat(isActive ? 'active' : ''),\n src: tab.icon,\n mode: \"aspectFit\"\n }), /*#__PURE__*/_jsx(Text, {\n className: \"tab-label\",\n children: tab.text\n })]\n }, tab.pagePath);\n })\n });\n}","import { createComponentConfig } from '@tarojs/runtime'\nimport component from \"!!../../node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=custom-tab-bar/index!./index.tsx\"\nvar inst = Component(createComponentConfig(component, 'custom-tab-bar/index'))\n\nexport default component\n"],"names":[],"sourceRoot":""}
|
||||
Vendored
+1
-71
@@ -1,71 +1 @@
|
||||
/*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** css ./node_modules/@tarojs/webpack5-runner/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/resolve-url-loader/index.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/custom-tab-bar/index.scss ***!
|
||||
\*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
.custom-tab-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 120rpx;
|
||||
background: #ffffff;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-justify-content: space-around;
|
||||
-ms-flex-pack: distribute;
|
||||
justify-content: space-around;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border-top: 3rpx dashed #A0C4FF;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
padding: 10rpx 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab-icon-img {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-bottom: 4rpx;
|
||||
-webkit-transition: -webkit-transform 0.2s;
|
||||
transition: -webkit-transform 0.2s;
|
||||
transition: transform 0.2s;
|
||||
transition: transform 0.2s, -webkit-transform 0.2s;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.tab-item.active .tab-icon-img {
|
||||
-webkit-transform: scale(1.15);
|
||||
-ms-transform: scale(1.15);
|
||||
transform: scale(1.15);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tab-label {
|
||||
font-size: 20rpx;
|
||||
color: #b08d8d;
|
||||
-webkit-transition: color 0.2s;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.tab-item.active .tab-label {
|
||||
color: #ff9a9e;
|
||||
font-weight: 600;
|
||||
}
|
||||
.custom-tab-bar{-ms-flex-pack:distribute;-ms-flex-align:center;-webkit-align-items:center;align-items:center;background:#fff;border-top:3rpx dashed #a0c4ff;bottom:0;display:-webkit-flex;display:-ms-flexbox;display:flex;height:120rpx;-webkit-justify-content:space-around;justify-content:space-around;left:0;padding-bottom:env(safe-area-inset-bottom);position:fixed;right:0;z-index:1000}.tab-item{-ms-flex-align:center;-ms-flex-pack:center;-webkit-align-items:center;align-items:center;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-justify-content:center;justify-content:center;padding:10rpx 20rpx;position:relative}.tab-icon-img{height:28rpx;margin-bottom:4rpx;opacity:.6;-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s;width:28rpx}.tab-item.active .tab-icon-img{opacity:1;-webkit-transform:scale(1.15);-ms-transform:scale(1.15);transform:scale(1.15)}.tab-label{color:#b08d8d;font-size:20rpx;-webkit-transition:color .2s;transition:color .2s}.tab-item.active .tab-label{color:#ff9a9e;font-weight:600}
|
||||
Reference in New Issue
Block a user