当前位置:首页>python>Python NiceGUI 样式三件套:Props、Classes、Style 完全解析

Python NiceGUI 样式三件套:Props、Classes、Style 完全解析

  • 2026-03-27 12:54:41
Python NiceGUI 样式三件套:Props、Classes、Style 完全解析

Python NiceGUI 样式 Props、Classes、Style 完全解析

1. 核心理念:CSS 样式的三层架构

在 NiceGUI 2.20.0 中,样式控制被清晰地分为三个层次,理解这个架构是关键:

┌─────────────────────────────────────────┐
│             CSS 样式三层架构             │
├─────────────────────────────────────────┤
│  1. 组件参数 (Component Props)           │ ← 组件自有样式
│  2. Quasar Props                        │ ← Quasar框架样式
│  3. Classes & Style                     │ ← 自定义样式
└─────────────────────────────────────────┘

2. 三者区别详解

2.1 Props - Quasar/Vue 组件属性

# Props 是什么?
# 1. Quasar UI 框架的组件属性
# 2. Vue.js 的组件props
# 3. 主要用于控制组件的行为和Quasar内置样式

# 基本特征:
# - 字符串格式:'prop1=value1 prop2 prop3=value3'
# - 多个props用空格分隔
# - 布尔props只需写名称(如 'disabled' 而不是 'disabled=true')

2.2 Classes - CSS 类名

# Classes 是什么?
# 1. CSS 类名
# 2. 可以是Tailwind CSS、Quasar CSS或自定义CSS
# 3. 用于应用预定义或自定义的样式规则

# 基本特征:
# - 字符串格式:'class1 class2 class3'
# - 多个类用空格分隔
# - 支持响应式类、状态类等

2.3 Style - 内联样式

# Style 是什么?
# 1. 内联CSS样式
# 2. 直接作用于元素的style属性
# 3. 最高优先级(除!important外)

# 基本特征:
# - 字符串格式:'property1: value1; property2: value2;'
# - 也可以是字典:{'property1': 'value1', 'property2': 'value2'}

3. 使用场景选择

开始选择样式方式
      ↓
┌─────────────────┐
│ 要改变什么?     │
└──────┬──────────┘
       ↓
┌──────────────┐    ┌──────────────┐   ┌──────────────┐
│ 组件行为/状态 │    │ 布局/间距     │   │ 自定义视觉    │
│ (禁用、加载)  │    │ (边距、对齐)  │   │ (颜色、背景)  │
└──────┬────────┘   └──────┬───────┘   └──────┬───────┘
       ↓                   ↓                  ↓
   使用 Props          使用 Classes        使用 Style
       ↓                   ↓                  ↓
'disabled loading''q-mt-md q-pa-sm''color: red;'

4. Props 详解及使用

4.1 什么情况下使用 Props?

# 情况1:控制组件状态和行为
ui.button('提交', props='disabled loading')

# 情况2:使用Quasar预设样式变体
ui.input(label='姓名', props='filled outlined')  # Quasar的filled样式

# 情况3:传递Vue组件属性
ui.button('链接', props='href="https://example.com" target="_blank"')

# 情况4:绑定Vue指令
ui.input(props='v-model="text" @keyup.enter="submit"')

# 情况5:Quasar特有的配置
ui.date(props='mask="YYYY-MM-DD" today-btn')

4.2 Props 参数格式

# 正确示例 
ui.button('测试', props='color=primary outline rounded')

# 错误示例 
# ui.button('测试', props={'color': 'primary'})  # 2.20.0不再推荐字典格式
# ui.button('测试', props='color="primary"')     # 不需要引号

# Props 格式规则:
# 1. 字符串形式,空格分隔
# 2. 键值对用等号连接:key=value
# 3. 布尔值只需键名:disabled(不是 disabled=true)
# 4. 多单词属性用连字符:first-day-of-week=1

4.3 Props 常用参数分类

# 1. 状态类 Props
'disabled'# 禁用
'loading'# 加载中
'readonly'# 只读
'selected'# 选中
'active'# 激活

# 2. 样式变体 Props(Quasar特有)
'filled'# 填充样式
'outlined'# 轮廓样式
'flat'# 扁平样式
'glossy'# 光泽效果
'rounded'# 圆角
'square'# 方形

# 3. 尺寸 Props
'size="xs|sm|md|lg|xl"'
'dense'# 紧凑模式

