Skip to content

Commit

Permalink
style: 解决eslint报错
Browse files Browse the repository at this point in the history
  • Loading branch information
Dive12300 committed Sep 30, 2024
1 parent 91d03e0 commit fa89782
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions scripts/genMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ const ElementPlus = require('element-plus')
const EMPTY_VALUE = "<null>"
const SCRIPT = 'https://npm.onmicrosoft.cn/element-plus@2.4.2/dist/index.full.mjs';

const getName = (str) => {

function isAllEnglishLetters(str) {
// 使用正则表达式检查字符串是否全是英语字母
const regex = /^[A-Za-z]+$/;
return regex.test(str);
}
return str.split(' ').filter((s) => isAllEnglishLetters(s)).join("")
};


function snakeToCamel(str) {
return str
.split('-') // 将字符串按下划线分割
Expand Down Expand Up @@ -477,17 +488,6 @@ function generateJSONFile(jsonData, fileName = 'output.json', filePath = './') {
})
}

const getName = (str) => {

function isAllEnglishLetters(str) {
// 使用正则表达式检查字符串是否全是英语字母
const regex = /^[A-Za-z]+$/;
return regex.test(str);
}
return str.split(' ').filter((s) => isAllEnglishLetters(s)).join("")
};


async function generateComponent(params) {
const components = []

Expand Down

0 comments on commit fa89782

Please sign in to comment.