mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-05 05:29:01 +08:00
9be58078d2
* feat(demo): A-B * feat(demo): update B-checkbox * feat(demo): update CheckBox -DatePicker * feat(demo): update DatePicker - Form * feat(demo): update Form - List * feat(demo): update List-pagination * feat(demo): update List - skeleton * feat(demo): update skeleton - switch * feat(demo): update skeleton - switch * feat(demo): update switch - upload * feat(demo): update watermark * fix(demo): del hashId
33 lines
618 B
Vue
33 lines
618 B
Vue
<docs>
|
|
---
|
|
order: 6
|
|
title:
|
|
zh-CN: 动态数据
|
|
en-US: Dynamic
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
动态加载数据。
|
|
|
|
## en-US
|
|
Load dynamically.
|
|
</docs>
|
|
<template>
|
|
<a-segmented v-model:value="value" :options="data"></a-segmented>
|
|
<br />
|
|
<br />
|
|
<a-button type="primary" :disabled="isDisabled" @click="loadMore">Load More</a-button>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { reactive, ref } from 'vue';
|
|
const data = reactive(['Daily', 'Weekly', 'Monthly']);
|
|
const isDisabled = ref(false);
|
|
const loadMore = () => {
|
|
data.push(...['Quarterly', 'Yearly']);
|
|
isDisabled.value = true;
|
|
};
|
|
const value = ref(data[0]);
|
|
</script>
|