mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-28 04:48:56 +08:00
26 lines
616 B
Markdown
26 lines
616 B
Markdown
---
|
|
layout: templateLayout
|
|
---
|
|
```vue
|
|
<template>
|
|
<Wb-switch :confirm="confirm"></Wb-switch>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
methods: {
|
|
confirm() {
|
|
return new Promise((resolve, reject)=>{
|
|
this.$Message({
|
|
title: '警告', // 可以传入文本和domString
|
|
template: '是否切换状态?', // 可以传入文本和domString
|
|
}).then(function (index) {
|
|
if (index == 0) {
|
|
resolve()
|
|
}
|
|
})
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
``` |