2021-09-17 00:18:50 +08:00
|
|
|
<template>
|
2022-01-08 19:34:09 +08:00
|
|
|
<div>
|
2022-05-05 22:04:32 +08:00
|
|
|
<el-radio-group v-model="size" label="size control">
|
2022-01-08 19:34:09 +08:00
|
|
|
<el-radio-button label="large">large</el-radio-button>
|
|
|
|
<el-radio-button label="default">default</el-radio-button>
|
|
|
|
<el-radio-button label="small">small</el-radio-button>
|
|
|
|
</el-radio-group>
|
2022-05-05 22:04:32 +08:00
|
|
|
<el-radio-group v-model="labelPosition" label="position control">
|
2022-01-08 19:34:09 +08:00
|
|
|
<el-radio-button label="left">Left</el-radio-button>
|
|
|
|
<el-radio-button label="right">Right</el-radio-button>
|
|
|
|
<el-radio-button label="top">Top</el-radio-button>
|
2021-12-12 17:54:21 +08:00
|
|
|
</el-radio-group>
|
|
|
|
</div>
|
|
|
|
<br />
|
2022-01-08 19:34:09 +08:00
|
|
|
<el-form
|
|
|
|
ref="form"
|
|
|
|
:model="sizeForm"
|
|
|
|
label-width="auto"
|
|
|
|
:label-position="labelPosition"
|
|
|
|
:size="size"
|
|
|
|
>
|
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="sizeForm.name" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="Activity zone">
|
|
|
|
<el-select
|
|
|
|
v-model="sizeForm.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="sizeForm.date1"
|
|
|
|
type="date"
|
2022-05-05 22:04:32 +08:00
|
|
|
label="Pick a date"
|
2021-09-17 00:18:50 +08:00
|
|
|
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 class="text-center" :span="1" style="margin: 0 0.5rem">-</el-col>
|
2021-09-17 00:18:50 +08:00
|
|
|
<el-col :span="11">
|
|
|
|
<el-time-picker
|
|
|
|
v-model="sizeForm.date2"
|
2022-05-05 22:04:32 +08:00
|
|
|
label="Pick a time"
|
2021-09-17 00:18:50 +08:00
|
|
|
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="Activity type">
|
|
|
|
<el-checkbox-group v-model="sizeForm.type">
|
2022-03-14 04:16:11 +08:00
|
|
|
<el-checkbox-button label="Online activities" name="type" />
|
|
|
|
<el-checkbox-button label="Promotion activities" name="type" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-checkbox-group>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="Resources">
|
2021-12-12 17:54:21 +08:00
|
|
|
<el-radio-group v-model="sizeForm.resource">
|
2022-03-14 04:16:11 +08:00
|
|
|
<el-radio border label="Sponsor" />
|
|
|
|
<el-radio border label="Venue" />
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-radio-group>
|
|
|
|
</el-form-item>
|
2021-12-15 16:36:49 +08:00
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" @click="onSubmit">Create</el-button>
|
|
|
|
<el-button>Cancel</el-button>
|
|
|
|
</el-form-item>
|
2021-09-17 00:18:50 +08:00
|
|
|
</el-form>
|
|
|
|
</template>
|
|
|
|
|
2021-12-12 17:54:21 +08:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { reactive, ref } from 'vue'
|
|
|
|
|
2021-12-30 14:52:03 +08:00
|
|
|
const size = ref('default')
|
2022-01-08 19:34:09 +08:00
|
|
|
const labelPosition = ref('right')
|
2021-12-12 17:54:21 +08:00
|
|
|
|
|
|
|
const sizeForm = reactive({
|
|
|
|
name: '',
|
|
|
|
region: '',
|
|
|
|
date1: '',
|
|
|
|
date2: '',
|
|
|
|
delivery: false,
|
|
|
|
type: [],
|
|
|
|
resource: '',
|
|
|
|
desc: '',
|
|
|
|
})
|
|
|
|
|
|
|
|
function onSubmit() {
|
|
|
|
console.log('submit!')
|
2021-09-17 00:18:50 +08:00
|
|
|
}
|
|
|
|
</script>
|
2022-01-08 19:34:09 +08:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.el-radio-group {
|
|
|
|
margin-right: 12px;
|
|
|
|
}
|
|
|
|
</style>
|