pixuireactcomponents 1.2.35 → 1.2.38

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/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # 组件库
2
+
3
+ 本组件库目前分为2大类:ui组件和工具组件。分别参见目录ui/和目录tools。
4
+ 具体组件说明,参见对应类别目录下的md文档
5
+
6
+ ## 使用说明
7
+
8
+ https://gamelet.qq.com/docv2/public/d/Client-Development-Guide/PixUI-React-Components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixuireactcomponents",
3
- "version": "1.2.35",
3
+ "version": "1.2.38",
4
4
  "description": "pixui react components",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/tools/tools.md ADDED
@@ -0,0 +1,22 @@
1
+ # 工具类组件
2
+ ### 1. EventDispatcherJs.tsx
3
+ React里可供使用的事件派发器,类似Pandora Lua里的EventDispatcher。
4
+
5
+ 用法主要就3个接口:
6
+
7
+ * AddEventListener: 添加监听事件
8
+ * DispatchEvent: 分发监听事件
9
+ * RemoveEventListener: 移除监听事件
10
+
11
+ ### 2. Logger.tsx
12
+ React里可供使用的对象(数组)打印器。
13
+
14
+ 直接console.log一个对象时,在游戏引擎中,无法打印出这个对象里的东西。而实际开发时,前后端联调时,需要方便的确认各种对象里的细节。
15
+
16
+ 用法一共3个接口,打印粒度有差异。
17
+
18
+ * ObjectPrinter: 打印一个对象的内部细节,效果如下
19
+ ![](./img/logger.png)
20
+
21
+ * ObjectPrinter2:比上一个打印的信息更多
22
+ * HierarchyPrinter: 采样打印,对数组进行采样,能打印最多的信息
@@ -0,0 +1,107 @@
1
+ .maininterface{
2
+ width:1200px;
3
+ height:682px;
4
+ /* width:100%;
5
+ height:100%; */
6
+ margin: auto;
7
+ /* padding: 0px 36px 36px 36px; */
8
+ /* background-color: grey; */
9
+ flex-direction: column;
10
+ position: relative;
11
+ }
12
+
13
+ .closeButton{
14
+ width:36px;
15
+ height:36px;
16
+ /* float: left; */
17
+ position: absolute;
18
+ // background-position: center;
19
+ background-repeat: no-repeat;
20
+ background-size: contain;
21
+ right:0px;
22
+ top:0px;
23
+ }
24
+
25
+ @keyframes zoom{
26
+ from{
27
+ transform: scale(0)
28
+ }
29
+ 80%{
30
+ transform: scale(1.1);
31
+ }
32
+ to{
33
+ transform: scale(1);
34
+ }
35
+ }
36
+
37
+ @keyframes zoomReverse{
38
+ from{
39
+ transform: scale(0)
40
+ }
41
+ to{
42
+ transform: scale(0);
43
+ }
44
+ }
45
+
46
+ .groupBack{
47
+ animation-name:zoom;
48
+ animation-timing-function:ease-in-out;
49
+ animation-iteration-count:1;
50
+ animation-duration: 1s;
51
+ }
52
+
53
+ .groupbackTemp{
54
+ animation-name:zoomReverse;
55
+ animation-timing-function:'';
56
+ animation-iteration-count:'';
57
+ animation-duration:'';
58
+ }
59
+
60
+ .isShowToday{
61
+ width:36px;
62
+ height:31px;
63
+ background-size: contain;
64
+ position: absolute;
65
+ right:0px;
66
+ bottom:0px;
67
+ }
68
+
69
+ .slapImage{
70
+ box-sizing: content-box;
71
+ /* border-width: 5px;
72
+ border-color: black;
73
+ border-style: solid; */
74
+ position: absolute;
75
+ left:50%;
76
+ top:50%;
77
+ transform:translate(-50%,-50%);
78
+ }
79
+ .mask{
80
+ // background:url(images/coupon-logo.gif) no-repeat;
81
+ height:100px;background-color:#fff;
82
+ opacity:0.6;
83
+ }
84
+
85
+ @keyframes rotate_by_myself{
86
+ from {
87
+ transform: rotate(0deg);
88
+ }
89
+
90
+ 50% {
91
+ transform: rotate(180deg);
92
+ }
93
+
94
+ to {
95
+ transform: rotate(360deg);
96
+ }
97
+ }
98
+
99
+ .loading_anim{
100
+ animation-name: rotate_by_myself;
101
+ animation-duration: 1.5s;
102
+ animation-timing-function: linear;
103
+ animation-iteration-count: infinite;
104
+ background-position: center;
105
+ background-repeat: no-repeat;
106
+ background-size: 50%;
107
+ }
package/ui/ui.md ADDED
@@ -0,0 +1,2 @@
1
+ # UI组件
2
+ 组件源码,参见components目录;对应的示例Demo,参见sample目录