usablica / intro.js

Lightweight, user-friendly onboarding tour library
http://introjs.com
Other
22.8k stars 2.59k forks source link

Development environment(yarn start) is OK, production environment (yarn build)is not OK #996

Closed SWaiter closed 3 years ago

SWaiter commented 4 years ago

First of all, thanks for introjs. After learning, it can be embedded in the system. Finally, it is found that the development environment is OK and the introjs display is OK. But after yarn build, it is sent to the production environment. It is found that the introjs dialog box is at the bottom. If the page is zoomed, the dialog box can be displayed normally. Ask for help. Thank you

componentDidMount() {
        var intro = introJs();
            intro.setOptions({
                steps: [
                    {
                        intro: "欢迎来到指标审核页面,该页面主要是对指标上下线以及版本切换进行切换审核,开始来学习吧!"
                    },
                    {
                        element: '#stepReview2',//document.querySelector('#stepReview1'),
                        intro: "可以在这里或右侧审批需要处理的指标."
                    },
                    {
                        intro: "恭喜您,已经初步了解指标系统,请开始创建属于您的指标吧.tips:点击完成,下次将不再显示."
                    }
                ]
            });
            intro.setOption('skipLabel', '跳过').setOption('doneLabel', '完成').setOption('nextLabel', '下一步').setOption('prevLabel', '上一步').start().oncomplete(function () {
                indexLocalStorage.set('introFlow', true, -1);
                window.location.replace('/index/detail');
            }).onskip(function () {
                console.log("skip")
            });
    }

return(
<Button id={"stepReview2"} ] size="small"
                                >批量审批</Button>)

This is the development environment, OK

image

This is the bottom of the display after NPM build. This is not what I want

image

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.