@mpxjs/webpack-plugin 2.9.70-alpha.0 → 2.9.71

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 (126) hide show
  1. package/LICENSE +433 -0
  2. package/README.md +1 -1
  3. package/lib/config.js +0 -14
  4. package/lib/dependencies/ResolveDependency.js +0 -5
  5. package/lib/index.js +7 -38
  6. package/lib/json-compiler/helper.js +3 -3
  7. package/lib/loader.js +0 -53
  8. package/lib/parser.js +1 -1
  9. package/lib/platform/json/wx/index.js +21 -8
  10. package/lib/platform/style/wx/index.js +51 -54
  11. package/lib/platform/template/wx/component-config/button.js +2 -14
  12. package/lib/platform/template/wx/component-config/fix-component-name.js +15 -12
  13. package/lib/platform/template/wx/component-config/image.js +0 -4
  14. package/lib/platform/template/wx/component-config/index.js +1 -1
  15. package/lib/platform/template/wx/component-config/input.js +0 -4
  16. package/lib/platform/template/wx/component-config/movable-view.js +8 -1
  17. package/lib/platform/template/wx/component-config/picker-view.js +1 -5
  18. package/lib/platform/template/wx/component-config/rich-text.js +6 -2
  19. package/lib/platform/template/wx/component-config/scroll-view.js +1 -5
  20. package/lib/platform/template/wx/component-config/switch.js +0 -4
  21. package/lib/platform/template/wx/component-config/text.js +0 -4
  22. package/lib/platform/template/wx/component-config/textarea.js +0 -5
  23. package/lib/platform/template/wx/component-config/unsupported.js +1 -1
  24. package/lib/platform/template/wx/component-config/view.js +0 -4
  25. package/lib/platform/template/wx/index.js +1 -131
  26. package/lib/resolve-loader.js +1 -4
  27. package/lib/runtime/components/react/context.ts +8 -0
  28. package/lib/runtime/components/react/dist/context.js +2 -0
  29. package/lib/runtime/components/react/dist/getInnerListeners.js +39 -37
  30. package/lib/runtime/components/react/dist/mpx-button.jsx +16 -44
  31. package/lib/runtime/components/react/dist/mpx-canvas/html.js +2 -4
  32. package/lib/runtime/components/react/dist/mpx-canvas/index.jsx +5 -1
  33. package/lib/runtime/components/react/dist/mpx-movable-view.jsx +93 -58
  34. package/lib/runtime/components/react/dist/mpx-navigator.jsx +1 -1
  35. package/lib/runtime/components/react/dist/mpx-picker-view-column-item.jsx +10 -14
  36. package/lib/runtime/components/react/dist/mpx-picker-view-column.jsx +94 -81
  37. package/lib/runtime/components/react/dist/mpx-picker-view.jsx +19 -16
  38. package/lib/runtime/components/react/dist/mpx-rich-text/index.jsx +10 -11
  39. package/lib/runtime/components/react/dist/mpx-scroll-view.jsx +11 -4
  40. package/lib/runtime/components/react/dist/mpx-swiper-item.jsx +31 -8
  41. package/lib/runtime/components/react/dist/mpx-swiper.jsx +435 -371
  42. package/lib/runtime/components/react/dist/mpx-view.jsx +18 -53
  43. package/lib/runtime/components/react/dist/pickerFaces.js +3 -8
  44. package/lib/runtime/components/react/dist/pickerVIewContext.js +5 -0
  45. package/lib/runtime/components/react/dist/{pickerViewOverlay.jsx → pickerViewIndicator.jsx} +6 -6
  46. package/lib/runtime/components/react/dist/pickerViewMask.jsx +2 -2
  47. package/lib/runtime/components/react/dist/useAnimationHooks.js +27 -10
  48. package/lib/runtime/components/react/dist/utils.jsx +162 -70
  49. package/lib/runtime/components/react/event.config.ts +25 -26
  50. package/lib/runtime/components/react/getInnerListeners.ts +236 -182
  51. package/lib/runtime/components/react/mpx-button.tsx +27 -69
  52. package/lib/runtime/components/react/mpx-canvas/html.ts +2 -4
  53. package/lib/runtime/components/react/mpx-canvas/index.tsx +44 -46
  54. package/lib/runtime/components/react/mpx-checkbox-group.tsx +15 -13
  55. package/lib/runtime/components/react/mpx-checkbox.tsx +20 -21
  56. package/lib/runtime/components/react/mpx-form.tsx +15 -20
  57. package/lib/runtime/components/react/mpx-icon.tsx +2 -2
  58. package/lib/runtime/components/react/mpx-image.tsx +87 -47
  59. package/lib/runtime/components/react/mpx-input.tsx +24 -32
  60. package/lib/runtime/components/react/mpx-label.tsx +12 -14
  61. package/lib/runtime/components/react/mpx-movable-area.tsx +10 -16
  62. package/lib/runtime/components/react/mpx-movable-view.tsx +133 -92
  63. package/lib/runtime/components/react/mpx-navigator.tsx +3 -9
  64. package/lib/runtime/components/react/mpx-picker-view-column-item.tsx +76 -0
  65. package/lib/runtime/components/react/mpx-picker-view-column.tsx +206 -183
  66. package/lib/runtime/components/react/mpx-picker-view.tsx +49 -48
  67. package/lib/runtime/components/react/mpx-radio-group.tsx +13 -15
  68. package/lib/runtime/components/react/mpx-radio.tsx +19 -25
  69. package/lib/runtime/components/react/mpx-rich-text/html.ts +40 -0
  70. package/lib/runtime/components/react/mpx-rich-text/index.tsx +115 -0
  71. package/lib/runtime/components/react/mpx-root-portal.tsx +3 -5
  72. package/lib/runtime/components/react/mpx-scroll-view.tsx +53 -43
  73. package/lib/runtime/components/react/mpx-swiper-item.tsx +45 -11
  74. package/lib/runtime/components/react/mpx-swiper.tsx +742 -0
  75. package/lib/runtime/components/react/mpx-switch.tsx +19 -15
  76. package/lib/runtime/components/react/mpx-text.tsx +8 -16
  77. package/lib/runtime/components/react/mpx-textarea.tsx +11 -10
  78. package/lib/runtime/components/react/mpx-view.tsx +28 -77
  79. package/lib/runtime/components/react/mpx-web-view.tsx +94 -59
  80. package/lib/runtime/components/react/pickerFaces.ts +10 -7
  81. package/lib/runtime/components/react/pickerVIewContext.ts +27 -0
  82. package/lib/runtime/components/react/pickerViewIndicator.tsx +34 -0
  83. package/lib/runtime/components/react/pickerViewMask.tsx +30 -0
  84. package/lib/runtime/components/react/types/{getInnerListeners.ts → getInnerListeners.d.ts} +4 -5
  85. package/lib/runtime/components/react/types/global.d.ts +12 -1
  86. package/lib/runtime/components/react/useAnimationHooks.ts +60 -15
  87. package/lib/runtime/components/react/utils.tsx +175 -71
  88. package/lib/runtime/components/web/mpx-checkbox.vue +1 -1
  89. package/lib/runtime/components/web/mpx-picker-view-column.vue +9 -4
  90. package/lib/runtime/components/web/mpx-web-view.vue +34 -20
  91. package/lib/runtime/optionProcessor.js +0 -22
  92. package/lib/style-compiler/index.js +1 -1
  93. package/lib/style-compiler/plugins/scope-id.js +30 -2
  94. package/lib/template-compiler/compiler.js +91 -39
  95. package/lib/utils/env.js +1 -6
  96. package/lib/utils/pre-process-json.js +9 -5
  97. package/lib/wxss/loader.js +15 -2
  98. package/package.json +4 -7
  99. package/lib/dependencies/AddEntryDependency.js +0 -24
  100. package/lib/runtime/components/react/dist/types/common.js +0 -1
  101. package/lib/runtime/components/react/dist/types/getInnerListeners.js +0 -1
  102. package/lib/runtime/components/react/mpx-swiper/carouse.tsx +0 -527
  103. package/lib/runtime/components/react/mpx-swiper/index.tsx +0 -80
  104. package/lib/runtime/components/react/mpx-swiper/type.ts +0 -87
  105. package/lib/runtime/components/react/pickerOverlay.tsx +0 -32
  106. package/lib/runtime/components/tenon/getInnerListeners.js +0 -334
  107. package/lib/runtime/components/tenon/tenon-button.vue +0 -309
  108. package/lib/runtime/components/tenon/tenon-image.vue +0 -66
  109. package/lib/runtime/components/tenon/tenon-input.vue +0 -171
  110. package/lib/runtime/components/tenon/tenon-rich-text.vue +0 -26
  111. package/lib/runtime/components/tenon/tenon-scroll-view.vue +0 -127
  112. package/lib/runtime/components/tenon/tenon-switch.vue +0 -96
  113. package/lib/runtime/components/tenon/tenon-text.vue +0 -70
  114. package/lib/runtime/components/tenon/tenon-textarea.vue +0 -86
  115. package/lib/runtime/components/tenon/tenon-view.vue +0 -93
  116. package/lib/runtime/components/web/event.js +0 -105
  117. package/lib/runtime/optionProcessor.tenon.js +0 -84
  118. package/lib/style-compiler/plugins/hm.js +0 -20
  119. package/lib/tenon/index.js +0 -117
  120. package/lib/tenon/processJSON.js +0 -352
  121. package/lib/tenon/processScript.js +0 -203
  122. package/lib/tenon/processStyles.js +0 -21
  123. package/lib/tenon/processTemplate.js +0 -126
  124. package/lib/tenon/script-helper.js +0 -223
  125. package/lib/utils/get-relative-path.js +0 -25
  126. /package/lib/runtime/components/react/types/{common.ts → common.d.ts} +0 -0
