Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

Release v1.0.0-alpha.19

Pre-release
Pre-release
Compare
Choose a tag to compare
@b2nil b2nil released this 20 Mar 04:30
· 87 commits to master since this release

Fixes

  • fix(types): export createUI as Plugin (685161c)
  • fix(ImagePicker): 修复内容不居中 (868bab0, e8f5820), by @unforesndprson
  • fix(events): use onLowercase syntax for all taro builtin events to comply with vue@^3.0.6 (b01004a)
  • fix(calendar): render marks in months other than the current month (5772de5)
  • and a bunch of other related fixes and refactor to tests and demos and deps

Notes

vue@3.0.6 之前,web components 的自定义 kebab-case 事件 foo-bar 会被解析为 foobar,vue 会将 foobar 作为事件监听器名称。

vue@3.0.6 中对 kebab-case 事件引入了这个 Commit: kebab-case events are attached correctly on web components, see #2841 (b302cbb) 。引入这一变更后,@foobaronFoobar 对应的事件名称为 foobar, 而 @foo-baronFooBar 对应的事件名称为 foo-bar

这会影响到 Taro 内置组件事件名称超过(含)两个单词的所有事件,例如 onTouchStartonKeyboardHeightChange

本次发布修改了 taro-ui-vue3 所有用到的 Taro 内置组件事件的写法,即将 onCamelCase 写法改为了 onLowercasewhateverfollows 写法。如果发现 taro-ui-vue3 组件的事件触发不了,请将下面的依赖更新至以下版本或以上:

"dependencies": {
    "@tarojs/components": "^3.1.4",
    "@tarojs/taro": "^3.1.4",
    "vue": "^3.0.6"
  },

注意

使用 Taro vue 3.0 框架时:

  • 如果直接使用 Taro 内置组件,绑定内置组件事件时,请使用 @alllowercasewhateverfollows (针对 sfc),或使用 onLowercasewhateverfollows (针对 render 函数和 jsx)
  • 如果使用 taro-ui-vue3 组件,请按照文档绑定事件名称,无需引入任何变化