icssoa 8 månader sedan
förälder
incheckning
914114aa11

+ 1 - 1
config/index.ts

@@ -23,7 +23,7 @@ type Config = {
 
 // 根据环境导出最终配置
 export const config = {
-	name: "cool-unix",
+	name: "Cool Unix",
 	version: "1.0.0",
 	locale: "zh",
 	website: "https://cool-js.com",

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
locale/en.ts


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
locale/es.ts


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
locale/zh-cn.ts


+ 2 - 1
pages.json

@@ -73,7 +73,8 @@
 				{
 					"path": "login",
 					"style": {
-						"navigationStyle": "custom"
+						"navigationStyle": "custom",
+						"disableScroll": true
 					}
 				}
 			]

+ 5 - 6
pages/demo/feedback/action-sheet.uvue

@@ -38,7 +38,7 @@
 					className: 'flex-row mx-[-10rpx]'
 				},
 				item: {
-					className: 'flex-1 mx-[10rpx]'
+					className: 'flex-1 mx-[10rpx] !rounded-xl'
 				}
 			}"
 		>
@@ -48,10 +48,9 @@
 				</view>
 			</template>
 			<template #append>
-				<view class="pb-5 pt-2 px-3">
-					<cl-checkbox v-model="agree"
-						>请阅读并同意《会员服务协议》和《隐私政策》</cl-checkbox
-					>
+				<view class="pb-5 pt-2 px-3 flex flex-row items-center">
+					<cl-checkbox v-model="agree">请阅读并同意</cl-checkbox>
+					<cl-text color="primary">《会员服务协议》</cl-text>
 				</view>
 			</template>
 
@@ -170,7 +169,7 @@ function openActionSheet6() {
 	function done() {
 		if (!agree.value) {
 			ui.showToast({
-				message: t("请阅读并同意《会员服务协议》和《隐私政策》")
+				message: "请阅读并同意《会员服务协议》"
 			});
 			return;
 		}

+ 1 - 1
pages/demo/feedback/toast.uvue

@@ -2,7 +2,7 @@
 	<cl-page>
 		<view class="p-3">
 			<demo-item :label="t('基础用法')">
-				<cl-button @tap="open()">打开</cl-button>
+				<cl-button @tap="open()">{{ t("打开") }}</cl-button>
 			</demo-item>
 
 			<demo-item :label="t('不同位置')">

+ 5 - 8
pages/demo/form/checkbox.uvue

@@ -18,14 +18,11 @@
 			</demo-item>
 
 			<demo-item :label="t('单个 true / false')">
-				<view class="flex flex-row justify-between">
-					<cl-checkbox
-						v-model="checked4"
-						:pt="{
-							className: 'mr-5'
-						}"
-						>同意并阅读《用户协议》</cl-checkbox
-					>
+				<view class="flex flex-row items-center">
+					<cl-checkbox v-model="checked4">同意并阅读</cl-checkbox>
+					<cl-text color="primary">《用户协议》</cl-text>
+
+					<view class="flex-1"></view>
 
 					<cl-switch v-model="checked4"></cl-switch>
 				</view>

+ 6 - 5
pages/demo/other/sign.uvue

@@ -4,16 +4,16 @@
 
 		<view class="p-3">
 			<cl-list>
-				<cl-list-item label="操作">
-					<cl-button type="info" @click="clear">清空</cl-button>
-					<cl-button @click="preview">预览</cl-button>
+				<cl-list-item :label="t('操作')">
+					<cl-button type="info" @click="clear">{{ t("清空") }}</cl-button>
+					<cl-button @click="preview">{{ t("预览") }}</cl-button>
 				</cl-list-item>
 
-				<cl-list-item label="大屏">
+				<cl-list-item :label="t('设置高度')">
 					<cl-switch v-model="isFullscreen" @change="onFullscreenChange"></cl-switch>
 				</cl-list-item>
 
-				<cl-list-item label="毛笔效果">
+				<cl-list-item :label="t('毛笔效果')">
 					<cl-switch v-model="isBrush"></cl-switch>
 				</cl-list-item>
 			</cl-list>
@@ -22,6 +22,7 @@
 </template>
 
 <script setup lang="ts">
+import { t } from "@/locale";
 import { ref } from "vue";
 
 const height = ref(0);

+ 4 - 5
pages/demo/status/progress-circle.uvue

@@ -17,19 +17,19 @@
 						className: 'mt-5'
 					}"
 				>
-					<cl-list-item label="改个颜色">
+					<cl-list-item :label="t('改个颜色')">
 						<cl-switch v-model="isColor"></cl-switch>
 					</cl-list-item>
 
-					<cl-list-item label="显示文本">
+					<cl-list-item :label="t('显示文本')">
 						<cl-switch v-model="isText"></cl-switch>
 					</cl-list-item>
 
-					<cl-list-item label="快一些">
+					<cl-list-item :label="t('快一些')">
 						<cl-switch v-model="isDuration"></cl-switch>
 					</cl-list-item>
 
