components.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:dyns 作者: tdrobbin 项目源码 文件源码
def _inner_html(self):
        tbl_html = self.data.to_html(**self.df_kwargs)

        table_class_str = 'table dataframe'
        if self.bordered:
            table_class_str += ' table-bordered'
        if self.striped:
            table_class_str += ' table-striped'
        if self.hover:
            table_class_str += ' table-hover'
        if self.condensed:
            table_class_str += ' table-condensed'

        tbl_html = tbl_html.replace('<table border="1" class="dataframe">',
                                    '<table class="{}">'.format(table_class_str))

        return Template('''
        <div class="dyns-Table-direct-container">
            {{ tbl_html | safe }}
        </div>
        ''').render(title=self.title, tbl_html=tbl_html)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号