@ray-js/adapter 1.2.13 → 1.2.15

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,4 +1,5 @@
1
1
  export declare const alias: {
2
+ catchTouchMove: string;
2
3
  id: string;
3
4
  disableScroll: string;
4
5
  hoverClass: string;
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.props = exports.alias = void 0;
4
4
  const universal_1 = require("../universal");
5
- exports.alias = universal_1.universalAlias;
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { catchTouchMove: 'catchtouchmove' });
6
6
  exports.props = Object.values(exports.alias);
@@ -1,4 +1,5 @@
1
1
  export declare const alias: {
2
+ catchTouchMove: string;
2
3
  id: string;
3
4
  disableScroll: string;
4
5
  hoverClass: string;
@@ -1,3 +1,3 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = universalAlias;
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { catchTouchMove: 'catchtouchmove' });
3
3
  export const props = Object.values(alias);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/adapter",
3
- "version": "1.2.13",
3
+ "version": "1.2.15",
4
4
  "description": "Ray adapter for tuya",
5
5
  "keywords": [
6
6
  "ray"
@@ -21,7 +21,7 @@
21
21
  "watch": "concurrently 'yarn build:cjs --watch' 'yarn build:esm --watch'"
22
22
  },
23
23
  "devDependencies": {
24
- "@ray-js/types": "^1.2.13",
24
+ "@ray-js/types": "^1.2.15",
25
25
  "concurrently": "^6.2.1"
26
26
  },
27
27
  "maintainers": [
@@ -35,6 +35,6 @@
35
35
  "@ray-core/shared": "0.2.9",
36
36
  "@ray-core/types": "0.2.9"
37
37
  },
38
- "gitHead": "b593c3d6a6dce51d9a76a83a4921a0e59f42d1a6",
38
+ "gitHead": "a5768bf5616f2e7cdfd401c6f07572f23062ee85",
39
39
  "repository": {}
40
40
  }
@@ -1,47 +1,75 @@
1
1
  <template name="REMAX_TPL_<%=id%>">
