chore: remove object spead (#8514)

This commit is contained in:
neverland
2021-04-12 20:57:24 +08:00
committed by GitHub
parent 0b764b6347
commit 9deca34d1d
41 changed files with 204 additions and 241 deletions

View File

@@ -3,6 +3,7 @@ import { ref, PropType, defineComponent } from 'vue';
// Utils
import {
pick,
extend,
createNamespace,
preventDefault,
ComponentInstance,
@@ -22,8 +23,7 @@ export type SearchShape = 'square' | 'round';
export default defineComponent({
name,
props: {
...fieldProps,
props: extend({}, fieldProps, {
label: String,
actionText: String,
background: String,
@@ -40,7 +40,7 @@ export default defineComponent({
type: String,
default: 'search',
},
},
}),
emits: ['search', 'cancel', 'update:modelValue'],
@@ -96,10 +96,7 @@ export default defineComponent({
>;
const renderField = () => {
const fieldAttrs = {
...attrs,
...pick(props, fieldPropNames),
};
const fieldAttrs = extend({}, attrs, pick(props, fieldPropNames));
const onInput = (value: string) => emit('update:modelValue', value);