feat(input): support enterkeyhint and spellcheck API #802
Annotations
10 errors
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/suffix.tsx 1` mismatched
Expected: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-info-circle-filled"><path fill="currentColor" d="M12 23a11 11 0 100-22 11 11 0 000 22zM11 8.5v-2h2v2h-2zm2 1.5v7.5h-2V10h2z"></path></svg></div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入手机号码" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix"><button type="button" class="t-button t-button--size-small t-button--base t-button--primary t-button--rectangle"><span class="t-button__content"> <!-- --> 操作按钮 </span></button></div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-user-avatar"><path fill="currentColor" d="M2 2h20v20H2V2zm17.5 18h.5V4H4v16h.5a5 5 0 015-5h5a5 5 0 015 5zM12 7a2.5 2.5 0 100 5 2.5 2.5 0 000-5zM7.5 9.5a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zm2 7.5a3 3 0 00-3 3h11a3 3 0 00-3-3h-5z"></path></svg></div></div></div></div>""
Received: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-info-circle-filled"><path fill="currentColor" d="M12 23a11 11 0 100-22 11 11 0 000 22zM11 8.5v-2h2v2h-2zm2 1.5v7.5h-2V10h2z"></path></svg></div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入手机号码" maxLength="-1"/><div class="t-input__wrap--suffix"><button type="button" class="t-button t-button--size-small t-button--base t-button--primary t-button--rectangle"><span class="t-button__content"> <!-- --> 操作按钮 </span></button></div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-user-avatar"><path fill="currentColor" d="M2 2h20v20H2V2zm17.5 18h.5V4H4v16h.5a5 5 0 015-5h5a5 5 0 015 5zM12 7a2.5 2.5 0 100 5 2.5 2.5 0 000-5zM7.5 9.5a4.5 4.5 0 119 0 4.5 4.5 0 01-9 0zm2 7.5a3 3 0 00-3 3h11a3 3 0 00-3-3h-5z"></path></svg></div></div></div></div>""
❯ test/snap/ssr.test.jsx:31:22
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/status.tsx 1` mismatched
Expected: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--error"><input type="text" value="已输入文字" class="t-input__control t-input--error" placeholder="请输入文字" maxLength="-1" spellcheck="false"/></div><div class="t-input__tips t-input--left">辅助说明</div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">不可编辑</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" value="不可编辑文字" class="t-input__control t-input--default t-input__control--disabled" disabled="" maxLength="-1" spellcheck="false"/></div></div></div>""
Received: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--error"><input type="text" value="已输入文字" class="t-input__control t-input--error" placeholder="请输入文字" maxLength="-1"/></div><div class="t-input__tips t-input--left">辅助说明</div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">不可编辑</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" value="不可编辑文字" class="t-input__control t-input--default t-input__control--disabled" disabled="" maxLength="-1"/></div></div></div>""
❯ test/snap/ssr.test.jsx:31:22
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/special.tsx 1` mismatched
Expected: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">输入密码</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="password" class="t-input__control t-input--default" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 26 24" width="1em" height="1em" class="t-icon t-icon-browse-off"><path fill="currentColor" d="M4 1.59l6.17 6.17 7.07 7.07L23.41 21 22 22.41l-2.97-2.96A12.5 12.5 0 011.08 12.3L1 12l.1-.3c.77-2.4 2.24-4.5 4.18-6.02L2.59 3 4 1.59zM6.7 7.1A10.53 10.53 0 003.1 12a10.5 10.5 0 0014.45 5.97l-1.8-1.8a5 5 0 01-6.93-6.93L6.7 7.11zm3.6 3.6a3 3 0 004 4l-4-4zM13 5c-.58 0-1.14.05-1.7.14l-.98.16L10 3.32l.99-.16A12.5 12.5 0 0124.9 11.7l.1.31-.1.3c-.41 1.3-1.03 2.5-1.82 3.58l-.59.8-1.61-1.18.59-.8c.6-.82 1.08-1.73 1.42-2.7A10.5 10.5 0 0013 5zm.51 1.93l.96.29a5 5 0 013.31 3.31l.3.96-1.92.58-.3-.95a3 3 0 00-1.98-1.99l-.95-.3.58-1.9z"></path></svg></div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">验证码</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="输入验证码" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix"><div class="input-suffix"><div class="input-suffix__line"></div><div class="t-image t-image--square input-suffix__image"><div class="t-image__mask"><div class="t-loading t-loading--center" style="color:inherit;font-size:20px"><div class="t-loading__dots" style="animation-play-state:;animation-direction:;animation-duration:800ms;width:20px;height:20px"><div class="t-loading__dot" style="animation-duration:0.8s;animation-delay:0s"></div><div class="t-loading__dot" style="animation-duration:0.8s;animation-delay:0.26666666666666666s"></div><div class="t-loading__dot" style="animation-duration:0.8s;animation-delay:0.5333333333333333s"></div></div></div></div><img class="t-image__img t-image--fit-fill t-image--position-center" src="https://wwcdn.weixin.qq.com/node/wework/images/202010241547.ac6876be9c.png"/></div></div></div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">手机号</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" value="17600600600" class="t-input__control t-input--default" placeholder="请输入手机号码" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix"><div class="input-suffix"><div class="input-suffix__line"></div><div class="input-suffix__verify">发送验证码</div></div></div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">价格</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="number" class="t-input__control t-input--right t-input--default" placeholder="0.00" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix">元</div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">数量</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="number" class="t-input__control t-input--right t-input--default" placeholder="填写个数" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix">个</div></div></div></div>""
Received: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">输入密码</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="password" class="t-input__control t-input--default" maxLength="-1"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 26 24" width="1em" height="1em" class="t-icon t-icon-browse-off"><path fill="currentColor" d="M4 1.59
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/prefix.tsx 1` mismatched
Expected: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__icon--prefix"></div><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__icon--prefix"></div><div class="t-input__label"></div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/></div></div></div>""
Received: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__icon--prefix"></div><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1"/></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__icon--prefix"></div><div class="t-input__label"></div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1"/></div></div></div>""
❯ test/snap/ssr.test.jsx:31:22
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/maxLength.tsx 1` mismatched
Expected: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="10" spellcheck="false"/></div><div class="t-input__tips t-input--left">最大输入10个字符</div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="10" spellcheck="false"/></div><div class="t-input__tips t-input--left">最大输入10个字符,汉字算两个</div></div></div>""
Received: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="10"/></div><div class="t-input__tips t-input--left">最大输入10个字符</div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="10"/></div><div class="t-input__tips t-input--left">最大输入10个字符,汉字算两个</div></div></div>""
❯ test/snap/ssr.test.jsx:31:22
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/layout.tsx 1` mismatched
Expected: ""<div class="t-input t-input--layout-vertical"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-error-circle-filled"><path fill="currentColor" d="M12 1a11 11 0 110 22 11 11 0 010-22zm-1 13h2V6.5h-2V14zm2 1.5h-2v2h2v-2z"></path></svg></div></div></div></div>""
Received: ""<div class="t-input t-input--layout-vertical"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-error-circle-filled"><path fill="currentColor" d="M12 1a11 11 0 110 22 11 11 0 010-22zm-1 13h2V6.5h-2V14zm2 1.5h-2v2h2v-2z"></path></svg></div></div></div></div>""
❯ test/snap/ssr.test.jsx:31:22
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/label.tsx 1` mismatched
Expected: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签超长时最多十个字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/></div></div></div>""
Received: ""<div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签超长时最多十个字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1"/></div></div></div>""
❯ test/snap/ssr.test.jsx:31:22
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/index.tsx 1` mismatched
Expected: ""<div class="tdesign-mobile-demo"><div class="tdesign-mobile-demo-header"><h1 class="tdesign-mobile-demo-header__title">Input 输入框</h1><p class="tdesign-mobile-demo-header__summary">用于单行文本信息输入。</p></div><div class="tdesign-mobile-demo-block"><div class="tdesign-mobile-demo-block__header"><h2 class="tdesign-mobile-demo-block__title">01 类型</h2><p class="tdesign-mobile-demo-block__summary">基础输入框</p></div><div class="tdesign-mobile-demo-block__slot"><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字(选填)" maxLength="-1" spellcheck="false"/></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label"></div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/></div></div></div></div></div><div class="tdesign-mobile-demo-block tdesign-mobile-demo-block_subtitle"><div class="tdesign-mobile-demo-block__header"><p class="tdesign-mobile-demo-block__summary tdesign-mobile-demo-block_subtitle">带字数限制输入框</p></div><div class="tdesign-mobile-demo-block__slot"><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="10" spellcheck="false"/></div><div class="t-input__tips t-input--left">最大输入10个字符</div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="10" spellcheck="false"/></div><div class="t-input__tips t-input--left">最大输入10个字符,汉字算两个</div></div></div></div></div><div class="tdesign-mobile-demo-block tdesign-mobile-demo-block_subtitle"><div class="tdesign-mobile-demo-block__header"><p class="tdesign-mobile-demo-block__summary tdesign-mobile-demo-block_subtitle">带操作输入框</p></div><div class="tdesign-mobile-demo-block__slot"><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-info-circle-filled"><path fill="currentColor" d="M12 23a11 11 0 100-22 11 11 0 000 22zM11 8.5v-2h2v2h-2zm2 1.5v7.5h-2V10h2z"></path></svg></div></div></div></div><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入手机号码" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix"><button type="button" class="t-button t-button--size-small t-button--base t-button--primary t-button--rectangle"><span class="t-button__content"> <!-- --> 操作按钮 </span></button></div></div></div></div><div class="t-input t-input--layout-horizonta
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/custom.tsx 1` mismatched
Expected: ""<div class="input-custom"><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/></div></div></div></div>""
Received: ""<div class="input-custom"><div class="t-input t-input--layout-horizontal"><div class="t-input__wrap--prefix"><div class="t-input__label">标签文字</div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1"/></div></div></div></div>""
❯ test/snap/ssr.test.jsx:31:22
|
Run npm run test:
test/snap/ssr.test.jsx#L31
Error: Snapshot `ssr snapshot test > ssr test src/input/_example/bordered.tsx 1` mismatched
Expected: ""<div class="input-bordered"><div class="input-bordered__summary">标签文字</div><div class="t-input t-input--layout-horizontal t-input--border input-bordered__input"><div class="t-input__wrap--prefix"><div class="t-input__label"></div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1" spellcheck="false"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-error-circle-filled"><path fill="currentColor" d="M12 1a11 11 0 110 22 11 11 0 010-22zm-1 13h2V6.5h-2V14zm2 1.5h-2v2h2v-2z"></path></svg></div></div></div></div></div>""
Received: ""<div class="input-bordered"><div class="input-bordered__summary">标签文字</div><div class="t-input t-input--layout-horizontal t-input--border input-bordered__input"><div class="t-input__wrap--prefix"><div class="t-input__label"></div></div><div class="t-input__wrap"><div class="t-input__content t-input--default"><input type="text" class="t-input__control t-input--default" placeholder="请输入文字" maxLength="-1"/><div class="t-input__wrap--suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-error-circle-filled"><path fill="currentColor" d="M12 1a11 11 0 110 22 11 11 0 010-22zm-1 13h2V6.5h-2V14zm2 1.5h-2v2h2v-2z"></path></svg></div></div></div></div></div>""
❯ test/snap/ssr.test.jsx:31:22
|
Loading