問題描述在Angular4 中引入了jquery插件#jquery-seat-charts,測(cè)試jquery正常運(yùn)行,當(dāng)使用其插件動(dòng)態(tài)產(chǎn)生html標(biāo)簽時(shí),卻發(fā)現(xiàn)標(biāo)簽中所有的class都無(wú)法正常顯示,該class已經(jīng)確認(rèn)引入且不沖突。初步思考,是因?yàn)閍ngular的加載機(jī)制與jquery插件的使用的不同,導(dǎo)致無(wú)法正常識(shí)別樣式?,F(xiàn)在依靠我目前的知識(shí)水平,還無(wú)法解決,懇請(qǐng)社區(qū)的朋友們能夠指引我思路,萬(wàn)分感謝!代碼截圖引入:"scripts": [ "../node_modules/jquery/dist/jquery.min.js", "./assets/js/jquery.seat-charts.js" ],組件邏輯:html代碼:<div class="wrapper"> <div class="container"> <div class="seatCharts-row"></div> <div id="seat-map"> <div class="front-indicator">Front</div> </div> <div class="booking-details"> <h2>Booking Details</h2> <h3> Selected Seats (<span id="counter">0</span>):</h3> <ul id="selected-seats"></ul> Total: <b>$<span id="total">0</span></b> <button class="checkout-button">Checkout »</button> <div id="legend"></div> </div> </div></div>運(yùn)行結(jié)果實(shí)際運(yùn)行結(jié)果:期待運(yùn)行結(jié)果:
Angular4 使用jquery插件動(dòng)態(tài)產(chǎn)生的html標(biāo)簽,樣式表無(wú)法正常顯示?
慕仙森
2019-02-26 14:34:26