优化细节

This commit is contained in:
icssoa
2025-09-03 19:04:08 +08:00
parent 7791c47483
commit 6cebe34de4
8 changed files with 38 additions and 14 deletions

View File

@@ -635,6 +635,28 @@ export const isApp = (): boolean => {
return false; return false;
}; };
/**
* 检查是否为App-IOS环境
* @returns 是否为App-IOS环境
*/
export const isAppIOS = (): boolean => {
// #ifdef APP-IOS
return true;
// #endif
return false;
};
/**
* 检查是否为App-Android环境
* @returns 是否为App-Android环境
*/
export const isAppAndroid = (): boolean => {
// #ifdef APP-ANDROID
return true;
// #endif
return false;
};
/** /**
* 检查是否为H5环境 * 检查是否为H5环境
* @returns 是否为H5环境 * @returns 是否为H5环境

BIN
docs/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -74,10 +74,10 @@
"distribute": { "distribute": {
"modules": {}, "modules": {},
"icons": { "icons": {
"hdpi": "static/logo2.png", "hdpi": "docs/logo.png",
"xhdpi": "static/logo2.png", "xhdpi": "docs/logo.png",
"xxhdpi": "static/logo2.png", "xxhdpi": "docs/logo.png",
"xxxhdpi": "static/logo2.png" "xxxhdpi": "docs/logo.png"
}, },
"splashScreens": { "splashScreens": {
"default": {} "default": {}
@@ -88,7 +88,7 @@
"distribute": { "distribute": {
"modules": {}, "modules": {},
"icons": { "icons": {
"appstore": "static/logo2.png" "appstore": "docs/logo.png"
}, },
"splashScreens": {} "splashScreens": {}
} }

View File

@@ -32,7 +32,7 @@
<view <view
class="flex flex-col items-center justify-center h-[100rpx] rounded-lg" class="flex flex-col items-center justify-center h-[100rpx] rounded-lg"
hover-class="opacity-60" hover-class="opacity-60"
:hover-stay-time="100" :hover-stay-time="250"
@tap="copy(item)" @tap="copy(item)"
> >
<cl-icon :name="item"></cl-icon> <cl-icon :name="item"></cl-icon>
@@ -47,7 +47,7 @@
<view <view
class="flex flex-col items-center justify-center h-[100rpx]" class="flex flex-col items-center justify-center h-[100rpx]"
hover-class="opacity-60" hover-class="opacity-60"
:hover-stay-time="100" :hover-stay-time="250"
@tap="copy(item)" @tap="copy(item)"
> >
<cl-icon :name="item"></cl-icon> <cl-icon :name="item"></cl-icon>

View File

@@ -236,6 +236,8 @@
>{{ t("确定") }}</cl-button >{{ t("确定") }}</cl-button
> >
</view> </view>
<cl-safe-area type="bottom"></cl-safe-area>
</view> </view>
</cl-popup> </cl-popup>
</cl-page> </cl-page>

View File

@@ -6,7 +6,7 @@
</demo-item> </demo-item>
<demo-item :label="t('不同位置')"> <demo-item :label="t('不同位置')">
<view class="flex flex-row"> <view class="flex flex-row overflow-visible">
<cl-button type="light" @tap="open('top')">{{ t("顶部") }}</cl-button> <cl-button type="light" @tap="open('top')">{{ t("顶部") }}</cl-button>
<cl-button type="light" @tap="open('center')">{{ t("中间") }}</cl-button> <cl-button type="light" @tap="open('center')">{{ t("中间") }}</cl-button>
<cl-button type="light" @tap="open('bottom')">{{ t("底部") }}</cl-button> <cl-button type="light" @tap="open('bottom')">{{ t("底部") }}</cl-button>
@@ -14,7 +14,7 @@
</demo-item> </demo-item>
<demo-item :label="t('不同类型')"> <demo-item :label="t('不同类型')">
<view class="flex flex-row flex-wrap mb-2"> <view class="flex flex-row flex-wrap mb-2 overflow-visible">
<cl-button type="light" @tap="openType('success')">{{ t("成功") }}</cl-button> <cl-button type="light" @tap="openType('success')">{{ t("成功") }}</cl-button>
<cl-button type="light" @tap="openType('error')">{{ t("失败") }}</cl-button> <cl-button type="light" @tap="openType('error')">{{ t("失败") }}</cl-button>
<cl-button type="light" @tap="openType('warn')">{{ t("警告") }}</cl-button> <cl-button type="light" @tap="openType('warn')">{{ t("警告") }}</cl-button>
@@ -22,13 +22,13 @@
<cl-button type="light" @tap="openType('disabled')">{{ t("禁用") }}</cl-button> <cl-button type="light" @tap="openType('disabled')">{{ t("禁用") }}</cl-button>
</view> </view>
<view class="flex flex-row flex-wrap"> <view class="flex flex-row flex-wrap overflow-visible">
<cl-button type="light" @tap="openType('stop')">{{ t("停止") }}</cl-button> <cl-button type="light" @tap="openType('stop')">{{ t("停止") }}</cl-button>
</view> </view>
</demo-item> </demo-item>
<demo-item :label="t('自定义图标')"> <demo-item :label="t('自定义图标')">
<view class="flex flex-row"> <view class="flex flex-row overflow-visible">
<cl-button <cl-button
type="light" type="light"
icon="star-line" icon="star-line"

View File

@@ -2,7 +2,7 @@
<cl-page> <cl-page>
<view class="p-3"> <view class="p-3">
<demo-item :label="t('基础用法')"> <demo-item :label="t('基础用法')">
<view class="flex flex-row"> <view class="flex flex-row overflow-visible">
<cl-badge type="primary" value="1" class="mr-2"></cl-badge> <cl-badge type="primary" value="1" class="mr-2"></cl-badge>
<cl-badge type="success" value="12" class="mr-2"></cl-badge> <cl-badge type="success" value="12" class="mr-2"></cl-badge>
<cl-badge type="warn" value="31" class="mr-2"></cl-badge> <cl-badge type="warn" value="31" class="mr-2"></cl-badge>
@@ -62,7 +62,7 @@
</demo-item> </demo-item>
<demo-item :label="t('自定义样式')"> <demo-item :label="t('自定义样式')">
<view class="flex flex-row"> <view class="flex flex-row overflow-visible">
<cl-badge <cl-badge
type="info" type="info"
:pt="{ className: '!rounded-bl-none' }" :pt="{ className: '!rounded-bl-none' }"

View File

@@ -56,7 +56,7 @@
<view <view
class="item dark:!bg-surface-800" class="item dark:!bg-surface-800"
hover-class="opacity-80" hover-class="opacity-80"
:hover-stay-time="50" :hover-stay-time="250"
@tap="toPath(child)" @tap="toPath(child)"
> >
<cl-icon :name="child.icon" :size="36"></cl-icon> <cl-icon :name="child.icon" :size="36"></cl-icon>