@tarojs/components 3.6.0 → 3.6.1

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.
Files changed (149) hide show
  1. package/LICENSE +119 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/taro-components.cjs.js +1 -1
  4. package/dist/cjs/taro-input-core.cjs.entry.js +1 -1
  5. package/dist/cjs/taro-input-core.cjs.entry.js.map +1 -1
  6. package/dist/cjs/taro-navigator-core.cjs.entry.js.map +1 -1
  7. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +46 -50
  8. package/dist/cjs/taro-scroll-view-core.cjs.entry.js.map +1 -1
  9. package/dist/collection/components/input/input.js +6 -2
  10. package/dist/collection/components/input/input.js.map +1 -1
  11. package/dist/collection/components/navigator/navigator.js +0 -16
  12. package/dist/collection/components/navigator/navigator.js.map +1 -1
  13. package/dist/collection/components/scroll-view/scroll-view.js +93 -51
  14. package/dist/collection/components/scroll-view/scroll-view.js.map +1 -1
  15. package/dist/components/taro-input-core.js +1 -1
  16. package/dist/components/taro-input-core.js.map +1 -1
  17. package/dist/components/taro-navigator-core.js.map +1 -1
  18. package/dist/components/taro-scroll-view-core.js +49 -51
  19. package/dist/components/taro-scroll-view-core.js.map +1 -1
  20. package/dist/esm/loader.js +1 -1
  21. package/dist/esm/taro-components.js +1 -1
  22. package/dist/esm/taro-input-core.entry.js +1 -1
  23. package/dist/esm/taro-input-core.entry.js.map +1 -1
  24. package/dist/esm/taro-navigator-core.entry.js.map +1 -1
  25. package/dist/esm/taro-scroll-view-core.entry.js +46 -50
  26. package/dist/esm/taro-scroll-view-core.entry.js.map +1 -1
  27. package/dist/esm-es5/loader.js +1 -1
  28. package/dist/esm-es5/loader.js.map +1 -1
  29. package/dist/esm-es5/taro-components.js +1 -1
  30. package/dist/esm-es5/taro-components.js.map +1 -1
  31. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  32. package/dist/esm-es5/taro-input-core.entry.js.map +1 -1
  33. package/dist/esm-es5/taro-navigator-core.entry.js.map +1 -1
  34. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  35. package/dist/esm-es5/taro-scroll-view-core.entry.js.map +1 -1
  36. package/dist/taro-components/p-10046f1a.system.entry.js +2 -0
  37. package/dist/taro-components/p-10046f1a.system.entry.js.map +1 -0
  38. package/dist/taro-components/p-1c446c65.system.js +1 -1
  39. package/dist/taro-components/p-1c446c65.system.js.map +1 -1
  40. package/dist/taro-components/p-9bc9f3a0.entry.js +2 -0
  41. package/dist/taro-components/p-9bc9f3a0.entry.js.map +1 -0
  42. package/dist/taro-components/p-c6385fc2.system.entry.js +2 -0
  43. package/dist/taro-components/p-c6385fc2.system.entry.js.map +1 -0
  44. package/dist/taro-components/p-d621d190.entry.js.map +1 -1
  45. package/dist/taro-components/p-de356b29.system.entry.js.map +1 -1
  46. package/dist/taro-components/{p-5208792d.entry.js → p-fe58b450.entry.js} +2 -2
  47. package/dist/taro-components/p-fe58b450.entry.js.map +1 -0
  48. package/dist/taro-components/taro-components.esm.js +1 -1
  49. package/dist/taro-components/taro-components.esm.js.map +1 -1
  50. package/dist/types/components/input/input.d.ts +1 -1
  51. package/dist/types/components/navigator/navigator.d.ts +0 -16
  52. package/dist/types/components/scroll-view/scroll-view.d.ts +4 -1
  53. package/dist/types/components.d.ts +5 -2
  54. package/lib/react/component-lib/index.d.ts +55 -0
  55. package/lib/react/component-lib/index.js +68 -0
  56. package/lib/react/component-lib/index.js.map +1 -0
  57. package/lib/react/component-lib/input.d.ts +3 -0
  58. package/lib/react/component-lib/input.js +17 -0
  59. package/lib/react/component-lib/input.js.map +1 -0
  60. package/lib/react/component-lib/reactify-wc.d.ts +7 -0
  61. package/lib/react/component-lib/reactify-wc.js +176 -0
  62. package/lib/react/component-lib/reactify-wc.js.map +1 -0
  63. package/lib/react/react-component-lib/utils/attachProps.d.ts +1 -1
  64. package/lib/react/react-component-lib/utils/attachProps.js +1 -15
  65. package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
  66. package/lib/vue2/component-lib/components.d.ts +111 -0
  67. package/lib/vue2/component-lib/components.js +74 -0
  68. package/lib/vue2/component-lib/components.js.map +1 -0
  69. package/lib/vue2/component-lib/createComponent.d.ts +14 -0
  70. package/lib/vue2/component-lib/createComponent.js +23 -0
  71. package/lib/vue2/component-lib/createComponent.js.map +1 -0
  72. package/lib/vue2/component-lib/createFormsComponent.d.ts +22 -0
  73. package/lib/vue2/component-lib/createFormsComponent.js +53 -0
  74. package/lib/vue2/component-lib/createFormsComponent.js.map +1 -0
  75. package/lib/vue2/component-lib/icon.d.ts +16 -0
  76. package/lib/vue2/component-lib/icon.js +23 -0
  77. package/lib/vue2/component-lib/icon.js.map +1 -0
  78. package/lib/vue2/component-lib/image.d.ts +16 -0
  79. package/lib/vue2/component-lib/image.js +24 -0
  80. package/lib/vue2/component-lib/image.js.map +1 -0
  81. package/lib/vue2/component-lib/index.d.ts +1 -0
  82. package/lib/vue2/component-lib/index.js +30 -0
  83. package/lib/vue2/component-lib/index.js.map +1 -0
  84. package/lib/vue2/component-lib/mixins/listeners.d.ts +6 -0
  85. package/lib/vue2/component-lib/mixins/listeners.js +14 -0
  86. package/lib/vue2/component-lib/mixins/listeners.js.map +1 -0
  87. package/lib/vue2/component-lib/mixins/refs.d.ts +5 -0
  88. package/lib/vue2/component-lib/mixins/refs.js +53 -0
  89. package/lib/vue2/component-lib/mixins/refs.js.map +1 -0
  90. package/lib/vue2/component-lib/picker.d.ts +25 -0
  91. package/lib/vue2/component-lib/picker.js +41 -0
  92. package/lib/vue2/component-lib/picker.js.map +1 -0
  93. package/lib/vue2/component-lib/scroll-view.d.ts +17 -0
  94. package/lib/vue2/component-lib/scroll-view.js +35 -0
  95. package/lib/vue2/component-lib/scroll-view.js.map +1 -0
  96. package/lib/vue2/component-lib/text.d.ts +16 -0
  97. package/lib/vue2/component-lib/text.js +24 -0
  98. package/lib/vue2/component-lib/text.js.map +1 -0
  99. package/lib/vue2/components.d.ts +5 -2
  100. package/lib/vue2/components.js +29 -5
  101. package/lib/vue2/components.js.map +1 -1
  102. package/lib/vue2/index.js +2 -0
  103. package/lib/vue2/index.js.map +1 -1
  104. package/lib/vue2/node_modules/.pnpm/registry.npmjs.org_vue-fragment@1.6.0_vue@2.6.14/node_modules/vue-fragment/dist/vue-fragment.esm.js +4 -0
  105. package/lib/vue2/node_modules/.pnpm/registry.npmjs.org_vue-fragment@1.6.0_vue@2.6.14/node_modules/vue-fragment/dist/vue-fragment.esm.js.map +1 -0
  106. package/lib/vue2/vue-component-lib/utils.js +3 -1
  107. package/lib/vue2/vue-component-lib/utils.js.map +1 -1
  108. package/lib/vue3/component-lib/createComponent.d.ts +10 -0
  109. package/lib/vue3/component-lib/createComponent.js +21 -0
  110. package/lib/vue3/component-lib/createComponent.js.map +1 -0
  111. package/lib/vue3/component-lib/createFormsComponent.d.ts +11 -0
  112. package/lib/vue3/component-lib/createFormsComponent.js +38 -0
  113. package/lib/vue3/component-lib/createFormsComponent.js.map +1 -0
  114. package/lib/vue3/component-lib/forwardRef.d.ts +2 -0
  115. package/lib/vue3/component-lib/forwardRef.js +13 -0
  116. package/lib/vue3/component-lib/forwardRef.js.map +1 -0
  117. package/lib/vue3/component-lib/icon.d.ts +11 -0
  118. package/lib/vue3/component-lib/icon.js +20 -0
  119. package/lib/vue3/component-lib/icon.js.map +1 -0
  120. package/lib/vue3/component-lib/image.d.ts +11 -0
  121. package/lib/vue3/component-lib/image.js +21 -0
  122. package/lib/vue3/component-lib/image.js.map +1 -0
  123. package/lib/vue3/component-lib/index.d.ts +442 -0
  124. package/lib/vue3/component-lib/index.js +68 -0
  125. package/lib/vue3/component-lib/index.js.map +1 -0
  126. package/lib/vue3/component-lib/scroll-view.d.ts +11 -0
  127. package/lib/vue3/component-lib/scroll-view.js +27 -0
  128. package/lib/vue3/component-lib/scroll-view.js.map +1 -0
  129. package/lib/vue3/component-lib/text.d.ts +11 -0
  130. package/lib/vue3/component-lib/text.js +21 -0
  131. package/lib/vue3/component-lib/text.js.map +1 -0
  132. package/lib/vue3/components.d.ts +2 -2
  133. package/lib/vue3/components.js +9 -8
  134. package/lib/vue3/components.js.map +1 -1
  135. package/lib/vue3/vue-component-lib/utils.js +1 -1
  136. package/lib/vue3/vue-component-lib/utils.js.map +1 -1
  137. package/package.json +8 -8
  138. package/types/ChannelLive.d.ts +1 -1
  139. package/types/CommentList.d.ts +1 -0
  140. package/types/Form.d.ts +0 -6
  141. package/types/Navigator.d.ts +8 -8
  142. package/types/RootPortal.d.ts +0 -1
  143. package/dist/taro-components/p-5208792d.entry.js.map +0 -1
  144. package/dist/taro-components/p-5beca045.system.entry.js +0 -2
  145. package/dist/taro-components/p-5beca045.system.entry.js.map +0 -1
  146. package/dist/taro-components/p-6de64a4b.system.entry.js +0 -2
  147. package/dist/taro-components/p-6de64a4b.system.entry.js.map +0 -1
  148. package/dist/taro-components/p-71155a2c.entry.js +0 -2
  149. package/dist/taro-components/p-71155a2c.entry.js.map +0 -1
