21 lines
484 B
Vue
21 lines
484 B
Vue
<script setup lang="ts">
|
||
import { ref } from 'vue'
|
||
import { G3Button } from '@g3soft/ui'
|
||
|
||
const loading = ref(false)
|
||
|
||
function handleAsync() {
|
||
if (loading.value) return
|
||
loading.value = true
|
||
setTimeout(() => {
|
||
loading.value = false
|
||
}, 1500)
|
||
}
|
||
</script>
|
||
|
||
<template>
|
||
<G3Button type="primary" :loading="loading" @click="handleAsync">点击加载</G3Button>
|
||
<G3Button disabled>禁用</G3Button>
|
||
<G3Button type="primary" disabled>禁用(主要)</G3Button>
|
||
</template>
|