mirror of
https://github.com/potato47/ccc-devtools.git
synced 2026-06-12 22:16:47 +00:00
添加开关
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3
-3
@@ -1,3 +1,3 @@
|
||||
<script type="module" crossorigin src="/dist/assets/index.bec476d0.js"></script>
|
||||
<link rel="stylesheet" href="/dist/assets/index.1d01bced.css">
|
||||
<div id="app"></div>
|
||||
<script type="module" crossorigin src="/dist/assets/index.1b8a852c.js"></script>
|
||||
<link rel="stylesheet" href="/dist/assets/index.a2551c8e.css">
|
||||
<div id="dev-app" style="width: 400px;height: 100%;display: none;flex-direction: column;justify-content: center;"></div>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="./index.css" />
|
||||
</head>
|
||||
<body>
|
||||
<%- include(cocosToolBar, {config: config}) %>
|
||||
<%- include('./toolbar', {config: config}) %>
|
||||
<div style="display: flex;flex: auto;align-items: center;">
|
||||
<%- include ./dist/index.html %>
|
||||
<div id="content" class="content">
|
||||
|
||||
@@ -36,10 +36,12 @@
|
||||
<script>
|
||||
const devtoolsBtn = document.getElementById('btn-show-devtools');
|
||||
devtoolsBtn.addEventListener('click', () => {
|
||||
cc.showDevtools = !cc.showDevtools;
|
||||
if (cc.showDevtools) {
|
||||
const devApp = document.getElementById('dev-app');
|
||||
if (devApp.style.display === 'none') {
|
||||
devApp.style.display = 'flex';
|
||||
devtoolsBtn.classList.add('checked');
|
||||
} else {
|
||||
devApp.style.display = 'none';
|
||||
devtoolsBtn.classList.remove('checked');
|
||||
}
|
||||
}, false);
|
||||
|
||||
Reference in New Issue
Block a user