-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 表单的fieldMappingTime支持将格式化掩码设为null以便原值映射,这样可以支持非日期时间类型的组件; * 表单增加modelPropName设置组件的双向绑定属性名,用于支持未提前注册的双向绑定属性为非默认名称的组件。 * 增加一些经常会有人提到的组合字段演示,
- Loading branch information
Showing
8 changed files
with
116 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<script lang="ts" setup> | ||
import { Input, Select } from 'ant-design-vue'; | ||
const emit = defineEmits(['blur', 'change']); | ||
const modelValue = defineModel<[string, string]>({ | ||
default: () => [undefined, undefined], | ||
}); | ||
function onChange() { | ||
emit('change', modelValue.value); | ||
} | ||
</script> | ||
<template> | ||
<div class="flex w-full gap-1"> | ||
<Select | ||
v-model:value="modelValue[0]" | ||
class="w-[80px]" | ||
placeholder="类型" | ||
allow-clear | ||
:class="{ 'valid-success': !!modelValue[0] }" | ||
:options="[ | ||
{ label: '个人', value: 'personal' }, | ||
{ label: '工作', value: 'work' }, | ||
{ label: '私密', value: 'private' }, | ||
]" | ||
@blur="emit('blur')" | ||
@change="onChange" | ||
/> | ||
<Input | ||
placeholder="请输入11位手机号码" | ||
class="flex-1" | ||
allow-clear | ||
:class="{ 'valid-success': modelValue[1]?.match(/^1[3-9]\d{9}$/) }" | ||
v-model:value="modelValue[1]" | ||
:maxlength="11" | ||
type="tel" | ||
@blur="emit('blur')" | ||
@change="onChange" | ||
/> | ||
</div> | ||
</template> |