2
- <<%=id%>
3
- <%_ for(let i=0;i < props.length; i++) { -%>
4
- <%=props[i]%>="{{i.props['<%=props[i]%>']}}"
5
- <%_ } -%>
6
- >
7
- <%_ if (id === 'swiper') { -%>
8
- <block ty:for="{{i.children}}" ty:key="*this">
9
- <swiper-item key="{{i.nodes[item].props.key}}">
10
- <block ty:for="{{i.nodes[item].children}}" ty:key="*this" ty:for-item="sItem">
11
- <template is="{{'REMAX_TPL_' + i.nodes[item].nodes[sItem].type}}" data="{{i: i.nodes[item].nodes[sItem]}}" />
12
- </block>
13
- </swiper-item>
2
+ <%_ if (id === 'view') { -%>
3
+ <block ty:if="{{i.props['catchtouchmove']}}">
4
+ <<%=id%>
5
+ <%# view 标签需要区分是否含 catchtouchmove 事件,区分渲染模板 避免冲突 -%>
6
+ <%props = props.filter(k => k !== 'bindtouchmove')-%>
7
+ <%_ for(let i=0;i < props.length; i++) { -%>
8
+ <%=props[i]%>="{{i.props['<%=props[i]%>']}}"
9
+ <%_ } -%>
10
+ >
11
+ <block ty:for="{{i.children}}" ty:key="*this">
12
+ <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
13
+ </block>
14
+ </<%=id%>>
14
15
  </block>
15
- <%_ } else if (id === 'picker-view') { -%>
16
- <block ty:for="{{i.children}}" ty:key="*this">
17
- <picker-view-column>
18
- <block ty:for="{{i.nodes[item].children}}" ty:for-item="sItem">
19
- <template is="{{'REMAX_TPL_' + i.nodes[item].nodes[sItem].type}}" data="{{i: i.nodes[item].nodes[sItem]}}" />
20
- </block>
21
- </picker-view-column>
16
+ <block ty:else>
17
+ <<%=id%>
18
+ <%props = props.filter(k => k !== 'catchtouchmove')-%>
19
+ <%_ for(let i=0;i < props.length; i++) { -%>
20
+ <%=props[i]%>="{{i.props['<%=props[i]%>']}}"
21
+ <%_ } -%>
22
+ >
23
+ <block ty:for="{{i.children}}" ty:key="*this">
24
+ <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
25
+ </block>
26
+ </<%=id%>>
22
27
  </block>
23
- <%_ } else if (type === 'native') { -%>
24
- <block ty:for="{{i.children}}" ty:key="*this">
25
- <block ty:if="{{i.nodes[item].props['slot']}}">
26
- <view
27
- slot="{{i.nodes[item].props['slot']}}"
28
- <%_ for(let i=0;i < slotView.props.length; i++) { -%>
29
- <%=slotView.props[i]%>="{{i.nodes[item].props['<%=slotView.props[i]%>']}}"
30
- <%_ } -%>
31
- >
28
+ <%_ } else { -%>
29
+ <<%=id%>
30
+ <%_ for(let i=0;i < props.length; i++) { -%>
31
+ <%=props[i]%>="{{i.props['<%=props[i]%>']}}"
32
+ <%_ } -%>
33
+ >
34
+ <%_ if (id === 'swiper') { -%>
35
+ <block ty:for="{{i.children}}" ty:key="*this">
36
+ <swiper-item key="{{i.nodes[item].props.key}}">
32
37
  <block ty:for="{{i.nodes[item].children}}" ty:key="*this" ty:for-item="sItem">
33
38
  <template is="{{'REMAX_TPL_' + i.nodes[item].nodes[sItem].type}}" data="{{i: i.nodes[item].nodes[sItem]}}" />
34
39
  </block>
35
- </view>
40
+ </swiper-item>
41
+ </block>
42
+ <%_ } else if (id === 'picker-view') { -%>
43
+ <block ty:for="{{i.children}}" ty:key="*this">
44
+ <picker-view-column>
45
+ <block ty:for="{{i.nodes[item].children}}" ty:for-item="sItem">
46
+ <template is="{{'REMAX_TPL_' + i.nodes[item].nodes[sItem].type}}" data="{{i: i.nodes[item].nodes[sItem]}}" />
47
+ </block>
48
+ </picker-view-column>
49
+ </block>
50
+ <%_ } else if (type === 'native') { -%>
51
+ <block ty:for="{{i.children}}" ty:key="*this">
52
+ <block ty:if="{{i.nodes[item].props['slot']}}">
53
+ <view
54
+ slot="{{i.nodes[item].props['slot']}}"
55
+ <%_ for(let i=0;i < slotView.props.length; i++) { -%>
56
+ <%=slotView.props[i]%>="{{i.nodes[item].props['<%=slotView.props[i]%>']}}"
57
+ <%_ } -%>
58
+ >
59
+ <block ty:for="{{i.nodes[item].children}}" ty:key="*this" ty:for-item="sItem">
60
+ <template is="{{'REMAX_TPL_' + i.nodes[item].nodes[sItem].type}}" data="{{i: i.nodes[item].nodes[sItem]}}" />
61
+ </block>
62
+ </view>
63
+ </block>
64
+ <block ty:else>
65
+ <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
66
+ </block>
36
67
  </block>
37
- <block ty:else>
68
+ <%_ } else { -%>
69
+ <block ty:for="{{i.children}}" ty:key="*this">
38
70
  <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
39
71
  </block>
40
- </block>
41
- <%_ } else { -%>
42
- <block ty:for="{{i.children}}" ty:key="*this">
43
- <template is="{{'REMAX_TPL_' + i.nodes[item].type}}" data="{{i: i.nodes[item]}}" />
44
- </block>
45
- <%_ } -%>
46
- </<%=id%>>
72
+ <%_ } -%>
73
+ </<%=id%>>
74
+ <% } %>
47
75
  </template>