Compare commits

..

No commits in common. "5c080f3a6ebc1fa70b4dd48922ceeae16488f717" and "b3ca94dfadd446a03cb9785f80f5eda1443abfb8" have entirely different histories.

5 changed files with 6 additions and 50 deletions

View File

@ -16,24 +16,6 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
## Details
### [v3.1.2](https://github.com/youzan/vant/compare/v3.1.1...v3.1.2)
`2021-07-03`
**Feature**
- Area: add toolbar、confirm、cancel slots [#8969](https://github.com/youzan/vant/issues/8969)
- Calendar: simplify placeholder dom [#8955](https://github.com/youzan/vant/issues/8955)
- Cascader: add disabled option [#8952](https://github.com/youzan/vant/issues/8952)
- ConfigProvider: add tag prop [#8967](https://github.com/youzan/vant/issues/8967)
- Picker: add toolbar slot [#8968](https://github.com/youzan/vant/issues/8968)
- Picker: allow option text to be number type [#8951](https://github.com/youzan/vant/issues/8951)
- Picker: add picker-option-padding CSS var [#8947](https://github.com/youzan/vant/issues/8947)
**Bug Fixes**
- Toast: fix word break [#8965](https://github.com/youzan/vant/issues/8965)
### [v3.1.1](https://github.com/youzan/vant/compare/v3.1.0...v3.1.1)
`2021-06-27`

View File

@ -16,31 +16,13 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
## 更新内容
### [v3.1.2](https://github.com/youzan/vant/compare/v3.1.1...v3.1.2)
`2021-07-03`
**Feature**
- Area: 新增 toolbar、confirm、cancel 插槽 [#8969](https://github.com/youzan/vant/issues/8969)
- Calendar: 优化日期较多时的加载性能 [#8955](https://github.com/youzan/vant/issues/8955)
- Cascader: 新增 disabled 选项 [#8952](https://github.com/youzan/vant/issues/8952)
- ConfigProvider: 新增 tag 属性 [#8967](https://github.com/youzan/vant/issues/8967)
- Picker: 新增 toolbar 插槽,将 default 插槽标记为废弃 [#8968](https://github.com/youzan/vant/issues/8968)
- Picker: 允许 Option 的值为 number 类型 [#8951](https://github.com/youzan/vant/issues/8951)
- Picker: 新增 picker-option-padding CSS 变量 [#8947](https://github.com/youzan/vant/issues/8947)
**Bug Fixes**
- Toast: 修复文字换行问题 [#8965](https://github.com/youzan/vant/issues/8965)
### [v3.1.1](https://github.com/youzan/vant/compare/v3.1.0...v3.1.1)
`2021-06-27`
**Feature**
- Cell: 新增 value 插槽,将 default 插槽标记为废弃 [#8933](https://github.com/youzan/vant/issues/8933)
- Cell: 新增 value 插槽 [#8933](https://github.com/youzan/vant/issues/8933)
- CollapseItem: 新增 label 插槽 [#8934](https://github.com/youzan/vant/issues/8934)
- NoticeBar: 新增 reset 方法 [#8917](https://github.com/youzan/vant/issues/8917)
- Tabs: 新增 nav-bottom 插槽 [#8915](https://github.com/youzan/vant/issues/8915)

View File

@ -1,6 +1,6 @@
{
"name": "vant",
"version": "3.1.2",
"version": "3.1.1",
"description": "Mobile UI Components built on Vue",
"main": "lib/index.js",
"module": "es/index.js",

View File

@ -1,11 +1,11 @@
import { watch, inject, InjectionKey } from 'vue';
import type { FieldProvide } from '../field/types';
import { ComponentInstance } from '../utils';
import { watch, inject } from 'vue';
export const FORM_KEY = Symbol('van-form');
export const FIELD_KEY: InjectionKey<FieldProvide> = Symbol('van-field');
export const FIELD_KEY = Symbol('van-field');
export function useLinkField(getValue: () => unknown) {
const field = inject(FIELD_KEY, null);
const field = inject(FIELD_KEY, null) as ComponentInstance | null;
if (field && !field.childFieldValue.value) {
field.childFieldValue.value = getValue;

View File

@ -1,5 +1,3 @@
import type { Ref } from 'vue';
export type FieldType =
| 'tel'
| 'text'
@ -39,12 +37,6 @@ export type FieldRule = {
formatter?: (value: any, rule: FieldRule) => string;
};
export type FieldProvide = {
childFieldValue: Ref<(() => unknown) | undefined>;
resetValidation: () => void;
validateWithTrigger: (trigger: FieldValidateTrigger) => void;
};
declare global {
interface EventTarget {
composing?: boolean;