|
@@ -121,6 +121,7 @@
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
import {ImageApi, ImageDrawReqVO, ImageVO} from '@/api/ai/image'
|
|
|
+import {hasChinese} from '../../utils/common-utils'
|
|
|
|
|
|
// image 模型
|
|
|
interface ImageModelVO {
|
|
@@ -329,11 +330,6 @@ const handleHotWordClick = async (hotWord: string) => {
|
|
|
prompt.value = hotWord
|
|
|
}
|
|
|
|
|
|
-/** 判断字符串是否包含中文 */
|
|
|
-function hasChinese(str) {
|
|
|
- return /[\u4E00-\u9FA5]+/g.test(str)
|
|
|
-}
|
|
|
-
|
|
|
/** 图片生产 */
|
|
|
const handleGenerateImage = async () => {
|
|
|
// 二次确认
|