@rsmax/wechat 1.3.14 → 2.0.0-canary.91
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/cjs/hostComponents/ChannelLive/node.d.ts +9 -2
- package/cjs/hostComponents/ChannelLive/node.js +8 -1
- package/cjs/hostComponents/ChannelVideo/index.d.ts +2 -2
- package/cjs/hostComponents/ChannelVideo/index.js +3 -2
- package/cjs/hostComponents/ChannelVideo/node.d.ts +11 -0
- package/cjs/hostComponents/ChannelVideo/node.js +11 -0
- package/cjs/hostComponents/DraggableSheet/index.d.ts +24 -0
- package/cjs/hostComponents/DraggableSheet/index.js +12 -0
- package/cjs/hostComponents/DraggableSheet/node.d.ts +13 -0
- package/cjs/hostComponents/DraggableSheet/node.js +16 -0
- package/cjs/hostComponents/EditorPortal/index.d.ts +3 -3
- package/cjs/hostComponents/EditorPortal/index.js +0 -3
- package/cjs/hostComponents/FunctionalPageNavigator/node.d.ts +5 -0
- package/cjs/hostComponents/FunctionalPageNavigator/node.js +5 -0
- package/cjs/hostComponents/GridBuilder/index.d.ts +29 -0
- package/cjs/hostComponents/GridBuilder/index.js +9 -0
- package/cjs/hostComponents/GridBuilder/node.d.ts +17 -0
- package/cjs/hostComponents/GridBuilder/node.js +20 -0
- package/cjs/hostComponents/GridView/index.d.ts +21 -0
- package/cjs/hostComponents/GridView/index.js +9 -0
- package/cjs/hostComponents/GridView/node.d.ts +13 -0
- package/cjs/hostComponents/GridView/node.js +16 -0
- package/cjs/hostComponents/Input/node.d.ts +2 -1
- package/cjs/hostComponents/Input/node.js +2 -1
- package/cjs/hostComponents/KeyboardAccessory/index.js +1 -1
- package/cjs/hostComponents/KeyboardAccessory/node.d.ts +8 -1
- package/cjs/hostComponents/KeyboardAccessory/node.js +9 -2
- package/cjs/hostComponents/ListBuilder/index.d.ts +25 -0
- package/cjs/hostComponents/ListBuilder/index.js +10 -0
- package/cjs/hostComponents/ListBuilder/node.d.ts +15 -0
- package/cjs/hostComponents/ListBuilder/node.js +18 -0
- package/cjs/hostComponents/ListView/index.d.ts +11 -0
- package/cjs/hostComponents/ListView/index.js +8 -0
- package/cjs/hostComponents/ListView/node.d.ts +8 -0
- package/cjs/hostComponents/ListView/node.js +11 -0
- package/cjs/hostComponents/MatchMedia/node.d.ts +4 -0
- package/cjs/hostComponents/MatchMedia/node.js +4 -0
- package/cjs/hostComponents/NavigationBar/node.d.ts +4 -0
- package/cjs/hostComponents/NavigationBar/node.js +4 -0
- package/cjs/hostComponents/NestedScrollBody/index.d.ts +11 -0
- package/cjs/hostComponents/NestedScrollBody/index.js +8 -0
- package/cjs/hostComponents/NestedScrollBody/node.d.ts +8 -0
- package/cjs/hostComponents/NestedScrollBody/node.js +11 -0
- package/cjs/hostComponents/NestedScrollHeader/index.d.ts +9 -0
- package/cjs/hostComponents/NestedScrollHeader/index.js +5 -0
- package/cjs/hostComponents/NestedScrollHeader/node.d.ts +7 -0
- package/cjs/hostComponents/NestedScrollHeader/node.js +10 -0
- package/cjs/hostComponents/OfficialAccount/node.d.ts +4 -0
- package/cjs/hostComponents/OfficialAccount/node.js +4 -0
- package/cjs/hostComponents/OfficialAccountPublish/index.d.ts +24 -0
- package/cjs/hostComponents/OfficialAccountPublish/index.js +14 -0
- package/cjs/hostComponents/OfficialAccountPublish/node.d.ts +15 -0
- package/cjs/hostComponents/OfficialAccountPublish/node.js +18 -0
- package/cjs/hostComponents/OpenContainer/index.d.ts +27 -0
- package/cjs/hostComponents/OpenContainer/index.js +11 -0
- package/cjs/hostComponents/OpenContainer/node.d.ts +16 -0
- package/cjs/hostComponents/OpenContainer/node.js +19 -0
- package/cjs/hostComponents/OpenData/node.d.ts +4 -0
- package/cjs/hostComponents/OpenData/node.js +9 -1
- package/cjs/hostComponents/OpenDataItem/index.d.ts +9 -0
- package/cjs/hostComponents/OpenDataItem/index.js +5 -0
- package/cjs/hostComponents/OpenDataItem/node.d.ts +7 -0
- package/cjs/hostComponents/OpenDataItem/node.js +10 -0
- package/cjs/hostComponents/OpenDataList/index.d.ts +13 -0
- package/cjs/hostComponents/OpenDataList/index.js +5 -0
- package/cjs/hostComponents/OpenDataList/node.d.ts +9 -0
- package/cjs/hostComponents/OpenDataList/node.js +12 -0
- package/cjs/hostComponents/PageContainer/node.d.ts +4 -0
- package/cjs/hostComponents/PageContainer/node.js +5 -1
- package/cjs/hostComponents/ScrollView/node.d.ts +1 -0
- package/cjs/hostComponents/ScrollView/node.js +1 -0
- package/cjs/hostComponents/Span/index.d.ts +9 -0
- package/cjs/hostComponents/Span/index.js +5 -0
- package/cjs/hostComponents/Span/node.d.ts +7 -0
- package/cjs/hostComponents/Span/node.js +10 -0
- package/cjs/hostComponents/StickyHeader/index.d.ts +17 -0
- package/cjs/hostComponents/StickyHeader/index.js +10 -0
- package/cjs/hostComponents/StickyHeader/node.d.ts +11 -0
- package/cjs/hostComponents/StickyHeader/node.js +14 -0
- package/cjs/hostComponents/StickySection/index.d.ts +9 -0
- package/cjs/hostComponents/StickySection/index.js +5 -0
- package/cjs/hostComponents/StickySection/node.d.ts +7 -0
- package/cjs/hostComponents/StickySection/node.js +10 -0
- package/cjs/hostComponents/StoreCoupon/index.d.ts +20 -0
- package/cjs/hostComponents/StoreCoupon/index.js +8 -0
- package/cjs/hostComponents/StoreCoupon/node.d.ts +13 -0
- package/cjs/hostComponents/StoreCoupon/node.js +16 -0
- package/cjs/hostComponents/StoreGift/index.d.ts +18 -0
- package/cjs/hostComponents/StoreGift/index.js +11 -0
- package/cjs/hostComponents/StoreGift/node.d.ts +12 -0
- package/cjs/hostComponents/StoreGift/node.js +15 -0
- package/cjs/hostComponents/StoreHome/index.d.ts +10 -0
- package/cjs/hostComponents/StoreHome/index.js +8 -0
- package/cjs/hostComponents/StoreHome/node.d.ts +8 -0
- package/cjs/hostComponents/StoreHome/node.js +11 -0
- package/cjs/hostComponents/StoreProduct/index.d.ts +28 -0
- package/cjs/hostComponents/StoreProduct/index.js +13 -0
- package/cjs/hostComponents/StoreProduct/node.d.ts +17 -0
- package/cjs/hostComponents/StoreProduct/node.js +20 -0
- package/cjs/hostComponents/index.d.ts +18 -0
- package/cjs/hostComponents/index.js +18 -0
- package/cjs/hostComponents/node.js +21 -11
- package/cjs/index.d.ts +2 -3
- package/cjs/index.js +25 -6
- package/cjs/node/index.js +17 -7
- package/esm/hostComponents/ChannelLive/node.d.ts +9 -2
- package/esm/hostComponents/ChannelLive/node.js +8 -1
- package/esm/hostComponents/ChannelVideo/index.d.ts +2 -2
- package/esm/hostComponents/ChannelVideo/index.js +3 -2
- package/esm/hostComponents/ChannelVideo/node.d.ts +11 -0
- package/esm/hostComponents/ChannelVideo/node.js +11 -0
- package/esm/hostComponents/DraggableSheet/index.d.ts +24 -0
- package/esm/hostComponents/DraggableSheet/index.js +9 -0
- package/esm/hostComponents/DraggableSheet/node.d.ts +13 -0
- package/esm/hostComponents/DraggableSheet/node.js +13 -0
- package/esm/hostComponents/EditorPortal/index.d.ts +3 -3
- package/esm/hostComponents/EditorPortal/index.js +0 -3
- package/esm/hostComponents/FunctionalPageNavigator/node.d.ts +5 -0
- package/esm/hostComponents/FunctionalPageNavigator/node.js +5 -0
- package/esm/hostComponents/GridBuilder/index.d.ts +29 -0
- package/esm/hostComponents/GridBuilder/index.js +6 -0
- package/esm/hostComponents/GridBuilder/node.d.ts +17 -0
- package/esm/hostComponents/GridBuilder/node.js +17 -0
- package/esm/hostComponents/GridView/index.d.ts +21 -0
- package/esm/hostComponents/GridView/index.js +6 -0
- package/esm/hostComponents/GridView/node.d.ts +13 -0
- package/esm/hostComponents/GridView/node.js +13 -0
- package/esm/hostComponents/Input/node.d.ts +2 -1
- package/esm/hostComponents/Input/node.js +2 -1
- package/esm/hostComponents/KeyboardAccessory/index.js +1 -1
- package/esm/hostComponents/KeyboardAccessory/node.d.ts +8 -1
- package/esm/hostComponents/KeyboardAccessory/node.js +9 -2
- package/esm/hostComponents/ListBuilder/index.d.ts +25 -0
- package/esm/hostComponents/ListBuilder/index.js +7 -0
- package/esm/hostComponents/ListBuilder/node.d.ts +15 -0
- package/esm/hostComponents/ListBuilder/node.js +15 -0
- package/esm/hostComponents/ListView/index.d.ts +11 -0
- package/esm/hostComponents/ListView/index.js +5 -0
- package/esm/hostComponents/ListView/node.d.ts +8 -0
- package/esm/hostComponents/ListView/node.js +8 -0
- package/esm/hostComponents/MatchMedia/node.d.ts +4 -0
- package/esm/hostComponents/MatchMedia/node.js +4 -0
- package/esm/hostComponents/NavigationBar/node.d.ts +4 -0
- package/esm/hostComponents/NavigationBar/node.js +4 -0
- package/esm/hostComponents/NestedScrollBody/index.d.ts +11 -0
- package/esm/hostComponents/NestedScrollBody/index.js +5 -0
- package/esm/hostComponents/NestedScrollBody/node.d.ts +8 -0
- package/esm/hostComponents/NestedScrollBody/node.js +8 -0
- package/esm/hostComponents/NestedScrollHeader/index.d.ts +9 -0
- package/esm/hostComponents/NestedScrollHeader/index.js +2 -0
- package/esm/hostComponents/NestedScrollHeader/node.d.ts +7 -0
- package/esm/hostComponents/NestedScrollHeader/node.js +7 -0
- package/esm/hostComponents/OfficialAccount/node.d.ts +4 -0
- package/esm/hostComponents/OfficialAccount/node.js +4 -0
- package/esm/hostComponents/OfficialAccountPublish/index.d.ts +24 -0
- package/esm/hostComponents/OfficialAccountPublish/index.js +11 -0
- package/esm/hostComponents/OfficialAccountPublish/node.d.ts +15 -0
- package/esm/hostComponents/OfficialAccountPublish/node.js +15 -0
- package/esm/hostComponents/OpenContainer/index.d.ts +27 -0
- package/esm/hostComponents/OpenContainer/index.js +8 -0
- package/esm/hostComponents/OpenContainer/node.d.ts +16 -0
- package/esm/hostComponents/OpenContainer/node.js +16 -0
- package/esm/hostComponents/OpenData/node.d.ts +4 -0
- package/esm/hostComponents/OpenData/node.js +9 -1
- package/esm/hostComponents/OpenDataItem/index.d.ts +9 -0
- package/esm/hostComponents/OpenDataItem/index.js +2 -0
- package/esm/hostComponents/OpenDataItem/node.d.ts +7 -0
- package/esm/hostComponents/OpenDataItem/node.js +7 -0
- package/esm/hostComponents/OpenDataList/index.d.ts +13 -0
- package/esm/hostComponents/OpenDataList/index.js +2 -0
- package/esm/hostComponents/OpenDataList/node.d.ts +9 -0
- package/esm/hostComponents/OpenDataList/node.js +9 -0
- package/esm/hostComponents/PageContainer/node.d.ts +4 -0
- package/esm/hostComponents/PageContainer/node.js +5 -1
- package/esm/hostComponents/ScrollView/node.d.ts +1 -0
- package/esm/hostComponents/ScrollView/node.js +1 -0
- package/esm/hostComponents/Span/index.d.ts +9 -0
- package/esm/hostComponents/Span/index.js +2 -0
- package/esm/hostComponents/Span/node.d.ts +7 -0
- package/esm/hostComponents/Span/node.js +7 -0
- package/esm/hostComponents/StickyHeader/index.d.ts +17 -0
- package/esm/hostComponents/StickyHeader/index.js +7 -0
- package/esm/hostComponents/StickyHeader/node.d.ts +11 -0
- package/esm/hostComponents/StickyHeader/node.js +11 -0
- package/esm/hostComponents/StickySection/index.d.ts +9 -0
- package/esm/hostComponents/StickySection/index.js +2 -0
- package/esm/hostComponents/StickySection/node.d.ts +7 -0
- package/esm/hostComponents/StickySection/node.js +7 -0
- package/esm/hostComponents/StoreCoupon/index.d.ts +20 -0
- package/esm/hostComponents/StoreCoupon/index.js +5 -0
- package/esm/hostComponents/StoreCoupon/node.d.ts +13 -0
- package/esm/hostComponents/StoreCoupon/node.js +13 -0
- package/esm/hostComponents/StoreGift/index.d.ts +18 -0
- package/esm/hostComponents/StoreGift/index.js +8 -0
- package/esm/hostComponents/StoreGift/node.d.ts +12 -0
- package/esm/hostComponents/StoreGift/node.js +12 -0
- package/esm/hostComponents/StoreHome/index.d.ts +10 -0
- package/esm/hostComponents/StoreHome/index.js +5 -0
- package/esm/hostComponents/StoreHome/node.d.ts +8 -0
- package/esm/hostComponents/StoreHome/node.js +8 -0
- package/esm/hostComponents/StoreProduct/index.d.ts +28 -0
- package/esm/hostComponents/StoreProduct/index.js +10 -0
- package/esm/hostComponents/StoreProduct/node.d.ts +17 -0
- package/esm/hostComponents/StoreProduct/node.js +17 -0
- package/esm/hostComponents/index.d.ts +18 -0
- package/esm/hostComponents/index.js +18 -0
- package/esm/hostComponents/node.js +4 -4
- package/esm/index.d.ts +2 -3
- package/esm/index.js +2 -3
- package/package.json +38 -8
- package/templates/base.ejs +34 -18
- package/templates/children.ejs +5 -5
- package/templates/page.ejs +6 -0
- package/cjs/api/index.d.ts +0 -466
- package/cjs/api/index.js +0 -587
- package/esm/api/index.d.ts +0 -466
- package/esm/api/index.js +0 -575
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const alias = {
|
|
2
|
+
id: 'id',
|
|
3
|
+
className: 'class',
|
|
4
|
+
style: 'style',
|
|
5
|
+
animation: 'animation',
|
|
6
|
+
offsetTop: 'offset-top',
|
|
7
|
+
allowOverlapping: 'allow-overlapping',
|
|
8
|
+
padding: 'padding',
|
|
9
|
+
onStickOnTopChange: 'bind:stickontopchange',
|
|
10
|
+
};
|
|
11
|
+
export const props = Object.values(alias);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
|
+
/**
|
|
4
|
+
* Skyline 吸顶布局分区容器
|
|
5
|
+
* https://developers.weixin.qq.com/miniprogram/dev/component/sticky-section.html
|
|
6
|
+
*/
|
|
7
|
+
export interface StickySectionProps extends BaseProps {
|
|
8
|
+
}
|
|
9
|
+
export declare const StickySection: React.ComponentType<StickySectionProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps, GenericEvent } from '../../types/component';
|
|
3
|
+
export interface StoreCouponProps extends BaseProps {
|
|
4
|
+
/** 小店appid 3.8.3 */
|
|
5
|
+
appid?: string;
|
|
6
|
+
/** 优惠券id */
|
|
7
|
+
couponId?: string;
|
|
8
|
+
/** 自定义样式。支持的样式项参见 custom-style 说明 */
|
|
9
|
+
customStyle?: Record<string, string | number>;
|
|
10
|
+
/** 推客参数。用于机构推广券染色 3.8.11 */
|
|
11
|
+
promoterShareLink?: string;
|
|
12
|
+
/** 跳转小店成功的回调 */
|
|
13
|
+
onEnterSuccess?: (event: GenericEvent) => void;
|
|
14
|
+
/** 跳转小店失败的回调,event.detail={code,message} */
|
|
15
|
+
onEnterError?: (event: GenericEvent) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* https://developers.weixin.qq.com/miniprogram/dev/component/store-coupon.html
|
|
19
|
+
*/
|
|
20
|
+
export declare const StoreCoupon: React.ComponentType<StoreCouponProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const alias: {
|
|
2
|
+
id: string;
|
|
3
|
+
className: string;
|
|
4
|
+
style: string;
|
|
5
|
+
animation: string;
|
|
6
|
+
appid: string;
|
|
7
|
+
couponId: string;
|
|
8
|
+
customStyle: string;
|
|
9
|
+
promoterShareLink: string;
|
|
10
|
+
onEnterSuccess: string;
|
|
11
|
+
onEnterError: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const props: string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const alias = {
|
|
2
|
+
id: 'id',
|
|
3
|
+
className: 'class',
|
|
4
|
+
style: 'style',
|
|
5
|
+
animation: 'animation',
|
|
6
|
+
appid: 'appid',
|
|
7
|
+
couponId: 'coupon-id',
|
|
8
|
+
customStyle: 'custom-style',
|
|
9
|
+
promoterShareLink: 'promoter-share-link',
|
|
10
|
+
onEnterSuccess: 'bindentersuccess',
|
|
11
|
+
onEnterError: 'bindentererror',
|
|
12
|
+
};
|
|
13
|
+
export const props = Object.values(alias);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps, GenericEvent } from '../../types/component';
|
|
3
|
+
export interface StoreGiftProps extends BaseProps {
|
|
4
|
+
/** 礼物订单id 3.8.10 */
|
|
5
|
+
presentOrderId?: string;
|
|
6
|
+
/** 用户openid 3.8.10 */
|
|
7
|
+
openId?: string;
|
|
8
|
+
/** 是否展示礼物卡片,默认展示 3.8.10 */
|
|
9
|
+
showGiftCard?: boolean;
|
|
10
|
+
/** 打开礼物成功的回调,event.detail={code,message} */
|
|
11
|
+
onSuccess?: (event: GenericEvent) => void;
|
|
12
|
+
/** 打开礼物失败的回调,event.detail={code,message} */
|
|
13
|
+
onError?: (event: GenericEvent) => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* https://developers.weixin.qq.com/miniprogram/dev/component/store-gift.html
|
|
17
|
+
*/
|
|
18
|
+
export declare const StoreGift: React.ComponentType<StoreGiftProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const alias: {
|
|
2
|
+
id: string;
|
|
3
|
+
className: string;
|
|
4
|
+
style: string;
|
|
5
|
+
animation: string;
|
|
6
|
+
presentOrderId: string;
|
|
7
|
+
openId: string;
|
|
8
|
+
showGiftCard: string;
|
|
9
|
+
onSuccess: string;
|
|
10
|
+
onError: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const props: string[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const alias = {
|
|
2
|
+
id: 'id',
|
|
3
|
+
className: 'class',
|
|
4
|
+
style: 'style',
|
|
5
|
+
animation: 'animation',
|
|
6
|
+
presentOrderId: 'present-order-id',
|
|
7
|
+
openId: 'open-id',
|
|
8
|
+
showGiftCard: 'show-gift-card',
|
|
9
|
+
onSuccess: 'bindsuccess',
|
|
10
|
+
onError: 'binderror',
|
|
11
|
+
};
|
|
12
|
+
export const props = Object.values(alias);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
|
+
export interface StoreHomeProps extends BaseProps {
|
|
4
|
+
/** 小店appid 3.5.5 */
|
|
5
|
+
appid?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* https://developers.weixin.qq.com/miniprogram/dev/component/store-home.html
|
|
9
|
+
*/
|
|
10
|
+
export declare const StoreHome: React.ComponentType<StoreHomeProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps, GenericEvent } from '../../types/component';
|
|
3
|
+
export interface StoreProductProps extends BaseProps {
|
|
4
|
+
/** 小店appid 3.5.5 */
|
|
5
|
+
appid?: string;
|
|
6
|
+
/** 商品id 3.5.5 */
|
|
7
|
+
productId?: string;
|
|
8
|
+
/** 带货商品跟佣信息 3.5.5 */
|
|
9
|
+
productPromotionLink?: string;
|
|
10
|
+
/** 媒体文件id 3.7.1 */
|
|
11
|
+
mediaId?: string;
|
|
12
|
+
/** 自定义样式 3.7.1 */
|
|
13
|
+
customStyle?: Record<string, string | number>;
|
|
14
|
+
/** 开启自定义插槽 3.7.2 */
|
|
15
|
+
customContent?: boolean;
|
|
16
|
+
/** 设置点击打开的页面(同时开启 custom-content 后生效)3.7.4 */
|
|
17
|
+
openPage?: 'product-detail' | 'gift-product-detail' | 'buy';
|
|
18
|
+
/** 设置小店标识的位置(同时开启 custom-content 后生效)3.7.2 */
|
|
19
|
+
logoPosition?: 'bottom-left' | 'bottom-right';
|
|
20
|
+
/** 跳转小店成功的回调 3.7.1 */
|
|
21
|
+
onEnterSuccess?: (event: GenericEvent) => void;
|
|
22
|
+
/** 跳转小店失败的回调,event.detail={code,message} 3.7.1 */
|
|
23
|
+
onEnterError?: (event: GenericEvent) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* https://developers.weixin.qq.com/miniprogram/dev/component/store-product.html
|
|
27
|
+
*/
|
|
28
|
+
export declare const StoreProduct: React.ComponentType<StoreProductProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createHostComponent } from '@rsmax/runtime';
|
|
2
|
+
/**
|
|
3
|
+
* https://developers.weixin.qq.com/miniprogram/dev/component/store-product.html
|
|
4
|
+
*/
|
|
5
|
+
export const StoreProduct = createHostComponent('store-product');
|
|
6
|
+
StoreProduct.defaultProps = {
|
|
7
|
+
customContent: false,
|
|
8
|
+
openPage: 'product-detail',
|
|
9
|
+
logoPosition: 'bottom-left',
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const alias: {
|
|
2
|
+
id: string;
|
|
3
|
+
className: string;
|
|
4
|
+
style: string;
|
|
5
|
+
animation: string;
|
|
6
|
+
appid: string;
|
|
7
|
+
productId: string;
|
|
8
|
+
productPromotionLink: string;
|
|
9
|
+
mediaId: string;
|
|
10
|
+
customStyle: string;
|
|
11
|
+
customContent: string;
|
|
12
|
+
openPage: string;
|
|
13
|
+
logoPosition: string;
|
|
14
|
+
onEnterSuccess: string;
|
|
15
|
+
onEnterError: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const props: string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const alias = {
|
|
2
|
+
id: 'id',
|
|
3
|
+
className: 'class',
|
|
4
|
+
style: 'style',
|
|
5
|
+
animation: 'animation',
|
|
6
|
+
appid: 'appid',
|
|
7
|
+
productId: 'product-id',
|
|
8
|
+
productPromotionLink: 'product-promotion-link',
|
|
9
|
+
mediaId: 'media-id',
|
|
10
|
+
customStyle: 'custom-style',
|
|
11
|
+
customContent: 'custom-content',
|
|
12
|
+
openPage: 'open-page',
|
|
13
|
+
logoPosition: 'logo-position',
|
|
14
|
+
onEnterSuccess: 'bindentersuccess',
|
|
15
|
+
onEnterError: 'bindentererror',
|
|
16
|
+
};
|
|
17
|
+
export const props = Object.values(alias);
|
|
@@ -53,3 +53,21 @@ export * from './AdCustom';
|
|
|
53
53
|
export * from './PageMeta';
|
|
54
54
|
export * from './NavigationBar';
|
|
55
55
|
export * from './Selection';
|
|
56
|
+
export * from './OfficialAccountPublish';
|
|
57
|
+
export * from './StoreCoupon';
|
|
58
|
+
export * from './StoreGift';
|
|
59
|
+
export * from './StoreHome';
|
|
60
|
+
export * from './StoreProduct';
|
|
61
|
+
export * from './DraggableSheet';
|
|
62
|
+
export * from './GridBuilder';
|
|
63
|
+
export * from './ListView';
|
|
64
|
+
export * from './ListBuilder';
|
|
65
|
+
export * from './GridView';
|
|
66
|
+
export * from './OpenContainer';
|
|
67
|
+
export * from './NestedScrollBody';
|
|
68
|
+
export * from './OpenDataList';
|
|
69
|
+
export * from './OpenDataItem';
|
|
70
|
+
export * from './StickyHeader';
|
|
71
|
+
export * from './StickySection';
|
|
72
|
+
export * from './Span';
|
|
73
|
+
export * from './NestedScrollHeader';
|
|
@@ -53,3 +53,21 @@ export * from './AdCustom';
|
|
|
53
53
|
export * from './PageMeta';
|
|
54
54
|
export * from './NavigationBar';
|
|
55
55
|
export * from './Selection';
|
|
56
|
+
export * from './OfficialAccountPublish';
|
|
57
|
+
export * from './StoreCoupon';
|
|
58
|
+
export * from './StoreGift';
|
|
59
|
+
export * from './StoreHome';
|
|
60
|
+
export * from './StoreProduct';
|
|
61
|
+
export * from './DraggableSheet';
|
|
62
|
+
export * from './GridBuilder';
|
|
63
|
+
export * from './ListView';
|
|
64
|
+
export * from './ListBuilder';
|
|
65
|
+
export * from './GridView';
|
|
66
|
+
export * from './OpenContainer';
|
|
67
|
+
export * from './NestedScrollBody';
|
|
68
|
+
export * from './OpenDataList';
|
|
69
|
+
export * from './OpenDataItem';
|
|
70
|
+
export * from './StickyHeader';
|
|
71
|
+
export * from './StickySection';
|
|
72
|
+
export * from './Span';
|
|
73
|
+
export * from './NestedScrollHeader';
|
|
@@ -4,8 +4,8 @@ import * as audio from './Audio/node';
|
|
|
4
4
|
import * as button from './Button/node';
|
|
5
5
|
import * as camera from './Camera/node';
|
|
6
6
|
import * as canvas from './Canvas/node';
|
|
7
|
-
import * as channelLive from './ChannelLive';
|
|
8
|
-
import * as channelVideo from './ChannelVideo';
|
|
7
|
+
import * as channelLive from './ChannelLive/node';
|
|
8
|
+
import * as channelVideo from './ChannelVideo/node';
|
|
9
9
|
import * as checkbox from './Checkbox/node';
|
|
10
10
|
import * as checkboxGroup from './CheckboxGroup/node';
|
|
11
11
|
import * as coverImage from './CoverImage/node';
|
|
@@ -40,10 +40,10 @@ import * as radioGroup from './RadioGroup/node';
|
|
|
40
40
|
import * as richText from './RichText/node';
|
|
41
41
|
import * as rootPortal from './RootPortal/node';
|
|
42
42
|
import * as scrollView from './ScrollView/node';
|
|
43
|
-
import * as selection from './Selection';
|
|
43
|
+
import * as selection from './Selection/node';
|
|
44
44
|
import * as shareElement from './ShareElement/node';
|
|
45
45
|
import * as slider from './Slider/node';
|
|
46
|
-
import * as snapshot from './Snapshot';
|
|
46
|
+
import * as snapshot from './Snapshot/node';
|
|
47
47
|
import * as swiper from './Swiper/node';
|
|
48
48
|
import * as swiperItem from './SwiperItem/node';
|
|
49
49
|
import * as switchComponent from './Switch/node';
|
package/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export * from './hostComponents';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './types';
|
|
1
|
+
export * as component from './hostComponents';
|
|
2
|
+
export * as types from './types';
|
package/esm/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export * from './hostComponents';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './types';
|
|
1
|
+
export * as component from './hostComponents';
|
|
2
|
+
export * as types from './types';
|
package/package.json
CHANGED
|
@@ -1,28 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsmax/wechat",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-canary.91+5982cbe",
|
|
4
4
|
"description": "Rsmax for Wechat",
|
|
5
5
|
"repository": "git+https://github.com/remaxjs/remax.git",
|
|
6
6
|
"license": "MIT",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"exports": {
|
|
9
|
+
"./types": {
|
|
10
|
+
"types": "./esm/types/index.d.ts",
|
|
11
|
+
"import": "./esm/types/index.js",
|
|
12
|
+
"require": "./cjs/types/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./component": {
|
|
15
|
+
"types": "./esm/hostComponents/index.d.ts",
|
|
16
|
+
"import": "./esm/hostComponents/index.js",
|
|
17
|
+
"require": "./cjs/hostComponents/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./node": {
|
|
20
|
+
"types": "./esm/node/index.d.ts",
|
|
21
|
+
"import": "./esm/node/index.js",
|
|
22
|
+
"require": "./cjs/node/index.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
7
25
|
"main": "./cjs/index.js",
|
|
8
26
|
"module": "./esm/index.js",
|
|
27
|
+
"typesVersions": {
|
|
28
|
+
"*": {
|
|
29
|
+
"types": [
|
|
30
|
+
"esm/types/index.d.ts"
|
|
31
|
+
],
|
|
32
|
+
"component": [
|
|
33
|
+
"esm/hostComponents/index.d.ts"
|
|
34
|
+
],
|
|
35
|
+
"node": [
|
|
36
|
+
"esm/node/index.d.ts"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
9
40
|
"typings": "./esm/index.d.ts",
|
|
10
41
|
"scripts": {
|
|
11
42
|
"prebuild": "npm run clean",
|
|
12
43
|
"build": "tsc",
|
|
13
44
|
"build:cjs": "tsc --module CommonJS --outDir cjs",
|
|
14
45
|
"clean": "rimraf cjs esm tsconfig.tsbuildinfo",
|
|
15
|
-
"dev": "rslib build",
|
|
16
46
|
"test": "rstest run"
|
|
17
47
|
},
|
|
18
48
|
"dependencies": {
|
|
19
|
-
"@rsmax/framework-shared": "
|
|
20
|
-
"@rsmax/runtime": "
|
|
21
|
-
"@rsmax/shared": "
|
|
22
|
-
"miniprogram-api-typings": "^4.0
|
|
49
|
+
"@rsmax/framework-shared": "2.0.0-canary.91+5982cbe",
|
|
50
|
+
"@rsmax/runtime": "2.0.0-canary.91+5982cbe",
|
|
51
|
+
"@rsmax/shared": "2.0.0-canary.91+5982cbe",
|
|
52
|
+
"miniprogram-api-typings": "^4.1.0"
|
|
23
53
|
},
|
|
24
54
|
"devDependencies": {
|
|
25
|
-
"@rsmax/types": "
|
|
55
|
+
"@rsmax/types": "2.0.0-canary.91+5982cbe",
|
|
26
56
|
"@types/react": "^18.3.0",
|
|
27
57
|
"@types/react-test-renderer": "^18.3.0",
|
|
28
58
|
"react": "^18.3.0",
|
|
@@ -32,5 +62,5 @@
|
|
|
32
62
|
"access": "public"
|
|
33
63
|
},
|
|
34
64
|
"esnext": "./esm/index.js",
|
|
35
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "5982cbe3e1e3a3bf52fa41d0c31bfb043277f669"
|
|
36
66
|
}
|
package/templates/base.ejs
CHANGED
|
@@ -5,24 +5,40 @@
|
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<wxs module="_h">
|
|
8
|
-
var
|
|
8
|
+
var __cache = {};
|
|
9
|
+
|
|
9
10
|
module.exports = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
v: function (value) {
|
|
12
|
+
return value == null ? '' : value;
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
tid: function (type, ancestor) {
|
|
16
|
+
var chain = ancestor || '';
|
|
17
|
+
var key = type + '::' + chain;
|
|
18
|
+
|
|
19
|
+
var cached = __cache[key];
|
|
20
|
+
if (cached) {
|
|
21
|
+
return cached;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var count = 0;
|
|
25
|
+
if (chain) {
|
|
26
|
+
var items = chain.split(',');
|
|
27
|
+
for (var i = 0; i < items.length; i++) {
|
|
28
|
+
if (items[i] === type) {
|
|
29
|
+
count = count + 1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
var id = 'REMAX_TPL_' + (1 + count) + '_' + type;
|
|
35
|
+
__cache[key] = id;
|
|
36
|
+
return id;
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
container: function (tid) {
|
|
40
|
+
return 'REMAX_TPL_' + (tid + 1) + '_CONTAINER';
|
|
41
|
+
}
|
|
26
42
|
};
|
|
27
43
|
</wxs>
|
|
28
44
|
|
|
@@ -48,7 +64,7 @@ slotView: slotView
|
|
|
48
64
|
<block>{{i.text}}</block>
|
|
49
65
|
</template>
|
|
50
66
|
|
|
51
|
-
<% for (var i = 1; i <= depth['view']; i++) { -%>
|
|
67
|
+
<% for (var i = 1; i <= depth['view'] + 1; i++) { -%>
|
|
52
68
|
<template name="REMAX_TPL_<%=i%>_CONTAINER" data="{{i: i}}">
|
|
53
69
|
<template is="{{_h.tid(i.type, a)}}" data="{{i: i, a: a + ',' + i.type, tid: <%=i%>}}" />
|
|
54
70
|
</template>
|
package/templates/children.ejs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<block wx:for="{{i.children}}" wx:key="*this">
|
|
3
3
|
<swiper-item class="{{i.nodes[item].props.class}}" item-id="{{i.nodes[item].props.itemId}}" key="{{i.nodes[item].props.key}}">
|
|
4
4
|
<block wx:for="{{i.nodes[item].children}}" wx:key="*this" wx:for-item="sItem">
|
|
5
|
-
<template is="{{
|
|
5
|
+
<template is="{{_h.container(tid)}}" data="{{i: i.nodes[item].nodes[sItem], a: a, tid: tid + 1 }}" />
|
|
6
6
|
</block>
|
|
7
7
|
</swiper-item>
|
|
8
8
|
</block>
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
<block wx:if="{{i.nodes[item].props['slot']}}">
|
|
12
12
|
<view slot="{{i.nodes[item].props['slot']}}"
|
|
13
13
|
<%_ for(let i=0;i < slotView.props.length; i++) { %>
|
|
14
|
-
<%=slotView.props[i]%>="{{i.nodes[item].props['<%=slotView.props[i]%>']}}"
|
|
14
|
+
<%=slotView.props[i]%>="{{_h.v(i.nodes[item].props['<%=slotView.props[i]%>'])}}"
|
|
15
15
|
<%_ } -%>
|
|
16
16
|
>
|
|
17
17
|
<block wx:for="{{i.nodes[item].children}}" wx:key="*this" wx:for-item="sItem">
|
|
18
|
-
<template is="{{
|
|
18
|
+
<template is="{{_h.container(tid)}}" data="{{i: i.nodes[item].nodes[sItem], a: a, tid: tid + 1 }}" />
|
|
19
19
|
</block>
|
|
20
20
|
</view>
|
|
21
21
|
</block>
|
|
22
22
|
<block wx:else>
|
|
23
|
-
<template is="{{
|
|
23
|
+
<template is="{{_h.container(tid)}}" data="{{i: i.nodes[item], a: a, tid: tid + 1 }}" />
|
|
24
24
|
</block>
|
|
25
25
|
</block>
|
|
26
26
|
<% } else { -%>
|
|
27
27
|
<block wx:for="{{i.children}}" wx:key="*this">
|
|
28
|
-
<template is="{{
|
|
28
|
+
<template is="{{_h.container(tid)}}" data="{{i: i.nodes[item], a: a, tid: tid + 1 }}" />
|
|
29
29
|
</block>
|
|
30
30
|
<% } -%>
|
package/templates/page.ejs
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
<import src="<%= baseTemplate %>"/>
|
|
2
|
+
<%_ if (typeof skeleton !== 'undefined' && skeleton.importSrc) { -%>
|
|
3
|
+
<import src="<%= skeleton.importSrc %>" />
|
|
4
|
+
<%_ } -%>
|
|
5
|
+
<%_ if (typeof skeleton !== 'undefined' && skeleton.templateName) { -%>
|
|
6
|
+
<template is="<%= skeleton.templateName %>" wx:if="{{root.children.length === 0}}" />
|
|
7
|
+
<%_ } -%>
|
|
2
8
|
<template is="REMAX_TPL" data="{{root: root}}" />
|
|
3
9
|
<template is="REMAX_TPL" data="{{ root: modalRoot }}" />
|