admin 发表于 2026-9-16 12:43:46

测试远程附件图片和附件直连且下载文件名与上传一致

<div class="ce-block ce-block--focused" data-id="mrWkLBiFu8" >
        <div class="ce-block__content">
                <div class="ce-paragraph cdx-block ce-paragraph--left">测试测试远程附件图片和附件直连且下载文件名与上传一致+禁止直接访问附件真实地址(必须站内点击下载链接)</div>
        </div>
</div><div class="ce-block ce-block--focused" data-id="gF7gwMJida" >
    <div class="ce-block__content">
      <div class="cdx-block image-tool image-tool--filled   ">
            <div class="image-tool__image">
                <div class="image-tool__image-preloader" style=""></div>
                <img id="aimg_gF7gwMJida" class="image-tool__image-picture _zoom" src="https://img.phpcai.com/data/attachmentforum/202609/16/123759q9zxt0v04tqscvat.png" title="" alt="" data-aid="41"/>

            </div>
            <div class="cdx-input image-tool__caption" data-placeholder=""></div>
      </div>
    </div>
</div>
<div class="ce-block ce-block--focused" data-id="WyLkbsX3mw" >
    <div class="ce-block__content">
      <div class="cdx-block image-tool image-tool--filled   ">
            <div class="image-tool__image">
                <div class="image-tool__image-preloader" style=""></div>
                <img id="aimg_WyLkbsX3mw" class="image-tool__image-picture _zoom" src="https://img.phpcai.com/data/attachmentforum/202609/16/124340uobdmhy3oyuyby33.png" title="" alt="" data-aid="43"/>

            </div>
            <div class="cdx-input image-tool__caption" data-placeholder=""></div>
      </div>
    </div>
</div>
<div class="ce-block ce-block--focused" data-id="u5okwKsBvT" >
    <div class="ce-block__content">
      <div class="cdx-block">
                <div class="cdx-attaches cdx-attaches--with-file">
                        <div class="cdx-attaches__file-icon">
                                <div class="cdx-attaches__file-icon-background">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.3236 8.43554L9.49533 12.1908C9.13119 12.5505 8.93118 13.043 8.9393 13.5598C8.94741 14.0767 9.163 14.5757 9.53862 14.947C9.91424 15.3182 10.4191 15.5314 10.9422 15.5397C11.4653 15.5479 11.9637 15.3504 12.3279 14.9908L16.1562 11.2355C16.8845 10.5161 17.2845 9.53123 17.2682 8.4975C17.252 7.46376 16.8208 6.46583 16.0696 5.72324C15.3184 4.98066 14.3086 4.55425 13.2624 4.53782C12.2162 4.52138 11.2193 4.91627 10.4911 5.63562L6.66277 9.39093C5.57035 10.4699 4.97032 11.9473 4.99467 13.4979C5.01903 15.0485 5.66578 16.5454 6.79264 17.6592C7.9195 18.7731 9.43417 19.4127 11.0034 19.4374C12.5727 19.462 14.068 18.8697 15.1604 17.7907L18.9887 14.0354"></path></svg>
                                </div>
                        </div>
                        <div class="cdx-attaches__file-info">
                                <div class="cdx-attaches__title" data-placeholder="Discuz_X5.0_20260910.zip" data-empty="false">
                                        <a href="forum.php?mod=attachment&aid=NDJ8NDdmYTBiODh8MTc5MjY1NjMwN3wwfDg%3D" target="_blank">Discuz_X5.0_20260910.zip</a>
                                </div>
                        </div>
                        <a class="cdx-attaches__download-button" href="forum.php?mod=attachment&aid=NDJ8NDdmYTBiODh8MTc5MjY1NjMwN3wwfDg%3D" target="_blank">
                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
                                        <path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"></path>
                                        <polyline points="7 11 12 16 17 11"></polyline>
                                        <line x1="12" y1="16" x2="12" y2="3"></line>
                                </svg>
                        </a>
                </div>
        </div>
    </div>
