feat(P4): precompute移植+app.js sources双向回填+回归1003/1003+验收体积/文件/data.json
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<!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 · AlertModal(普通 H5)</title>
|
||||
<link rel="stylesheet" href="../.design_library/aurora-admin/colors_and_type.css" />
|
||||
<link rel="stylesheet" href="AlertModal.css" />
|
||||
<style>body{margin:0;padding:24px;background: var(--au-color-page-bg);}</style>
|
||||
</head>
|
||||
<body>
|
||||
<button id="open">查看提示</button>
|
||||
|
||||
<div class="aa-modal-mask" id="mask" style="display:none">
|
||||
<div class="aa-alert is-info">
|
||||
<div class="aa-alert-head">
|
||||
<span class="aa-alert-icon">i</span>
|
||||
<div class="aa-alert-title">系统升级通知</div>
|
||||
</div>
|
||||
<div class="aa-alert-content">本周六 02:00-04:00 将进行系统维护,期间服务不可用,请提前安排。</div>
|
||||
<div class="aa-alert-footer"><button class="aa-alert-btn" id="ok">知道了</button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var mask = document.getElementById('mask');
|
||||
document.getElementById('open').onclick = function () { mask.style.display = 'flex'; };
|
||||
document.getElementById('ok').onclick = function () { mask.style.display = 'none'; };
|
||||
mask.addEventListener('click', function (e) { if (e.target === mask) mask.style.display = 'none'; });
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import './AlertModal.css';
|
||||
|
||||
const ICON = { success: '✓', error: '✕', warning: '!', info: 'i' };
|
||||
|
||||
export default function AlertModal({ visible = false, type = 'info', title = '提示', content = '', okText = '知道了', onOk }) {
|
||||
if (!visible) return null;
|
||||
return (
|
||||
<div className="aa-modal-mask" onClick={e => { if (e.target === e.currentTarget) onOk && onOk(); }}>
|
||||
<div className={`aa-alert is-${type}`}>
|
||||
<div className="aa-alert-head">
|
||||
<span className="aa-alert-icon">{ICON[type] || 'i'}</span>
|
||||
<div className="aa-alert-title">{title}</div>
|
||||
</div>
|
||||
<div className="aa-alert-content">{content}</div>
|
||||
<div className="aa-alert-footer">
|
||||
<button className="aa-alert-btn" onClick={onOk}>{okText}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div class="aa-modal-mask" v-if="visible" @click.self="$emit('ok')">
|
||||
<div class="aa-alert" :class="'is-' + type">
|
||||
<div class="aa-alert-head">
|
||||
<span class="aa-alert-icon">{{ iconMap[type] || 'i' }}</span>
|
||||
<div class="aa-alert-title">{{ title }}</div>
|
||||
</div>
|
||||
<div class="aa-alert-content">{{ content }}</div>
|
||||
<div class="aa-alert-footer">
|
||||
<button class="aa-alert-btn" @click="$emit('ok')">{{ okText }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'AaAlertModal',
|
||||
props: {
|
||||
visible: { type: Boolean, default: false },
|
||||
type: { type: String, default: 'info' },
|
||||
title: { type: String, default: '提示' },
|
||||
content: { type: String, default: '' },
|
||||
okText: { type: String, default: '知道了' }
|
||||
},
|
||||
data: function () {
|
||||
return { iconMap: { success: '✓', error: '✕', warning: '!', info: 'i' } };
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style src="./AlertModal.css"></style>
|
||||
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="aa-modal-mask" v-if="visible" @click.self="emit('ok')">
|
||||
<div class="aa-alert" :class="'is-' + type">
|
||||
<div class="aa-alert-head">
|
||||
<span class="aa-alert-icon">{{ iconMap[type] || 'i' }}</span>
|
||||
<div class="aa-alert-title">{{ title }}</div>
|
||||
</div>
|
||||
<div class="aa-alert-content">{{ content }}</div>
|
||||
<div class="aa-alert-footer">
|
||||
<button class="aa-alert-btn" @click="emit('ok')">{{ okText }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
visible: { type: Boolean, default: false },
|
||||
type: { type: String, default: 'info' },
|
||||
title: { type: String, default: '提示' },
|
||||
content: { type: String, default: '' },
|
||||
okText: { type: String, default: '知道了' }
|
||||
});
|
||||
const emit = defineEmits(['ok']);
|
||||
const iconMap = { success: '✓', error: '✕', warning: '!', info: 'i' };
|
||||
</script>
|
||||
|
||||
<style src="./AlertModal.css"></style>
|
||||
Reference in New Issue
Block a user