Преглед на файлове

add quasar's "row" class to `ui.row` (#3008)

Falko Schindler преди 1 година
родител
ревизия
d6236c0f5a
променени са 2 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. 1 1
      nicegui/elements/column.py
  2. 3 3
      nicegui/elements/row.py

+ 1 - 1
nicegui/elements/column.py

@@ -14,4 +14,4 @@ class Column(Element):
         self._classes.append('nicegui-column')
 
         if wrap:
-            self._classes.append('wrap')
+            self._style['flex-wrap'] = 'wrap'

+ 3 - 3
nicegui/elements/row.py

@@ -11,7 +11,7 @@ class Row(Element):
         :param wrap: whether to wrap the content (default: `True`)
         """
         super().__init__('div')
-        self._classes.append('nicegui-row')
+        self._classes.append('nicegui-row row')  # NOTE: 'row' class for compatibility with Quasar's col-* classes
 
-        if wrap:
-            self._classes.append('wrap')
+        if not wrap:
+            self._style['flex-wrap'] = 'nowrap'