</div>
<div class="ce-block ce-block--focused" data-id="-owBPulj1e" >
    <div class="ce-block__content">
      <div class="cdx-block image-tool image-tool--filled   ">
            <div class="image-tool__image">
                <div class="image-tool__image-preloader" style=""></div>
                <img id="aimg_-owBPulj1e" class="image-tool__image-picture _zoom" src="https://img.phpcai.com/data/attachmentforum/202609/18/121820od7cq7c6dqeqa6cv.png" title="" alt="" data-aid="44"/>

            </div>
            <div class="cdx-input image-tool__caption" data-placeholder=""></div>
      </div>
    </div>
</div>
<style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
.ce-paragraph {
    line-height: 1.6em;
    outline: none;
    text-indent: 2em;
    font-size: 16px;
}
.ce-paragraph--right {
    text-align: right;
}
.ce-paragraph--center {
    text-align: center;
}
.ce-paragraph--left {
    text-align: left;
}

.ce-paragraph--justify {
    text-align: justify;
}

.ce-paragraph-text-indent {
    text-align: justify;
}
.ce-paragraph:empty::before{
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
opacity: 0;
}

/** Show placeholder at the first paragraph if Editor is empty */
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty::before {
opacity: 1;
}

.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph:empty::before,
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty:focus::before {
opacity: 0;
}

.ce-paragraph p:first-of-type{
    margin-top: 0;
}

.ce-paragraph p:last-of-type{
    margin-bottom: 0;
}


.svg-icon {
    width: 1em;
    height: 1em;
}

.svg-icon path,
.svg-icon polygon,
.svg-icon rect {
    fill: #4691f6;
}

.svg-icon circle {
    stroke: #4691f6;
    stroke-width: 1;
}
</style><style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
.image-tool {
--bg-color: #cdd1e0;
--front-color: #388ae5;
--border-color: #e8e8eb;

}

