<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>My App123</title>
<link rel="stylesheet" href="https://framework7.io/packages/core/css/framework7.bundle.min.css">
</head>
<body>
<div class="page-content">
<div class="list virtual-list media-list searchbar-found"></div>
</div>
<script type="text/javascript" src="https://framework7.io/packages/core/js/framework7.bundle.min.js"></script>
</script><script>
var app = new Framework7();
// Dummy items array
var items = [];
for (var i = 1; i <= items.rows; i++) {
items.push({
title: 'Item ' + i,
subtitle: 'Subtitle ' + i
});
}
var virtualList = app.virtualList.create({
// List Element
el: '.virtual-list',
// Pass array with items
items: items,
// List item Template7 template
itemTemplate:
'<li>' +
'<a href="#" class="item-link item-content">' +
'<div class="item-inner">' +
'<div class="item-title-row">' +
'<div class="item-title">{{title}}</div>' +
'</div>' +
'<div class="item-subtitle">{{subtitle}}</div>' +
'</div>' +
'</a>' +
'</li>',
// Item height
height: app.theme === 'ios' ? 63 : (app.theme === 'md' ? 73 : 46),
});</script>
</body>
</html>
=================
Framework7 的虚拟列表..., 想浏览器控制台本地测试换数据来着...
想要在控制台赋值这个items
var items = [];