commit 54780c2b24d2b6751b4b9fe972687f3fb0dfffde Author: 多啦C梦 <15709267061@163.com> Date: Wed Dec 18 16:05:16 2024 +0800 feat: init diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..3943bcb Binary files /dev/null and b/.DS_Store differ diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5760be5 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..35410ca --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/UniappTool.xml b/.idea/UniappTool.xml new file mode 100644 index 0000000..f7328e8 --- /dev/null +++ b/.idea/UniappTool.xml @@ -0,0 +1,10 @@ + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..7c4836f --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/.idea/material_theme_project_new.xml b/.idea/material_theme_project_new.xml new file mode 100644 index 0000000..73eabcb --- /dev/null +++ b/.idea/material_theme_project_new.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..5fe9c91 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/taro-template.iml b/.idea/taro-template.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/taro-template.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.swc/plugins/v7_macos_aarch64_0.104.8/8e5f9a368e0e12a37d05ba4733d1976df8de2780ee8b9fb55a3de622a26bf9ad b/.swc/plugins/v7_macos_aarch64_0.104.8/8e5f9a368e0e12a37d05ba4733d1976df8de2780ee8b9fb55a3de622a26bf9ad new file mode 100644 index 0000000..7c7f2b4 Binary files /dev/null and b/.swc/plugins/v7_macos_aarch64_0.104.8/8e5f9a368e0e12a37d05ba4733d1976df8de2780ee8b9fb55a3de622a26bf9ad differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..314c598 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,11 @@ +// babel-preset-taro 更多选项和默认值: +// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md +module.exports = { + presets: [ + ['taro', { + framework: 'react', + ts: false, + compiler: 'webpack5', + }] + ] +} diff --git a/config/dev.js b/config/dev.js new file mode 100644 index 0000000..0c20377 --- /dev/null +++ b/config/dev.js @@ -0,0 +1,8 @@ +export default { + logger: { + quiet: false, + stats: true + }, + mini: {}, + h5: {} +} diff --git a/config/index.js b/config/index.js new file mode 100644 index 0000000..66f9dc3 --- /dev/null +++ b/config/index.js @@ -0,0 +1,92 @@ +import { defineConfig } from '@tarojs/cli' + +import devConfig from './dev' +import prodConfig from './prod' + +// https://taro-docs.jd.com/docs/next/config#defineconfig-辅助函数 +export default defineConfig(async (merge, { command, mode }) => { + const baseConfig = { + projectName: 'taro-template', + date: '2024-12-18', + designWidth: 750, + deviceRatio: { + 640: 2.34 / 2, + 750: 1, + 375: 2, + 828: 1.81 / 2 + }, + sourceRoot: 'src', + outputRoot: 'dist', + plugins: [], + defineConstants: { + }, + copy: { + patterns: [ + ], + options: { + } + }, + framework: 'react', + compiler: 'webpack5', + cache: { + enable: false // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache + }, + mini: { + postcss: { + pxtransform: { + enable: true, + config: { + + } + }, + cssModules: { + enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true + config: { + namingPattern: 'module', // 转换模式,取值为 global/module + generateScopedName: '[name]__[local]___[hash:base64:5]' + } + } + } + }, + h5: { + publicPath: '/', + staticDirectory: 'static', + output: { + filename: 'js/[name].[hash:8].js', + chunkFilename: 'js/[name].[chunkhash:8].js' + }, + miniCssExtractPluginOption: { + ignoreOrder: true, + filename: 'css/[name].[hash].css', + chunkFilename: 'css/[name].[chunkhash].css' + }, + postcss: { + autoprefixer: { + enable: true, + config: {} + }, + cssModules: { + enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true + config: { + namingPattern: 'module', // 转换模式,取值为 global/module + generateScopedName: '[name]__[local]___[hash:base64:5]' + } + } + } + }, + rn: { + appName: 'taroDemo', + postcss: { + cssModules: { + enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true + } + } + } + } + if (process.env.NODE_ENV === 'development') { + // 本地开发构建配置(不混淆压缩) + return merge({}, baseConfig, devConfig) + } + // 生产构建配置(默认开启压缩混淆等) + return merge({}, baseConfig, prodConfig) +}) diff --git a/config/prod.js b/config/prod.js new file mode 100644 index 0000000..2ae91b8 --- /dev/null +++ b/config/prod.js @@ -0,0 +1,31 @@ +export default { + mini: {}, + h5: { + /** + * WebpackChain 插件配置 + * @docs https://github.com/neutrinojs/webpack-chain + */ + // webpackChain (chain) { + // /** + // * 如果 h5 端编译后体积过大,可以使用 webpack-bundle-analyzer 插件对打包体积进行分析。 + // * @docs https://github.com/webpack-contrib/webpack-bundle-analyzer + // */ + // chain.plugin('analyzer') + // .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, []) + // /** + // * 如果 h5 端首屏加载时间过长,可以使用 prerender-spa-plugin 插件预加载首页。 + // * @docs https://github.com/chrisvfritz/prerender-spa-plugin + // */ + // const path = require('path') + // const Prerender = require('prerender-spa-plugin') + // const staticDir = path.join(__dirname, '..', 'dist') + // chain + // .plugin('prerender') + // .use(new Prerender({ + // staticDir, + // routes: [ '/pages/index/index' ], + // postProcess: (context) => ({ ...context, outputPath: path.join(staticDir, 'index.html') }) + // })) + // } + } +} diff --git a/dist/app.js b/dist/app.js new file mode 100644 index 0000000..39a488e --- /dev/null +++ b/dist/app.js @@ -0,0 +1,204 @@ +"use strict"; +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-TQO5S7WL_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-WRSQ3V3E_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_react-redux_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-6TBQVUF2_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_chunk-GLEAZC6U_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-framework-react_dist_runtime_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_redux-logger_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_redux_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_plugin-platform-weapp_dist_runtime_js.js"); +require("./prebundle/node_modules_taro_weapp_prebundle_tarojs_runtime_js.js"); +require("./prebundle/vendors-node_modules_taro_weapp_prebundle_tarojs_taro_js.js"); +require("./prebundle/remoteEntry.js"); +require("./prebundle/node_modules_taro_weapp_prebundle_react_jsx-runtime_js.js"); +require("./prebundle/node_modules_taro_weapp_prebundle_react_js.js"); +require("./prebundle/node_modules_taro_weapp_prebundle_redux-thunk_js.js"); +require("./prebundle/node_modules_taro_weapp_prebundle_react-dom_js.js"); + +require("./common"); +require("./taro"); +require("./runtime"); + +(wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["app"],{ + +/***/ "./node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.91.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=app!./src/app.jsx": +/*!******************************************************************************************************************************************************************!*\ + !*** ./node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.91.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=app!./src/app.jsx ***! + \******************************************************************************************************************************************************************/ +/***/ (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 _store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./store */ "./src/store/index.js"); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime"); +/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__); + + + + + +const store = (0,_store__WEBPACK_IMPORTED_MODULE_2__["default"])(); +class App extends react__WEBPACK_IMPORTED_MODULE_0__.Component { + componentDidMount() {} + componentDidShow() {} + componentDidHide() {} + + // 在 App 类中的 render() 函数没有实际作用 + // 请勿修改此函数 + render() { + return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(react_redux__WEBPACK_IMPORTED_MODULE_1__.Provider, { + store: store, + children: this.props.children + }); + } +} +/* harmony default export */ __webpack_exports__["default"] = (App); + +/***/ }), + +/***/ "./src/app.jsx": +/*!*********************!*\ + !*** ./src/app.jsx ***! + \*********************/ +/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) { + +/* harmony import */ var _tarojs_plugin_platform_weapp_dist_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/plugin-platform-weapp/dist/runtime */ "webpack/container/remote/@tarojs/plugin-platform-weapp/dist/runtime"); +/* harmony import */ var _tarojs_plugin_platform_weapp_dist_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_plugin_platform_weapp_dist_runtime__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime"); +/* harmony import */ var _tarojs_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/plugin-framework-react/dist/runtime */ "webpack/container/remote/@tarojs/plugin-framework-react/dist/runtime"); +/* harmony import */ var _tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro"); +/* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _node_modules_pnpm_tarojs_taro_loader_4_0_8_webpack_5_91_0_swc_core_1_3_96_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_app_app_jsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !!../node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.91.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=app!./app.jsx */ "./node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.91.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=app!./src/app.jsx"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ "webpack/container/remote/react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-dom */ "webpack/container/remote/react-dom"); +/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_6__); + + + + + + + + + + + +var config = {"pages":["pages/index/index"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}}; +_tarojs_runtime__WEBPACK_IMPORTED_MODULE_1__.window.__taroAppConfig = config +var inst = App((0,_tarojs_plugin_framework_react_dist_runtime__WEBPACK_IMPORTED_MODULE_2__.createReactApp)(_node_modules_pnpm_tarojs_taro_loader_4_0_8_webpack_5_91_0_swc_core_1_3_96_node_modules_tarojs_taro_loader_lib_entry_cache_js_name_app_app_jsx__WEBPACK_IMPORTED_MODULE_4__["default"], react__WEBPACK_IMPORTED_MODULE_5__, (react_dom__WEBPACK_IMPORTED_MODULE_6___default()), config)) + +;(0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_3__.initPxTransform)({ + designWidth: 750, + deviceRatio: {"375":2,"640":1.17,"750":1,"828":0.905}, + baseFontSize: 20, + unitPrecision: undefined, + targetUnit: undefined +}) + + +/***/ }), + +/***/ "./src/reducers/counter.js": +/*!*********************************!*\ + !*** ./src/reducers/counter.js ***! + \*********************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": function() { return /* binding */ counter; } +/* harmony export */ }); +/* harmony import */ var _constants_counter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../constants/counter */ "./src/constants/counter.js"); + +const INITIAL_STATE = { + num: 0 +}; +function counter() { + let state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE; + let action = arguments.length > 1 ? arguments[1] : undefined; + switch (action.type) { + case _constants_counter__WEBPACK_IMPORTED_MODULE_0__.ADD: + return { + ...state, + num: state.num + 1 + }; + case _constants_counter__WEBPACK_IMPORTED_MODULE_0__.MINUS: + return { + ...state, + num: state.num - 1 + }; + default: + return state; + } +} + +/***/ }), + +/***/ "./src/reducers/index.js": +/*!*******************************!*\ + !*** ./src/reducers/index.js ***! + \*******************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "webpack/container/remote/redux"); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(redux__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _counter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./counter */ "./src/reducers/counter.js"); + + +/* harmony default export */ __webpack_exports__["default"] = ((0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)({ + counter: _counter__WEBPACK_IMPORTED_MODULE_1__["default"] +})); + +/***/ }), + +/***/ "./src/store/index.js": +/*!****************************!*\ + !*** ./src/store/index.js ***! + \****************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": function() { return /* binding */ configStore; } +/* harmony export */ }); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "webpack/container/remote/redux"); +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(redux__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux-thunk */ "webpack/container/remote/redux-thunk"); +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(redux_thunk__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var redux_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! redux-logger */ "webpack/container/remote/redux-logger"); +/* harmony import */ var redux_logger__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(redux_logger__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../reducers */ "./src/reducers/index.js"); +/* provided dependency */ var window = __webpack_require__(/*! @tarojs/runtime */ "webpack/container/remote/@tarojs/runtime")["window"]; + + + + +const composeEnhancers = typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ + // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize... +}) : redux__WEBPACK_IMPORTED_MODULE_0__.compose; +const middlewares = [(redux_thunk__WEBPACK_IMPORTED_MODULE_1___default())]; +if (true) { + middlewares.push((redux_logger__WEBPACK_IMPORTED_MODULE_2___default())); +} +const enhancer = composeEnhancers((0,redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware)(...middlewares) +// other store enhancers if any +); +function configStore() { + const store = (0,redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore)(_reducers__WEBPACK_IMPORTED_MODULE_3__["default"], enhancer); + return store; +} + +/***/ }) + +}, +/******/ function(__webpack_require__) { // webpackRuntimeModules +/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } +/******/ __webpack_require__.O(0, ["common"], function() { return __webpack_exec__("./src/app.jsx"); }); +/******/ var __webpack_exports__ = __webpack_require__.O(); +/******/ } +]);;; +//# sourceMappingURL=app.js.map \ No newline at end of file diff --git a/dist/app.js.map b/dist/app.js.map new file mode 100644 index 0000000..92785df --- /dev/null +++ b/dist/app.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrBA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAIA;AAIA;AACA;AACA;AAEA;AAEA;AACA;AAEA;AACA;AACA;AACA","sources":["webpack://taro-template/._src_app.jsx","webpack://taro-template/./src/app.jsx?b80d","webpack://taro-template/._src_reducers_counter.js","webpack://taro-template/._src_reducers_index.js","webpack://taro-template/._src_store_index.js"],"sourcesContent":["import { Component } from 'react';\nimport { Provider } from 'react-redux';\nimport configStore from './store';\nimport './app.scss';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst store = configStore();\nclass App extends Component {\n componentDidMount() {}\n componentDidShow() {}\n componentDidHide() {}\n\n // 在 App 类中的 render() 函数没有实际作用\n // 请勿修改此函数\n render() {\n return /*#__PURE__*/_jsx(Provider, {\n store: store,\n children: this.props.children\n });\n }\n}\nexport default App;","import '@tarojs/plugin-platform-weapp/dist/runtime'\n\nimport { window } from '@tarojs/runtime'\nimport { createReactApp } from '@tarojs/plugin-framework-react/dist/runtime'\nimport { initPxTransform } from '@tarojs/taro'\n\nimport component from \"!!../node_modules/.pnpm/@tarojs+taro-loader@4.0.8_webpack@5.91.0_@swc+core@1.3.96_/node_modules/@tarojs/taro-loader/lib/entry-cache.js?name=app!./app.jsx\"\n\nimport * as React from 'react'\nimport ReactDOM from 'react-dom'\n\nvar config = {\"pages\":[\"pages/index/index\"],\"window\":{\"backgroundTextStyle\":\"light\",\"navigationBarBackgroundColor\":\"#fff\",\"navigationBarTitleText\":\"WeChat\",\"navigationBarTextStyle\":\"black\"}};\nwindow.__taroAppConfig = config\nvar inst = App(createReactApp(component, React, ReactDOM, config))\n\ninitPxTransform({\n designWidth: 750,\n deviceRatio: {\"375\":2,\"640\":1.17,\"750\":1,\"828\":0.905},\n baseFontSize: 20,\n unitPrecision: undefined,\n targetUnit: undefined\n})\n","import { ADD, MINUS } from '../constants/counter'\n\nconst INITIAL_STATE = {\n num: 0\n}\n\nexport default function counter (state = INITIAL_STATE, action) {\n switch (action.type) {\n case ADD:\n return {\n ...state,\n num: state.num + 1\n }\n case MINUS:\n return {\n ...state,\n num: state.num - 1\n }\n default:\n return state\n }\n}\n","import { combineReducers } from 'redux'\nimport counter from './counter'\n\nexport default combineReducers({\n counter\n})\n","import { legacy_createStore as createStore, applyMiddleware, compose } from 'redux'\nimport thunkMiddleware from 'redux-thunk'\nimport logger from 'redux-logger'\nimport rootReducer from '../reducers'\n\nconst composeEnhancers = typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__\n ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({\n // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...\n })\n : compose\n\nconst middlewares = [\n thunkMiddleware\n]\n\nif (process.env.NODE_ENV === 'development') {\n middlewares.push(logger)\n}\n\nconst enhancer = composeEnhancers(\n applyMiddleware(...middlewares),\n // other store enhancers if any\n)\n\nexport default function configStore () {\n const store = createStore(rootReducer, enhancer)\n return store\n}\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/dist/app.json b/dist/app.json new file mode 100644 index 0000000..ebbac1e --- /dev/null +++ b/dist/app.json @@ -0,0 +1 @@ +{"pages":["pages/index/index"],"window":{"backgroundTextStyle":"light","navigationBarBackgroundColor":"#fff","navigationBarTitleText":"WeChat","navigationBarTextStyle":"black"}} \ No newline at end of file diff --git a/dist/app.wxss b/dist/app.wxss new file mode 100644 index 0000000..3166ecc --- /dev/null +++ b/dist/app.wxss @@ -0,0 +1,4 @@ +/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ./node_modules/.pnpm/css-loader@7.1.2_webpack@5.91.0_@swc+core@1.3.96_/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[1]!./node_modules/.pnpm/postcss-loader@8.1.1_postcss@8.4.49_typescript@5.7.2_webpack@5.91.0_@swc+core@1.3.96_/node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[2]!./node_modules/.pnpm/resolve-url-loader@5.0.0/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@14.2.1_sass@1.83.0_webpack@5.91.0_@swc+core@1.3.96_/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].oneOf[0].use[4]!./src/app.scss ***! + \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ + diff --git a/dist/base.wxml b/dist/base.wxml new file mode 100644 index 0000000..154bc83 --- /dev/null +++ b/dist/base.wxml @@ -0,0 +1,635 @@ + +