jinjianback1.1/src/views/page/form.vue

80 lines
2.4 KiB
Vue
Raw Normal View History

2017-06-26 18:45:30 +08:00
<template>
2017-08-30 17:42:06 +08:00
<div class="app-container">
2017-09-15 13:45:09 +08:00
<el-form ref="form" :model="form" label-width="120px">
<el-form-item label="Activity name">
2017-08-30 17:42:06 +08:00
<el-input v-model="form.name"></el-input>
</el-form-item>
2017-09-15 13:45:09 +08:00
<el-form-item label="Activity zone">
<el-select v-model="form.region" placeholder="please select your zone">
<el-option label="Zone one" value="shanghai"></el-option>
<el-option label="Zone two" value="beijing"></el-option>
2017-08-30 17:42:06 +08:00
</el-select>
</el-form-item>
2017-09-15 13:45:09 +08:00
<el-form-item label="Activity time">
2017-08-30 17:42:06 +08:00
<el-col :span="11">
2017-09-15 13:45:09 +08:00
<el-date-picker type="date" placeholder="Pick a date" v-model="form.date1" style="width: 100%;"></el-date-picker>
2017-08-30 17:42:06 +08:00
</el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11">
2017-09-15 13:45:09 +08:00
<el-time-picker type="fixed-time" placeholder="Pick a time" v-model="form.date2" style="width: 100%;"></el-time-picker>
2017-08-30 17:42:06 +08:00
</el-col>
</el-form-item>
2017-09-15 13:45:09 +08:00
<el-form-item label="Instant delivery">
2017-11-24 13:50:31 +08:00
<el-switch v-model="form.delivery"></el-switch>
2017-08-30 17:42:06 +08:00
</el-form-item>
2017-09-15 13:45:09 +08:00
<el-form-item label="Activity type">
2017-08-30 17:42:06 +08:00
<el-checkbox-group v-model="form.type">
2017-09-15 13:45:09 +08:00
<el-checkbox label="Online activities" name="type"></el-checkbox>
<el-checkbox label="Promotion activities" name="type"></el-checkbox>
<el-checkbox label="Offline activities" name="type"></el-checkbox>
<el-checkbox label="Simple brand exposure" name="type"></el-checkbox>
2017-08-30 17:42:06 +08:00
</el-checkbox-group>
</el-form-item>
2017-09-15 13:45:09 +08:00
<el-form-item label="Resources">
2017-08-30 17:42:06 +08:00
<el-radio-group v-model="form.resource">
2017-09-15 13:45:09 +08:00
<el-radio label="Sponsor"></el-radio>
<el-radio label="Venue"></el-radio>
2017-08-30 17:42:06 +08:00
</el-radio-group>
</el-form-item>
2017-09-15 13:45:09 +08:00
<el-form-item label="Activity form">
2017-08-30 17:42:06 +08:00
<el-input type="textarea" v-model="form.desc"></el-input>
</el-form-item>
<el-form-item>
2017-09-15 13:45:09 +08:00
<el-button type="primary" @click="onSubmit">Create</el-button>
<el-button>Cancel</el-button>
2017-08-30 17:42:06 +08:00
</el-form-item>
</el-form>
</div>
2017-06-26 18:45:30 +08:00
</template>
<script>
2017-08-30 17:42:06 +08:00
export default {
data() {
return {
form: {
name: '',
region: '',
date1: '',
date2: '',
delivery: false,
type: [],
resource: '',
desc: ''
2017-06-26 18:45:30 +08:00
}
}
2017-08-30 17:42:06 +08:00
},
methods: {
onSubmit() {
2017-09-15 13:45:09 +08:00
this.$message('submit!')
2017-08-30 17:42:06 +08:00
}
2017-06-26 18:45:30 +08:00
}
2017-08-30 17:42:06 +08:00
}
2017-06-26 18:45:30 +08:00
</script>
2017-11-24 13:50:31 +08:00
<style scoped>
.line{
text-align: center;
}
</style>