build(projects): update tsconfig、eslintrc

This commit is contained in:
Soybean
2022-03-12 16:21:40 +08:00
parent 4093dcd6dc
commit 75de2b0604
131 changed files with 1174 additions and 1140 deletions

View File

@ -43,43 +43,43 @@ const timelines: TimelineData[] = [
{ type: 'success', title: '成功', content: '哪里成功', time: '2021-10-10 20:46' },
{ type: 'error', title: '错误', content: '哪里错误', time: '2021-10-10 20:46' },
{ type: 'warning', title: '警告', content: '哪里警告', time: '2021-10-10 20:46' },
{ type: 'info', title: '信息', content: '是的', time: '2021-10-10 20:46' }
{ type: 'info', title: '信息', content: '是的', time: '2021-10-10 20:46' },
];
const columns = [
{
title: 'Name',
key: 'name'
key: 'name',
},
{
title: 'Age',
key: 'age'
key: 'age',
},
{
title: 'Address',
key: 'address'
key: 'address',
},
{
title: 'Tags',
key: 'tags',
render(row: TableData) {
const tags = row.tags.map(tagKey => {
const tags = row.tags.map((tagKey) => {
return h(
NTag,
{
style: {
marginRight: '6px'
marginRight: '6px',
},
type: 'info'
type: 'info',
},
{
default: () => tagKey
default: () => tagKey,
}
);
});
return tags;
}
}
},
},
];
const tableData: TableData[] = [
@ -88,50 +88,50 @@ const tableData: TableData[] = [
name: 'John Brown',
age: 32,
address: 'New York No. 1 Lake Park',
tags: ['nice', 'developer']
tags: ['nice', 'developer'],
},
{
key: 1,
name: 'Jim Green',
age: 42,
address: 'London No. 1 Lake Park',
tags: ['wow']
tags: ['wow'],
},
{
key: 2,
name: 'Joe Black',
age: 32,
address: 'Sidney No. 1 Lake Park',
tags: ['cool', 'teacher']
tags: ['cool', 'teacher'],
},
{
key: 3,
name: 'Soybean',
age: 25,
address: 'China Shenzhen',
tags: ['handsome', 'programmer']
tags: ['handsome', 'programmer'],
},
{
key: 4,
name: 'John Brown',
age: 32,
address: 'New York No. 1 Lake Park',
tags: ['nice', 'developer']
tags: ['nice', 'developer'],
},
{
key: 5,
name: 'Jim Green',
age: 42,
address: 'London No. 1 Lake Park',
tags: ['wow']
tags: ['wow'],
},
{
key: 6,
name: 'Joe Black',
age: 32,
address: 'Sidney No. 1 Lake Park',
tags: ['cool', 'teacher']
}
tags: ['cool', 'teacher'],
},
];
</script>
<style scoped></style>

View File

@ -16,7 +16,7 @@ interface Props {
const props = withDefaults(defineProps<Props>(), {
startColor: '#56cdf3',
endColor: '#719de3'
endColor: '#719de3',
});
const gradientStyle = computed(() => `linear-gradient(to bottom right, ${props.startColor}, ${props.endColor})`);

View File

@ -38,7 +38,7 @@ const cardData: CardData[] = [
value: 1000000,
unit: '',
colors: ['#ec4786', '#b955a4'],
icon: 'ant-design:bar-chart-outlined'
icon: 'ant-design:bar-chart-outlined',
},
{
id: 'amount',
@ -46,7 +46,7 @@ const cardData: CardData[] = [
value: 234567.89,
unit: '$',
colors: ['#865ec0', '#5144b4'],
icon: 'ant-design:money-collect-outlined'
icon: 'ant-design:money-collect-outlined',
},
{
id: 'download',
@ -54,7 +54,7 @@ const cardData: CardData[] = [
value: 666666,
unit: '',
colors: ['#56cdf3', '#719de3'],
icon: 'carbon:document-download'
icon: 'carbon:document-download',
},
{
id: 'trade',
@ -62,8 +62,8 @@ const cardData: CardData[] = [
value: 999999,
unit: '',
colors: ['#fcbc25', '#f68057'],
icon: 'ant-design:trademark-circle-outlined'
}
icon: 'ant-design:trademark-circle-outlined',
},
];
</script>
<style scoped></style>

View File

@ -50,54 +50,55 @@ function renderLineChart() {
yField: 'value',
seriesField: 'type',
lineStyle: {
lineWidth: 4
lineWidth: 4,
},
area: {
style: {
fill: 'l(270) 0:#ffffff 0.5:#7ec2f3 1:#1890ff'
}
fill: 'l(270) 0:#ffffff 0.5:#7ec2f3 1:#1890ff',
},
},
smooth: true,
animation: {
appear: {
animation: 'wave-in',
duration: 2000
}
}
duration: 2000,
},
},
});
line.value.render();
}
function renderPieChart() {
const data = [
if (!pieRef.value) return;
const pieData = [
{ type: '学习', value: 20 },
{ type: '娱乐', value: 10 },
{ type: '工作', value: 30 },
{ type: '休息', value: 40 }
{ type: '休息', value: 40 },
];
pie.value = new Pie(pieRef.value!, {
pie.value = new Pie(pieRef.value, {
appendPadding: 10,
data,
data: pieData,
angleField: 'value',
colorField: 'type',
radius: 0.8,
innerRadius: 0.65,
meta: {
value: {
formatter: v => `${v}%`
}
formatter: (v) => `${v}%`,
},
},
label: {
type: 'inner',
autoRotate: false,
formatter: ({ percent }) => `${(percent * 100).toFixed(0)}%`
formatter: ({ percent }) => `${(percent * 100).toFixed(0)}%`,
},
statistic: undefined,
pieStyle: {
radius: [20]
radius: [20],
},
color: ['#025DF4', '#DB6BCF', '#2498D1', '#FF745A', '#007E99', '#FFA8A8', '#2391FF'],
legend: {
position: 'bottom'
position: 'bottom',
},
interactions: [
{ type: 'element-selected' },
@ -107,15 +108,15 @@ function renderPieChart() {
cfg: {
start: [
{ trigger: 'element:mouseenter', action: 'pie-statistic:change' },
{ trigger: 'legend-item:mouseenter', action: 'pie-statistic:change' }
{ trigger: 'legend-item:mouseenter', action: 'pie-statistic:change' },
],
end: [
{ trigger: 'element:mouseleave', action: 'pie-statistic:reset' },
{ trigger: 'legend-item:mouseleave', action: 'pie-statistic:reset' }
]
}
}
]
{ trigger: 'legend-item:mouseleave', action: 'pie-statistic:reset' },
],
},
},
],
});
pie.value.render();