<!-- 钻石计算器 -->
<template>
    <app-drawer title="计算器" :width="860" v-model:show="show">
        <el-form ref="formRef" label-width="70px">
            <el-form-item label="形状">
                <el-radio-group>
                    <el-radio :label="1">圆形</el-radio>
                    <el-radio :label="2">异形</el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="颜色">
                <el-radio-group>
                    <el-radio :label="item" v-for="(item, index) in colors" :key="index">
                        {{ item }}
                    </el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="净度">
                <el-radio-group>
                    <el-radio :label="item" v-for="(item, index) in claritys" :key="index">
                        {{ item }}
                    </el-radio>
                </el-radio-group>
            </el-form-item>
            <el-form-item label="重量" style="width:50%">
                <el-input type="number" placeholder="请输入">
                    <template #append>(克拉)</template>
                </el-input>
            </el-form-item>
            <el-form-item label="汇率" style="width:50%">
                <el-input type="number" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="折扣(%)" style="width:50%">
                <el-input type="number" placeholder="请输入">
                    <template #prepend>
                        <el-select style="width: 90px">
                            <el-option label="+" value="1" />
                            <el-option label="-" value="2" />
                        </el-select>
                    </template>
                </el-input>
            </el-form-item>
            <el-form-item label="美元">
                <span>100</span>
            </el-form-item>
            <el-form-item label="人民币">
                <span>100</span>
            </el-form-item>
            <el-form-item label="日期">
                <span>2022-07-29</span>
            </el-form-item>
            <el-form-item>
                <el-button type="primary">计算</el-button>
                <el-button>取消</el-button>
            </el-form-item>
        </el-form>
    </app-drawer>
</template>

<script lang="ts" setup>
import { shallowRef } from 'vue'
import type { FormInstance } from 'element-plus'
import AppDrawer from '@pc/components/base/drawer/index.vue'

const show = shallowRef(true)
const colors = ['D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N']
const claritys = ['IF', 'VVS1', 'VVS2', 'VS1', 'VS2', 'SI1', 'SI2', 'SI3', 'I1', 'I2', 'I3']
const formRef = shallowRef<FormInstance>()
</script>