SizeSetting.vue
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<template>
<setting-item-box :name="t('common.sizeText')">
<n-input-number
v-model:value="chartAttr.w"
:min="50"
:disabled="isGroup"
size="small"
placeholder="px"
>
<template #prefix>
<n-text depth="3">{{t('common.widthText')}}</n-text>
</template>
</n-input-number>
<n-input-number
v-model:value="chartAttr.h"
:min="50"
:disabled="isGroup"
size="small"
placeholder="px"
>
<template #prefix>
<n-text depth="3">{{ t('common.heightText') }}</n-text>
</template>
</n-input-number>
</setting-item-box>
</template>
<script setup lang="ts">
import { PropType } from 'vue'
import { PickCreateComponentType } from '@/packages/index.d'
import { SettingItemBox } from '@/components/Pages/ChartItemSetting'
const props = defineProps({
chartAttr: {
type: Object as PropType<Omit<PickCreateComponentType<'attr'>, 'node' | 'conNode'>>,
required: true
},
isGroup: {
type: Boolean,
required: false
}
})
const t = window['$t']
</script>