mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
1000 B
1000 B
Event
<n-space vertical align="stretch">
<n-input
v-model:value="value"
@blur="handleBlur"
@focus="handleFocus"
@change="handleChange"
@keyup="handleKeyUp"
@input="handleInput"
placeholder="Operate to trigger events"
/>
<n-input
v-model:value="value"
type="textarea"
@blur="handleBlur"
@focus="handleFocus"
@change="handleChange"
@keyup="handleKeyUp"
@input="handleInput"
placeholder="Operate to trigger events"
/>
</n-space>
export default {
inject: ['message'],
data () {
return {
value: null,
pair: null
}
},
methods: {
handleFocus() {
this.message.info("[Event focus]")
},
handleBlur() {
this.message.info("[Event blur]")
},
handleChange(v) {
this.message.info("[Event change]" + v)
},
handleKeyUp(e) {
this.message.info("[Event keyup]")
},
handleInput(v) {
this.message.info("[Event input] " + v)
}
}
}