Open anyone0034 opened 11 months ago
`import React, { useCallback } from "react"; import { View, Text, Button, Image } from "@tarojs/components"; import { styled } from '@linaria/react' import { Comment } from "@nutui/nutui-biz";
const Index = (props) => {
const {
data = {
},
style = {
},
globalStyle = {
},
} = props;
const CompComment = styled(View)`
`
return (
<CompComment>
<Comment
type="complex"
imagesRows="multi"
images={[
{
"smallImgUrl": "",
"bigImgUrl": "",
"imgUrl": "https://img30.360buyimg.com/imagetools/jfs/t1/153847/3/5051/62777/5fa65e01Ec88cecb9/36ba206949050b39.jpg"
}, {
"smallImgUrl": "",
"bigImgUrl": "",
"imgUrl": "https://img30.360buyimg.com/imagetools/jfs/t1/131794/19/15190/57841/5fa65e03E75c12ef1/0d1ac3a87ff9e398.jpg"
}, {
"smallImgUrl": "",
"bigImgUrl": "",
"imgUrl": "https://img30.360buyimg.com/imagetools/jfs/t1/155091/12/4926/68141/5fa65e03E9d8c5120/9c71b6e49f1eb3c3.jpg"
}
]}
// videos={cmt.videos}
// videos={[]}
info={{
"content": "产品包装:塑料瓶,但是能接受,也很喜欢。",
"nickName": "星***_",
"score": 5,
"avatar": "https://img14.360buyimg.com/imagetools/jfs/t1/167902/2/8762/791358/603742d7E9b4275e3/e09d8f9a8bf4c0ef.png",
"time": "2021-09-09",
"size": "雪域白【碎屏险套装】全网通;8G+256【12期免息】",
"replay": 23,
"like": 1
}}
ellipsis="6"
onClickImages={(imgs) => {
console.log("进行图片展示", imgs);
}}
commentLabels={
<img
src="https://storage.360buyimg.com/imgtools/78925d9440-f9e874d0-e93d-11eb-8e5c-0da9e18a13b1.png"
style={{ height: "12px" }}
/>
}
commentShopReply={
<div className="nut-comment-shop">
<span>京东美妆国际:</span>
尊敬的客户您好,非常抱歉给您带来不愉快的购物体验,关于过敏,什么成分都不存在个别性和普遍性。
</div>
}
/>
</CompComment>
);
};
export default Index; `
引入评论模块,报错: ModuleBuildError: Module build failed (from ./node_modules/@tarojs/webpack5-runner/node_modules/mini-css-extract-plugin/dist/loader.js): HookWebpackError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Undefined mixin. ╷ 405 │ @include oneline-ellipsis(); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ╵ node_modules\@nutui\nutui-biz\dist\packages\comment\comment.scss 405:9 root stylesheet -- inner error -- Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Undefined mixin. ╷ 405 │ @include oneline-ellipsis(); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^