瀏覽代碼

fix: put_grid() cell_width、cell_height parameter issue

wangweimin 4 年之前
父節點
當前提交
d4bb0a6323
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      pywebio/output.py

+ 2 - 2
pywebio/output.py

@@ -804,8 +804,8 @@ def put_grid(content, cell_width='auto', cell_height='auto', direction='row', sc
         row_cnt, col_cnt = m, len(content)
 
     css = ('grid-auto-flow: {flow};'
-           'grid-template-columns: repeat({col_cnt},{cell_height});'
-           'grid-template-rows: repeat({row_cnt},{cell_width});'
+           'grid-template-columns: repeat({col_cnt},{cell_width});'
+           'grid-template-rows: repeat({row_cnt},{cell_height});'
            ).format(flow=direction, cell_height=cell_height, cell_width=cell_width, col_cnt=col_cnt, row_cnt=row_cnt)
 
     tpl = """