tiny-vue/examples/docs/resources/pc/demo/checkbox/text.vue

31 lines
620 B
Vue
Raw 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>
<tiny-checkbox v-model="checked" text="复选框" true-label="真文本" false-label="假文本"></tiny-checkbox>
<tiny-button @click="getValue">获取文本</tiny-button>
</div>
</template>
<script lang="jsx">
import { Checkbox, Modal, Button } from '@opentiny/vue'
export default {
components: {
TinyCheckbox: Checkbox,
TinyButton: Button
},
data() {
return {
checked: ''
}
},
methods: {
getValue() {
Modal.message({
message: 'change 事件当前选中的值为:' + this.checked,
status: 'info'
})
}
}
}
</script>