u
This commit is contained in:
1 parent
e99a9fb274
commit
0be0b0767a
788 files changed
+112023
-14941
No files matched your search
@@ -1,18 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
// 不传 modelValue 即非受控:组件内部维护选中值,只通过 change 通知
|
||||
import { ref } from 'vue'
|
||||
// 不传 modelValue 即非受控:组件内部维护选中值
|
||||
import { G3Segmented } from '@g3soft/ui'
|
||||
|
||||
const current = ref('hot')
|
||||
|
||||
function onChange(value: string | number | boolean) {
|
||||
current.value = String(value)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<G3Segmented :options="['hot', 'new', 'top']" @change="onChange" />
|
||||
<p style="margin: 8px 0 0; font-size: 13px; color: #6b7280">change 收到:{{ current }}</p>
|
||||
</div>
|
||||
<G3Segmented :options="['hot', 'new', 'top']" />
|
||||
</template>
|
||||
Reference in new issue
Block a user