ソースを参照

Merge branch 'main' of github.com:zauberzeug/nicegui

Rodja Trappe 3 年 前
コミット
62d0d4d625

+ 2 - 2
nicegui/config.py

@@ -12,9 +12,9 @@ class Config(BaseModel):
     favicon: str = 'favicon.ico'
     reload: bool = True
     show: bool = True
-    uvicorn_logging_level = 'warning'
+    uvicorn_logging_level: str = 'warning'
     interactive: bool = False
-    main_page_classes = 'q-ma-md column items-start'
+    main_page_classes: str = 'q-ma-md column items-start'
 
 
 excluded_endings = (

+ 1 - 1
nicegui/elements/colors.js

@@ -1,5 +1,5 @@
 Vue.component("colors", {
-  template: `<span v-bind:id="jp_props.id" :class="jp_props.classes" :style="jp_props.style"></span>`,
+  template: `<span v-bind:id="jp_props.id"></span>`,
   mounted() {
     var colors = this.$props.jp_props.options;
     for (var color in colors) {

+ 2 - 2
nicegui/elements/open.py

@@ -11,7 +11,7 @@ def open(self, path: str, socket: WebSocket):
     :param path: string that is a relative url path or an absolute url
     :param socket: WebSocket defining the target client
     """
-    create_task(open_async(path, socket))
+    create_task(open_async(self, path, socket))
 
-async def open_async(path: str, socket: WebSocket):
+async def open_async(self, path: str, socket: WebSocket):
     await socket.send_json({'type': 'page_update', 'page_options': {'redirect': path}})

+ 0 - 1
nicegui/elements/scene_object3d.py

@@ -1,5 +1,4 @@
 from __future__ import annotations
-import asyncio
 from typing import List, Optional
 import uuid
 import numpy as np

+ 1 - 1
nicegui/ui.py

@@ -4,6 +4,7 @@ class Ui:
 
     from .elements.button import Button as button
     from .elements.checkbox import Checkbox as checkbox
+    from .elements.colors import Colors as colors
     from .elements.custom_example import CustomExample as custom_example
     from .elements.dialog import Dialog as dialog
     from .elements.icon import Icon as icon
@@ -30,7 +31,6 @@ class Ui:
     from .elements.switch import Switch as switch
     from .elements.toggle import Toggle as toggle
     from .elements.upload import Upload as upload
-    from .elements.colors import Colors as colors
 
     from .elements.plot import Plot as plot
     from .elements.line_plot import LinePlot as line_plot