更新记录
1.0.1(2026-09-21) 下载此版本
- 修复
lingyun-segmented-control在中文 key 下的选中胶囊错位:段 id 改用 index 生成,不再依赖 key 文本清洗,避免不同中文 key 生成重复 id 导致createSelectorQuery命中错误节点。
1.0.0(2026-09-21) 下载此版本
一套对齐 Apple Liquid Glass 的 uni-app 多端组件库。,所有 lingyun- 均位于本包 components/ 下;样式走 lingyun-ui/styles 的 $lingyun-glass- token,尺寸一律 px;兼容 H5 与微信小程序(mp-weixin 为硬门禁)。
平台兼容性
uni-app(4.05)
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|
| × | √ | √ | √ | √ | √ | √ | √ | √ |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 小红书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ |
uni-app x(5.26)
| Chrome | Chrome插件版本 | Safari | Safari插件版本 | Android | Android插件版本 | iOS | iOS插件版本 | 鸿蒙 | 鸿蒙插件版本 | 微信小程序 | 微信小程序插件版本 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| √ | 1.0.0 | √ | 1.0.0 | √ | 1.0.0 | √ | 1.0.0 | √ | 1.0.0 | √ | 1.0.0 |
其他
| 多语言 | 暗黑模式 | 宽屏模式 |
|---|---|---|
| × | √ | √ |
凌云UI
凌云UI 组件库(uni_modules 单包多组件)。当前版本 1.0.0,变更见 changelog.md。
📖 使用手册(组件用法、属性、示例;右侧手机框实时预览)
📦 仓库 🐛 欢迎反馈:使用中遇到问题或有建议,请在 仓库 Issues 提交,也欢迎 PR 共同完善。
UI 风格强制:Apple Liquid Glass → 仓库 design/UI_SPEC.md
主题色强制:System Colors → design/COLORS.md · Sketch
外观:浅色 / 暗黑 / 跟随系统,业务侧用 useThemeStore()(src/stores/theme.ts)
页面直接写 lingyun-* 标签,走 easycom,不必逐个 import。
接入
createApp 里先挂 Pinia,再挂本包。Toast / HUD,以及 H5 宽屏侧栏,都从这里注册。
import { createSSRApp } from 'vue'
import { createPinia } from 'pinia'
import { lingyunUi } from '@/uni_modules/lingyun-ui'
export function createApp() {
const app = createSSRApp(App)
app.use(createPinia())
app.use(lingyunUi)
return { app }
}
业务页用 lingyun-app-page 当壳(自定义顶栏、滚动玻璃、反馈宿主)。含输入框的页面保持默认页面级滚动,见 design/TEXTFIELDS.md §5。
<lingyun-app-page title="Home" :show-back="false">
<!-- 正文 -->
</lingyun-app-page>
命令式反馈(无需 import,页面须在 lingyun-app-page 内):
uni.showLingyunToast({ text: 'Saved', type: 'success' })
uni.showLingyunHud('Loading…')
uni.hideLingyunHud()
宽屏
窗口宽度 ≥ 700 时,页面左侧停靠导航,宽 220。折叠屏展开(如 717×781)走这一档;手机竖屏仍是单栏。顶栏和内容区跟随 --lingyun-page-nav-width,不会压住导航。
| 端 | 行为 |
|---|---|
| H5 | app.use(lingyunUi) 把侧栏挂到 body,只创建一次。换页不闪,滚动位置保持 |
| 微信小程序 | 侧栏留在 lingyun-app-page 里。换页记住选中项和滚动位置 |
关掉某一页:<lingyun-app-page :show-nav="false">。Sheet / 带 Grabber 的页不显示这列。
默认目录来自业务工程 src/router/pageNav.ts(与首页列表共用)。要换目录,传 nav-sections。
<lingyun-app-page title="订单" :nav-sections="sections" />
硬规则
- *所有 `lingyun-
组件只放在本包下**,路径固定为components/<组件名>/<组件名>.vue`。 - 禁止再建
src/uni_modules/lingyun-xxx独立插件包。 - 禁止把
lingyun-*放到src/components/。 - 目录与文件名必须一致,便于 easycom 自动扫描。
- 样式扩展统一走
styles/;控件层必须使用$lingyun-glass-*,禁止组件内私造第二套模糊参数。选型见styles/README.md与design/UI_SPEC.md§6.2:- 透底控件 / Toolbar / 一切浮层面板(Alert / Sheet / Toast / HUD / Action Sheet…) →
@include lingyun-glass-surface(+ 全端 blur;见 UI_SPEC §6.2-A.1) - 仅极端无遮罩实霜浮层 →
@include lingyun-glass-regular
- 透底控件 / Toolbar / 一切浮层面板(Alert / Sheet / Toast / HUD / Action Sheet…) →
- 尺寸一律
px(Sketch 1pt = 1px)。❌ 禁止rpx。 - 必须兼容微信小程序(
mp-weixin):样式须通过 WXSS 编译(禁止通用选择器*等);不得只在 H5 验证。见仓库.cursor/rules/mp-weixin-compat.mdc与AGENTS.md。 - 每个组件交付前对照
design/UI_SPEC.md§8 自检清单(含 §6.2)。
目录
lingyun-ui/
├── package.json # 1.0.0
├── readme.md
├── changelog.md
├── index.ts # app.use(lingyunUi)
├── utils/feedback.ts # uni.showLingyunToast / Hud
├── styles/ # variables、theme、Liquid Glass mixin
└── components/
├── lingyun-app-page/ # 页面壳;宽屏时为左侧导航留位
├── lingyun-page-nav/ # 宽屏目录。H5 挂载见 mountLingyunPageNav.ts
├── lingyun-toolbars/
├── lingyun-fab/
└── lingyun-*/ # 其余组件:目录名 = 文件名
新增组件:在 components/ 下建 lingyun-<name>/lingyun-<name>.vue,样式走 styles/,并更新本文件与 changelog.md。
示例
<lingyun-button variant="glass" size="large" text="Continue" @click="onSubmit" />
<lingyun-button variant="borderedProminent" text="Save" />
<lingyun-button variant="glass" role="destructive" text="Delete" />
<lingyun-fab
:content="[
{ icon: 'compose', text: '新建' },
{ icon: 'camera', text: '拍照' },
]"
@trigger="onFab"
/>
<lingyun-toolbars title="Title" @back="onBack" />
<lingyun-toolbars placement="sheet" title="Title" @close="onClose" />
<lingyun-toolbars title-style="large" title="Title" />
<lingyun-sheets v-model:show="open" title="Sheet" detent="medium">
<view>内容</view>
</lingyun-sheets>
<lingyun-action-sheet
v-model:show="asOpen"
title="Select an option"
:actions="[{ text: 'Edit' }, { text: 'Delete', role: 'destructive' }]"
@action="onAction"
/>
<lingyun-activity-view
v-model:show="shareOpen"
detent="half"
title="Title"
:contacts="[{ name: 'Ashley Kamin', badge: 'chat' }]"
:apps="[{ name: 'Messages', icon: 'chat', color: '#34c759' }]"
:groups="[{ actions: [{ text: 'Copy', icon: 'paperclip' }] }]"
@select="onShare"
/>
<lingyun-alert
v-model:show="visible"
title="A Short Title Is Best"
message="A message should be a short, complete sentence."
:actions="[
{ text: 'Secondary', role: 'cancel' },
{ text: 'Primary', primary: true },
]"
@action="onAction"
/>
<lingyun-sidebar v-model:show="open" v-model:current="key" title="Library" :sections="sections" />
<lingyun-form-item name="name" label="姓名">
<lingyun-text-field v-model="form.name" placeholder="请输入" />
</lingyun-form-item>
<lingyun-text-field v-model="name" label="Name" placeholder="Placeholder" clearable />
<lingyun-text-field v-model="pwd" label="Password" secure />
<lingyun-list header="Header" header-type="extraProminent" footer="Footer">
<lingyun-list-item title="Title" note="Subtitle" />
<lingyun-list-item title="Title" detail="Detail" accessory="disclosure" />
<lingyun-list-item title="Title" accessory="toggle" v-model:switch-checked="on" />
</lingyun-list>
<lingyun-swipe-action>
<lingyun-swipe-action-item
:right-options="[
{ text: 'Flag', role: 'orange' },
{ text: 'Delete', role: 'destructive' },
]"
@click="onSwipe"
>
<lingyun-list-item title="Inbox" detail="12" accessory="disclosure" />
</lingyun-swipe-action-item>
</lingyun-swipe-action>
<lingyun-tabbars
v-model="current"
:items="[
{ key: 'home', text: 'Home', icon: '⌂' },
{ key: 'search', role: 'search' },
]"
/>
<lingyun-search-bar v-model="query" placeholder="Search" @confirm="onSearch" />
<lingyun-segmented-control v-model="current" :items="['Day', 'Week', 'Month', 'Year']" />
<lingyun-badge text="247" />
<lingyun-badge color="green" text="3" />
<lingyun-badge dot />
<lingyun-activity-indicator size="large" />
<lingyun-progress :percent="40" show-info />
<lingyun-empty variant="plain" title="No Notes" description="Start by adding a note." />
<lingyun-section title="Variant" hint="Sketch Style">
<view class="lingyun-section-row">
<lingyun-button variant="glass" text="Glass" />
</view>
</lingyun-section>
规范
按钮:design/BUTTONS.md · Sketch Buttons
Tab Bars:design/TABBARS.md · Sketch Tab Bars
Search Bar:design/SEARCHBARS.md · Sketch Search Selected
Lists:design/LISTS.md · Sketch Lists · Grouped
Swipe Actions:design/SWIPE_ACTIONS.md · Sketch Rows with Swipe Actions
Toolbars:design/TOOLBARS.md · Sketch Toolbars/Light/iPhone
Sheets:design/SHEETS.md · Sketch Sheets/Light/iPhone · Sheets/Dark/iPhone
Text Fields:design/TEXTFIELDS.md · Sketch Text Field Light · Text Field Dark
Alerts:design/ALERTS.md · Sketch Alerts/Light · Alerts/Dark
Badges:design/BADGES.md · Sketch App Icons / Badge
Segmented Controls:design/SEGMENTED_CONTROLS.md · Sketch Segmented Controls · Dark/Large
Sidebar:design/SIDEBARS.md

收藏人数:
https://github.com/qiudeteng/lingyun-ui-uniapp
下载插件并导入HBuilderX
赞赏(0)
下载 396
赞赏 0
下载 12626386
赞赏 1950
赞赏
京公网安备:11010802035340号