feat:新增全局属性配置
This commit is contained in:
parent
b550c3e541
commit
6f68cc58d3
@ -17,7 +17,7 @@
|
|||||||
</CollapseItem>
|
</CollapseItem>
|
||||||
|
|
||||||
<CollapseItem name="X轴">
|
<CollapseItem name="X轴">
|
||||||
<SettingItemBox name="文本">
|
<SettingItemBox name="名称">
|
||||||
<SettingItem name="颜色">
|
<SettingItem name="颜色">
|
||||||
<n-color-picker
|
<n-color-picker
|
||||||
size="small"
|
size="small"
|
||||||
@ -25,6 +25,19 @@
|
|||||||
/>
|
/>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
|
<SettingItemBox name="标签">
|
||||||
|
<SettingItem name="展示">
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="xAxis.axisLabel.show" size="small" />
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
|
<SettingItem name="颜色">
|
||||||
|
<n-color-picker
|
||||||
|
size="small"
|
||||||
|
v-model:value="xAxis.axisLabel.color"
|
||||||
|
/>
|
||||||
|
</SettingItem>
|
||||||
|
</SettingItemBox>
|
||||||
<SettingItemBox name="轴线">
|
<SettingItemBox name="轴线">
|
||||||
<SettingItem name="颜色">
|
<SettingItem name="颜色">
|
||||||
<n-color-picker
|
<n-color-picker
|
||||||
@ -45,6 +58,20 @@
|
|||||||
</n-space>
|
</n-space>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
|
<SettingItemBox name="刻度">
|
||||||
|
<SettingItem name="展示">
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="xAxis.axisTick.show" size="small" />
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
|
<SettingItem name="长度">
|
||||||
|
<n-input-number
|
||||||
|
v-model:value="xAxis.axisTick.length"
|
||||||
|
:min="1"
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
</SettingItem>
|
||||||
|
</SettingItemBox>
|
||||||
<SettingItemBox name="分割线">
|
<SettingItemBox name="分割线">
|
||||||
<SettingItem name="颜色">
|
<SettingItem name="颜色">
|
||||||
<n-color-picker
|
<n-color-picker
|
||||||
@ -62,19 +89,40 @@
|
|||||||
<SettingItem name="类型">
|
<SettingItem name="类型">
|
||||||
<n-select v-model:value="xAxis.splitLine.lineStyle.type" size="small" :options="axisConf.splitLint.lineStyle.type" />
|
<n-select v-model:value="xAxis.splitLine.lineStyle.type" size="small" :options="axisConf.splitLint.lineStyle.type" />
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem name="位置">
|
||||||
|
<n-select v-model:value="xAxis.position" size="small" :options="axisConf.xposition" />
|
||||||
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
</CollapseItem>
|
</CollapseItem>
|
||||||
|
|
||||||
<CollapseItem name="Y轴">
|
<CollapseItem name="Y轴">
|
||||||
<SettingItemBox name="文本">
|
<SettingItemBox name="名称">
|
||||||
<SettingItem name="颜色">
|
<SettingItem name="颜色">
|
||||||
<n-color-picker
|
<n-color-picker
|
||||||
size="small"
|
size="small"
|
||||||
v-model:value="yAxis.nameTextStyle.color"
|
v-model:value="yAxis.nameTextStyle.color"
|
||||||
/>
|
/>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
</SettingItemBox>
|
||||||
|
<SettingItemBox name="标签">
|
||||||
|
<SettingItem name="展示">
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="yAxis.axisLabel.show" size="small" />
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
|
<SettingItem name="颜色">
|
||||||
|
<n-color-picker
|
||||||
|
size="small"
|
||||||
|
v-model:value="yAxis.axisLabel.color"
|
||||||
|
/>
|
||||||
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
<SettingItemBox name="轴线">
|
<SettingItemBox name="轴线">
|
||||||
|
<SettingItem name="展示">
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="yAxis.axisLine.show" size="small" />
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
<SettingItem name="颜色">
|
<SettingItem name="颜色">
|
||||||
<n-color-picker
|
<n-color-picker
|
||||||
v-model:value="yAxis.axisLine.lineStyle.color"
|
v-model:value="yAxis.axisLine.lineStyle.color"
|
||||||
@ -94,6 +142,20 @@
|
|||||||
</n-space>
|
</n-space>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
|
<SettingItemBox name="刻度">
|
||||||
|
<SettingItem name="展示">
|
||||||
|
<n-space>
|
||||||
|
<n-switch v-model:value="yAxis.axisTick.show" size="small" />
|
||||||
|
</n-space>
|
||||||
|
</SettingItem>
|
||||||
|
<SettingItem name="长度">
|
||||||
|
<n-input-number
|
||||||
|
v-model:value="yAxis.axisTick.length"
|
||||||
|
:min="1"
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
</SettingItem>
|
||||||
|
</SettingItemBox>
|
||||||
<SettingItemBox name="分割线">
|
<SettingItemBox name="分割线">
|
||||||
<SettingItem name="颜色">
|
<SettingItem name="颜色">
|
||||||
<n-color-picker
|
<n-color-picker
|
||||||
@ -111,6 +173,9 @@
|
|||||||
<SettingItem name="类型">
|
<SettingItem name="类型">
|
||||||
<n-select v-model:value="yAxis.splitLine.lineStyle.type" size="small" :options="axisConf.splitLint.lineStyle.type" />
|
<n-select v-model:value="yAxis.splitLine.lineStyle.type" size="small" :options="axisConf.splitLint.lineStyle.type" />
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem name="位置">
|
||||||
|
<n-select v-model:value="yAxis.position" size="small" :options="axisConf.yposition" />
|
||||||
|
</SettingItem>
|
||||||
</SettingItemBox>
|
</SettingItemBox>
|
||||||
</CollapseItem>
|
</CollapseItem>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ defineProps({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$leftWidth: 80px;
|
$leftWidth: 60px;
|
||||||
@include go('config-item-box') {
|
@include go('config-item-box') {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1,4 +1,24 @@
|
|||||||
export const axisConf = {
|
export const axisConf = {
|
||||||
|
xposition: [
|
||||||
|
{
|
||||||
|
label: 'top',
|
||||||
|
value: 'top'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'bottom',
|
||||||
|
value: 'bottom'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
yposition: [
|
||||||
|
{
|
||||||
|
label: 'left',
|
||||||
|
value: 'left'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'right',
|
||||||
|
value: 'right'
|
||||||
|
}
|
||||||
|
],
|
||||||
splitLint: {
|
splitLint: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
type: [
|
type: [
|
||||||
|
@ -11,13 +11,23 @@
|
|||||||
"nameTextStyle": {
|
"nameTextStyle": {
|
||||||
"color": "#B9B8CE"
|
"color": "#B9B8CE"
|
||||||
},
|
},
|
||||||
|
"axisLabel": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#B9B8CE"
|
||||||
|
},
|
||||||
|
"position": "bottom",
|
||||||
"axisLine": {
|
"axisLine": {
|
||||||
|
"show": true,
|
||||||
"lineStyle": {
|
"lineStyle": {
|
||||||
"color": "#B9B8CE",
|
"color": "#B9B8CE",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"onZero": true
|
"onZero": true
|
||||||
},
|
},
|
||||||
|
"axisTick": {
|
||||||
|
"show": true,
|
||||||
|
"length": 5
|
||||||
|
},
|
||||||
"splitLine": {
|
"splitLine": {
|
||||||
"lineStyle": {
|
"lineStyle": {
|
||||||
"color": "#484753",
|
"color": "#484753",
|
||||||
@ -30,13 +40,23 @@
|
|||||||
"nameTextStyle": {
|
"nameTextStyle": {
|
||||||
"color": "#B9B8CE"
|
"color": "#B9B8CE"
|
||||||
},
|
},
|
||||||
|
"axisLabel": {
|
||||||
|
"show": true,
|
||||||
|
"color": "#B9B8CE"
|
||||||
|
},
|
||||||
|
"position": "left",
|
||||||
"axisLine": {
|
"axisLine": {
|
||||||
|
"show": true,
|
||||||
"lineStyle": {
|
"lineStyle": {
|
||||||
"color": "#B9B8CE",
|
"color": "#B9B8CE",
|
||||||
"width": 1
|
"width": 1
|
||||||
},
|
},
|
||||||
"onZero": true
|
"onZero": true
|
||||||
},
|
},
|
||||||
|
"axisTick": {
|
||||||
|
"show": true,
|
||||||
|
"length": 5
|
||||||
|
},
|
||||||
"splitLine": {
|
"splitLine": {
|
||||||
"lineStyle": {
|
"lineStyle": {
|
||||||
"color": "#484753",
|
"color": "#484753",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user