-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: select 组件 on-before-change 配置项增家回调参数
- Loading branch information
Showing
4 changed files
with
13 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,3 @@ | ||
<template> | ||
<f-select v-model="value3" placeholder="请选择……" :on-before-change="onBeforeChange"> | ||
<f-option :value="1">香蕉</f-option> | ||
<f-option :value="2">苹果</f-option> | ||
<f-option :value="3">哈密瓜</f-option> | ||
<f-option :value="4">樱桃</f-option> | ||
</f-select> | ||
</template> | ||
<script lang="ts" setup></script> | ||
|
||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
import { FConfirmBox } from 'fighting-design' | ||
const value3 = ref('') | ||
const onBeforeChange = (): Promise<boolean> => { | ||
return new Promise(resolve => { | ||
FConfirmBox({ | ||
title: '标题', | ||
content: '这是内容', | ||
zIndex: 2000, | ||
onConfirm: () => { | ||
resolve(true) | ||
}, | ||
onCancel: () => { | ||
resolve(false) | ||
} | ||
}) | ||
}) | ||
} | ||
</script> | ||
<template></template> |