初始值:helloWorld
转化后
helloWorld
初始值:hello-world
转化后
helloWorld
将命名转换为驼峰命名
import { toCamelCase } from '@pinos-ui/utils'
helloWorld
helloWorld
<template>
<div class="box">
<h4>初始值:helloWorld</h4>
<h4>转化后</h4>
<p>{{ toCamelCase('helloWorld') }}</p>
<h4>初始值:hello-world</h4>
<h4>转化后</h4>
<p>{{ toCamelCase('hello-world') }}</p>
</div>
</template>
<script lang="ts" setup>
import { toCamelCase } from '@pinos-ui/utils'
</script>
参数名 | 说明 | 类型 | 必传 | 默认值 |
---|---|---|---|---|
value | 要转换的值 | string | 是 | - |
export declare function toCamelCase(value: string): string;