Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lhlyu committed Jan 1, 2024
1 parent a701d1c commit 9623620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/booth/useBooth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const useBooth = (name: string = '', zhName: string = '') => {
}

const copyReactCode = async () => {
const value = getName(name, zhName)
const value = toPascalCase(getName(name, zhName))
let fill = option.getFill
fill = typeof fill === 'string' ? fill : `{${JSON.stringify(fill).replaceAll('"', "'")}}`
const reactCode = `<${value} theme="${option.theme}" size="${option.size}" strokeWidth="{${option.strokeWidth}}" strokeLinecap="${option.strokeLinecap}" strokeLinejoin="${option.strokeLinejoin}" fill="${fill}"/>`
Expand All @@ -94,7 +94,7 @@ const useBooth = (name: string = '', zhName: string = '') => {
}

const copyVueCode = async () => {
const value = getName(name, zhName)
const value = toPascalCase(getName(name, zhName))
let fill = option.getFill
if (typeof fill === 'string') {
fill = `fill="${fill}"`
Expand Down

0 comments on commit 9623620

Please sign in to comment.