Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在字节小程序环境下,引入Comment组件报错。 #23

Open
anyone0034 opened this issue Dec 13, 2023 · 1 comment
Open

在字节小程序环境下,引入Comment组件报错。 #23

anyone0034 opened this issue Dec 13, 2023 · 1 comment

Comments

@anyone0034
Copy link

引入评论模块,报错:
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();
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^

@anyone0034
Copy link
Author

`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;
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant