注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > 天猫精灵IoT开放平台

Alert 提示

更新时间:2019/01/29 访问次数:1241

参数


参数 说明 类型 可选值 默认值
title 标题文字 string —— ——
text 内容文字 string —— ——
button 按钮文字 string —— 确定
onConfirm 确定回调 function —— ——

使用示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<template>
  <div>
    <button @click="showAlert">点击显示 Alert</button>
  </div>
</template>
 
<script>
import Vue from "vue";
import { Alert } from "genie-ui";
 
Vue.use(Alert);
 
export default {
  methods: {
    showAlert() {
      this.$alert({
        text: "这里是alert的内容",
        title: "我是alert",
        button: "确定",
        onConfirm() {
          console.warn('我是confirm的callback!')
        }
      });
    }
  }
};
</script>

FAQ

关于此文档暂时还没有FAQ
返回
顶部