Files
aurora-admin/site/end-preview/modal.vue3.html
T

50 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN" data-end="vue3" data-slug="modal">
<head>
<meta charset="utf-8">
<title>modal · Vue 3 预渲染</title>
<link rel="stylesheet" href="../../.design_library/kole-ui/colors_and_type.css">
<link rel="stylesheet" href="../../frameworks/Modal.css">
<style>
/* 演示页的 body 口径(见 frameworks/*.html 的 <style>):组件 CSS 不写 body 样式,
而 .btn 这类 inline-flex 元素的高度依赖行高与留白,缺了就会塌成 0 高。 */
body { margin: 0; padding: 24px; background: var(--kole-color-page-bg); color: var(--kole-color-text-body);
font-family: var(--kole-font-family); font-size: 14px; line-height: 22px; }
#kole-end-preview { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
html.kole-dark body { background: var(--kole-color-page-bg); color: var(--kole-color-text-body); }
</style>
<style>
.kole-mask {
position: fixed; inset: 0; background: rgba(0,0,0,0.45);
display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.kole-modal {
background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
display: flex; flex-direction: column; max-width: 90vw;
}
.kole-modal--small { width: 320px; }
.kole-modal--default { width: 480px; }
.kole-modal--large { width: 680px; }
.kole-modal__header {
display: flex; align-items: center; justify-content: space-between;
padding: 16px 24px; font-size: 16px; font-weight: 600; color: #1F2329;
}
.kole-modal__close { border: none; background: none; cursor: pointer; color: #6E6E6E; font-size: 16px; line-height: 1; }
.kole-modal__close:hover { color: #262626; }
.kole-modal__body { padding: 0 24px 24px; color: #262626; font-size: 14px; line-height: 22px; }
.kole-modal__footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 16px; }
.btn-base { border-radius: 4px; padding: 4px 16px; height: 32px; cursor: pointer; font-size: 14px; }
.btn-ghost { border: 1px solid #E8ECF1; background: #fff; color: #262626; }
.btn-primary { border: 1px solid #2F54EB; background: #2F54EB; color: #fff; }
</style>
</head>
<body class="kole-end-preview-body">
<!-- 该端实现(frameworks/Modal.vue3.vue)的离线预渲染产物。类名与该端源码一致(tools/build-end-preview.mjs 断言)。 -->
<div id="kole-end-preview" data-end="vue3" data-slug="modal">
<div class="kole-mask" open vmodel="true" ok="visible = false" text="这是默认尺寸对话框的内容区,可放置表单或说明文字。" children="这是默认尺寸对话框的内容区,可放置表单或说明文字。" data-v-modal><div class="kole-modal--default kole-modal" role="dialog" data-v-modal><div class="kole-modal__header" data-v-modal><!--[-->提示<!--]--><button class="kole-modal__close" aria-label="关闭" data-v-modal>✕</button></div><div class="kole-modal__body" data-v-modal><!--[--><!--]--></div><div class="kole-modal__footer" data-v-modal><!--[--><button class="btn-base btn-ghost" data-v-modal>取消</button><button class="btn-base btn-primary" data-v-modal>确定</button><!--]--></div></div></div>
</div>
</body>
</html>