@@ -0,0 +1,111 @@
1
+ declare const components: (string | (string | {
2
+ type: string;
3
+ component: {
4
+ name: string;
5
+ mixins: ({
6
+ computed: {
7
+ listeners(): any;
8
+ };
9
+ } | {
10
+ mounted(): void;
11
+ beforeDestroy(): void;
12
+ })[];
13
+ props: {
14
+ scrollX: BooleanConstructor;
15
+ scrollY: BooleanConstructor;
16
+ };
17
+ render(createElement: any): any;
18
+ };
19
+ })[] | (string | {
20
+ classNames: string[];
21
+ })[] | (string | {
22
+ type: string;
23
+ component: {
24
+ name: string;
25
+ mixins: ({
26
+ computed: {
27
+ listeners(): any;
28
+ };
29
+ } | {
30
+ mounted(): void;
31
+ beforeDestroy(): void;
32
+ })[];
33
+ props: {
34
+ type: StringConstructor;
35
+ };
36
+ render(createElement: any): any;
37
+ };
38
+ })[] | (string | {
39
+ type: string;
40
+ component: {
41
+ name: string;
42
+ mixins: ({
43
+ computed: {
44
+ listeners(): any;
45
+ };
46
+ } | {
47
+ mounted(): void;
48
+ beforeDestroy(): void;
49
+ })[];
50
+ props: {
51
+ selectable: BooleanConstructor;
52
+ };
53
+ render(createElement: any): any;
54
+ };
55
+ })[] | (string | {
56
+ type: string;
57
+ event: string;
58
+ })[] | (string | {
59
+ type: string;
60
+ component: {
61
+ name: string;
62
+ mixins: ({
63
+ computed: {
64
+ listeners(): any;
65
+ };
66
+ } | {
67
+ mounted(): void;
68
+ beforeDestroy(): void;
69
+ })[];
70
+ model: {
71
+ event: string;
72
+ };
73
+ props: {
74
+ range: ArrayConstructor;
75
+ rangeKey: StringConstructor;
76
+ value: (ArrayConstructor | StringConstructor | NumberConstructor)[];
77
+ };
78
+ mounted(): void;
79
+ watch: {
80
+ value(newVal: any): void;
81
+ };
82
+ render(createElement: any): any;
83
+ };
84
+ })[] | (string | {
85
+ type: string;
86
+ event: string;
87
+ modelValue: string;
88
+ classNames: string[];
89
+ })[] | (string | {
90
+ type: string;
91
+ event: string;
92
+ modelValue: string;
93
+ })[] | (string | {
94
+ type: string;
95
+ component: {
96
+ name: string;
97
+ mixins: ({
98
+ computed: {
99
+ listeners(): any;
100
+ };
101
+ } | {
102
+ mounted(): void;
103
+ beforeDestroy(): void;
104
+ })[];
105
+ props: {
106
+ mode: StringConstructor;
107
+ };
108
+ render(createElement: any): any;
109
+ };
110
+ })[])[];
111
+ export { components as default };
@@ -0,0 +1,74 @@
1
+ import Icon from './icon.js';
2
+ import Image from './image.js';
3
+ import Picker from './picker.js';
4
+ import ScrollView from './scroll-view.js';
5
+ import Text from './text.js';
6
+
7
+ const components = [
8
+ // 视图容器
9
+ 'taro-cover-image',
10
+ 'taro-cover-view',
11
+ 'taro-match-media',
12
+ 'taro-movable-area',
13
+ 'taro-movable-view',
14
+ 'taro-page-container',
15
+ 'taro-root-portal',
16
+ ['taro-scroll-view', { type: 'component', component: ScrollView }],
17
+ 'taro-share-element',
18
+ 'taro-swiper',
19
+ ['taro-swiper-item', { classNames: ['swiper-slide'] }],
20
+ 'taro-view',
21
+ // 基础内容
22
+ ['taro-icon', { type: 'component', component: Icon }],
23
+ ['taro-progress', { classNames: ['weui-progress'] }],
24
+ 'taro-rich-text',
25
+ ['taro-text', { type: 'component', component: Text }],
26
+ // 表单组件
27
+ 'taro-button',
28
+ ['taro-checkbox', { classNames: ['weui-cells_checkbox'] }],
29
+ 'taro-checkbox-group',
30
+ 'taro-editor',
31
+ 'taro-form',
32
+ ['taro-input', { type: 'forms', event: 'input' }],
33
+ 'taro-keyboard-accessory',
34
+ 'taro-label',
35
+ ['taro-picker', { type: 'component', component: Picker }],
36
+ 'taro-picker-view',
37
+ 'taro-picker-view-column',
38
+ ['taro-radio', { classNames: ['weui-cells_checkbox'] }],
39
+ ['taro-radio-group', { classNames: ['weui-cells_radiogroup'] }],
40
+ ['taro-slider', { type: 'forms', event: 'change', modelValue: 'value', classNames: ['weui-slider-box'] }],
41
+ ['taro-switch', { type: 'forms', event: 'change', modelValue: 'checked' }],
42
+ ['taro-textarea', { type: 'forms', event: 'input' }],
43
+ // 导航
44
+ 'taro-functional-page-navigator',
45
+ 'taro-navigator',
46
+ // 媒体组件
47
+ 'taro-audio',
48
+ 'taro-camera',
49
+ ['taro-image', { type: 'component', component: Image }],
50
+ 'taro-live-player',
51
+ ['taro-video', { classNames: ['taro-video-container'] }],
52
+ 'taro-voip-room',
53
+ // 地图
54
+ 'taro-map',
55
+ // 画布
56
+ 'taro-canvas',
57
+ // 开放能力
58
+ 'taro-web-view',
59
+ 'taro-ad',
60
+ 'taro-ad-custom',
61
+ 'taro-official-account',
62
+ 'taro-open-data',
63
+ // 导航栏
64
+ 'taro-navigation-bar',
65
+ // 页面属性配置节点
66
+ 'taro-page-meta',
67
+ // 其他
68
+ 'taro-block',
69
+ 'taro-custom-wrapper',
70
+ 'taro-slot'
71
+ ];
72
+
73
+ export { components as default };
74
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.js","sources":["../../../../taro-components-library-vue2/src/component-lib/components.ts"],"sourcesContent":["import Icon from './icon'\nimport Image from './image'\nimport Picker from './picker'\nimport ScrollView from './scroll-view'\nimport Text from './text'\n\nconst components = [\n // 视图容器\n 'taro-cover-image',\n 'taro-cover-view',\n 'taro-match-media',\n 'taro-movable-area',\n 'taro-movable-view',\n 'taro-page-container',\n 'taro-root-portal',\n ['taro-scroll-view', { type: 'component', component: ScrollView }],\n 'taro-share-element',\n 'taro-swiper',\n ['taro-swiper-item', { classNames: ['swiper-slide'] }],\n 'taro-view',\n\n // 基础内容\n ['taro-icon', { type: 'component', component: Icon }],\n ['taro-progress', { classNames: ['weui-progress'] }],\n 'taro-rich-text',\n ['taro-text', { type: 'component', component: Text }],\n\n // 表单组件\n 'taro-button',\n ['taro-checkbox', { classNames: ['weui-cells_checkbox'] }],\n 'taro-checkbox-group',\n 'taro-editor',\n 'taro-form',\n ['taro-input', { type: 'forms', event: 'input' }],\n 'taro-keyboard-accessory',\n 'taro-label',\n ['taro-picker', { type: 'component', component: Picker }],\n 'taro-picker-view',\n 'taro-picker-view-column',\n ['taro-radio', { classNames: ['weui-cells_checkbox'] }],\n ['taro-radio-group', { classNames: ['weui-cells_radiogroup'] }],\n ['taro-slider', { type: 'forms', event: 'change', modelValue: 'value', classNames: ['weui-slider-box'] }],\n ['taro-switch', { type: 'forms', event: 'change', modelValue: 'checked' }],\n ['taro-textarea', { type: 'forms', event: 'input' }],\n\n // 导航\n 'taro-functional-page-navigator',\n 'taro-navigator',\n\n // 媒体组件\n 'taro-audio',\n 'taro-camera',\n ['taro-image', { type: 'component', component: Image }],\n 'taro-live-player',\n ['taro-video', { classNames: ['taro-video-container'] }],\n 'taro-voip-room',\n\n // 地图\n 'taro-map',\n\n // 画布\n 'taro-canvas',\n\n // 开放能力\n 'taro-web-view',\n 'taro-ad',\n 'taro-ad-custom',\n 'taro-official-account',\n 'taro-open-data',\n\n // 导航栏\n 'taro-navigation-bar',\n\n // 页面属性配置节点\n 'taro-page-meta',\n\n // 其他\n 'taro-block',\n 'taro-custom-wrapper',\n 'taro-slot'\n]\n\nexport default components\n"],"names":[],"mappings":";;;;;;AAMA,MAAM,UAAU,GAAG;;IAEjB,kBAAkB;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,mBAAmB;IACnB,qBAAqB;IACrB,kBAAkB;IAClB,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;IAClE,oBAAoB;IACpB,aAAa;IACb,CAAC,kBAAkB,EAAE,EAAE,UAAU,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC;IACtD,WAAW;;IAGX,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IACrD,CAAC,eAAe,EAAE,EAAE,UAAU,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;IACpD,gBAAgB;IAChB,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;IAGrD,aAAa;IACb,CAAC,eAAe,EAAE,EAAE,UAAU,EAAE,CAAC,qBAAqB,CAAC,EAAE,CAAC;IAC1D,qBAAqB;IACrB,aAAa;IACb,WAAW;IACX,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACjD,yBAAyB;IACzB,YAAY;IACZ,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACzD,kBAAkB;IAClB,yBAAyB;IACzB,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,CAAC,qBAAqB,CAAC,EAAE,CAAC;IACvD,CAAC,kBAAkB,EAAE,EAAE,UAAU,EAAE,CAAC,uBAAuB,CAAC,EAAE,CAAC;IAC/D,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC;AACzG,IAAA,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;IAC1E,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;;IAGpD,gCAAgC;IAChC,gBAAgB;;IAGhB,YAAY;IACZ,aAAa;IACb,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IACvD,kBAAkB;IAClB,CAAC,YAAY,EAAE,EAAE,UAAU,EAAE,CAAC,sBAAsB,CAAC,EAAE,CAAC;IACxD,gBAAgB;;IAGhB,UAAU;;IAGV,aAAa;;IAGb,eAAe;IACf,SAAS;IACT,gBAAgB;IAChB,uBAAuB;IACvB,gBAAgB;;IAGhB,qBAAqB;;IAGrB,gBAAgB;;IAGhB,YAAY;IACZ,qBAAqB;IACrB,WAAW;;;;;"}
@@ -0,0 +1,14 @@
1
+ declare function createComponent(name: any, classNames?: any[]): {
2
+ name: any;
3
+ mixins: ({
4
+ computed: {
5
+ listeners(): any;
6
+ };
7
+ } | {
8
+ mounted(): void;
9
+ beforeDestroy(): void;
10
+ })[];
11
+ props: string[];
12
+ render(createElement: any): any;
13
+ };
14
+ export { createComponent as default };
@@ -0,0 +1,23 @@
1
+ import { listeners } from './mixins/listeners.js';
2
+ import { refs } from './mixins/refs.js';
3
+
4
+ function createComponent(name, classNames = []) {
5
+ return {
6
+ name,
7
+ mixins: [listeners, refs],
8
+ props: ['nativeProps'],
9
+ render(createElement) {
10
+ return createElement(`${name}-core`, {
11
+ class: ['hydrated', ...classNames],
12
+ domProps: {
13
+ nativeProps: this.nativeProps
14
+ },
15
+ attrs: this.$attrs,
16
+ on: this.listeners
17
+ }, this.$slots.default);
18
+ }
19
+ };
20
+ }
21
+
22
+ export { createComponent as default };
23
+ //# sourceMappingURL=createComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createComponent.js","sources":["../../../../taro-components-library-vue2/src/component-lib/createComponent.ts"],"sourcesContent":["import { listeners } from './mixins/listeners'\nimport { refs } from './mixins/refs'\n\nexport default function createComponent (name, classNames = []) {\n return {\n name,\n mixins: [listeners, refs],\n props: ['nativeProps'],\n render (createElement) {\n return createElement(`${name}-core`, {\n class: ['hydrated', ...classNames],\n domProps: {\n nativeProps: this.nativeProps\n },\n attrs: this.$attrs,\n on: this.listeners\n }, this.$slots.default)\n }\n }\n}\n"],"names":[],"mappings":";;;AAGwB,SAAA,eAAe,CAAE,IAAI,EAAE,UAAU,GAAG,EAAE,EAAA;IAC5D,OAAO;QACL,IAAI;AACJ,QAAA,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;QACzB,KAAK,EAAE,CAAC,aAAa,CAAC;AACtB,QAAA,MAAM,CAAE,aAAa,EAAA;AACnB,YAAA,OAAO,aAAa,CAAC,CAAG,EAAA,IAAI,OAAO,EAAE;AACnC,gBAAA,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC;AAClC,gBAAA,QAAQ,EAAE;oBACR,WAAW,EAAE,IAAI,CAAC,WAAW;AAC9B,iBAAA;gBACD,KAAK,EAAE,IAAI,CAAC,MAAM;gBAClB,EAAE,EAAE,IAAI,CAAC,SAAS;AACnB,aAAA,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;SACxB;KACF,CAAA;AACH;;;;"}
@@ -0,0 +1,22 @@
1
+ declare function createFormsComponent(name: any, event: any, modelValue?: string, classNames?: any[]): {
2
+ name: any;
3
+ mixins: ({
4
+ computed: {
5
+ listeners(): any;
6
+ };
7
+ } | {
8
+ mounted(): void;
9
+ beforeDestroy(): void;
10
+ })[];
11
+ model: {
12
+ prop: string;
13
+ event: string;
14
+ };
15
+ props: Record<string, any>;
16
+ methods: {
17
+ input(e: any): void;
18
+ change(e: any): void;
19
+ };
20
+ render(createElement: any): any;
21
+ };
22
+ export { createFormsComponent as default };
@@ -0,0 +1,53 @@
1
+ import { listeners } from './mixins/listeners.js';
2
+ import { refs } from './mixins/refs.js';
3
+
4
+ function createFormsComponent(name, event, modelValue = 'value', classNames = []) {
5
+ const props = {
6
+ nativeProps: {
7
+ type: Object
8
+ }
9
+ };
10
+ if (name === 'taro-input') {
11
+ props.focus = Boolean;
12
+ }
13
+ return {
14
+ name,
15
+ mixins: [listeners, refs],
16
+ model: {
17
+ prop: modelValue,
18
+ event: 'model'
19
+ },
20
+ props,
21
+ methods: {
22
+ input(e) {
23
+ this.$emit('input', e);
24
+ this.$emit('model', e.target.value);
25
+ },
26
+ change(e) {
27
+ this.$emit('change', e);
28
+ this.$emit('model', e.target.value);
29
+ }
30
+ },
31
+ render(createElement) {
32
+ // eslint-disable-next-line
33
+ const self = this;
34
+ const attrs = this.$attrs || {};
35
+ if (name === 'taro-input') {
36
+ attrs['auto-focus'] = self.focus;
37
+ }
38
+ const on = Object.assign({}, self.listeners);
39
+ on[event] = self[event];
40
+ return createElement(`${name}-core`, {
41
+ class: ['hydrated', ...classNames],
42
+ domProps: {
43
+ nativeProps: this.nativeProps
44
+ },
45
+ attrs,
46
+ on
47
+ }, self.$slots.default);
48
+ }
49
+ };
50
+ }
51
+
52
+ export { createFormsComponent as default };
53
+ //# sourceMappingURL=createFormsComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFormsComponent.js","sources":["../../../../taro-components-library-vue2/src/component-lib/createFormsComponent.ts"],"sourcesContent":["import { listeners } from './mixins/listeners'\nimport { refs } from './mixins/refs'\n\nexport default function createFormsComponent (name, event, modelValue = 'value', classNames = []) {\n const props: Record<string, any> = {\n nativeProps: {\n type: Object\n }\n }\n if (name === 'taro-input') {\n props.focus = Boolean\n }\n\n return {\n name,\n mixins: [listeners, refs],\n model: {\n prop: modelValue,\n event: 'model'\n },\n props,\n methods: {\n input (e) {\n this.$emit('input', e)\n this.$emit('model', e.target.value)\n },\n change (e) {\n this.$emit('change', e)\n this.$emit('model', e.target.value)\n }\n },\n render (createElement) {\n // eslint-disable-next-line\n const self = this;\n\n const attrs = this.$attrs || {}\n if (name === 'taro-input') {\n attrs['auto-focus'] = self.focus\n }\n\n const on = { ...self.listeners }\n on[event] = self[event]\n\n return createElement(`${name}-core`, {\n class: ['hydrated', ...classNames],\n domProps: {\n nativeProps: this.nativeProps\n },\n attrs,\n on\n }, self.$slots.default)\n }\n }\n}\n"],"names":[],"mappings":";;;AAGwB,SAAA,oBAAoB,CAAE,IAAI,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,EAAE,UAAU,GAAG,EAAE,EAAA;AAC9F,IAAA,MAAM,KAAK,GAAwB;AACjC,QAAA,WAAW,EAAE;AACX,YAAA,IAAI,EAAE,MAAM;AACb,SAAA;KACF,CAAA;IACD,IAAI,IAAI,KAAK,YAAY,EAAE;AACzB,QAAA,KAAK,CAAC,KAAK,GAAG,OAAO,CAAA;AACtB,KAAA;IAED,OAAO;QACL,IAAI;AACJ,QAAA,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;AACzB,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,UAAU;AAChB,YAAA,KAAK,EAAE,OAAO;AACf,SAAA;QACD,KAAK;AACL,QAAA,OAAO,EAAE;AACP,YAAA,KAAK,CAAE,CAAC,EAAA;AACN,gBAAA,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;gBACtB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;aACpC;AACD,YAAA,MAAM,CAAE,CAAC,EAAA;AACP,gBAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;gBACvB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;aACpC;AACF,SAAA;AACD,QAAA,MAAM,CAAE,aAAa,EAAA;;YAEnB,MAAM,IAAI,GAAG,IAAI,CAAC;AAElB,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,CAAA;YAC/B,IAAI,IAAI,KAAK,YAAY,EAAE;AACzB,gBAAA,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,KAAK,CAAA;AACjC,aAAA;AAED,YAAA,MAAM,EAAE,GAAQ,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,IAAI,CAAC,SAAS,CAAE,CAAA;YAChC,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;AAEvB,YAAA,OAAO,aAAa,CAAC,CAAG,EAAA,IAAI,OAAO,EAAE;AACnC,gBAAA,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,UAAU,CAAC;AAClC,gBAAA,QAAQ,EAAE;oBACR,WAAW,EAAE,IAAI,CAAC,WAAW;AAC9B,iBAAA;gBACD,KAAK;gBACL,EAAE;AACH,aAAA,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;SACxB;KACF,CAAA;AACH;;;;"}
@@ -0,0 +1,16 @@
1
+ declare const _default: {
2
+ name: string;
3
+ mixins: ({
4
+ computed: {
5
+ listeners(): any;
6
+ };
7
+ } | {
8
+ mounted(): void;
9
+ beforeDestroy(): void;
10
+ })[];
11
+ props: {
12
+ type: StringConstructor;
13
+ };
14
+ render(createElement: any): any;
15
+ };
16
+ export { _default as default };
@@ -0,0 +1,23 @@
1
+ import { listeners } from './mixins/listeners.js';
2
+ import { refs } from './mixins/refs.js';
3
+
4
+ var Icon = {
5
+ name: 'taro-icon',
6
+ mixins: [listeners, refs],
7
+ props: {
8
+ type: String
9
+ },
10
+ render(createElement) {
11
+ const iconType = this.type.replace(/_/g, '-');
12
+ return createElement('taro-icon-core', {
13
+ class: ['hydrated', `weui-icon-${iconType}`],
14
+ attrs: {
15
+ type: this.type
16
+ },
17
+ on: this.listeners
18
+ }, this.$slots.default);
19
+ }
20
+ };
21
+
22
+ export { Icon as default };
23
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sources":["../../../../taro-components-library-vue2/src/component-lib/icon.ts"],"sourcesContent":["import { listeners } from './mixins/listeners'\nimport { refs } from './mixins/refs'\n\nexport default {\n name: 'taro-icon',\n mixins: [listeners, refs],\n props: {\n type: String\n },\n render (createElement) {\n const iconType = this.type.replace(/_/g, '-')\n return createElement('taro-icon-core', {\n class: ['hydrated', `weui-icon-${iconType}`],\n attrs: {\n type: this.type\n },\n on: this.listeners\n }, this.$slots.default)\n }\n}\n"],"names":[],"mappings":";;;AAGA,WAAe;AACb,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;AACzB,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,MAAM;AACb,KAAA;AACD,IAAA,MAAM,CAAE,aAAa,EAAA;AACnB,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAC7C,OAAO,aAAa,CAAC,gBAAgB,EAAE;AACrC,YAAA,KAAK,EAAE,CAAC,UAAU,EAAE,CAAa,UAAA,EAAA,QAAQ,EAAE,CAAC;AAC5C,YAAA,KAAK,EAAE;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;AAChB,aAAA;YACD,EAAE,EAAE,IAAI,CAAC,SAAS;AACnB,SAAA,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;KACxB;CACF;;;;"}
@@ -0,0 +1,16 @@
1
+ declare const _default: {
2
+ name: string;
3
+ mixins: ({
4
+ computed: {
5
+ listeners(): any;
6
+ };
7
+ } | {
8
+ mounted(): void;
9
+ beforeDestroy(): void;
10
+ })[];
11
+ props: {
12
+ mode: StringConstructor;
13
+ };
14
+ render(createElement: any): any;
15
+ };
16
+ export { _default as default };
@@ -0,0 +1,24 @@
1
+ import { listeners } from './mixins/listeners.js';
2
+ import { refs } from './mixins/refs.js';
3
+
4
+ var Image = {
5
+ name: 'taro-image',
6
+ mixins: [listeners, refs],
7
+ props: {
8
+ mode: String
9
+ },
10
+ render(createElement) {
11
+ return createElement('taro-image-core', {
12
+ class: ['hydrated', {
13
+ 'taro-img__widthfix': this.mode === 'widthFix'
14
+ }],
15
+ attrs: {
16
+ mode: this.mode
17
+ },
18
+ on: this.listeners
19
+ }, this.$slots.default);
20
+ }
21
+ };
22
+
23
+ export { Image as default };
24
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","sources":["../../../../taro-components-library-vue2/src/component-lib/image.ts"],"sourcesContent":["import { listeners } from './mixins/listeners'\nimport { refs } from './mixins/refs'\n\nexport default {\n name: 'taro-image',\n mixins: [listeners, refs],\n props: {\n mode: String\n },\n render (createElement) {\n return createElement('taro-image-core', {\n class: ['hydrated', {\n 'taro-img__widthfix': this.mode === 'widthFix'\n }],\n attrs: {\n mode: this.mode\n },\n on: this.listeners\n }, this.$slots.default)\n }\n}\n"],"names":[],"mappings":";;;AAGA,YAAe;AACb,IAAA,IAAI,EAAE,YAAY;AAClB,IAAA,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;AACzB,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,MAAM;AACb,KAAA;AACD,IAAA,MAAM,CAAE,aAAa,EAAA;QACnB,OAAO,aAAa,CAAC,iBAAiB,EAAE;YACtC,KAAK,EAAE,CAAC,UAAU,EAAE;AAClB,oBAAA,oBAAoB,EAAE,IAAI,CAAC,IAAI,KAAK,UAAU;iBAC/C,CAAC;AACF,YAAA,KAAK,EAAE;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;AAChB,aAAA;YACD,EAAE,EAAE,IAAI,CAAC,SAAS;AACnB,SAAA,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;KACxB;CACF;;;;"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ import Vue from 'vue';
2
+ import components from './components.js';
3
+ import createComponent from './createComponent.js';
4
+ import createFormsComponent from './createFormsComponent.js';
5
+
6
+ components.forEach(params => {
7
+ if (typeof params === 'string') {
8
+ Vue.component(params, createComponent(params));
9
+ }
10
+ else if (params instanceof Array) {
11
+ const [name, props] = params;
12
+ const { classNames, type = 'simple' } = props;
13
+ if (type === 'simple') {
14
+ Vue.component(name, createComponent(name, classNames));
15
+ }
16
+ else if (type === 'forms') {
17
+ const { event, modelValue } = props;
18
+ Vue.component(name, createFormsComponent(name, event, modelValue, classNames));
19
+ }
20
+ else if (type === 'component') {
21
+ Vue.component(name, props.component);
22
+ }
23
+ }
24
+ });
25
+ Vue.config.ignoredElements = [
26
+ 'root',
27
+ 'block',
28
+ /^taro-/
29
+ ];
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../taro-components-library-vue2/src/component-lib/index.ts"],"sourcesContent":["import Vue from 'vue'\n\nimport components from './components'\nimport createComponent from './createComponent'\nimport createFormsComponent from './createFormsComponent'\n\ncomponents.forEach(params => {\n if (typeof params === 'string') {\n Vue.component(params, createComponent(params))\n } else if (params instanceof Array) {\n const [name, props] = params as [string, Record<string, any>]\n const { classNames, type = 'simple' } = props\n\n if (type === 'simple') {\n Vue.component(name, createComponent(name, classNames))\n } else if (type === 'forms') {\n const { event, modelValue } = props\n Vue.component(name, createFormsComponent(name, event, modelValue, classNames))\n } else if (type === 'component') {\n Vue.component(name, props.component)\n }\n }\n})\n\nVue.config.ignoredElements = [\n 'root',\n 'block',\n /^taro-/\n]\n"],"names":[],"mappings":";;;;;AAMA,UAAU,CAAC,OAAO,CAAC,MAAM,IAAG;AAC1B,IAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAA;AAC/C,KAAA;SAAM,IAAI,MAAM,YAAY,KAAK,EAAE;AAClC,QAAA,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAuC,CAAA;QAC7D,MAAM,EAAE,UAAU,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAA;QAE7C,IAAI,IAAI,KAAK,QAAQ,EAAE;AACrB,YAAA,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAA;AACvD,SAAA;aAAM,IAAI,IAAI,KAAK,OAAO,EAAE;AAC3B,YAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;AACnC,YAAA,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAA;AAC/E,SAAA;aAAM,IAAI,IAAI,KAAK,WAAW,EAAE;YAC/B,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;AACrC,SAAA;AACF,KAAA;AACH,CAAC,CAAC,CAAA;AAEF,GAAG,CAAC,MAAM,CAAC,eAAe,GAAG;IAC3B,MAAM;IACN,OAAO;IACP,QAAQ;CACT"}
@@ -0,0 +1,6 @@
1
+ declare const listeners: {
2
+ computed: {
3
+ listeners(): any;
4
+ };
5
+ };
6
+ export { listeners };
@@ -0,0 +1,14 @@
1
+ const listeners = {
2
+ computed: {
3
+ listeners() {
4
+ // eslint-disable-next-line
5
+ const vm = this;
6
+ return Object.assign(Object.assign({}, vm.$listeners), { click(e) {
7
+ vm.$emit('tap', e);
8
+ } });
9
+ }
10
+ }
11
+ };
12
+
13
+ export { listeners };
14
+ //# sourceMappingURL=listeners.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listeners.js","sources":["../../../../../taro-components-library-vue2/src/component-lib/mixins/listeners.ts"],"sourcesContent":["export const listeners = {\n computed: {\n listeners () {\n // eslint-disable-next-line\n const vm = this\n return {\n ...vm.$listeners,\n click (e) {\n vm.$emit('tap', e)\n }\n }\n }\n }\n}\n"],"names":[],"mappings":"AAAa,MAAA,SAAS,GAAG;AACvB,IAAA,QAAQ,EAAE;QACR,SAAS,GAAA;;YAEP,MAAM,EAAE,GAAG,IAAI,CAAA;AACf,YAAA,OAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EACK,EAAE,CAAC,UAAU,CAChB,EAAA,EAAA,KAAK,CAAE,CAAC,EAAA;AACN,oBAAA,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;AACpB,iBAAC,EACF,CAAA,CAAA;SACF;AACF,KAAA;;;;;"}
@@ -0,0 +1,5 @@
1
+ declare const refs: {
2
+ mounted(): void;
3
+ beforeDestroy(): void;
4
+ };
5
+ export { refs };
@@ -0,0 +1,53 @@
1
+ const refs = {
2
+ mounted() {
3
+ if (this.$parent &&
4
+ typeof this.$parent.$refs === 'object' &&
5
+ Object.keys(this.$parent.$refs).length) {
6
+ const refs = this.$parent.$refs;
7
+ if (this._refCacheKey) {
8
+ refs[this._refCacheKey] = this.$el;
9
+ }
10
+ else {
11
+ for (const key in refs) {
12
+ const ref = refs[key];
13
+ if (ref === this) {
14
+ this._refCacheKey = key;
15
+ refs[key] = this.$el;
16
+ break;
17
+ }
18
+ else if (Array.isArray(ref)) {
19
+ const index = ref.indexOf(this);
20
+ if (index > -1) {
21
+ ref[index] = this.$el;
22
+ break;
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ },
29
+ beforeDestroy() {
30
+ if (this.$parent &&
31
+ typeof this.$parent.$refs === 'object' &&
32
+ Object.keys(this.$parent.$refs).length) {
33
+ const refs = this.$parent.$refs;
34
+ if (this._refCacheKey) {
35
+ refs[this._refCacheKey] = this;
36
+ }
37
+ else {
38
+ for (const key in refs) {
39
+ if (Array.isArray(refs[key])) {
40
+ const index = refs[key].indexOf(this.$el);
41
+ if (index > -1) {
42
+ refs[key][index] = this;
43
+ break;
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ };
51
+
52
+ export { refs };
53
+ //# sourceMappingURL=refs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refs.js","sources":["../../../../../taro-components-library-vue2/src/component-lib/mixins/refs.ts"],"sourcesContent":["export const refs = {\n mounted () {\n if (\n this.$parent &&\n typeof this.$parent.$refs === 'object' &&\n Object.keys(this.$parent.$refs).length\n ) {\n const refs = this.$parent.$refs\n\n if (this._refCacheKey) {\n refs[this._refCacheKey] = this.$el\n } else {\n for (const key in refs) {\n const ref = refs[key]\n if (ref === this) {\n this._refCacheKey = key\n refs[key] = this.$el\n break\n } else if (Array.isArray(ref)) {\n const index = ref.indexOf(this)\n if (index > -1) {\n ref[index] = this.$el\n break\n }\n }\n }\n }\n }\n },\n beforeDestroy () {\n if (\n this.$parent &&\n typeof this.$parent.$refs === 'object' &&\n Object.keys(this.$parent.$refs).length\n ) {\n const refs = this.$parent.$refs\n\n if (this._refCacheKey) {\n refs[this._refCacheKey] = this\n } else {\n for (const key in refs) {\n if (Array.isArray(refs[key])) {\n const index = refs[key].indexOf(this.$el)\n if (index > -1) {\n refs[key][index] = this\n break\n }\n }\n }\n }\n }\n }\n}\n"],"names":[],"mappings":"AAAa,MAAA,IAAI,GAAG;IAClB,OAAO,GAAA;QACL,IACE,IAAI,CAAC,OAAO;AACZ,YAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,KAAK,QAAQ;YACtC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EACtC;AACA,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAA;YAE/B,IAAI,IAAI,CAAC,YAAY,EAAE;gBACrB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,GAAG,CAAA;AACnC,aAAA;AAAM,iBAAA;AACL,gBAAA,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;AACtB,oBAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;oBACrB,IAAI,GAAG,KAAK,IAAI,EAAE;AAChB,wBAAA,IAAI,CAAC,YAAY,GAAG,GAAG,CAAA;AACvB,wBAAA,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAA;wBACpB,MAAK;AACN,qBAAA;AAAM,yBAAA,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;wBAC7B,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;AAC/B,wBAAA,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;AACd,4BAAA,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAA;4BACrB,MAAK;AACN,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;KACF;IACD,aAAa,GAAA;QACX,IACE,IAAI,CAAC,OAAO;AACZ,YAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,KAAK,QAAQ;YACtC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EACtC;AACA,YAAA,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAA;YAE/B,IAAI,IAAI,CAAC,YAAY,EAAE;AACrB,gBAAA,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAA;AAC/B,aAAA;AAAM,iBAAA;AACL,gBAAA,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;oBACtB,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;AAC5B,wBAAA,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACzC,wBAAA,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE;4BACd,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;4BACvB,MAAK;AACN,yBAAA;AACF,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;KACF;;;;;"}
@@ -0,0 +1,25 @@
1
+ declare const _default: {
2
+ name: string;
3
+ mixins: ({
4
+ computed: {
5
+ listeners(): any;
6
+ };
7
+ } | {
8
+ mounted(): void;
9
+ beforeDestroy(): void;
10
+ })[];
11
+ model: {
12
+ event: string;
13
+ };
14
+ props: {
15
+ range: ArrayConstructor;
16
+ rangeKey: StringConstructor;
17
+ value: (ArrayConstructor | StringConstructor | NumberConstructor)[];
18
+ };
19
+ mounted(): void;
20
+ watch: {
21
+ value(newVal: any): void;
22
+ };
23
+ render(createElement: any): any;
24
+ };
25
+ export { _default as default };
@@ -0,0 +1,41 @@
1
+ import { listeners } from './mixins/listeners.js';
2
+ import { refs } from './mixins/refs.js';
3
+
4
+ var Picker = {
5
+ name: 'taro-picker',
6
+ mixins: [listeners, refs],
7
+ model: {
8
+ event: 'model'
9
+ },
10
+ props: {
11
+ range: Array,
12
+ rangeKey: String,
13
+ value: [Number, String, Array]
14
+ },
15
+ mounted() {
16
+ this.$el.value = this.value;
17
+ },
18
+ watch: {
19
+ value(newVal) {
20
+ this.$el.value = newVal;
21
+ }
22
+ },
23
+ render(createElement) {
24
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
25
+ const self = this;
26
+ return createElement('taro-picker-core', {
27
+ class: 'hydrated',
28
+ domProps: {
29
+ range: self.range,
30
+ rangeKey: self.rangeKey
31
+ },
32
+ on: Object.assign(Object.assign({}, self.listeners), { change(e) {
33
+ self.$emit('change', e);
34
+ self.$emit('model', e.target.value);
35
+ } })
36
+ }, self.$slots.default);
37
+ }
38
+ };
39
+
40
+ export { Picker as default };
41
+ //# sourceMappingURL=picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picker.js","sources":["../../../../taro-components-library-vue2/src/component-lib/picker.ts"],"sourcesContent":["import { listeners } from './mixins/listeners'\nimport { refs } from './mixins/refs'\n\nexport default {\n name: 'taro-picker',\n mixins: [listeners, refs],\n model: {\n event: 'model'\n },\n props: {\n range: Array,\n rangeKey: String,\n value: [Number, String, Array]\n },\n mounted () {\n this.$el.value = this.value\n },\n watch: {\n value (newVal) {\n this.$el.value = newVal\n }\n },\n render (createElement) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this\n\n return createElement('taro-picker-core', {\n class: 'hydrated',\n domProps: {\n range: self.range,\n rangeKey: self.rangeKey\n },\n on: {\n ...self.listeners,\n change (e) {\n self.$emit('change', e)\n self.$emit('model', e.target.value)\n }\n }\n }, self.$slots.default)\n }\n}\n"],"names":[],"mappings":";;;AAGA,aAAe;AACb,IAAA,IAAI,EAAE,aAAa;AACnB,IAAA,MAAM,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;AACzB,IAAA,KAAK,EAAE;AACL,QAAA,KAAK,EAAE,OAAO;AACf,KAAA;AACD,IAAA,KAAK,EAAE;AACL,QAAA,KAAK,EAAE,KAAK;AACZ,QAAA,QAAQ,EAAE,MAAM;AAChB,QAAA,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;AAC/B,KAAA;IACD,OAAO,GAAA;QACL,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;KAC5B;AACD,IAAA,KAAK,EAAE;AACL,QAAA,KAAK,CAAE,MAAM,EAAA;AACX,YAAA,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,MAAM,CAAA;SACxB;AACF,KAAA;AACD,IAAA,MAAM,CAAE,aAAa,EAAA;;QAEnB,MAAM,IAAI,GAAG,IAAI,CAAA;QAEjB,OAAO,aAAa,CAAC,kBAAkB,EAAE;AACvC,YAAA,KAAK,EAAE,UAAU;AACjB,YAAA,QAAQ,EAAE;gBACR,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACxB,aAAA;AACD,YAAA,EAAE,kCACG,IAAI,CAAC,SAAS,CACjB,EAAA,EAAA,MAAM,CAAE,CAAC,EAAA;AACP,oBAAA,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;oBACvB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AACrC,iBAAC,EACF,CAAA;AACF,SAAA,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;KACxB;CACF;;;;"}
@@ -0,0 +1,17 @@
1
+ declare const _default: {
2
+ name: string;
3
+ mixins: ({
4
+ computed: {
5
+ listeners(): any;
6
+ };
7
+ } | {
8
+ mounted(): void;
9
+ beforeDestroy(): void;
10
+ })[];
11
+ props: {
12
+ scrollX: BooleanConstructor;
13
+ scrollY: BooleanConstructor;
14
+ };
15
+ render(createElement: any): any;
16
+ };
17
+ export { _default as default };