# 4. 颜色 Props
'color="primary|secondary|accent|positive|negative|info|warning"'
'text-color="white"'

# 5. 功能 Props
'clearable'# 可清除(输入框)
'multiple'# 多选(选择器)
'range'# 范围选择(日期)

4.4 Props 使用示例

from nicegui import ui

# 示例1:按钮的各种状态
ui.button('普通按钮')
ui.button('禁用按钮', props='disabled')
ui.button('加载中', props='loading')
ui.button('轮廓按钮', props='outline')
ui.button('圆角按钮', props='rounded')

# 示例2:输入框变体
ui.input('填充样式', props='filled')
ui.input('轮廓样式', props='outlined')
ui.input('突出样式', props='standout')
ui.input('无边框', props='borderless')

# 示例3:复杂组合
ui.button('高级按钮'
          props='color=primary outline rounded size=lg glossy')

5. Classes 详解及使用

5.1 什么情况下使用 Classes?

# 情况1:控制布局和间距
ui.button('按钮', classes='q-mt-md q-pa-sm')  # 使用Quasar间距工具类

# 情况2:使用Tailwind CSS
ui.button('按钮', classes='bg-blue-500 text-white hover:bg-blue-600')

# 情况3:应用自定义CSS类
ui.button('按钮', classes='my-custom-class special-button')

# 情况4:响应式设计
ui.button('按钮', classes='text-sm md:text-lg lg:text-xl')

# 情况5:状态类
ui.button('按钮', classes='active:scale-95 hover:shadow-lg')

5.2 可用的 Classes 类型

5.2.1 Quasar 工具类(推荐)

# 边距 (margin)
'q-ma-xs|sm|md|lg|xl'# 所有方向
'q-mt-*''q-mb-*''q-ml-*''q-mr-*'# 特定方向
'q-mx-*''q-my-*'# 水平和垂直

# 内边距 (padding)
'q-pa-xs|sm|md|lg|xl'
'q-pt-*''q-pb-*''q-pl-*''q-pr-*'
'q-px-*''q-py-*'

# 文本
'text-h1|h2|h3|h4|h5|h6'# 标题级别
'text-body1|body2|caption|overline'# 文本样式
'text-weight-thin|light|regular|medium|bold|bolder'# 字重
'text-italic'# 斜体
'text-no-wrap'# 不换行
'text-strike'# 删除线
'text-uppercase|lowercase|capitalize'# 大小写

# 颜色
'text-primary|secondary|accent|positive|negative|info|warning|dark|light'
'bg-primary|secondary|...'
'text-white|black|red|pink|purple|...'

# 对齐
'text-left|center|right|justify'
'self-start|center|end|stretch|baseline'
'items-start|center|end|stretch|baseline'
'justify-start|center|end|between|around|evenly'

# 显示
'hidden'# 隐藏
'inline|block|inline-block|flex|inline-flex'

5.2.2 Tailwind CSS 类(需配置)

# 背景颜色
'bg-blue-500''bg-red-300''bg-gradient-to-r from-blue-500 to-purple-600'

# 文本
'text-white''text-lg''font-bold''text-center'

# 边框
'border''border-2''border-blue-500''rounded-lg''rounded-full'

# 阴影
'shadow''shadow-md''shadow-lg''shadow-xl''shadow-2xl'

# 悬停状态
'hover:bg-blue-600''hover:text-white''hover:shadow-lg'

# 响应式
'sm:text-sm''md:text-base''lg:text-lg''xl:text-xl'

5.2.3 自定义CSS类

# 1. 先定义CSS
ui.add_head_html('''
<style>
.my-button {
    background: linear-gradient(45deg, 
#FE6B8B 30%, #FF8E53 90%);
    color: white;
    border-radius: 12px;
    transition: transform 0.3s;
}
.my-button:hover {
    transform: translateY(-2px);
}
</style>
''')

# 2. 使用自定义类
ui.button('自定义按钮', classes='my-button')

5.3 Classes 使用示例

from nicegui import ui

# 示例1:布局控制
with ui.row().classes('items-center justify-between gap-4'):
    ui.button('左').classes('q-mr-auto')
    ui.button('中')
    ui.button('右').classes('q-ml-auto')

# 示例2:文本样式
ui.label('标题').classes('text-h4 text-primary text-weight-bold q-mb-md')
ui.label('正文').classes('text-body1 text-grey-8')

