ant-design-vue/components/segmented/demo/disabled.vue

49 lines
839 B
Vue
Raw Normal View History

2023-02-18 08:16:44 +00:00
<docs>
---
order: 3
title:
zh-CN: 不可用
en-US: Disabled
---
## zh-CN
Segmented 不可用
## en-US
Disabled Segmented.
</docs>
<template>
<div>
2023-02-19 16:05:54 +00:00
<a-segmented v-model:value="value" disabled :options="data" />
2023-02-18 08:16:44 +00:00
<br />
<br />
2023-02-19 16:05:54 +00:00
<a-segmented v-model:value="value2" :options="data2" />
2023-02-18 08:16:44 +00:00
</div>
</template>
<script lang="ts">
2023-02-19 16:05:54 +00:00
import { defineComponent, reactive, ref } from 'vue';
2023-02-18 08:16:44 +00:00
export default defineComponent({
setup() {
const data = reactive(['Map', 'Transit', 'Satellite']);
const data2 = reactive([
'Daily',
{ value: 'Weekly', disabled: true },
'Monthly',
{ value: 'Quarterly', disabled: true },
'Yearly',
]);
2023-02-19 16:05:54 +00:00
const value = ref(data[0]);
const value2 = ref('Daily');
2023-02-18 08:16:44 +00:00
return {
data,
data2,
2023-02-19 16:05:54 +00:00
value,
value2,
2023-02-18 08:16:44 +00:00
};
},
});
</script>