57 lines
1.5 KiB
Plaintext
57 lines
1.5 KiB
Plaintext
<div id="app">
|
|
<a-button @@click="handleClick">
|
|
<template #icon>
|
|
<icon-plus />
|
|
</template>
|
|
{{ message }}
|
|
</a-button>
|
|
|
|
<a-form :model="form" :style="{ width: '600px' }" @@submit="handleSubmit">
|
|
<a-form-item field="name" tooltip="Please enter username" label="Username">
|
|
<a-input v-model="form.name"
|
|
placeholder="please enter your username..." />
|
|
</a-form-item>
|
|
<a-form-item field="post" label="Post">
|
|
<a-input v-model="form.post" placeholder="please enter your post..." />
|
|
</a-form-item>
|
|
<a-form-item field="isRead">
|
|
<a-checkbox v-model="form.isRead"> I have read the manual </a-checkbox>
|
|
</a-form-item>
|
|
<a-form-item>
|
|
<a-button html-type="submit">Submit</a-button>
|
|
</a-form-item>
|
|
</a-form>
|
|
{{ form }}
|
|
</div>
|
|
|
|
<script>
|
|
const { createApp } = Vue
|
|
|
|
createApp({
|
|
data() {
|
|
return {
|
|
message: 'Hello Vue!',
|
|
form: {
|
|
name: '',
|
|
post: '',
|
|
isRead: false,
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
handleClick() {
|
|
console.log(1);
|
|
this.$message.info('This is an info message')
|
|
},
|
|
handleSubmit(data) {
|
|
console.log(data);
|
|
this.$message.info('This is an info message')
|
|
}
|
|
}
|
|
})
|
|
.use(ArcoVue)
|
|
.use(ArcoVueIcon)
|
|
.mount('#app')
|
|
|
|
</script>
|