-
Notifications
You must be signed in to change notification settings - Fork 6
Quick Start
guoyixing edited this page Apr 13, 2024
·
1 revision
npm install chronos --savenpm run devnpm run buildAfter packaging, the chronos.js file will be generated in the dist directory.
Introduce the chronos.js file into the html file.
<html>
<head>
<meta charset="UTF-8">
<title>Chronos</title>
</head>
<body>
<div id="chronos" style="width: 1000px; height: 1000px;"></div>
<script type="module">
import Chronos from 'chronos';
// Get the mounted div
const chronosDiv = document.getElementById('chronos');
// Configure data, refer to the configuration document for detailed configuration
let data = {};
// Instantiate Chronos
let chronos = new Chronos(chronosDiv, data);
</script>
</body>
</html>