小编Wil*_*lor的帖子

汇总插件的顺序重要吗?

使用 rollup 和 Svelte 似乎改变插件内部的顺序rollup.config.js没有区别。

plugins: [
    svelte({
        preprocess: sveltePreprocess(),
        compilerOptions: {
            // enable run-time checks when not in production
            dev: !production
        }
    }),
    // we'll extract any component CSS out into
    // a separate file - better for performance
    css({ output: 'bundle.css' }),

    // If you have external dependencies installed from
    // npm, you'll most likely need these plugins. In
    // some cases you'll need additional configuration -
    // consult the documentation for details:
    // https://github.com/rollup/plugins/tree/master/packages/commonjs
    resolve({ …
Run Code Online (Sandbox Code Playgroud)

rollup svelte

5
推荐指数
1
解决办法
1274
查看次数

如何根据某人是否使用移动设备来更改我的 Angular 组件 HTML?

我想配置我的 Angular 9 应用程序以不同方式显示组件,具体取决于某人是否使用移动设备来观看它。当我用 Python 构建模板时,有一个 user_agents 包,它允许我根据移动路径检测和提供不同的 HTML

\n
{% load user_agents %}\n...\n{% if not request|is_mobile and not request|is_tablet %}\n            <td>{{ item.category }}</td>\n            <td><a href="{{ item.path }}">{{ item.title }}</a></td>\n            <td align="center">{{ item.created_on }}</td>\n{% else %}\n            <td>\n                <div>\n                    {{ item.category }} \xc2\xb7 {{ item.created_on_fmted }}\n                </div>\n                <div>\n                    <a href="{{ item.mobile_path }}">{{ item.title }}</a>\n                </div>\n            </td>\n{% endif %}\n
Run Code Online (Sandbox Code Playgroud)\n

现在我正在 Angular 中构建,我的常规设备有以下垫子表

\n
<mat-table #table [dataSource]="dataSource">\n\n    <ng-container matColumnDef="category">\n      <mat-header-cell *matHeaderCellDef> category </mat-header-cell>\n      <mat-cell *matCellDef="let item">{{ item.category.path }}</mat-cell>\n    </ng-container>\n\n    <ng-container matColumnDef="title">\n      <mat-header-cell …
Run Code Online (Sandbox Code Playgroud)

mobile responsive-design angular angular9

3
推荐指数
1
解决办法
5880
查看次数

标签 统计

angular ×1

angular9 ×1

mobile ×1

responsive-design ×1

rollup ×1

svelte ×1