feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
Deploy to GitHub Pages / deploy (push) Failing after 16s
Regression / regression (push) Failing after 15m2s

This commit is contained in:
aurora-admin
2026-09-12 14:18:41 +08:00
parent 16f365a045
commit c65a69c34e
401 changed files with 22932 additions and 140 deletions
+28
View File
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Aurora Admin · Watermark(普通 H5)</title>
<link rel="stylesheet" href="../.design_library/aurora-admin/colors_and_type.css" />
<link rel="stylesheet" href="Watermark.css" />
<style>body{margin:0;padding:24px;background: var(--au-color-page-bg);} .aa-box{position:relative;height:240px;background: var(--au-color-card-bg);border: 1px solid var(--au-color-border);border-radius:8px;padding:20px;overflow:hidden;}</style>
</head>
<body>
<div class="aa-box">
<div class="aa-watermark" id="wm"></div>
<h3 style="position:relative;color:var(--color-text-title)">机密文档</h3>
<p style="position:relative;color:var(--color-text-body)">该区域内容受水印保护,请勿外传。</p>
</div>
<script>
function buildWatermark(text, color, fontSize, rotate, gap) {
var svg = "<svg xmlns='http://www.w3.org/2000/svg' width='" + gap + "' height='" + gap + "'>" +
"<text x='0' y='" + (fontSize + 6) + "' font-family='sans-serif' font-size='" + fontSize +
"' fill='" + color + "' transform='rotate(" + rotate + " 0 " + (fontSize + 6) + ")'> " + text + " </text></svg>";
return "url(\"data:image/svg+xml;utf8," + encodeURIComponent(svg) + "\")";
}
document.getElementById('wm').style.backgroundImage = buildWatermark('Aurora Admin', 'rgba(0,0,0,0.10)', 14, -22, 160);
</script>
</body>
</html>
+14
View File
@@ -0,0 +1,14 @@
import React from 'react';
import './Watermark.css';
export default function Watermark({
text = 'Aurora Admin', color = 'rgba(0,0,0,0.10)', fontSize = 14,
rotate = -22, gap = 160, fullscreen = false
}) {
const svg = `<svg xmlns='http://www.w3.org/2000/svg' width='${gap}' height='${gap}'>` +
`<text x='0' y='${fontSize + 6}' font-family='sans-serif' font-size='${fontSize}' fill='${color}' transform='rotate(${rotate} 0 ${fontSize + 6})'> ${text} </text></svg>`;
const bg = `url("data:image/svg+xml;utf8,${encodeURIComponent(svg)}")`;
return (
<div className={'aa-watermark' + (fullscreen ? ' is-fullscreen' : '')} style={{ backgroundImage: bg }} />
);
}
+27
View File
@@ -0,0 +1,27 @@
<template>
<div class="aa-watermark" :class="{ 'is-fullscreen': fullscreen }" :style="{ backgroundImage: bg }"></div>
</template>
<script>
export default {
name: 'AaWatermark',
props: {
text: { type: String, default: 'Aurora Admin' },
color: { type: String, default: 'rgba(0,0,0,0.10)' },
fontSize: { type: Number, default: 14 },
rotate: { type: Number, default: -22 },
gap: { type: Number, default: 160 },
fullscreen: { type: Boolean, default: false }
},
computed: {
bg: function () {
var svg = "<svg xmlns='http://www.w3.org/2000/svg' width='" + this.gap + "' height='" + this.gap + "'>" +
"<text x='0' y='" + (this.fontSize + 6) + "' font-family='sans-serif' font-size='" + this.fontSize +
"' fill='" + this.color + "' transform='rotate(" + this.rotate + " 0 " + (this.fontSize + 6) + ")'> " + this.text + " </text></svg>";
return "url(\"data:image/svg+xml;utf8," + encodeURIComponent(svg) + "\")";
}
}
};
</script>
<style src="./Watermark.css"></style>
+24
View File
@@ -0,0 +1,24 @@
<template>
<div class="aa-watermark" :class="{ 'is-fullscreen': fullscreen }" :style="{ backgroundImage: bg }"></div>
</template>
<script setup>
import { computed } from 'vue';
const props = defineProps({
text: { type: String, default: 'Aurora Admin' },
color: { type: String, default: 'rgba(0,0,0,0.10)' },
fontSize: { type: Number, default: 14 },
rotate: { type: Number, default: -22 },
gap: { type: Number, default: 160 },
fullscreen: { type: Boolean, default: false }
});
const bg = computed(() => {
const svg = "<svg xmlns='http://www.w3.org/2000/svg' width='" + props.gap + "' height='" + props.gap + "'>" +
"<text x='0' y='" + (props.fontSize + 6) + "' font-family='sans-serif' font-size='" + props.fontSize +
"' fill='" + props.color + "' transform='rotate(" + props.rotate + " 0 " + (props.fontSize + 6) + ")'> " + props.text + " </text></svg>";
return "url(\"data:image/svg+xml;utf8," + encodeURIComponent(svg) + "\")";
});
</script>
<style src="./Watermark.css"></style>