config.vue 1.07 KB
<template>
  <CollapseItem name="日期时间配置" :expanded="true">
    <SettingItemBox name="属性">
      <SettingItem name="是否支持清除">
        <n-switch v-model:value="optionData.attribute.clearable" />
      </SettingItem>
      <SettingItem name="是否禁用">
        <n-switch v-model:value="optionData.attribute.disabled" />
      </SettingItem>
      <SettingItem name="尺寸">
        <n-select v-model:value="optionData.attribute.size" :options="options" />
      </SettingItem>
    </SettingItemBox>
  </CollapseItem>
</template>

<script setup lang="ts">
import { PropType } from 'vue'
import { option } from './config'
import { CollapseItem, SettingItemBox, SettingItem } from '@/components/Pages/ChartItemSetting'

defineProps({
  optionData: {
    type: Object as PropType<typeof option>,
    required: true
  }
})

const options=[
        {
          label: "小型",
          value: 'small',
        },
        {
          label: '中等',
          value: 'medium'
        },
        {
          label: '大型',
          value: 'large'
        },
]
</script>