添加掌上工厂应用
This commit is contained in:
26
apps/hand-factory/components/klp-ui/k-chart/k-chart.vue
Normal file
26
apps/hand-factory/components/klp-ui/k-chart/k-chart.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<qiun-data-charts :type="type" :chartData="chartData" :opts="opts"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
// 定义接收的属性(替代 Vue3 的 defineProps)
|
||||
props: {
|
||||
// 图表类型(如line、column、pie等)
|
||||
type: {
|
||||
type: String,
|
||||
required: true // 图表类型为必填项
|
||||
},
|
||||
// 图表数据(包含categories和series等)
|
||||
chartData: {
|
||||
type: Object,
|
||||
required: true // 图表数据为必填项
|
||||
},
|
||||
// 图表配置项(如样式、坐标轴设置等)
|
||||
opts: {
|
||||
type: Object,
|
||||
default: () => ({}) // 配置项默认为空对象
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user