Files
aurora-admin/site/end-preview/select.vue2.html
T

65 lines
3.9 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN" data-end="vue2" data-slug="select">
<head>
<meta charset="utf-8">
<title>select · Vue 2 预渲染</title>
<link rel="stylesheet" href="../../.design_library/kole-ui/colors_and_type.css">
<link rel="stylesheet" href="../../frameworks/Select.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-select { position: relative; display: inline-block; min-width: 220px; }
.kole-select-trigger {
display: flex; align-items: center; gap: 8px; min-height: 32px; height: auto;
padding: 2px 28px 2px 12px; background: #fff; border: 1px solid #E8ECF1;
border-radius: 4px; box-sizing: border-box; cursor: pointer; transition: border-color .15s, box-shadow .15s;
font-size: 14px; color: #262626; flex-wrap: wrap; position: relative;
}
.kole-select-trigger:hover { border-color: #2F54EB; }
.kole-select.is-open .kole-select-trigger { border-color: #2F54EB; box-shadow: 0 0 0 2px rgba(47,84,235,0.2); }
.kole-select.is-disabled .kole-select-trigger { background: #F5F5F5; border-color: transparent; color: #BFBFBF; cursor: not-allowed; }
.kole-select-trigger .placeholder { color: #767676; }
.kole-select-trigger .caret { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); transition: transform .15s; color: #6E6E6E; }
.kole-select.is-open .caret { transform: translateY(-50%) rotate(180deg); }
.kole-select-trigger .tag {
display: inline-flex; align-items: center; gap: 4px; background: #F0F5FF; color: #2F54EB;
border-radius: 2px; padding: 1px 6px; font-size: 12px; line-height: 20px;
}
.kole-select-trigger .tag .x { cursor: pointer; }
.kole-select-panel {
position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; right: 0;
background: #fff; border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,0.12);
max-height: 256px; overflow-y: auto; padding: 4px 0;
}
.kole-select-search { padding: 6px 8px; border-bottom: 1px solid #F0F0F0; }
.kole-select-search input { width: 100%; box-sizing: border-box; border: 1px solid #E8ECF1; border-radius: 4px; padding: 4px 8px; font-size: 13px; outline: none; }
.kole-select-search input:focus { border-color: #2F54EB; }
.kole-select-group-label { padding: 6px 12px; font-size: 12px; color: #6E6E6E; }
.kole-select-option {
display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 32px; cursor: pointer;
font-size: 14px; color: #262626; box-sizing: border-box;
}
.kole-select-option:hover { background: #F5F7FA; }
.kole-select-option.is-selected { background: #F0F5FF; color: #2F54EB; }
.kole-select-option .check { visibility: hidden; margin-left: auto; }
.kole-select-option.is-selected .check { visibility: visible; }
.kole-select-option.is-disabled { color: #BFBFBF; cursor: not-allowed; }
.kole-select-empty { padding: 16px 12px; text-align: center; color: #767676; font-size: 13px; }
</style>
</head>
<body class="kole-end-preview-body">
<!-- 该端实现(frameworks/Select.vue2.vue)的离线预渲染产物。类名与该端源码一致(tools/build-end-preview.mjs 断言)。 -->
<div id="kole-end-preview" data-end="vue2" data-slug="select">
<div data-server-rendered="true" class="kole-select"><div tabindex="0" class="kole-select-trigger"><span class="placeholder">请选择城市</span> <span class="caret">▾</span></div> <div class="kole-select-panel" style="display:none;"><!----> <div class="kole-select-empty">无匹配选项</div></div></div>
</div>
</body>
</html>