config.vue 1.12 KB
<template>
  <collapse-item :name="t('information.treeConfig')" :expanded="true">
    <setting-item-box :name="t('information.accordion')">
      <setting-item :name="t('common.isEnabled')">
        <n-switch v-model:value="optionData.treeConfig.accordion" />
      </setting-item>
    </setting-item-box>
    <setting-item-box :name="t('information.selectionBox')">
      <setting-item :name="t('common.isEnabled')">
        <n-switch v-model:value="optionData.treeConfig.checkable" />
      </setting-item>
    </setting-item-box>
    <setting-item-box :name="t('common.expandText')">
      <setting-item :name="t('common.isEnabled')">
        <n-switch v-model:value="optionData.treeConfig.defaultExpandAll" />
      </setting-item>
    </setting-item-box>
  </collapse-item>
</template>

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

defineProps({
  optionData: {
    type: Object as PropType<typeof option>,
    required: true
  }
})
const t = window['$t']
</script>
<style lang="scss" scoped></style>