读取txt文件
10898 0 38 115
10820 0 38 115
10808 0 40 115
10758 0 40 115
10755 0 40 115
10754 0 40 115
……
将内容组装为数组:
[
{
value: '10898',
color: 'rgba(0,38,115,1)',
},
]
方法(vue2):
filePath: '/data/style.txt',
colorList: [],
读取txt文件
10898 0 38 115
10820 0 38 115
10808 0 40 115
10758 0 40 115
10755 0 40 115
10754 0 40 115
……
将内容组装为数组:
[
{
value: '10898',
color: 'rgba(0,38,115,1)',
},
]
方法(vue2):
filePath: '/data/style.txt',
colorList: [],