# 示例3:卡片样式
with ui.card().classes('q-pa-lg shadow-5 rounded-borders'):
    ui.label('卡片标题').classes('text-h6 q-mb-sm')
    ui.label('卡片内容').classes('text-body2')

# 示例4:响应式设计
ui.button('响应式按钮'
          classes='text-sm sm:text-base md:text-lg w-full md:w-auto')

# 示例5:状态交互
ui.button('交互按钮',
          classes='bg-blue-500 hover:bg-blue-600 active:bg-blue-700 '
'text-white transition-colors duration-200')

6. Style 详解及使用

6.1 什么情况下使用 Style?

# 情况1:动态样式计算
color = 'red'
ui.button('动态颜色', style=f'background-color: {color};')

# 情况2:内联特定样式
ui.button('按钮', style='border-radius: 20px; font-weight: 900;')

# 情况3:需要最高优先级样式
ui.button('按钮', style='color: red !important;')

# 情况4:CSS变量或复杂值
ui.button('渐变按钮'
          style='background: linear-gradient(45deg, #FE6B8B#FF8E53);')

# 情况5:临时调试样式
ui.button('调试', style='border: 2px dashed red;')

6.2 Style 格式

# 字符串格式(推荐)
ui.button('按钮', style='color: red; background: blue; font-size: 16px;')

# 字典格式(也支持)
ui.button('按钮', style={'color''red''background''blue'})

# 多行字符串(复杂样式)
ui.button('按钮', style='''
    background: linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%);
    color: white;
    border-radius: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
'''
)

6.3 Style 常用属性

# 盒模型
'width: 100px; height: 50px;'
'margin: 10px; padding: 15px;'
'border: 2px solid #ccc; border-radius: 8px;'

# 定位
'position: absolute|relative|fixed|sticky;'
'top: 0; left: 0; right: 0; bottom: 0;'
'z-index: 10;'

# 颜色和背景
'color: #333; background-color: #f0f0f0;'
'background: linear-gradient(to right, #ff7e5f#feb47b);'
'background-image: url("image.jpg");'

# 文字
'font-size: 16px; font-weight: bold;'
'text-align: center; line-height: 1.5;'
'text-transform: uppercase;'

# 变换和动画
'transform: translateX(10px) rotate(45deg);'
'transition: all 0.3s ease;'
'animation: fadeIn 1s;'

# 布局(Flexbox)
'display: flex; justify-content: center; align-items: center;'
'flex-direction: column; gap: 10px;'

6.4 Style 使用示例

from nicegui import ui

# 示例1:基础样式
ui.button('基础样式',
          style='background-color: #4CAF50; color: white; padding: 12px 24px;')

# 示例2:复杂背景
ui.button('渐变按钮',
          style='''
            background: linear-gradient(45deg, #2196F3#21CBF3);
            color: white;
            border: none;
            border-radius: 25px;
            padding: 12px 30px;
            font-size: 16px;
            font-weight: bold;
          '''
)

# 示例3:动态样式
for i, color in enumerate(['#FF5252''#4CAF50''#2196F3''#FF9800']):
    ui.button(f'按钮 {i+1}'
              style=f'background-color: {color}; color: white; margin: 5px;')

# 示例4:Flex布局
with ui.row().style('display: flex; gap: 10px; align-items: center;'):
    ui.label('标签').style('font-weight: bold;')
    ui.input(placeholder='输入框').style('flex: 1;')
    ui.button('搜索')

# 示例5:自定义动画
ui.add_head_html('''
<style>
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
</style>
'''
)

ui.button('动画按钮',
          style='''
            animation: pulse 2s infinite;
            background-color: #9C27B0;
            color: white;
          '''
)

7. 优先级和组合使用

7.1 样式优先级规则

# 优先级从高到低:
# 1. Inline Style (style属性) ← 最高优先级
# 2. Component Props (color, size等)
# 3. Quasar Props (filled, outline等)
# 4. CSS Classes (包括Tailwind和Quasar类) ← 最低优先级

