2021-12-30 00:44:43 +08:00
|
|
|
::: anchor
|
|
|
|
:::
|
|
|
|
|
2021-12-07 18:25:49 +08:00
|
|
|
::: title 基础使用
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-button type="primary" @click="openConfirm1">信息框</lay-button>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { layer } from "../../../../src/index.ts"
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const openConfirm1 = function() {
|
2021-12-08 11:54:42 +08:00
|
|
|
layer.confirm("layui-vue 1.0.0 已经发布")
|
2021-12-07 18:25:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
openConfirm1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: title 指定操作
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: demo
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<lay-button type="primary" @click="openConfirm2">询问框</lay-button>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { layer } from "../../../../src/index.ts"
|
|
|
|
|
|
|
|
export default {
|
|
|
|
setup() {
|
|
|
|
|
|
|
|
const openConfirm2 = function() {
|
2021-12-08 11:54:42 +08:00
|
|
|
layer.confirm("你如何看待 layui-vue 的发布", {btn: [{text:'站着看'},{text:'坐着看'}]})
|
2021-12-07 18:25:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return {
|
|
|
|
openConfirm2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2021-12-09 14:11:29 +08:00
|
|
|
:::
|
|
|
|
|
|
|
|
|
|
|
|
::: title 组件方法
|
|
|
|
:::
|
|
|
|
|
|
|
|
```
|
|
|
|
layer.confirm(content, options)
|
|
|
|
```
|
|
|
|
|
|
|
|
::: title 组件属性
|
|
|
|
:::
|
|
|
|
|
|
|
|
::: table
|
|
|
|
|
|
|
|
| 属性 | 描述 | 备注 |
|
|
|
|
| ------------------- | ------ | ---- |
|
|
|
|
| content | 内容 | -- |
|
|
|
|
| options | 选配属性 | { time: 加载时长, btn: 按钮组 } |
|
|
|
|
|
2021-12-16 17:57:59 +08:00
|
|
|
:::
|
|
|
|
|
|
|
|
::: comment
|
2022-01-12 14:19:06 +08:00
|
|
|
:::
|
|
|
|
|
|
|
|
::: previousNext confirm
|
2021-12-07 18:25:49 +08:00
|
|
|
:::
|