Kendo 移动应用程序中的 data-role="view" 属性?

data-role="view" attribute in Kendo mobile application?

我的 Kendo 移动应用程序出现以下错误。

Uncaught Error: Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.

<body>
<div data-role="view" ></div>

<div data-role="header" data-position="fixed" style="text-align: center; background-color: #86B404; opacity: .9;">
    <div style="width: 33%; float: left;">
        <h3>FeedBack?</h3>
    </div>
    <div style="width: 33%; float: left;">
        <h3 style="color: white; font-weight: bold;">DashBoard</h3>
    </div>
    <div style="width: 33%; float: right;">
        <h3>LogOut</h3>
    </div>
</div>


<div id="showHow">


        <div class="action-buttons">
            <a data-role="button" href="#howtoPopUp"  data-rel="popup" >Show me How</a>
        </div>
</div>

  $(document).ready(function () {
var app = new kendo.mobile.Application(document.body);
        });

我还没有对此进行测试,但我认为您需要将内容放入您的 data-role="view".

<body>
<div data-role="view" >
    <div data-role="header" data-position="fixed" style="text-align: center; background-color: #86B404; opacity: .9;">
        <div style="width: 33%; float: left;">
            <h3>FeedBack?</h3>
        </div>
        <div style="width: 33%; float: left;">
            <h3 style="color: white; font-weight: bold;">DashBoard</h3>
        </div>
        <div style="width: 33%; float: right;">
            <h3>LogOut</h3>
        </div>
    </div>

    <div id="showHow">
        <div class="action-buttons">
            <a data-role="button" href="#howtoPopUp"  data-rel="popup" >Show me How</a>
        </div>
    </div>
</div>
</body>