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

Alert 提示

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

参数


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

使用示例

<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
返回
顶部