|
|
@@ -2,7 +2,7 @@ import { useState, useRef } from 'react';
|
|
|
import * as XLSX from 'xlsx';
|
|
|
import PizZip from 'pizzip';
|
|
|
import Docxtemplater from 'docxtemplater';
|
|
|
-import ImageModule from 'docxtemplater-image-module-free';
|
|
|
+import ImageModule from 'docxtemplater-image-module-free/build/imagemodule.js';
|
|
|
import JSZip from 'jszip';
|
|
|
import { Button } from '@/client/components/ui/button';
|
|
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/client/components/ui/card';
|
|
|
@@ -233,6 +233,7 @@ export default function WordPreview() {
|
|
|
const imageOpts = {
|
|
|
centered: false,
|
|
|
getImage: (tagValue: string) => {
|
|
|
+ console.log('tagValue', tagValue);
|
|
|
if (tagValue && typeof tagValue === 'string') {
|
|
|
// 从imageMappings中获取对应的图片
|
|
|
const folderIndex = (rowIndex + 1).toString();
|