@@ -156,7 +156,9 @@ module.exports = function getSpec ({ warn, error }) {
156
156
  },
157
157
  {
158
158
  test: 'usingComponents',
159
- web: fixComponentName('usingComponents')
159
+ web: fixComponentName('usingComponents'),
160
+ ios: fixComponentName('usingComponents'),
161
+ android: fixComponentName('usingComponents')
160
162
  },
161
163
  {
162
164
  test: 'usingComponents',
@@ -256,12 +258,21 @@ module.exports = function getSpec ({ warn, error }) {
256
258
  }
257
259
 
258
260
  const spec = {
259
- supportedModes: ['ali', 'swan', 'qq', 'tt', 'jd', 'qa', 'dd', 'web'],
260
- normalizeTest,
261
- page: [
262
- ...windowRules,
263
- ...componentRules
261
+ supportedModes: [
262
+ 'ali',
263
+ 'swan',
264
+ 'qq',
265
+ 'tt',
266
+ 'jd',
267
+ 'qa',
268
+ 'dd',
269
+ 'web',
270
+ 'ios',
271
+ 'android'
264
272
  ],
273
+
274
+ normalizeTest,
275
+ page: [...windowRules, ...componentRules],
265
276
  component: componentRules,
266
277
  window: windowRules,
267
278
  tabBar: {
@@ -297,7 +308,7 @@ module.exports = function getSpec ({ warn, error }) {
297
308
  ali (input) {
298
309
  const value = input.list
299
310
  delete input.list
300
- input.items = value.map(item => {
311
+ input.items = value.map((item) => {
301
312
  return runRules(spec.tabBar.list, item, {
302
313
  mode: 'ali',
303
314
  normalizeTest,
@@ -361,7 +372,9 @@ module.exports = function getSpec ({ warn, error }) {
361
372
  },
362
373
  {
363
374
  test: 'usingComponents',
364
- web: fixComponentName('usingComponents')
375
+ web: fixComponentName('usingComponents'),
376
+ ios: fixComponentName('usingComponents'),
377
+ android: fixComponentName('usingComponents')
365
378
  },
366
379
  {
367
380
  test: 'usingComponents',
@@ -373,11 +373,12 @@ module.exports = function getSpec ({ warn, error }) {
373
373
 
374
374
  // transform 转换
375
375
  const formatTransform = ({ prop, value, selector }, { mode }) => {
376
- if (Array.isArray(value)) return { prop, value }
376
+ // css var & 数组直接返回
377
+ if (Array.isArray(value) || cssVariableExp.test(value)) return { prop, value }
377
378
  const values = parseValues(value)
378
379
  const transform = []
379
380
  values.forEach(item => {
380
- const match = item.match(/([/\w]+)\(([^)]+)\)/)
381
+ const match = item.match(/([/\w]+)\((.+)\)/)
381
382
  if (match && match.length >= 3) {
382
383
  let key = match[1]
383
384
  const val = match[2]
@@ -398,7 +399,7 @@ module.exports = function getSpec ({ warn, error }) {
398
399
  break
399
400
  case 'matrix':
400
401
  case 'matrix3d':
401
- transform.push({ [key]: val.split(',').map(val => +val) })
402
+ transform.push({ [key]: parseValues(val, ',').map(val => +val) })
402
403
  break
403
404
  case 'translate':
404
405
  case 'scale':
@@ -406,23 +407,23 @@ module.exports = function getSpec ({ warn, error }) {
406
407
  case 'rotate3d': // x y z angle
407
408
  case 'translate3d': // x y 支持 z不支持
408
409
  case 'scale3d': // x y 支持 z不支持
409
- {
410
- // 2 个以上的值处理
411
- key = key.replace('3d', '')
412
- const vals = val.split(',', key === 'rotate' ? 4 : 3)
413
- // scale(.5) === scaleX(.5) scaleY(.5)
414
- if (vals.length === 1 && key === 'scale') {
415
- vals.push(vals[0])
416
- }
417
- const xyz = ['X', 'Y', 'Z']
418
- transform.push(...vals.map((v, index) => {
419
- if (key !== 'rotate' && index > 1) {
420
- unsupportedPropError({ prop: `${key}Z`, value, selector }, { mode })
421
- }
422
- return { [`${key}${xyz[index] || ''}`]: v.trim() }
423
- }))
424
- break
410
+ {
411
+ // 2 个以上的值处理
412
+ key = key.replace('3d', '')
413
+ const vals = parseValues(val, ',').splice(0, key === 'rotate' ? 4 : 3)
414
+ // scale(.5) === scaleX(.5) scaleY(.5)
415
+ if (vals.length === 1 && key === 'scale') {
416
+ vals.push(vals[0])
425
417
  }
418
+ const xyz = ['X', 'Y', 'Z']
419
+ transform.push(...vals.map((v, index) => {
420
+ if (key !== 'rotate' && index > 1) {
421
+ unsupportedPropError({ prop: `${key}Z`, value, selector }, { mode })
422
+ }
423
+ return { [`${key}${xyz[index] || ''}`]: v.trim() }
424
+ }))
425
+ break
426
+ }
426
427
  case 'translateZ':
427
428
  case 'scaleZ':
428
429
  default:
@@ -455,14 +456,17 @@ module.exports = function getSpec ({ warn, error }) {
455
456
 
456
457
  const formatFlex = ({ prop, value, selector }) => {
457
458
  let values = parseValues(value)
459
+ // 值大于3 去前三
458
460
  if (values.length > 3) {
459
- error(`Value of [flex] in ${selector} supports up to three values, received [${value}], please check again!`)
461
+ warn(`Value of [flex] in ${selector} supports up to three values, received [${value}], please check again!`)
460
462
  values = values.splice(0, 3)
461
463
  }
462
464
  const cssMap = []
463
- const lastOne = values[values.length - 1]
464
- const isAuto = lastOne === 'auto'
465
- // 枚举值 none initial
465
+ // 单个css var 直接设置 flex 属性
466
+ if (values.length === 1 && cssVariableExp.test(value)) {
467
+ return { prop, value }
468
+ }
469
+ // 包含枚举值 none initial
466
470
  if (values.includes('initial') || values.includes('none')) {
467
471
  // css flex: initial ===> flex: 0 1 ===> rn flex 0 1
468
472
  // css flex: none ===> css flex: 0 0 ===> rn flex 0 0
@@ -475,38 +479,31 @@ module.exports = function getSpec ({ warn, error }) {
475
479
  }
476
480
  return cssMap
477
481
  }
478
- // 最后一个值是flexBasis 的有效值(auto或者有单位百分比、px等)
479
- // flex 0 1 auto flex auto flex 1 auto flex 1 30px flex 1 10% flex 1 1 auto
480
- if (!isNumber(lastOne) || !cssVariableExp.test(value)) {
481
- // 添加 grow shrink
482
- // 在设置 flex basis 有效值的场景下,如果没有设置 grow shrink,则默认为1
483
- // 单值 flex: 1 1 <flex-basis>
484
- // 双值 flex: <flex-grow> 1 <flex-basis>
485
- // 三值 flex: <flex-grow> <flex-shrink> <flex-basis>
486
- for (let i = 0; i < 2; i++) {
487
- const item = getIntegersFlex({ prop: AbbreviationMap[prop][i], value: isNumber(values[i]) || cssVariableExp.test(value) ? values[i] : 1 })
482
+ // 只有1-2个值且最后的值是flexBasis 的有效值(auto或者有单位百分比、px等)
483
+ // 在设置 flex basis 有效值的场景下,如果没有设置 grow shrink,则默认为1
484
+ // 单值 flex: 1 1 <flex-basis>
485
+ // 双值 flex: <flex-grow> 1 <flex-basis>
486
+ // 三值 flex: <flex-grow> <flex-shrink> <flex-basis>
487
+ for (let i = 0; i < 3; i++) {
488
+ if (i < 2) {
489
+ // 添加 grow shrink
490
+ const isValid = isNumber(values[0]) || cssVariableExp.test(values[0])
491
+ // 兜底 1
492
+ const val = isValid ? values[0] : 1
493
+ const item = getIntegersFlex({ prop: AbbreviationMap[prop][i], value: val, selector })
488
494
  item && cssMap.push(item)
495
+ isValid && values.shift()
496
+ } else {
497
+ // 添加 flexBasis
498
+ // 有单位(百分比、px等) 的 value 赋值 flexBasis,auto 不处理,兜底 0
499
+ const val = values[0] || 0
500
+ if (val !== 'auto') {
501
+ cssMap.push({
502
+ prop: 'flexBasis',
503
+ value: val
504
+ })
505
+ }
489
506
  }
490
- if (!isAuto) {
491
- // 有单位(百分比、px等) 的 value 赋值 flexBasis,auto 不处理
492
- cssMap.push({
493
- prop: 'flexBasis',
494
- value: lastOne
495
- })
496
- }
497
- return cssMap
498
- }
499
- // 纯数值:value 按flex-grow flex-shrink flex-basis 顺序赋值
500
- // 兜底 shrink & basis
501
- if (values.length === 1) {
502
- values.push(...[1, 0])
503
- } else if (values.length === 2) {
504
- values.push(0)
505
- }
506
- // 循环赋值
507
- for (let i = 0; i < values.length; i++) {
508
- const item = getIntegersFlex({ prop: AbbreviationMap[prop][i], value: values[i] })
509
- item && cssMap.push(item)
510
507
  }
511
508
  return cssMap
512
509
  }
@@ -514,7 +511,7 @@ module.exports = function getSpec ({ warn, error }) {
514
511
  const formatFontFamily = ({ prop, value, selector }) => {
515
512
  // 去掉引号 取逗号分隔后的第一个
516
513
  const newVal = value.replace(/"|'/g, '').trim()
517
- const values = newVal.split(',').filter(i => i)
514
+ const values = parseValues(newVal, ',')
518
515
  if (!newVal || !values.length) {
519
516
  error(`Value of [${prop}] is invalid in ${selector}, received [${value}], please check again!`)
520
517
  return false
@@ -28,8 +28,6 @@ module.exports = function ({ print }) {
28
28
  const ttEventLog = print({ platform: 'bytedance', tag: TAG_NAME, isError: false, type: 'event' })
29
29
  const webPropLog = print({ platform: 'web', tag: TAG_NAME, isError: false })
30
30
  const webEventLog = print({ platform: 'web', tag: TAG_NAME, isError: false, type: 'event' })
31
- const tenonPropLog = print({ platform: 'tenon', tag: TAG_NAME, isError: false })
32
- const tenonEventLog = print({ platform: 'tenon', tag: TAG_NAME, isError: false, type: 'event' })
33
31
  const qaPropLog = print({ platform: 'qa', tag: TAG_NAME, isError: false })
34
32
  const wxPropValueLog = print({ platform: 'wx', tag: TAG_NAME, isError: false, type: 'value' })
35
33
  const iosValueLogError = print({ platform: 'ios', tag: TAG_NAME, isError: true, type: 'value' })
@@ -45,10 +43,6 @@ module.exports = function ({ print }) {
45
43
  el.isBuiltIn = true
46
44
  return 'mpx-button'
47
45
  },
48
- tenon (tag, { el }) {
49
- el.isBuiltIn = true
50
- return 'tenon-button'
51
- },
52
46
  ios (tag, { el }) {
53
47
  el.isBuiltIn = true
54
48
  return 'mpx-button'
@@ -163,18 +157,13 @@ module.exports = function ({ print }) {
163
157
  },
164
158
  {
165
159
  test: /^(open-type|lang|session-from|send-message-title|send-message-path|send-message-img|show-message-card|app-parameter)$/,
166
- web: webPropLog,
167
- tenon: tenonPropLog
160
+ web: webPropLog
168
161
  },
169
162
  {
170
163
  test: /^(size|type|plain|loading|form-type|hover-class|hover-stop-propagation|hover-start-time|hover-stay-time|use-built-in)$/,
171
164
  web (prop, { el }) {
172
165
  // todo 这部分能力基于内部封装实现
173
166
  el.isBuiltIn = true
174
- },
175
- tenon (prop, { el }) {
176
- // todo 这部分能力基于内部封装实现
177
- el.isBuiltIn = true
178
167
  }
179
168
  },
180
169
  {
@@ -216,8 +205,7 @@ module.exports = function ({ print }) {
216
205
  },
217
206
  {
218
207
  test: /^(getuserinfo|contact|error|launchapp|opensetting|getphonenumber)$/,
219
- web: webEventLog,
220
- tenon: tenonEventLog
208
+ web: webEventLog
221
209
  },
222
210
  {
223
211
  test: /^(getuserinfo|contact|getphonenumber|bindgetrealtimephonenumber|error|opensetting|launchapp|chooseavatar|agreeprivacyauthorization)$/,
@@ -1,21 +1,24 @@
1
1
  const { isOriginTag, isBuildInTag } = require('../../../../utils/dom-tag-config')
2
2
 
3
3
  module.exports = function () {
4
+ const handleComponentTag = (el, data) => {
5
+ const newTag = `mpx-com-${el.tag}`
6
+ const usingComponents = data.usingComponents || []
7
+ // 当前组件名与原生tag或内建tag同名,对组件名进行转义
8
+ // json转义见:platform/json/wx/index.js fixComponentName
9
+ if (usingComponents.includes(newTag)) {
10
+ el.tag = newTag
11
+ }
12
+ return el
13
+ }
14
+
4
15
  return {
5
16
  waterfall: true,
6
17
  skipNormalize: true,
7
- supportedModes: ['web'],
18
+ supportedModes: ['web', 'ios', 'android'],
8
19
  test: (input) => isOriginTag(input) || isBuildInTag(input),
9
- // 输出web时对组件名进行转义避免与原生tag和内建tag冲突
10
- web (el, data) {
11
- const newTag = `mpx-com-${el.tag}`
12
- const usingComponents = data.usingComponents || []
13
- // 当前组件名与原生tag或内建tag同名,对组件名进行转义
14
- // json转义见:platform/json/wx/index.js fixComponentName
15
- if (usingComponents.includes(newTag)) {
16
- el.tag = newTag
17
- }
18
- return el
19
- }
20
+ web: handleComponentTag,
21
+ ios: handleComponentTag,
22
+ android: handleComponentTag
20
23
  }
21
24
  }
@@ -15,10 +15,6 @@ module.exports = function ({ print }) {
15
15
  el.isBuiltIn = true
16
16
  return 'mpx-image'
17
17
  },
18
- tenon (tag, { el }) {
19
- el.isBuiltIn = true
20
- return 'tenon-image'
21
- },
22
18
  ios (tag, { el }) {
23
19
  el.isBuiltIn = true
24
20
  return 'mpx-image'
@@ -82,8 +82,8 @@ module.exports = function getComponentConfigs ({ warn, error }) {
82
82
 
83
83
  // 转换规则只需以微信为基准配置微信和支付宝的差异部分,比如微信和支付宝都支持但是写法不一致,或者微信支持而支付宝不支持的部分(抛出错误或警告)
84
84
  return [
85
- ...unsupported({ print }),
86
85
  fixComponentName({ print }),
86
+ ...unsupported({ print }),
87
87
  ad({ print }),
88
88
  view({ print }),
89
89
  scrollView({ print }),
@@ -26,10 +26,6 @@ module.exports = function ({ print }) {
26
26
  el.isBuiltIn = true
27
27
  return 'mpx-input'
28
28
  },
29
- tenon (tag, { el }) {
30
- el.isBuiltIn = true
31
- return 'tenon-input'
32
- },
33
29
  ios (tag, { el }) {
34
30
  el.isBuiltIn = true
35
31
  return 'mpx-input'
@@ -2,6 +2,8 @@ const TAG_NAME = 'movable-view'
2
2
 
3
3
  module.exports = function ({ print }) {
4
4
  const aliEventLog = print({ platform: 'ali', tag: TAG_NAME, isError: false, type: 'event' })
5
+ const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
6
+ const iosEventLog = print({ platform: 'ios', tag: TAG_NAME, isError: false, type: 'event' })
5
7
  const qaPropLog = print({ platform: 'qa', tag: TAG_NAME, isError: false })
6
8
  const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
7
9
  const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
@@ -27,7 +29,7 @@ module.exports = function ({ print }) {
27
29
  android: androidPropLog
28
30
  },
29
31
  {
30
- test: /^(inertia|damping|animation)$/,
32
+ test: /^(damping|friction|scale|scale-min|scale-max|scale-value)$/,
31
33
  ios: iosPropLog,
32
34
  android: androidPropLog
33
35
  }
@@ -36,6 +38,11 @@ module.exports = function ({ print }) {
36
38
  {
37
39
  test: /^(htouchmove|vtouchmove)$/,
38
40
  ali: aliEventLog
41
+ },
42
+ {
43
+ test: /^(bindscale)$/,
44
+ ios: iosEventLog,
45
+ android: androidEventLog
39
46
  }
40
47
  ]
41
48
  }
@@ -6,9 +6,7 @@ module.exports = function ({ print }) {
6
6
  const ttPropLog = print({ platform: 'bytedance', tag: TAG_NAME, isError: false })
7
7
  const ttEventLog = print({ platform: 'bytedance', tag: TAG_NAME, isError: false, type: 'event' })
8
8
  const jdEventLog = print({ platform: 'jd', tag: TAG_NAME, isError: false, type: 'event' })
9
- const iosPropLog = print({ platform: 'ios', tag: TAG_NAME, isError: false })
10
9
  const iosEventLog = print({ platform: 'ios', tag: TAG_NAME, isError: false, type: 'event' })
11
- const androidPropLog = print({ platform: 'android', tag: TAG_NAME, isError: false })
12
10
  const androidEventLog = print({ platform: 'android', tag: TAG_NAME, isError: false, type: 'event' })
13
11
 
14
12
  return {
@@ -28,9 +26,7 @@ module.exports = function ({ print }) {
28
26
  props: [
29
27
  {
30
28
  test: /^(indicator-class|mask-class)$/,
31
- tt: ttPropLog,
32
- ios: iosPropLog,
33
- android: androidPropLog
29
+ tt: ttPropLog
34
30
  }
35
31
  ],
36
32
  event: [
@@ -12,9 +12,13 @@ module.exports = function ({ print }) {
12
12
  el.isBuiltIn = true
13
13
  return 'mpx-rich-text'
14
14
  },
15
- tenon (tag, { el }) {
15
+ ios (tag, { el }) {
16
16
  el.isBuiltIn = true
17
- return 'tenon-rich-text'
17
+ return 'mpx-rich-text'
18
+ },
19
+ android (tag, { el }) {
20
+ el.isBuiltIn = true
21
+ return 'mpx-rich-text'
18
22
  },
19
23
  props: [
20
24
  {
@@ -23,10 +23,6 @@ module.exports = function ({ print }) {
23
23
  el.isBuiltIn = true
24
24
  return 'mpx-scroll-view'
25
25
  },
26
- tenon (tag, { el }) {
27
- el.isBuiltIn = true
28
- return 'tenon-scroll-view'
29
- },
30
26
  android (tag, { el }) {
31
27
  el.isBuiltIn = true
32
28
  return 'mpx-scroll-view'
@@ -57,7 +53,7 @@ module.exports = function ({ print }) {
57
53
  qa: qaPropLog
58
54
  },
59
55
  {
60
- test: /^(scroll-into-view|refresher-threshold|enable-passive|scroll-anchoring|using-sticky|fast-deceleration|enable-flex)$/,
56
+ test: /^(refresher-threshold|enable-passive|scroll-anchoring|using-sticky|fast-deceleration|enable-flex)$/,
61
57
  android: androidPropLog,
62
58
  ios: iosPropLog
63
59
  },
@@ -10,10 +10,6 @@ module.exports = function ({ print }) {
10
10
  el.isBuiltIn = true
11
11
  return 'mpx-switch'
12
12
  },
13
- tenon (tag, { el }) {
14
- el.isBuiltIn = true
15
- return 'tenon-switch'
16
- },
17
13
  ios (tag, { el }) {
18
14
  el.isBuiltIn = true
19
15
  return 'mpx-switch'
@@ -22,10 +22,6 @@ module.exports = function ({ print }) {
22
22
  return 'span'
23
23
  }
24
24
  },
25
- tenon (tag, { el }) {
26
- el.isBuiltIn = true
27
- return 'tenon-text'
28
- },
29
25
  ios (tag, { el }) {
30
26
  el.isBuiltIn = true
31
27
  return 'mpx-text'
@@ -28,11 +28,6 @@ module.exports = function ({ print }) {
28
28
  el.isBuiltIn = true
29
29
  return 'mpx-textarea'
30
30
  },
31
- tenon (tag, { el }) {
32
- // form全量使用内建组件
33
- el.isBuiltIn = true
34
- return 'tenon-textarea'
35
- },
36
31
  ios (tag, { el }) {
37
32
  el.isBuiltIn = true
38
33
  return 'mpx-textarea'
@@ -11,7 +11,7 @@ const JD_UNSUPPORTED_TAG_NAME_ARR = ['functional-page-navigator', 'live-pusher',
11
11
  // 快应用不支持的标签集合
12
12
  const QA_UNSUPPORTED_TAG_NAME_ARR = ['movable-view', 'movable-area', 'open-data', 'official-account', 'editor', 'functional-page-navigator', 'live-player', 'live-pusher', 'ad', 'cover-image']
13
13
  // RN不支持的标签集合
14
- const RN_UNSUPPORTED_TAG_NAME_ARR = ['open-data', 'official-account', 'editor', 'functional-page-navigator', 'live-player', 'live-pusher', 'ad', 'progress', 'rich-text', 'slider', 'audio', 'camera', 'video', 'match-media', 'page-container', 'editor', 'keyboard-accessory', 'map']
14
+ const RN_UNSUPPORTED_TAG_NAME_ARR = ['open-data', 'official-account', 'editor', 'functional-page-navigator', 'live-player', 'live-pusher', 'ad', 'progress', 'slider', 'audio', 'camera', 'video', 'match-media', 'page-container', 'editor', 'keyboard-accessory', 'map']
15
15
 
16
16
  /**
17
17
  * @param {function(object): function} print
@@ -23,10 +23,6 @@ module.exports = function ({ print }) {
23
23
  return 'div'
24
24
  }
25
25
  },
26
- tenon (tag, { el }) {
27
- el.isBuiltIn = true
28
- return 'tenon-view'
29
- },
30
26
  ios (tag, { el }) {
31
27
  el.isBuiltIn = true
32
28
  return 'mpx-view'