【发布时间】:2020-10-21 18:16:11
【问题描述】:
<apex:page standardStylesheets="false" sidebar="false"
showHeader="false" applyBodyTag="true" applyHtmlTag="false"
docType="html-5.0" >
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>React in VF</title>
<apex:stylesheet value="{!$Resource.style}"/>
</head>
<body>
<div id="root"></div>
<apex:includeScript value="{!$Resource.reactchunckbundle1}"/>
<apex:includeScript value="{!$Resource.reactchunckbundle2}"/>
<apex:includeScript value="{!$Resource.reactchunckbundle3}"/>
</body>
</html> </apex:page>
因为它在标题标签上显示,我的脚本无法找到 document.getElementById('root')
【问题讨论】:
-
你能发布一个你的 index.html 文件吗?这可能与它有关。
-
我正在使用 Visualfoce 页面(类似于 html )而不是 index.html 来触发我的 reactjs
标签: reactjs salesforce visualforce salesforce-lightning