# 示例:冲突解决
ui.button('测试',
          color='red',            # 组件参数
          props='color=blue',     # Quasar props - 被覆盖
          classes='text-green',   # CSS类 - 可能被覆盖
          style='color: yellow;'# 内联样式 - 最高优先级
# 最终颜色:黄色(style优先级最高)

7.2 组合使用示例

from nicegui import ui

# 示例:一个完整的按钮
ui.button(
'提交表单',
# 1. 组件参数 - 基础配置
    color='primary',
    icon='send',

# 2. Quasar Props - Quasar特有样式和行为
    props='''
        outline          # Quasar样式变体
        rounded          # Quasar圆角
        size=lg          # Quasar尺寸
        :loading="isSubmitting"  # Vue绑定
    '''
,

# 3. Classes - 布局和自定义样式
    classes='''
        q-mt-lg          # Quasar间距
        q-px-xl          # Quasar内边距
        shadow-3         # Quasar阴影
        hover:shadow-5   # Quasar悬停效果
        w-full md:w-auto # Tailwind响应式宽度
    '''
,

# 4. Style - 特定内联样式
    style='''
        min-width: 120px;          # 最小宽度
        transition: all 0.3s ease; # 过渡动画
    '''

)

# 示例:表单输入框
ui.input(
# 组件参数
    label='邮箱地址',
    placeholder='user@example.com',

# Quasar Props
    props='''
        filled           # Quasar填充样式
        clearable        # Quasar可清除
        type=email       # HTML5类型
        :rules="[val => /.+@.+/.test(val) || '请输入有效邮箱']"  # 验证
    '''
,

# Classes
    classes='''
        q-mb-md          # 底部间距
        w-full           # 全宽
    '''
,

# Style(通常不需要,除非特殊需求)
# style=''
)

8. 项目中的使用模式

8.1 模式1:基础组件封装

from nicegui import ui

defcreate_primary_button(text, **kwargs):
"""创建主要按钮的标准化封装"""
return ui.button(
        text,
        color='primary',
        props='rounded',
        classes='q-pa-sm q-ma-xs',
        **kwargs
    )

defcreate_card(title, content):
"""创建标准化卡片"""
with ui.card().classes('q-pa-md shadow-2 rounded-borders').props('flat bordered'):
        ui.label(title).classes('text-h6 q-mb-sm')
        ui.label(content).classes('text-body2')

8.2 模式2:响应式设计

from nicegui import ui

# 响应式按钮
ui.button('响应式按钮',
          classes='''
            text-xs sm:text-sm md:text-base   # 响应式文字大小
            w-full sm:w-auto                  # 移动端全宽,桌面端自适应
            q-pa-xs sm:q-pa-sm md:q-pa-md     # 响应式内边距
          '''
)

# 响应式网格
with ui.row().classes('''
    flex flex-col              # 移动端垂直排列
    sm:flex-row sm:flex-wrap   # 平板端开始横向排列
    gap-2 sm:gap-4             # 响应式间距
'''
):
for i in range(6):
        ui.card().classes('''
            w-full        # 移动端全宽
            sm:w-1/2      # 平板端一半宽度
            lg:w-1/3      # 桌面端三分之一宽度
        '''
)

8.3 模式3:主题和变量

from nicegui import ui

# 定义主题变量
theme = {
'primary''#2196F3',
'secondary''#4CAF50',
'spacing''16px',
}

# 使用主题
ui.button('主题按钮',
          style=f'background-color: {theme["primary"]}; '
f'margin: {theme["spacing"]};')

# 动态主题切换
defapply_dark_theme():
    ui.query('body').classes('bg-gray-900 text-white')

defapply_light_theme():
    ui.query('body').classes('bg-white text-gray-900')

9. 调试技巧

9.1 查看最终样式

from nicegui import ui

# 1. 使用浏览器开发者工具
# 右键点击元素 → 检查 → 查看应用的样式

# 2. 添加调试类
ui.button('调试按钮',
          classes='debug-border',
          props='outline',
          style='color: red;')

ui.add_head_html('''
<style>
.debug-border {
    border: 2px dashed red !important;
}
</style>
'''
)

# 3. 临时高亮
ui.button('高亮',
          style='box-shadow: 0 0 0 3px rgba(255,0,0,0.5);')

9.2 样式覆盖调试

from nicegui import ui

# 问题:样式不生效?
# 检查顺序:
# 1. 优先级:style > props > classes
# 2. 特异性:内联样式最高
# 3. !important 标志

# 示例调试
ui.button('测试',
          color='red',                    # 被覆盖
          props='color=blue',             # 被覆盖
          classes='text-green',           # 被覆盖
          style='color: purple !important;')  # 最终生效

10. 常见问题

Q1: Props、Classes、Style 的区别是什么?

"""
Props:      Quasar组件属性,控制组件行为和Quasar内置样式
Classes:    CSS类名,用于应用预定义样式规则
Style:      内联样式,用于直接设置CSS属性,优先级最高

简单记法:
- 用 Props 控制"组件怎么工作"
- 用 Classes 控制"元素怎么布局"
- 用 Style 控制"元素长什么样"
"""

Q2: 什么时候用哪个?

"""
决策流程:
1. 如果是Quasar组件自带的功能/样式 → 用 Props
   - 如:disabled, loading, filled, outline

2. 如果是布局、间距、响应式 → 用 Classes
   - 如:q-mt-md, flex, grid, w-full

3. 如果是特定、动态或高优先级样式 → 用 Style
   - 如:color: red;, background: linear-gradient(...)

4. 如果不确定 → 先用Classes,不行再试Style
"""

Q3: 三者可以同时使用吗?

# 可以!而且这是最佳实践
ui.button(
'完整示例',
# Props - Quasar功能
    props='outline rounded',

# Classes - 布局和工具类
    classes='q-mt-md q-pa-sm flex items-center',

# Style - 特定样式
    style='min-width: 100px;'
)

# 注意:如果有冲突,优先级:Style > Props > Classes

Q4: 如何学习更多可用的选项?

"""
学习资源:
1. Quasar Props: https://quasar.dev/vue-components/button#qbtn-api
2. Quasar CSS类: https://quasar.dev/style/shadows#shadow-1-24
3. Tailwind CSS: https://tailwindcss.com/docs
4. NiceGUI文档: https://nicegui.io/documentation

记忆技巧:
- Props: 记住常用几个(filled, outline, rounded, dense)
- Classes: 记住模式(q-{属性}-{值})
- Style: 和普通CSS一样
"""

11. 总结

特性
Props
Classes
Style
用途
组件行为/Quasar样式
布局/间距/工具类
内联/动态/特定样式
格式
字符串:'prop1=value prop2'
字符串:'class1 class2'
字符串或字典
优先级
学习成本
需要学Quasar API
需要学CSS框架
需要懂CSS
性能
最好(可复用)
较差(内联)
推荐度
⭐⭐⭐⭐
⭐⭐⭐⭐⭐
⭐⭐⭐
何时使用
Quasar功能需求时
大多数样式需求
特殊/动态需求

12. 法则

  1. 80/20 原则:80%的样式用Classes解决,15%用Props,5%用Style
  2. 从简到繁:先试Classes,不行加Props,最后用Style
  3. 保持一致性:项目中建立统一的样式规范
  4. 性能优先:尽量用Classes,避免过多内联Style
  5. 可维护性:将常用样式封装为函数或组件

口诀:

"Props 管功能,Classes 管布局,Style 管特殊"

今天就聊到这里,通过本文解析,开发者可以清晰地区分和使用 NiceGUI 中的 Props、Classes 和 Style 了。


作者简介:码上工坊,探索用编程为己赋能,定期分享编程知识和项目实战经验。持续学习、适应变化、记录点滴、复盘反思、成长进步。

重要提示:本文主要是记录自己的学习与实践过程,所提内容或者观点仅代表个人意见,只是我以为的,不代表完全正确,欢迎交流讨论。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 17:25:00 HTTP/2.0 GET : https://f.mffb.com.cn/a/483267.html
  2. 运行时间 : 0.294235s [ 吞吐率:3.40req/s ] 内存消耗:4,891.69kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=cf03168b47d0cba9ffa28e963e147a74
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000817s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001295s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.004403s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000758s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001786s ]
  6. SELECT * FROM `set` [ RunTime:0.000613s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001809s ]
  8. SELECT * FROM `article` WHERE `id` = 483267 LIMIT 1 [ RunTime:0.003808s ]
  9. UPDATE `article` SET `lasttime` = 1774603500 WHERE `id` = 483267 [ RunTime:0.005217s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000848s ]
  11. SELECT * FROM `article` WHERE `id` < 483267 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.004913s ]
  12. SELECT * FROM `article` WHERE `id` > 483267 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.010173s ]
  13. SELECT * FROM `article` WHERE `id` < 483267 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.005800s ]
  14. SELECT * FROM `article` WHERE `id` < 483267 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.033241s ]
  15. SELECT * FROM `article` WHERE `id` < 483267 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.051933s ]
0.298118s