tiny-vue_version0/examples/sites/demos/pc/app/text-popup/clear-value-composition-api...

20 lines
413 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div>
<div>value {{ value }}</div>
<br />
<tiny-button @click="click">点击清除</tiny-button>
<tiny-text-popup v-model="value"></tiny-text-popup>
</div>
</template>
<script setup lang="jsx">
import { ref } from 'vue'
import { TextPopup as TinyTextPopup, Button as TinyButton } from '@opentiny/vue'
const value = ref('')
function click() {
value.value = ''
}
</script>