.image-tool__image {
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.image-tool__image-picture {
      max-width: 100%;
      vertical-align: bottom;
      display: block;
      margin-left: auto;
      margin-right: auto;
    }

.image-tool__image-preloader {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background-size: cover;
      margin: auto;
      position: relative;
      background-color: #cdd1e0;
      background-position: center center;
    }

.image-tool__image-preloader::after {
      content: "";
      position: absolute;
      z-index: 3;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      border: 2px solid #cdd1e0;
      border-top-color: #388ae5;
      left: 50%;
      top: 50%;
      margin-top: -30px;
      margin-left: -30px;
      animation: image-preloader-spin 2s infinite linear;
      box-sizing: border-box;
      }

.image-tool__caption::before {
      position: absolute !important;
      content: attr(data-placeholder);
      color: #707684;
      font-weight: normal;
      display: none;
    }

.image-tool__caption:empty::before {
      display: block;
      }

.image-tool__caption:empty:focus::before {
      display: none;
      }

.image-tool--empty .image-tool__image {
      display: none;
    }

.image-tool--empty .image-tool__caption, .image-tool--loading .image-tool__caption {
      display: none;
    }

.image-tool .cdx-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-tool .cdx-button svg {
      height: auto;
      margin: 0 6px 0 0;
    }

.image-tool--filled .cdx-button {
      display: none;
    }

.image-tool--filled .image-tool__image-preloader {
      display: none;
      }

.image-tool--loading .image-tool__image {
      min-height: 200px;
      display: flex;
      border: 1px solid #e8e8eb;
      background-color: #fff;
    }

.image-tool--loading .image-tool__image-picture {
      display: none;
      }

.image-tool--loading .cdx-button {
      display: none;
    }

/**
   * Tunes
   * ----------------
   */

.image-tool--withBorder .image-tool__image {
      border: 1px solid #e8e8eb;
    }

.image-tool--withBackground .image-tool__image {
      padding: 15px;
      background: #cdd1e0;
    }

.image-tool--withBackground .image-tool__image-picture {
      max-width: 60%;
      margin: 0 auto;
      }

.image-tool--stretched .image-tool__image-picture {
      width: 100%;
      }

.image-tool__caption {
                text-align: center;
                font-size: 14px;
                color: #a3a3a3;
        }
@keyframes image-preloader-spin {
0% {
    transform: rotate(0deg);
}
100% {
    transform: rotate(360deg);
}
}
</style><style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
.cdx-attaches {
--color-line: #EFF0F1;
--color-bg: #fff;
--color-bg-secondary: #F8F8F8;
--color-bg-secondary--hover: #f2f2f2;
--color-text-secondary: #707684;
}

.cdx-attaches a {
color: inherit;
text-decoration: none;
outline: none;
cursor: pointer;
}

.cdx-attaches a:link,
.cdx-attaches a:visited,
.cdx-attaches a:hover,
.cdx-attaches a:active {
color: inherit;
text-decoration: none;
outline: none;
}

.cdx-attaches--with-file {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid #EFF0F1;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cdx-attaches--with-file:hover {
      border-color: #c4c8d0;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

.cdx-attaches--with-file .cdx-attaches__file-info {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
      flex: 1;
    }

.cdx-attaches--with-file .cdx-attaches__file-icon {
      position: relative;
      flex-shrink: 0;
    }

.cdx-attaches--with-file .cdx-attaches__file-icon-background {
      background-color: #333;
      width: 44px;
      height: 48px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
      }

@supports(-webkit-mask-box-image: url('')){

.cdx-attaches--with-file .cdx-attaches__file-icon-background {
          border-radius: 0;
          -webkit-mask-box-image: url("data:image/svg+xml,%3Csvg width=%2724%27 height=%2724%27 viewBox=%270 0 24 24%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 10.3872C0 1.83334 1.83334 0 10.3872 0H13.6128C22.1667 0 24 1.83334 24 10.3872V13.6128C24 22.1667 22.1667 24 13.6128 24H10.3872C1.83334 24 0 22.1667 0 13.6128V10.3872Z%27 fill=%27black%27/%3E%3C/svg%3E%0A") 48% 41% 37.9% 53.3%
      };
      }

.cdx-attaches--with-file .cdx-attaches__file-icon-label {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      background: inherit;
      text-transform: uppercase;
      line-height: 1em;
      color: #fff;
      padding: 2px 4px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: bold;
      font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
      letter-spacing: 0.03em;
      }

.cdx-attaches--with-file .cdx-attaches__file-icon svg {
      width: 22px;
      height: 22px;
      }

.cdx-attaches--with-file .cdx-attaches__file-icon path {
      stroke: #fff;
      }

.cdx-attaches--with-file .cdx-attaches__size {
      color: #F8F8F8;
      font-size: 12px;
      line-height: 1.2;
    }

.cdx-attaches--with-file .cdx-attaches__size::after {
      content: attr(data-size);
      margin-left: 0.2em;
      }

.cdx-attaches--with-file .cdx-attaches__title {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      outline: none;
      font-size: 15px;
      font-weight: 500;
      line-height: 1.3;
      color: #1b1b1b;
      padding: 2px 4px;
      border-radius: 4px;
      transition: background 0.15s ease;
    }

.cdx-attaches--with-file .cdx-attaches__title:focus {
      background: rgba(35, 131, 226, 0.08);
      }

.cdx-attaches--with-file .cdx-attaches__title:empty::before {
      content: attr(data-placeholder);
      color: #a8aeb8;
    }

.cdx-attaches--loading .cdx-attaches__title,
    .cdx-attaches--loading .cdx-attaches__file-icon,
    .cdx-attaches--loading .cdx-attaches__size,
    .cdx-attaches--loading .cdx-attaches__button {
      opacity: 0;
      font-size: 0;
    }

.cdx-attaches__button {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    border-radius: 7px;
    font-weight: 500;
}

.cdx-attaches__button svg {
      margin-top: 0;
    }
   
    .cdx-attaches__download-button svg, .cdx-attaches__download-button .cdx-attaches__download-button-text {
      vertical-align: middle;
    }
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>
页: [1]
查看完整版本: 测试远程附件图片和附件直连且下载文件名与上传一致