-					<cl-list-item label="显示文本">
+					<cl-list-item :label="t('显示文本')">
 						<cl-button type="light" size="small" icon="add-line" @tap="add"></cl-button>
 						<cl-button
 							type="light"
@@ -48,7 +48,6 @@
 import { ref } from "vue";
 import { t } from "@/locale";
 import DemoItem from "../components/item.uvue";
-import { ctx } from "@/cool";
 
 const isSize = ref(false);
 const isText = ref(true);

+ 6 - 5
pages/index/home.uvue

@@ -16,9 +16,9 @@
 					></cl-image>
 				</view>
 
-				<text class="text-2xl text-primary-500 dark:!text-white mr-auto ml-2 flex-1"
-					>cool-unix</text
-				>
+				<text class="text-xl text-primary-500 dark:!text-white mr-auto ml-2 flex-1">
+					{{ config.name }}
+				</text>
 
 				<view
 					class="bg-primary-500 h-8 w-8 rounded-full flex flex-row items-center justify-center"
@@ -71,6 +71,7 @@ import { t } from "@/locale";
 import { computed } from "vue";
 import Tabbar from "@/components/tabbar.uvue";
 import { useUi } from "@/uni_modules/cool-ui";
+import { config } from "@/config";
 
 const ui = useUi();
 const refs = useRefs();
