perf(button): 新增 loading 属性, 支持加载状态
This commit is contained in:
@@ -199,6 +199,32 @@ export default {
|
||||
|
||||
:::
|
||||
|
||||
::: demo 传入 columns 数据,自动生成表格
|
||||
|
||||
<template>
|
||||
<lay-button-container>
|
||||
<lay-button type="default" :loading="loading">加载</lay-button>
|
||||
<lay-switch v-model="loading"></lay-switch>
|
||||
</lay-button-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ref } from 'vue'
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const loading = ref(true)
|
||||
|
||||
return {
|
||||
loading
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
:::
|
||||
|
||||
| Name | Description | Accepted Values |
|
||||
| ------ | ------ | --------------------------------------------- |
|
||||
| type | 主题 | `primary` `normal` `warm` `danger` `disabled` |
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
::: demo
|
||||
|
||||
<template>
|
||||
<lay-carousel>
|
||||
<lay-carousel-item>条目一</lay-carousel-item>
|
||||
<lay-carousel-item>条目二</lay-carousel-item>
|
||||
<lay-carousel-item>条目三</lay-carousel-item>
|
||||
<lay-carousel-item>条目四</lay-carousel-item>
|
||||
<lay-carousel v-model="active">
|
||||
<lay-carousel-item id="1">条目一</lay-carousel-item>
|
||||
<lay-carousel-item id="2">条目二</lay-carousel-item>
|
||||
<lay-carousel-item id="3">条目三</lay-carousel-item>
|
||||
<lay-carousel-item id="4">条目四</lay-carousel-item>
|
||||
</lay-carousel>
|
||||
</template>
|
||||
|
||||
@@ -15,7 +15,10 @@ import { ref } from 'vue'
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
const active = ref("1")
|
||||
|
||||
return {
|
||||
active
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user