Skip to content

vue技术栈

在vitepress中,用vue语法包装

使用组件

这是一个开关组件:

这是顶条组件

示例代码:

<axue-switch></axue-switch>
<axue-logo-close></axue-logo-close>

使用 API 函数

示例代码:

html
<div>  
    <button @click="showToast" style="border:1px solid #999;margin:10px;padding:10px;"> 显示Toast </button>  
    <button @click="showTip"  style="border:1px solid #999;margin:10px;padding:10px;"> 显示Tip </button>  
</div>

<script setup>
    import {init} from "axue"
    init()    //如果全局初始化过了,这里可以省略
	console.log("页面加载setup")
    function showTip() {
      axueAPI.showTip.send('这是一个Tip消息')
    }
    function showToast() {
        let args={
            title: "axue欢迎你!",  
            confirmText:"知道了",
            onConfirm:function (){
                console.log("用户点击确认按钮")
                axueAPI.showToast.close()       //主动关闭弹框
            } ,  
         }
      axueAPI.showToast.send(args)
    }
</script>

青锋三尺,樵夫十年