This commit is contained in:
Vanessa 2023-05-25 23:18:38 +08:00
parent cf4be3d8b1
commit 78e70369b2
2 changed files with 6 additions and 1 deletions

View file

@ -1,4 +1,4 @@
document.body.insertAdjacentHTML('afterBegin', `<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg">
document.body.insertAdjacentHTML('afterbegin', `<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg">
<defs>
<symbol id="iconUsers" viewBox="0 0 32 32">
<path d="M27.707 23.047c-0.915-0.916-1.987-1.676-3.171-2.236l-0.069-0.029c1.699-1.376 2.782-3.476 2.782-5.831 0-4.155-3.465-7.564-7.62-7.5-4.091 0.064-7.387 3.397-7.387 7.5 0 2.355 1.087 4.455 2.782 5.831-1.253 0.589-2.325 1.349-3.24 2.265l-0 0c-2.047 2.051-3.21 4.759-3.285 7.646-0 0.002-0 0.005-0 0.008 0 0.166 0.134 0.3 0.3 0.3 0 0 0 0 0 0h2.1c0.161 0 0.296-0.128 0.3-0.289 0.071-2.175 0.952-4.211 2.501-5.756 1.539-1.547 3.67-2.505 6.025-2.505 0.008 0 0.017 0 0.025 0h-0.001c2.284 0 4.432 0.889 6.049 2.505 1.545 1.545 2.426 3.581 2.501 5.756 0.004 0.161 0.139 0.289 0.3 0.289h2.1c0 0 0 0 0 0 0.166 0 0.3-0.134 0.3-0.3 0-0.003-0-0.005-0-0.008v0c-0.075-2.887-1.237-5.595-3.292-7.646zM19.75 19.75c-1.282 0-2.49-0.499-3.394-1.406-0.869-0.862-1.407-2.057-1.407-3.377 0-0.023 0-0.046 0-0.069l-0 0.003c0.011-1.23 0.502-2.419 1.361-3.3 0.9-0.922 2.104-1.436 3.39-1.451 1.271-0.011 2.505 0.484 3.412 1.372 0.93 0.911 1.44 2.13 1.44 3.427 0 1.282-0.499 2.486-1.406 3.394-0.865 0.869-2.061 1.406-3.384 1.406-0.005 0-0.010 0-0.015-0h0.001zM10.356 15.94c-0.034-0.326-0.053-0.656-0.053-0.99 0-0.596 0.056-1.177 0.161-1.744 0.026-0.135-0.045-0.274-0.169-0.33-0.51-0.229-0.979-0.544-1.384-0.941-0.897-0.87-1.453-2.087-1.453-3.434 0-0.051 0.001-0.101 0.002-0.151l-0 0.007c0.034-1.204 0.517-2.347 1.361-3.21 0.926-0.949 2.171-1.466 3.495-1.451 1.196 0.011 2.351 0.473 3.225 1.29 0.296 0.277 0.551 0.585 0.765 0.915 0.075 0.116 0.221 0.165 0.349 0.12 0.66-0.229 1.357-0.39 2.074-0.465 0.21-0.022 0.33-0.247 0.236-0.435-1.219-2.411-3.709-4.076-6.589-4.121-4.159-0.064-7.623 3.345-7.623 7.496 0 2.355 1.084 4.455 2.782 5.831-1.192 0.551-2.291 1.312-3.244 2.265-2.055 2.051-3.217 4.759-3.292 7.65-0 0.002-0 0.005-0 0.008 0 0.166 0.134 0.3 0.3 0.3 0 0 0 0 0 0h2.104c0.161 0 0.296-0.128 0.3-0.289 0.071-2.175 0.952-4.211 2.501-5.756 1.102-1.102 2.452-1.867 3.926-2.239 0.146-0.038 0.244-0.176 0.225-0.326z"></path>

View file

@ -54,6 +54,11 @@ export class Plugin {
// 布局加载完成
}
public addIcons(svg: string) {
document.body.insertAdjacentHTML("afterbegin", `<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" xmlns="http://www.w3.org/2000/svg">
<defs>${svg}</defs></svg>`);
}
public addTopBar(options: {
icon: string,
title: string,