@@ -358,12 +359,12 @@ const data = computed<Item[]>(() => {
 					path: "/pages/demo/other/qrcode"
 				},
 				{
-					label: "签名",
+					label: t("签名"),
 					icon: "sketching",
 					path: "/pages/demo/other/sign"
 				},
 				{
-					label: "图片裁剪",
+					label: t("图片裁剪"),
 					icon: "crop-line",
 					path: "/pages/demo/other/cropper"
 				},

+ 2 - 2
pages/user/components/login/phone.uvue

@@ -10,7 +10,7 @@
 		<view class="mb-3 flex flex-row">
 			<cl-input
 				v-model="form.phone"
-				prefix-icon="smartphone-line"
+				prefix-icon="device-fill"
 				:placeholder="t('请输入手机号')"
 				:border="false"
 				:pt="{
@@ -30,7 +30,7 @@
 				v-model="form.smsCode"
 				:clearable="false"
 				type="number"
-				prefix-icon="mail-line"
+				prefix-icon="shield-check-fill"
 				:placeholder="t('请输入验证码')"
 				:maxlength="4"
 				:border="false"

+ 12 - 14
pages/user/login.uvue

@@ -13,7 +13,7 @@
 					></cl-image>
 				</view>
 
-				<cl-text :pt="{ className: '!text-2xl font-bold mt-2' }">{{ config.name }}</cl-text>
+				<cl-text :pt="{ className: '!text-xl font-bold mt-3' }">{{ config.name }}</cl-text>
 			</view>
 
 			<login-phone :form="form" @success="toLogin"></login-phone>
@@ -22,28 +22,26 @@
 			<view class="mt-6 flex flex-row flex-wrap items-center justify-center">
 				<cl-checkbox
 					v-model="agree"
-					:pt="{ icon: { size: 32 } }"
-					active-icon="checkbox-circle-line"
+					:pt="{ icon: { size: 28 } }"
+					active-icon="checkbox-circle-fill"
 					inactive-icon="checkbox-blank-circle-line"
 				>
 				</cl-checkbox>
-				<cl-text :pt="{ className: '!text-sm' }" color="info">
-					{{ t("已阅读并同意") }}
-				</cl-text>
+				<cl-text color="info" :pt="{ className: '!text-xs' }">{{
+					t("已阅读并同意")
+				}}</cl-text>
 				<cl-text
-					:pt="{ className: '!text-sm mx-1' }"
+					:pt="{ className: '!text-xs' }"
 					@tap.stop="toDoc(t('用户协议'), 'userAgreement')"
 				>
-					{{ t("用户协议") }}
-				</cl-text>
-				<cl-text :pt="{ className: '!text-sm' }" color="info">
-					{{ t("和") }}
+					《{{ t("用户协议") }}》
 				</cl-text>
+				<cl-text color="info" :pt="{ className: '!text-xs' }">、</cl-text>
 				<cl-text
-					:pt="{ className: '!text-sm mx-1' }"
+					:pt="{ className: '!text-xs' }"
 					@tap.stop="toDoc(t('隐私政策'), 'privacyPolicy')"
 				>
-					{{ t("隐私政策") }}
+					{{ t("隐私政策") }}
 				</cl-text>
 			</view>
 
@@ -101,7 +99,7 @@ function toDoc(name: string, path: string) {}
 function isAgree() {
 	if (!agree.value) {
 		ui.showToast({
-			message: t("请先阅读并同意用户协议和隐私政策")
+			message: t("请先阅读并同意用户协议隐私政策")
 		});
 
 		return false;

+ 7 - 14
uni_modules/cool-ui/components/cl-cropper/props.ts

@@ -2,25 +2,18 @@ import type { PassThroughProps } from "../../types";
 
 export type ClCropperPassThrough = {
 	className?: string;
-	inner?: PassThroughProps;
 	image?: PassThroughProps;
+	op?: PassThroughProps;
+	opItem?: PassThroughProps;
+	mask?: PassThroughProps;
 	cropBox?: PassThroughProps;
-	button?: PassThroughProps;
 };
 
 export type ClCropperProps = {
 	className?: string;
 	pt?: ClCropperPassThrough;
-	src?: string;
-	width?: string | number;
-	height?: string | number;
-	cropWidth?: string | number;
-	cropHeight?: string | number;
+	cropWidth?: number;
+	cropHeight?: number;
 	maxScale?: number;
-	showButtons?: boolean;
-	quality?: number;
-	format?: "jpg" | "png";
-	disabled?: boolean;
-	canResize?: boolean; // 是否可以自定义裁剪框大小
-	canFlip?: boolean; // 是否显示翻转功能
-};
+	resizable?: boolean;
+};

+ 14 - 4
uni_modules/cool-ui/components/cl-select-trigger/cl-select-trigger.uvue

@@ -14,16 +14,23 @@
 			<cl-text
 				v-if="showText"
 				:pt="{
-					className: parseClass({
-						'!text-surface-400': disabled
-					})
+					className: parseClass([
+						{
+							'!text-surface-400': disabled
+						},
+						pt.text?.className
+					])
 				}"
 				ellipsis
 			>
 				{{ text }}
 			</cl-text>
 
-			<text class="cl-select-trigger__placeholder" v-else>
+			<text
+				class="cl-select-trigger__placeholder"
+				:class="[pt.placeholder?.className]"
+				v-else
+			>
 				{{ placeholder }}
 			</text>
 		</view>
@@ -53,6 +60,7 @@ import { computed } from "vue";
 import type { ClIconProps } from "../cl-icon/props";
 import { isDark, parseClass, parsePt } from "@/cool";
 import { t } from "@/locale";
+import type { PassThroughProps } from "../../types";
 
 defineOptions({
 	name: "cl-select-trigger"
@@ -98,6 +106,8 @@ const emit = defineEmits(["clear"]);
 type PassThrough = {
 	className?: string; // 根元素类名
 	icon?: ClIconProps; // 图标样式
+	placeholder?: PassThroughProps; // 占位符样式
+	text?: PassThroughProps; // 文本样式
 };
 
 // 解析透传样式配置

+ 3 - 0
uni_modules/cool-ui/components/cl-select-trigger/props.ts

@@ -1,8 +1,11 @@
 import type { ClIconProps } from "../cl-icon/props";
+import type { PassThroughProps } from "../../types";
 
 export type ClSelectTriggerPassThrough = {
 	className?: string;
 	icon?: ClIconProps;
+	placeholder?: PassThroughProps;
+	text?: PassThroughProps;
 };
 
 export type ClSelectTriggerProps = {

+ 0 - 1
uni_modules/cool-ui/components/cl-sign/props.ts

@@ -14,5 +14,4 @@ export type ClSignProps = {
 	minStrokeWidth?: number;
 	maxStrokeWidth?: number;
 	velocitySensitivity?: number;
-	autoRotate?: boolean;
 };

+ 2 - 0
uni_modules/cool-ui/index.d.ts

@@ -12,6 +12,7 @@ import type { ClCheckboxProps, ClCheckboxPassThrough } from "./components/cl-che
 import type { ClColProps, ClColPassThrough } from "./components/cl-col/props";
 import type { ClCollapseProps, ClCollapsePassThrough } from "./components/cl-collapse/props";
 import type { ClCountdownProps, ClCountdownPassThrough } from "./components/cl-countdown/props";
+import type { ClCropperProps, ClCropperPassThrough } from "./components/cl-cropper/props";
 import type { ClDraggableProps, ClDraggablePassThrough } from "./components/cl-draggable/props";
 import type { ClFloatViewProps } from "./components/cl-float-view/props";
 import type { ClFooterProps, ClFooterPassThrough } from "./components/cl-footer/props";
@@ -79,6 +80,7 @@ declare module "vue" {
 		"cl-col": (typeof import('./components/cl-col/cl-col.uvue')['default']) & import('vue').DefineComponent<ClColProps>;
 		"cl-collapse": (typeof import('./components/cl-collapse/cl-collapse.uvue')['default']) & import('vue').DefineComponent<ClCollapseProps>;
 		"cl-countdown": (typeof import('./components/cl-countdown/cl-countdown.uvue')['default']) & import('vue').DefineComponent<ClCountdownProps>;
+		"cl-cropper": (typeof import('./components/cl-cropper/cl-cropper.uvue')['default']) & import('vue').DefineComponent<ClCropperProps>;
 		"cl-draggable": (typeof import('./components/cl-draggable/cl-draggable.uvue')['default']) & import('vue').DefineComponent<ClDraggableProps>;
 		"cl-float-view": (typeof import('./components/cl-float-view/cl-float-view.uvue')['default']) & import('vue').DefineComponent<ClFloatViewProps>;
 		"cl-footer": (typeof import('./components/cl-footer/cl-footer.uvue')['default']) & import('vue').DefineComponent<ClFooterProps>;

Vissa filer visades inte eftersom för många filer har ändrats