s-material-react 0.1.0 → 0.1.2
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.
- package/css/common/addressItem.scss +47 -0
- package/css/common/coupon.scss +73 -0
- package/css/common/evaluateItem.scss +58 -0
- package/css/common/index.scss +4 -0
- package/css/common/stepNum.scss +20 -0
- package/css/pages/addressList.scss +29 -0
- package/css/pages/cart.scss +130 -0
- package/css/pages/couponList.scss +204 -0
- package/css/pages/evaluateEntry.scss +57 -0
- package/css/pages/evaluateList.scss +82 -51
- package/css/pages/goodsDetail.scss +262 -2
- package/css/pages/index.scss +7 -0
- package/css/pages/mine.scss +96 -0
- package/css/pages/orderEntry.scss +3 -0
- package/css/pages/placeOrder.scss +104 -0
- package/css/pages/placeOrderResult.scss +100 -0
- package/dist/common/addressItem/index.d.ts +1 -0
- package/dist/common/addressItem/index.js +10 -0
- package/dist/common/coupon/index.d.ts +2 -0
- package/dist/common/coupon/index.js +9 -0
- package/dist/common/evaluateItem/index.d.ts +2 -0
- package/dist/common/evaluateItem/index.js +13 -0
- package/dist/common/mock/index.d.ts +300 -0
- package/dist/common/mock/index.js +623 -0
- package/dist/common/stepNum/index.d.ts +5 -0
- package/dist/common/stepNum/index.js +9 -0
- package/dist/components/AddressDetail/index.d.ts +2 -0
- package/dist/components/AddressDetail/index.js +119 -0
- package/dist/components/AddressDetail/option.d.ts +2 -0
- package/dist/components/AddressDetail/option.js +32 -0
- package/dist/components/AddressList/index.d.ts +2 -0
- package/dist/components/AddressList/index.js +15 -0
- package/dist/components/Cart/index.d.ts +2 -0
- package/dist/components/Cart/index.js +29 -0
- package/dist/components/Cart/useNumStep.d.ts +1 -0
- package/dist/components/Cart/useNumStep.js +7 -0
- package/dist/components/CouponList/index.d.ts +2 -0
- package/dist/components/CouponList/index.js +29 -0
- package/dist/components/Cube/index.js +2 -2
- package/dist/components/EvaluateList/index.d.ts +2 -0
- package/dist/components/EvaluateList/index.js +40 -0
- package/dist/components/GoodsClassify/components/classifyFloor.js +5 -24
- package/dist/components/GoodsClassify/index.js +13 -5
- package/dist/components/GoodsDetail/components/evaluateEntry.d.ts +2 -0
- package/dist/components/GoodsDetail/components/evaluateEntry.js +43 -0
- package/dist/components/GoodsDetail/components/goodsDetailCollection.d.ts +2 -0
- package/dist/components/GoodsDetail/components/goodsDetailCollection.js +60 -0
- package/dist/components/GoodsDetail/components/goodsDetailCoupon.js +5 -5
- package/dist/components/GoodsDetail/components/goodsDetailEvaluate.js +3 -2
- package/dist/components/GoodsDetail/components/goodsDetailHandleBar.d.ts +2 -0
- package/dist/components/GoodsDetail/components/goodsDetailHandleBar.js +7 -0
- package/dist/components/GoodsDetail/components/goodsDetailInfo.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailInfo.js +2 -2
- package/dist/components/GoodsDetail/components/goodsDetailPopup.d.ts +2 -0
- package/dist/components/GoodsDetail/components/goodsDetailPopup.js +27 -0
- package/dist/components/GoodsDetail/components/goodsDetailPromotion.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailPromotion.js +3 -3
- package/dist/components/GoodsDetail/components/goodsDetailSize.d.ts +1 -1
- package/dist/components/GoodsDetail/components/goodsDetailSize.js +6 -6
- package/dist/components/GoodsDetail/index.js +53 -15
- package/dist/components/GoodsGroup/index.js +2 -1
- package/dist/components/GoodsList/components/filter.d.ts +1 -0
- package/dist/components/GoodsList/components/filter.js +31 -0
- package/dist/components/GoodsList/hooks/useGoodsList.d.ts +5 -0
- package/dist/components/GoodsList/hooks/useGoodsList.js +49 -0
- package/dist/components/GoodsList/index.js +9 -60
- package/dist/components/Mine/components/menuList.d.ts +1 -0
- package/dist/components/Mine/components/menuList.js +21 -0
- package/dist/components/Mine/components/orderEntry.d.ts +1 -0
- package/dist/components/Mine/components/orderEntry.js +41 -0
- package/dist/components/Mine/index.d.ts +7 -0
- package/dist/components/Mine/index.js +14 -0
- package/dist/components/Notice/index.js +7 -11
- package/dist/components/OrderDetail/index.js +2 -2
- package/dist/components/OrderList/components/OrderListItem.js +8 -4
- package/dist/components/OrderList/components/orderItem.js +2 -2
- package/dist/components/OrderList/index.js +3 -2
- package/dist/components/PlaceOrder/index.d.ts +2 -0
- package/dist/components/PlaceOrder/index.js +12 -0
- package/dist/components/PlaceOrderResult/index.d.ts +2 -0
- package/dist/components/PlaceOrderResult/index.js +12 -0
- package/dist/components/SearchPage/index.d.ts +7 -1
- package/dist/components/SearchPage/index.js +5 -6
- package/dist/components/Slider/index.d.ts +12 -12
- package/dist/components/Slider/item.d.ts +2 -2
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +8 -0
- package/dist/options/index.d.ts +2 -0
- package/dist/options/index.js +31 -0
- package/dist/routerMap/index.d.ts +5 -0
- package/dist/routerMap/index.js +5 -0
- package/dist/utils/checkImgUrl.d.ts +1 -0
- package/dist/utils/checkImgUrl.js +9 -0
- package/dist/utils/index.d.ts +0 -0
- package/dist/utils/index.js +1 -0
- package/package.json +4 -5
- package/dist/components/OrderEntry/index.d.ts +0 -2
- package/dist/components/OrderEntry/index.js +0 -9
- package/dist/components/Stamp/index.d.ts +0 -2
- package/dist/components/Stamp/index.js +0 -9
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export interface itemType {
|
|
3
3
|
imgUrl: string;
|
|
4
4
|
link: string;
|
|
5
5
|
}
|
|
6
6
|
interface SwiperType {
|
|
7
|
-
defaultValue
|
|
8
|
-
type
|
|
9
|
-
autoplay
|
|
10
|
-
autoplayInterval
|
|
11
|
-
direction
|
|
12
|
-
loop
|
|
13
|
-
marginTop
|
|
14
|
-
marginBottom
|
|
15
|
-
selectImg
|
|
16
|
-
imgHeight
|
|
7
|
+
defaultValue?: Array<itemType>;
|
|
8
|
+
type?: number;
|
|
9
|
+
autoplay?: boolean;
|
|
10
|
+
autoplayInterval?: number;
|
|
11
|
+
direction?: 'horizontal' | 'vertical';
|
|
12
|
+
loop?: boolean;
|
|
13
|
+
marginTop?: number;
|
|
14
|
+
marginBottom?: number;
|
|
15
|
+
selectImg?: Array<itemType>;
|
|
16
|
+
imgHeight?: {
|
|
17
17
|
height: number;
|
|
18
18
|
width: number;
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
export declare const Slider:
|
|
21
|
+
export declare const Slider: import("react").NamedExoticComponent<SwiperType>;
|
|
22
22
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { itemType } from './index';
|
|
3
|
-
export declare const Items:
|
|
3
|
+
export declare const Items: import("react").MemoExoticComponent<({ item, type }: {
|
|
4
4
|
item: itemType;
|
|
5
5
|
type: number;
|
|
6
6
|
}) => JSX.Element>;
|
|
@@ -19,3 +19,11 @@ export * from '../common/icon';
|
|
|
19
19
|
export * from './SearchPage';
|
|
20
20
|
export * from './GoodsDetailTopInfo';
|
|
21
21
|
export * from './GoodsDetailPromotion';
|
|
22
|
+
export * from './EvaluateList';
|
|
23
|
+
export * from './AddressList';
|
|
24
|
+
export * from './AddressDetail';
|
|
25
|
+
export * from './PlaceOrder';
|
|
26
|
+
export * from './PlaceOrderResult';
|
|
27
|
+
export * from './CouponList';
|
|
28
|
+
export * from './Cart';
|
|
29
|
+
export * from './Mine';
|
package/dist/components/index.js
CHANGED
|
@@ -19,3 +19,11 @@ export * from '../common/icon';
|
|
|
19
19
|
export * from './SearchPage';
|
|
20
20
|
export * from './GoodsDetailTopInfo';
|
|
21
21
|
export * from './GoodsDetailPromotion';
|
|
22
|
+
export * from './EvaluateList';
|
|
23
|
+
export * from './AddressList';
|
|
24
|
+
export * from './AddressDetail';
|
|
25
|
+
export * from './PlaceOrder';
|
|
26
|
+
export * from './PlaceOrderResult';
|
|
27
|
+
export * from './CouponList';
|
|
28
|
+
export * from './Cart';
|
|
29
|
+
export * from './Mine';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import provinces from 'china-division/dist/provinces.json';
|
|
2
|
+
import cities from 'china-division/dist/cities.json';
|
|
3
|
+
import areas from 'china-division/dist/areas.json';
|
|
4
|
+
console.log(5, provinces);
|
|
5
|
+
areas.forEach((area) => {
|
|
6
|
+
const matchCity = cities.filter((city) => city.code === area.cityCode)[0];
|
|
7
|
+
if (matchCity) {
|
|
8
|
+
matchCity.children = matchCity.children || [];
|
|
9
|
+
matchCity.children.push({
|
|
10
|
+
label: area.name,
|
|
11
|
+
value: area.code
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
cities.forEach((city) => {
|
|
16
|
+
const matchProvince = provinces.filter((province) => province.code === city.provinceCode)[0];
|
|
17
|
+
if (matchProvince) {
|
|
18
|
+
matchProvince.children = matchProvince.children || [];
|
|
19
|
+
matchProvince.children.push({
|
|
20
|
+
label: city.name,
|
|
21
|
+
value: city.code,
|
|
22
|
+
children: city.children
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const options = provinces.map((province) => ({
|
|
27
|
+
label: province.name,
|
|
28
|
+
value: province.code,
|
|
29
|
+
children: province.children
|
|
30
|
+
}));
|
|
31
|
+
export default options;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function checkImgUrl(str: string): string;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "s-material-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "'组件库'",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": [
|
|
@@ -27,14 +27,13 @@
|
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "ISC",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@brushes/api": "^0.
|
|
31
|
-
"@brushes/qj-simulate-component": "^0.0.
|
|
30
|
+
"@brushes/api": "^0.2.6",
|
|
31
|
+
"@brushes/qj-simulate-component": "^0.0.9",
|
|
32
32
|
"@brushes/tools": "^1.0.25",
|
|
33
33
|
"@stencil/core": "^2.19.1",
|
|
34
|
-
"@tarojs/components": "^3.5.4",
|
|
35
34
|
"@types/node": ">18.0.0",
|
|
36
35
|
"@types/react": "^18.0.0",
|
|
37
|
-
"
|
|
36
|
+
"china-division": "^2.5.0",
|
|
38
37
|
"classnames": "^2.3.2",
|
|
39
38
|
"flyio": "^0.6.14",
|
|
40
39
|
"nodemon": "^2.0.19",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
4
|
-
import { OBLIGATION, ORDERTOPAY, ORDERTORECEIVE, FINISH, AFTERSALE } from '../../static';
|
|
5
|
-
const OrderEntryJsx = () => {
|
|
6
|
-
const { View, Text, Badge } = useComponent();
|
|
7
|
-
return (_jsxs(View, Object.assign({ className: 'orderEntry' }, { children: [_jsxs(View, Object.assign({ className: 'title' }, { children: [_jsx(View, Object.assign({ className: 'name' }, { children: "\u6211\u7684\u8BA2\u5355" })), _jsx(View, Object.assign({ className: 'more' }, { children: "\u67E5\u770B\u5168\u90E8" }))] })), _jsxs(View, Object.assign({ className: 'content' }, { children: [_jsxs(View, Object.assign({ className: 'contentItem obligation' }, { children: [_jsx(Badge, Object.assign({ content: 5, color: 'red', style: { color: '#fff', fontSize: 12 } }, { children: _jsx("img", { src: OBLIGATION, mode: 'widthFix', className: 'icon' }) })), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5F85\u4ED8\u6B3E" }))] })), _jsxs(View, Object.assign({ className: 'contentItem orderToPay' }, { children: [_jsx("img", { src: ORDERTOPAY, mode: 'widthFix', className: 'icon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5F85\u53D1\u8D27" }))] })), _jsxs(View, Object.assign({ className: 'contentItem orderToReceive' }, { children: [_jsx("img", { src: ORDERTORECEIVE, mode: 'widthFix', className: 'icon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5F85\u6536\u8D27" }))] })), _jsxs(View, Object.assign({ className: 'contentItem finish' }, { children: [_jsx("img", { src: FINISH, mode: 'widthFix', className: 'icon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u5DF2\u5B8C\u6210" }))] })), _jsxs(View, Object.assign({ className: 'contentItem afterSale' }, { children: [_jsx("img", { src: AFTERSALE, mode: 'widthFix', className: 'icon' }), _jsx(Text, Object.assign({ className: 'subTitle' }, { children: "\u9000\u6362/\u552E\u540E" }))] }))] }))] })));
|
|
8
|
-
};
|
|
9
|
-
export const OrderEntry = memo(OrderEntryJsx);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { memo } from 'react';
|
|
3
|
-
import { Radio } from 'antd-mobile';
|
|
4
|
-
import { useComponent } from '@brushes/qj-simulate-component';
|
|
5
|
-
const StampJsx = ({ index, item }) => {
|
|
6
|
-
const { View, Text } = useComponent();
|
|
7
|
-
return (_jsx(View, Object.assign({ className: "stamp" }, { children: _jsxs(View, Object.assign({ className: 'stamp-content' }, { children: [_jsxs(View, Object.assign({ className: 'price' }, { children: [_jsx(Text, Object.assign({ className: 'symbol' }, { children: "\uFFE5" })), _jsx(Text, Object.assign({ className: 'num' }, { children: item.price }))] })), _jsxs(View, Object.assign({ className: 'info' }, { children: [_jsx(Text, Object.assign({ className: 'title' }, { children: item.title })), _jsxs(Text, Object.assign({ className: 'date' }, { children: ["\u6709\u6548\u671F\u81F3\uFF1A", item.date] }))] })), _jsx(Radio, { value: index, className: 'choose' })] })) })));
|
|
8
|
-
};
|
|
9
|
-
export const Stamp = memo(StampJsx);
|