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

推荐订阅源

Security Latest
Security Latest
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学
Know Your Adversary
Know Your Adversary
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
量子位
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tor Project blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
T
Threatpost
T
Tenable Blog
有赞技术团队
有赞技术团队
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
C
Cisco Blogs
H
Heimdal Security Blog
Attack and Defense Labs
Attack and Defense Labs
A
About on SuperTechFans
Last Week in AI
Last Week in AI
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
I
Intezer
V
V2EX
Cyberwarzone
Cyberwarzone
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
B
Blog RSS Feed
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
U
Unit 42
PCI Perspectives
PCI Perspectives
P
Privacy International News Feed
D
Docker

博客园 - 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