2021-09-17 00:18:50 +08:00
|
|
|
<template>
|
2022-03-06 22:20:56 +08:00
|
|
|
<el-form :model="form" label-width="120px">
|
2021-09-17 00:18:50 +08:00
|
|
|
<el-form-item label="Activity name">
|
2022-03-14 04:16:11 +08:00
|
|
|
<el-input v-model="form.name" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="Activity zone">
|
|
|
|
<el-select v-model="form.region" placeholder="please select your zone">
|
2022-03-14 04:16:11 +08:00
|
|
|
<el-option label="Zone one" value="shanghai" />
|
|
|
|
<el-option label="Zone two" value="beijing" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="Activity time">
|
|
|
|
<el-col :span="11">
|
|
|
|
<el-date-picker
|
|
|
|
v-model="form.date1"
|
|
|
|
type="date"
|
|
|
|
placeholder="Pick a date"
|
|
|
|
style="width: 100%"
|
2022-03-14 04:16:11 +08:00
|
|
|
/>
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-col>
|
2021-12-15 17:32:09 +08:00
|
|
|
<el-col :span="2" class="text-center">
|
|
|
|
<span class="text-gray-500">-</span>
|
2021-12-15 16:36:49 +08:00
|
|
|
</el-col>
|
2021-09-17 00:18:50 +08:00
|
|
|
<el-col :span="11">
|
|
|
|
<el-time-picker
|
|
|
|
v-model="form.date2"
|
|
|
|
placeholder="Pick a time"
|
|
|
|
style="width: 100%"
|
2022-03-14 04:16:11 +08:00
|
|
|
/>
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-col>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="Instant delivery">
|
2022-03-14 04:16:11 +08:00
|
|
|
<el-switch v-model="form.delivery" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="Activity type">
|
|
|
|
<el-checkbox-group v-model="form.type">
|
2022-03-14 04:16:11 +08:00
|
|
|
<el-checkbox label="Online activities" name="type" />
|
|
|
|
<el-checkbox label="Promotion activities" name="type" />
|
|
|
|
<el-checkbox label="Offline activities" name="type" />
|
|
|
|
<el-checkbox label="Simple brand exposure" name="type" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-checkbox-group>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="Resources">
|
|
|
|
<el-radio-group v-model="form.resource">
|
2022-03-14 04:16:11 +08:00
|
|
|
<el-radio label="Sponsor" />
|
|
|
|
<el-radio label="Venue" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="Activity form">
|
2022-03-14 04:16:11 +08:00
|
|
|
<el-input v-model="form.desc" type="textarea" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" @click="onSubmit">Create</el-button>
|
|
|
|
<el-button>Cancel</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</template>
|
|
|
|
|
2021-12-15 16:36:49 +08:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { reactive } from 'vue'
|
|
|
|
|
|
|
|
// do not use same name with ref
|
|
|
|
const form = reactive({
|
|
|
|
name: '',
|
|
|
|
region: '',
|
|
|
|
date1: '',
|
|
|
|
date2: '',
|
|
|
|
delivery: false,
|
|
|
|
type: [],
|
|
|
|
resource: '',
|
|
|
|
desc: '',
|
|
|
|
})
|
|
|
|
|
|
|
|
const onSubmit = () => {
|
|
|
|
console.log('submit!')
|
2021-09-17 00:18:50 +08:00
|
|
|
}
|
|
|
|
</script>
|