惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
F
Fortinet All Blogs
B
Blog
GbyAI
GbyAI
P
Proofpoint News Feed
量子位
The Register - Security
The Register - Security
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
B
Blog RSS Feed
WordPress大学
WordPress大学
Recorded Future
Recorded Future
Recent Announcements
Recent Announcements
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Webroot Blog
Webroot Blog
AWS News Blog
AWS News Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The GitHub Blog
The GitHub Blog
爱范儿
爱范儿
O
OpenAI News
月光博客
月光博客
H
Hacker News: Front Page
S
Security Affairs
W
WeLiveSecurity
The Hacker News
The Hacker News
aimingoo的专栏
aimingoo的专栏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
T
The Blog of Author Tim Ferriss
Spread Privacy
Spread Privacy
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
S
Securelist
Microsoft Azure Blog
Microsoft Azure Blog
TaoSecurity Blog
TaoSecurity Blog
T
Threat Research - Cisco Blogs
M
MIT News - Artificial intelligence
A
About on SuperTechFans

博客园 - Insus.NET

User Profile Service 服务未能登录 Visual Studio2026创建Vue项目 安装与配置node.js HTTP Error 403.14 - Forbidden VisualStudio2026回滚上一版本 消息认证码(加强) 网站无法使用插值字符串语法 HMAC(Hash-based Message Authentication Code)认证示例 浏览器自动发送域凭据 企业内小网站兼用Windows验证登录 访问用户控件的函数 onblur事件改为监听处理 将警报消息改为吐司消息 内容有无变化OnBlur即时更新引起的问题与解决 混合式提高用户编辑与操作效率 光标离开文框后即刻更新 WebForm实现Web API JavaScript对GridView删除行后并重新给其数据绑定 把CS值传给JS使用 v2 确认信息confirm由C#后端移至javascript前端 无法发布网站Web Site JavaScript判断字符是否为decimal 点击单元格弹出窗口处理数据返回父页 GridView数据控件中实现单选功能 文本框输入完后直接按回车提交数据 GridView对行进行全选或单选 TextBox文本框允许用户输入正或负小数 用户单击文本并复制至剪帖板 Vue3格式化日期时间与插值 SQL Server中验证大小字母和数字 MS SQL Server 数据加密与解密实例 从Visual Studio 2022升级至Visual Studio 2026 报表应用图表charts显示数据 钉钉(DingTalk)免登录 Upgrade Outlook Connector 程序中真实应用SignalR Web API路径与IIS站点应用程序名或虚拟目录 在您可以登录前,此副本的 Windows 必须被 Microsoft 激活。您想现在激活它吗 电脑系统由Win10降级Win7折腾还是折腾 System.ComponentModel.Win32Exception: Access is denied
相册由原来Lightbox升级至Vue2瀑布流
Insus.NET · 2025-11-24 · via 博客园 - Insus.NET

一直以来,图片展示,均使用lightbox来实现,如:

https://www.cnblogs.com/insus/archive/2013/05/18/3085114.html

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:        <Author,,Insus.NET>
-- Create date: <Create Date,,2025-11-22>
-- Description:    <Description,,获取媒体数据,并进行数据分页>
-- =============================================
CREATE PROCEDURE [dbo].[usp_Media_GetByCatalogKey]
(    
    @Catalog_nbr INT,
    @PageIndex INT, 
    @PageSize INT  
)
as
BEGIN
    DECLARE @result TABLE
    (
        [ID] INT,
        [FileName] NVARCHAR(255),
        SystemName NVARCHAR(255),
        [Width] INT,
        [Height] INT,
        [OriginalWidth] INT,
        [OriginalHeight] INT,
        [OriginalImage_Path] NVARCHAR(255),
        [Thumbnail_Path] NVARCHAR(255)
    )    
    INSERT INTO @result
    (
        [ID],
        --...
        [Thumbnail_Path]
    )
    SELECT TOP (SELECT @PageSize) 
        [Media_nbr],
        [FileName],
        [SystemName],
        [Width],  --缩略图宽度
        [Height],  --缩略图高度
        [OriginalWidth],  --图宽度
        [OriginalHeight],  --原图高度
        '/'+ [Media_Directory] +'/'+ [Storage_Directory]+'/O/'+ [FileName],  --组合原图路径
        '/'+ [Media_Directory] +'/'+ [Storage_Directory]+'/T/'+ [SystemName]    --组合缩略图路径        
    FROM (
            SELECT row_number() OVER(ORDER BY [Media_nbr]) AS rownumber,
                [Media_nbr],
                --...
                [OriginalHeight]
            FROM [dbo].[Media]    
            WHERE [Catalog_nbr] = @Catalog_nbr
            ) temp_row 
    WHERE rownumber > (@PageIndex - 1) * @PageSize;

    SELECT 
        [ID],
        --...
        [Thumbnail_Path]
    FROM @result
END

View Code

引用vue类库,

<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>

引用axios,

<script src="~/Scripts/axios.js"></script>


样式,

 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
 }

 body {
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
     background-color: #f5f7fa;
     color: #333;
     padding: 20px;
 }

 .container {
     max-width: 1200px;
     margin: 0 auto;
 }

 
 .loading {
     text-align: center;
     padding: 20px;
     font-size: 18px;
     color: #3498db;
 }

 .masonry-grid {
     display: flex;
     margin-left: -15px;
     width: auto;
 }

 .masonry-column {
     padding-left: 15px;
     background-clip: padding-box;
 }

 .masonry-item {
     margin-bottom: 15px;
     border-radius: 8px;
     overflow: hidden;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
     transition: transform 0.3s ease, box-shadow 0.3s ease;
     background-color: white;
 }

     .masonry-item:hover {
         transform: translateY(-5px);
         box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
     }

     .masonry-item img {
         width: 100%;
         display: block;
         transition: opacity 0.3s ease;
     }

 .image-info {
     padding: 12px;
     font-size: 14px;
 }

     .image-info p {
         margin-bottom: 5px;
     }

 .dimensions {
     color: #7f8c8d;
 }

 .load-more {
     text-align: center;
     margin-top: 30px;
 }

     .load-more button {
         background-color: #3498db;
         color: white;
         border: none;
         padding: 12px 24px;
         border-radius: 4px;
         cursor: pointer;
         font-size: 16px;
         transition: background-color 0.3s;
     }

         .load-more button:hover {
             background-color: #2980b9;
         }

 .error-message {
     text-align: center;
     color: #e74c3c;
     padding: 20px;
     background-color: #fadbd8;
     border-radius: 4px;
     margin: 20px 0;
 }

 @@media (max-width: 768px) {
     .masonry-grid {
         margin-left: -10px;
     }

     .masonry-column {
         padding-left: 10px;
     }
 }

View Code

html,
2025-11-24_13-29-26

js,
2025-11-24_13-38-36


下面是methods,代码详细,
2025-11-24_13-54-14

方法3,请求数据,
2025-11-24_14-01-22


方法4,

2025-11-24_14-54-26

asp.net mvc 5 + vue2 + axios,效果,
4