Files
taro-template/dist/pages/index/index.js

150 lines
8.5 KiB
JavaScript
Raw Normal View History

2024-12-18 16:05:16 +08:00
"use strict";
(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["pages/index/index"],{
2024-12-31 15:12:09 +08:00
/***/ "./node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.94.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/index/index!./src/pages/index/index.jsx":
2024-12-18 16:05:16 +08:00
/*!**********************************************************************************************************************************************************************************************!*\
2024-12-31 15:12:09 +08:00
!*** ./node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.94.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/index/index!./src/pages/index/index.jsx ***!
2024-12-18 16:05:16 +08:00
\**********************************************************************************************************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ "webpack/container/remote/react-redux");
/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_redux__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/.pnpm/@tarojs+plugin-platform-weapp@4.0.8_@tarojs+service@4.0.8_@tarojs+shared@4.0.8/node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
/* harmony import */ var _actions_counter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../actions/counter */ "./src/actions/counter.js");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
var _dec, _class;
let Index = (_dec = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.connect)(_ref => {
let {
counter
} = _ref;
return {
counter
};
}, dispatch => ({
add() {
dispatch((0,_actions_counter__WEBPACK_IMPORTED_MODULE_3__.add)());
},
dec() {
dispatch((0,_actions_counter__WEBPACK_IMPORTED_MODULE_3__.minus)());
},
asyncAdd() {
dispatch((0,_actions_counter__WEBPACK_IMPORTED_MODULE_3__.asyncAdd)());
}
})), _dec(_class = class Index extends react__WEBPACK_IMPORTED_MODULE_0__.Component {
componentWillReceiveProps(nextProps) {
console.log(this.props, nextProps);
}
componentWillUnmount() {}
componentDidShow() {}
componentDidHide() {}
render() {
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
className: "index",
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
className: "add_btn",
onClick: this.props.add,
children: "+"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
className: "dec_btn",
onClick: this.props.dec,
children: "-"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Button, {
className: "dec_btn",
onClick: this.props.asyncAdd,
children: "async"
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
children: this.props.counter.num
})
}), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
children: "Hello, World"
})
})]
});
}
}) || _class);
/* harmony default export */ __webpack_exports__["default"] = (Index);
/***/ }),
/***/ "./src/actions/counter.js":
/*!********************************!*\
!*** ./src/actions/counter.js ***!
\********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ add: function() { return /* binding */ add; },
/* harmony export */ asyncAdd: function() { return /* binding */ asyncAdd; },
/* harmony export */ minus: function() { return /* binding */ minus; }
/* harmony export */ });
/* harmony import */ var _constants_counter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/counter */ "./src/constants/counter.js");
const add = () => {
return {
type: _constants_counter__WEBPACK_IMPORTED_MODULE_0__.ADD
};
};
const minus = () => {
return {
type: _constants_counter__WEBPACK_IMPORTED_MODULE_0__.MINUS
};
};
// 异步的action
function asyncAdd() {
return dispatch => {
setTimeout(() => {
dispatch(add());
}, 2000);
};
}
/***/ }),
/***/ "./src/pages/index/index.jsx":
/*!***********************************!*\
!*** ./src/pages/index/index.jsx ***!
\***********************************/
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime");
/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__);
2024-12-31 15:12:09 +08:00
/* harmony import */ var _node_modules_pnpm_tarojs_taro_loader_4_0_8_webpack_5_94_0_swc_core_1_3_96_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_jsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !!../../../node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.94.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/index/index!./index.jsx */ "./node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.94.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=pages/index/index!./src/pages/index/index.jsx");
2024-12-18 16:05:16 +08:00
var config = {"navigationBarTitleText":"首页"};
2024-12-31 15:12:09 +08:00
var taroOption = (0,_tarojs_runtime__WEBPACK_IMPORTED_MODULE_0__.createPageConfig)(_node_modules_pnpm_tarojs_taro_loader_4_0_8_webpack_5_94_0_swc_core_1_3_96_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_jsx__WEBPACK_IMPORTED_MODULE_1__["default"], 'pages/index/index', {root:{cn:[]}}, config || {})
if (_node_modules_pnpm_tarojs_taro_loader_4_0_8_webpack_5_94_0_swc_core_1_3_96_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_jsx__WEBPACK_IMPORTED_MODULE_1__["default"] && _node_modules_pnpm_tarojs_taro_loader_4_0_8_webpack_5_94_0_swc_core_1_3_96_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_jsx__WEBPACK_IMPORTED_MODULE_1__["default"].behaviors) {
taroOption.behaviors = (taroOption.behaviors || []).concat(_node_modules_pnpm_tarojs_taro_loader_4_0_8_webpack_5_94_0_swc_core_1_3_96_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_jsx__WEBPACK_IMPORTED_MODULE_1__["default"].behaviors)
2024-12-18 16:05:16 +08:00
}
var inst = Page(taroOption)
2024-12-31 15:12:09 +08:00
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_pnpm_tarojs_taro_loader_4_0_8_webpack_5_94_0_swc_core_1_3_96_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_pages_index_index_index_jsx__WEBPACK_IMPORTED_MODULE_1__["default"]);
2024-12-18 16:05:16 +08:00
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ __webpack_require__.O(0, ["taro","common"], function() { return __webpack_exec__("./src/pages/index/index.jsx"); });
/******/ var __webpack_exports__ = __webpack_require__.O();
/******/ }
]);
//# sourceMappingURL=index.js.map