types: add FIeldInstance type (#9166)

This commit is contained in:
neverland
2021-08-02 20:42:27 +08:00
committed by GitHub
parent 5f41cb9bbd
commit ff464c12fa
5 changed files with 87 additions and 38 deletions
+4 -4
View File
@@ -9,7 +9,7 @@ import {
preventDefault,
ComponentInstance,
} from '../utils';
import { fieldProps } from '../field/Field';
import { fieldSharedProps } from '../field/Field';
// Composables
import { useExpose } from '../composables/use-expose';
@@ -24,7 +24,7 @@ export type SearchShape = 'square' | 'round';
export default defineComponent({
name,
props: extend({}, fieldProps, {
props: extend({}, fieldSharedProps, {
label: String,
clearable: truthProp,
actionText: String,
@@ -89,8 +89,8 @@ export default defineComponent({
const blur = () => filedRef.value?.blur();
const focus = () => filedRef.value?.focus();
const fieldPropNames = Object.keys(fieldProps) as Array<
keyof typeof fieldProps
const fieldPropNames = Object.keys(fieldSharedProps) as Array<
keyof typeof fieldSharedProps
>;
const renderField = () => {