s-material-react 0.0.9 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,28 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
11
  import { useComponent } from '@brushes/qj-simulate-component';
3
- import { getEnv } from '@brushes/api';
12
+ import { getEnv, getTaro } from '@brushes/api';
4
13
  export const ClassifyFloor = ({ navList, activeKey }) => {
5
14
  const { View, Text } = useComponent();
6
15
  console.log(4, navList);
7
- const switchImpl = () => {
16
+ const switchImpl = () => __awaiter(void 0, void 0, void 0, function* () {
8
17
  const isTaro = getEnv();
9
18
  console.log(45, isTaro);
10
19
  if (isTaro) {
11
- console.log(Taro);
20
+ const Taro = yield getTaro();
12
21
  Taro.navigateTo({
13
22
  url: '/subpackage/goods/index'
14
23
  });
15
24
  }
16
- };
25
+ });
17
26
  return navList.map((item) => (_jsx(View, Object.assign({ className: ['content', activeKey === `${item.goodsClassCode}` ? ' active' : ''].join('') }, { children: item === null || item === void 0 ? void 0 : item.childList.map((classifyItem) => {
18
27
  return (_jsxs(View, Object.assign({ className: 'classifyFloor' }, { children: [_jsxs(View, Object.assign({ className: 'titleWrap' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: classifyItem.goodsClassName })), _jsx(Text, { className: 'line' })] })), _jsx(View, Object.assign({ className: 'container' }, { children: classifyItem.childList.map((goodsItem) => {
19
28
  return (_jsxs(View, Object.assign({ onClick: switchImpl, className: 'classifyFloorGoodsItem' }, { children: [_jsx("img", { src: goodsItem.goodsClassLogo, className: 'logo' }), _jsx(Text, Object.assign({ className: 'title' }, { children: goodsItem.goodsClassName }))] }), goodsItem.goodsClassCode));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s-material-react",
3
- "version": "0.0.9",
3
+ "version": "0.1.0",
4
4
  "description": "'组件库'",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": [
@@ -27,7 +27,7 @@
27
27
  "author": "",
28
28
  "license": "ISC",
29
29
  "dependencies": {
30
- "@brushes/api": "^0.1.3",
30
+ "@brushes/api": "^0.1.5",
31
31
  "@brushes/qj-simulate-component": "^0.0.5",
32
32
  "@brushes/tools": "^1.0.25",
33
33
  "@stencil/core": "^2.19.1",