Commit b71ac8c1 by chenwq1

refactor(boutique): 重构页面结构和逻辑

- 移除不再使用的 portrait 页面
- 优化横竖屏组件的逻辑,合并相关功能
- 更新组件引用,确保逻辑一致性
- 改进加载状态处理,使用骨架屏替代全屏加载
- 调整数据处理方式,增强代码可读性和维护性
- 更新 manifest.json 版本号
1 parent 11bcfe9c
Showing 284 changed files with 12844 additions and 918 deletions
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import { updateResolutionConfig } from "@/config/resolution-adapt/index.uts"; import { updateResolutionConfig } from "@/config/resolution-adapt/index.uts";
// #ifdef APP // #ifdef APP
import { layoutService } from "@/services/LayoutService.uts"; import { layoutService } from "@/services/LayoutService.uts";
import { recordService } from "@/services/recorder";
import { lockOrientation } from "@/utils/plus-screen.uts"; import { lockOrientation } from "@/utils/plus-screen.uts";
// #endif // #endif
...@@ -30,18 +29,8 @@ export default { ...@@ -30,18 +29,8 @@ export default {
} }
// #endif // #endif
console.log("App Launch"); console.log("App Launch");
// 启动时仅做分辨率配置,避免后台定时器/录音模拟导致对象被长时间持有
setTimeout(() => {
// 模拟接待开始
console.log("Simulating reception start...");
recordService.startAudio();
// 模拟接待结束
console.log("Simulating reception end...");
setTimeout(() => {
recordService.stopAudio();
}, 10_000);
updateResolutionConfig(); updateResolutionConfig();
}, 1000);
}, },
onShow () { onShow () {
console.log("App Show"); console.log("App Show");
......
...@@ -5,35 +5,10 @@ ...@@ -5,35 +5,10 @@
:key="index" :key="index"
class="entrance-item" class="entrance-item"
@click="handleClick(item)"> @click="handleClick(item)">
<!-- App 端需用相对路径,便于打包时基于当前文件解析并打入包内 --> <!-- uView Next 图片图标:name 传图片路径(包含 /) -->
<image v-if="item.icon === 'daily-report'" <un-icon class="entrance-icon"
class="entrance-icon" :name="getIconUrl(item.icon)"
mode="aspectFit" size="48" />
src="../static/images/boutique/tools/daily-report.png" />
<image v-else-if="item.icon === 'create-order'"
class="entrance-icon"
mode="aspectFit"
src="../static/images/boutique/tools/create-order.png" />
<image v-else-if="item.icon === 'equity-order'"
class="entrance-icon"
mode="aspectFit"
src="../static/images/boutique/tools/equity-order.png" />
<image v-else-if="item.icon === 'defeat-order'"
class="entrance-icon"
mode="aspectFit"
src="../static/images/boutique/tools/defeat-order.png" />
<image v-else-if="item.icon === 'order-management'"
class="entrance-icon"
mode="aspectFit"
src="../static/images/boutique/tools/order-management.png" />
<image v-else-if="item.icon === 'wage-appeal'"
class="entrance-icon"
mode="aspectFit"
src="../static/images/boutique/tools/wage-appeal.png" />
<image v-else
class="entrance-icon"
mode="aspectFit"
src="../static/images/boutique/tools/daily-report.png" />
<text class="entrance-name">{{ item.label }}</text> <text class="entrance-name">{{ item.label }}</text>
</view> </view>
</view> </view>
...@@ -91,6 +66,17 @@ const entranceList = computed((): EntranceItem[] => { ...@@ -91,6 +66,17 @@ const entranceList = computed((): EntranceItem[] => {
function handleClick(_item: EntranceItem): void { function handleClick(_item: EntranceItem): void {
uni.showToast({ title: "敬请期待", icon: "none" }); uni.showToast({ title: "敬请期待", icon: "none" });
} }
function getIconUrl(icon: string): string {
// App 端需用相对路径,便于打包时基于当前文件解析并打入包内
if (icon === "daily-report") return "../static/images/boutique/tools/daily-report.png";
if (icon === "create-order") return "../static/images/boutique/tools/create-order.png";
if (icon === "equity-order") return "../static/images/boutique/tools/equity-order.png";
if (icon === "defeat-order") return "../static/images/boutique/tools/defeat-order.png";
if (icon === "order-management") return "../static/images/boutique/tools/order-management.png";
if (icon === "wage-appeal") return "../static/images/boutique/tools/wage-appeal.png";
return "../static/images/boutique/tools/daily-report.png";
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"appid": "__UNI__B602BFA", "appid": "__UNI__B602BFA",
"description": "", "description": "",
"versionName": "1.0.0", "versionName": "1.0.0",
"versionCode": "112", "versionCode": "113",
"uni-app-x": { "uni-app-x": {
"flex-direction": "row" "flex-direction": "row"
}, },
......
{ {
"pages": [ "pages": [
// pages 数组中第一项表示应用启动页
{ {
"path": "pages/common/login/index", "path": "pages/common/login/index",
"style": { "style": {
...@@ -32,12 +31,6 @@ ...@@ -32,12 +31,6 @@
} }
}, },
{ {
"path": "pages/boutique/portrait",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/test/index", "path": "pages/test/index",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
......
<template> <template>
<view class="page-container container"> <view class="page-container container">
<!-- 与旧项目一致:页面背景图 home-bg-1.webp --> <HomeFrame
<view class="page-bg"></view> ref="homeRef"
<HomeFrame ref="homeRef"
:show-footer="true" :show-footer="true"
:swiper-custom="true" :swiper-custom="true"
@change-tab="onChangeTab" @start="handleStart"
@start="handleStart"> >
<template #swiperCustom> <template #swiperCustom>
<view v-if="loadComplete" class="swiper-custom-wrap"> <view v-if="logic.loadComplete.value" class="swiper-custom-wrap">
<view v-if="packageList.length > 0" class="swiper-custom-content"> <view v-if="logic.packageList.value.length > 0" class="swiper-custom-content">
<swiper class="package-swiper" <swiper class="package-swiper" :current="logic.currentSwiperIndex.value" @change="logic.onSwiperChange">
:current="currentSwiperIndex" <swiper-item v-for="(item, idx) in logic.packageList.value" :key="idx" @tap="toDetail(idx)">
@change="onSwiperChange"> <image
<swiper-item v-for="(item, idx) in packageList" v-if="logic.getPkg(item, 'bannerImg')"
:key="idx"
@tap="toDetail(idx)">
<image v-if="getPkg(item, 'bannerImg')"
class="swiper-bg" class="swiper-bg"
mode="aspectFill" mode="aspectFill"
:src="getPkg(item, 'bannerImg')" /> :src="logic.getPkg(item, 'bannerImg')"
/>
<view class="swiper-name"> <view class="swiper-name">
{{ getPkg(item, 'name') }} {{ logic.getPkg(item, "name") }}
</view> </view>
<view class="swiper-content-box"> <view class="swiper-content-box">
<view class="price price-1"> <view class="price price-1">
<text class="price-label">市场价</text> <text class="price-label">市场价</text>
<view class="num"> <view class="num">
<text class="unit">¥</text> <text class="unit">¥</text>
<text>{{ getPkg(item, 'marketPrice') }}</text> <text>{{ logic.getPkg(item, "marketPrice") }}</text>
</view> </view>
</view> </view>
<view class="price price-2"> <view class="price price-2">
{{ getPkg(item, 'discountPrice') }} {{ logic.getPkg(item, "discountPrice") }}
</view> </view>
<view class="price price-3"> <view class="price price-3">
<text class="price-label">套餐价</text> <text class="price-label">套餐价</text>
<view class="num"> <view class="num">
<text class="unit">¥</text> <text class="unit">¥</text>
<text>{{ getPkg(item, 'packagePrice') }}</text> <text>{{ logic.getPkg(item, "packagePrice") }}</text>
</view> </view>
</view> </view>
<view class="briefIntroduction"> <view class="briefIntroduction">
{{ getPkg(item, 'briefIntroduction') }} {{ logic.getPkg(item, "briefIntroduction") }}
</view> </view>
</view> </view>
<view class="swiper-btn"> <view class="swiper-btn">
...@@ -51,18 +48,20 @@ ...@@ -51,18 +48,20 @@
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="swiper-dots"> <view class="swiper-dots">
<view v-for="(_, i) in packageList" <view
v-for="(_, i) in logic.packageList.value"
:key="i" :key="i"
class="dot" class="dot"
:class="[{ active: i == currentSwiperIndex }]" /> :class="[{ active: i == logic.currentSwiperIndex.value }]"
/>
</view> </view>
</view> </view>
<view v-else class="swiper-empty"> <view v-else class="swiper-empty">
<text class="empty-text">{{ swiperNoDataObject.text }}</text> <text class="empty-text">{{ logic.swiperNoDataObject.text }}</text>
</view> </view>
</view> </view>
<view v-else class="swiper-loading"> <view v-else class="swiper-loading">
<text>加载中...</text> <un-skeleton :loading="true" :animate="true" title avatar rows="6"></un-skeleton>
</view> </view>
</template> </template>
...@@ -73,10 +72,13 @@ ...@@ -73,10 +72,13 @@
</template> </template>
</HomeFrame> </HomeFrame>
<CenterPopup ref="customerTypeRef" <CenterPopup
:list="typeList" ref="customerTypeRef"
:list="logic.typeList"
title="请选择当前洽谈的客户类型" title="请选择当前洽谈的客户类型"
@choose="chooseCustomerType" /> @choose="onChooseCustomerType"
/>
<PackageDetailPopup ref="packageRef" @close="closePackageDetail"> <PackageDetailPopup ref="packageRef" @close="closePackageDetail">
<view class="package-detail-box"> <view class="package-detail-box">
<view class="package-box"> <view class="package-box">
...@@ -84,7 +86,7 @@ ...@@ -84,7 +86,7 @@
套餐内容 套餐内容
</view> </view>
<view class="package-content"> <view class="package-content">
<rich-text :nodes="chooseItem.content ?? ''"></rich-text> <rich-text :nodes="logic.chooseItem.value.content != null ? (logic.chooseItem.value.content as string) : ''"></rich-text>
</view> </view>
</view> </view>
<view class="package-box package-detail"> <view class="package-box package-detail">
...@@ -92,7 +94,7 @@ ...@@ -92,7 +94,7 @@
套餐介绍 套餐介绍
</view> </view>
<view class="package-content"> <view class="package-content">
<rich-text :nodes="chooseItem.scriptIntroduction ?? ''"></rich-text> <rich-text :nodes="logic.chooseItem.value.scriptIntroduction != null ? (logic.chooseItem.value.scriptIntroduction as string) : ''"></rich-text>
</view> </view>
</view> </view>
</view> </view>
...@@ -101,81 +103,59 @@ ...@@ -101,81 +103,59 @@
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
import { ref, type Ref } from "vue"; import { ref } from "vue";
import CenterPopup from "@/components/CenterPopup.uvue"; import CenterPopup from "@/components/CenterPopup.uvue";
import HomeFrame from "@/components/HomeFrame/index.uvue"; import HomeFrame from "@/components/HomeFrame/index.uvue";
import PackageDetailPopup from "@/pages/boutique/components/PackageDetailPopup.uvue"; import PackageDetailPopup from "@/pages/boutique/components/PackageDetailPopup.uvue";
import type { BoutiqueLogic } from "@/pages/boutique/useBoutiqueLogic.uts"; import type { BoutiqueLogic } from "@/pages/boutique/useBoutiqueLogic.uts";
const props = defineProps<{ logic: BoutiqueLogic }>(); const props = defineProps<{
logic: BoutiqueLogic;
}>();
const logic = props.logic;
const homeRef = ref(null); const homeRef = ref(null);
const customerTypeRef = ref(null); const customerTypeRef = ref(null);
const packageRef = ref(null); const packageRef = ref(null);
const loadComplete = props.logic.loadComplete; function callExposedMethod(comp: any, methodName: string): void {
const packageList = props.logic.packageList; if (comp == null) return;
const currentSwiperIndex = props.logic.currentSwiperIndex; const obj = comp as UTSJSONObject;
const swiperNoDataObject = props.logic.swiperNoDataObject; const fn = obj[methodName];
const typeList = props.logic.typeList; if (fn != null && typeof fn === "function") {
const chooseItem = props.logic.chooseItem; (fn as () => void)();
}
function getPkg(item: any, key: string): any {
return props.logic.getPkg(item, key);
}
function onSwiperChange(e: any): void {
props.logic.onSwiperChange(e);
}
function onChangeTab(index: number): void {
props.logic.onChangeTab(index);
} }
function handleStart(): void { function handleStart(): void {
const comp = customerTypeRef.value; callExposedMethod(customerTypeRef.value as any, "open");
if (comp != null) {
const obj = comp as UTSJSONObject;
const openFn = obj["open"];
if (openFn != null && typeof openFn === "function") {
(openFn as () => void)();
}
}
} }
function chooseCustomerType(index: number): void { function onChooseCustomerType(index: number): void {
// UTS: ref(null) 的 value 可能被推断为 Nothing?,这里显式断言为 any logic.chooseCustomerType(homeRef.value as any, index);
props.logic.chooseCustomerType(homeRef.value as any, index);
} }
function toDetail(index: number): void { function toDetail(index: number): void {
const item = packageList.value[index]; const item = logic.packageList.value[index];
if (item != null) { if (item != null) {
chooseItem.value = item as UTSJSONObject; logic.chooseItem.value = item as UTSJSONObject;
const p = packageRef.value as null | UTSJSONObject; callExposedMethod(packageRef.value as any, "open");
const openFn = p != null ? p["open"] : null;
if (openFn != null && typeof openFn === "function") {
(openFn as () => void)();
}
} }
} }
function closePackageDetail(): void { function closePackageDetail(): void {
chooseItem.value = {}; logic.chooseItem.value = {};
} }
function updateHome(): void { function updateHome(): void {
const h = homeRef.value as null | UTSJSONObject; // 横屏默认进入详情(保持旧行为)
if (h == null) return; logic.jumpPage(homeRef.value as any, "");
const fn = h["updateApp"];
if (fn != null && typeof fn === "function") {
(fn as () => void)();
}
} }
defineExpose({ defineExpose({
updateHome updateHome: updateHome
}); });
</script> </script>
...@@ -183,31 +163,212 @@ defineExpose({ ...@@ -183,31 +163,212 @@ defineExpose({
.page-container { .page-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative;
} }
.container { .container {
position: relative; position: relative;
} }
.page-bg { .swiper-custom-wrap {
width: 100%;
height: 100%;
position: relative;
}
.swiper-custom-content {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.package-swiper {
flex: 1;
width: 100%;
}
.swiper-bg {
position: absolute; position: absolute;
left: 0;
top: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
top: 0;
left: 0;
z-index: -1; z-index: -1;
background-image: url('@/assets/images/common/home-bg-1.webp');
background-size: cover;
background-repeat: no-repeat;
} }
.swiper-custom-wrap { .swiper-name {
padding-top: var(--l-spacing-lg);
text-indent: 67px;
color: #333;
font-size: var(--l-font-base);
font-weight: 500;
}
.swiper-content-box {
margin: var(--l-spacing-md) var(--l-spacing-xl) 0;
height: 132px;
position: relative;
}
.swiper-content-box .price,
.swiper-content-box .briefIntroduction {
position: absolute;
}
.price-1 {
color: #999;
font-size: 10px;
left: var(--l-spacing-xl);
top: 32px;
width: 97px;
text-align: center;
}
.price-1 .num {
color: #333;
font-size: var(--l-font-base);
font-weight: 700;
display: flex;
justify-content: center;
}
.price-1 .unit {
margin-right: 4px;
}
.price-2 {
left: 129px;
top: 48px;
width: 94px;
color: #ff4747;
font-size: var(--l-font-lg);
font-weight: 700;
display: flex;
justify-content: center;
}
.price-3 {
top: 27px;
left: 228px;
color: #999;
font-size: 14px;
width: 148px;
text-align: center;
}
.price-3 .num {
color: #ff4747;
font-size: 22px;
font-weight: 700;
display: flex;
justify-content: center;
}
.price-3 .unit {
margin-right: 8px;
}
.briefIntroduction {
left: 0;
top: 106px;
color: #666;
font-size: 12px;
width: 100%;
text-align: center;
}
.swiper-btn {
color: #4673ff;
font-size: 13px;
text-align: center;
margin-top: var(--l-spacing-md);
}
.swiper-dots {
display: flex;
flex-direction: row;
justify-content: center;
padding: var(--l-spacing-sm) 0;
}
.dot {
width: 8px;
height: 8px;
border-radius: 4px;
background: #ccc;
margin: 0 4px;
}
.dot.active {
background: #4673ff;
}
.swiper-empty,
.swiper-loading {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative; display: flex;
align-items: center;
justify-content: center;
} }
.empty-text {
font-size: var(--l-font-sm);
color: #999;
}
.detail-content {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.detail-title {
font-size: var(--l-font-2xl);
color: #333;
}
.package-detail-box {
padding-bottom: 50px;
margin: 0 var(--l-spacing-xl);
}
.package-box {
border-radius: var(--l-radius-xl);
background: #ffffff;
box-shadow: 0 6px 24px rgba(44, 102, 247, 0.15);
margin-bottom: var(--l-spacing-xl);
box-sizing: border-box;
padding: var(--l-spacing-xl);
}
.package-name {
color: #333;
font-size: var(--l-font-xl);
font-weight: 500;
line-height: 28px;
margin-bottom: var(--l-spacing-md);
}
.package-content {
line-height: 22px;
color: #333;
font-size: 14px;
}
.package-detail {
border: 2px solid rgba(70, 115, 255, 0.5);
background: rgba(70, 115, 255, 0.1);
box-shadow: 0 6px 24px rgba(44, 102, 247, 0.15);
}
.package-detail .package-name {
color: #4673ff;
}
</style>
.swiper-custom-content { .swiper-custom-content {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -394,5 +555,4 @@ defineExpose({ ...@@ -394,5 +555,4 @@ defineExpose({
.package-detail .package-name { .package-detail .package-name {
color: #4673ff; color: #4673ff;
} }
</style>
<template> <template>
<view class="page-container"> <view class="page-container container">
<HomeFrame ref="homeRef" <HomeFrame ref="homeRef"
:show-footer="true" :show-footer="true"
:swiper-custom="true" :swiper-custom="true"
@start="handleStart"> @start="handleStart">
<template #swiperCustom> <template #swiperCustom>
<view v-if="loadComplete" class="swiper-custom-wrap"> <view v-if="logic.loadComplete.value" class="content-wrap">
<swiper v-if="packageList.length > 0" <scroll-view class="pkg-scroll"
class="package-swiper" direction="vertical"
:current="currentSwiperIndex" :show-scrollbar="true">
@change="onSwiperChange"> <view v-if="logic.packageList.value.length > 0" class="pkg-list">
<swiper-item v-for="(item, idx) in packageList" <view v-for="(item, idx) in logic.packageList.value"
:key="idx" :key="idx"
class="pkg-card"
@tap="toDetail(idx)"> @tap="toDetail(idx)">
<view class="swiper-custom-content"> <image v-if="logic.getPkg(item, 'bannerImg')"
<image class="bg" class="pkg-cover"
mode="aspectFill" mode="aspectFill"
:src="getBanner(item)" /> :src="logic.getPkg(item, 'bannerImg')" />
<view class="pkg-main">
<view class="pkg-name">
{{ logic.getPkg(item, "name") }}
</view> </view>
</swiper-item> <view class="pkg-brief">
</swiper> {{ logic.getPkg(item, "briefIntroduction") }}
<view v-if="packageList.length > 0" class="swiper-dots">
<view v-for="(_, i) in packageList"
:key="i"
class="dot"
:class="[{ active: i === currentSwiperIndex }]" />
</view> </view>
<view v-else class="swiper-empty"> <view class="pkg-price-row">
<text class="empty-text">敬请期待</text> <text class="label">市场价</text>
<text class="value">¥{{ logic.getPkg(item, "marketPrice") }}</text>
<text class="label">套餐价</text>
<text class="value strong">¥{{ logic.getPkg(item, "packagePrice") }}</text>
</view> </view>
</view> </view>
<view v-else class="swiper-loading">
<text>加载中...</text>
</view> </view>
</template> </view>
<view v-else class="pkg-empty">
<template #detail> <text class="empty-text">{{ logic.swiperNoDataObject.text }}</text>
<view class="detail-content"> </view>
<text class="detail-title">详情页</text> </scroll-view>
</view>
<view v-else class="loading-wrap">
<un-skeleton :animate="true"
avatar
:loading="true"
rows="8"
title>
</un-skeleton>
</view> </view>
</template> </template>
</HomeFrame> </HomeFrame>
<CenterPopup ref="customerTypeRef"
:list="logic.typeList"
title="请选择当前洽谈的客户类型"
@choose="onChooseCustomerType" />
<PackageDetailPopup ref="packageRef" @close="closePackageDetail">
<view class="package-detail-box">
<view class="package-box">
<view class="package-name">
套餐内容
</view>
<view class="package-content">
<rich-text :nodes="logic.chooseItem.value.content != null ? (logic.chooseItem.value.content as string) : ''"></rich-text>
</view>
</view>
<view class="package-box package-detail">
<view class="package-name">
套餐介绍
</view>
<view class="package-content">
<rich-text :nodes="logic.chooseItem.value.scriptIntroduction != null ? (logic.chooseItem.value.scriptIntroduction as string) : ''">
</rich-text>
</view>
</view>
</view>
</PackageDetailPopup>
</view> </view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
import type { BoutiqueLogic } from "@/pages/boutique/useBoutiqueLogic.uts";
import { ref } from "vue"; import { ref } from "vue";
import CenterPopup from "@/components/CenterPopup.uvue";
import HomeFrame from "@/components/HomeFrame/index.uvue"; import HomeFrame from "@/components/HomeFrame/index.uvue";
import type { BoutiqueLogic } from "@/pages/boutique/useBoutiqueLogic.uts"; import PackageDetailPopup from "@/pages/boutique/components/PackageDetailPopup.uvue";
type NavigateToFailLike = { const props = defineProps<{
errCode: number; logic: BoutiqueLogic;
errMsg: string; }>();
errSubject: string;
message: null | string;
};
const props = defineProps<{ logic: BoutiqueLogic }>();
const logic = props.logic;
const homeRef = ref(null); const homeRef = ref(null);
const customerTypeRef = ref(null);
const packageRef = ref(null);
const loadComplete = props.logic.loadComplete; function callExposedMethod(comp: any, methodName: string): void {
const packageList = props.logic.packageList; if (comp == null) return;
const currentSwiperIndex = props.logic.currentSwiperIndex; const obj = comp as UTSJSONObject;
const fn = obj[methodName];
function getBanner(item: any): string { if (fn != null && typeof fn === "function") {
return props.logic.getPkg(item, "bannerImg") as string; (fn as () => void)();
}
} }
function onSwiperChange(e: any): void { function handleStart(): void {
props.logic.onSwiperChange(e); callExposedMethod(customerTypeRef.value as any, "open");
} }
function toDetail(_index: number): void { function onChooseCustomerType(index: number): void {
uni.showToast({ title: "套餐详情", icon: "none" }); logic.chooseCustomerType(homeRef.value as any, index);
} }
function handleStart(): void { function toDetail(index: number): void {
uni.navigateTo({ const item = logic.packageList.value[index];
url: "/pages/reception/record", if (item != null) {
fail: (e: any) => { logic.chooseItem.value = item as UTSJSONObject;
const err = e as NavigateToFailLike; callExposedMethod(packageRef.value as any, "open");
const msg = err.message !== null && err.message !== "" ? err.message : "";
console.error("[navigateTo] /pages/reception/record fail:", msg, JSON.stringify(e));
uni.showToast({ title: "跳转失败", icon: "none" });
} }
}); }
function closePackageDetail(): void {
logic.chooseItem.value = {};
} }
function updateHome(): void { function updateHome(): void {
const h = homeRef.value as null | UTSJSONObject; // 竖屏进入时也保持旧行为:如果需要自动跳转详情,复用逻辑层 jumpPage
if (h == null) return; logic.jumpPage(homeRef.value as any, "");
const fn = h["updateApp"];
if (fn != null && typeof fn === "function") {
(fn as () => void)();
}
} }
defineExpose({ defineExpose({
...@@ -110,75 +142,88 @@ defineExpose({ ...@@ -110,75 +142,88 @@ defineExpose({
height: 100%; height: 100%;
} }
.swiper-custom-wrap { .loading-wrap {
width: 100%; padding: 24px;
height: 100%;
} }
.package-swiper { .content-wrap {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.swiper-custom-content { .pkg-scroll {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: relative;
} }
.bg { .pkg-list {
position: absolute; padding: 24px;
display: flex;
flex-direction: column;
}
.pkg-card {
background: #ffffff;
border-radius: 16px;
overflow: hidden;
margin-bottom: 20px;
}
.pkg-cover {
width: 100%; width: 100%;
height: 100%; height: 180px;
top: 0;
left: 0;
z-index: -1;
} }
.swiper-dots { .pkg-main {
padding: 16px;
display: flex; display: flex;
flex-direction: row; flex-direction: column;
justify-content: center;
padding: 12px 0;
} }
.dot { .pkg-name {
width: 8px; font-size: 18px;
height: 8px; font-weight: 600;
border-radius: 4px; color: #111111;
background: #ccc;
margin: 0 4px;
} }
.dot.active { .pkg-brief {
background: #4673ff; margin-top: 8px;
font-size: 14px;
color: #666666;
} }
.swiper-empty, .pkg-price-row {
.swiper-loading { margin-top: 12px;
width: 100%;
height: 100%;
display: flex; display: flex;
flex-wrap: wrap;
align-items: center; align-items: center;
justify-content: center;
} }
.empty-text { .label {
font-size: 12px;
color: #999999;
margin-right: 6px;
}
.value {
font-size: 14px; font-size: 14px;
color: #999; color: #333333;
margin-right: 14px;
} }
.detail-content { .strong {
width: 100%; color: #e53935;
height: 100%; font-weight: 600;
}
.pkg-empty {
padding: 48px 24px;
display: flex; display: flex;
align-items: center;
justify-content: center; justify-content: center;
} }
.detail-title { .empty-text {
font-size: 24px; color: #999999;
color: #333; font-size: 14px;
} }
</style> </style>
<template> <template>
<layout-root> <layout-root>
<view class="page-container container"> <BoutiquePortrait v-if="isPortrait"
<HomeFrame ref="homeRef" ref="portraitRef"
:show-footer="true" :logic="logic" />
:swiper-custom="true" <BoutiqueLandscape v-else
@start="handleStart"> ref="landscapeRef"
<template #swiperCustom> :logic="logic" />
<view v-if="loadComplete" class="swiper-custom-wrap">
<view v-if="packageList.length > 0" class="swiper-custom-content">
<swiper class="package-swiper"
:current="currentSwiperIndex"
@change="onSwiperChange">
<swiper-item v-for="(item, idx) in packageList"
:key="idx"
@tap="toDetail(idx)">
<image v-if="getPkg(item, 'bannerImg')"
class="swiper-bg"
mode="aspectFill"
:src="getPkg(item, 'bannerImg')" />
<view class="swiper-name">
{{ getPkg(item, 'name') }}
</view>
<view class="swiper-content-box">
<view class="price price-1">
<text class="price-label">市场价</text>
<view class="num">
<text class="unit">¥</text>
<text>{{ getPkg(item, 'marketPrice') }}</text>
</view>
</view>
<view class="price price-2">
{{ getPkg(item, 'discountPrice') }}
</view>
<view class="price price-3">
<text class="price-label">套餐价</text>
<view class="num">
<text class="unit">¥</text>
<text>{{ getPkg(item, 'packagePrice') }}</text>
</view>
</view>
<view class="briefIntroduction">
{{ getPkg(item, 'briefIntroduction') }}
</view>
</view>
<view class="swiper-btn">
查看详情
</view>
</swiper-item>
</swiper>
<view class="swiper-dots">
<view v-for="(_, i) in packageList"
:key="i"
class="dot"
:class="[{ active: i == currentSwiperIndex }]" />
</view>
</view>
<view v-else class="swiper-empty">
<text class="empty-text">{{ swiperNoDataObject.text }}</text>
</view>
</view>
<view v-else class="swiper-loading">
<text>加载中...</text>
</view>
</template>
<template #detail>
<view class="detail-content">
<text class="detail-title">详情页</text>
</view>
</template>
</HomeFrame>
<CenterPopup ref="customerTypeRef"
:list="typeList"
title="请选择当前洽谈的客户类型"
@choose="chooseCustomerType" />
<PackageDetailPopup ref="packageRef" @close="closePackageDetail">
<view class="package-detail-box">
<view class="package-box">
<view class="package-name">
套餐内容
</view>
<view class="package-content">
<rich-text :nodes="chooseItem.content ?? ''"></rich-text>
</view>
</view>
<view class="package-box package-detail">
<view class="package-name">
套餐介绍
</view>
<view class="package-content">
<rich-text :nodes="chooseItem.scriptIntroduction ?? ''"></rich-text>
</view>
</view>
</view>
</PackageDetailPopup>
</view>
</layout-root> </layout-root>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
import { computed, ref } from "vue"; import { computed, ref } from "vue";
import { getBoutiquePackageList as apiGetBoutiquePackageList, getBoutiqueMaterialConfig } from "@/api/boutique-api.uts"; import BoutiqueLandscape from "@/pages/boutique/components/BoutiqueLandscape.uvue";
import { getEmployeeListApi } from "@/api/common-api.uts"; import BoutiquePortrait from "@/pages/boutique/components/BoutiquePortrait.uvue";
import { getBoutiqueMockData, getMockData } from "@/api/system-api.uts"; import { useBoutiqueLogic } from "@/pages/boutique/useBoutiqueLogic.uts";
import CenterPopup from "@/components/CenterPopup.uvue";
import HomeFrame from "@/components/HomeFrame/index.uvue";
import { layoutService } from "@/services/LayoutService.uts"; import { layoutService } from "@/services/LayoutService.uts";
import PackageDetailPopup from "@/pages/boutique/components/PackageDetailPopup.uvue";
import { dispatch, store } from "@/store/index.uts";
import { storage } from "@/utils/storage.uts";
// import { onLoad, onShow } from "@dcloudio/uni-app";
const _emptyArr: any[] = [] as any[];
const homeRef = ref(null);
const customerTypeRef = ref(null);
const packageRef = ref(null);
const loadComplete = ref<boolean>(false);
const requested = ref<boolean>(false);
const packageList = ref<any[]>([]);
const moduleList = ref<any[]>([]);
const toolList = ref<any[]>([]);
const chooseItem = ref<UTSJSONObject>({});
const id = ref<string>("");
const type = ref<string>("");
const customerType = ref<number>(-1);
const tabId = ref<number>(1);
const carBannerList = ref<any[]>([]);
const currentCarId = ref<string>("");
const currentSwiperIndex = ref<number>(0);
const defaultCarId = ref<string>("");
const swiperNoDataObject = { icon: "", text: "敬请期待" };
function getPkg(item: any, key: string): any {
if (item == null) return "";
const obj = item as UTSJSONObject;
const v = obj[key];
return v != null ? v : "";
}
function callExposedMethod(comp: any, methodName: string): void {
if (comp == null) return;
const obj = comp as UTSJSONObject;
const fn = obj[methodName];
if (fn != null) {
const f = fn as () => void;
f();
}
}
const typeList = [
{ title: "回店客户", describe: "客户已领精品券且已上牌完成\n交付安排客户当日回店提车", icon: "icon-customer-1" },
{ title: "现场客户", describe: "客户未领取精品券\n首次到店", icon: "icon-customer-2" }
];
function jumpPage(pid: string): void {
const list = carBannerList.value;
let carIndex = list.findIndex((e: any) => (e as UTSJSONObject).carModelId == defaultCarId.value);
if (list.length == 1 || carIndex < 0) carIndex = 0;
const mod0 = moduleList.value[0] as UTSJSONObject;
const mod0Id = mod0 != null ? mod0.id : null;
id.value = pid != "" ? pid : (mod0Id != null ? (mod0Id as any).toString() : "");
tabId.value = 1;
const carItem = list[carIndex];
currentCarId.value = carItem != null ? ((carItem as UTSJSONObject).carModelId ?? "") as string : "";
type.value = "edit";
if (homeRef.value != null) {
const h = homeRef.value as UTSJSONObject;
const showFn = h.showDetailPage;
if (showFn != null && typeof showFn === "function") {
;(showFn as () => void)();
}
}
}
function handleStart(): void {
const comp = customerTypeRef.value;
if (comp != null) {
const compObj = comp as UTSJSONObject;
const openFn = compObj.open;
if (openFn != null && typeof openFn === "function") {
;(openFn as () => void)();
}
}
}
function chooseCustomerType(index: number): void {
customerType.value = index;
if (index == 0) {
const ml = moduleList.value;
if (ml.length >= 3) {
const mid = (ml[2] as UTSJSONObject).id;
jumpPage(mid != null ? (mid as any).toString() : "");
} else {
jumpPage("");
}
} else {
jumpPage("");
}
}
function updateCurrentHome(): void {
if (layoutService.isMode("portrait")) {
const h = homeRef.value as null | UTSJSONObject;
const fn = h !== null ? h.updateApp : null;
if (fn !== null && typeof fn === "function") {
(fn as () => void)();
}
} else {
jumpPage("");
}
}
function toDetail(index: number): void {
const item = packageList.value[index];
if (item != null) {
chooseItem.value = item as UTSJSONObject;
packageRef.value != null && (packageRef.value as UTSJSONObject).open != null
? ((packageRef.value as UTSJSONObject).open as () => void)()
: null;
}
}
function closePackageDetail(): void {
chooseItem.value = {};
}
function onSwiperChange(e: any): void {
const detail = (e as UTSJSONObject).detail as null | UTSJSONObject;
if (detail != null) {
const cur = detail.current as null | number;
if (cur != null) currentSwiperIndex.value = cur;
}
}
async function init(): Promise<void> {
const userInfo = storage.get("userInfo") as null | UTSJSONObject;
if (userInfo == null) return;
const shopMerchantId = userInfo.shopMerchantId as null | string;
if (shopMerchantId == null) return;
customerType.value = -1;
getEmployeeListApi({ merchantId: shopMerchantId, sceneList: [1], appQGFlag: 1 })
.then((res: any) => {
dispatch("setEmployeeList", res);
})
.catch(() => {});
uni.showLoading({ title: "加载中", mask: true });
getBoutiqueMaterialConfig({ merchantId: shopMerchantId } as UTSJSONObject)
.then((res: any) => {
uni.hideLoading();
const resp = res as null | UTSJSONObject;
const materials = (resp != null && resp.materials != null ? resp.materials : _emptyArr) as any[];
const hidePackage = (resp != null ? resp.hidePackage : false) ?? false;
const boutiqueMediaConfig = {} as UTSJSONObject;
const carBannerListTemp: any[] = _emptyArr.slice();
const boutiqueCarListTemp: any[] = _emptyArr.slice();
for (const material of materials) {
const e = material as UTSJSONObject;
const eCarModelName = e.carModelName;
const eCarModelId = e.carModelId;
if (e != null && eCarModelName != null && eCarModelId != null) {
const configItems = [
{ key: "films", configIndex: 1 },
{ key: "products", configIndex: 2 }
];
if (hidePackage == false) configItems.unshift({ key: "packages", configIndex: 0 });
const retrofitting: any[] = _emptyArr.slice();
carBannerListTemp.push({
title: (e.seriesName ?? e.brandName ?? "") as string,
url: (e.modelDisplayPicurl ?? "") as string,
name: eCarModelName,
carModelId: eCarModelId,
seriesId: e.seriesId
});
boutiqueMediaConfig[eCarModelId as string] = {} as UTSJSONObject;
boutiqueCarListTemp.push({
carModelName: eCarModelName,
carModelId: eCarModelId,
brandId: e.brandId,
brandName: e.brandName,
name: e.seriesName,
id: e.seriesId
});
for (const it of configItems) {
const listVal = e[it.key as string];
retrofitting.push({
list: listVal != null ? listVal : _emptyArr,
tabId: (it.configIndex as number) + 1
});
}
const cfg = boutiqueMediaConfig[eCarModelId as string] as UTSJSONObject;
cfg.retrofitting = retrofitting;
cfg.optionals = e.optionals != null ? e.optionals : _emptyArr;
}
}
const withConfig = carBannerListTemp.map((c: any) => {
const cid = (c as UTSJSONObject).carModelId;
const cfg = boutiqueMediaConfig[cid as string] as UTSJSONObject
;(c as UTSJSONObject).configList = cfg != null && cfg.retrofitting != null ? cfg.retrofitting : _emptyArr;
return c;
});
carBannerList.value = withConfig;
const userState = (store.state as UTSJSONObject).user as UTSJSONObject;
userState.boutiqueMediaConfig = boutiqueMediaConfig;
userState.boutiqueCarList = boutiqueCarListTemp;
})
.catch((error) => {
uni.hideLoading();
uni.showToast({ title: error != null ? (error as any).toString() : "加载失败", icon: "none" });
});
const baseConfigData = await getBoutiqueMockData(true);
const ml = baseConfigData.moduleList != null ? baseConfigData.moduleList : _emptyArr;
const tl = baseConfigData.toolList != null ? baseConfigData.toolList : _emptyArr;
const dc = baseConfigData.defaultCarId ?? "";
dispatch("setBoutiqueBaseConfig", baseConfigData);
moduleList.value = ml as any[];
toolList.value = tl as any[];
defaultCarId.value = dc as string;
}
async function getBoutiquePackageList(): Promise<void> {
loadComplete.value = false;
packageList.value = [];
const userInfo = storage.get("userInfo") as null | UTSJSONObject;
if (userInfo == null) return;
const merchantId = userInfo.shopMerchantId as null | string;
if (merchantId == null) return;
try {
const data = await apiGetBoutiquePackageList({ merchantId } as UTSJSONObject);
const arr = (data != null ? data : _emptyArr) as any[];
const list: any[] = _emptyArr.slice();
for (const element of arr) {
const e = element as UTSJSONObject;
if (e != null) {
let intro = e.scriptIntroduction as null | string;
if (intro == null) intro = "";
intro = intro.replace(/<\/?br\s*\/?>|\\n|\n/g, "<br>");
e.scriptIntroduction = intro;
let content = e.content as null | string;
if (content == null) content = "";
content = content.replace(/<\/?br\s*\/?>|\\n|\n/g, "<br>");
e.content = content;
if (e.marketPrice != null) { const logic = useBoutiqueLogic();
e.marketPrice = Number.parseFloat((e.marketPrice as any).toString()).toString(); const isPortrait = computed(() => layoutService.isMode("portrait"));
}
if (e.packagePrice != null) {
e.packagePrice = Number.parseFloat((e.packagePrice as any).toString()).toString();
}
list.push(e);
}
}
packageList.value = list;
loadComplete.value = true;
} catch (error) {
loadComplete.value = true;
}
}
onLoad((_options: OnLoadOptions) => { // 注意:UTS 运行时对组件实例的类型转换较严格(容易触发 ClassCastException)。
uni.hideLoading(); // 这里不再通过父组件 ref 去调用子组件 expose 方法,避免运行时崩溃。
}); const landscapeRef = ref(null);
const portraitRef = ref(null);
onShow(async () => { onShow(async () => {
const userInfo = storage.get("userInfo"); if (logic.ensureLoginOrRelauch() === false) return;
if (userInfo == null) { await logic.initIfNeeded();
storage.remove("userInfo"); logic.getBoutiquePackageList();
storage.remove("sessionId");
uni.reLaunch({ url: "/pages/common/login/index" });
return;
}
const userInfoObj = userInfo as UTSJSONObject;
const shopMerchantId = userInfoObj.shopMerchantId as null | string;
const shopMerchantName = userInfoObj.shopMerchantName as null | string;
if (shopMerchantId == null || shopMerchantId == "" || shopMerchantName == null || shopMerchantName == "") {
storage.remove("userInfo");
storage.remove("sessionId");
uni.reLaunch({ url: "/pages/common/login/index" });
return;
}
if (!requested.value) {
await getMockData(true);
init();
requested.value = true;
}
getBoutiquePackageList();
setTimeout((): void => {
updateCurrentHome();
}, 0);
}); });
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page-container { /* 入口页不承载具体样式,样式下沉到横竖屏组件 */
width: 100%;
height: 100%;
}
.container {
position: relative;
}
.swiper-custom-wrap {
width: 100%;
height: 100%;
position: relative;
}
.swiper-custom-content {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.package-swiper {
flex: 1;
width: 100%;
}
.swiper-bg {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: -1;
}
.swiper-name {
padding-top: var(--l-spacing-lg);
text-indent: 67px;
color: #333;
font-size: var(--l-font-base);
font-weight: 500;
}
.swiper-content-box {
margin: var(--l-spacing-md) var(--l-spacing-xl) 0;
height: 132px;
position: relative;
}
.swiper-content-box .price,
.swiper-content-box .briefIntroduction {
position: absolute;
}
.price-1 {
color: #999;
font-size: 10px;
left: var(--l-spacing-xl);
top: 32px;
width: 97px;
text-align: center;
}
.price-1 .num {
color: #333;
font-size: var(--l-font-base);
font-weight: 700;
display: flex;
justify-content: center;
}
.price-1 .unit {
margin-right: 4px;
}
.price-2 {
left: 129px;
top: 48px;
width: 94px;
color: #ff4747;
font-size: var(--l-font-lg);
font-weight: 700;
display: flex;
justify-content: center;
}
.price-3 {
top: 27px;
left: 228px;
color: #999;
font-size: 14px;
width: 148px;
text-align: center;
}
.price-3 .num {
color: #ff4747;
font-size: 22px;
font-weight: 700;
display: flex;
justify-content: center;
}
.price-3 .unit {
margin-right: 8px;
}
.briefIntroduction {
left: 0;
top: 106px;
color: #666;
font-size: 12px;
width: 100%;
text-align: center;
}
.swiper-btn {
color: #4673ff;
font-size: 13px;
text-align: center;
margin-top: var(--l-spacing-md);
}
.swiper-dots {
display: flex;
flex-direction: row;
justify-content: center;
padding: var(--l-spacing-sm) 0;
}
.dot {
width: 8px;
height: 8px;
border-radius: 4px;
background: #ccc;
margin: 0 4px;
}
.dot.active {
background: #4673ff;
}
.swiper-empty,
.swiper-loading {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.empty-text {
font-size: var(--l-font-sm);
color: #999;
}
.detail-content {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.detail-title {
font-size: var(--l-font-2xl);
color: #333;
}
.package-detail-box {
padding-bottom: 50px;
margin: 0 var(--l-spacing-xl);
}
.package-box {
border-radius: var(--l-radius-xl);
background: #ffffff;
box-shadow: 0 6px 24px rgba(44, 102, 247, 0.15);
margin-bottom: var(--l-spacing-xl);
box-sizing: border-box;
padding: var(--l-spacing-xl);
}
.package-name {
color: #333;
font-size: var(--l-font-xl);
font-weight: 500;
line-height: 28px;
margin-bottom: var(--l-spacing-md);
}
.package-content {
line-height: 22px;
color: #333;
font-size: 14px;
}
.package-detail {
border: 2px solid rgba(70, 115, 255, 0.5);
background: rgba(70, 115, 255, 0.1);
box-shadow: 0 6px 24px rgba(44, 102, 247, 0.15);
}
.package-detail .package-name {
color: #4673ff;
}
</style> </style>
<template>
<!-- 兼容旧路由:统一跳转到单入口 /pages/boutique/index,由入口页内部决定横竖屏 -->
<view class="redirect-placeholder"></view>
</template>
<script setup lang="uts">
import { ComponentPublicInstance, ref } from "vue";
import { storage } from "@/utils/storage.uts";
// 不显式导入 onLoad/onShow,避免与编译器生成的 BasePage 构造函数中的 onLoad 冲突(error18)
// import { onLoad, onShow } from "@dcloudio/uni-app";
const homeRef = ref(null);
function redirect(): void {
uni.reLaunch({ url: "/pages/boutique/index" });
}
onLoad((_options: OnLoadOptions) => {
uni.hideLoading();
redirect();
});
onShow(() => {
const userInfo = storage.get("userInfo");
if (userInfo == null) {
storage.remove("userInfo");
storage.remove("sessionId");
uni.reLaunch({ url: "/pages/common/login/index" });
return;
}
const userInfoObj = userInfo as UTSJSONObject;
const shopMerchantId = userInfoObj.shopMerchantId as null | string;
const shopMerchantName = userInfoObj.shopMerchantName as null | string;
if (shopMerchantId == null || shopMerchantId == "" || shopMerchantName == null || shopMerchantName == "") {
storage.remove("userInfo");
storage.remove("sessionId");
uni.reLaunch({ url: "/pages/common/login/index" });
return;
}
if (homeRef.value != null) {
(homeRef.value as ComponentPublicInstance).$callMethod("updateApp");
}
});
</script>
<style scoped lang="scss">
.redirect-placeholder {
width: 100%;
height: 100%;
}
</style>
import { ref, type Ref } from "vue"; import { ref, type Ref } from "vue";
import { getBoutiquePackageList as apiGetBoutiquePackageList, getBoutiqueMaterialConfig } from "@/api/boutique-api.uts"; import { getBoutiquePackageList as apiGetBoutiquePackageList, getBoutiqueMaterialConfig } from "@/api/boutique-api.uts";
import { getEmployeeList } from "@/api/common-api.uts"; import { getEmployeeListApi } from "@/api/common-api.uts";
import { getBoutiqueMockData, getMockData } from "@/api/system-api.uts"; import { getBoutiqueMockData, getMockData } from "@/api/system-api.uts";
import { dispatch, store } from "@/store/index.uts"; import { dispatch, store } from "@/store/index.uts";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
...@@ -116,7 +116,12 @@ export function useBoutiqueLogic(): BoutiqueLogic { ...@@ -116,7 +116,12 @@ export function useBoutiqueLogic(): BoutiqueLogic {
tabId.value = 1; tabId.value = 1;
const carItem = list.length > 0 ? list[carIndex] : null; const carItem = list.length > 0 ? list[carIndex] : null;
currentCarId.value = carItem != null ? ((carItem as UTSJSONObject).carModelId ?? "") as string : ""; if (carItem != null) {
const cid = (carItem as UTSJSONObject).carModelId as null | string;
currentCarId.value = cid != null ? cid : "";
} else {
currentCarId.value = "";
}
// 通知 HomeFrame 进入详情(具体 id/type 等仍在横屏组件内维护) // 通知 HomeFrame 进入详情(具体 id/type 等仍在横屏组件内维护)
if (homeFrameRef != null) { if (homeFrameRef != null) {
...@@ -153,6 +158,9 @@ export function useBoutiqueLogic(): BoutiqueLogic { ...@@ -153,6 +158,9 @@ export function useBoutiqueLogic(): BoutiqueLogic {
if (!ensureLoginOrRelauch()) return; if (!ensureLoginOrRelauch()) return;
if (requested.value) return; if (requested.value) return;
// 用页面骨架屏承接加载态,不再弹全屏 showLoading
loadComplete.value = false;
await getMockData(true); await getMockData(true);
const userInfo = storage.get("userInfo") as null | UTSJSONObject; const userInfo = storage.get("userInfo") as null | UTSJSONObject;
...@@ -162,20 +170,17 @@ export function useBoutiqueLogic(): BoutiqueLogic { ...@@ -162,20 +170,17 @@ export function useBoutiqueLogic(): BoutiqueLogic {
customerType.value = -1; customerType.value = -1;
getEmployeeList({ merchantId: shopMerchantId, sceneList: [1], appQGFlag: 1 }) try {
.then((res: any) => { const res = await getEmployeeListApi({ merchantId: shopMerchantId, sceneList: [1], appQGFlag: 1 } as UTSJSONObject);
dispatch("setEmployeeList", res); dispatch("setEmployeeList", res);
}) } catch (_e) {}
.catch(() => {});
uni.showLoading({ title: "加载中", mask: true });
getBoutiqueMaterialConfig({ merchantId: shopMerchantId } as UTSJSONObject) try {
.then((res: any) => { const res: any = await getBoutiqueMaterialConfig({ merchantId: shopMerchantId } as UTSJSONObject);
uni.hideLoading();
const resp = res as null | UTSJSONObject; const resp = res as null | UTSJSONObject;
const materials = (resp != null && resp.materials != null ? resp.materials : _emptyArr) as any[]; const materials = (resp != null && resp.materials != null ? resp.materials : _emptyArr) as any[];
const hidePackage = (resp != null ? resp.hidePackage : false) ?? false; const hidePackageAny = resp != null ? (resp.hidePackage as any) : null;
const hidePackage = hidePackageAny != null ? (hidePackageAny as boolean) : false;
const boutiqueMediaConfig = {} as UTSJSONObject; const boutiqueMediaConfig = {} as UTSJSONObject;
const carBannerListTemp: any[] = _emptyArr.slice(); const carBannerListTemp: any[] = _emptyArr.slice();
const boutiqueCarListTemp: any[] = _emptyArr.slice(); const boutiqueCarListTemp: any[] = _emptyArr.slice();
...@@ -192,9 +197,13 @@ export function useBoutiqueLogic(): BoutiqueLogic { ...@@ -192,9 +197,13 @@ export function useBoutiqueLogic(): BoutiqueLogic {
if (hidePackage == false) configItems.unshift({ key: "packages", configIndex: 0 }); if (hidePackage == false) configItems.unshift({ key: "packages", configIndex: 0 });
const retrofitting: any[] = _emptyArr.slice(); const retrofitting: any[] = _emptyArr.slice();
const seriesName = m.seriesName as null | string;
const brandName = m.brandName as null | string;
const modelPic = m.modelDisplayPicurl as null | string;
carBannerListTemp.push({ carBannerListTemp.push({
title: (m.seriesName ?? m.brandName ?? "") as string, title: seriesName != null ? seriesName : brandName != null ? brandName : "",
url: (m.modelDisplayPicurl ?? "") as string, url: modelPic != null ? modelPic : "",
name: mCarModelName, name: mCarModelName,
carModelId: mCarModelId, carModelId: mCarModelId,
seriesId: m.seriesId seriesId: m.seriesId
...@@ -232,22 +241,22 @@ export function useBoutiqueLogic(): BoutiqueLogic { ...@@ -232,22 +241,22 @@ export function useBoutiqueLogic(): BoutiqueLogic {
const userState = (store.state as UTSJSONObject).user as UTSJSONObject; const userState = (store.state as UTSJSONObject).user as UTSJSONObject;
userState.boutiqueMediaConfig = boutiqueMediaConfig; userState.boutiqueMediaConfig = boutiqueMediaConfig;
userState.boutiqueCarList = boutiqueCarListTemp; userState.boutiqueCarList = boutiqueCarListTemp;
}) } catch (error) {
.catch((error) => {
uni.hideLoading();
uni.showToast({ title: error != null ? (error as any).toString() : "加载失败", icon: "none" }); uni.showToast({ title: error != null ? (error as any).toString() : "加载失败", icon: "none" });
}); }
const baseConfigData = await getBoutiqueMockData(true); const baseConfigData = await getBoutiqueMockData(true);
const ml = baseConfigData.moduleList != null ? baseConfigData.moduleList : _emptyArr; const ml = baseConfigData.moduleList != null ? baseConfigData.moduleList : _emptyArr;
const tl = baseConfigData.toolList != null ? baseConfigData.toolList : _emptyArr; const tl = baseConfigData.toolList != null ? baseConfigData.toolList : _emptyArr;
const dc = baseConfigData.defaultCarId ?? ""; const dcAny = baseConfigData.defaultCarId as any;
const dc = dcAny != null ? (dcAny as any).toString() : "";
dispatch("setBoutiqueBaseConfig", baseConfigData); dispatch("setBoutiqueBaseConfig", baseConfigData);
moduleList.value = ml as any[]; moduleList.value = ml as any[];
toolList.value = tl as any[]; toolList.value = tl as any[];
defaultCarId.value = dc as string; defaultCarId.value = dc as string;
requested.value = true; requested.value = true;
loadComplete.value = true;
}; };
const getBoutiquePackageList = async (): Promise<void> => { const getBoutiquePackageList = async (): Promise<void> => {
...@@ -274,7 +283,8 @@ export function useBoutiqueLogic(): BoutiqueLogic { ...@@ -274,7 +283,8 @@ export function useBoutiqueLogic(): BoutiqueLogic {
arr = raw as any[]; arr = raw as any[];
} else { } else {
const obj = raw as UTSJSONObject; const obj = raw as UTSJSONObject;
const listVal = obj["list"] ?? obj["data"]; let listVal = obj["list"];
if (listVal == null) listVal = obj["data"];
arr = (listVal != null && Array.isArray(listVal) ? listVal : _emptyArr) as any[]; arr = (listVal != null && Array.isArray(listVal) ? listVal : _emptyArr) as any[];
} }
} }
...@@ -282,12 +292,24 @@ export function useBoutiqueLogic(): BoutiqueLogic { ...@@ -282,12 +292,24 @@ export function useBoutiqueLogic(): BoutiqueLogic {
for (const element of arr) { for (const element of arr) {
const e = element as UTSJSONObject; const e = element as UTSJSONObject;
if (e != null) { if (e != null) {
let scriptIntro = e.scriptIntroduction as any;
if (scriptIntro == null) scriptIntro = "";
let content = e.content as any;
if (content == null) content = "";
// eslint-disable-next-line unicorn/prefer-string-replace-all // eslint-disable-next-line unicorn/prefer-string-replace-all
e.scriptIntroduction = ((e.scriptIntroduction ?? "") as string).replace(/<\/?br\s*\/?>|\\n|\n/g, "<br>"); e.scriptIntroduction = (scriptIntro as string).replace(/<\/?br\s*\/?>|\\n|\n/g, "<br>");
// eslint-disable-next-line unicorn/prefer-string-replace-all // eslint-disable-next-line unicorn/prefer-string-replace-all
e.content = ((e.content ?? "") as string).replace(/<\/?br\s*\/?>|\\n|\n/g, "<br>"); e.content = (content as string).replace(/<\/?br\s*\/?>|\\n|\n/g, "<br>");
const pkgType = (e.type != null ? (e.type as any).toString() : "2") as string; const pkgType = (e.type != null ? (e.type as any).toString() : "2") as string;
const defaultBanner = (packageTypeBanner[pkgType] ?? packageTypeBanner["2"]) as string | null; let defaultBanner = "" as string;
const b1 = packageTypeBanner[pkgType] as null | string;
if (b1 != null && b1 != "") {
defaultBanner = b1;
} else {
const b2 = packageTypeBanner["2"] as null | string;
defaultBanner = b2 != null ? b2 : "";
}
if ((e.bannerImg == null || (e.bannerImg as string) == "") && defaultBanner != null) { if ((e.bannerImg == null || (e.bannerImg as string) == "") && defaultBanner != null) {
e.bannerImg = defaultBanner; e.bannerImg = defaultBanner;
} }
......
...@@ -67,13 +67,13 @@ ...@@ -67,13 +67,13 @@
<scroll-view class="list" <scroll-view class="list"
direction="vertical" direction="vertical"
:show-scrollbar="true"> :show-scrollbar="true">
<AccountList v-show="stepIndex == 0" <AccountList v-if="stepIndex == 0"
ref="accountRef" ref="accountRef"
@choose-account="chooseAccount" /> @choose-account="chooseAccount" />
<MerchantList v-show="stepIndex == 1" <MerchantList v-else-if="stepIndex == 1"
ref="merchantRef" ref="merchantRef"
@choose-merchant="chooseMerchant" /> @choose-merchant="chooseMerchant" />
<Scene v-show="stepIndex == 2" <Scene v-else
ref="sceneRef" /> ref="sceneRef" />
</scroll-view> </scroll-view>
</view> </view>
......
<template> <template>
<view class="box" v-if="flag"> <!-- 保持单根节点,确保父组件 v-show 生效 -->
<view>
<view v-if="!flag" class="skeleton-wrap">
<un-skeleton :loading="true" :animate="true" title avatar rows="6"></un-skeleton>
</view>
<view v-else class="box">
<template v-if="loginUserInfoList.length > 0"> <template v-if="loginUserInfoList.length > 0">
<view <view
v-for="(item, index) in loginUserInfoList" v-for="(item, index) in loginUserInfoList"
...@@ -23,6 +28,7 @@ ...@@ -23,6 +28,7 @@
<no-data /> <no-data />
</template> </template>
</view> </view>
</view>
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
...@@ -166,7 +172,7 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI ...@@ -166,7 +172,7 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI
console.log(`选择账号${merchantName}登录!`) console.log(`选择账号${merchantName}登录!`)
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
mask: true mask: false
}) })
const params: UTSJSONObject = { const params: UTSJSONObject = {
...@@ -292,7 +298,7 @@ function getListSelectAccount(autoLogin: boolean): void { ...@@ -292,7 +298,7 @@ function getListSelectAccount(autoLogin: boolean): void {
uni.showLoading({ uni.showLoading({
title: '加载中', title: '加载中',
mask: true mask: false
}) })
const params: UTSJSONObject = {} const params: UTSJSONObject = {}
...@@ -394,6 +400,10 @@ onMounted(() => { ...@@ -394,6 +400,10 @@ onMounted(() => {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.skeleton-wrap {
padding: 24px;
}
.box { .box {
display: flex; display: flex;
align-items: center; align-items: center;
......
<template> <template>
<view v-if="!flag" class="skeleton-wrap">
<un-skeleton :loading="true" :animate="true" title avatar rows="6"></un-skeleton>
</view>
<view v-if="flag" class="box"> <view v-if="flag" class="box">
<template v-if="loginUserInfoList.length > 0"> <template v-if="loginUserInfoList.length > 0">
<view <view
...@@ -161,7 +164,7 @@ function getSceneArr(shopMerchantId: string): Promise<number[]> { ...@@ -161,7 +164,7 @@ function getSceneArr(shopMerchantId: string): Promise<number[]> {
function chooseMerchantItem(item: MerchantItem): void { function chooseMerchantItem(item: MerchantItem): void {
console.log('选择4s店' + item.merchantName + '!') console.log('选择4s店' + item.merchantName + '!')
uni.showLoading({ title: '加载中', mask: true }) uni.showLoading({ title: '加载中', mask: false })
const list = loginUserInfoList.value const list = loginUserInfoList.value
let i = 0 let i = 0
...@@ -187,7 +190,7 @@ function getMerchantList(): void { ...@@ -187,7 +190,7 @@ function getMerchantList(): void {
return return
} }
uni.showLoading({ title: '加载中', mask: true }) uni.showLoading({ title: '加载中', mask: false })
const isSuper = currentUserInfo['isSuper'] as boolean | null const isSuper = currentUserInfo['isSuper'] as boolean | null
const params: UTSJSONObject = { const params: UTSJSONObject = {
...@@ -285,6 +288,10 @@ defineExpose({ ...@@ -285,6 +288,10 @@ defineExpose({
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.skeleton-wrap {
padding: 24px;
}
.box { .box {
display: flex; display: flex;
align-items: center; align-items: center;
......
<template> <template>
<view class="box"> <view v-if="loading" class="skeleton-wrap">
<un-skeleton :loading="true" :animate="true" title avatar rows="3"></un-skeleton>
</view>
<view v-else class="box">
<view v-for="(item, index) in sceneList" <view v-for="(item, index) in sceneList"
:key="index" :key="index"
class="items" class="items"
...@@ -35,6 +38,8 @@ const sceneList = ref<SceneItem[]>([ ...@@ -35,6 +38,8 @@ const sceneList = ref<SceneItem[]>([
{ sceneName: "二手车", sceneDesc: "二手车业务", sceneType: 7, actived: false } { sceneName: "二手车", sceneDesc: "二手车业务", sceneType: 7, actived: false }
]); ]);
const loading = ref<boolean>(true);
let userInfo: null | UTSJSONObject = null; let userInfo: null | UTSJSONObject = null;
let jumpTimer: number = 0; let jumpTimer: number = 0;
...@@ -63,7 +68,8 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -63,7 +68,8 @@ function jump(info: UTSJSONObject, data: any | null): void {
return; return;
} }
uni.showLoading({ title: "加载中", mask: true }); // 这里的全屏 loading 会挡住后续页面的骨架屏;改为不加 mask
uni.showLoading({ title: "加载中", mask: false });
console.log(`调用 getMerchantBrand, merchantId: ${ shopMerchantId}`); console.log(`调用 getMerchantBrand, merchantId: ${ shopMerchantId}`);
apiGetMerchantBrand({ merchantId: shopMerchantId }).then((res: any): void => { apiGetMerchantBrand({ merchantId: shopMerchantId }).then((res: any): void => {
...@@ -102,6 +108,10 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -102,6 +108,10 @@ function jump(info: UTSJSONObject, data: any | null): void {
} }
console.log(`准备跳转: ${ url}`); console.log(`准备跳转: ${ url}`);
// 跳转到精品页时,用页面内骨架屏承接加载态,避免全屏 loading 挡住骨架
if (url == "/pages/boutique/index") {
uni.hideLoading();
}
uni.reLaunch({ url }); uni.reLaunch({ url });
}).catch((error) => { }).catch((error) => {
uni.hideLoading(); uni.hideLoading();
...@@ -127,6 +137,9 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -127,6 +137,9 @@ function jump(info: UTSJSONObject, data: any | null): void {
} }
} }
console.log(`准备跳转(catch): ${ url}`); console.log(`准备跳转(catch): ${ url}`);
if (url == "/pages/boutique/index") {
uni.hideLoading();
}
uni.reLaunch({ url }); uni.reLaunch({ url });
}); });
} }
...@@ -134,6 +147,7 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -134,6 +147,7 @@ function jump(info: UTSJSONObject, data: any | null): void {
function init(info: any): void { function init(info: any): void {
// 将 any 转换为 UTSJSONObject // 将 any 转换为 UTSJSONObject
userInfo = info as UTSJSONObject; userInfo = info as UTSJSONObject;
loading.value = false;
console.log("进入选择场景页!"); console.log("进入选择场景页!");
const openSceneArr = userInfo.openSceneArr; const openSceneArr = userInfo.openSceneArr;
console.log(`init - openSceneArr type: ${ typeof openSceneArr}`); console.log(`init - openSceneArr type: ${ typeof openSceneArr}`);
...@@ -185,7 +199,8 @@ function selectScene(item: SceneItem, index: number): void { ...@@ -185,7 +199,8 @@ function selectScene(item: SceneItem, index: number): void {
userInfo.sceneType = sceneType; userInfo.sceneType = sceneType;
uni.showLoading({ title: "加载中", mask: true }); // 用页面内骨架/内容承接加载态,避免全屏遮罩挡住后续页面骨架
uni.showLoading({ title: "加载中", mask: false });
if (isSuper == true) { if (isSuper == true) {
jump(userInfo, null); jump(userInfo, null);
...@@ -213,6 +228,10 @@ defineExpose({ ...@@ -213,6 +228,10 @@ defineExpose({
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.skeleton-wrap {
padding: 24px;
}
.box { .box {
display: flex; display: flex;
align-items: center; align-items: center;
......
export { useUpload } from "./useUpload";
export { useCountDown } from "./useCountDown";
export { useCodeTimer } from "./useCodeTimer";
export { useStorage } from "./useStorage";
export { useTheme, initTheme } from "./useTheme";
import type { UnUseCodeTimer, UnCodeTimerOptions } from "../types/index";
export declare function useCodeTimer(options: UnCodeTimerOptions): UnUseCodeTimer;
import type { UnUseCountDown, UnCountDownOptions } from "../types/index";
export declare function useCountDown(options: UnCountDownOptions): UnUseCountDown;
declare class Storage {
private prefix;
constructor(prefix?: string);
/**
* 获取带前缀的键名
* @param key - 原始键名
* @returns 带前缀的键名
*/
getKeyWithPrefix(key: string): string;
/**
* 检查数据是否过期
* @param expire - 过期时间戳(毫秒)
* @returns 是否已过期
*/
isExpired(expire: number): boolean;
/**
* 转换过期时间为毫秒
* @param expire - 过期时间(秒或毫秒)
* @returns 过期时间(毫秒)
*/
getExpireTime(expire?: number): number;
/**
* 存储数据
* @param key - 存储键名
* @param value - 存储的值
* @param expire - 过期时间(秒),可选
*/
set(key: string, value: any, expire?: number): void;
/**
* 获取数据
* @param key - 存储键名
* @param defaultValue - 默认值,可选
* @returns 存储的值或默认值
*/
get<T = any>(key: string, defaultValue?: any): T;
/**
* 检查键是否存在且未过期
* @param key - 存储键名
* @returns boolean
*/
has(key: string): boolean;
/**
* 删除数据
* @param key - 存储键名
*/
remove(key: string): void;
/**
* 清空命名空间内的所有存储数据
*/
clear(): void;
/**
* 获取所有存储的键名
* @returns string[]
*/
keys(): string[];
/**
* 获取命名空间内的项数量
*/
get size(): number;
/**
* 删除数据(别名)
* @param key - 存储键名
*/
delete(key: string): void;
}
/**
* 基于uniapp的数据存储
* @param prefix - 存储键的前缀,默认空字符串
* @returns Storage 实例
*/
export declare function useStorage(prefix?: string): Storage;
export {};
import { UnUseTheme } from "../types/index";
export declare const themeStore: UTSJSONObject;
export declare const initTheme: any;
export declare const initTheme: (app: VueApp, themeJson: UTSJSONObject) => void;
export declare function useTheme(): UnUseTheme;
import type { UnUseUpload } from "../types/index";
export declare function useUpload(): UnUseUpload;
export * from "./types/index";
export * from "./utils/index";
export * from "./utils/dayjs";
export * from "./utils/request";
export * from "./utils/validator";
export * from "./utils/calendar";
export * from "./utils/area";
export * from "./utils/uarray";
export * from "./utils/ustyle";
export * from "./utils/ucolor";
export * from "./utils/openLink";
export * from "./composables/index";
import type { Ref } from 'vue';
export type AvatarGroupProvide = {
children: Ref<number[]>;
props: UnAvatarGroupComponentPublicInstance;
};
export type TableProvide = {
props: UnTableComponentPublicInstance;
registerColumn?: (col: any) => number;
unregisterColumn?: (index: number) => void;
};
export type StepsProvide = {
children: Ref<number[]>;
props: UnStepsComponentPublicInstance;
};
export type TabbarProvide = {
props: UnTabbarComponentPublicInstance;
children: Ref<number[]>;
safeAreaInsets: number;
onChange: (name: string | number) => void;
};
export type RowProvide = {
props: UnRowComponentPublicInstance;
};
export type RadioGroupProvide = {
props: UnRadioGroupComponentPublicInstance;
children: Ref<number[]>;
onChange: (name: string | number) => void;
};
export type FormItemProvide = {
uid: number;
prop: string;
updateValidate: (msg: string) => void;
};
export type FormProvide = {
children: Ref<FormItemProvide[]>;
props: UnFormComponentPublicInstance;
};
export type ValidateFunc = (trigger: string) => void;
export type DropdownItemProvide = {
close: () => void;
open: () => void;
uid: number;
};
export type DropdownProvide = {
children: Ref<DropdownItemProvide[]>;
props: UnDropdownComponentPublicInstance;
};
export type GridProvide = {
children: Ref<number[]>;
props: UnGridComponentPublicInstance;
};
export type CollapseProvide = {
props: UnCollapseComponentPublicInstance;
children: Ref<CollapseItemProvide[]>;
};
export type CollapseItemProvide = {
close: () => void;
open: () => void;
uid: number;
name: string | number;
};
export type CheckboxGroupProvide = {
props: UnCheckboxGroupComponentPublicInstance;
children: Ref<number[]>;
onChange: (value: Array<string | number>) => void;
};
export type CellGroupProvide = {
children: Ref<number[]>;
props: UnCellGroupComponentPublicInstance;
};
export type CalendarExtend = {
date: string;
bottomInfo?: string;
bottomInfoColor?: string;
bgColor?: string;
textColor?: string;
round?: string | number;
badge?: boolean;
badgeStyle?: object;
badgeText?: string;
badgeTextColor?: string;
badgeTextSize?: string | number;
badgeSize?: string | number;
badgeRound?: string | number;
badgeOffset?: Array<number>;
badgeColor?: string;
isDot?: boolean;
badgePosition?: 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
disable?: boolean;
};
export type SegmentedProvide = {
children: Ref<number[]>;
itemWidth: Ref<number>;
itemHeight: Ref<number>;
props: UnSegmentedComponentPublicInstance;
};
export type UnActionSheetAction = {
name?: string;
subname?: string;
disabled?: boolean;
loading?: boolean;
fontSize?: string | number;
openType?: string;
color?: string;
};
export type UnActionSheetFail = {
errCode: number;
errSubject: string;
errMsg: string;
};
export type UnActionSheetSelectEvent = {
index: number;
item: UnActionSheetAction;
};
export type UnActionSheetOptions = {
title?: string;
titleStyle?: object;
description?: string;
actions?: UnActionSheetAction[];
cancelText?: string;
closeable?: boolean;
closeOnClickAction?: boolean;
safeAreaInsetBottom?: boolean;
openType?: string;
closeOnClickOverlay?: boolean;
round?: string | number;
height?: string | number;
lang?: string;
sessionFrom?: string;
sendMessageTitle?: string;
sendMessagePath?: string;
sendMessageImg?: string;
showMessageCard?: boolean;
appParameter?: string;
success?: () => void;
cancel?: () => void;
fail?: (result: UnActionSheetFail) => void;
};
export type UnCascaderOption = {
text: string;
value: string | number;
children?: UnCascaderOption[];
};
export type UnCascaderChangeEvent = {
text: string;
value: string | number;
index: number;
items: UnCascaderOption[];
};
export type UnCascaderConfirmEvent = {
text: Array<string>;
value: Array<string | number>;
items: UnCascaderOption[];
};
export type UnColorPickerChangeEvent = {
color: Array<string | number>;
value: string;
format: string;
};
export type UnColorPickerConfirmEvent = {
color: Array<string | number>;
value: string;
format: string;
};
export type UnColorPickerOptions = {
label: string;
colors: string[];
};
export type UnDropdownOption = {
label: string;
value: string | number;
disabled?: boolean;
};
export type UnDatetimePickerEvent = {
mode: string;
value: string | number;
};
export type UnPickerColumnItem = {
id?: any;
text: string;
value: string | number;
disabled?: boolean;
children?: UnPickerColumn;
};
export type UnPickerColumn = UnPickerColumnItem[];
export type UnPickerChangeEvent = {
index: number;
indexs: number[];
columnIndex: number;
values: UnPickerColumn[];
value: UnPickerColumnItem[];
};
export type UnPickerConfirmEvent = {
indexs: number[];
value: UnPickerColumnItem[];
values: UnPickerColumn[];
};
export type UnNumberBoxChangeEvent = {
name: string | number;
value: number;
};
export type UnShowModalFail = {
errCode: number;
errSubject: string;
errMsg: string;
};
export type UnShowModalResult = {
cancel: boolean;
confirm: boolean;
};
export type UnModalOptions = {
title?: string;
content?: string;
confirmText?: string;
cancelText?: string;
showConfirmButton?: boolean;
showCancelButton?: boolean;
confirmColor?: string;
cancelColor?: string;
buttonReverse?: boolean;
confirmBgColor?: string;
cancelBgColor?: string;
buttonRadius?: string;
buttonModel?: string;
zoom?: boolean;
zIndex?: string | number;
asyncClose?: boolean;
closeable?: boolean;
closeOnClickOverlay?: boolean;
negativeTop?: string | number;
width?: string | number;
confirmButtonShape?: string;
duration?: string | number;
round?: string;
success?: (result: UnShowModalResult) => void;
fail?: (result: UnShowModalFail) => void;
customStyle?: string | object;
};
export type UnShowNotifyFail = {
errCode: number;
errSubject: string;
errMsg: string;
};
export type UnNotifyOptions = {
top?: string | number;
type?: string;
color?: string;
bgColor?: string;
message?: string;
duration?: string | number;
fontSize?: string | number;
safeAreaInsetTop?: boolean;
zIndex?: string | number;
success?: () => void;
fail?: (result: UnShowNotifyFail) => void;
customStyle?: string | object;
};
export type UnSelectOption = {
text: string;
value: string | number;
disabled?: boolean;
};
export type UnWatermarkOption = {
text?: string;
fontSize?: string | number;
fontFamily?: string;
color?: string;
rotate?: number;
spacing?: number;
bold?: boolean;
single?: boolean;
showOnSave?: boolean;
};
export type UnSwiperItem = {
url: string;
title?: string;
poster?: string;
type?: string;
};
export type UnTabItem = {
name: string;
disabled?: boolean;
value?: number | string;
dot?: boolean;
badge?: string | number;
showZero?: boolean;
badgeType?: string;
badgeBgColor?: string;
offset?: Array<number | string>;
};
export type UnTabItemClickEvent = {
index: number;
item: UnTabItem;
};
export type UnSpanMethodProps = {
row: UTSJSONObject;
column: UTSJSONObject;
rowIndex: number;
columnIndex: number;
};
export type UnTableColumnProps = {
prop: string;
label: string;
width: number | string;
height: number | string;
minHeight: number | string;
minWidth: number | string;
headerHeight: number | string;
align: 'left' | 'center' | 'right';
headerAlign: 'left' | 'center' | 'right';
sortable: boolean;
};
export type UnShowToastFail = {
errCode: number;
errSubject: string;
errMsg: string;
};
export type UnToastOptions = {
title?: string;
type?: string;
duration?: string | number;
icon?: boolean | string;
fill?: boolean;
zIndex?: string | number;
customStyle?: string | object;
position?: string;
success?: () => void;
fail?: (result: UnShowToastFail) => void;
mask?: boolean;
loading?: boolean;
};
export type UnUploadFile = {
type: string;
url: string;
mime?: string;
size?: number;
name?: string;
thumb?: string;
progress?: number;
status?: string;
message?: string;
deletable?: boolean;
file?: any;
};
export type UnUploadPreviewEvent = {
name: string;
index: number;
file: string;
};
export type UnUploadDeleteEvent = {
name: string;
index: number;
file: string;
};
export type UnUploadOversizeEvent = {
file: string;
index: number;
name: string;
size: number;
maxSize: number;
};
export type UnUploadAfterReadEvent = {
file: UnUploadFile[];
index: number;
name: string;
};
export type UnUploadBeforeReadEvent = {
file: UnUploadFile[];
index: number;
name: string;
callback?: (ok: boolean) => void;
};
export type UnRequestSuccess = {
data: any | string;
statusCode: number;
header: any;
cookies: string[];
tempFilePath: string;
};
export type UnRequestFail = {
errCode: number;
errSubject: string;
data?: any;
cause?: Error;
errMsg?: string;
};
export type UnRequestTask = UploadTask | DownloadTask | RequestTask;
export type UnRequestOptions = {
baseURL?: string;
url?: string;
method?: string;
header?: UTSJSONObject;
timeout?: number;
withCredentials?: boolean;
firstIpv4?: boolean;
enableChunked?: boolean;
dataType?: 'json' | 'text';
responseType?: 'arraybuffer' | 'text' | 'json';
getTask?: (task: UnRequestTask) => void;
data?: any;
params?: UTSJSONObject;
name?: string;
filePath?: string;
files?: UploadFileOptionFiles[];
formData?: UTSJSONObject;
};
export type UnChooseFileOptions = {
accept: "image" | "video" | "audio" | "all" | "file";
sourceType?: string[];
mediaType?: string[];
compressed?: boolean;
compressOptions?: UTSJSONObject;
maxDuration?: number;
extension?: string[];
multiple?: boolean;
sizeType?: string[];
camera?: 'front' | 'back';
maxCount?: number;
};
export type UnChooseFile = {
type: string;
path: string;
mime?: string;
size?: number;
name?: string;
thumb?: string;
file?: any;
};
export type UnUploadOptions = {
url: string;
name?: string;
file?: any;
header?: UTSJSONObject;
formData?: UTSJSONObject;
getTask?: (task: UnRequestTask) => void;
};
export type UnUseUpload = {
chooseFile: (options: UnChooseFileOptions) => Promise<UnChooseFile[]>;
upload: (options: UnUploadOptions) => Promise<UnRequestSuccess>;
};
export type UnCurrentTime = {
total: number;
days: number | string;
hours: number | string;
minutes: number | string;
seconds: number | string;
milliseconds: number | string;
};
export type UnUseCountDown = {
start: () => void;
pause: () => void;
resume: () => void;
reset: () => void;
current: Ref<UnCurrentTime>;
};
export type UnCountDownOptions = {
time: number;
millisecond?: boolean;
uniqueKey?: string;
keepRunning?: boolean;
padZero?: boolean;
autoStart?: boolean;
onStart?: () => void;
onChange?: (value: UnCurrentTime) => void;
onEnd?: () => void;
};
export type AnchorRect = {
uid: number;
top: number;
height: number;
index: string;
};
export type UnUseCodeTimer = {
start: () => void;
reset: () => void;
current: Ref<string>;
};
export type UnCodeTimerOptions = {
seconds: number;
uniqueKey?: string;
keepRunning?: boolean;
startText?: string;
changeText?: string;
endText?: string;
onStart?: () => void;
onChange?: (text: string) => void;
onEnd?: () => void;
};
export type SwipeActionItemProvide = {
close: () => void;
open: (direction: 'left' | 'right' | null) => void;
uid: number;
};
export type SwipeActionProvide = {
children: Ref<SwipeActionItemProvide[]>;
props: UnSwipeActionComponentPublicInstance;
};
export type UnUseTheme = {
setTheme: (value: string) => void;
theme: Ref<string>;
};
import type { UnCascaderOption } from "../types/index";
export declare const AreaList: any;
export declare const useAreaCascaderData: () => UnCascaderOption[];
/**
* 农历1900-2100的润大小信息表
* @Array Of Property
* @return Hex
*/
export type InfoType = {
lunarY: number;
lunarM: number;
lunarD: number;
isLeap: boolean;
};
export type LunarInfoType = {
lYear: number;
lMonth: number;
lDay: number;
IMonthCn: string;
IDayCn: string;
cYear: number;
cMonth: number;
cDay: number;
gzYear?: string;
gzMonth?: string;
gzDay?: string;
isToday: boolean;
isLeap: boolean;
nWeek?: number;
ncWeek?: string;
isTerm?: boolean;
Term?: string;
astro?: string;
};
export interface LunarInfoType {
lYear: number;
lMonth: number;
lDay: number;
IMonthCn: string;
IDayCn: string;
cYear: number;
cMonth: number;
cDay: number;
gzYear?: string;
gzMonth?: string;
gzDay?: string;
isToday: boolean;
isLeap: boolean;
nWeek?: number;
ncWeek?: string;
isTerm?: boolean;
Term?: string;
astro?: string;
}
export declare class Lunar {
private lunarYearDaysMap;
private lunarMonthDaysMap;
constructor();
/**
* 传入农历数字月份返回汉语通俗表示法
* @param lunar month
* @return Cn string
* @eg:let cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
*/
toChinaMonth(m: number, leap?: boolean): string;
/**
* 传入农历日期数字返回汉字表示法
* @param lunar day
* @return Cn string
* @eg:let cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
*/
toChinaDay(d: number): string;
/**
* 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
* @param lunar Year
* @return Number (0-12)
* @eg:let leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
*/
leapMonth(year: number): number;
/**
* 返回农历y年闰月的天数 若该年没有闰月则返回0
* @param lunar Year
* @return Number (0、29、30)
* @eg:let leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
*/
leapDays(year: number): number;
lunarMonthDays(year: number): number[];
lunarYearDays(year: number): number;
/**
* 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
* @param y solar year
* @param m solar month
* @param d solar day
* @return JSON object
* @eg:console.log(calendar.solar2lunar(1987,11,01));
*/
solar2lunar(y: number, m: number, d: number): LunarInfoType;
solar_date(y: number, m: number, d: number): InfoType;
}
type UnitType = 'year' | 'month' | 'week' | 'date' | 'day' | 'hour' | 'quarter' | 'minute' | 'second' | 'millisecond' | 'timeZoneOffset';
export declare class Dayjs {
private innerDate;
private static defaultFormat;
constructor(config?: string | number | Date | Dayjs | null);
format(formatStr?: string): string;
private toDayjs;
private cloneDate;
add(amount: number, unit: UnitType): Dayjs;
subtract(amount: number, unit: UnitType): Dayjs;
set(unit: UnitType, value: number): Dayjs;
get(unit: UnitType): number;
startOf(unit: UnitType): Dayjs;
endOf(unit: UnitType): Dayjs;
diff(date: Dayjs, unit?: UnitType, floating?: boolean): number;
private monthDiff;
isAfter(date: string | number | Date | Dayjs, unit?: UnitType): boolean;
isSame(date: string | number | Date | Dayjs, unit?: UnitType): boolean;
isBefore(date: string | number | Date | Dayjs, unit?: UnitType): boolean;
isSameOrBefore(date: string | number | Date | Dayjs, unit?: UnitType): boolean;
isSameOrAfter(date: string | number | Date | Dayjs, unit?: UnitType): boolean;
isBetween(date1: string | number | Date | Dayjs, date2: string | number | Date | Dayjs, unit?: UnitType, inclusivity?: '()' | '[]' | '(]' | '[)'): boolean;
clone(): Dayjs;
isValid(): boolean;
valueOf(): number;
toDate(): Date;
toISOString(): string;
toJSON(): string;
unix(): number;
year<T extends Dayjs | number>(value?: number | null): T;
month<T extends Dayjs | number>(value?: number | null): T;
date<T extends Dayjs | number>(value?: number | null): T;
day<T extends Dayjs | number>(value?: number | null): T;
hour<T extends Dayjs | number>(value?: number | null): T;
minute<T extends Dayjs | number>(value?: number | null): T;
second<T extends Dayjs | number>(value?: number | null): T;
millisecond<T extends Dayjs | number>(value?: number | null): T;
quarter(): number;
isToday(): boolean;
isYesterday(): boolean;
isTomorrow(): boolean;
utcOffset(): number;
daysInMonth(): number;
}
export declare function locale(language: string): void;
export declare function dayjs(config?: string | number | Date | Dayjs | null): Dayjs;
export declare function unix(timestamp: number): Dayjs;
export declare function parseTime(timeStr: string): Dayjs;
export declare function isDayjs(d: any): boolean;
export declare function now(): Dayjs;
export {};
export declare function parseObject<T>(data: T): UTSJSONObject;
export declare function uuid(): string;
export declare function padZero(num: number | string, length?: number): string;
/**
* 将hex颜色转换为rgba颜色
* @param hex hex颜色值,支持#333、#333333等格式
* @param alpha 透明度,0-1之间的值,默认为1
* @returns rgba颜色字符串,格式为rgba(r, g, b, a)
*/
export declare function hexToRgba(hex: string, alpha?: number): string;
export declare function getClientRect(selector: string, component?: any | null, fields?: NodeField | null): Promise<NodeInfo>;
export declare function getClientRectAll(selector: string, component?: any | null, fields?: NodeField | null): Promise<NodeInfo[]>;
export declare function toNumber(value: string | number, defaultValue?: number): number;
export declare function sleep(timer?: number): Promise<void>;
/**
* @description 取一个区间数
* @param {Number} min 最小值
* @param {Number} max 最大值
*/
export declare function random(min: number, max: number): number;
export declare function randomStr(length?: number): string;
export declare function getPx(value: string | number, unit?: boolean): any;
export declare function range(min?: number, max?: number, value?: number): number;
export declare function clamp(min?: number, max?: number, value?: number): number;
/**
* 驼峰命名转短横线命名
* @param {string} str 驼峰命名的字符串
* @returns 短横线命名的字符串
*/
export declare function camelToKebab(str: string): string;
/**
* 短横线命名转驼峰命名
* @param {string} str 短横线命名字符串
* @returns 驼峰命名字符串
*/
export declare function kebabToCamel(str: string): string;
/**
* 将驼峰命名转换为下划线命名
* @param str 需要转换的驼峰命名字符串
* @returns 转换后的下划线命名字符串
*/
export declare function camelToSnake(str: string): string;
/**
* 将驼峰命名转换为下划线命名
* @param str 需要转换的驼峰命名字符串
* @returns 转换后的下划线命名字符串
*/
export declare function snakeToCamel(str: string): string;
export declare function numberToChinese(amount: number): string;
export declare function throttle(func: () => void, wait?: number, immediate?: boolean): void;
export declare function debounce(func: () => void, wait?: number, immediate?: boolean): void;
/**
* @description 运行期判断平台
* @returns {string} 返回所在平台(小写)
* @link 运行期判断平台 https://uniapp.dcloud.io/frame?id=判断平台
*/
export declare function getOsName(): string;
export declare function getSystemInfo(): any;
export declare function getWindowInfo(): any;
export declare function openPage(url: string, linkType?: string): void;
/**
* @description 去除空格
* @param String str 需要去除空格的字符串
* @param String pos both(左右)|left|right|all 默认both
*/
export declare function trim(str: string, pos?: string): string;
export declare function buildQuery(params: UTSJSONObject): string;
/**
* @description 添加单位,如果有rpx,upx,%,px等单位结尾或者值为auto,直接返回,否则加上px单位结尾
* @param {string|number} value 需要添加单位的值
* @param {string} unit 添加的单位名 比如px
*/
export declare function addUnit(value?: string | number | null, unit?: string): string;
/**
* 返回对象的所有键名
* @example keys({a: 1, b: 2}) // ['a', 'b']
*/
export declare function keys(value: any): string[];
/**
* 验证电子邮箱格式
*/
export declare function isEmail(value: string): boolean;
/**
* 验证手机格式
*/
export declare function isMobile(value: string): boolean;
/**
* 验证URL格式
*/
export declare function isUrl(value: string): boolean;
/**
* 验证十进制数字
*/
export declare function isNumber(value: string | number): boolean;
/**
* 验证字符串
*/
export declare function isString(value: string): boolean;
/**
* 验证身份证号码
*/
export declare function isIdCard(value: string): boolean;
/**
* 金额,只允许2位小数
*/
export declare function isAmount(value: string | number): boolean;
/**
* 检查值是否为 null
*/
export declare function isNull(value?: any | null): boolean;
/**
* 检查值是否为数组
*/
export declare function isArray(value: any): boolean;
/**
* 检查值是否为对象
*/
export declare function isObject(value: any): boolean;
/**
* 检查值是否为布尔值
*/
export declare function isBoolean(value: any): boolean;
/**
* 检查值是否为函数
*/
export declare function isFunction(value: any): boolean;
/**
* 判断是否为空
*/
export declare function isEmpty(value?: any): boolean;
/**
* 中文
*/
export declare function isChinese(value: string): boolean;
/**
* 验证是否包含某个值
*/
export declare function isContains(value: string, param: string): boolean;
export declare function isVideo(value: string): boolean;
export declare function isImage(value: string): boolean;
import type { UnRequestSuccess, UnRequestOptions } from "../types/index";
type RequestInterceptorFulfilled = (value: UnRequestOptions) => UnRequestOptions | Promise<UnRequestOptions>;
type ResponseInterceptorFulfilled = (value: UnRequestSuccess) => UnRequestSuccess | Promise<UnRequestSuccess>;
type InterceptorRejected = (error: any) => any | Promise<any>;
type RequestInterceptor = {
use: (fulfilled: RequestInterceptorFulfilled, rejected?: InterceptorRejected) => void;
};
type ResponseInterceptor = {
use: (fulfilled: ResponseInterceptorFulfilled, rejected?: InterceptorRejected) => void;
};
type InterceptorManager = {
request: RequestInterceptor;
response: ResponseInterceptor;
};
declare class Request {
interceptors: InterceptorManager;
private requestInterceptors;
private responseInterceptors;
private defaultOptions;
constructor();
private createInterceptors;
private runRequestInterceptors;
private runResponseInterceptors;
private mergeOption;
private mergeUrl;
private http;
private uploadFile;
private downloadFile;
setConfig(options: UnRequestOptions): void;
request(options: UnRequestOptions): Promise<UnRequestSuccess>;
get(url: string, options?: UnRequestOptions | null): Promise<UnRequestSuccess>;
head(url: string, options?: UnRequestOptions | null): Promise<UnRequestSuccess>;
post(url: string, data?: any | null, options?: UnRequestOptions | null): Promise<UnRequestSuccess>;
put(url: string, data?: any | null, options?: UnRequestOptions | null): Promise<UnRequestSuccess>;
delete(url: string, data?: any | null, options?: UnRequestOptions | null): Promise<UnRequestSuccess>;
options(url: string, data?: any | null, options?: UnRequestOptions | null): Promise<UnRequestSuccess>;
upload(url: string, options?: UnRequestOptions | null): Promise<UnRequestSuccess>;
download(url: string, options?: UnRequestOptions | null): Promise<UnRequestSuccess>;
}
declare const http: Request;
export { http };
export declare class UArray<T> extends Array<T> {
constructor(len: number);
}
export declare class UColor {
private r;
private g;
private b;
private a;
private format;
constructor(input?: string);
private parseInput;
private parseHex;
private parseRgb;
private parseHsl;
private parseKeyword;
private hslToRgb;
private hsvToRgb;
private rgbToHsl;
private rgbToHsv;
toRgbString(): string;
toHslString(): string;
toHex(a?: boolean): string;
toHexString(a?: boolean): string;
toRgb(): number[];
toHsl(): number[];
toHsv(): number[];
getFormat(): string;
setAlpha(alpha: number): void;
getAlpha(): number;
fromString(color: string): void;
fromHsl(h: number, s: number, l: number): void;
fromHsv(h: number, s: number, v: number): void;
fromRgb(r: number, g: number, b: number, a: number): void;
fromHex(hex: string): void;
}
export declare class UStyle extends Map<string, string | number | null> {
constructor();
set(key: string, value: string | number | null): UStyle;
}
export declare class UStyle {
set(key: string, value: any): this;
get(key: string): any;
clear(): void;
has(key: string): boolean;
delete(key: string): boolean;
forEach(callbackfn: (value: any, key: string, map: UStyle) => void, thisArg?: any): void;
get size(): number;
}
export type UnValidateError = {
field: string;
message: string;
};
export type UnValidateResult = {
valid: boolean;
errors: UnValidateError[];
};
/**
* 表单校验类
*/
export declare class FormValidator {
private messages;
private rules;
constructor(rule: any);
private formatRules;
/**
* 获取错误消息
*/
private getMessage;
/**
* 检查值是否为空
*/
private isEmptyValue;
/**
* 验证类型
*/
private validateType;
/**
* 验证长度
*/
private validateLength;
/**
* 验证正则表达式
*/
private validatePattern;
/**
* 验证空白字符
*/
private validateWhitespace;
/**
* 验证两次输入是否一致
*/
private validateSame;
/**
* 验证必填项
*/
private validateRequired;
/**
* 执行单个规则验证 UnValidateError | null
*/
private validateRule;
/**
* 验证单个字段
*/
validateField(formData: any, field: string, trigger: string): Promise<UnValidateResult>;
/**
* 验证表单数据
*/
validate(data: any): Promise<UnValidateResult>;
}
<div align="center">
<img alt="logo" src="http://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
<h1 style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView Next 4.0</h1>
<h3>支持uni-app、uniapp x、鸿蒙、微信小程序,全端兼容的UI框架</h3>
</div>
## 📖 简介
uView Next 4.0 并非对 3.x 版本的简单迭代适配,而是基于 Vue3 + UTS 技术栈、采用组合式 API 完成的架构级重构。它以全新设计理念重塑组件体系,通过精简 DOM 节点数量、优化排版渲染链路提升性能,完美兼容 uni-app、uni-app X、鸿蒙、微信小程序生态,真正实现一次开发、全端覆盖的跨端开发目标。
## 📚 文档
- [📄 **官方文档** https://uview-unix.d3u.cn](https://uview-unix.d3u.cn)
## 🔑 技术支持与服务
我们致力于为开发者提供全方位的技术支持体系,确保您在开发过程中获得专业、及时的帮助,让开发更顺畅:
- **官方交流群**:加入官方交流群[点此跳转](https://uview-unix.d3u.cn/components/addQQGroup.html),与核心开发者和社区用户实时交流,快速获取日常使用问题的解决方案
- **文档社区**:参与官方文档的讨论与改进,分享您的使用经验和最佳实践,共同完善uView Unix生态
- **商业支持**:为付费客户提供优先级技术支持服务,确保关键业务项目的顺利推进
- **企业定制服务**:为企业客户提供专属的定制开发服务,满足您的个性化业务需求和技术要求
## ✨ 特性
- 🌍 **全端兼容**:完美支持安卓、iOS、鸿蒙、微信小程序、H5
- 🚀 **原生渲染**:完美支持 UniApp/UniAppX 生态,性能媲美原生应用,流畅体验
- 🧩 **组件丰富**:80+ 高质量组件,覆盖各类业务场景,开箱即用
- 🔧 **工具集合**:实用JS工具库,简化开发流程,大幅提升开发效率
- 📖 **详尽文档**:清晰教程 + 交互演示,显著降低学习成本
- 📦 **按需引入**:智能按需加载,有效减小打包体积,优化性能
- 🔄 **持续迭代**:快速响应用户反馈,不断更新优化功能体验
## 📱 预览
您可以通过**微信**扫码,查看最佳的演示效果。
<img width="200" height="200" src="https://uview-unix.d3u.cn/h5_qrcode.png" alt=""/>
<br>
<br>
APP下载
<img width="200" height="200" src="https://uview-unix.d3u.cn/app_qrcode.png" alt=""/>
## 🔗 重要链接
- [🌐 官方文档](https://uview-unix.d3u.cn/)
- [📝 更新日志](https://uview-unix.d3u.cn/components/changelog.html)
- [👥 关于我们](https://uview-unix.d3u.cn/cooperation/about.html)
### 📦 快速安装
请通过[官网安装文档](https://uview-unix.d3u.cn/components/downloadSetting.html)了解更详细的内容
### 🚀 快速上手
请通过[快速上手](https://uview-unix.d3u.cn/components/quickstart.html)了解更详细的内容
## 4.1.8(2026-03-17)
1. 适配HBuilderX 5.0
2. code-input组件新增customStyle属性
## 4.1.7(2026-03-16)
1. 优化notify组件
2. table组件新增loading功能
3. 修复select组件默认值问题
## 4.1.6(2026-03-12)
1. modal组件新增closeable属性,用于控制是否显示关闭图标按钮
2. datetime-picker组件mode支持动态切换
3. 修复个别icon图标不显示的问题
## 4.1.5(2026-03-10)
1. 新增useStorage数据持久化
## 4.1.4(2026-03-09)
1. 修复form-item组件labelAlign,labelVAlign属性无效的问题
2. 修复isEmpty方法,判断自定义类型报错的问题
3. noticeBar组件新增fontWeight属性,用于设置字体粗细
## 4.1.3(2026-03-06)
1. 修复form-item组件labelPosition等于top无效的问题
2. 修复button组件当type为default时,loading图标,icon图标颜色为白色的问题
3. 修复indexList组件导航栏位置问题,新增zIndex属性
4. 修复select组件超出滚动的问题
## 4.1.2(2026-03-06)
1. 修复试用编译报错
## 4.1.0(2026-03-05)
### 新增功能
- [全局] 新增暗黑模式,实现主题切换功能,优化颜色方案,删除样式隔离
- [icon] 新增了一些icon图标
- [button] 新增点击态效果,新增loadingIcon属性支持自定义loading图标
- [close] 新增close组件
- [popup] 新增swipeClose属性,用于控制是否开启滑动关闭功能
- [alert] 新增effect属性,支持light/dark/plain三种效果
- [select] 新增multiple,collapseTags等属性,支持多选和折叠标签
- [picker] 新增触发器功能,默认为input输入框
- [datetime-picker] 新增触发器功能,默认为input输入框
- [tag] shape属性新增mark和semicircle样式,调整size值为large/normal/small/mini
- [loading] 新增circle-dots样式,新增插槽,支持自定义图标,App端spinner效果改成DrawableContext绘制
- [switch] 新增loadingMode,loadingIcon,loadingSize属性支持自定义loading图标
- [load-more] 新增iconMode,iconName属性支持自定义图标
- [dayjs] 新增识别10位秒级时间戳,新增parseTime方法,用于解析HH:MM:SS、HH:MM、H:M、H:M:S格式的字符串为dayjs对象
- [validator] 表单检验支持使用点语法,支持自定义数据类型校验
### 优化改进
- [empty] 重构empty组件
- [form-item] 重构form-item组件, 统一规范间距常用表单元素间距和尺寸
- [checkbox] 重构checkbox组件,新增圆点,勾选,按钮样式,支持自定义图标
- [radio] 重构radio组件,新增圆点,勾选,按钮样式,支持自定义图标
- [cropper] 优化cropper组件,修复已知问题
- [isEmpty] 优化isEmpty方法
### 删除功能
- 组件 [read-more2] 已废弃并删除
- 组件 [un-code] 已废弃并删除
### 注意事项
本次更新包含大量新增功能与优化,部分组件可能存在向下兼容风险。若项目对稳定性要求较高,不建议旧项目进行升级;若确需升级,请务必先查阅相关组件文档,确认是否需要进行适配调整。
## 4.0.105(2026-01-28)
1. notify组件新增zIndex属性
2. 其他细节优化
## 4.0.104(2026-01-28)
1. search组件新增action插槽
2. 优化swiper轮播图组件
## 4.0.103(2026-01-27)
1. input组件readonly属性全端通用,并新增click事件
## 4.0.102(2026-01-27)
1. 修复calendar日历组件APP端徽标位置不准确的问题
2. 修复cropper组件圆形框不是正圆的问题
## 4.0.100(2026-01-26)
1. 重构calendar日历组件,新增左右横向滑动,打点等功能,提供更强大的功能
## 4.0.99(2026-01-24)
1. 修复dayjs库type类型导出问题
2. 修复read-more组件toggle插件无效
## 4.0.98(2026-01-24)
1. 细节优化
## 4.0.97(2026-01-23)
1. 修复form表单校验trigger不生效的问题
2. 修复input组件外部修改值不生效的问题
## 4.0.96(2026-01-23)
1. 优化slider组件
2. 优化tabs组件
## 4.0.95(2026-01-21)
1. 修复datetime-picker组件相关问题
2. 修复tabs组件动态设置徽标后显示异常的问题,同时新增setBadge和setDot方法
## 4.0.94(2026-01-21)
1. 优化upload示例与组件
2. 修复popup组件mode=top时相关的问题
3. 修复reqeust库getTask无效的问题
## 4.0.93(2026-01-20)
1. 修复text无法打开链接
2. 其他细节优化
## 4.0.92(2026-01-19)
1. 修复uniapp平台一些组件报错
## 4.0.91(2026-01-18)
1. 新增swipe-action组件
2. 重构circle-progress和line-progress组件
3. 修复popover无法关闭的问题
4. 修复form组件borderBottom属性无效的问题
5. 修复useCountDown方法APP端持久化报错
6. 其他细节优化
## 4.0.90(2026-01-16)
1. 重构read-more组件,不兼容旧版(升级请注意),旧版read-more更名为read-more2
2. 修复popup组件嵌套scroll-view无法滚动的问题
## 4.0.89(2026-01-16)
1. 优化un-back-top组件
## 4.0.88(2026-01-15)
1. 修复form组件校验数组可能越界的问题
2. 修复calendar组件rangePrompt不生效的问题
## 4.0.86(2026-01-15)
1. 新增useCodeTimer验证码函数
2. 修复read-more组件渐变背景
3. 优化useCountDown组件
## 4.0.84(2026-01-13)
1. 重构countdown组件
## 4.0.83(2026-01-12)
1. 新增useCountDown倒计时函数,支持持久化,回调函数
2. 优化dayjs库,新增多语言,泛型,实现链式调用
3. 优化alert, rate组件等组件
## 4.0.82(2026-01-10)
1. 新增watermark组件
2. 修复modal组件点击模态窗内部元素触发close事件的问题
## 4.0.81(2026-01-09)
1. 修复cascader组件鸿蒙无法滚动的问题
2. 优化select组件
## 4.0.80(2026-01-09)
1. 新增popover组件
1. 新增tag标签width属性,超出后自动省略
## 4.0.79(2026-01-08)
1. 优化curtain组件与示例
## 4.0.78(2026-01-08)
1. 修复datetime-picker组件首次打开不返回值的问题
2. 优化float-panel组件内容滚动逻辑
3. 优化zindex层级
## 4.0.77(2026-01-06)
1. 新增input组件autoFocus属性
2. 修复round属性APP端无效的问题
## 4.0.76(2026-01-06)
1. 新增fab组件
## 4.0.75(2026-01-05)
1. 新增pagination分页组件
## 4.0.74(2026-01-05)
1. 修复qrcode组件的问题
2. 修复cascader地区报错
3. 其他细节优化
## 4.0.73(2026-01-04)
1. 新增float-panel浮动面板组件
## 4.0.72(2026-01-04)
1. 新增switch组件形状,描述文本等功能
2. 优化loading组件
## 4.0.71(2025-12-31)
1. 新增useUpload组合式方法,用于文件选择和上传
2. 新增scss变量,用于自定义组件样式
3. 修复request无法识别包含http(s)的URL问题
## 4.0.68(2025-12-29)
1. 修复编译报错
## 4.0.67(2025-12-29)
1. 新增表单校验规则
2. 新增图片预览功能
3. 优化datetime-picker组件
4. 优化dayjs库
## 4.0.65(2025-12-27)
1. 新增表单校验规则
2. 新增图片预览功能
3. 优化datetime-picker组件
4. 优化dayjs库
## 4.0.64(2025-12-27)
1. 修复示例错误
## 4.0.63(2025-12-27)
1. 优化示例和文档
## 4.0.61(2025-12-26)
1. 修复一些组件uniapp平台异常
## 4.0.60(2025-12-26)
1. 优化calendar组件,提升APP端性能
## 4.0.59(2025-12-24)
1. 重构tabbar组件
2. 其他细节优化
## 4.0.58(2025-12-23)
1. 重构badge组件
2. 其他细节优化
## 4.0.57(2025-12-22)
1. 新增color-picker颜色选择器组件
## 4.0.56(2025-12-20)
1. 新增Segmented分段器组件
## 4.0.55(2025-12-19)
1. 新增icon组件支持自定义图标
2. 修复cascader组件的一些问题
3. 优化键盘布局
## 4.0.54(2025-12-18)
1. input组件新增height属性
## 4.0.53(2025-12-18)
1. 新增table组件
2. 修复request组件数据类型错误
## 4.0.52(2025-12-13)
1. 重构card组件,支持更多功能
2. 其他细节优化
## 4.0.51(2025-12-12)
1. 修复部分组件显示异常
## 4.0.50(2025-12-12)
1. 优化细节与示例
## 4.0.49(2025-12-11)
1. 修复已问题
## 4.0.40(2025-12-10)
1. 修复uniapp平台部分组件样式失效的问题
## 4.0.39(2025-12-05)
1. 新增waterfall瀑布流组件
## 4.0.38(2025-12-04)
1. 修复request库缺少data参数
## 4.0.37(2025-12-03)
1. 修改grid组件click事件无效的问题
2. 修复sticky组件部分情况下无效的问题
## 4.0.36(2025-12-02)
1. 新增keyboard键盘组件
## 4.0.35(2025-12-01)
1. 修复uniapp平台下的一些组件存在问题
## 4.0.34(2025-12-01)
1. 新增draggable组件,用于实现可拖动的元素
2. 新增UStyle类,用于解决UTS动态设置样式时的在不同平台不一致问题
3. 调整数据类型导出方式
4. 其他细节优化
## 4.0.23(2025-11-26)
1. 修复编译报错
## 4.0.22(2025-11-26)
1. 新增UStyle类
2. 修复已知问题
## 4.0.21(2025-11-25)
1. 修复编译报错
2. 修复ios平台switch组件问题
## 4.0.20(2025-11-24)
1. 新增cascader-picker组件,可以实现多级地区等功能
2. 修复鸿蒙平台notice-bar,swiper组件的问题
3. 修复ios平台transition组件动画问题
4. 修复picker组件无法设置默认值的问题
5. 调整cascader组件和cascader-picker组件的事件和参数保持一致
6. 统一命名规范,UnCascaderItem 修改为UnCascaderOption,UnDropdownItem 修改为 UnDropdownOption
## 4.0.18(2025-11-20)
修复部分已知问题
## 4.0.17(2025-11-20)
1. 新增slider组件
2. 新增自定义主题功能
3. 优化text,icon,switch等组件组件,提升性能
4. 其他大量的细节优化
## 4.0.16(2025-11-07)
新增slider-button组件
## 4.0.15(2025-11-06)
新增 Skeleton 骨架屏组件
## 4.0.14(2025-11-06)
更新示例
## 4.0.13(2025-11-06)
1. 新增Curtain 幕帘组件
2. 修复打包H5时候的一些警告
## 4.0.12(2025-11-05)
新增sticky吸顶组件
## 4.0.11(2025-11-05)
新增datetime-picker组件
## 4.0.10(2025-11-05)
修复一些组件uniapp平台下的问题
## 4.0.9(2025-11-04)
新增scroll-list组件
## 4.0.8(2025-11-04)
新增cropper图片剪裁组件
## 4.0.7(2025-11-03)
新增signature签名组件
## 4.0.6(2025-11-03)
新增qrcode组件
## 4.0.5(2025-11-01)
优化一些细节
## 4.0.4(2025-10-31)
新增amount组件
## 4.0.3(2025-10-31)
新增collapse组件
## 4.0.2(2025-10-30)
新增notice-bar组件
## 4.0.1(2025-10-30)
新增select组件
## 4.0.0(2025-10-28)
4.0.0
{
"name": "un-action-sheet",
"description": "本组件用于从底部弹出一个操作菜单,供用户选择并返回结果。本组件功能类似于uni的uni.showActionSheetAPI,配置更加灵活,所有平台都表现一致。",
"example": "<un-action-sheet ref=\"uActionSheet\"",
"tutorial": "https://uview.d3u.cn/components/actionSheet.html",
"attributes": [
{
"name": "[event]select",
"description": "点击ActionSheet列表项时触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "点击取消按钮时触发",
"type": "Function"
},
{
"name": "[event]getuserinfo",
"description": "用户点击该按钮时,会返回获取到的用户信息,回调的 detail 数据与 wx.getUserInfo 返回的一致,openType=\"getUserInfo\"时有效",
"type": "Function"
},
{
"name": "[event]contact",
"description": "客服消息回调,openType=\"contact\"时有效",
"type": "Function"
},
{
"name": "[event]getphonenumber",
"description": "获取用户手机号回调,openType=\"getPhoneNumber\"时有效",
"type": "Function"
},
{
"name": "[event]chooseavatar",
"description": "选择头像回调,openType=\"chooseAvatar\"时有效",
"type": "Function"
},
{
"name": "[event]error",
"description": "当使用开放能力时,发生错误的回调,openType=\"error\"时有效",
"type": "Function"
},
{
"name": "[event]launchapp",
"description": "打开 APP 成功的回调,openType=\"launchApp\"时有效",
"type": "Function"
},
{
"name": "[event]opensetting",
"description": "在打开授权设置页后回调,openType=\"openSetting\"时有效",
"type": "Function"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "description",
"type": "string",
"values": []
},
{
"name": "actions",
"type": "{}",
"values": []
},
{
"name": "cancelText",
"type": "string",
"values": []
},
{
"name": "closeOnClickAction",
"type": "boolean",
"values": []
},
{
"name": "safeAreaInsetBottom",
"type": "boolean",
"values": []
},
{
"name": "openType",
"type": "string",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "lang",
"type": "string",
"values": []
},
{
"name": "sessionFrom",
"type": "string",
"values": []
},
{
"name": "sendMessageTitle",
"type": "string",
"values": []
},
{
"name": "sendMessagePath",
"type": "string",
"values": []
},
{
"name": "sendMessageImg",
"type": "string",
"values": []
},
{
"name": "showMessageCard",
"type": "boolean",
"values": []
},
{
"name": "appParameter",
"type": "string",
"values": []
},
{
"name": "titleStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
},
{
"name": "closeable",
"type": "boolean",
"values": [],
"defaultValue": "false"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-album",
"description": "本组件提供一个类似相册的功能,让开发者开发起来更加得心应手。减少重复的模板代码",
"example": "<un-album :urls=\"urls2\"",
"tutorial": "https://uview.d3u.cn/components/album.html",
"attributes": [
{
"name": "[event]albumWidth",
"description": "某些特殊的情况下,需要让文字与相册的宽度相等,这里事件的形式对外发送 (回调参数 width )",
"type": "Function"
},
{
"name": "urls",
"type": "{}",
"values": []
},
{
"name": "singleSize",
"type": "string | number",
"values": []
},
{
"name": "multipleSize",
"type": "string | number",
"values": []
},
{
"name": "space",
"type": "string | number",
"values": []
},
{
"name": "singleMode",
"type": "string",
"values": []
},
{
"name": "multipleMode",
"type": "string",
"values": []
},
{
"name": "maxCount",
"type": "string | number",
"values": []
},
{
"name": "previewFullImage",
"type": "boolean",
"values": []
},
{
"name": "rowCount",
"type": "string | number",
"values": []
},
{
"name": "showMore",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-alert",
"description": "警告提示,展现需要关注的信息。",
"example": "<un-alert :title=\"title\" type = \"warning\" :closable=\"closable\" :description = \"description\"></un-alert>",
"tutorial": "https://uview.d3u.cn/components/alertTips.html",
"attributes": [
{
"name": "[event]click",
"description": "点击组件时触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "点击关闭按钮时触发",
"type": "Function"
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "description",
"type": "string",
"values": []
},
{
"name": "closable",
"type": "boolean",
"values": []
},
{
"name": "showIcon",
"type": "boolean",
"values": []
},
{
"name": "center",
"type": "boolean",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "effect",
"type": "\"light\" | \"dark\" | \"plain\"",
"values": [
{
"name": "light",
"description": ""
},
{
"name": "dark",
"description": ""
},
{
"name": "plain"
}
],
"defaultValue": "'light'"
},
{
"name": "round",
"type": "string | number",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-amount",
"description": "用于展示金额、价格等,可以转换为人民币大写,支持动画效果",
"example": "<un-amount v-model=\"123456.789\" :show-separator=\"true\" />",
"tutorial": "https://uviewui.com/components/amount.html",
"attributes": [
{
"name": "symbol",
"type": "string",
"values": []
},
{
"name": "reverse",
"type": "boolean",
"values": []
},
{
"name": "precision",
"type": "number",
"values": []
},
{
"name": "roundUp",
"type": "boolean",
"values": []
},
{
"name": "transition",
"type": "boolean",
"values": []
},
{
"name": "duration",
"type": "number",
"values": []
},
{
"name": "separatorDigits",
"type": "number",
"values": []
},
{
"name": "separator",
"type": "string",
"values": []
},
{
"name": "showSymbol",
"type": "boolean",
"values": []
},
{
"name": "showDecimal",
"type": "boolean",
"values": []
},
{
"name": "showSeparator",
"type": "boolean",
"values": []
},
{
"name": "capital",
"type": "boolean",
"values": []
},
{
"name": "fontSize",
"type": "String",
"values": []
},
{
"name": "fontSizeRatio",
"type": "String|Number",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "colorRatio",
"type": "String",
"values": []
},
{
"name": "value",
"type": "string | number",
"values": [],
"defaultValue": "0"
},
{
"name": "modelValue",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "size",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "symbolSize",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "decimalSize",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "symbolColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "decimalColor",
"type": "string",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-avatar-group",
"description": "本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。",
"example": "<un-avatar-group gap=\"0.4\" ></un-avatar-group>",
"tutorial": "https://uview.d3u.cn/components/avatar.html",
"attributes": [
{
"name": "[event]showMore",
"description": "头像组更多点击",
"type": "Function"
},
{
"name": "maxCount",
"type": "string | number",
"values": []
},
{
"name": "showMore",
"type": "boolean",
"values": []
},
{
"name": "gap",
"type": "string | number",
"values": []
},
{
"name": "extraValue",
"type": "string | number",
"values": []
},
{
"name": "extraStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-avatar",
"description": "本组件一般用于展示头像的地方,如个人中心,或者评论列表页的用户头像展示等场所。",
"example": "<un-avatar :src=\"src\" mode=\"square\"></un-avatar>",
"tutorial": "https://uview.d3u.cn/components/avatar.html",
"attributes": [
{
"name": "[event]click",
"description": "点击组件时触发 index: 用户传递的标识符",
"type": "Function"
},
{
"name": "src",
"type": "string",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "text",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "mpAvatar",
"type": "boolean",
"values": []
},
{
"name": "randomBgColor",
"type": "boolean",
"values": []
},
{
"name": "defaultUrl",
"type": "string",
"values": []
},
{
"name": "colorIndex",
"type": "string | number",
"values": []
},
{
"name": "name",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-back-top",
"description": "本组件一个用于长页面,滑动一定距离后,出现返回顶部按钮,方便快速返回顶部的场景。",
"example": "<un-back-top :scrollTop=\"scrollTop\"></un-back-top>",
"tutorial": "https://uviewui.com/components/backTop.html",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "text",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "scrollTop",
"type": "string | number",
"values": []
},
{
"name": "top",
"type": "string | number",
"values": []
},
{
"name": "bottom",
"type": "string | number",
"values": []
},
{
"name": "right",
"type": "string | number",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "textSize",
"type": "string | number",
"values": []
},
{
"name": "textColor",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-badge",
"description": "该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。",
"example": "<un-badge :type=\"type\" :count=\"count\"></un-badge>",
"tutorial": "https://uviewui.com/components/badge.html",
"attributes": [
{
"name": "isDot",
"type": "boolean",
"values": []
},
{
"name": "value",
"type": "string | number",
"values": []
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "max",
"type": "string | number",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "showZero",
"type": "boolean",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "numberType",
"type": "string",
"values": []
},
{
"name": "offset",
"type": "Array<string | number>",
"values": []
},
{
"name": "inverted",
"type": "boolean",
"values": []
},
{
"name": "fixed",
"type": "Boolean",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "position",
"type": "\"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\"",
"values": [
{
"name": "top-left",
"description": ""
},
{
"name": "top-right",
"description": ""
},
{
"name": "bottom-left",
"description": ""
},
{
"name": "bottom-right"
}
],
"defaultValue": "'top-right'"
},
{
"name": "absolute",
"type": "boolean",
"values": [],
"defaultValue": "false"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-button",
"description": "Button 按钮",
"example": "<un-button>月落</un-button>",
"tutorial": "https://www.uviewui.com/components/button.html",
"attributes": [
{
"name": "[event]click",
"description": "非禁止并且非加载中,才能点击",
"type": "Function"
},
{
"name": "[event]getphonenumber",
"description": "open-type=\"getPhoneNumber\"时有效",
"type": "Function"
},
{
"name": "[event]getuserinfo",
"description": "用户点击该按钮时,会返回获取到的用户信息,从返回参数的detail中获取到的值同uni.getUserInfo",
"type": "Function"
},
{
"name": "[event]error",
"description": "当使用开放能力时,发生错误的回调",
"type": "Function"
},
{
"name": "[event]opensetting",
"description": "在打开授权设置页并关闭后回调",
"type": "Function"
},
{
"name": "[event]launchapp",
"description": "打开 APP 成功的回调",
"type": "Function"
},
{
"name": "[event]chooseavatar",
"description": "选择头像回调,openType=\"chooseAvatar\"时有效",
"type": "Function"
},
{
"name": "[event]agreeprivacyauthorization",
"description": "用户同意隐私协议事件回调",
"type": "Function"
},
{
"name": "hairline",
"type": "boolean",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "size",
"type": "string",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "block",
"type": "boolean",
"values": []
},
{
"name": "flex",
"type": "boolean",
"values": []
},
{
"name": "plain",
"type": "boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "loading",
"type": "boolean",
"values": []
},
{
"name": "loadingMode",
"type": "string",
"values": []
},
{
"name": "loadingSize",
"type": "string | number",
"values": []
},
{
"name": "loadingIcon",
"type": "string",
"values": []
},
{
"name": "openType",
"type": "string",
"values": []
},
{
"name": "formType",
"type": "string",
"values": []
},
{
"name": "appParameter",
"type": "string",
"values": []
},
{
"name": "hoverClass",
"type": "string",
"values": []
},
{
"name": "hoverStopPropagation",
"type": "boolean",
"values": []
},
{
"name": "lang",
"type": "string",
"values": []
},
{
"name": "sessionFrom",
"type": "string",
"values": []
},
{
"name": "sendMessageTitle",
"type": "string",
"values": []
},
{
"name": "sendMessagePath",
"type": "string",
"values": []
},
{
"name": "sendMessageImg",
"type": "string",
"values": []
},
{
"name": "showMessageCard",
"type": "boolean",
"values": []
},
{
"name": "dataName",
"type": "string",
"values": []
},
{
"name": "throttleTime",
"type": "string | number",
"values": []
},
{
"name": "hoverStartTime",
"type": "string | number",
"values": []
},
{
"name": "hoverStayTime",
"type": "string | number",
"values": []
},
{
"name": "text",
"type": "string | number",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "iconPosition",
"type": "string",
"values": [],
"defaultValue": "'left'"
},
{
"name": "round",
"type": "string | number",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-calendar-month",
"description": "此组件用于单个选择日期,范围选择日期等,日历视图组件。",
"example": "<un-calendar-month mode=\"multiple\"",
"tutorial": "https://uview.d3u.cn/components/calendar.html",
"attributes": [
{
"name": "[event]change",
"description": "日期选择发生变化时触发",
"type": "Function()"
},
{
"name": "[event]select",
"description": "选择日期时触发",
"type": "Function()"
},
{
"name": "[event]monthSwitch",
"description": "月份切换时触发",
"type": "Function()"
},
{
"name": "showTitle",
"type": "boolean",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "selectedHighlight",
"type": "boolean",
"values": []
},
{
"name": "firstDayOfWeek",
"type": "number",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "startText",
"type": "string",
"values": []
},
{
"name": "endText",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "rowHeight",
"type": "string | number",
"values": []
},
{
"name": "showLunar",
"type": "boolean",
"values": []
},
{
"name": "showMark",
"type": "boolean",
"values": []
},
{
"name": "readonly",
"type": "boolean",
"values": []
},
{
"name": "minDate",
"type": "string | number",
"values": []
},
{
"name": "maxDate",
"type": "string | number",
"values": []
},
{
"name": "disabledDate",
"type": "Array<any>",
"values": []
},
{
"name": "selected",
"type": "{}",
"values": [],
"defaultValue": "[]"
},
{
"name": "showOtherMonthDays",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "extend",
"type": "{}",
"values": [],
"defaultValue": "[]"
},
{
"name": "current",
"type": "string",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-calendar-view",
"description": "此组件用于单个选择日期,范围选择日期等,日历视图组件。",
"example": "<un-calendar-view :defaultDate=\"defaultDateMultiple\" mode=\"multiple\"",
"tutorial": "https://uview.d3u.cn/components/calendar.html",
"attributes": [
{
"name": "[event]change",
"description": "日期选择发生变化时触发",
"type": "Function()"
},
{
"name": "[event]select",
"description": "选择日期时触发",
"type": "Function()"
},
{
"name": "[event]monthSwitch",
"description": "月份切换时触发",
"type": "Function()"
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "showTitle",
"type": "boolean",
"values": []
},
{
"name": "showSubtitle",
"type": "boolean",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "selectedHighlight",
"type": "boolean",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "startText",
"type": "string",
"values": []
},
{
"name": "endText",
"type": "string",
"values": []
},
{
"name": "firstDayOfWeek",
"type": "number",
"values": []
},
{
"name": "showOtherMonthDays",
"type": "boolean",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "swiperDirection",
"type": "\"vertical\" | \"horizontal\"",
"values": []
},
{
"name": "monthNum",
"type": "string | number",
"values": []
},
{
"name": "defaultDate",
"type": "Array<any>",
"values": []
},
{
"name": "maxCount",
"type": "string | number",
"values": []
},
{
"name": "rowHeight",
"type": "string | number",
"values": []
},
{
"name": "showLunar",
"type": "boolean",
"values": []
},
{
"name": "showMark",
"type": "boolean",
"values": []
},
{
"name": "readonly",
"type": "boolean",
"values": []
},
{
"name": "allRangeDates",
"type": "boolean",
"values": []
},
{
"name": "maxRange",
"type": "string | number",
"values": []
},
{
"name": "rangePrompt",
"type": "string",
"values": []
},
{
"name": "showRangePrompt",
"type": "boolean",
"values": []
},
{
"name": "allowSameDay",
"type": "boolean",
"values": []
},
{
"name": "switchMode",
"type": "\"none\" | \"year\" | \"month\" | \"year-month\"",
"values": []
},
{
"name": "viewMode",
"type": "\"swiper\" | \"scroll\" | \"single\"",
"values": []
},
{
"name": "weekdays",
"type": "string",
"values": []
},
{
"name": "minDate",
"type": "string | number",
"values": []
},
{
"name": "maxDate",
"type": "string | number",
"values": []
},
{
"name": "disabledDate",
"type": "Array<any>",
"values": []
},
{
"name": "extend",
"type": "Array<CalendarExtend>",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-calendar",
"description": "此组件用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中.",
"example": "<un-calendar :defaultDate=\"defaultDateMultiple\" :show=\"show\" mode=\"multiple\"",
"tutorial": "https://uview.d3u.cn/components/calendar.html",
"attributes": [
{
"name": "[event]confirm",
"description": "点击确定按钮时触发\t\t选择日期相关的返回参数",
"type": "Function()"
},
{
"name": "[event]close",
"description": "日历关闭时触发\t\t\t可定义页面关闭时的回调事件",
"type": "Function()"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "showTitle",
"type": "boolean",
"values": []
},
{
"name": "showSubtitle",
"type": "boolean",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "firstDayOfWeek",
"type": "number",
"values": []
},
{
"name": "showOtherMonthDays",
"type": "boolean",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "startText",
"type": "string",
"values": []
},
{
"name": "endText",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "viewMode",
"type": "string",
"values": []
},
{
"name": "minDate",
"type": "string | number",
"values": []
},
{
"name": "maxDate",
"type": "string | number",
"values": []
},
{
"name": "defaultDate",
"type": "Array<any>",
"values": []
},
{
"name": "swiperDirection",
"type": "\"vertical\" | \"horizontal\"",
"values": []
},
{
"name": "maxCount",
"type": "string | number",
"values": []
},
{
"name": "rowHeight",
"type": "string | number",
"values": []
},
{
"name": "formatter",
"type": "Function",
"values": []
},
{
"name": "showLunar",
"type": "boolean",
"values": []
},
{
"name": "showMark",
"type": "boolean",
"values": []
},
{
"name": "readonly",
"type": "boolean",
"values": []
},
{
"name": "maxRange",
"type": "string | number",
"values": []
},
{
"name": "rangePrompt",
"type": "string",
"values": []
},
{
"name": "showRangePrompt",
"type": "boolean",
"values": []
},
{
"name": "monthNum",
"type": "string | number",
"values": []
},
{
"name": "allowSameDay",
"type": "boolean",
"values": []
},
{
"name": "disabledDate",
"type": "Array<any>",
"values": []
},
{
"name": "weekdays",
"type": "string",
"values": []
},
{
"name": "buttonDisabled",
"type": "boolean",
"values": []
},
{
"name": "showConfirm",
"type": "boolean",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "confirmText",
"type": "string",
"values": []
},
{
"name": "confirmDisabledText",
"type": "string",
"values": []
},
{
"name": "selectedHighlight",
"type": "boolean",
"values": []
},
{
"name": "extend",
"type": "Array<CalendarExtend>",
"values": [],
"defaultValue": "[]"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-canvas",
"attributes": [
{
"name": "[event]onTouchstart",
"description": "",
"type": "Event"
},
{
"name": "[event]onTouchmove",
"description": "",
"type": "Event"
},
{
"name": "[event]onTouchend",
"description": "",
"type": "Event"
},
{
"name": "[event]onTouchcancel",
"description": "",
"type": "Event"
},
{
"name": "[event]onLongtap",
"description": "",
"type": "Event"
},
{
"name": "[event]onError",
"description": "",
"type": "Event"
},
{
"name": "type",
"type": "\"2d\" | \"webgl\"",
"values": [
{
"name": "2d",
"description": ""
},
{
"name": "webgl"
}
],
"defaultValue": "'webgl'"
},
{
"name": "width",
"type": "string | number",
"values": [],
"defaultValue": "375"
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "disableScroll",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-card",
"description": "卡片组件一般用于多个列表条目,且风格统一的场景",
"example": "<un-card padding=\"30\" title=\"card\"></un-card>",
"tutorial": "https://uview.d3u.cn/components/card.html",
"attributes": [
{
"name": "[event]click",
"description": "整个卡片任意位置被点击时触发",
"type": "Function"
},
{
"name": "[event]headClick",
"description": "卡片头部被点击时触发",
"type": "Function"
},
{
"name": "[event]bodyClick",
"description": "卡片主体部分被点击时触发",
"type": "Function"
},
{
"name": "[event]footClick",
"description": "卡片底部部分被点击时触发",
"type": "Function"
},
{
"name": "[event]headerClick",
"description": "",
"type": "Event"
},
{
"name": "[event]footerClick",
"description": "",
"type": "Event"
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "titleColor",
"type": "string",
"values": []
},
{
"name": "titleSize",
"type": "string | number",
"values": []
},
{
"name": "subTitle",
"type": "string",
"values": []
},
{
"name": "subTitleColor",
"type": "string",
"values": []
},
{
"name": "subTitleSize",
"type": "string | number",
"values": []
},
{
"name": "border",
"type": "boolean",
"values": []
},
{
"name": "index",
"type": "string | number",
"values": []
},
{
"name": "shadow",
"type": "boolean",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "headerStyle",
"type": "string | object",
"values": []
},
{
"name": "bodyStyle",
"type": "string | object",
"values": []
},
{
"name": "footerStyle",
"type": "string | object",
"values": []
},
{
"name": "headerBorderBottom",
"type": "boolean",
"values": []
},
{
"name": "footerBorderTop",
"type": "boolean",
"values": []
},
{
"name": "extra",
"type": "string",
"values": []
},
{
"name": "thumb",
"type": "string",
"values": []
},
{
"name": "thumbWidth",
"type": "string | number",
"values": []
},
{
"name": "thumbCircle",
"type": "boolean",
"values": []
},
{
"name": "extraColor",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "extraSize",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "bgColor",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "thumbRadius",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "padding",
"type": "string | number",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-cascader-picker",
"description": "级联选择器(弹出层),用于多级数据的选择,支持单选和多选模式",
"example": "<un-cascader-picker :show=\"show\" :options=\"options\"",
"tutorial": "https://uview.d3u.cn/components/cascader-picker.html",
"attributes": [
{
"name": "[event]confirm",
"description": "确认选择时触发",
"type": "Function"
},
{
"name": "[event]cancel",
"description": "取消选择时触发",
"type": "Function"
},
{
"name": "[event]change",
"description": "选择内容变化时触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "关闭选择器时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "titleStyle",
"type": "string | object",
"values": []
},
{
"name": "options",
"type": "{}",
"values": []
},
{
"name": "modelValue",
"type": "Array<string | number>",
"values": []
},
{
"name": "value",
"type": "Array<string | number>",
"values": []
},
{
"name": "placeholder",
"type": "string",
"values": []
},
{
"name": "itemHeight",
"type": "string",
"values": []
},
{
"name": "confirmText",
"type": "string",
"values": []
},
{
"name": "cancelText",
"type": "string",
"values": []
},
{
"name": "confirmDisabled",
"type": "boolean",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "showToolbar",
"type": "boolean",
"values": []
},
{
"name": "showTabbar",
"type": "boolean",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "activeBgColor",
"type": "string",
"values": []
},
{
"name": "activeBold",
"type": "boolean",
"values": []
},
{
"name": "activeLabelColor",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "safeAreaInsetBottom",
"type": "boolean",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "loading",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "confirmColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "cancelColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "visibleItemCount",
"type": "string | number",
"values": [],
"defaultValue": "5"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-cascader",
"description": "级联选择器,用于多级数据的选择,支持单选和多选模式",
"example": "<un-cascader :show=\"show\" :options=\"options\"",
"tutorial": "https://uview.d3u.cn/components/cascader.html",
"attributes": [
{
"name": "[event]change",
"description": "选择改变时触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "关闭时触发",
"type": "Function"
},
{
"name": "[event]confirm",
"description": "确认选择时触发",
"type": "Function"
},
{
"name": "[event]selected",
"description": "选择时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]select",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "titleStyle",
"type": "string | object",
"values": []
},
{
"name": "options",
"type": "{}",
"values": []
},
{
"name": "modelValue",
"type": "Array<string | number>",
"values": []
},
{
"name": "value",
"type": "Array<string | number>",
"values": []
},
{
"name": "placeholder",
"type": "string",
"values": []
},
{
"name": "closeable",
"type": "boolean",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "activeBgColor",
"type": "string",
"values": []
},
{
"name": "activeBold",
"type": "boolean",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "safeAreaInsetBottom",
"type": "boolean",
"values": []
},
{
"name": "itemHeight",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-cell-group",
"description": "cellGroup用于将多个cell组件组合在一起,形成一个列表组。",
"example": "<un-cell-group title=\"设置喜好\">",
"tutorial": "https://uviewui.com/components/cell.html",
"attributes": [
{
"name": "[event]click",
"description": "点击cell列表时触发",
"type": "Function"
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "border",
"type": "boolean",
"values": []
},
{
"name": "backgroundColor",
"type": "string",
"values": []
},
{
"name": "round",
"type": "string",
"values": []
},
{
"name": "borderColor",
"type": "string",
"values": []
},
{
"name": "borderOffset",
"type": "{}",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-cell",
"description": "cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。",
"example": "该组件需要搭配cell-group组件使用,见官方文档示例",
"tutorial": "https://uviewui.com/components/cell.html",
"attributes": [
{
"name": "[event]click",
"description": "点击cell列表时触发",
"type": "Function"
},
{
"name": "title",
"type": "string | number",
"values": []
},
{
"name": "label",
"type": "string | number",
"values": []
},
{
"name": "value",
"type": "string | number",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "border",
"type": "boolean",
"values": []
},
{
"name": "borderColor",
"type": "string",
"values": []
},
{
"name": "center",
"type": "boolean",
"values": []
},
{
"name": "url",
"type": "string",
"values": []
},
{
"name": "linkType",
"type": "string",
"values": []
},
{
"name": "clickable",
"type": "boolean",
"values": []
},
{
"name": "isLink",
"type": "boolean",
"values": []
},
{
"name": "required",
"type": "boolean",
"values": []
},
{
"name": "rightIcon",
"type": "string",
"values": []
},
{
"name": "arrowDirection",
"type": "string",
"values": []
},
{
"name": "iconStyle",
"type": "string | object",
"values": []
},
{
"name": "rightIconStyle",
"type": "string | object",
"values": []
},
{
"name": "titleStyle",
"type": "string | object",
"values": []
},
{
"name": "size",
"type": "string",
"values": []
},
{
"name": "stop",
"type": "boolean",
"values": []
},
{
"name": "name",
"type": "string | number",
"values": []
},
{
"name": "borderOffset",
"type": "{}",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-checkbox-group",
"description": "多选框组用于有多个选择,用户可以选择其中多个的场景。搭配un-checkbox使用",
"example": "<un-checkbox-group v-model=\"value\"></un-checkbox-group>",
"tutorial": "https://uview.d3u.cn/components/checkbox.html",
"attributes": [
{
"name": "[event]change",
"description": "任一个checkbox状态发生变化时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "Array<string | number>",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "name",
"type": "string",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "placement",
"type": "string",
"values": []
},
{
"name": "label",
"type": "string",
"values": []
},
{
"name": "labelColor",
"type": "string",
"values": []
},
{
"name": "labelSize",
"type": "string | number",
"values": []
},
{
"name": "labelDisabled",
"type": "boolean",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "borderBottom",
"type": "boolean",
"values": []
},
{
"name": "iconPlacement",
"type": "string",
"values": []
},
{
"name": "activeLabelColor",
"type": "string",
"values": []
},
{
"name": "plain",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-checkbox",
"description": "单选框用于有一个选择,用户只能选择其中一个的场景。搭配un-checkbox-group使用",
"example": "<un-checkbox :labelDisabled=\"false\">门掩黄昏,无计留春住</un-checkbox>",
"tutorial": "https://uview.d3u.cn/components/checkbox.html",
"attributes": [
{
"name": "[event]change",
"description": "某个checkbox状态发生变化时触发(选中状态)",
"type": "Function"
},
{
"name": "[event]update:checked",
"description": "",
"type": "Event"
},
{
"name": "name",
"type": "string | number | boolean",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "labelDisabled",
"type": "boolean",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "labelSize",
"type": "string | number",
"values": []
},
{
"name": "label",
"type": "string | number",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "labelColor",
"type": "string",
"values": []
},
{
"name": "activeLabelColor",
"type": "string",
"values": []
},
{
"name": "checked",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "indeterminate",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "iconPlacement",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-circle-progress",
"description": "展示操作或任务的当前进度,比如上传文件,是一个圆形的进度条。支持动态增加和减少进度值。",
"example": "<un-circle-progress active-color=\"#2979ff\" :value=\"80\"></un-circle-progress>",
"tutorial": "https://uview.d3u.cn/components/circleProgress.html",
"attributes": [
{
"name": "value",
"type": "number",
"values": []
},
{
"name": "size",
"type": "number",
"values": []
},
{
"name": "max",
"type": "number",
"values": []
},
{
"name": "clockwise",
"type": "boolean",
"values": []
},
{
"name": "duration",
"type": "number",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": [],
"defaultValue": "'#ececec'"
},
{
"name": "activeColor",
"type": "string",
"values": [],
"defaultValue": "'#19be6b'"
},
{
"name": "strokeWidth",
"type": "number",
"values": [],
"defaultValue": "14"
},
{
"name": "startAngle",
"type": "number",
"values": [],
"defaultValue": "-Math.PI / 2"
},
{
"name": "bgColor",
"type": "string",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-close",
"description": "用于关闭操作,通常用于标签、弹窗等场景",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "closable",
"type": "boolean",
"values": []
},
{
"name": "closeInside",
"type": "boolean",
"values": []
},
{
"name": "closeColor",
"type": "string",
"values": []
},
{
"name": "closeSize",
"type": "string | number",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": [],
"defaultValue": "16"
},
{
"name": "bgColor",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "type",
"type": "\"primary\" | \"error\" | \"success\" | \"warning\" | \"info\"",
"values": [
{
"name": "primary",
"description": ""
},
{
"name": "error",
"description": ""
},
{
"name": "success",
"description": ""
},
{
"name": "warning",
"description": ""
},
{
"name": "info",
"description": ""
}
],
"defaultValue": "null"
},
{
"name": "showIcon",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "iconName",
"type": "string",
"values": [],
"defaultValue": "'close'"
},
{
"name": "iconScale",
"type": "number",
"values": [],
"defaultValue": "0.6"
},
{
"name": "iconColor",
"type": "string",
"values": [],
"defaultValue": "'#ffffff'"
},
{
"name": "shape",
"type": "\"circle\" | \"square\"",
"values": [
{
"name": "circle",
"description": ""
},
{
"name": "square",
"description": ""
}
],
"defaultValue": "'circle'"
},
{
"name": "round",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-code-input",
"description": "该组件一般用于验证用户短信验证码的场景,也可以结合uView的键盘组件使用",
"example": "<un-code-input v-model=\"value4\" :focus=\"true\"></un-code-input>",
"tutorial": "https://uview.d3u.cn/components/codeInput.html",
"attributes": [
{
"name": "[event]change",
"description": "输入内容发生改变时触发,具体见上方说明\t\t\tvalue:当前输入的值",
"type": "Function"
},
{
"name": "[event]finish",
"description": "输入字符个数达maxlength值时触发,见上方说明\tvalue:当前输入的值",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "confirmType",
"type": "string",
"values": []
},
{
"name": "confirmHold",
"type": "boolean",
"values": []
},
{
"name": "maxlength",
"type": "string | number",
"values": []
},
{
"name": "type",
"type": "\"number\" | \"text\"",
"values": []
},
{
"name": "dot",
"type": "boolean",
"values": []
},
{
"name": "mode",
"type": "\"box\" | \"line\"",
"values": []
},
{
"name": "hairline",
"type": "boolean",
"values": []
},
{
"name": "space",
"type": "string | number",
"values": []
},
{
"name": "value",
"type": "String | Number",
"values": []
},
{
"name": "focus",
"type": "boolean",
"values": []
},
{
"name": "bold",
"type": "boolean",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "disabledKeyboard",
"type": "boolean",
"values": []
},
{
"name": "borderColor",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "disabledDot",
"type": "boolean",
"values": []
},
{
"name": "modelValue",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "adjustPosition",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "round",
"type": "string | number",
"values": [],
"defaultValue": "4"
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-col",
"description": "该组件一般用于Layout 布局 通过基础的 12 分栏,迅速简便地创建布局",
"example": "<un-col span=\"3\" offset=\"3\" > <view class=\"demo-layout bg-purple\"></view> </un-col>",
"tutorial": "https://uview.d3u.cn/components/Layout.html",
"attributes": [
{
"name": "[event]click",
"description": "col被点击,会阻止事件冒泡到row",
"type": "Function"
},
{
"name": "span",
"type": "string | number",
"values": []
},
{
"name": "offset",
"type": "string | number",
"values": []
},
{
"name": "justify",
"type": "string",
"values": []
},
{
"name": "align",
"type": "string",
"values": []
},
{
"name": "textAlign",
"type": "string",
"values": [],
"defaultValue": "'left'"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-collapse-item",
"description": "通过折叠面板收纳内容区域(搭配u-collapse使用)",
"example": "<u-collapse-item :title=\"item.head\" v-for=\"(item, index) in itemList\" :key=\"index\">{{item.body}}</u-collapse-item>",
"tutorial": "https://uview.d3u.cn/components/collapse.html",
"attributes": [
{
"name": "[event]open",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "value",
"type": "string",
"values": []
},
{
"name": "label",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "isLink",
"type": "boolean",
"values": []
},
{
"name": "clickable",
"type": "boolean",
"values": []
},
{
"name": "border",
"type": "boolean",
"values": []
},
{
"name": "align",
"type": "string",
"values": []
},
{
"name": "name",
"type": "string | number",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "number",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-collapse",
"description": "通过折叠面板收纳内容区域",
"example": "<u-collapse></u-collapse>",
"tutorial": "https://uview.d3u.cn/components/collapse.html",
"attributes": [
{
"name": "[event]change",
"description": "当前激活面板展开时触发(如果是手风琴模式,参数activeNames类型为String,否则为Array)",
"type": "Function"
},
{
"name": "[event]open",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "value",
"type": "Array<string | number>",
"values": []
},
{
"name": "modelValue",
"type": "Array<string | number>",
"values": []
},
{
"name": "accordion",
"type": "boolean",
"values": []
},
{
"name": "border",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-color-picker-view",
"description": "用于颜色选择的组件,支持多种颜色格式和预设颜色",
"example": "<un-color-picker-view v-model=\"color\" />",
"attributes": [
{
"name": "[event]change",
"description": "颜色值变化时触发",
"type": "Function"
},
{
"name": "[event]formatChange",
"description": "颜色格式变化时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "string",
"values": []
},
{
"name": "showAlphaSlider",
"type": "boolean",
"values": []
},
{
"name": "showHueSlider",
"type": "boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "showPresets",
"type": "boolean",
"values": []
},
{
"name": "presets",
"type": "{}",
"values": []
},
{
"name": "customStyle",
"type": "any",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-color-picker",
"description": "用于颜色选择的组件,支持多种颜色格式和预设颜色",
"example": "<un-color-picker :show=\"show\"",
"attributes": [
{
"name": "[event]change",
"description": "颜色值变化时触发",
"type": "Function"
},
{
"name": "[event]formatChange",
"description": "颜色格式变化时触发",
"type": "Function"
},
{
"name": "[event]confirm",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "[event]open",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "closeable",
"type": "boolean",
"values": []
},
{
"name": "value",
"type": "string",
"values": []
},
{
"name": "defaultValue",
"type": "string",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "showAlphaSlider",
"type": "boolean",
"values": []
},
{
"name": "showHueSlider",
"type": "boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "showPresets",
"type": "boolean",
"values": []
},
{
"name": "presets",
"type": "{}",
"values": []
},
{
"name": "showConfirm",
"type": "boolean",
"values": []
},
{
"name": "round",
"type": "any",
"values": []
},
{
"name": "confirmText",
"type": "string",
"values": []
},
{
"name": "confirmDisabledText",
"type": "String",
"values": []
},
{
"name": "title",
"type": "string",
"values": [],
"defaultValue": "'请选择颜色'"
},
{
"name": "confirmShape",
"type": "string",
"values": [],
"defaultValue": "'circle'"
},
{
"name": "zIndex",
"type": "number",
"values": [],
"defaultValue": "100"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-count-down",
"description": "该组件一般使用于某个活动的截止时间上,通过数字的变化,给用户明确的时间感受,提示用户进行某一个行为操作。",
"example": "<un-count-down :time=\"time\"></un-count-down>",
"tutorial": "https://uviewui.com/components/countDown.html",
"attributes": [
{
"name": "[event]finish",
"description": "倒计时结束时触发",
"type": "Function"
},
{
"name": "[event]change",
"description": "倒计时变化时触发",
"type": "Function"
},
{
"name": "[event]start",
"description": "开始倒计时",
"type": "Function"
},
{
"name": "[event]pause",
"description": "暂停倒计时",
"type": "Function"
},
{
"name": "[event]reset",
"description": "重设倒计时,若 auto-start 为 true,重设后会自动开始倒计时",
"type": "Function"
},
{
"name": "time",
"type": "string | number",
"values": []
},
{
"name": "format",
"type": "string",
"values": []
},
{
"name": "autoStart",
"type": "boolean",
"values": []
},
{
"name": "millisecond",
"type": "boolean",
"values": []
},
{
"name": "keepAlive",
"type": "Boolean",
"values": []
},
{
"name": "uniqueKey",
"type": "string",
"values": []
},
{
"name": "padZero",
"type": "boolean",
"values": []
},
{
"name": "keepRunning",
"type": "boolean",
"values": [],
"defaultValue": "false"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-count-to",
"description": "该组件一般用于需要滚动数字到某一个值的场景,目标要求是一个递增的值。",
"example": "<un-count-to ref=\"uCountTo\" :end-val=\"endVal\" :autoplay=\"autoplay\"></un-count-to>",
"tutorial": "https://uview.d3u.cn/components/countTo.html",
"attributes": [
{
"name": "[event]end",
"description": "数值滚动到目标值时触发",
"type": "Function"
},
{
"name": "startVal",
"type": "string | number",
"values": []
},
{
"name": "endVal",
"type": "string | number",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "autoplay",
"type": "boolean",
"values": []
},
{
"name": "decimals",
"type": "string | number",
"values": []
},
{
"name": "useEasing",
"type": "boolean",
"values": []
},
{
"name": "decimal",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "bold",
"type": "boolean",
"values": []
},
{
"name": "separator",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-cropper",
"description": "封装的图片裁剪组件,支持图片选择、裁剪、旋转等功能,适用于头像上传、图片编辑等场景",
"example": "<un-cropper",
"tutorial": "https://uview.d3u.cn/components/cropper.html",
"attributes": [
{
"name": "[event]change",
"description": "选择图片时触发,返回原始图片路径",
"type": "Function"
},
{
"name": "[event]open",
"description": "打开裁剪弹窗时触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "关闭裁剪弹窗时触发",
"type": "Function"
},
{
"name": "[event]confirm",
"description": "确认裁剪时触发,返回裁剪后的图片临时路径",
"type": "Function"
},
{
"name": "[event]error",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "cancelText",
"type": "string",
"values": []
},
{
"name": "confirmText",
"type": "string",
"values": []
},
{
"name": "autoChoose",
"type": "boolean",
"values": []
},
{
"name": "rectWidth",
"type": "string | number",
"values": []
},
{
"name": "rectHeight",
"type": "string | number",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "fileType",
"type": "string",
"values": []
},
{
"name": "quality",
"type": "string | number",
"values": []
},
{
"name": "showGrid",
"type": "boolean",
"values": []
},
{
"name": "openType",
"type": "string",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "watermark",
"type": "UnWatermarkOption",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-curtain",
"attributes": [
{
"name": "[event]open",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "closeable",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "closeIconColor",
"type": "string",
"values": [],
"defaultValue": "'#ffffff'"
},
{
"name": "closeIconSize",
"type": "number",
"values": [],
"defaultValue": "24"
},
{
"name": "closeIconPos",
"type": "string",
"values": [],
"defaultValue": "'outset-bottom-center'"
},
{
"name": "closeIcon",
"type": "string",
"values": [],
"defaultValue": "'close-circle'"
},
{
"name": "overlay",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "overlayStyle",
"type": "object",
"values": [],
"defaultValue": "{}"
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "zIndex",
"type": "string | number",
"values": [],
"defaultValue": "100"
},
{
"name": "safeAreaInsetBottom",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "safeAreaInsetTop",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "bgColor",
"type": "string",
"values": [],
"defaultValue": "'transparent'"
},
{
"name": "overlayOpacity",
"type": "string | number",
"values": [],
"defaultValue": "0.5"
},
{
"name": "width",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-datetime-picker",
"attributes": [
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]confirm",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "[event]cancel",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "showToolbar",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "modelValue",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "title",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "mode",
"type": "string",
"values": [],
"defaultValue": "'datetime'"
},
{
"name": "maxDate",
"type": "string | number",
"values": [],
"defaultValue": "() => dayjs().add(10, 'year').valueOf()"
},
{
"name": "minDate",
"type": "string | number",
"values": [],
"defaultValue": "() => dayjs().subtract(10, 'year').valueOf()"
},
{
"name": "minHour",
"type": "number",
"values": [],
"defaultValue": "0"
},
{
"name": "maxHour",
"type": "number",
"values": [],
"defaultValue": "23"
},
{
"name": "minMinute",
"type": "number",
"values": [],
"defaultValue": "0"
},
{
"name": "maxMinute",
"type": "number",
"values": [],
"defaultValue": "59"
},
{
"name": "minSecond",
"type": "number",
"values": [],
"defaultValue": "0"
},
{
"name": "maxSecond",
"type": "number",
"values": [],
"defaultValue": "59"
},
{
"name": "filter",
"type": "FilterFun",
"values": [],
"defaultValue": "(type : string, values : string[]) => values"
},
{
"name": "formatter",
"type": "FormatterFun",
"values": [],
"defaultValue": "(type : string, value : string) => value"
},
{
"name": "loading",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "itemHeight",
"type": "string | number",
"values": [],
"defaultValue": "50"
},
{
"name": "cancelText",
"type": "string",
"values": [],
"defaultValue": "'取消'"
},
{
"name": "confirmText",
"type": "string",
"values": [],
"defaultValue": "'确认'"
},
{
"name": "cancelColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "confirmColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "visibleItemCount",
"type": "string | number",
"values": [],
"defaultValue": "5"
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "defaultIndex",
"type": "{}",
"values": [],
"defaultValue": "() => []"
},
{
"name": "immediateChange",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "round",
"type": "string | number",
"values": [],
"defaultValue": "10"
},
{
"name": "format",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "valueFormat",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "showInput",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "showDefaultValue",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "inputProps",
"type": "UTSJSONObject",
"values": [],
"defaultValue": "{\n\t\treadonly: true,\n\t\tborder: 'surround',\n\t\tshape: 'square',\n\t\tbackgroundColor: '',\n\t\tround: '',\n\t\tcolor: '',\n\t\tprefixIcon: '',\n\t\tsuffixIcon: 'calendar',\n\t\tprefixIconStyle: '',\n\t\tsuffixIconStyle: 'color: #999;',\n\t\tborderColor: '',\n\t\tcustomStyle: '',\n\t\theight: '',\n\t} as UTSJSONObject"
},
{
"name": "zIndex",
"type": "string | number",
"values": [],
"defaultValue": "1000"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-divider",
"description": "区隔内容的分割线,一般用于页面底部\"没有更多\"的提示。",
"example": "<un-divider :color=\"color\">锦瑟无端五十弦</un-divider>",
"tutorial": "https://uview.d3u.cn/components/divider.html",
"attributes": [
{
"name": "[event]click",
"description": "divider组件被点击时触发",
"type": "Function"
},
{
"name": "dashed",
"type": "boolean",
"values": []
},
{
"name": "hairline",
"type": "boolean",
"values": []
},
{
"name": "dot",
"type": "boolean",
"values": []
},
{
"name": "position",
"type": "string",
"values": []
},
{
"name": "text",
"type": "string | number",
"values": []
},
{
"name": "bold",
"type": "boolean",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "lineColor",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-draggable",
"attributes": [
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "list",
"type": "{}",
"values": [],
"defaultValue": "() => []"
},
{
"name": "column",
"type": "number",
"values": [],
"defaultValue": "1"
},
{
"name": "itemHeight",
"type": "string | number",
"values": [],
"defaultValue": "60"
},
{
"name": "disabled",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "longpress",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "closeable",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "direction",
"type": "\"all\" | \"horizontal\" | \"vertical\"",
"values": [
{
"name": "all",
"description": ""
},
{
"name": "horizontal",
"description": ""
},
{
"name": "vertical",
"description": ""
}
],
"defaultValue": "'all'"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-dropdown-item",
"attributes": [
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]opened",
"description": "",
"type": "Event"
},
{
"name": "[event]closed",
"description": "",
"type": "Event"
},
{
"name": "[event]open",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "string | number | {}",
"values": [],
"defaultValue": "''"
},
{
"name": "title",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "disabledClick",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "options",
"type": "{}",
"values": [],
"defaultValue": "[]"
},
{
"name": "disabled",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-dropdown",
"description": "该组件一般用于向下展开菜单,同时可切换多个选项卡的场景",
"example": "<un-dropdown></un-dropdown>",
"tutorial": "http://uviewui.com/components/dropdown.html",
"attributes": [
{
"name": "[event]open",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "disabledColor",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "closeOnClickMask",
"type": "boolean",
"values": []
},
{
"name": "closeOnClickSelf",
"type": "boolean",
"values": []
},
{
"name": "overlay",
"type": "boolean",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "borderBottom",
"type": "boolean",
"values": []
},
{
"name": "titleSize",
"type": "string | number",
"values": []
},
{
"name": "borderRadius",
"type": "string | number",
"values": []
},
{
"name": "menuIcon",
"type": "string",
"values": []
},
{
"name": "menuIconSize",
"type": "string | number",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-empty",
"description": "该组件用于需要加载内容,但是加载的第一页数据就为空,提示一个\"没有内容\"的场景, 我们精心挑选了十几个场景的图标,方便您使用。",
"example": "<un-empty text=\"所谓伊人,在水一方\" mode=\"list\"></un-empty>",
"tutorial": "https://uview.d3u.cn/components/empty.html",
"attributes": [
{
"name": "[event]click",
"description": "点击组件时触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "点击关闭按钮时触发",
"type": "Function"
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "text",
"type": "string",
"values": []
},
{
"name": "textColor",
"type": "string | number",
"values": []
},
{
"name": "textSize",
"type": "string | number",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "marginTop",
"type": "string | number",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-fab",
"description": "悬浮动作按钮组件,按下可显示一组动作按钮",
"example": "<un-fab v-model:active=\"active\" :type=\"type\" :position=\"position\" :direction=\"direction\"></un-fab>",
"tutorial": "https://uview.d3u.cn/components/fab.html",
"attributes": [
{
"name": "[event]click",
"description": "expandable 设置为 false 时,点击悬浮按钮触发",
"type": "Function"
},
{
"name": "[event]change",
"description": "菜单状态改变时触发",
"type": "Function"
},
{
"name": "[event]update:active",
"description": "",
"type": "Event"
},
{
"name": "active",
"type": "boolean",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "position",
"type": "string",
"values": []
},
{
"name": "draggable",
"type": "string",
"values": []
},
{
"name": "direction",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "inactiveIcon",
"type": "string",
"values": []
},
{
"name": "activeIcon",
"type": "string",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "zIndex",
"type": "number",
"values": []
},
{
"name": "gap",
"type": "{}",
"values": []
},
{
"name": "expandable",
"type": "boolean",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": [],
"defaultValue": "16"
},
{
"name": "size",
"type": "string | number",
"values": [],
"defaultValue": "46"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-float-panel",
"description": "可拖拽的浮动面板,支持上下拖动调整位置,常用于底部弹出的操作面板",
"example": "<un-float-panel :height=\"800\" :anchors=\"[0, 300]\" overlay></un-float-panel>",
"tutorial": "uview.d3u.cn",
"attributes": [
{
"name": "[event]change",
"description": "面板位置变化时触发",
"type": "Function"
},
{
"name": "[event]move",
"description": "",
"type": "Event"
},
{
"name": "height",
"type": "number",
"values": []
},
{
"name": "anchors",
"type": "{}",
"values": []
},
{
"name": "safeAreaInsetBottom",
"type": "boolean",
"values": []
},
{
"name": "contentDraggable",
"type": "boolean",
"values": []
},
{
"name": "overlay",
"type": "boolean",
"values": []
},
{
"name": "overlayOpacity",
"type": "string | number",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "overlayFade",
"type": "boolean",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "defaultAnchor",
"type": "number",
"values": []
},
{
"name": "zIndex",
"type": "number",
"values": []
},
{
"name": "scrollable",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-form-item",
"description": "此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。",
"example": "<un-form-item label=\"姓名\" prop=\"userInfo.name\" borderBottom ref=\"item1\"></un-form-item>",
"tutorial": "https://uview.d3u.cn/components/form.html",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "label",
"type": "string",
"values": []
},
{
"name": "prop",
"type": "string",
"values": []
},
{
"name": "borderBottom",
"type": "boolean",
"values": []
},
{
"name": "borderBottomColor",
"type": "string",
"values": []
},
{
"name": "labelPosition",
"type": "string",
"values": []
},
{
"name": "labelAlign",
"type": "string",
"values": []
},
{
"name": "labelVAlign",
"type": "string",
"values": []
},
{
"name": "labelWidth",
"type": "string | number",
"values": []
},
{
"name": "rightIcon",
"type": "string",
"values": []
},
{
"name": "leftIcon",
"type": "string",
"values": []
},
{
"name": "required",
"type": "boolean",
"values": []
},
{
"name": "asteriskPosition",
"type": "string",
"values": []
},
{
"name": "leftIconStyle",
"type": "string | object",
"values": []
},
{
"name": "rules",
"type": "UTSJSONObject",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-form",
"description": "此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。",
"example": "<u-form labelPosition=\"left\" :model=\"model1\" :rules=\"rules\" ref=\"form1\"></u-form>",
"tutorial": "https://uview.d3u.cn/components/form.html",
"attributes": [
{
"name": "[event]update:model",
"description": "",
"type": "Event"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "model",
"type": "any",
"values": []
},
{
"name": "rules",
"type": "any",
"values": []
},
{
"name": "errorType",
"type": "string",
"values": []
},
{
"name": "borderBottom",
"type": "boolean",
"values": []
},
{
"name": "borderBottomColor",
"type": "string",
"values": []
},
{
"name": "labelPosition",
"type": "string",
"values": []
},
{
"name": "labelWidth",
"type": "string | number",
"values": []
},
{
"name": "labelAlign",
"type": "string",
"values": []
},
{
"name": "labelVAlign",
"type": "string",
"values": []
},
{
"name": "asteriskPosition",
"type": "string",
"values": []
},
{
"name": "labelStyle",
"type": "object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-gap",
"description": "该组件一般用于内容块之间的用一个灰色块隔开的场景,方便用户风格统一,减少工作量",
"example": "<un-gap height=\"80\" bg-color=\"#bbb\"></un-gap>",
"tutorial": "https://uview.d3u.cn/components/gap.html",
"attributes": [
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "marginTop",
"type": "string | number",
"values": []
},
{
"name": "marginBottom",
"type": "string | number",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-grid-item",
"description": "宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。搭配u-grid使用",
"example": "<u-grid-item></u-grid-item>",
"tutorial": "https://uview.d3u.cn/components/grid.html",
"attributes": [
{
"name": "[event]click",
"description": "点击宫格触发",
"type": "Function"
},
{
"name": "name",
"type": "string | number",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-grid",
"description": "宫格组件一般用于同时展示多个同类项目的场景,可以给宫格的项目设置徽标组件(badge),或者图标等,也可以扩展为左右滑动的轮播形式。",
"example": "<un-grid :col=\"3\"",
"tutorial": "https://uview.d3u.cn/components/grid.html",
"attributes": [
{
"name": "[event]click",
"description": "点击宫格触发",
"type": "Function"
},
{
"name": "col",
"type": "string | number",
"values": []
},
{
"name": "border",
"type": "boolean",
"values": []
},
{
"name": "align",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "gutter",
"type": "string | number",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-icon",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "name",
"type": "string",
"values": [],
"defaultValue": "\"\""
},
{
"name": "desc",
"type": "string",
"values": [],
"defaultValue": "\"\""
},
{
"name": "color",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "type",
"type": "string",
"values": [],
"defaultValue": "\"default\""
},
{
"name": "size",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "bold",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "index",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "hoverClass",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "prefix",
"type": "string",
"values": [],
"defaultValue": "\"uicon\""
},
{
"name": "imgMode",
"type": "string",
"values": [],
"defaultValue": "\"aspectFit\""
},
{
"name": "width",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "top",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "stop",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-image",
"description": "此组件为uni-app的image组件的加强版,在继承了原有功能外,还支持淡入动画、加载中、加载失败提示、圆角值和形状等。",
"example": "<u-image width=\"100%\" height=\"300px\" :src=\"src\"></u-image>",
"tutorial": "https://uviewui.com/components/image.html",
"attributes": [
{
"name": "[event]click",
"description": "点击图片时触发",
"type": "Function"
},
{
"name": "[event]error",
"description": "图片加载失败时触发",
"type": "Function"
},
{
"name": "[event]load",
"description": "图片加载成功时触发",
"type": "Function"
},
{
"name": "src",
"type": "string",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "previewSrcList",
"type": "{}",
"values": []
},
{
"name": "fadeShow",
"type": "Boolean",
"values": []
},
{
"name": "previewIndex",
"type": "number",
"values": []
},
{
"name": "lazyLoad",
"type": "boolean",
"values": []
},
{
"name": "showMenuByLongpress",
"type": "boolean",
"values": []
},
{
"name": "loadingIcon",
"type": "string",
"values": []
},
{
"name": "errorIcon",
"type": "string",
"values": []
},
{
"name": "showLoading",
"type": "boolean",
"values": []
},
{
"name": "showError",
"type": "boolean",
"values": []
},
{
"name": "webp",
"type": "boolean",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "any",
"values": []
},
{
"name": "fade",
"type": "boolean",
"values": [],
"defaultValue": "false"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-index-item",
"description": "索引列表的子项组件,必须搭配u-index-list组件使用",
"example": "<u-index-item\"><view>内容</view></u-index-item>",
"tutorial": "https://uviewui.com/components/indexList.html",
"attributes": [
{
"name": "type",
"type": "string | number",
"values": [],
"defaultValue": "0"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-index-list",
"description": "索引列表组件,用于在长列表中快速定位到指定位置",
"example": "<u-index-list></u-index-list>",
"tutorial": "https://uviewui.com/components/indexList.html",
"attributes": [
{
"name": "[event]select",
"description": "选择索引项时触发,参数为选中的索引项的文本内容",
"type": "Function"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "inactiveColor",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "activeColor",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "indicatorBgColor",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "zIndex",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "showIndicator",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "sticky",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "navbarHeight",
"type": "number",
"values": [],
"defaultValue": "0"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-index-section",
"description": "索引段落组件,用于在长列表中快速定位到指定位置",
"example": "<u-index-section></u-index-section>",
"tutorial": "https://uviewui.com/components/indexSection.html",
"attributes": [
{
"name": "[event]select",
"description": "选择索引项时触发,参数为选中的索引项的文本内容",
"type": "Function"
},
{
"name": "index",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "size",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "bgColor",
"type": "string",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-input",
"description": "此组件为一个输入框,默认没有边框和样式,是专门为配合表单组件u-form而设计的,利用它可以快速实现表单验证,输入内容,下拉选择等功能。",
"example": "<un-input v-model=\"value\" :password=\"true\" suffix-icon=\"lock-fill\" />",
"tutorial": "https://uviewui.com/components/input.html",
"attributes": [
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]update:value",
"description": "",
"type": "Event"
},
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "[event]input",
"description": "",
"type": "Event"
},
{
"name": "[event]focus",
"description": "",
"type": "Event"
},
{
"name": "[event]blur",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]confirm",
"description": "",
"type": "Event"
},
{
"name": "[event]clear",
"description": "",
"type": "Event"
},
{
"name": "[event]keyboardheightchange",
"description": "",
"type": "Event"
},
{
"name": "value",
"type": "string | number",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "fixed",
"type": "boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "disabledColor",
"type": "string",
"values": []
},
{
"name": "clearable",
"type": "boolean",
"values": []
},
{
"name": "password",
"type": "boolean",
"values": []
},
{
"name": "showPasswordToggle",
"type": "boolean",
"values": []
},
{
"name": "maxlength",
"type": "string | number",
"values": []
},
{
"name": "placeholder",
"type": "string",
"values": []
},
{
"name": "placeholderClass",
"type": "string",
"values": []
},
{
"name": "placeholderStyle",
"type": "string | object",
"values": []
},
{
"name": "confirmType",
"type": "string",
"values": []
},
{
"name": "confirmHold",
"type": "boolean",
"values": []
},
{
"name": "holdKeyboard",
"type": "boolean",
"values": []
},
{
"name": "focus",
"type": "boolean",
"values": []
},
{
"name": "autoBlur",
"type": "boolean",
"values": []
},
{
"name": "disableDefaultPadding",
"type": "boolean",
"values": []
},
{
"name": "alwaysEmbed",
"type": "boolean",
"values": []
},
{
"name": "cursor",
"type": "string | number",
"values": []
},
{
"name": "cursorColor",
"type": "string",
"values": []
},
{
"name": "cursorSpacing",
"type": "string | number",
"values": []
},
{
"name": "selectionStart",
"type": "string | number",
"values": []
},
{
"name": "selectionEnd",
"type": "string | number",
"values": []
},
{
"name": "adjustPosition",
"type": "boolean",
"values": []
},
{
"name": "inputAlign",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "formatter",
"type": "(value: string) => string",
"values": []
},
{
"name": "prefixIcon",
"type": "string",
"values": []
},
{
"name": "prefixIconStyle",
"type": "string | object",
"values": []
},
{
"name": "suffixIcon",
"type": "string",
"values": []
},
{
"name": "suffixIconStyle",
"type": "string | object",
"values": []
},
{
"name": "border",
"type": "string",
"values": []
},
{
"name": "hairline",
"type": "boolean",
"values": []
},
{
"name": "readonly",
"type": "boolean",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "ignoreCompositionEvent",
"type": "boolean",
"values": []
},
{
"name": "backgroundColor",
"type": "string",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "borderColor",
"type": "string",
"values": []
},
{
"name": "inputmode",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "modelValue",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "clearIconColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "eyeIconSize",
"type": "string | number",
"values": [],
"defaultValue": "20"
},
{
"name": "autoFocus",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-keyboard",
"description": "此为uViw自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3中模式,都有可以打乱按键顺序的选项。",
"example": "<un-keyboard mode=\"number\" v-model=\"show\"></un-keyboard>",
"tutorial": "https://uview.d3u.cn/components/keyboard.html",
"attributes": [
{
"name": "[event]change",
"description": "按键被点击(不包含退格键被点击)",
"type": "Function"
},
{
"name": "[event]cancel",
"description": "键盘顶部工具条左边的\"取消\"按钮被点击",
"type": "Function"
},
{
"name": "[event]confirm",
"description": "键盘顶部工具条右边的\"完成\"按钮被点击",
"type": "Function"
},
{
"name": "[event]backspace",
"description": "键盘退格键被点击",
"type": "Function"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "mode",
"type": "KeyboardMode",
"values": []
},
{
"name": "modelValue",
"type": "string",
"values": []
},
{
"name": "extraKey",
"type": "Array<string>",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "showToolbar",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "random",
"type": "boolean",
"values": []
},
{
"name": "maxlength",
"type": "number",
"values": []
},
{
"name": "safeAreaInsetBottom",
"type": "boolean",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "overlay",
"type": "boolean",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "cancelText",
"type": "string",
"values": []
},
{
"name": "confirmText",
"type": "string",
"values": []
},
{
"name": "carLang",
"type": "CarKeyboardLang",
"values": []
},
{
"name": "autoChange",
"type": "boolean",
"values": []
},
{
"name": "customStyle",
"type": "Object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-line-progress",
"description": "展示操作或任务的当前进度,比如上传文件,是一个线形的进度条。",
"example": "<un-line-progress :percent=\"70\" :show-percent=\"true\"></un-line-progress>",
"tutorial": "https://uview.d3u.cn/components/lineProgress.html",
"attributes": [
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "value",
"type": "number",
"values": []
},
{
"name": "showText",
"type": "boolean",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-line",
"description": "此组件一般用于显示一根线条,用于分隔内容块,有横向和竖向两种模式,且能设置0.5px线条,使用也很简单",
"example": "<u-line color=\"red\"></u-line>",
"tutorial": "https://uview.d3u.cn/components/line.html",
"attributes": [
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "length",
"type": "string | number",
"values": []
},
{
"name": "direction",
"type": "string",
"values": []
},
{
"name": "hairline",
"type": "boolean",
"values": []
},
{
"name": "margin",
"type": "string | number",
"values": []
},
{
"name": "dashed",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-link",
"description": "该组件为超链接组件,在不同平台有不同表现形式:在APP平台会通过plus环境打开内置浏览器,在小程序中把链接复制到粘贴板,同时提示信息,在H5中通过window.open打开链接。",
"example": "<un-link href=\"http://www.uviewui.com\">蜀道难,难于上青天</un-link>",
"tutorial": "https://uview.d3u.cn/components/link.html",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "underLine",
"type": "boolean",
"values": []
},
{
"name": "href",
"type": "string",
"values": []
},
{
"name": "lineColor",
"type": "string",
"values": []
},
{
"name": "text",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-loading-page",
"description": "警此组件为一个小动画,目前用在uView的loadmore加载更多和switch开关等组件的正在加载状态场景。",
"example": "<un-loading mode=\"circle\"></un-loading>",
"tutorial": "https://uview.d3u.cn/components/loading.html",
"attributes": [
{
"name": "loadingText",
"type": "string | number",
"values": []
},
{
"name": "image",
"type": "string",
"values": []
},
{
"name": "loadingMode",
"type": "string",
"values": []
},
{
"name": "loading",
"type": "boolean",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "loadingColor",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-loading",
"description": "使用 UniElement animate API 实现的加载动画组件",
"example": "<u-loading mode=\"circle\"></u-loading>",
"tutorial": "https://uview.d3u.cn/components/loading.html",
"attributes": [
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "textColor",
"type": "string",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "vertical",
"type": "boolean",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "number",
"values": []
},
{
"name": "timingFunction",
"type": "string",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "textSize",
"type": "string | number",
"values": []
},
{
"name": "text",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-loadmore",
"description": "此组件一般用于标识页面底部加载数据时的状态。",
"example": "<un-loadmore :status=\"status\" icon-type=\"iconType\" load-text=\"loadText\" />",
"tutorial": "https://uview.d3u.cn/components/loadMore.html",
"attributes": [
{
"name": "[event]loadmore",
"description": "status为loadmore时,点击组件会发出此事件",
"type": "Function"
},
{
"name": "status",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "icon",
"type": "boolean",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "loadingIcon",
"type": "String",
"values": []
},
{
"name": "loadmoreText",
"type": "string",
"values": []
},
{
"name": "loadingText",
"type": "string",
"values": []
},
{
"name": "nomoreText",
"type": "string",
"values": []
},
{
"name": "isDot",
"type": "boolean",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "marginTop",
"type": "string | number",
"values": []
},
{
"name": "marginBottom",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "line",
"type": "boolean",
"values": []
},
{
"name": "lineColor",
"type": "string",
"values": []
},
{
"name": "dashed",
"type": "boolean",
"values": []
},
{
"name": "iconMode",
"type": "string",
"values": [],
"defaultValue": "'spinner'"
},
{
"name": "iconName",
"type": "string",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-modal",
"description": "弹出模态框,常用于消息提示、消息确认、在当前页面内完成特定的交互操作。",
"example": "<un-modal ref=\"uModal\"",
"tutorial": "https://uview.d3u.cn/components/modul.html",
"attributes": [
{
"name": "[event]confirm",
"description": "点击确认按钮时触发",
"type": "Function"
},
{
"name": "[event]cancel",
"description": "点击取消按钮时触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "点击遮罩关闭出发,closeOnClickOverlay为true有效",
"type": "Function"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "content",
"type": "string",
"values": []
},
{
"name": "confirmText",
"type": "string",
"values": []
},
{
"name": "cancelText",
"type": "string",
"values": []
},
{
"name": "showConfirmButton",
"type": "boolean",
"values": []
},
{
"name": "showCancelButton",
"type": "boolean",
"values": []
},
{
"name": "confirmColor",
"type": "string",
"values": []
},
{
"name": "cancelColor",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "buttonReverse",
"type": "boolean",
"values": []
},
{
"name": "zoom",
"type": "boolean",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "asyncClose",
"type": "boolean",
"values": []
},
{
"name": "closeable",
"type": "boolean",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "negativeTop",
"type": "string | number",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "round",
"type": "string",
"values": []
},
{
"name": "buttonModel",
"type": "\"text\" | \"button\"",
"values": []
},
{
"name": "buttonRadius",
"type": "string",
"values": []
},
{
"name": "confirmBgColor",
"type": "string",
"values": []
},
{
"name": "cancelBgColor",
"type": "string",
"values": []
},
{
"name": "confirmButtonShape",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-navbar",
"description": "此组件一般用于在特殊情况下,需要自定义导航栏的时候用到,一般建议使用uni-app带的导航栏。",
"example": "<un-navbar title=\"剑未配妥,出门已是江湖\" left-text=\"返回\" right-text=\"帮助\"",
"tutorial": "https://uview.d3u.cn/components/navbar.html",
"attributes": [
{
"name": "[event]leftClick",
"description": "点击左侧区域",
"type": "Function"
},
{
"name": "[event]rightClick",
"description": "点击右侧区域",
"type": "Function"
},
{
"name": "safeAreaInsetTop",
"type": "boolean",
"values": []
},
{
"name": "placeholder",
"type": "boolean",
"values": []
},
{
"name": "fixed",
"type": "boolean",
"values": []
},
{
"name": "border",
"type": "boolean",
"values": []
},
{
"name": "leftIcon",
"type": "string",
"values": []
},
{
"name": "leftIconSize",
"type": "string | number",
"values": []
},
{
"name": "leftIconColor",
"type": "string",
"values": []
},
{
"name": "leftText",
"type": "string",
"values": []
},
{
"name": "rightText",
"type": "string",
"values": []
},
{
"name": "rightIcon",
"type": "string",
"values": []
},
{
"name": "rightIconColor",
"type": "string",
"values": []
},
{
"name": "rightIconSize",
"type": "string | number",
"values": []
},
{
"name": "title",
"type": "string | number",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "titleWidth",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "autoBack",
"type": "boolean",
"values": []
},
{
"name": "titleStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-no-network",
"description": "该组件无需任何配置,引入即可,内部自动处理所有功能和事件。",
"example": "<un-no-network></un-no-network>",
"tutorial": "https://uview.d3u.cn/components/noNetwork.html",
"attributes": [
{
"name": "[event]retry",
"description": "用户点击页面的\"重试\"按钮时触发",
"type": "Function"
},
{
"name": "[event]connected",
"description": "",
"type": "Event"
},
{
"name": "[event]disconnected",
"description": "",
"type": "Event"
},
{
"name": "tips",
"type": "string",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "image",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-notice-bar",
"description": "该组件用于滚动通告场景,有多种模式可供选择",
"tutorial": "https://uview.d3u.cn/components/noticeBar.html",
"attributes": [
{
"name": "[event]click",
"description": "点击通告文字触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "点击右侧关闭图标触发",
"type": "Function"
},
{
"name": "text",
"type": "{}",
"values": []
},
{
"name": "direction",
"type": "\"row\" | \"column\"",
"values": []
},
{
"name": "step",
"type": "boolean",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "mode",
"type": "\"\" | \"link\" | \"closable\"",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "speed",
"type": "string | number",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "fontWeight",
"type": "boolean",
"values": []
},
{
"name": "disableTouch",
"type": "boolean",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "url",
"type": "string",
"values": []
},
{
"name": "linkType",
"type": "\"navigateTo\" | \"redirectTo\" | \"reLaunch\" | \"switchTab\"",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-notify",
"description": "该组件一般用于页面顶部向下滑出一个提示,尔后自动收起的场景",
"example": "<un-notify message=\"Hi uView\"></un-notify>",
"attributes": [
{
"name": "[event]open",
"description": "开启组件时调用的函数",
"type": "Function"
},
{
"name": "[event]close",
"description": "关闭组件式调用的函数",
"type": "Function"
},
{
"name": "[event]update:show",
"description": "",
"type": "Event"
},
{
"name": "top",
"type": "string | number",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "message",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "safeAreaInsetTop",
"type": "boolean",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "show",
"type": "boolean",
"values": [],
"defaultValue": "false"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-number-box",
"attributes": [
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]focus",
"description": "",
"type": "Event"
},
{
"name": "[event]blur",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]plus",
"description": "",
"type": "Event"
},
{
"name": "[event]minus",
"description": "",
"type": "Event"
},
{
"name": "[event]overlimit",
"description": "",
"type": "Event"
},
{
"name": "name",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "modelValue",
"type": "number",
"values": [],
"defaultValue": "0"
},
{
"name": "min",
"type": "string | number",
"values": [],
"defaultValue": "1"
},
{
"name": "max",
"type": "string | number",
"values": [],
"defaultValue": "Number.MAX_SAFE_INTEGER"
},
{
"name": "width",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "step",
"type": "string | number",
"values": [],
"defaultValue": "1"
},
{
"name": "integer",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "disabled",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "disabledInput",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "asyncChange",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "inputWidth",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "showMinus",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "showPlus",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "decimalLength",
"type": "string | number",
"values": [],
"defaultValue": "0"
},
{
"name": "longPress",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "color",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "buttonSize",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "bgColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "disableBgColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "disableColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "cursorSpacing",
"type": "string | number",
"values": [],
"defaultValue": "100"
},
{
"name": "disablePlus",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "disableMinus",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "iconStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
},
{
"name": "borderRadius",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "inputBgColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "iconSize",
"type": "string | number",
"values": [],
"defaultValue": "15"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-overlay",
"description": "创建一个遮罩层,用于强调特定的页面元素,并阻止用户对遮罩下层的内容进行操作,一般用于弹窗场景",
"example": "<u-overlay :show=\"show\"",
"tutorial": "https://uview.d3u.cn/components/overlay.html",
"attributes": [
{
"name": "[event]click",
"description": "点击遮罩发送事件",
"type": "Function"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "opacity",
"type": "string | number",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-page",
"description": "page 组件的封装",
"example": "<un-page></un-page>",
"tutorial": "https://uview.d3u.cn/components/page.html",
"attributes": [
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "theme",
"type": "string",
"values": []
},
{
"name": "themeVars",
"type": "object",
"values": []
},
{
"name": "customClass",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-pagination",
"attributes": [
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "number",
"values": [],
"defaultValue": "1"
},
{
"name": "total",
"type": "number",
"values": [],
"defaultValue": "0"
},
{
"name": "pageSize",
"type": "number",
"values": [],
"defaultValue": "3"
},
{
"name": "pagerCount",
"type": "number",
"values": [],
"defaultValue": "3"
},
{
"name": "disabled",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "forceEllipses",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "simple",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "showPrevButton",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "showNextButton",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "prevText",
"type": "string",
"values": [],
"defaultValue": "'上一页'"
},
{
"name": "nextText",
"type": "string",
"values": [],
"defaultValue": "'下一页'"
},
{
"name": "bgColor",
"type": "string | boolean",
"values": [],
"defaultValue": "null"
},
{
"name": "color",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "activeBgColor",
"type": "string | boolean",
"values": [],
"defaultValue": "null"
},
{
"name": "activeColor",
"type": "string | boolean",
"values": [],
"defaultValue": "null"
},
{
"name": "fontSize",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "round",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "borderColor",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "itemWidth",
"type": "string | number",
"values": [],
"defaultValue": "36"
},
{
"name": "itemHeight",
"type": "string | number",
"values": [],
"defaultValue": "36"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-picker-view",
"description": "选择器视图组件",
"attributes": [
{
"name": "[event]change",
"description": "当选择值变化时触发",
"type": "Function"
},
{
"name": "[event]confirm",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "[event]cancel",
"description": "",
"type": "Event"
},
{
"name": "columns",
"type": "{}",
"values": []
},
{
"name": "loading",
"type": "boolean",
"values": []
},
{
"name": "itemHeight",
"type": "string | number",
"values": []
},
{
"name": "visibleItemCount",
"type": "string | number",
"values": []
},
{
"name": "defaultIndex",
"type": "{}",
"values": []
},
{
"name": "immediateChange",
"type": "boolean",
"values": []
},
{
"name": "value",
"type": "any",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-picker",
"description": "选择器",
"attributes": [
{
"name": "[event]close",
"description": "关闭选择器时触发",
"type": "Function"
},
{
"name": "[event]cancel",
"description": "点击取消按钮触发",
"type": "Function"
},
{
"name": "[event]change",
"description": "当选择值变化时触发",
"type": "Function"
},
{
"name": "[event]confirm",
"description": "点击确定按钮,返回当前选择的值",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]open",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "showToolbar",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "columns",
"type": "{}",
"values": []
},
{
"name": "loading",
"type": "boolean",
"values": []
},
{
"name": "itemHeight",
"type": "string | number",
"values": []
},
{
"name": "cancelText",
"type": "string",
"values": []
},
{
"name": "confirmText",
"type": "string",
"values": []
},
{
"name": "cancelColor",
"type": "string",
"values": []
},
{
"name": "confirmColor",
"type": "string",
"values": []
},
{
"name": "visibleItemCount",
"type": "string | number",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "defaultIndex",
"type": "{}",
"values": []
},
{
"name": "immediateChange",
"type": "boolean",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "modelValue",
"type": "any",
"values": [],
"defaultValue": "''"
},
{
"name": "showInput",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "showDefaultValue",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "inputProps",
"type": "UTSJSONObject",
"values": [],
"defaultValue": "{\r\n\t\treadonly: true,\r\n\t\tborder: 'surround',\r\n\t\tshape: 'square',\r\n\t\tbackgroundColor: '',\r\n\t\tround: '',\r\n\t\tcolor: '',\r\n\t\tprefixIcon: '',\r\n\t\tsuffixIcon: 'calendar',\r\n\t\tprefixIconStyle: '',\r\n\t\tsuffixIconStyle: 'color: #999;',\r\n\t\tborderColor: '',\r\n\t\tcustomStyle: '',\r\n\t\theight: '',\r\n\t} as UTSJSONObject"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-popover",
"description": "气泡弹出层,支持多种弹出方向和自动定位",
"example": "<un-popover position=\"top\" :content=\"content\">\r\n\t<u-button type=\"primary\">点击触发</u-button>\r\n</un-popover>",
"tutorial": "https://uview.d3u.cn/components/popover.html",
"attributes": [
{
"name": "[event]click",
"description": "点击组件时触发",
"type": "Function"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "position",
"type": "string",
"values": []
},
{
"name": "showArrow",
"type": "boolean",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "padding",
"type": "string | number",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "overlay",
"type": "Boolean",
"values": []
},
{
"name": "customStyle",
"type": "any",
"values": []
},
{
"name": "content",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "width",
"type": "string | number",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-popup",
"description": "弹出层容器,用于展示弹窗、信息提示等内容,支持上、下、左、右和中部弹出。组件只提供容器,内部内容由用户自定义",
"example": "<un-popup v-model=\"show\"><text>出淤泥而不染,濯清涟而不妖</text></un-popup>",
"tutorial": "https://uview.d3u.cn/components/popup.html",
"attributes": [
{
"name": "[event]open",
"description": "弹出层打开",
"type": "Function"
},
{
"name": "[event]close",
"description": "弹出层收起",
"type": "Function"
},
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "titleStyle",
"type": "string | object",
"values": []
},
{
"name": "overlay",
"type": "boolean",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "closeable",
"type": "boolean",
"values": []
},
{
"name": "overlayStyle",
"type": "object",
"values": []
},
{
"name": "overlayOpacity",
"type": "string | number",
"values": []
},
{
"name": "closeOnClickOverlay",
"type": "boolean",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "safeAreaInsetBottom",
"type": "boolean",
"values": []
},
{
"name": "safeAreaInsetTop",
"type": "boolean",
"values": []
},
{
"name": "closeIcon",
"type": "string",
"values": []
},
{
"name": "closeIconPos",
"type": "string",
"values": []
},
{
"name": "closeIconColor",
"type": "string",
"values": []
},
{
"name": "closeIconSize",
"type": "string | number",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "navbarHeight",
"type": "number",
"values": []
},
{
"name": "margin",
"type": "string | number",
"values": []
},
{
"name": "zoom",
"type": "boolean",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "enablePortal",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "swipeClose",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "swipeCloseThreshold",
"type": "number",
"values": [],
"defaultValue": "50"
},
{
"name": "contentDraggable",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "swipeHandle",
"type": "boolean",
"values": [],
"defaultValue": "true"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-qrcode",
"description": "二维码生成",
"example": "<un-qrcode ref=\"qrcode\" size=\"200px\" value=\"https://uview.d3u.cn\"></un-qrcode>",
"tutorial": "https://uview.d3u.cn/components/qrcode.html",
"attributes": [
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]refresh",
"description": "",
"type": "Event"
},
{
"name": "[event]onLongpress",
"description": "",
"type": "Event"
},
{
"name": "[event]error",
"description": "",
"type": "Event"
},
{
"name": "background",
"type": "string",
"values": []
},
{
"name": "foreground",
"type": "string",
"values": []
},
{
"name": "pdground",
"type": "string",
"values": []
},
{
"name": "level",
"type": "string",
"values": []
},
{
"name": "value",
"type": "string",
"values": []
},
{
"name": "expiredText",
"type": "string",
"values": []
},
{
"name": "scannedText",
"type": "string",
"values": []
},
{
"name": "refreshText",
"type": "string",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "iconSize",
"type": "number",
"values": []
},
{
"name": "status",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-radio-group",
"description": "单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio使用",
"example": "<un-radio-group v-model=\"value\"></un-radio-group>",
"tutorial": "https://uview.d3u.cn/components/radio.html",
"attributes": [
{
"name": "[event]change",
"description": "任一个radio状态发生变化时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "string | number | boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "name",
"type": "string",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "placement",
"type": "string",
"values": []
},
{
"name": "label",
"type": "string",
"values": []
},
{
"name": "labelColor",
"type": "string",
"values": []
},
{
"name": "labelSize",
"type": "string | number",
"values": []
},
{
"name": "labelDisabled",
"type": "boolean",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "borderBottom",
"type": "boolean",
"values": []
},
{
"name": "iconPlacement",
"type": "string",
"values": []
},
{
"name": "activeLabelColor",
"type": "string",
"values": []
},
{
"name": "plain",
"type": "Boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-radio",
"description": "单选框用于有一个选择,用户只能选择其中一个的场景。搭配un-radio-group使用",
"example": "<un-radio :labelDisabled=\"false\">门掩黄昏,无计留春住</un-radio>",
"tutorial": "https://uview.d3u.cn/components/radio.html",
"attributes": [
{
"name": "[event]change",
"description": "某个radio状态发生变化时触发(选中状态)",
"type": "Function"
},
{
"name": "name",
"type": "string | number | boolean",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "labelDisabled",
"type": "boolean",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "labelSize",
"type": "string | number",
"values": []
},
{
"name": "label",
"type": "string | number",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "labelColor",
"type": "string",
"values": []
},
{
"name": "activeLabelColor",
"type": "string",
"values": []
},
{
"name": "iconPlacement",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-rate",
"description": "该组件一般用于满意度调查,星型评分的场景",
"example": "<un-rate :count=\"count\" :modelValue=\"2\"></un-rate>",
"tutorial": "https://uview.d3u.cn/components/rate.html",
"attributes": [
{
"name": "[event]change",
"description": "选中的星星发生变化时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "string | number",
"values": []
},
{
"name": "count",
"type": "string | number",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "readonly",
"type": "boolean",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "gutter",
"type": "string | number",
"values": []
},
{
"name": "minCount",
"type": "string | number",
"values": []
},
{
"name": "allowHalf",
"type": "boolean",
"values": []
},
{
"name": "activeIcon",
"type": "string",
"values": []
},
{
"name": "inactiveIcon",
"type": "string",
"values": []
},
{
"name": "touchable",
"type": "boolean",
"values": []
},
{
"name": "disabledColor",
"type": "string",
"values": [],
"defaultValue": "'#c8c9cc'"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-read-more",
"description": "该组件一般用于内容较长,预先收起一部分,点击展开全部内容的场景。",
"example": "<un-read-more><rich-text :nodes=\"content\"></rich-text></un-read-more>",
"tutorial": "https://uview.d3u.cn/components/readMore.html",
"attributes": [
{
"name": "[event]change",
"description": "内容展开/收起状态变化时触发,参数为:isExpanded, index",
"type": "Function"
},
{
"name": "[event]click",
"description": "点击展开/收起按钮时触发,参数为:index",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "boolean",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "expandText",
"type": "string",
"values": []
},
{
"name": "expandIcon",
"type": "string",
"values": []
},
{
"name": "maskStyle",
"type": "string | object",
"values": []
},
{
"name": "textSize",
"type": "string | number",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "textColor",
"type": "string",
"values": []
},
{
"name": "index",
"type": "string",
"values": []
},
{
"name": "collapseText",
"type": "string",
"values": [],
"defaultValue": "'收起'"
},
{
"name": "collapseIcon",
"type": "string",
"values": [],
"defaultValue": "'arrow-up'"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-row",
"description": "通过基础的 12 分栏,迅速简便地创建布局",
"example": "<u-row justify=\"space-between\"></u-row>",
"tutorial": "https://uview.d3u.cn/components/layout.html",
"attributes": [
{
"name": "[event]click",
"description": "row被点击",
"type": "Function"
},
{
"name": "gutter",
"type": "string | number",
"values": []
},
{
"name": "justify",
"type": "string",
"values": []
},
{
"name": "align",
"type": "string",
"values": []
},
{
"name": "wrap",
"type": "boolean",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-safe-bottom",
"description": "这个适配,主要是针对IPhone X等一些底部带指示条的机型,指示条的操作区域与页面底部存在重合,容易导致用户误操作,因此我们需要针对这些机型进行底部安全区适配。",
"example": "<un-safe-bottom></un-safe-bottom>",
"tutorial": "https://uview.d3u.cn/components/safeAreaInset.html",
"attributes": []
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-scroll-list",
"description": "该组件一般用于同时展示多个商品、分类的场景,也可以完成左右滑动的列表。",
"tutorial": "https://uview.d3u.cn/components/scrollList.html",
"attributes": [
{
"name": "[event]left",
"description": "滑动到左边时触发",
"type": "Function"
},
{
"name": "[event]right",
"description": "滑动到右边时触发",
"type": "Function"
},
{
"name": "indicatorWidth",
"type": "string | number",
"values": []
},
{
"name": "indicatorBarWidth",
"type": "string | number",
"values": []
},
{
"name": "scroll",
"type": "boolean",
"values": []
},
{
"name": "indicator",
"type": "boolean",
"values": []
},
{
"name": "indicatorColor",
"type": "string",
"values": []
},
{
"name": "indicatorActiveColor",
"type": "string",
"values": []
},
{
"name": "indicatorStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-search",
"description": "搜索组件,集成了常见搜索框所需功能,用户可以一键引入,开箱即用。",
"example": "<un-search placeholder=\"日照香炉生紫烟\" v-model=\"keyword\"></un-search>",
"tutorial": "https://uview.d3u.cn/components/search.html",
"attributes": [
{
"name": "[event]change",
"description": "输入框内容发生变化时触发",
"type": "Function"
},
{
"name": "[event]search",
"description": "用户确定搜索时触发,用户按回车键,或者手机键盘右下角的\"搜索\"键时触发",
"type": "Function"
},
{
"name": "[event]custom",
"description": "用户点击右侧控件时触发",
"type": "Function"
},
{
"name": "[event]clear",
"description": "用户点击清除按钮时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]focus",
"description": "",
"type": "Event"
},
{
"name": "[event]blur",
"description": "",
"type": "Event"
},
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "[event]clickIcon",
"description": "",
"type": "Event"
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "placeholder",
"type": "string",
"values": []
},
{
"name": "clearabled",
"type": "boolean",
"values": []
},
{
"name": "focus",
"type": "boolean",
"values": []
},
{
"name": "showAction",
"type": "boolean",
"values": []
},
{
"name": "actionStyle",
"type": "string | object",
"values": []
},
{
"name": "actionText",
"type": "string",
"values": []
},
{
"name": "inputAlign",
"type": "string",
"values": []
},
{
"name": "inputStyle",
"type": "object",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "borderColor",
"type": "string",
"values": []
},
{
"name": "searchIconColor",
"type": "string",
"values": []
},
{
"name": "searchIconSize",
"type": "string | number",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "placeholderColor",
"type": "string",
"values": []
},
{
"name": "searchIcon",
"type": "string | boolean",
"values": []
},
{
"name": "margin",
"type": "string",
"values": []
},
{
"name": "animation",
"type": "boolean",
"values": []
},
{
"name": "modelValue",
"type": "string",
"values": []
},
{
"name": "maxlength",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "label",
"type": "string | number",
"values": []
},
{
"name": "placeholderClass",
"type": "string",
"values": [],
"defaultValue": "'un-search-placeholder'"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-segmented-item",
"description": "该分段器一般用于用户从几个选项中选择某一个的场景",
"example": "<un-segmented-item :text=\"text\" :disabled=\"disabled\"></un-segmented-item>",
"tutorial": "https://uveiw.bdxmz.cn/components/subsection.html",
"attributes": [
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "text",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-segmented",
"description": "该分段器一般用于用户从几个选项中选择某一个的场景",
"example": "<un-segmented v-model=\"curNow\"",
"tutorial": "https://uveiw.bdxmz.cn/components/subsection.html",
"attributes": [
{
"name": "[event]change",
"description": "分段器选项发生改变时触发 回调 index:选项的index索引值,从0开始",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "value",
"type": "number",
"values": []
},
{
"name": "shape",
"type": "\"circle\" | \"square\"",
"values": []
},
{
"name": "type",
"type": "\"button\" | \"card\" | \"text\"",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "bold",
"type": "boolean",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "barColor",
"type": "string",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "immediate",
"type": "boolean",
"values": []
},
{
"name": "modelValue",
"type": "number",
"values": [],
"defaultValue": "null"
},
{
"name": "color",
"type": "string",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-select",
"description": "基于本地数据的选择器组件,支持单选模式,使用下拉列表形式",
"example": "<un-select v-model=\"value\" :list=\"options\" placeholder=\"请选择\"",
"tutorial": "https://uview.d3u.cn/components/select.html",
"attributes": [
{
"name": "[event]change",
"description": "选中发生变化触发",
"type": "Function"
},
{
"name": "[event]open",
"description": "选择框开启时触发",
"type": "Function"
},
{
"name": "[event]close",
"description": "选择框关闭时触发",
"type": "Function"
},
{
"name": "[event]clear",
"description": "点击清除按钮之后触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "any",
"values": []
},
{
"name": "list",
"type": "{}",
"values": []
},
{
"name": "multiple",
"type": "boolean",
"values": []
},
{
"name": "multipleLimit",
"type": "number",
"values": []
},
{
"name": "clearable",
"type": "boolean",
"values": []
},
{
"name": "emptyText",
"type": "string",
"values": []
},
{
"name": "placeholder",
"type": "string",
"values": []
},
{
"name": "placeholderStyle",
"type": "string | object",
"values": []
},
{
"name": "backgroundColor",
"type": "string",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "borderColor",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "disabledColor",
"type": "string",
"values": []
},
{
"name": "placement",
"type": "string",
"values": []
},
{
"name": "align",
"type": "string",
"values": []
},
{
"name": "showArrow",
"type": "boolean",
"values": []
},
{
"name": "border",
"type": "string",
"values": []
},
{
"name": "inputStyle",
"type": "string | object",
"values": []
},
{
"name": "block",
"type": "boolean",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "collapseTags",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "maxCollapseTags",
"type": "number",
"values": [],
"defaultValue": "1"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-signature",
"attributes": [
{
"name": "[event]clear",
"description": "",
"type": "Event"
},
{
"name": "[event]undo",
"description": "",
"type": "Event"
},
{
"name": "[event]confirm",
"description": "",
"type": "Event"
},
{
"name": "[event]close",
"description": "",
"type": "Event"
},
{
"name": "title",
"type": "string",
"values": [],
"defaultValue": "'请签名'"
},
{
"name": "showTitle",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "showToolbar",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "bottonShape",
"type": "string",
"values": [],
"defaultValue": "'circle'"
},
{
"name": "showColorList",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "confirmText",
"type": "string",
"values": [],
"defaultValue": "'完成'"
},
{
"name": "showUndo",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "undoText",
"type": "string",
"values": [],
"defaultValue": "'撤销'"
},
{
"name": "showClear",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "clearText",
"type": "string",
"values": [],
"defaultValue": "'清空'"
},
{
"name": "showClose",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "closeText",
"type": "string",
"values": [],
"defaultValue": "'关闭'"
},
{
"name": "penColorList",
"type": "{}",
"values": [],
"defaultValue": "['#000000', '#FF1E10', '#FFBE00', '#1A9BFF','1AAD19']"
},
{
"name": "penSize",
"type": "number",
"values": [],
"defaultValue": "2"
},
{
"name": "disableScroll",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "minLineWidth",
"type": "number",
"values": [],
"defaultValue": "2"
},
{
"name": "maxLineWidth",
"type": "number",
"values": [],
"defaultValue": "6"
},
{
"name": "penColor",
"type": "string",
"values": [],
"defaultValue": "'#000000'"
},
{
"name": "backgroundColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "showWatermark",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "watermark",
"type": "UnWatermarkOption",
"values": [],
"defaultValue": "() => ({})"
},
{
"name": "openSmooth",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "velocityFilterWeight",
"type": "number",
"values": [],
"defaultValue": "0.7"
},
{
"name": "minVelocity",
"type": "number",
"values": [],
"defaultValue": "0.25"
},
{
"name": "maxHistoryLength",
"type": "number",
"values": [],
"defaultValue": "20"
},
{
"name": "disabled",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "landscape",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "fixed",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "toolbarStyle",
"type": "string | object",
"values": [],
"defaultValue": "{}"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-skeleton",
"description": "骨架屏一般用于页面在请求远程数据尚未完成时,页面用灰色块预显示本来的页面结构,给用户更好的体验。",
"example": "<u-search placeholder=\"日照香炉生紫烟\" v-model=\"keyword\"></u-search>",
"tutorial": "https://uview.d3u.cn/components/skeleton.html",
"attributes": [
{
"name": "loading",
"type": "boolean",
"values": []
},
{
"name": "animate",
"type": "boolean",
"values": []
},
{
"name": "rows",
"type": "string | number",
"values": []
},
{
"name": "rowsWidth",
"type": "any",
"values": []
},
{
"name": "rowsHeight",
"type": "any",
"values": []
},
{
"name": "title",
"type": "boolean",
"values": []
},
{
"name": "titleWidth",
"type": "string | number",
"values": []
},
{
"name": "titleHeight",
"type": "string | number",
"values": []
},
{
"name": "avatar",
"type": "boolean",
"values": []
},
{
"name": "avatarSize",
"type": "string | number",
"values": []
},
{
"name": "avatarShape",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-slider-button",
"description": "滑动验证按钮组件,常用于验证用户操作。",
"example": "<un-slider-button :text=\"text\"",
"tutorial": "https://uview.d3u.cn/components/sliderButton.html",
"attributes": [
{
"name": "[event]success",
"description": "成功回调",
"type": "Function"
},
{
"name": "[event]reset",
"description": "重置回调",
"type": "Function"
},
{
"name": "[event]change",
"description": "滑动回调",
"type": "Function"
},
{
"name": "text",
"type": "string",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "activeBgColor",
"type": "string",
"values": []
},
{
"name": "railColor",
"type": "string",
"values": []
},
{
"name": "railIndex",
"type": "string | number",
"values": []
},
{
"name": "railRadius",
"type": "string | number",
"values": []
},
{
"name": "textColor",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "string | number",
"values": []
},
{
"name": "textBold",
"type": "boolean",
"values": []
},
{
"name": "activeTextColor",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "successText",
"type": "string",
"values": []
},
{
"name": "autoReset",
"type": "boolean",
"values": []
},
{
"name": "resetDelay",
"type": "number",
"values": []
},
{
"name": "threshold",
"type": "number",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-slider",
"description": "本组件用于滑动选择数值",
"example": "<un-slider></un-slider>",
"tutorial": "https://uviewui.com/components/slider.html",
"attributes": [
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]dragStart",
"description": "",
"type": "Event"
},
{
"name": "[event]dragEnd",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "any",
"values": []
},
{
"name": "min",
"type": "string | number",
"values": []
},
{
"name": "max",
"type": "string | number",
"values": []
},
{
"name": "step",
"type": "number",
"values": []
},
{
"name": "range",
"type": "boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "reverse",
"type": "boolean",
"values": []
},
{
"name": "readonly",
"type": "boolean",
"values": []
},
{
"name": "noCross",
"type": "boolean",
"values": []
},
{
"name": "vertical",
"type": "boolean",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "thumbSize",
"type": "string | number",
"values": []
},
{
"name": "thumbColor",
"type": "string",
"values": []
},
{
"name": "thumbBorder",
"type": "string",
"values": []
},
{
"name": "thumbRadius",
"type": "string | number",
"values": []
},
{
"name": "railColor",
"type": "string",
"values": []
},
{
"name": "railRadius",
"type": "string | number",
"values": []
},
{
"name": "railSize",
"type": "string | number",
"values": []
},
{
"name": "trackColor",
"type": "string",
"values": []
},
{
"name": "showValue",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-status-bar",
"description": "本组件主要用于状态填充,比如在自定导航栏的时候,它会自动适配一个恰当的状态栏高度。",
"example": "<u-status-bar></u-status-bar>",
"tutorial": "https://uviewui.com/components/statusBar.html",
"attributes": [
{
"name": "bgColor",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-steps-item",
"attributes": [
{
"name": "title",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "desc",
"type": "string | number",
"values": [],
"defaultValue": "''"
},
{
"name": "iconSize",
"type": "string | number",
"values": [],
"defaultValue": "17"
},
{
"name": "error",
"type": "boolean",
"values": [],
"defaultValue": "false"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-steps",
"description": "用于展示任务流程的步骤条组件,支持水平和垂直方向展示。",
"example": "<un-steps :value=\"1\" direction=\"column\"></un-steps>",
"tutorial": "https://uviewui.com/components/steps.html",
"attributes": [
{
"name": "direction",
"type": "string",
"values": []
},
{
"name": "value",
"type": "number",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "activeIcon",
"type": "string",
"values": []
},
{
"name": "inactiveIcon",
"type": "string",
"values": []
},
{
"name": "errorColor",
"type": "string",
"values": []
},
{
"name": "dot",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-sticky",
"attributes": [
{
"name": "scrollTop",
"type": "number",
"values": [],
"defaultValue": "0"
},
{
"name": "offsetTop",
"type": "string | number",
"values": [],
"defaultValue": "0"
},
{
"name": "customNavHeight",
"type": "string | number",
"values": [],
"defaultValue": "0"
},
{
"name": "disabled",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "bgColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "zIndex",
"type": "string | number",
"values": [],
"defaultValue": "100"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-swipe-action-item",
"description": "该组件一般用于左滑唤出操作菜单的场景,用的最多的是左滑删除操作",
"example": "<u-swipe-action><un-swipe-action-item></un-swipe-action-item></u-swipe-action>",
"tutorial": "https://uview.d3u.cn/components/swipeAction.html",
"attributes": [
{
"name": "[event]change",
"description": "组件打开时触发",
"type": "Function(index)"
},
{
"name": "autoClose",
"type": "boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "threshold",
"type": "number",
"values": []
},
{
"name": "closeOnClick",
"type": "boolean",
"values": [],
"defaultValue": "true"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-swipe-action",
"description": "该组件一般用于左滑唤出操作菜单的场景,用的最多的是左滑删除操作",
"example": "<u-swipe-action><u-swipe-action-item :rightOptions=\"options1\" ></u-swipe-action-item></u-swipe-action>",
"tutorial": "https://uview.d3u.cn/components/swipeAction.html",
"attributes": [
{
"name": "[event]click",
"description": "点击组件时触发",
"type": "Function(index)"
},
{
"name": "autoClose",
"type": "boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "threshold",
"type": "number",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-swiper-indicator",
"description": "用于显示轮播图的指示器,支持线型和点型两种模式",
"example": "<un-swiper-indicator :length=\"3\" :current=\"0\" activeColor=\"#fff\"></un-swiper-indicator>",
"attributes": [
{
"name": "length",
"type": "number",
"values": []
},
{
"name": "current",
"type": "number",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "customStyle",
"type": "any",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-swiper",
"description": "用于展示图片或视频的轮播图组件,支持自动播放、指示器显示等功能。",
"example": "<un-swiper :list=\"list\" :indicator=\"true\" indicatorActiveColor=\"#fff\"></un-swiper>",
"tutorial": "https://uviewui.com/components/swiper.html",
"attributes": [
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "list",
"type": "{}",
"values": []
},
{
"name": "indicator",
"type": "boolean",
"values": []
},
{
"name": "indicatorActiveColor",
"type": "string",
"values": []
},
{
"name": "indicatorInactiveColor",
"type": "string",
"values": []
},
{
"name": "indicatorStyle",
"type": "string | object",
"values": []
},
{
"name": "indicatorMode",
"type": "string",
"values": []
},
{
"name": "autoplay",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "current",
"type": "string | number",
"values": [],
"defaultValue": "0"
},
{
"name": "currentItemId",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "interval",
"type": "string | number",
"values": [],
"defaultValue": "3000"
},
{
"name": "duration",
"type": "string | number",
"values": [],
"defaultValue": "300"
},
{
"name": "circular",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "previousMargin",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "nextMargin",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "acceleration",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "displayMultipleItems",
"type": "number",
"values": [],
"defaultValue": "1"
},
{
"name": "easingFunction",
"type": "string",
"values": [],
"defaultValue": "'default'"
},
{
"name": "imgMode",
"type": "string",
"values": [],
"defaultValue": "'aspectFill'"
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "130"
},
{
"name": "bgColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "radius",
"type": "string | number",
"values": [],
"defaultValue": "4"
},
{
"name": "loading",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "showTitle",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "mode",
"type": "string",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-switch",
"description": "选择开关一般用于只有两个选择,且只能选其一的场景。",
"example": "<un-switch v-model=\"checked\" active-color=\"red\" inactive-color=\"#eee\"></un-switch>",
"tutorial": "https://uview.d3u.cn/components/switch.html",
"attributes": [
{
"name": "[event]change",
"description": "在switch打开或关闭时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "loading",
"type": "boolean",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "modelValue",
"type": "string | number | boolean",
"values": []
},
{
"name": "activeValue",
"type": "string | number | boolean",
"values": []
},
{
"name": "inactiveValue",
"type": "string | number | boolean",
"values": []
},
{
"name": "asyncChange",
"type": "boolean",
"values": []
},
{
"name": "space",
"type": "string | number",
"values": []
},
{
"name": "textSpace",
"type": "string | number",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "activeText",
"type": "string",
"values": []
},
{
"name": "inactiveText",
"type": "string",
"values": []
},
{
"name": "shape",
"type": "\"square\" | \"round\"",
"values": [
{
"name": "square",
"description": ""
},
{
"name": "round"
}
],
"defaultValue": "'round'"
},
{
"name": "loadingSize",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "loadingIcon",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "loadingMode",
"type": "string",
"values": [],
"defaultValue": "'semicircle'"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-tabbar-item",
"description": "此组件提供了自定义tabbar的能力。",
"example": "<un-tabbar :value=\"value2\" :placeholder=\"false\"",
"tutorial": "https://uview.d3u.cn/components/tabbar.html",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "name",
"type": "string | number",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "iconSize",
"type": "string | number",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "iconColor",
"type": "String",
"values": []
},
{
"name": "badge",
"type": "any",
"values": []
},
{
"name": "dot",
"type": "boolean",
"values": []
},
{
"name": "text",
"type": "string",
"values": []
},
{
"name": "middleBottom",
"type": "number",
"values": []
},
{
"name": "middlePlaceholder",
"type": "number",
"values": []
},
{
"name": "url",
"type": "string",
"values": []
},
{
"name": "linkType",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-tabbar",
"description": "此组件提供了自定义tabbar的能力。",
"example": "<un-tabbar :value=\"value2\" :placeholder=\"false\"",
"tutorial": "https://uview.d3u.cn/components/tabbar.html",
"attributes": [
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "string | number",
"values": []
},
{
"name": "safeAreaInsetBottom",
"type": "boolean",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "activeColor",
"type": "string",
"values": []
},
{
"name": "inactiveColor",
"type": "string",
"values": []
},
{
"name": "fixed",
"type": "boolean",
"values": []
},
{
"name": "placeholder",
"type": "boolean",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "fit",
"type": "boolean",
"values": []
},
{
"name": "bottom",
"type": "string | number",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "activeBgColor",
"type": "string",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-table-column",
"description": "此组件提供了自定义table的能力。",
"example": "<un-table-column prop=\"name\" label=\"姓名\" width=\"100\" height=\"44\" align=\"left\"></un-table-column>",
"tutorial": "https://uview.d3u.cn/components/table.html",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "prop",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "label",
"type": "string",
"values": [],
"defaultValue": "null"
},
{
"name": "width",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "height",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "minHeight",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "minWidth",
"type": "string | number",
"values": [],
"defaultValue": "null"
},
{
"name": "headerHeight",
"type": "string | number",
"values": [],
"defaultValue": "44"
},
{
"name": "align",
"type": "\"left\" | \"center\" | \"right\"",
"values": [
{
"name": "left",
"description": ""
},
{
"name": "center",
"description": ""
},
{
"name": "right"
}
],
"defaultValue": "'left'"
},
{
"name": "headerAlign",
"type": "\"left\" | \"center\" | \"right\"",
"values": [
{
"name": "left",
"description": ""
},
{
"name": "center",
"description": ""
},
{
"name": "right"
}
],
"defaultValue": "'left'"
},
{
"name": "sortable",
"type": "boolean",
"values": [],
"defaultValue": "false"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-table",
"description": "此组件提供了自定义table的能力。",
"example": "<un-table :data=\"data\" :height=\"300\" :scroll=\"true\" :stripe=\"true\" :border=\"true\" :showHeader=\"true\" :cellStyle=\"cellStyle\" :headerCellStyle=\"headerCellStyle\"></un-table>",
"tutorial": "https://uview.d3u.cn/components/table.html",
"attributes": [
{
"name": "[event]cell-click",
"description": "",
"type": "Event"
},
{
"name": "[event]header-click",
"description": "",
"type": "Event"
},
{
"name": "data",
"type": "{}",
"values": [],
"defaultValue": "[]"
},
{
"name": "tableLayout",
"type": "\"fixed\" | \"auto\"",
"values": [
{
"name": "fixed",
"description": ""
},
{
"name": "auto"
}
],
"defaultValue": "'fixed'"
},
{
"name": "scroll",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "stripe",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "showHeader",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "cellStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
},
{
"name": "headerCellStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
},
{
"name": "loading",
"type": "boolean",
"values": [],
"defaultValue": "false"
},
{
"name": "loadingMode",
"type": "string",
"values": [],
"defaultValue": "'spinner'"
},
{
"name": "loadingSize",
"type": "string | number",
"values": [],
"defaultValue": "22"
},
{
"name": "loadingIcon",
"type": "string",
"values": [],
"defaultValue": "'loading'"
},
{
"name": "loadingText",
"type": "string",
"values": [],
"defaultValue": "'加载中...'"
},
{
"name": "loadingColor",
"type": "string",
"values": [],
"defaultValue": "''"
},
{
"name": "border",
"type": "boolean | \"horizontal\" | \"vertical\" | \"none\" | \"all\"",
"values": [
{
"name": "horizontal",
"description": ""
},
{
"name": "vertical",
"description": ""
},
{
"name": "none",
"description": ""
},
{
"name": "all"
}
],
"defaultValue": "true"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-tabs",
"description": "标签页组件,用于在不同内容区域之间进行切换。",
"tutorial": "https://uview.d3u.cn/components/tabs.html",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "[event]longPress",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "value",
"type": "number",
"values": []
},
{
"name": "duration",
"type": "number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "list",
"type": "{}",
"values": []
},
{
"name": "lineColor",
"type": "string",
"values": []
},
{
"name": "activeStyle",
"type": "string | object",
"values": []
},
{
"name": "inactiveStyle",
"type": "string | object",
"values": []
},
{
"name": "lineWidth",
"type": "string | number",
"values": []
},
{
"name": "lineHeight",
"type": "string | number",
"values": []
},
{
"name": "lineBgSize",
"type": "string",
"values": []
},
{
"name": "itemStyle",
"type": "string | object",
"values": []
},
{
"name": "scrollable",
"type": "boolean",
"values": []
},
{
"name": "showLine",
"type": "boolean",
"values": [],
"defaultValue": "true"
},
{
"name": "immediate",
"type": "boolean",
"values": [],
"defaultValue": "true"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-tag",
"description": "tag组件一般用于标记和选择,我们提供了更加丰富的表现形式,能够较全面的涵盖您的使用场景",
"example": "<un-tag text=\"标签\" type=\"error\" plain plainFill></un-tag>",
"tutorial": "https://uview.d3u.cn/components/tag.html",
"attributes": [
{
"name": "[event]click",
"description": "点击标签时触发 index: 传递的index参数值",
"type": "Function(index)"
},
{
"name": "[event]close",
"description": "closable为true时,点击标签关闭按钮触发 index: 传递的index参数值",
"type": "Function(index)"
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "hairline",
"type": "boolean",
"values": []
},
{
"name": "closeInside",
"type": "boolean",
"values": []
},
{
"name": "size",
"type": "string",
"values": []
},
{
"name": "shape",
"type": "string",
"values": []
},
{
"name": "text",
"type": "string | number",
"values": []
},
{
"name": "bgColor",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "borderColor",
"type": "string",
"values": []
},
{
"name": "closeColor",
"type": "string",
"values": []
},
{
"name": "name",
"type": "string | number",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "plainFill",
"type": "boolean",
"values": []
},
{
"name": "plain",
"type": "boolean",
"values": []
},
{
"name": "closable",
"type": "boolean",
"values": []
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "iconColor",
"type": "string",
"values": []
},
{
"name": "gutter",
"type": "string | number",
"values": []
},
{
"name": "customStyle",
"type": "any",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": [],
"defaultValue": "null"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-text",
"description": "用于展示文本信息,支持多种样式和图标",
"attributes": [
{
"name": "[event]click",
"description": "",
"type": "Event"
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "block",
"type": "boolean",
"values": []
},
{
"name": "flex",
"type": "boolean",
"values": []
},
{
"name": "text",
"type": "string | number",
"values": []
},
{
"name": "prefixIcon",
"type": "string",
"values": []
},
{
"name": "suffixIcon",
"type": "string",
"values": []
},
{
"name": "bold",
"type": "boolean",
"values": []
},
{
"name": "lines",
"type": "string | number",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "size",
"type": "string | number",
"values": []
},
{
"name": "iconStyle",
"type": "string | object",
"values": []
},
{
"name": "decoration",
"type": "string",
"values": []
},
{
"name": "margin",
"type": "string",
"values": []
},
{
"name": "lineHeight",
"type": "string | number",
"values": []
},
{
"name": "align",
"type": "string",
"values": []
},
{
"name": "wordWrap",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-textarea",
"description": "文本域此组件满足了可能出现的表单信息补充,编辑等实际逻辑的功能,内置了字数校验等",
"example": "<un-textarea v-model=\"value1\" placeholder=\"请输入内容\" ></un-textarea>",
"tutorial": "https://uview.d3u.cn/components/textarea.html",
"attributes": [
{
"name": "[event]focus",
"description": "输入框聚焦时触发,event.detail = { value, height },height 为键盘高度",
"type": "Function(e)"
},
{
"name": "[event]blur",
"description": "输入框失去焦点时触发,event.detail = {value, cursor}",
"type": "Function(e)"
},
{
"name": "[event]linechange",
"description": "输入框行数变化时调用,event.detail = {height: 0, heightRpx: 0, lineCount: 0}",
"type": "Function(e)"
},
{
"name": "[event]input",
"description": "当键盘输入时,触发 input 事件",
"type": "Function(e)"
},
{
"name": "[event]confirm",
"description": "点击完成时, 触发 confirm 事件",
"type": "Function(e)"
},
{
"name": "[event]keyboardheightchange",
"description": "键盘高度发生变化的时候触发此事件",
"type": "Function(e)"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "[event]change",
"description": "",
"type": "Event"
},
{
"name": "value",
"type": "String | Number",
"values": []
},
{
"name": "placeholder",
"type": "string | number",
"values": []
},
{
"name": "placeholderClass",
"type": "string",
"values": []
},
{
"name": "placeholderStyle",
"type": "string | object",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "confirmType",
"type": "string",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "disabledColor",
"type": "string",
"values": []
},
{
"name": "count",
"type": "boolean",
"values": []
},
{
"name": "focus",
"type": "boolean",
"values": []
},
{
"name": "autoHeight",
"type": "boolean",
"values": []
},
{
"name": "fixed",
"type": "boolean",
"values": []
},
{
"name": "cursorSpacing",
"type": "number",
"values": []
},
{
"name": "cursor",
"type": "string | number",
"values": []
},
{
"name": "formatter",
"type": "(value: string) => string",
"values": []
},
{
"name": "showConfirmBar",
"type": "boolean",
"values": []
},
{
"name": "selectionStart",
"type": "number",
"values": []
},
{
"name": "selectionEnd",
"type": "number",
"values": []
},
{
"name": "adjustPosition",
"type": "boolean",
"values": []
},
{
"name": "disableDefaultPadding",
"type": "boolean",
"values": []
},
{
"name": "holdKeyboard",
"type": "boolean",
"values": []
},
{
"name": "maxlength",
"type": "string | number",
"values": []
},
{
"name": "border",
"type": "string",
"values": []
},
{
"name": "hairline",
"type": "boolean",
"values": []
},
{
"name": "ignoreCompositionEvent",
"type": "boolean",
"values": []
},
{
"name": "backgroundColor",
"type": "string",
"values": []
},
{
"name": "borderRadius",
"type": "String",
"values": []
},
{
"name": "borderColor",
"type": "string",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
},
{
"name": "modelValue",
"type": "string | number",
"values": []
},
{
"name": "round",
"type": "string",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-toast",
"description": "此组件表现形式类似uni的uni.showToastAPI,但也有不同的地方。",
"example": "<un-toast ref=\"uToast\" />",
"tutorial": "https://uview.d3u.cn/components/toast.html",
"attributes": [
{
"name": "[event]open",
"description": "显示toast,如需一进入页面就显示toast,请在onReady生命周期调用",
"type": "Function"
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "loading",
"type": "boolean",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
},
{
"name": "icon",
"type": "string",
"values": []
},
{
"name": "type",
"type": "string",
"values": []
},
{
"name": "mask",
"type": "boolean",
"values": []
},
{
"name": "position",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "fill",
"type": "boolean",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": [],
"defaultValue": "''"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-toolbar",
"example": "<un-toolbar :show=\"true\" cancelText=\"取消\" confirmText=\"确认\" />",
"tutorial": "https://uview.d3u.cn/components/toolbar.html",
"attributes": [
{
"name": "[event]cancel",
"description": "点击取消按钮时触发",
"type": "Function"
},
{
"name": "[event]confirm",
"description": "点击确认按钮时触发",
"type": "Function"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "cancelText",
"type": "string",
"values": []
},
{
"name": "confirmText",
"type": "string",
"values": []
},
{
"name": "cancelColor",
"type": "string",
"values": []
},
{
"name": "confirmColor",
"type": "string",
"values": []
},
{
"name": "title",
"type": "string",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-transition",
"example": "<un-transition :show=\"true\" mode=\"fade\" duration=\"300\" />",
"attributes": [
{
"name": "[event]enter",
"description": "进入中触发",
"type": "Function"
},
{
"name": "[event]leave",
"description": "离开中触发",
"type": "Function"
},
{
"name": "[event]click",
"description": "点击组件时触发",
"type": "Function"
},
{
"name": "[event]beforeEnter",
"description": "",
"type": "Event"
},
{
"name": "[event]afterEnter",
"description": "",
"type": "Event"
},
{
"name": "[event]beforeLeave",
"description": "",
"type": "Event"
},
{
"name": "[event]afterLeave",
"description": "",
"type": "Event"
},
{
"name": "show",
"type": "boolean",
"values": []
},
{
"name": "mode",
"type": "string",
"values": []
},
{
"name": "duration",
"type": "string | number",
"values": []
},
{
"name": "timingFunction",
"type": "string",
"values": []
},
{
"name": "zIndex",
"type": "string | number",
"values": []
},
{
"name": "customStyle",
"type": "any",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-upload",
"example": "<un-upload :action=\"uploadUrl\" :max-count=\"3\" :multiple=\"true\" />",
"attributes": [
{
"name": "[event]beforeRead",
"description": "文件读取前触发",
"type": "Function"
},
{
"name": "[event]afterRead",
"description": "文件读取后触发",
"type": "Function"
},
{
"name": "[event]oversize",
"description": "文件大小超过限制时触发",
"type": "Function"
},
{
"name": "[event]delete",
"description": "删除文件时触发",
"type": "Function"
},
{
"name": "[event]clickPreview",
"description": "点击预览时触发",
"type": "Function"
},
{
"name": "[event]error",
"description": "选择文件失败时触发",
"type": "Function"
},
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "modelValue",
"type": "any",
"values": []
},
{
"name": "action",
"type": "string",
"values": []
},
{
"name": "data",
"type": "UTSJSONObject",
"values": []
},
{
"name": "headers",
"type": "UTSJSONObject",
"values": []
},
{
"name": "accept",
"type": "string",
"values": []
},
{
"name": "extension",
"type": "Array<string>",
"values": []
},
{
"name": "capture",
"type": "{}",
"values": []
},
{
"name": "compressed",
"type": "boolean",
"values": []
},
{
"name": "compressImage",
"type": "UTSJSONObject",
"values": []
},
{
"name": "compressOptions",
"type": "UTSJSONObject",
"values": []
},
{
"name": "camera",
"type": "string",
"values": []
},
{
"name": "maxDuration",
"type": "number",
"values": []
},
{
"name": "uploadIcon",
"type": "string",
"values": []
},
{
"name": "uploadIconColor",
"type": "string",
"values": []
},
{
"name": "useBeforeRead",
"type": "boolean",
"values": []
},
{
"name": "previewFullImage",
"type": "boolean",
"values": []
},
{
"name": "maxCount",
"type": "number",
"values": []
},
{
"name": "disabled",
"type": "boolean",
"values": []
},
{
"name": "imageMode",
"type": "string",
"values": []
},
{
"name": "name",
"type": "string",
"values": []
},
{
"name": "sizeType",
"type": "Array<string>",
"values": []
},
{
"name": "multiple",
"type": "boolean",
"values": []
},
{
"name": "deletable",
"type": "boolean",
"values": []
},
{
"name": "maxSize",
"type": "number",
"values": []
},
{
"name": "fileList",
"type": "{}",
"values": []
},
{
"name": "uploadText",
"type": "string",
"values": []
},
{
"name": "width",
"type": "string | number",
"values": []
},
{
"name": "height",
"type": "string | number",
"values": []
},
{
"name": "previewImage",
"type": "boolean",
"values": []
},
{
"name": "round",
"type": "string | number",
"values": []
},
{
"name": "gutter",
"type": "string | number",
"values": []
},
{
"name": "showProgress",
"type": "boolean",
"values": []
},
{
"name": "customStyle",
"type": "string | object",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-waterfall",
"description": "这是一个瀑布流形式的组件",
"example": "<un-waterfall v-model=\"list\" :column=\"2\"></un-waterfall>",
"tutorial": "https://uview.d3u.cn/components/waterfall.html",
"attributes": [
{
"name": "[event]update:modelValue",
"description": "",
"type": "Event"
},
{
"name": "addTime",
"type": "number",
"values": []
},
{
"name": "column",
"type": "number",
"values": []
},
{
"name": "modelValue",
"type": "{}",
"values": [],
"defaultValue": "[]"
}
]
}
\ No newline at end of file \ No newline at end of file
{
"name": "un-watermark",
"description": "用于在页面上添加水印,支持文字和图片水印,支持无限平铺",
"example": "<un-watermark image=\"/static/logo.png\" :width=\"100\" :height=\"100\" :gapX=\"30\" :gapY=\"30\" :rotate=\"0\"></un-watermark>",
"tutorial": "https://uview.d3u.cn/components/watermark.html",
"attributes": [
{
"name": "text",
"type": "string",
"values": []
},
{
"name": "image",
"type": "string",
"values": []
},
{
"name": "fontSize",
"type": "number",
"values": []
},
{
"name": "fontWeight",
"type": "string",
"values": []
},
{
"name": "fontFamily",
"type": "string",
"values": []
},
{
"name": "color",
"type": "string",
"values": []
},
{
"name": "opacity",
"type": "number",
"values": []
},
{
"name": "width",
"type": "number",
"values": []
},
{
"name": "height",
"type": "number",
"values": []
},
{
"name": "gapX",
"type": "number",
"values": []
},
{
"name": "gapY",
"type": "number",
"values": []
},
{
"name": "rotate",
"type": "number",
"values": []
},
{
"name": "zIndex",
"type": "number",
"values": []
},
{
"name": "fullScreen",
"type": "boolean",
"values": []
}
]
}
\ No newline at end of file \ No newline at end of file
{
"id": "uview-unix",
"displayName": "uView Next 4.0,全面兼容uniapp、uniapp x、鸿蒙、小程序的UI组件库",
"version": "4.1.8",
"description": "全端兼容 uni-app/uni-app X / 鸿蒙 / 小程序,80+高质量组件库,搭配便捷工具助力,让跨端开发得心应手!",
"keywords": [
"uview",
"uniappx"
],
"repository": "",
"engines": {
"HBuilderX": "^4.85",
"uni-app": "^4.85",
"uni-app-x": "^4.85"
},
"dcloudext": {
"sale": {
"regular": {
"price": "1.20"
},
"sourcecode": {
"price": "118.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"darkmode": "√",
"i18n": "x",
"widescreen": "x"
},
"uni_modules": {
"dependencies": [
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "x",
"aliyun": "x",
"alipay": "x"
},
"client": {
"uni-app": {
"vue": {
"vue2": "x",
"vue3": "√"
},
"web": {
"safari": "√",
"chrome": "√"
},
"app": {
"vue": "√",
"nvue": "x",
"android": "√",
"ios": "√",
"harmony": "√"
},
"mp": {
"weixin": "√",
"alipay": "x",
"toutiao": "x",
"baidu": "x",
"kuaishou": "x",
"jd": "x",
"harmony": "x",
"qq": "x",
"lark": "x"
},
"quickapp": {
"huawei": "x",
"union": "x"
}
},
"uni-app-x": {
"web": {
"safari": "√",
"chrome": "√"
},
"app": {
"android": "√",
"ios": "√",
"harmony": "√"
},
"mp": {
"weixin": "√"
}
}
}
}
}
}
\ No newline at end of file \ No newline at end of file
//#ifndef UNI-APP-X && APP
:root
//#endif
.un-page
{
--un-line-xs: #{get-var-value($line-xs)};
--un-line-sm: #{get-var-value($line-sm)};
--un-line-base: #{get-var-value($line-base)};
--un-line-lg: #{get-var-value($line-lg)};
--un-line-xl: #{get-var-value($line-xl)};
--un-line-2xl: #{get-var-value($line-2xl)};
--un-line-3xl: #{get-var-value($line-3xl)};
--un-line-4xl: #{get-var-value($line-4xl)};
--un-line-5xl: #{get-var-value($line-5xl)};
--un-line-6xl: #{get-var-value($line-6xl)};
--un-radius-xs: #{get-var-value($radius-xs)};
--un-radius-sm: #{get-var-value($radius-sm)};
--un-radius-base: #{get-var-value($radius-base)};
--un-radius-lg: #{get-var-value($radius-lg)};
--un-radius-xl: #{get-var-value($radius-xl)};
--un-radius-2xl: #{get-var-value($radius-2xl)};
--un-radius-circle: #{get-var-value($radius-circle)};
--un-text-xs: #{get-var-value($text-xs)};
--un-text-sm: #{get-var-value($text-sm)};
--un-text-base: #{get-var-value($text-base)};
--un-text-lg: #{get-var-value($text-lg)};
--un-text-xl: #{get-var-value($text-xl)};
--un-text-2xl: #{get-var-value($text-2xl)};
--un-text-3xl: #{get-var-value($text-3xl)};
--un-text-4xl: #{get-var-value($text-4xl)};
--un-text-5xl: #{get-var-value($text-5xl)};
--un-text-6xl: #{get-var-value($text-6xl)};
}
\ No newline at end of file \ No newline at end of file
.theme-dark {
/* 文本色 */
--un-text-color: #E5E5E5;
--un-text-color-secondary: #B0B0B0;
--un-text-color-muted: #909090;
--un-text-color-placeholder: #808080;
--un-text-color-disabled: #707070;
--un-text-color-white: #FFFFFF;
/* 填充色 */
--un-fill-color: #2D2D2D;
--un-fill-color-light: #333333;
--un-fill-color-lighter: #3A3A3A;
--un-fill-color-extra-light: #404040;
--un-fill-color-dark: #252525;
--un-fill-color-darker: #222222;
--un-fill-color-blank: #1A1A1A;
/* 边框色 */
--un-border-color: #434343;
--un-border-color-light: #383838;
--un-border-color-lighter: #444444;
--un-border-color-extra-light: #555555;
--un-border-color-dark: #4A4A4A;
--un-border-color-darker: #666666;
/* 背景色 */
--un-bg-color: #1E1E1E;
--un-bg-color-hover: #2D2D2D;
--un-bg-color-active: #3A3A3A;
--un-bg-color-disabled: #252525;
--un-bg-color-page: #121212;
/* 主色 */
--un-color-primary: #{get-var-value($color-primary)};
--un-color-primary-light: #{get-var-value($color-primary-light)};
--un-color-primary-lighter: #{get-var-value($color-primary-lighter)};
--un-color-primary-dark: #{get-var-value($color-primary-dark)};
/* 成功色 */
--un-color-success: #{get-var-value($color-success)};
--un-color-success-light: #{get-var-value($color-success-light)};
--un-color-success-lighter: #{get-var-value($color-success-lighter)};
--un-color-success-dark: #{get-var-value($color-success-dark)};
/* 警告色 */
--un-color-warning: #{get-var-value($color-warning)};
--un-color-warning-light: #{get-var-value($color-warning-light)};
--un-color-warning-lighter: #{get-var-value($color-warning-lighter)};
--un-color-warning-dark: #{get-var-value($color-warning-dark)};
/* 错误色 */
--un-color-error: #{get-var-value($color-error)};
--un-color-error-light: #{get-var-value($color-error-light)};
--un-color-error-lighter: #{get-var-value($color-error-lighter)};
--un-color-error-dark: #{get-var-value($color-error-dark)};
/* 信息色 */
--un-color-info: #8C8C8C;
--un-color-info-light: #444444;
--un-color-info-lighter: #555555;
--un-color-info-dark: #595959;
--un-color-info-disabled: #222222;
}
\ No newline at end of file \ No newline at end of file
/*
* 去除字符串前后空格
* @param {String} $string - 要处理的字符串
* @return {String} - 处理后的字符串
*/
@function trim($string) {
// 确保输入是字符串
$string: inspect($string);
// 去除前导空格
@while str-index($string, " ") == 1 and str-length($string) > 0 {
$string: str-slice($string, 2);
}
// 去除尾随空格
$has-trailing-space: true;
@while $has-trailing-space and str-length($string) > 0 {
$last-char: str-slice($string, str-length($string), str-length($string));
@if $last-char == " " {
$string: str-slice($string, 1, str-length($string) - 1);
} @else {
$has-trailing-space: false;
}
}
@return $string;
}
/*
* 提取CSS变量中的变量名和默认值
* @param {String} $value - CSS变量字符串,格式如:var(--variable-name, default-value)
* @return {List} - 包含变量名和默认值的列表,格式如:("variable-name", "default-value")
*/
@function parse-var($value) {
// 将$value转换为字符串
$value: inspect($value);
$result: (
name: "",
value: $value
);
// 检查是否是CSS变量格式
@if str-index($value, "var(") == 1 {
// 找到第一个逗号的位置
$comma-index: str-index($value, ",");
@if $comma-index {
// 提取变量名部分(var(和逗号之间)
$var-part: str-slice($value, 5, $comma-index - 1); // 5 是 "var(" 的长度
$variable-name: trim($var-part);
// 提取逗号后的内容(默认值)
$default-part: str-slice($value, $comma-index + 1);
// 移除末尾的右括号
$default-value: str-slice($default-part, 1, str-length($default-part) - 1);
// 去除前后空格
$default-value: trim($default-value);
//@debug "提取的变量名: #{$variable-name}";
//@debug "提取的默认值: #{$default-value}";
// 返回变量名和默认值的列表
$result:(
name: $variable-name,
value: $default-value
);
} @else {
// 没有逗号,只有变量名,没有默认值
$var-part: str-slice($value, 5, str-length($value) - 1); // 5 是 "var(" 的长度
$variable-name: trim($var-part);
//@debug "只有变量名,无默认值: #{$variable-name}";
// 返回变量名和空默认值
$result:(
name: $variable-name,
value: ""
);
}
}
@return $result;
}
/*
* 将空格分隔的字符串转换为列表
* @param {String} $string - 要处理的字符串,包含空格分隔的值
* @return {List} - 包含处理后值的列表
*/
@function space-list($string) {
// 确保输入是字符串
$string: inspect($string);
// 先去除前后空格
$string: trim($string);
$result: ();
$temp-string: $string;
@while str-length($temp-string) > 0 {
// 查找下一个空格
$space-index: str-index($temp-string, " ");
@if $space-index {
// 提取当前值
$value: str-slice($temp-string, 1, $space-index - 1);
$value: trim($value); // 去除值的前后空格
@if str-length($value) > 0 {
$result: append($result, unquote($value));
//@debug "提取值: #{unquote($value)}";
}
// 移除已处理的部分
$temp-string: str-slice($temp-string, $space-index + 1);
// 跳过连续的空格
@while str-index($temp-string, " ") == 1 {
$temp-string: str-slice($temp-string, 2);
}
$temp-string: trim($temp-string); // 去除剩余部分的前导空格
} @else {
// 没有更多空格,添加剩余部分
$temp-string: trim($temp-string); // 去除剩余部分的前后空格
@if str-length($temp-string) > 0 {
$result: append($result, unquote($temp-string));
//@debug "最后提取值: #{unquote($temp-string)}";
}
$temp-string: "";
}
}
//@debug "space-list 输出列表: #{$result}";
@return $result;
}
/*
* 通用边距处理函数
* @param {String} $values - CSS变量字符串或默认值
* @param {Boolean} $is-radius - 是否是border-radius属性
* @return {Map} - 包含各方向值的映射
*/
@function process-sides($values, $is-radius: false) {
$extracted: parse-var($values);
$variable-name: map-get($extracted, name);
$default-values: map-get($extracted, value);
$result: ();
$variable-name-no-prefix: if(str-index($variable-name, "--un-") == 1, str-slice($variable-name, 6), $variable-name);
$value-list: space-list($default-values);
$length: length($value-list);
@if $length == 1 {
$result: (
variable-name: $variable-name-no-prefix,
top: $default-values,
bottom: $default-values,
left: $default-values,
right: $default-values
);
} @else if $length == 2 {
$value1: nth($value-list, 1);
$value2: nth($value-list, 2);
$result: (
variable-name: $variable-name-no-prefix,
top: $value1,
bottom: $value1,
left: $value2,
right: $value2
);
} @else if $length == 3 {
$value1: nth($value-list, 1);
$value2: nth($value-list, 2);
$value3: nth($value-list, 3);
$result: (
variable-name: $variable-name-no-prefix,
top: $value1,
bottom: $value3,
left: $value2,
right: $value2
);
} @else if $length == 4 {
$value1: nth($value-list, 1);
$value2: nth($value-list, 2);
$value3: nth($value-list, 3);
$value4: nth($value-list, 4);
$value-top: $value1;
$value-right: $value2;
$value-bottom: $value3;
$value-left: $value4;
$result: (
variable-name: $variable-name-no-prefix,
top: $value1,
right: $value2,
bottom: $value3,
left: $value4
);
}
@return $result;
}
@function get-var-value($values) {
$extracted: parse-var($values);
@return map-get($extracted, value);
}
.theme-light {
/* 文本色 */
--un-text-color: #{get-var-value($text-color)};
--un-text-color-secondary: #{get-var-value($text-color-secondary)};
--un-text-color-muted: #{get-var-value($text-color-muted)};
--un-text-color-placeholder: #{get-var-value($text-color-placeholder)};
--un-text-color-disabled: #{get-var-value($text-color-disabled)};
--un-text-color-white: #{get-var-value($text-color-white)};
/* 填充色 */
--un-fill-color: #{get-var-value($fill-color)};
--un-fill-color-light: #{get-var-value($fill-color-light)};
--un-fill-color-lighter: #{get-var-value($fill-color-lighter)};
--un-fill-color-extra-light: #{get-var-value($fill-color-extra-light)};
--un-fill-color-dark: #{get-var-value($fill-color-dark)};
--un-fill-color-darker: #{get-var-value($fill-color-darker)};
--un-fill-color-blank: #{get-var-value($fill-color-blank)};
/* 边框色 */
--un-border-color: #{get-var-value($border-color)};
--un-border-color-light: #{get-var-value($border-color-light)};
--un-border-color-lighter: #{get-var-value($border-color-lighter)};
--un-border-color-extra-light: #{get-var-value($border-color-extra-light)};
--un-border-color-dark: #{get-var-value($border-color-dark)};
--un-border-color-darker: #{get-var-value($border-color-darker)};
/* 背景色 */
--un-bg-color: #{get-var-value($bg-color)};
--un-bg-color-hover: #{get-var-value($bg-color-hover)};
--un-bg-color-active: #{get-var-value($bg-color-active)};
--un-bg-color-disabled: #{get-var-value($bg-color-disabled)};
--un-bg-color-page: #{get-var-value($bg-color-page)};
/* 主色 */
--un-color-primary: #{get-var-value($color-primary)};
--un-color-primary-light: #{get-var-value($color-primary-light)};
--un-color-primary-lighter: #{get-var-value($color-primary-lighter)};
--un-color-primary-dark: #{get-var-value($color-primary-dark)};
/* 成功色 */
--un-color-success: #{get-var-value($color-success)};
--un-color-success-light: #{get-var-value($color-success-light)};
--un-color-success-lighter: #{get-var-value($color-success-lighter)};
--un-color-success-dark: #{get-var-value($color-success-dark)};
/* 警告色 */
--un-color-warning: #{get-var-value($color-warning)};
--un-color-warning-light: #{get-var-value($color-warning-light)};
--un-color-warning-lighter: #{get-var-value($color-warning-lighter)};
--un-color-warning-dark: #{get-var-value($color-warning-dark)};
/* 错误色 */
--un-color-error: #{get-var-value($color-error)};
--un-color-error-light: #{get-var-value($color-error-light)};
--un-color-error-lighter: #{get-var-value($color-error-lighter)};
--un-color-error-dark: #{get-var-value($color-error-dark)};
/* 信息色 */
--un-color-info: #{get-var-value($color-info)};
--un-color-info-light: #{get-var-value($color-info-light)};
--un-color-info-lighter: #{get-var-value($color-info-lighter)};
--un-color-info-dark: #{get-var-value($color-info-dark)};
}
\ No newline at end of file \ No newline at end of file
@import "./function.scss";
@mixin border-radius($values) {
$sides: process-sides($values, true);
$name: map-get($sides, variable-name);
$top: map-get($sides, top);
$bottom: map-get($sides, bottom);
$left: map-get($sides, left);
$right: map-get($sides, right);
@if $name == "" {
border-top-left-radius: $top;
border-top-right-radius: $right;
border-bottom-right-radius: $bottom;
border-bottom-left-radius: $left;
} @else {
border-top-left-radius: var(--un-#{$name}, $top);
border-top-right-radius: var(--un-#{$name}, $right);
border-bottom-right-radius: var(--un-#{$name}, $bottom);
border-bottom-left-radius: var(--un-#{$name}, $left);
}
}
\ No newline at end of file \ No newline at end of file
// 行高
$line-xs: var(--un-line-xs, if(variable-exists(un-line-xs), $un-line-xs, 16px)); // 配合11px字号
$line-sm: var(--un-line-sm, if(variable-exists(un-line-sm), $un-line-sm, 18px)); // 配合13px字号
$line-base: var(--un-line-base, if(variable-exists(un-line-base), $un-line-base, 21px)); // 配合15px字号
$line-lg: var(--un-line-lg, if(variable-exists(un-line-lg), $un-line-lg, 24px)); // 配合17px字号
$line-xl: var(--un-line-xl, if(variable-exists(un-line-xl), $un-line-xl, 27px)); // 配合19px字号
$line-2xl: var(--un-line-2xl, if(variable-exists(un-line-2xl), $un-line-2xl, 30px)); // 配合21px字号
$line-3xl: var(--un-line-3xl, if(variable-exists(un-line-3xl), $un-line-3xl, 36px)); // 配合25px字号
$line-4xl: var(--un-line-4xl, if(variable-exists(un-line-4xl), $un-line-4xl, 39px)); // 配合29px字号
$line-5xl: var(--un-line-5xl, if(variable-exists(un-line-5xl), $un-line-5xl, 48px)); // 配合33px字号
$line-6xl: var(--un-line-6xl, if(variable-exists(un-line-6xl), $un-line-6xl, 54px)); // 配合37px字号
//圆角
$radius-xs: var(--un-radius-xs, if(variable-exists(un-radius-xs), $un-radius-xs, 2px)); // 最小圆角:小标签、徽章、开关
$radius-sm: var(--un-radius-sm, if(variable-exists(un-radius-sm), $un-radius-sm, 3px)); // 小圆角:小按钮、输入框、小图标
$radius-base: var(--un-radius-base, if(variable-exists(un-radius-base), $un-radius-base, 4px)); // 基础圆角:常规按钮、列表项、小卡片
$radius-lg: var(--un-radius-lg, if(variable-exists(un-radius-lg), $un-radius-lg, 6px)); // 大圆角化:卡片、弹窗、图片容器
$radius-xl: var(--un-radius-xl, if(variable-exists(un-radius-xl), $un-radius-xl, 8px)); // 超大圆角:大卡片、模态框、面板
$radius-2xl: var(--un-radius-2xl, if(variable-exists(un-radius-2xl), $un-radius-2xl, 12px)); // 极大专角:沉浸式容器(全屏弹窗、侧边栏、大面板)
$radius-circle: var(--un-radius-circle, if(variable-exists(un-radius-circle), $un-radius-circle, 100px)); // 圆形:头像、圆形按钮、图标
// 字号
$text-xs: var(--un-text-xs, if(variable-exists(un-text-xs), $un-text-xs, 10px)); // 超小文本:标签、时间戳
$text-sm: var(--un-text-sm, if(variable-exists(un-text-sm), $un-text-sm, 12px)); // 小文本:辅助说明
$text-base: var(--un-text-base, if(variable-exists(un-text-base), $un-text-base, 14px)); // 基础文本:主要正文
$text-lg: var(--un-text-lg, if(variable-exists(un-text-lg), $un-text-lg, 16px)); // 大文本:重要内容、按钮主文本
$text-xl: var(--un-text-xl, if(variable-exists(un-text-xl), $un-text-xl, 18px)); // 超大文本:子标题
$text-2xl: var(--un-text-2xl, if(variable-exists(un-text-2xl), $un-text-2xl, 20px)); // 2倍超大:模块标题
$text-3xl: var(--un-text-3xl, if(variable-exists(un-text-3xl), $un-text-3xl, 24px)); // 3倍超大:页面主标题
$text-4xl: var(--un-text-4xl, if(variable-exists(un-text-4xl), $un-text-4xl, 26px)); // 4倍超大:营销标题
$text-5xl: var(--un-text-5xl, if(variable-exists(un-text-5xl), $un-text-5xl, 32px)); // 5倍超大:特殊场景标题
$text-6xl: var(--un-text-6xl, if(variable-exists(un-text-6xl), $un-text-6xl, 36px)); // 6倍超大:最大级展示
// 文本色
$text-color: var(--un-text-color, if(variable-exists(un-text-color), $un-text-color, #262626)); // 基础文本颜色
$text-color-secondary: var(--un-text-color-secondary, if(variable-exists(un-text-color-secondary), $un-text-color-secondary, #595959)); // 次要文本颜色
$text-color-muted: var(--un-text-color-muted, if(variable-exists(un-text-color-muted), $un-text-color-muted, #8C8C8C)); // 辅助文本颜色
$text-color-placeholder: var(--un-text-color-placeholder, if(variable-exists(un-text-color-placeholder), $un-text-color-placeholder, #999999)); // 输入框占位符颜色
$text-color-disabled: var(--un-text-color-disabled, if(variable-exists(un-text-color-disabled), $un-text-color-disabled, #A0A0A0)); // 禁用状态的文本颜色
$text-color-white: var(--un-text-color-white, if(variable-exists(un-text-color-white), $un-text-color-white, #FFFFFF)); // 白色文本颜色,用于深色背景
$fill-color: var(--un-fill-color, if(variable-exists(un-fill-color), $un-fill-color, #F0F0F0)); // 基础填充色(组件默认背景,如卡片、普通按钮)
$fill-color-light: var(--un-fill-color-light, if(variable-exists(un-fill-color-light), $un-fill-color-light, #F5F5F5)); // 较浅填充(弱化背景,如悬停态卡片、次级面板)
$fill-color-lighter: var(--un-fill-color-lighter, if(variable-exists(un-fill-color-lighter), $un-fill-color-lighter, #F8F8F8)); // 更浅填充(极淡背景,如分组容器、折叠面板)
$fill-color-extra-light: var(--un-fill-color-extra-light, if(variable-exists(un-fill-color-extra-light), $un-fill-color-extra-light, #FAFAFA)); // 极浅填充(接近白色,如输入框默认态、标签背景)
$fill-color-dark: var(--un-fill-color-dark, if(variable-exists(un-fill-color-dark), $un-fill-color-dark, #E5E5E5)); // 较深填充(强调背景,如激活态按钮、选中选项卡)
$fill-color-darker: var(--un-fill-color-darker, if(variable-exists(un-fill-color-darker), $un-fill-color-darker, #E0E0E0)); // 更深填充(强强调背景,如警示区域、加载态遮罩)
$fill-color-blank: var(--un-fill-color-blank, if(variable-exists(un-fill-color-blank), $un-fill-color-blank, #FFFFFF)); // 空白填充(纯白背景,如弹窗、图片容器)
// 边框色
$border-color: var(--un-border-color, if(variable-exists(un-border-color), $un-border-color, #D9D9D9)); // 基础边框颜色
$border-color-light: var(--un-border-color-light, if(variable-exists(un-border-color-light), $un-border-color-light, #E5E5E5)); // 中等边框颜色
$border-color-lighter: var(--un-border-color-lighter, if(variable-exists(un-border-color-lighter), $un-border-color-lighter, #EEEEEE)); // 更亮的边框颜色
$border-color-extra-light: var(--un-border-color-extra-light, if(variable-exists(un-border-color-extra-light), $un-border-color-extra-light, #F5F5F5)); // 额外亮边框颜色,用于卡片、列表项等
$border-color-dark: var(--un-border-color-dark, if(variable-exists(un-border-color-dark), $un-border-color-dark, #CCCCCC)); // 暗边框颜色,用于深背景
$border-color-darker: var(--un-border-color-darker, if(variable-exists(un-border-color-darker), $un-border-color-darker, #BFBFBF)); // 更暗边框颜色,用于更深背景
// 背景色
$bg-color: var(--un-bg-color, if(variable-exists(un-bg-color), $un-bg-color, #FFFFFF)); // 基础背景颜色
$bg-color-hover: var(--un-bg-color-hover, if(variable-exists(un-bg-color-hover), $un-bg-color-hover, #E8E8E8)); // 悬停状态的背景颜色
$bg-color-active: var(--un-bg-color-active, if(variable-exists(un-bg-color-active), $un-bg-color-active, #E5E5E5)); // 激活状态的背景颜色
$bg-color-disabled: var(--un-bg-color-disabled, if(variable-exists(un-bg-color-disabled), $un-bg-color-disabled, #F0F0F0)); // 禁用状态的背景颜色
$bg-color-page: var(--un-bg-color-page, if(variable-exists(un-bg-color-page), $un-bg-color-page, #F8F8F8)); // 页面的背景颜色
// 主色
$color-primary: var(--un-color-primary, if(variable-exists(un-color-primary), $un-color-primary, #1677FF));
$color-primary-light: var(--un-color-primary-light, if(variable-exists(un-color-primary-light), $un-color-primary-light, #D4E7FF)); // 亮主色
$color-primary-lighter: var(--un-color-primary-lighter, if(variable-exists(un-color-primary-lighter), $un-color-primary-lighter, #E6F0FF)); // 更亮主色
$color-primary-dark: var(--un-color-primary-dark, if(variable-exists(un-color-primary-dark), $un-color-primary-dark, #0E5CD6)); // 暗主色
// 成功色
$color-success: var(--un-color-success, if(variable-exists(un-color-success), $un-color-success, #00B96B)); // 基础成功色
$color-success-light: var(--un-color-success-light, if(variable-exists(un-color-success-light), $un-color-success-light, #C6F0DC)); // 亮成功色
$color-success-lighter: var(--un-color-success-lighter, if(variable-exists(un-color-success-lighter), $un-color-success-lighter, #E0F8EC)); // 更亮成功色
$color-success-dark: var(--un-color-success-dark, if(variable-exists(un-color-success-dark), $un-color-success-dark, #009A5A)); // 暗成功色
// 警告色
$color-warning: var(--un-color-warning, if(variable-exists(un-color-warning), $un-color-warning, #FF9C2A)); // 基础警告色
$color-warning-light: var(--un-color-warning-light, if(variable-exists(un-color-warning-light), $un-color-warning-light, #FFE8CC)); // 亮警告色
$color-warning-lighter: var(--un-color-warning-lighter, if(variable-exists(un-color-warning-lighter), $un-color-warning-lighter, #FFF2E6)); // 更亮警告色
$color-warning-dark: var(--un-color-warning-dark, if(variable-exists(un-color-warning-dark), $un-color-warning-dark, #E68517)); // 暗警告色
// 错误色
$color-error: var(--un-color-error, if(variable-exists(un-color-error), $un-color-error, #FF4D4F)); // 基础错误色
$color-error-light: var(--un-color-error-light, if(variable-exists(un-color-error-light), $un-color-error-light, #FFD9D9)); // 亮错误色
$color-error-lighter: var(--un-color-error-lighter, if(variable-exists(un-color-error-lighter), $un-color-error-lighter, #FFEBEB)); // 更亮错误色
$color-error-dark: var(--un-color-error-dark, if(variable-exists(un-color-error-dark), $un-color-error-dark, #D9363E)); // 暗错误色
// 信息色
$color-info: var(--un-color-info, if(variable-exists(un-color-info), $un-color-info, #8C8C8C)); // 基础信息色
$color-info-light: var(--un-color-info-light, if(variable-exists(un-color-info-light), $un-color-info-light, #E8E8E8)); // 亮信息色
$color-info-lighter: var(--un-color-info-lighter, if(variable-exists(un-color-info-lighter), $un-color-info-lighter, #F0F0F0)); // 更亮信息色
$color-info-dark: var(--un-color-info-dark, if(variable-exists(un-color-info-dark), $un-color-info-dark, #595959)); // 暗信息色
\ No newline at end of file \ No newline at end of file
...@@ -10,18 +10,27 @@ import { lockOrientation } from '@/utils/plus-screen.uts' ...@@ -10,18 +10,27 @@ import { lockOrientation } from '@/utils/plus-screen.uts'
// 防抖:仅保留最后一次延迟刷新,避免快速切页时多次刷新 // 防抖:仅保留最后一次延迟刷新,避免快速切页时多次刷新
var refreshTimer: number = 0 var refreshTimer: number = 0
var retryTimer: number = 0
export function applyScreenOrientationLock(): void { export function applyScreenOrientationLock(): void {
// #ifdef APP // #ifdef APP
if (layoutService.isMode('pad') || layoutService.isMode('desktop')) { if (layoutService.isMode('pad') || layoutService.isMode('desktop')) {
lockOrientation('landscape-primary') lockOrientation('landscape-primary')
// 某些机型/框架在页面切换后会把方向“抖回去”,这里再补一次锁定
if (retryTimer != 0) {
clearTimeout(retryTimer)
}
retryTimer = setTimeout((): void => {
lockOrientation('landscape-primary')
retryTimer = 0
}, 600)
if (refreshTimer != 0) { if (refreshTimer != 0) {
clearTimeout(refreshTimer) clearTimeout(refreshTimer)
} }
refreshTimer = setTimeout((): void => { refreshTimer = setTimeout((): void => {
layoutService.refreshScreenInfo() layoutService.refreshScreenInfo()
refreshTimer = 0 refreshTimer = 0
}, 400) }, 800)
} else { } else {
lockOrientation('portrait-primary') lockOrientation('portrait-primary')
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!