commit a21fb9291662829f00c99399464c1e584468f748 Author: chenghuan Date: Tue Nov 4 12:37:04 2025 +0800 更新:登录功能 diff --git a/App.vue b/App.vue new file mode 100644 index 0000000..591909b --- /dev/null +++ b/App.vue @@ -0,0 +1,24 @@ + + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..c8f4bd2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 DCloud + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7cf99eb --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# hello-i18n + +# en + +A demo project for uni-app globalization + +This template include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API + + +# zh-hans + +uni-app 国际化演示 + +包含 uni-framework、manifest.json、pages.json、tabbar、页面、组件、API + diff --git a/api/clients/main.ts b/api/clients/main.ts new file mode 100644 index 0000000..3c849f3 --- /dev/null +++ b/api/clients/main.ts @@ -0,0 +1,7 @@ +// api/clients/main.ts +import { createRequestClient } from '../request'; +import { SERVICE_MAP } from '../config'; + +export const mainClient = createRequestClient({ + baseURL: SERVICE_MAP.MAIN, +}); diff --git a/api/clients/payment.ts b/api/clients/payment.ts new file mode 100644 index 0000000..56743ec --- /dev/null +++ b/api/clients/payment.ts @@ -0,0 +1,11 @@ +// api/clients/payment.ts +/** + * 支付专用接口实例 + */ +import { createRequestClient } from '../request'; +import { SERVICE_MAP } from '../config'; + +export const paymentClient = createRequestClient({ + baseURL: SERVICE_MAP.PAYMENT, +}); + diff --git a/api/config.ts b/api/config.ts new file mode 100644 index 0000000..2bf9ece --- /dev/null +++ b/api/config.ts @@ -0,0 +1,28 @@ +// api/config.ts +export const ENV = process.env.NODE_ENV || 'development'; + +/** + * 开发/生产的 base url 组织成 SERVICE_MAP。 + * 根据实际域名替换下面的地址。 + */ +const BASE_URL_MAP = { + development: { + MAIN: 'http://192.168.110.100:9300/pb/', + // PAYMENT: 'https://dev-pay.example.com', // 暂时用不到 + // CDN: 'https://cdn-dev.example.com', // 暂时用不到 + }, + production: { + MAIN: 'https://global.nuttyreading.com/', + // PAYMENT: 'https://pay.example.com', // 暂时用不到 + // CDN: 'https://cdn.example.com', // 暂时用不到 + }, +} as const; + +export const APP_INFO = { + TYPE: 'abroad', // APP 名称 + VERSION_CODE: '1.0.0', // APP 版本号,可能升级的时候会用,这里需要再确定? +} + +export const REQUEST_TIMEOUT = 15000; + +export const SERVICE_MAP = (BASE_URL_MAP as any)[ENV] ?? BASE_URL_MAP.development; diff --git a/api/interceptors/request.ts b/api/interceptors/request.ts new file mode 100644 index 0000000..0492791 --- /dev/null +++ b/api/interceptors/request.ts @@ -0,0 +1,32 @@ +// 片段示例 - requestInterceptor 更稳健的写法 +import type { IRequestOptions } from '../types' +import { useUserStore } from '@/stores/user' +import { APP_INFO } from '@/api/config' + +export function requestInterceptor(options: IRequestOptions): IRequestOptions { + const headers = { ...(options.headers || {}) } + + // 更明确地调用 useUserStore + let token = '' + try { + const userStore = typeof useUserStore === 'function' ? useUserStore() : null + token = userStore?.token || uni.getStorageSync('token') || '' + } catch (e) { + token = uni.getStorageSync('token') || '' + } + + if (token) headers.token = token + + // Content-Type:只有在没有 files 时才默认为 application/json + if (!options.files && !headers['Content-Type']) { + headers['Content-Type'] = 'application/json;charset=UTF-8' + } + + headers['appType'] = APP_INFO.TYPE + headers['version_code'] = APP_INFO.VERSION_CODE || '1.0.0' + + return { + ...options, + header: headers, + } +} diff --git a/api/interceptors/response.ts b/api/interceptors/response.ts new file mode 100644 index 0000000..65d1b30 --- /dev/null +++ b/api/interceptors/response.ts @@ -0,0 +1,78 @@ +// api/interceptors/response.ts +import type { IApiResponse } from '../types'; + +/** + * 响应拦截器:严格兼容原项目返回约定 + * + * 原项目要点回顾: + * - 当 response.statusCode == 200 且 (body.success === true || body.code == 0) 时判定为成功; + * - 部分错误码("401", 1000,1001,1100,402 等)表示需要重新登录/清除状态并跳转; + * - 错误时会返回 Promise.reject({ statusCode: 0, errMsg: ... , data: body }) + * + */ + +function handleAuthExpired() { + // 清空本地登录信息(保持与原项目一致) + try { + uni.removeStorageSync('userInfo'); + } catch (e) {} + // 跳转 login,与原项目保持一致的路径 + // 在小程序/APP/H5 情况下原项目分别做了适配,简单通用处理如下: + uni.showToast({ title: '登录失效,请重新登录', icon: 'none' }); + setTimeout(() => { + uni.navigateTo({ url: '/pages/login/login' }); + }, 600); +} + +export function responseInterceptor(res: UniApp.RequestSuccessCallbackResult) { + // 先处理非 200 的 http 状态 + if (res.statusCode && res.statusCode !== 200) { + const msg = `网络错误(${res.statusCode})`; + uni.showToast({ title: msg, icon: 'none' }); + return Promise.reject({ statusCode: res.statusCode, errMsg: msg, response: res }); + } + + // 可能为字符串,尝试解析(原项目也做了类似处理) + let httpData: IApiResponse | string = res.data as any; + if (typeof httpData === 'string') { + try { + httpData = JSON.parse(httpData); + } catch (e) { + // 无法解析仍然返回原始 body + } + } + + // 规范化 message 字段 + const message = (httpData as any).msg || (httpData as any).message || (httpData as any).errMsg || ''; + + // 成功判断:与原项目一致的条件 + const successFlag = (httpData as any).success === true || (httpData as any).code === 0; + + if (successFlag) { + // 返回原始 httpData(与原项目 dataFactory 返回 Promise.resolve(httpData) 保持一致) + // 但大多数调用者更关心 data 字段,这里返回整个 httpData,调用者可取 .data + return Promise.resolve(httpData); + } + + // 登录失效或需要强制登录的一些 code(与原项目一致) + const code = (httpData as any).code; + if (code === '401' || code === 401) { + // 触发登出流程 + handleAuthExpired(); + return Promise.reject({ statusCode: 0, errMsg: '登录失效', data: httpData }); + } + + // 原项目还将 1000,1001,1100,402 等视作需要强制登录 + if (code === '1000' || code === '1001' || code === 1000 || code === 1001 || code === 1100 || code === '402' || code === 402) { + handleAuthExpired(); + return Promise.reject({ statusCode: 0, errMsg: message || '请登录', data: httpData }); + } + + // 其他后端业务错误:toast 并 reject + const errMsg = message || '请求异常'; + if (errMsg) { + uni.showToast({ title: errMsg, icon: 'none' }); + } + + return Promise.reject({ statusCode: 0, errMsg, data: httpData }); +} diff --git a/api/modules/auth.ts b/api/modules/auth.ts new file mode 100644 index 0000000..d10c8ff --- /dev/null +++ b/api/modules/auth.ts @@ -0,0 +1,49 @@ +// api/modules/auth.ts +import { mainClient } from '@/api/clients/main' +import type { IApiResponse } from '@/api/types' +import type { IUserInfo, ILoginResponse } from '@/types/user' + +/** + * 验证码登录/注册 + * @param tel 邮箱地址 + * @param code 验证码 + */ +export async function loginWithCode(tel: string, code: string) { + const res = await mainClient.request>({ + url: 'book/user/registerOrLogin', + method: 'GET', + data: { tel, code } + }) + return res +} + +/** + * 密码登录 + * @param phone 邮箱地址 + * @param password 密码 + */ +export async function loginWithPassword(phone: string, password: string) { + const res = await mainClient.request>({ + url: 'book/user/login', + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + data: { phone, password } + }) + return res +} + +/** + * 重置密码 + * @param phone 邮箱地址 + * @param code 验证码 + * @param password 新密码 + */ +export async function resetPassword(phone: string, code: string, password: string) { + const res = await mainClient.request({ + url: 'book/user/setPassword', + method: 'POST', + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + data: { phone, code, password } + }) + return res.data +} diff --git a/api/modules/common.ts b/api/modules/common.ts new file mode 100644 index 0000000..ff6d05a --- /dev/null +++ b/api/modules/common.ts @@ -0,0 +1,31 @@ +// api/modules/common.ts +import { mainClient } from '@/api/clients/main' +import type { IApiResponse } from '@/api/types' +import type { IAgreement } from '@/types/user' + +export const commonApi = { + /** + * 发送邮箱验证码 + * @param email 邮箱地址 + */ + sendMailCaptcha: async (email: string) => { + const res = await mainClient.request({ + url: 'common/user/getMailCaptcha', + method: 'GET', + data: { email } + }) + return res.data + }, + /** + * 获取协议内容 + * @param id 协议 ID (111: 用户协议, 112: 隐私政策) + */ + getAgreement: async (id: number) => { + const res = await mainClient.request>({ + url: 'sys/agreement/getAgreement', + method: 'POST', + data: { id } + }) + return res.agreement + } +} diff --git a/api/request.ts b/api/request.ts new file mode 100644 index 0000000..f04261d --- /dev/null +++ b/api/request.ts @@ -0,0 +1,45 @@ +// api/request.ts +import { requestInterceptor } from './interceptors/request'; +import { responseInterceptor } from './interceptors/response'; +import type { IRequestOptions, ICreateClientConfig } from './types'; +import { REQUEST_TIMEOUT } from './config'; + +export function createRequestClient(cfg: ICreateClientConfig) { + const baseURL = cfg.baseURL; + const timeout = cfg.timeout ?? REQUEST_TIMEOUT; + + async function request(options: IRequestOptions): Promise { + // 组装 final options + const final: UniApp.RequestOptions = { + ...options, + url: (options.url || '').startsWith('http') ? options.url : `${baseURL}${options.url}`, + timeout, + header: options.header || {}, + }; + + // run request interceptor to mutate headers, etc. + const intercepted = requestInterceptor(final as IRequestOptions); + + return new Promise((resolve, reject) => { + uni.request({ + ...intercepted, + success(res: any) { + // delegate to response interceptor + responseInterceptor(res) + .then((r) => { + resolve(r as any); + }) + .catch((err) => { + reject(err); + }); + }, + fail(err: any) { + uni.showToast({ title: '网络连接失败', icon: 'none' }); + reject(err); + }, + } as any); + }); + } + + return { request }; +} diff --git a/api/types.d.ts b/api/types.d.ts new file mode 100644 index 0000000..7e42f1d --- /dev/null +++ b/api/types.d.ts @@ -0,0 +1,25 @@ +// api/types.d.ts +export interface IApiResponse { + /** 有些后端使用 code 字段,有些使用 success 字段 */ + code?: number | string; + success?: boolean; + data?: T; + msg?: string; + message?: string; + errMsg?: string; + [k: string]: any; +} + +/** + * createRequestClient 返回的 request 函数签名 + */ +export interface IRequestOptions extends UniApp.RequestOptions { + // 允许扩展额外字段(例如 FILE 上传专用等) + maxSize?: number; + files?: Array<{ name: string; uri: string; fileType?: string }>; +} + +export interface ICreateClientConfig { + baseURL: string; + timeout?: number; +} diff --git a/auto-imports.d.ts b/auto-imports.d.ts new file mode 100644 index 0000000..e005c33 --- /dev/null +++ b/auto-imports.d.ts @@ -0,0 +1,72 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// noinspection JSUnusedGlobalSymbols +// Generated by unplugin-auto-import +// biome-ignore lint: disable +export {} +declare global { + const EffectScope: typeof import('vue')['EffectScope'] + const computed: typeof import('vue')['computed'] + const createApp: typeof import('vue')['createApp'] + const customRef: typeof import('vue')['customRef'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] + const defineComponent: typeof import('vue')['defineComponent'] + const effectScope: typeof import('vue')['effectScope'] + const getCurrentInstance: typeof import('vue')['getCurrentInstance'] + const getCurrentScope: typeof import('vue')['getCurrentScope'] + const h: typeof import('vue')['h'] + const inject: typeof import('vue')['inject'] + const isProxy: typeof import('vue')['isProxy'] + const isReactive: typeof import('vue')['isReactive'] + const isReadonly: typeof import('vue')['isReadonly'] + const isRef: typeof import('vue')['isRef'] + const markRaw: typeof import('vue')['markRaw'] + const nextTick: typeof import('vue')['nextTick'] + const onActivated: typeof import('vue')['onActivated'] + const onBeforeMount: typeof import('vue')['onBeforeMount'] + const onBeforeUnmount: typeof import('vue')['onBeforeUnmount'] + const onBeforeUpdate: typeof import('vue')['onBeforeUpdate'] + const onDeactivated: typeof import('vue')['onDeactivated'] + const onErrorCaptured: typeof import('vue')['onErrorCaptured'] + const onMounted: typeof import('vue')['onMounted'] + const onRenderTracked: typeof import('vue')['onRenderTracked'] + const onRenderTriggered: typeof import('vue')['onRenderTriggered'] + const onScopeDispose: typeof import('vue')['onScopeDispose'] + const onServerPrefetch: typeof import('vue')['onServerPrefetch'] + const onUnmounted: typeof import('vue')['onUnmounted'] + const onUpdated: typeof import('vue')['onUpdated'] + const onWatcherCleanup: typeof import('vue')['onWatcherCleanup'] + const provide: typeof import('vue')['provide'] + const reactive: typeof import('vue')['reactive'] + const readonly: typeof import('vue')['readonly'] + const ref: typeof import('vue')['ref'] + const resolveComponent: typeof import('vue')['resolveComponent'] + const shallowReactive: typeof import('vue')['shallowReactive'] + const shallowReadonly: typeof import('vue')['shallowReadonly'] + const shallowRef: typeof import('vue')['shallowRef'] + const toRaw: typeof import('vue')['toRaw'] + const toRef: typeof import('vue')['toRef'] + const toRefs: typeof import('vue')['toRefs'] + const toValue: typeof import('vue')['toValue'] + const triggerRef: typeof import('vue')['triggerRef'] + const unref: typeof import('vue')['unref'] + const useAttrs: typeof import('vue')['useAttrs'] + const useCssModule: typeof import('vue')['useCssModule'] + const useCssVars: typeof import('vue')['useCssVars'] + const useI18n: typeof import('vue-i18n')['useI18n'] + const useId: typeof import('vue')['useId'] + const useModel: typeof import('vue')['useModel'] + const useSlots: typeof import('vue')['useSlots'] + const useTemplateRef: typeof import('vue')['useTemplateRef'] + const watch: typeof import('vue')['watch'] + const watchEffect: typeof import('vue')['watchEffect'] + const watchPostEffect: typeof import('vue')['watchPostEffect'] + const watchSyncEffect: typeof import('vue')['watchSyncEffect'] +} +// for type re-export +declare global { + // @ts-ignore + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' + import('vue') +} diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..511b6bb --- /dev/null +++ b/changelog.md @@ -0,0 +1,10 @@ +## 1.0.3(2025-06-26) +- index.html 模板中的 lang="en" 改成 lang="zh-CN" +## 1.0.2(2022-06-30) +- 新增 支持 ios 安全区 +## 1.0.1(2021-11-26) +- 新增 schema 国际化 (HBuilderX 3.3+) +- 修复 非 Android 平台切换语音无法实时变化的问题 +- 修复 设置某些语言下无法生效的问题 (HBuilderX 3.3+) +## 1.0.0(2021-10-20) +- 初始化 \ No newline at end of file diff --git a/hooks/usePageAuth.ts b/hooks/usePageAuth.ts new file mode 100644 index 0000000..7a27b3a --- /dev/null +++ b/hooks/usePageAuth.ts @@ -0,0 +1,16 @@ +// hooks/usePageAuth.ts +import { onShow } from '@dcloudio/uni-app' +import { useUserStore } from '@/stores/user' + +export function usePageAuth(redirect = '/pages/login/login') { + const store = useUserStore() + + onShow(() => { + if (!store.token) { + uni.showToast({ title: '请先登录', icon: 'none' }) + setTimeout(() => { + uni.reLaunch({ url: redirect }) + }, 800) + } + }) +} diff --git a/hooks/useRequest.ts b/hooks/useRequest.ts new file mode 100644 index 0000000..b322360 --- /dev/null +++ b/hooks/useRequest.ts @@ -0,0 +1,35 @@ +// hooks/useRequest.ts +import { ref } from 'vue' + +interface IUseRequestOptions { + immediate?: boolean + initialData?: T +} + +export function useRequest( + func: () => Promise, + options: IUseRequestOptions = { immediate: false }, +) { + const loading = ref(false) + const error = ref(null) + const data = ref(options.initialData) + + const run = async () => { + loading.value = true + error.value = null + try { + const res = await func() + data.value = res + return res + } catch (err) { + error.value = err + throw err + } finally { + loading.value = false + } + } + + options.immediate && run() + + return { loading, error, data, run } +} diff --git a/hooks/useUpload.ts b/hooks/useUpload.ts new file mode 100644 index 0000000..2308481 --- /dev/null +++ b/hooks/useUpload.ts @@ -0,0 +1,41 @@ +// hooks/useUpload.ts +import { ref } from 'vue' +import { getAuthToken } from '@/utils/auth' + +export function useUpload(uploadUrl: string) { + const progress = ref(0) + const uploading = ref(false) + + const upload = (filePath: string) => { + uploading.value = true + return new Promise((resolve, reject) => { + const uploadTask = uni.uploadFile({ + url: uploadUrl, + filePath, + name: 'file', + header: { + Authorization: `Bearer ${getAuthToken()}`, + }, + success: (res) => { + try { + const data = JSON.parse(res.data) + if (data.code === 200) resolve(data.data) + else reject(data) + } catch (e) { + reject(e) + } + }, + fail: reject, + complete: () => { + uploading.value = false + }, + }) + + uploadTask.onProgressUpdate((res) => { + progress.value = res.progress + }) + }) + } + + return { progress, uploading, upload } +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..91136bd --- /dev/null +++ b/index.html @@ -0,0 +1,20 @@ + + + + + + + + + + +
+ + + diff --git a/locale/en.json b/locale/en.json new file mode 100644 index 0000000..d610f45 --- /dev/null +++ b/locale/en.json @@ -0,0 +1,77 @@ +{ + "locale": { + "auto": "System", + "en": "English", + "zh-hans": "简体中文" + }, + "global": { + "ok": "OK", + "cancel": "Cancel", + "close": "Close", + "confirm": "Confirm", + "loading": "Loading", + "tips": "Tips" + }, + "tabar.course": "COURSE", + "tabar.book": "EBOOK", + "tabar.user": "My", + "index": { + "title": "Taimed International", + "schema": "Schema", + "demo": "uni-app globalization", + "demo-description": "Include uni-framework, manifest.json, pages.json, tabbar, Page, Component, API, Schema", + "detail": "Detail", + "language": "Language", + "language-info": "Settings", + "system-language": "System language", + "application-language": "Application language", + "language-change-confirm": "Applying this setting will restart the app" + }, + "api": { + "message": "Message" + }, + "schema": { + "name": "Name", + "add": "Add", + "add-success": "Add success" + }, + "login": { + "title": "Hello! Welcome to Taimed International", + "codeLogin": "Verification Code Login/Registration", + "passwordLogin": "Password Login", + "email": "email", + "emailPlaceholder": "please enter your email address", + "emailError": "please enter a valid email address", + "code": "verification code", + "codePlaceholder": "please enter the verification code", + "sendCodeSuccess": "Verification code sent successfully", + "password": "password", + "passwordPlaceholder": "please input a password", + "getCode": "Get Code", + "agree": "I have agreed", + "userAgreement": "User Agreement", + "privacyPolicy": "Privacy Policy", + "goLogin": "Go Login", + "switchToPassword": "Password Login", + "switchToCode": "Verification Code Login", + "forgotPassword": "forgot password?", + "noLogin": "No login experience", + "agreeFirst": "Please agree to the User Agreement and Privacy Policy first", + "loginSuccess": "success", + "loginFailed": "failed" + }, + "forget": { + "title": "Forgot Password", + "password": "password", + "passwordPlaceholder": "enter your password", + "passwordAgain": "password again", + "passwordAgainPlaceholder": "enter your password again", + "passwordNotMatch": "Passwords do not match", + "submit": "Submit", + "getCode": "Get Code", + "passwordStrengthStrong": "Strong password strength.", + "passwordStrengthMedium": "Medium password strength.", + "passwordStrengthWeak": "please use a password consisting of at least two types: uppercase and lowercase letters, numbers, and symbols, with a length of 8 characters.", + "passwordChanged": "Password changed successfully" + } +} diff --git a/locale/index.js b/locale/index.js new file mode 100644 index 0000000..81e8ff2 --- /dev/null +++ b/locale/index.js @@ -0,0 +1,8 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +// import zhHant from './zh-Hant.json' +// import ja from './ja.json' +export default { + en, + 'zh-Hans': zhHans +} diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json new file mode 100644 index 0000000..a706a62 --- /dev/null +++ b/locale/zh-Hans.json @@ -0,0 +1,78 @@ +{ + "locale": { + "auto": "系统", + "en": "English", + "zh-hans": "简体中文" + }, + "global": { + "ok": "确定", + "cancel": "取消", + "close": "关闭", + "confirm": "确认", + "loading": "加载中", + "tips": "提示" + }, + "tabar.course": "课程", + "tabar.book": "图书", + "tabar.user": "我的", + "index": { + "title": "太湖国际", + "schema": "Schema", + "demo": "uni-app 国际化演示", + "demo-description": "包含 uni-framework、manifest.json、pages.json、tabbar、页面、组件、API、Schema", + "detail": "详情", + "language": "语言", + "language-info": "语言信息", + "system-language": "系统语言", + "application-language": "应用语言", + "language-change-confirm": "应用此设置将重启App" + }, + "api": { + "message": "提示" + }, + "schema": { + "name": "姓名", + "add": "新增", + "add-success": "新增成功" + }, + "login": { + "title": "你好!欢迎来到 太湖国际", + "codeLogin": "验证码登录/注册", + "passwordLogin": "密码登录", + "email": "邮箱", + "emailPlaceholder": "请输入您的邮箱地址", + "emailError": "请输入正确的邮箱地址", + "code": "验证码", + "codePlaceholder": "请输入验证码", + "sendCodeSuccess": "验证码发送成功", + "password": "密码", + "passwordPlaceholder": "请输入密码", + "getCode": "获取验证码", + "agree": "我已同意", + "userAgreement": "用户协议", + "privacyPolicy": "隐私政策", + "goLogin": "登录", + "switchToPassword": "密码登录", + "switchToCode": "验证码登录", + "forgotPassword": "忘记密码?", + "noLogin": "游客体验", + "agreeFirst": "请先同意用户协议和隐私政策", + "loginSuccess": "登录成功", + "loginFailed": "登录失败" + }, + "forget": { + "title": "忘记密码", + "email": "邮箱", + "password": "密码", + "passwordPlaceholder": "请输入密码", + "passwordAgain": "再次输入密码", + "passwordAgainPlaceholder": "请再次输入密码", + "passwordNotMatch": "两次密码不一致", + "submit": "提交", + "getCode": "获取验证码", + "passwordStrengthStrong": "密码强度强", + "passwordStrengthMedium": "密码强度中等", + "passwordStrengthWeak": "请使用至少包含大小写字母、数字、符号中的两种类型,长度为8个字符的密码", + "passwordChanged": "密码修改成功" + } +} diff --git a/main.js b/main.js new file mode 100644 index 0000000..a563d93 --- /dev/null +++ b/main.js @@ -0,0 +1,38 @@ +import App from './App' +import messages from './locale/index' +import '@/uni.scss'; + +let i18nConfig = { + locale: uni.getLocale(), + messages +} + +// #ifndef VUE3 +import Vue from 'vue' +import VueI18n from 'vue-i18n'' +Vue.use(VueI18n) +export i18n = new VueI18n(i18nConfig) +Vue.config.productionTip = false +App.mpType = 'app' +const app = new Vue({ + i18n, + ...App +}) +app.$mount() +// #endif + +// #ifdef VUE3 +import { createSSRApp } from 'vue' +import { createI18n } from 'vue-i18n' +import { createPinia } from 'pinia' +export const i18n = createI18n(i18nConfig) +export function createApp() { + const app = createSSRApp(App) + const pinia = createPinia() + app.use(pinia) + app.use(i18n) + return { + app + } +} +// #endif diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..a9f429b --- /dev/null +++ b/manifest.json @@ -0,0 +1,72 @@ +{ + "name" : "EducationApp2", + "appid" : "__UNI__1250B39", + "description" : "", + "versionName" : "1.0.1", + "versionCode" : "100", + "transformPx" : false, + /* 5+App特有相关 */ + "app-plus" : { + "usingComponents" : true, + "nvueStyleCompiler" : "uni-app", + "compilerVersion" : 3, + "splashscreen" : { + "alwaysShowBeforeRender" : true, + "waiting" : true, + "autoclose" : true, + "delay" : 0 + }, + /* 模块配置 */ + "modules" : {}, + /* 应用发布信息 */ + "distribute" : { + /* android打包配置 */ + "android" : { + "permissions" : [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + /* ios打包配置 */ + "ios" : {}, + /* SDK配置 */ + "sdkConfigs" : {} + } + }, + /* 快应用特有相关 */ + "quickapp" : {}, + /* 小程序特有相关 */ + "mp-weixin" : { + "appid" : "", + "setting" : { + "urlCheck" : false + }, + "usingComponents" : true + }, + "mp-alipay" : { + "usingComponents" : true + }, + "mp-baidu" : { + "usingComponents" : true + }, + "mp-toutiao" : { + "usingComponents" : true + }, + "uniStatistics" : { + "enable" : false + }, + "vueVersion" : "3" +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9d7b1df --- /dev/null +++ b/package.json @@ -0,0 +1,107 @@ +{ + "id": "uni-taimed-international-app", + "name": "TaimedInternationalApp", + "displayName": "太湖国际", + "version": "1.0.3", + "description": "太湖国际", + "keywords": [ + "太湖国际", + "中医学 国学 心理学" + ], + "scripts": { + "tailwind-dev": "npx @tailwindcss/cli -i ./tailwind-input.css -o ./static/tailwind.css --watch", + "tailwind-build": "npx @tailwindcss/cli -i ./tailwind-input.css -o ./static/tailwind.css" + }, + "dcloudext": { + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "无", + "data": "无", + "permissions": "无" + }, + "npmurl": "", + "type": "uniapp-template-project", + "darkmode": "x", + "i18n": "√", + "widescreen": "x" + }, + "repository": "", + "uni_modules": { + "platforms": { + "cloud": { + "tcb": "√", + "aliyun": "√", + "alipay": "x" + }, + "client": { + "uni-app": { + "vue": { + "vue2": "√", + "vue3": "√" + }, + "web": { + "safari": "√", + "chrome": "√" + }, + "app": { + "vue": "√", + "nvue": "-", + "android": "√", + "ios": "√", + "harmony": "-" + }, + "mp": { + "weixin": "√", + "alipay": "-", + "toutiao": "-", + "baidu": "-", + "kuaishou": "-", + "jd": "-", + "harmony": "-", + "qq": "-", + "lark": "-" + }, + "quickapp": { + "huawei": "-", + "union": "-" + } + }, + "uni-app-x": { + "web": { + "safari": "-", + "chrome": "-" + }, + "app": { + "android": "-", + "ios": "-", + "harmony": "-" + }, + "mp": { + "weixin": "-" + } + } + } + } + }, + "engines": { + "HBuilderX": "^3.1.0", + "uni-app": "^4.03", + "uni-app-x": "" + }, + "devDependencies": { + "tailwindcss": "^4.1.16" + }, + "dependencies": { + "@tailwindcss/cli": "^4.1.16" + } +} diff --git a/pages.json b/pages.json new file mode 100644 index 0000000..a4155de --- /dev/null +++ b/pages.json @@ -0,0 +1,78 @@ +{ + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/index/index", + "style": { + "navigationBarTitleText": "%index.title%" + } + }, { + "path": "pages/component/component", + "style": { + "navigationBarTitleText": "%index.component%", + "enablePullDownRefresh": false + } + }, { + "path": "pages/login/login", + "style": { + "navigationBarTitleText": "Login", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black" + } + }, { + "path": "pages/login/forget", + "style": { + "navigationBarTitleText": "Forgot Password", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black" + } + } + ], + // "tabBar": { + // "color": "#7A7E83", + // "selectedColor": "#007AFF", + // "borderStyle": "black", + // "backgroundColor": "#F8F8F8", + // "list": [{ + // "pagePath": "pages/index/index", + // "text": "%index.home%" + // }, + // { + // "pagePath": "pages/component/component", + // "text": "%index.component%" + // } + // ] + // }, + "tabBar": { + "color": "#444444", + "selectedColor": "#079307", + "borderStyle": "black", + "backgroundColor": "#ffffff", + "list": [ + { + "pagePath": "pages/index/index", + "iconPath": "static/tab/icon1_n.png", + "selectedIconPath": "static/tab/icon1_y.png", + "text": "%tabar.course%" + }, + { + "pagePath": "pages/book/index", + "iconPath": "static/tab/icon3_n.png", + "selectedIconPath": "static/tab/icon3_y.png", + "text": "%tabar.book%" + }, + { + "pagePath": "pages/my/my", + "iconPath": "static/tab/icon4_n.png", + "selectedIconPath": "static/tab/icon4_y.png", + "text": "%tabar.user%" + } + ] + }, + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "疯子读书", + "navigationBarBackgroundColor": "#FFFFFF", + "backgroundColor": "#FFFFFF", + "navigationStyle": "custom" + } +} diff --git a/pages/component/component.vue b/pages/component/component.vue new file mode 100644 index 0000000..151b350 --- /dev/null +++ b/pages/component/component.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue new file mode 100644 index 0000000..3227bfe --- /dev/null +++ b/pages/index/index.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/pages/login/README.md b/pages/login/README.md new file mode 100644 index 0000000..cf00687 --- /dev/null +++ b/pages/login/README.md @@ -0,0 +1,163 @@ +# 登录功能说明 + +## 功能概述 + +本模块实现了从 nuttyreading-hw2 项目迁移的完整登录功能,包括: + +- ✅ 验证码登录/注册 +- ✅ 密码登录 +- ✅ 忘记密码 +- ✅ 用户协议和隐私政策 +- ✅ 游客体验入口 + +## 技术栈 + +- Vue3 Composition API +- TypeScript +- Pinia (状态管理) +- WotUI (UI 组件库) +- Tailwind CSS + SCSS +- UniApp + +## 文件结构 + +``` +pages/user/ +├── login.vue # 登录页面 +└── forget.vue # 忘记密码页面 + +api/modules/ +├── auth.ts # 认证相关 API +└── common.ts # 通用 API + +stores/ +└── user.ts # 用户状态管理 + +types/ +└── user.ts # 用户相关类型定义 + +utils/ +└── validator.ts # 表单验证工具 +``` + +## API 接口 + +### 登录相关 + +1. **验证码登录/注册** + - 接口:`GET book/user/registerOrLogin` + - 参数:`{ tel: string, code: string }` + +2. **密码登录** + - 接口:`POST book/user/login` + - 参数:`{ phone: string, password: string }` + +3. **重置密码** + - 接口:`POST book/user/setPassword` + - 参数:`{ phone: string, code: string, password: string }` + +### 通用接口 + +1. **发送邮箱验证码** + - 接口:`GET common/user/getMailCaptcha` + - 参数:`{ email: string }` + +2. **获取协议内容** + - 接口:`GET common/agreement/detail` + - 参数:`{ id: number }` (111: 用户协议, 112: 隐私政策) + +## 使用说明 + +### 1. 登录页面 + +访问路径:`/pages/user/login` + +**验证码登录**: +1. 输入邮箱地址 +2. 点击"Get Code"获取验证码 +3. 输入收到的验证码 +4. 勾选用户协议 +5. 点击"Go Login"登录 + +**密码登录**: +1. 点击"Password Login"切换到密码登录 +2. 输入邮箱地址和密码 +3. 勾选用户协议 +4. 点击"Go Login"登录 + +### 2. 忘记密码 + +访问路径:`/pages/user/forget` + +1. 输入邮箱地址 +2. 点击"Get Code"获取验证码 +3. 输入验证码 +4. 输入新密码(需满足强度要求) +5. 再次输入新密码确认 +6. 点击"Submit"提交 + +### 3. 密码强度要求 + +- **强密码**:8位以上,包含大小写字母、数字和特殊字符 +- **中等密码**:8位以上,包含大小写字母、数字、特殊字符中的两项 +- **弱密码**:8位以上 +- **最低要求**:6-20位,必须包含字母和数字 + +## 状态管理 + +使用 Pinia 管理用户状态: + +```typescript +import { useUserStore } from '@/stores/user' + +const userStore = useUserStore() + +// 登录成功后设置用户信息 +userStore.setUserInfo(userInfo) + +// 检查登录状态 +if (userStore.isLoggedIn) { + // 已登录 +} + +// 登出 +userStore.logout() +``` + +## 国际化 + +支持中英文切换,翻译文件位于: +- `locale/en.json` - 英文 +- `locale/zh-Hans.json` - 简体中文 + +## 注意事项 + +1. **API 地址**:已配置为 `https://global.nuttyreading.com/` +2. **请求头**:自动添加 `token`、`appType: 'abroad'`、`version_code` +3. **Token 失效**:自动处理 401 错误,清除用户信息并跳转登录页 +4. **验证码倒计时**:60秒,防止重复发送 +5. **协议同意**:登录和获取验证码前必须同意用户协议和隐私政策 + +## 测试建议 + +1. 测试验证码登录流程 +2. 测试密码登录流程 +3. 测试忘记密码流程 +4. 测试登录方式切换 +5. 测试表单验证 +6. 测试协议弹窗 +7. 测试多平台兼容性(H5、小程序、APP) + +## 已知问题 + +- 游客页面 `/pages/visitor/visitor` 需要单独实现 +- 部分图标可能需要根据实际设计调整 + +## 更新日志 + +### v1.0.0 (2025-11-02) +- ✅ 完成登录功能迁移 +- ✅ 实现验证码登录和密码登录 +- ✅ 实现忘记密码功能 +- ✅ 添加用户协议和隐私政策 +- ✅ 支持中英文国际化 diff --git a/pages/login/forget.vue b/pages/login/forget.vue new file mode 100644 index 0000000..c3a6206 --- /dev/null +++ b/pages/login/forget.vue @@ -0,0 +1,364 @@ + + + + + diff --git a/pages/login/login.vue b/pages/login/login.vue new file mode 100644 index 0000000..cf20980 --- /dev/null +++ b/pages/login/login.vue @@ -0,0 +1,667 @@ + + + + + diff --git a/static/biaoqing.png b/static/biaoqing.png new file mode 100644 index 0000000..8eeec77 Binary files /dev/null and b/static/biaoqing.png differ diff --git a/static/emojis/qq/0@2x.gif b/static/emojis/qq/0@2x.gif new file mode 100644 index 0000000..280d848 Binary files /dev/null and b/static/emojis/qq/0@2x.gif differ diff --git a/static/emojis/qq/0@2x.png b/static/emojis/qq/0@2x.png new file mode 100644 index 0000000..5b506ec Binary files /dev/null and b/static/emojis/qq/0@2x.png differ diff --git a/static/emojis/qq/100@2x.gif b/static/emojis/qq/100@2x.gif new file mode 100644 index 0000000..d809261 Binary files /dev/null and b/static/emojis/qq/100@2x.gif differ diff --git a/static/emojis/qq/100@2x.png b/static/emojis/qq/100@2x.png new file mode 100644 index 0000000..5fae77b Binary files /dev/null and b/static/emojis/qq/100@2x.png differ diff --git a/static/emojis/qq/101@2x.gif b/static/emojis/qq/101@2x.gif new file mode 100644 index 0000000..63e37b7 Binary files /dev/null and b/static/emojis/qq/101@2x.gif differ diff --git a/static/emojis/qq/101@2x.png b/static/emojis/qq/101@2x.png new file mode 100644 index 0000000..7f6bdbe Binary files /dev/null and b/static/emojis/qq/101@2x.png differ diff --git a/static/emojis/qq/102@2x.gif b/static/emojis/qq/102@2x.gif new file mode 100644 index 0000000..59d0814 Binary files /dev/null and b/static/emojis/qq/102@2x.gif differ diff --git a/static/emojis/qq/102@2x.png b/static/emojis/qq/102@2x.png new file mode 100644 index 0000000..310b55d Binary files /dev/null and b/static/emojis/qq/102@2x.png differ diff --git a/static/emojis/qq/103@2x.gif b/static/emojis/qq/103@2x.gif new file mode 100644 index 0000000..f65ad8a Binary files /dev/null and b/static/emojis/qq/103@2x.gif differ diff --git a/static/emojis/qq/103@2x.png b/static/emojis/qq/103@2x.png new file mode 100644 index 0000000..e99c6dc Binary files /dev/null and b/static/emojis/qq/103@2x.png differ diff --git a/static/emojis/qq/104@2x.gif b/static/emojis/qq/104@2x.gif new file mode 100644 index 0000000..526d4f7 Binary files /dev/null and b/static/emojis/qq/104@2x.gif differ diff --git a/static/emojis/qq/104@2x.png b/static/emojis/qq/104@2x.png new file mode 100644 index 0000000..39aeb22 Binary files /dev/null and b/static/emojis/qq/104@2x.png differ diff --git a/static/emojis/qq/105@2x.gif b/static/emojis/qq/105@2x.gif new file mode 100644 index 0000000..493cae9 Binary files /dev/null and b/static/emojis/qq/105@2x.gif differ diff --git a/static/emojis/qq/105@2x.png b/static/emojis/qq/105@2x.png new file mode 100644 index 0000000..6c33b76 Binary files /dev/null and b/static/emojis/qq/105@2x.png differ diff --git a/static/emojis/qq/106@2x.gif b/static/emojis/qq/106@2x.gif new file mode 100644 index 0000000..c73c5c1 Binary files /dev/null and b/static/emojis/qq/106@2x.gif differ diff --git a/static/emojis/qq/106@2x.png b/static/emojis/qq/106@2x.png new file mode 100644 index 0000000..083d7c2 Binary files /dev/null and b/static/emojis/qq/106@2x.png differ diff --git a/static/emojis/qq/107@2x.gif b/static/emojis/qq/107@2x.gif new file mode 100644 index 0000000..627ce21 Binary files /dev/null and b/static/emojis/qq/107@2x.gif differ diff --git a/static/emojis/qq/107@2x.png b/static/emojis/qq/107@2x.png new file mode 100644 index 0000000..7909727 Binary files /dev/null and b/static/emojis/qq/107@2x.png differ diff --git a/static/emojis/qq/108@2x.gif b/static/emojis/qq/108@2x.gif new file mode 100644 index 0000000..4a94f63 Binary files /dev/null and b/static/emojis/qq/108@2x.gif differ diff --git a/static/emojis/qq/108@2x.png b/static/emojis/qq/108@2x.png new file mode 100644 index 0000000..ddbf47d Binary files /dev/null and b/static/emojis/qq/108@2x.png differ diff --git a/static/emojis/qq/109@2x.gif b/static/emojis/qq/109@2x.gif new file mode 100644 index 0000000..5ee1c51 Binary files /dev/null and b/static/emojis/qq/109@2x.gif differ diff --git a/static/emojis/qq/109@2x.png b/static/emojis/qq/109@2x.png new file mode 100644 index 0000000..88b231e Binary files /dev/null and b/static/emojis/qq/109@2x.png differ diff --git a/static/emojis/qq/10@2x.gif b/static/emojis/qq/10@2x.gif new file mode 100644 index 0000000..ed2dac2 Binary files /dev/null and b/static/emojis/qq/10@2x.gif differ diff --git a/static/emojis/qq/10@2x.png b/static/emojis/qq/10@2x.png new file mode 100644 index 0000000..738fcc9 Binary files /dev/null and b/static/emojis/qq/10@2x.png differ diff --git a/static/emojis/qq/110@2x.gif b/static/emojis/qq/110@2x.gif new file mode 100644 index 0000000..5ececcd Binary files /dev/null and b/static/emojis/qq/110@2x.gif differ diff --git a/static/emojis/qq/110@2x.png b/static/emojis/qq/110@2x.png new file mode 100644 index 0000000..2775cc1 Binary files /dev/null and b/static/emojis/qq/110@2x.png differ diff --git a/static/emojis/qq/111@2x.gif b/static/emojis/qq/111@2x.gif new file mode 100644 index 0000000..436be39 Binary files /dev/null and b/static/emojis/qq/111@2x.gif differ diff --git a/static/emojis/qq/111@2x.png b/static/emojis/qq/111@2x.png new file mode 100644 index 0000000..5673995 Binary files /dev/null and b/static/emojis/qq/111@2x.png differ diff --git a/static/emojis/qq/112@2x.gif b/static/emojis/qq/112@2x.gif new file mode 100644 index 0000000..3f94a15 Binary files /dev/null and b/static/emojis/qq/112@2x.gif differ diff --git a/static/emojis/qq/112@2x.png b/static/emojis/qq/112@2x.png new file mode 100644 index 0000000..f8f809e Binary files /dev/null and b/static/emojis/qq/112@2x.png differ diff --git a/static/emojis/qq/113@2x.gif b/static/emojis/qq/113@2x.gif new file mode 100644 index 0000000..f8e5a2a Binary files /dev/null and b/static/emojis/qq/113@2x.gif differ diff --git a/static/emojis/qq/113@2x.png b/static/emojis/qq/113@2x.png new file mode 100644 index 0000000..5c79cc7 Binary files /dev/null and b/static/emojis/qq/113@2x.png differ diff --git a/static/emojis/qq/114@2x.gif b/static/emojis/qq/114@2x.gif new file mode 100644 index 0000000..63268ee Binary files /dev/null and b/static/emojis/qq/114@2x.gif differ diff --git a/static/emojis/qq/114@2x.png b/static/emojis/qq/114@2x.png new file mode 100644 index 0000000..5bc2831 Binary files /dev/null and b/static/emojis/qq/114@2x.png differ diff --git a/static/emojis/qq/115@2x.gif b/static/emojis/qq/115@2x.gif new file mode 100644 index 0000000..4af099f Binary files /dev/null and b/static/emojis/qq/115@2x.gif differ diff --git a/static/emojis/qq/115@2x.png b/static/emojis/qq/115@2x.png new file mode 100644 index 0000000..aea7458 Binary files /dev/null and b/static/emojis/qq/115@2x.png differ diff --git a/static/emojis/qq/116@2x.gif b/static/emojis/qq/116@2x.gif new file mode 100644 index 0000000..d498bb0 Binary files /dev/null and b/static/emojis/qq/116@2x.gif differ diff --git a/static/emojis/qq/116@2x.png b/static/emojis/qq/116@2x.png new file mode 100644 index 0000000..60f7796 Binary files /dev/null and b/static/emojis/qq/116@2x.png differ diff --git a/static/emojis/qq/117@2x.gif b/static/emojis/qq/117@2x.gif new file mode 100644 index 0000000..ba69f9e Binary files /dev/null and b/static/emojis/qq/117@2x.gif differ diff --git a/static/emojis/qq/117@2x.png b/static/emojis/qq/117@2x.png new file mode 100644 index 0000000..05247f7 Binary files /dev/null and b/static/emojis/qq/117@2x.png differ diff --git a/static/emojis/qq/118@2x.gif b/static/emojis/qq/118@2x.gif new file mode 100644 index 0000000..a4aa25f Binary files /dev/null and b/static/emojis/qq/118@2x.gif differ diff --git a/static/emojis/qq/118@2x.png b/static/emojis/qq/118@2x.png new file mode 100644 index 0000000..8e42d09 Binary files /dev/null and b/static/emojis/qq/118@2x.png differ diff --git a/static/emojis/qq/119@2x.gif b/static/emojis/qq/119@2x.gif new file mode 100644 index 0000000..5beb098 Binary files /dev/null and b/static/emojis/qq/119@2x.gif differ diff --git a/static/emojis/qq/119@2x.png b/static/emojis/qq/119@2x.png new file mode 100644 index 0000000..046f933 Binary files /dev/null and b/static/emojis/qq/119@2x.png differ diff --git a/static/emojis/qq/11@2x.gif b/static/emojis/qq/11@2x.gif new file mode 100644 index 0000000..fc20d67 Binary files /dev/null and b/static/emojis/qq/11@2x.gif differ diff --git a/static/emojis/qq/11@2x.png b/static/emojis/qq/11@2x.png new file mode 100644 index 0000000..b27c96c Binary files /dev/null and b/static/emojis/qq/11@2x.png differ diff --git a/static/emojis/qq/120@2x.gif b/static/emojis/qq/120@2x.gif new file mode 100644 index 0000000..a5ffd4a Binary files /dev/null and b/static/emojis/qq/120@2x.gif differ diff --git a/static/emojis/qq/120@2x.png b/static/emojis/qq/120@2x.png new file mode 100644 index 0000000..66cb877 Binary files /dev/null and b/static/emojis/qq/120@2x.png differ diff --git a/static/emojis/qq/121@2x.gif b/static/emojis/qq/121@2x.gif new file mode 100644 index 0000000..dceba27 Binary files /dev/null and b/static/emojis/qq/121@2x.gif differ diff --git a/static/emojis/qq/121@2x.png b/static/emojis/qq/121@2x.png new file mode 100644 index 0000000..20a3c8c Binary files /dev/null and b/static/emojis/qq/121@2x.png differ diff --git a/static/emojis/qq/122@2x.gif b/static/emojis/qq/122@2x.gif new file mode 100644 index 0000000..67dd43d Binary files /dev/null and b/static/emojis/qq/122@2x.gif differ diff --git a/static/emojis/qq/122@2x.png b/static/emojis/qq/122@2x.png new file mode 100644 index 0000000..0d06b9a Binary files /dev/null and b/static/emojis/qq/122@2x.png differ diff --git a/static/emojis/qq/123@2x.gif b/static/emojis/qq/123@2x.gif new file mode 100644 index 0000000..98ad6a8 Binary files /dev/null and b/static/emojis/qq/123@2x.gif differ diff --git a/static/emojis/qq/123@2x.png b/static/emojis/qq/123@2x.png new file mode 100644 index 0000000..1b8dcc4 Binary files /dev/null and b/static/emojis/qq/123@2x.png differ diff --git a/static/emojis/qq/124@2x.gif b/static/emojis/qq/124@2x.gif new file mode 100644 index 0000000..89eac0e Binary files /dev/null and b/static/emojis/qq/124@2x.gif differ diff --git a/static/emojis/qq/124@2x.png b/static/emojis/qq/124@2x.png new file mode 100644 index 0000000..0a9739e Binary files /dev/null and b/static/emojis/qq/124@2x.png differ diff --git a/static/emojis/qq/125@2x.gif b/static/emojis/qq/125@2x.gif new file mode 100644 index 0000000..bb5b30b Binary files /dev/null and b/static/emojis/qq/125@2x.gif differ diff --git a/static/emojis/qq/125@2x.png b/static/emojis/qq/125@2x.png new file mode 100644 index 0000000..bb32e39 Binary files /dev/null and b/static/emojis/qq/125@2x.png differ diff --git a/static/emojis/qq/126@2x.gif b/static/emojis/qq/126@2x.gif new file mode 100644 index 0000000..f1510cd Binary files /dev/null and b/static/emojis/qq/126@2x.gif differ diff --git a/static/emojis/qq/126@2x.png b/static/emojis/qq/126@2x.png new file mode 100644 index 0000000..67ef693 Binary files /dev/null and b/static/emojis/qq/126@2x.png differ diff --git a/static/emojis/qq/127@2x.gif b/static/emojis/qq/127@2x.gif new file mode 100644 index 0000000..d7f52e4 Binary files /dev/null and b/static/emojis/qq/127@2x.gif differ diff --git a/static/emojis/qq/127@2x.png b/static/emojis/qq/127@2x.png new file mode 100644 index 0000000..d200707 Binary files /dev/null and b/static/emojis/qq/127@2x.png differ diff --git a/static/emojis/qq/128@2x.gif b/static/emojis/qq/128@2x.gif new file mode 100644 index 0000000..398674b Binary files /dev/null and b/static/emojis/qq/128@2x.gif differ diff --git a/static/emojis/qq/128@2x.png b/static/emojis/qq/128@2x.png new file mode 100644 index 0000000..e9fe84b Binary files /dev/null and b/static/emojis/qq/128@2x.png differ diff --git a/static/emojis/qq/129@2x.gif b/static/emojis/qq/129@2x.gif new file mode 100644 index 0000000..0317eed Binary files /dev/null and b/static/emojis/qq/129@2x.gif differ diff --git a/static/emojis/qq/129@2x.png b/static/emojis/qq/129@2x.png new file mode 100644 index 0000000..adcadeb Binary files /dev/null and b/static/emojis/qq/129@2x.png differ diff --git a/static/emojis/qq/12@2x.gif b/static/emojis/qq/12@2x.gif new file mode 100644 index 0000000..f57d3f0 Binary files /dev/null and b/static/emojis/qq/12@2x.gif differ diff --git a/static/emojis/qq/12@2x.png b/static/emojis/qq/12@2x.png new file mode 100644 index 0000000..6f8859b Binary files /dev/null and b/static/emojis/qq/12@2x.png differ diff --git a/static/emojis/qq/130@2x.gif b/static/emojis/qq/130@2x.gif new file mode 100644 index 0000000..25f1ca4 Binary files /dev/null and b/static/emojis/qq/130@2x.gif differ diff --git a/static/emojis/qq/130@2x.png b/static/emojis/qq/130@2x.png new file mode 100644 index 0000000..381f5b1 Binary files /dev/null and b/static/emojis/qq/130@2x.png differ diff --git a/static/emojis/qq/131@2x.gif b/static/emojis/qq/131@2x.gif new file mode 100644 index 0000000..c53fc34 Binary files /dev/null and b/static/emojis/qq/131@2x.gif differ diff --git a/static/emojis/qq/131@2x.png b/static/emojis/qq/131@2x.png new file mode 100644 index 0000000..667431c Binary files /dev/null and b/static/emojis/qq/131@2x.png differ diff --git a/static/emojis/qq/132@2x.gif b/static/emojis/qq/132@2x.gif new file mode 100644 index 0000000..3e275a6 Binary files /dev/null and b/static/emojis/qq/132@2x.gif differ diff --git a/static/emojis/qq/132@2x.png b/static/emojis/qq/132@2x.png new file mode 100644 index 0000000..f80c18d Binary files /dev/null and b/static/emojis/qq/132@2x.png differ diff --git a/static/emojis/qq/133@2x.gif b/static/emojis/qq/133@2x.gif new file mode 100644 index 0000000..f6280ec Binary files /dev/null and b/static/emojis/qq/133@2x.gif differ diff --git a/static/emojis/qq/133@2x.png b/static/emojis/qq/133@2x.png new file mode 100644 index 0000000..5208387 Binary files /dev/null and b/static/emojis/qq/133@2x.png differ diff --git a/static/emojis/qq/134@2x.gif b/static/emojis/qq/134@2x.gif new file mode 100644 index 0000000..d91efc6 Binary files /dev/null and b/static/emojis/qq/134@2x.gif differ diff --git a/static/emojis/qq/134@2x.png b/static/emojis/qq/134@2x.png new file mode 100644 index 0000000..ae24d8d Binary files /dev/null and b/static/emojis/qq/134@2x.png differ diff --git a/static/emojis/qq/136@2x.gif b/static/emojis/qq/136@2x.gif new file mode 100644 index 0000000..d94f960 Binary files /dev/null and b/static/emojis/qq/136@2x.gif differ diff --git a/static/emojis/qq/136@2x.png b/static/emojis/qq/136@2x.png new file mode 100644 index 0000000..069783a Binary files /dev/null and b/static/emojis/qq/136@2x.png differ diff --git a/static/emojis/qq/137@2x.gif b/static/emojis/qq/137@2x.gif new file mode 100644 index 0000000..edcf9da Binary files /dev/null and b/static/emojis/qq/137@2x.gif differ diff --git a/static/emojis/qq/137@2x.png b/static/emojis/qq/137@2x.png new file mode 100644 index 0000000..ecf8771 Binary files /dev/null and b/static/emojis/qq/137@2x.png differ diff --git a/static/emojis/qq/138@2x.gif b/static/emojis/qq/138@2x.gif new file mode 100644 index 0000000..6d5e50c Binary files /dev/null and b/static/emojis/qq/138@2x.gif differ diff --git a/static/emojis/qq/138@2x.png b/static/emojis/qq/138@2x.png new file mode 100644 index 0000000..6fdf29c Binary files /dev/null and b/static/emojis/qq/138@2x.png differ diff --git a/static/emojis/qq/139@2x.gif b/static/emojis/qq/139@2x.gif new file mode 100644 index 0000000..ec94587 Binary files /dev/null and b/static/emojis/qq/139@2x.gif differ diff --git a/static/emojis/qq/139@2x.png b/static/emojis/qq/139@2x.png new file mode 100644 index 0000000..f8c5417 Binary files /dev/null and b/static/emojis/qq/139@2x.png differ diff --git a/static/emojis/qq/13@2x.gif b/static/emojis/qq/13@2x.gif new file mode 100644 index 0000000..f84ea24 Binary files /dev/null and b/static/emojis/qq/13@2x.gif differ diff --git a/static/emojis/qq/13@2x.png b/static/emojis/qq/13@2x.png new file mode 100644 index 0000000..c719265 Binary files /dev/null and b/static/emojis/qq/13@2x.png differ diff --git a/static/emojis/qq/140@2x.gif b/static/emojis/qq/140@2x.gif new file mode 100644 index 0000000..d78828e Binary files /dev/null and b/static/emojis/qq/140@2x.gif differ diff --git a/static/emojis/qq/140@2x.png b/static/emojis/qq/140@2x.png new file mode 100644 index 0000000..7405531 Binary files /dev/null and b/static/emojis/qq/140@2x.png differ diff --git a/static/emojis/qq/141@2x.gif b/static/emojis/qq/141@2x.gif new file mode 100644 index 0000000..d461ccd Binary files /dev/null and b/static/emojis/qq/141@2x.gif differ diff --git a/static/emojis/qq/141@2x.png b/static/emojis/qq/141@2x.png new file mode 100644 index 0000000..b98dda1 Binary files /dev/null and b/static/emojis/qq/141@2x.png differ diff --git a/static/emojis/qq/142@2x.gif b/static/emojis/qq/142@2x.gif new file mode 100644 index 0000000..2d6dbad Binary files /dev/null and b/static/emojis/qq/142@2x.gif differ diff --git a/static/emojis/qq/142@2x.png b/static/emojis/qq/142@2x.png new file mode 100644 index 0000000..878f9da Binary files /dev/null and b/static/emojis/qq/142@2x.png differ diff --git a/static/emojis/qq/143@2x.gif b/static/emojis/qq/143@2x.gif new file mode 100644 index 0000000..65459bd Binary files /dev/null and b/static/emojis/qq/143@2x.gif differ diff --git a/static/emojis/qq/143@2x.png b/static/emojis/qq/143@2x.png new file mode 100644 index 0000000..19fb4f9 Binary files /dev/null and b/static/emojis/qq/143@2x.png differ diff --git a/static/emojis/qq/144@2x.gif b/static/emojis/qq/144@2x.gif new file mode 100644 index 0000000..6e84245 Binary files /dev/null and b/static/emojis/qq/144@2x.gif differ diff --git a/static/emojis/qq/144@2x.png b/static/emojis/qq/144@2x.png new file mode 100644 index 0000000..22ba97d Binary files /dev/null and b/static/emojis/qq/144@2x.png differ diff --git a/static/emojis/qq/145@2x.gif b/static/emojis/qq/145@2x.gif new file mode 100644 index 0000000..cabc787 Binary files /dev/null and b/static/emojis/qq/145@2x.gif differ diff --git a/static/emojis/qq/145@2x.png b/static/emojis/qq/145@2x.png new file mode 100644 index 0000000..4ff6569 Binary files /dev/null and b/static/emojis/qq/145@2x.png differ diff --git a/static/emojis/qq/146@2x.gif b/static/emojis/qq/146@2x.gif new file mode 100644 index 0000000..3203d38 Binary files /dev/null and b/static/emojis/qq/146@2x.gif differ diff --git a/static/emojis/qq/146@2x.png b/static/emojis/qq/146@2x.png new file mode 100644 index 0000000..e5d40c2 Binary files /dev/null and b/static/emojis/qq/146@2x.png differ diff --git a/static/emojis/qq/147@2x.gif b/static/emojis/qq/147@2x.gif new file mode 100644 index 0000000..c236e5f Binary files /dev/null and b/static/emojis/qq/147@2x.gif differ diff --git a/static/emojis/qq/147@2x.png b/static/emojis/qq/147@2x.png new file mode 100644 index 0000000..5d48919 Binary files /dev/null and b/static/emojis/qq/147@2x.png differ diff --git a/static/emojis/qq/148@2x.gif b/static/emojis/qq/148@2x.gif new file mode 100644 index 0000000..3547d27 Binary files /dev/null and b/static/emojis/qq/148@2x.gif differ diff --git a/static/emojis/qq/148@2x.png b/static/emojis/qq/148@2x.png new file mode 100644 index 0000000..e56455c Binary files /dev/null and b/static/emojis/qq/148@2x.png differ diff --git a/static/emojis/qq/149@2x.gif b/static/emojis/qq/149@2x.gif new file mode 100644 index 0000000..1678284 Binary files /dev/null and b/static/emojis/qq/149@2x.gif differ diff --git a/static/emojis/qq/149@2x.png b/static/emojis/qq/149@2x.png new file mode 100644 index 0000000..eafc1b5 Binary files /dev/null and b/static/emojis/qq/149@2x.png differ diff --git a/static/emojis/qq/14@2x.gif b/static/emojis/qq/14@2x.gif new file mode 100644 index 0000000..7666fb6 Binary files /dev/null and b/static/emojis/qq/14@2x.gif differ diff --git a/static/emojis/qq/14@2x.png b/static/emojis/qq/14@2x.png new file mode 100644 index 0000000..c9bd70b Binary files /dev/null and b/static/emojis/qq/14@2x.png differ diff --git a/static/emojis/qq/150@2x.gif b/static/emojis/qq/150@2x.gif new file mode 100644 index 0000000..8e6710b Binary files /dev/null and b/static/emojis/qq/150@2x.gif differ diff --git a/static/emojis/qq/150@2x.png b/static/emojis/qq/150@2x.png new file mode 100644 index 0000000..a7e9063 Binary files /dev/null and b/static/emojis/qq/150@2x.png differ diff --git a/static/emojis/qq/151@2x.gif b/static/emojis/qq/151@2x.gif new file mode 100644 index 0000000..61f65dd Binary files /dev/null and b/static/emojis/qq/151@2x.gif differ diff --git a/static/emojis/qq/151@2x.png b/static/emojis/qq/151@2x.png new file mode 100644 index 0000000..ccd6700 Binary files /dev/null and b/static/emojis/qq/151@2x.png differ diff --git a/static/emojis/qq/152@2x.gif b/static/emojis/qq/152@2x.gif new file mode 100644 index 0000000..ec27f60 Binary files /dev/null and b/static/emojis/qq/152@2x.gif differ diff --git a/static/emojis/qq/152@2x.png b/static/emojis/qq/152@2x.png new file mode 100644 index 0000000..8dcd263 Binary files /dev/null and b/static/emojis/qq/152@2x.png differ diff --git a/static/emojis/qq/153@2x.gif b/static/emojis/qq/153@2x.gif new file mode 100644 index 0000000..23de08b Binary files /dev/null and b/static/emojis/qq/153@2x.gif differ diff --git a/static/emojis/qq/153@2x.png b/static/emojis/qq/153@2x.png new file mode 100644 index 0000000..ff1e5bf Binary files /dev/null and b/static/emojis/qq/153@2x.png differ diff --git a/static/emojis/qq/154@2x.gif b/static/emojis/qq/154@2x.gif new file mode 100644 index 0000000..132789c Binary files /dev/null and b/static/emojis/qq/154@2x.gif differ diff --git a/static/emojis/qq/154@2x.png b/static/emojis/qq/154@2x.png new file mode 100644 index 0000000..0ab7190 Binary files /dev/null and b/static/emojis/qq/154@2x.png differ diff --git a/static/emojis/qq/155@2x.gif b/static/emojis/qq/155@2x.gif new file mode 100644 index 0000000..eed6e40 Binary files /dev/null and b/static/emojis/qq/155@2x.gif differ diff --git a/static/emojis/qq/155@2x.png b/static/emojis/qq/155@2x.png new file mode 100644 index 0000000..7662feb Binary files /dev/null and b/static/emojis/qq/155@2x.png differ diff --git a/static/emojis/qq/156@2x.gif b/static/emojis/qq/156@2x.gif new file mode 100644 index 0000000..660f0a5 Binary files /dev/null and b/static/emojis/qq/156@2x.gif differ diff --git a/static/emojis/qq/156@2x.png b/static/emojis/qq/156@2x.png new file mode 100644 index 0000000..cc9e740 Binary files /dev/null and b/static/emojis/qq/156@2x.png differ diff --git a/static/emojis/qq/157@2x.gif b/static/emojis/qq/157@2x.gif new file mode 100644 index 0000000..1d0438e Binary files /dev/null and b/static/emojis/qq/157@2x.gif differ diff --git a/static/emojis/qq/157@2x.png b/static/emojis/qq/157@2x.png new file mode 100644 index 0000000..e4c777b Binary files /dev/null and b/static/emojis/qq/157@2x.png differ diff --git a/static/emojis/qq/158@2x.gif b/static/emojis/qq/158@2x.gif new file mode 100644 index 0000000..ee60e41 Binary files /dev/null and b/static/emojis/qq/158@2x.gif differ diff --git a/static/emojis/qq/158@2x.png b/static/emojis/qq/158@2x.png new file mode 100644 index 0000000..97a29d2 Binary files /dev/null and b/static/emojis/qq/158@2x.png differ diff --git a/static/emojis/qq/159@2x.gif b/static/emojis/qq/159@2x.gif new file mode 100644 index 0000000..75e7d49 Binary files /dev/null and b/static/emojis/qq/159@2x.gif differ diff --git a/static/emojis/qq/159@2x.png b/static/emojis/qq/159@2x.png new file mode 100644 index 0000000..c97c4e4 Binary files /dev/null and b/static/emojis/qq/159@2x.png differ diff --git a/static/emojis/qq/15@2x.gif b/static/emojis/qq/15@2x.gif new file mode 100644 index 0000000..79e8983 Binary files /dev/null and b/static/emojis/qq/15@2x.gif differ diff --git a/static/emojis/qq/15@2x.png b/static/emojis/qq/15@2x.png new file mode 100644 index 0000000..7699046 Binary files /dev/null and b/static/emojis/qq/15@2x.png differ diff --git a/static/emojis/qq/160@2x.gif b/static/emojis/qq/160@2x.gif new file mode 100644 index 0000000..f15b858 Binary files /dev/null and b/static/emojis/qq/160@2x.gif differ diff --git a/static/emojis/qq/160@2x.png b/static/emojis/qq/160@2x.png new file mode 100644 index 0000000..97afde1 Binary files /dev/null and b/static/emojis/qq/160@2x.png differ diff --git a/static/emojis/qq/161@2x.gif b/static/emojis/qq/161@2x.gif new file mode 100644 index 0000000..7f0d8b4 Binary files /dev/null and b/static/emojis/qq/161@2x.gif differ diff --git a/static/emojis/qq/161@2x.png b/static/emojis/qq/161@2x.png new file mode 100644 index 0000000..d113744 Binary files /dev/null and b/static/emojis/qq/161@2x.png differ diff --git a/static/emojis/qq/162@2x.gif b/static/emojis/qq/162@2x.gif new file mode 100644 index 0000000..7a16979 Binary files /dev/null and b/static/emojis/qq/162@2x.gif differ diff --git a/static/emojis/qq/162@2x.png b/static/emojis/qq/162@2x.png new file mode 100644 index 0000000..556a8ca Binary files /dev/null and b/static/emojis/qq/162@2x.png differ diff --git a/static/emojis/qq/163@2x.gif b/static/emojis/qq/163@2x.gif new file mode 100644 index 0000000..68640f6 Binary files /dev/null and b/static/emojis/qq/163@2x.gif differ diff --git a/static/emojis/qq/163@2x.png b/static/emojis/qq/163@2x.png new file mode 100644 index 0000000..d3f1746 Binary files /dev/null and b/static/emojis/qq/163@2x.png differ diff --git a/static/emojis/qq/164@2x.gif b/static/emojis/qq/164@2x.gif new file mode 100644 index 0000000..9ff3969 Binary files /dev/null and b/static/emojis/qq/164@2x.gif differ diff --git a/static/emojis/qq/164@2x.png b/static/emojis/qq/164@2x.png new file mode 100644 index 0000000..e280d0b Binary files /dev/null and b/static/emojis/qq/164@2x.png differ diff --git a/static/emojis/qq/165@2x.gif b/static/emojis/qq/165@2x.gif new file mode 100644 index 0000000..aa62536 Binary files /dev/null and b/static/emojis/qq/165@2x.gif differ diff --git a/static/emojis/qq/165@2x.png b/static/emojis/qq/165@2x.png new file mode 100644 index 0000000..7031acc Binary files /dev/null and b/static/emojis/qq/165@2x.png differ diff --git a/static/emojis/qq/166@2x.gif b/static/emojis/qq/166@2x.gif new file mode 100644 index 0000000..fc613d5 Binary files /dev/null and b/static/emojis/qq/166@2x.gif differ diff --git a/static/emojis/qq/166@2x.png b/static/emojis/qq/166@2x.png new file mode 100644 index 0000000..993d951 Binary files /dev/null and b/static/emojis/qq/166@2x.png differ diff --git a/static/emojis/qq/167@2x.gif b/static/emojis/qq/167@2x.gif new file mode 100644 index 0000000..78273e8 Binary files /dev/null and b/static/emojis/qq/167@2x.gif differ diff --git a/static/emojis/qq/167@2x.png b/static/emojis/qq/167@2x.png new file mode 100644 index 0000000..42b8b07 Binary files /dev/null and b/static/emojis/qq/167@2x.png differ diff --git a/static/emojis/qq/168@2x.gif b/static/emojis/qq/168@2x.gif new file mode 100644 index 0000000..7baca14 Binary files /dev/null and b/static/emojis/qq/168@2x.gif differ diff --git a/static/emojis/qq/168@2x.png b/static/emojis/qq/168@2x.png new file mode 100644 index 0000000..b8baa8a Binary files /dev/null and b/static/emojis/qq/168@2x.png differ diff --git a/static/emojis/qq/169@2x.gif b/static/emojis/qq/169@2x.gif new file mode 100644 index 0000000..db0495c Binary files /dev/null and b/static/emojis/qq/169@2x.gif differ diff --git a/static/emojis/qq/169@2x.png b/static/emojis/qq/169@2x.png new file mode 100644 index 0000000..7324818 Binary files /dev/null and b/static/emojis/qq/169@2x.png differ diff --git a/static/emojis/qq/16@2x.gif b/static/emojis/qq/16@2x.gif new file mode 100644 index 0000000..e9b4998 Binary files /dev/null and b/static/emojis/qq/16@2x.gif differ diff --git a/static/emojis/qq/16@2x.png b/static/emojis/qq/16@2x.png new file mode 100644 index 0000000..0d9a384 Binary files /dev/null and b/static/emojis/qq/16@2x.png differ diff --git a/static/emojis/qq/170@2x.gif b/static/emojis/qq/170@2x.gif new file mode 100644 index 0000000..b24cadd Binary files /dev/null and b/static/emojis/qq/170@2x.gif differ diff --git a/static/emojis/qq/170@2x.png b/static/emojis/qq/170@2x.png new file mode 100644 index 0000000..5e04464 Binary files /dev/null and b/static/emojis/qq/170@2x.png differ diff --git a/static/emojis/qq/171@2x.gif b/static/emojis/qq/171@2x.gif new file mode 100644 index 0000000..6554ec1 Binary files /dev/null and b/static/emojis/qq/171@2x.gif differ diff --git a/static/emojis/qq/171@2x.png b/static/emojis/qq/171@2x.png new file mode 100644 index 0000000..b31c859 Binary files /dev/null and b/static/emojis/qq/171@2x.png differ diff --git a/static/emojis/qq/172@2x.gif b/static/emojis/qq/172@2x.gif new file mode 100644 index 0000000..05f39cf Binary files /dev/null and b/static/emojis/qq/172@2x.gif differ diff --git a/static/emojis/qq/172@2x.png b/static/emojis/qq/172@2x.png new file mode 100644 index 0000000..7c5bfd5 Binary files /dev/null and b/static/emojis/qq/172@2x.png differ diff --git a/static/emojis/qq/173@2x.gif b/static/emojis/qq/173@2x.gif new file mode 100644 index 0000000..ecd4716 Binary files /dev/null and b/static/emojis/qq/173@2x.gif differ diff --git a/static/emojis/qq/173@2x.png b/static/emojis/qq/173@2x.png new file mode 100644 index 0000000..0eb8ca6 Binary files /dev/null and b/static/emojis/qq/173@2x.png differ diff --git a/static/emojis/qq/174@2x.gif b/static/emojis/qq/174@2x.gif new file mode 100644 index 0000000..a4be9ed Binary files /dev/null and b/static/emojis/qq/174@2x.gif differ diff --git a/static/emojis/qq/174@2x.png b/static/emojis/qq/174@2x.png new file mode 100644 index 0000000..9b9abd2 Binary files /dev/null and b/static/emojis/qq/174@2x.png differ diff --git a/static/emojis/qq/175@2x.gif b/static/emojis/qq/175@2x.gif new file mode 100644 index 0000000..77c2ecd Binary files /dev/null and b/static/emojis/qq/175@2x.gif differ diff --git a/static/emojis/qq/175@2x.png b/static/emojis/qq/175@2x.png new file mode 100644 index 0000000..c48208c Binary files /dev/null and b/static/emojis/qq/175@2x.png differ diff --git a/static/emojis/qq/176@2x.gif b/static/emojis/qq/176@2x.gif new file mode 100644 index 0000000..3d9411c Binary files /dev/null and b/static/emojis/qq/176@2x.gif differ diff --git a/static/emojis/qq/176@2x.png b/static/emojis/qq/176@2x.png new file mode 100644 index 0000000..4727734 Binary files /dev/null and b/static/emojis/qq/176@2x.png differ diff --git a/static/emojis/qq/177@2x.gif b/static/emojis/qq/177@2x.gif new file mode 100644 index 0000000..6f56878 Binary files /dev/null and b/static/emojis/qq/177@2x.gif differ diff --git a/static/emojis/qq/177@2x.png b/static/emojis/qq/177@2x.png new file mode 100644 index 0000000..423600c Binary files /dev/null and b/static/emojis/qq/177@2x.png differ diff --git a/static/emojis/qq/178@2x.gif b/static/emojis/qq/178@2x.gif new file mode 100644 index 0000000..6512cb5 Binary files /dev/null and b/static/emojis/qq/178@2x.gif differ diff --git a/static/emojis/qq/178@2x.png b/static/emojis/qq/178@2x.png new file mode 100644 index 0000000..c7353f0 Binary files /dev/null and b/static/emojis/qq/178@2x.png differ diff --git a/static/emojis/qq/179@2x.gif b/static/emojis/qq/179@2x.gif new file mode 100644 index 0000000..3f61e75 Binary files /dev/null and b/static/emojis/qq/179@2x.gif differ diff --git a/static/emojis/qq/179@2x.png b/static/emojis/qq/179@2x.png new file mode 100644 index 0000000..98a0046 Binary files /dev/null and b/static/emojis/qq/179@2x.png differ diff --git a/static/emojis/qq/180@2x.gif b/static/emojis/qq/180@2x.gif new file mode 100644 index 0000000..500abe8 Binary files /dev/null and b/static/emojis/qq/180@2x.gif differ diff --git a/static/emojis/qq/180@2x.png b/static/emojis/qq/180@2x.png new file mode 100644 index 0000000..81ba2b7 Binary files /dev/null and b/static/emojis/qq/180@2x.png differ diff --git a/static/emojis/qq/181@2x.gif b/static/emojis/qq/181@2x.gif new file mode 100644 index 0000000..a35f8fc Binary files /dev/null and b/static/emojis/qq/181@2x.gif differ diff --git a/static/emojis/qq/181@2x.png b/static/emojis/qq/181@2x.png new file mode 100644 index 0000000..849a36c Binary files /dev/null and b/static/emojis/qq/181@2x.png differ diff --git a/static/emojis/qq/182@2x.gif b/static/emojis/qq/182@2x.gif new file mode 100644 index 0000000..2746fb6 Binary files /dev/null and b/static/emojis/qq/182@2x.gif differ diff --git a/static/emojis/qq/182@2x.png b/static/emojis/qq/182@2x.png new file mode 100644 index 0000000..5700215 Binary files /dev/null and b/static/emojis/qq/182@2x.png differ diff --git a/static/emojis/qq/183@2x.gif b/static/emojis/qq/183@2x.gif new file mode 100644 index 0000000..0e5b7e5 Binary files /dev/null and b/static/emojis/qq/183@2x.gif differ diff --git a/static/emojis/qq/183@2x.png b/static/emojis/qq/183@2x.png new file mode 100644 index 0000000..28899fa Binary files /dev/null and b/static/emojis/qq/183@2x.png differ diff --git a/static/emojis/qq/184@2x.gif b/static/emojis/qq/184@2x.gif new file mode 100644 index 0000000..9326d1a Binary files /dev/null and b/static/emojis/qq/184@2x.gif differ diff --git a/static/emojis/qq/184@2x.png b/static/emojis/qq/184@2x.png new file mode 100644 index 0000000..1496143 Binary files /dev/null and b/static/emojis/qq/184@2x.png differ diff --git a/static/emojis/qq/185@2x.gif b/static/emojis/qq/185@2x.gif new file mode 100644 index 0000000..df47ca2 Binary files /dev/null and b/static/emojis/qq/185@2x.gif differ diff --git a/static/emojis/qq/185@2x.png b/static/emojis/qq/185@2x.png new file mode 100644 index 0000000..32a6359 Binary files /dev/null and b/static/emojis/qq/185@2x.png differ diff --git a/static/emojis/qq/186@2x.gif b/static/emojis/qq/186@2x.gif new file mode 100644 index 0000000..f17dfd2 Binary files /dev/null and b/static/emojis/qq/186@2x.gif differ diff --git a/static/emojis/qq/186@2x.png b/static/emojis/qq/186@2x.png new file mode 100644 index 0000000..7668914 Binary files /dev/null and b/static/emojis/qq/186@2x.png differ diff --git a/static/emojis/qq/187@2x.gif b/static/emojis/qq/187@2x.gif new file mode 100644 index 0000000..3719a11 Binary files /dev/null and b/static/emojis/qq/187@2x.gif differ diff --git a/static/emojis/qq/187@2x.png b/static/emojis/qq/187@2x.png new file mode 100644 index 0000000..9b23d9d Binary files /dev/null and b/static/emojis/qq/187@2x.png differ diff --git a/static/emojis/qq/188@2x.gif b/static/emojis/qq/188@2x.gif new file mode 100644 index 0000000..48626b0 Binary files /dev/null and b/static/emojis/qq/188@2x.gif differ diff --git a/static/emojis/qq/188@2x.png b/static/emojis/qq/188@2x.png new file mode 100644 index 0000000..3f22800 Binary files /dev/null and b/static/emojis/qq/188@2x.png differ diff --git a/static/emojis/qq/189@2x.gif b/static/emojis/qq/189@2x.gif new file mode 100644 index 0000000..8877a9a Binary files /dev/null and b/static/emojis/qq/189@2x.gif differ diff --git a/static/emojis/qq/189@2x.png b/static/emojis/qq/189@2x.png new file mode 100644 index 0000000..e5d9785 Binary files /dev/null and b/static/emojis/qq/189@2x.png differ diff --git a/static/emojis/qq/18@2x.gif b/static/emojis/qq/18@2x.gif new file mode 100644 index 0000000..c4d0bf1 Binary files /dev/null and b/static/emojis/qq/18@2x.gif differ diff --git a/static/emojis/qq/18@2x.png b/static/emojis/qq/18@2x.png new file mode 100644 index 0000000..d5d344d Binary files /dev/null and b/static/emojis/qq/18@2x.png differ diff --git a/static/emojis/qq/190@2x.gif b/static/emojis/qq/190@2x.gif new file mode 100644 index 0000000..7dfd66e Binary files /dev/null and b/static/emojis/qq/190@2x.gif differ diff --git a/static/emojis/qq/190@2x.png b/static/emojis/qq/190@2x.png new file mode 100644 index 0000000..bf86719 Binary files /dev/null and b/static/emojis/qq/190@2x.png differ diff --git a/static/emojis/qq/191@2x.gif b/static/emojis/qq/191@2x.gif new file mode 100644 index 0000000..82e6280 Binary files /dev/null and b/static/emojis/qq/191@2x.gif differ diff --git a/static/emojis/qq/191@2x.png b/static/emojis/qq/191@2x.png new file mode 100644 index 0000000..c68a94b Binary files /dev/null and b/static/emojis/qq/191@2x.png differ diff --git a/static/emojis/qq/192@2x.gif b/static/emojis/qq/192@2x.gif new file mode 100644 index 0000000..7f65813 Binary files /dev/null and b/static/emojis/qq/192@2x.gif differ diff --git a/static/emojis/qq/192@2x.png b/static/emojis/qq/192@2x.png new file mode 100644 index 0000000..296fc47 Binary files /dev/null and b/static/emojis/qq/192@2x.png differ diff --git a/static/emojis/qq/193@2x.gif b/static/emojis/qq/193@2x.gif new file mode 100644 index 0000000..9772db4 Binary files /dev/null and b/static/emojis/qq/193@2x.gif differ diff --git a/static/emojis/qq/193@2x.png b/static/emojis/qq/193@2x.png new file mode 100644 index 0000000..4b95bdd Binary files /dev/null and b/static/emojis/qq/193@2x.png differ diff --git a/static/emojis/qq/194@2x.gif b/static/emojis/qq/194@2x.gif new file mode 100644 index 0000000..09f02a5 Binary files /dev/null and b/static/emojis/qq/194@2x.gif differ diff --git a/static/emojis/qq/194@2x.png b/static/emojis/qq/194@2x.png new file mode 100644 index 0000000..43168db Binary files /dev/null and b/static/emojis/qq/194@2x.png differ diff --git a/static/emojis/qq/197@2x.gif b/static/emojis/qq/197@2x.gif new file mode 100644 index 0000000..7bbcc14 Binary files /dev/null and b/static/emojis/qq/197@2x.gif differ diff --git a/static/emojis/qq/197@2x.png b/static/emojis/qq/197@2x.png new file mode 100644 index 0000000..6881d0c Binary files /dev/null and b/static/emojis/qq/197@2x.png differ diff --git a/static/emojis/qq/198@2x.gif b/static/emojis/qq/198@2x.gif new file mode 100644 index 0000000..6e76fbb Binary files /dev/null and b/static/emojis/qq/198@2x.gif differ diff --git a/static/emojis/qq/198@2x.png b/static/emojis/qq/198@2x.png new file mode 100644 index 0000000..480ed56 Binary files /dev/null and b/static/emojis/qq/198@2x.png differ diff --git a/static/emojis/qq/199@2x.gif b/static/emojis/qq/199@2x.gif new file mode 100644 index 0000000..d5c704a Binary files /dev/null and b/static/emojis/qq/199@2x.gif differ diff --git a/static/emojis/qq/199@2x.png b/static/emojis/qq/199@2x.png new file mode 100644 index 0000000..7e6491d Binary files /dev/null and b/static/emojis/qq/199@2x.png differ diff --git a/static/emojis/qq/19@2x.gif b/static/emojis/qq/19@2x.gif new file mode 100644 index 0000000..c7f9315 Binary files /dev/null and b/static/emojis/qq/19@2x.gif differ diff --git a/static/emojis/qq/19@2x.png b/static/emojis/qq/19@2x.png new file mode 100644 index 0000000..4abc536 Binary files /dev/null and b/static/emojis/qq/19@2x.png differ diff --git a/static/emojis/qq/1@2x.gif b/static/emojis/qq/1@2x.gif new file mode 100644 index 0000000..fed1397 Binary files /dev/null and b/static/emojis/qq/1@2x.gif differ diff --git a/static/emojis/qq/1@2x.png b/static/emojis/qq/1@2x.png new file mode 100644 index 0000000..6145e74 Binary files /dev/null and b/static/emojis/qq/1@2x.png differ diff --git a/static/emojis/qq/200@2x.gif b/static/emojis/qq/200@2x.gif new file mode 100644 index 0000000..96618e1 Binary files /dev/null and b/static/emojis/qq/200@2x.gif differ diff --git a/static/emojis/qq/200@2x.png b/static/emojis/qq/200@2x.png new file mode 100644 index 0000000..ee4bbe0 Binary files /dev/null and b/static/emojis/qq/200@2x.png differ diff --git a/static/emojis/qq/201@2x.gif b/static/emojis/qq/201@2x.gif new file mode 100644 index 0000000..8a1bb8e Binary files /dev/null and b/static/emojis/qq/201@2x.gif differ diff --git a/static/emojis/qq/201@2x.png b/static/emojis/qq/201@2x.png new file mode 100644 index 0000000..8a6675e Binary files /dev/null and b/static/emojis/qq/201@2x.png differ diff --git a/static/emojis/qq/202@2x.gif b/static/emojis/qq/202@2x.gif new file mode 100644 index 0000000..bb2ceb1 Binary files /dev/null and b/static/emojis/qq/202@2x.gif differ diff --git a/static/emojis/qq/202@2x.png b/static/emojis/qq/202@2x.png new file mode 100644 index 0000000..b37bf78 Binary files /dev/null and b/static/emojis/qq/202@2x.png differ diff --git a/static/emojis/qq/203@2x.gif b/static/emojis/qq/203@2x.gif new file mode 100644 index 0000000..3dccece Binary files /dev/null and b/static/emojis/qq/203@2x.gif differ diff --git a/static/emojis/qq/203@2x.png b/static/emojis/qq/203@2x.png new file mode 100644 index 0000000..fb4129e Binary files /dev/null and b/static/emojis/qq/203@2x.png differ diff --git a/static/emojis/qq/204@2x.gif b/static/emojis/qq/204@2x.gif new file mode 100644 index 0000000..dfdda69 Binary files /dev/null and b/static/emojis/qq/204@2x.gif differ diff --git a/static/emojis/qq/204@2x.png b/static/emojis/qq/204@2x.png new file mode 100644 index 0000000..a969d68 Binary files /dev/null and b/static/emojis/qq/204@2x.png differ diff --git a/static/emojis/qq/205@2x.gif b/static/emojis/qq/205@2x.gif new file mode 100644 index 0000000..46d15a1 Binary files /dev/null and b/static/emojis/qq/205@2x.gif differ diff --git a/static/emojis/qq/205@2x.png b/static/emojis/qq/205@2x.png new file mode 100644 index 0000000..71b33ad Binary files /dev/null and b/static/emojis/qq/205@2x.png differ diff --git a/static/emojis/qq/206@2x.gif b/static/emojis/qq/206@2x.gif new file mode 100644 index 0000000..c410789 Binary files /dev/null and b/static/emojis/qq/206@2x.gif differ diff --git a/static/emojis/qq/206@2x.png b/static/emojis/qq/206@2x.png new file mode 100644 index 0000000..d70b857 Binary files /dev/null and b/static/emojis/qq/206@2x.png differ diff --git a/static/emojis/qq/207@2x.gif b/static/emojis/qq/207@2x.gif new file mode 100644 index 0000000..9d34edf Binary files /dev/null and b/static/emojis/qq/207@2x.gif differ diff --git a/static/emojis/qq/207@2x.png b/static/emojis/qq/207@2x.png new file mode 100644 index 0000000..bfb3d01 Binary files /dev/null and b/static/emojis/qq/207@2x.png differ diff --git a/static/emojis/qq/208@2x.gif b/static/emojis/qq/208@2x.gif new file mode 100644 index 0000000..a8c6640 Binary files /dev/null and b/static/emojis/qq/208@2x.gif differ diff --git a/static/emojis/qq/208@2x.png b/static/emojis/qq/208@2x.png new file mode 100644 index 0000000..8ef1268 Binary files /dev/null and b/static/emojis/qq/208@2x.png differ diff --git a/static/emojis/qq/20@2x.gif b/static/emojis/qq/20@2x.gif new file mode 100644 index 0000000..062d2ab Binary files /dev/null and b/static/emojis/qq/20@2x.gif differ diff --git a/static/emojis/qq/20@2x.png b/static/emojis/qq/20@2x.png new file mode 100644 index 0000000..8f4683c Binary files /dev/null and b/static/emojis/qq/20@2x.png differ diff --git a/static/emojis/qq/210@2x.gif b/static/emojis/qq/210@2x.gif new file mode 100644 index 0000000..fea13e8 Binary files /dev/null and b/static/emojis/qq/210@2x.gif differ diff --git a/static/emojis/qq/210@2x.png b/static/emojis/qq/210@2x.png new file mode 100644 index 0000000..908abd1 Binary files /dev/null and b/static/emojis/qq/210@2x.png differ diff --git a/static/emojis/qq/211@2x.gif b/static/emojis/qq/211@2x.gif new file mode 100644 index 0000000..38f1c47 Binary files /dev/null and b/static/emojis/qq/211@2x.gif differ diff --git a/static/emojis/qq/211@2x.png b/static/emojis/qq/211@2x.png new file mode 100644 index 0000000..2eecea4 Binary files /dev/null and b/static/emojis/qq/211@2x.png differ diff --git a/static/emojis/qq/212@2x.gif b/static/emojis/qq/212@2x.gif new file mode 100644 index 0000000..6a8d264 Binary files /dev/null and b/static/emojis/qq/212@2x.gif differ diff --git a/static/emojis/qq/212@2x.png b/static/emojis/qq/212@2x.png new file mode 100644 index 0000000..5eca96b Binary files /dev/null and b/static/emojis/qq/212@2x.png differ diff --git a/static/emojis/qq/21@2x.gif b/static/emojis/qq/21@2x.gif new file mode 100644 index 0000000..44441d0 Binary files /dev/null and b/static/emojis/qq/21@2x.gif differ diff --git a/static/emojis/qq/21@2x.png b/static/emojis/qq/21@2x.png new file mode 100644 index 0000000..b4e729b Binary files /dev/null and b/static/emojis/qq/21@2x.png differ diff --git a/static/emojis/qq/22@2x.gif b/static/emojis/qq/22@2x.gif new file mode 100644 index 0000000..3aba83f Binary files /dev/null and b/static/emojis/qq/22@2x.gif differ diff --git a/static/emojis/qq/22@2x.png b/static/emojis/qq/22@2x.png new file mode 100644 index 0000000..f351944 Binary files /dev/null and b/static/emojis/qq/22@2x.png differ diff --git a/static/emojis/qq/23@2x.gif b/static/emojis/qq/23@2x.gif new file mode 100644 index 0000000..0088ed6 Binary files /dev/null and b/static/emojis/qq/23@2x.gif differ diff --git a/static/emojis/qq/23@2x.png b/static/emojis/qq/23@2x.png new file mode 100644 index 0000000..e04d7bc Binary files /dev/null and b/static/emojis/qq/23@2x.png differ diff --git a/static/emojis/qq/245@2x.gif b/static/emojis/qq/245@2x.gif new file mode 100644 index 0000000..5a29c44 Binary files /dev/null and b/static/emojis/qq/245@2x.gif differ diff --git a/static/emojis/qq/245@2x.png b/static/emojis/qq/245@2x.png new file mode 100644 index 0000000..27dcfa4 Binary files /dev/null and b/static/emojis/qq/245@2x.png differ diff --git a/static/emojis/qq/246@2x.gif b/static/emojis/qq/246@2x.gif new file mode 100644 index 0000000..bd13572 Binary files /dev/null and b/static/emojis/qq/246@2x.gif differ diff --git a/static/emojis/qq/246@2x.png b/static/emojis/qq/246@2x.png new file mode 100644 index 0000000..fd38542 Binary files /dev/null and b/static/emojis/qq/246@2x.png differ diff --git a/static/emojis/qq/247@2x.gif b/static/emojis/qq/247@2x.gif new file mode 100644 index 0000000..1af33df Binary files /dev/null and b/static/emojis/qq/247@2x.gif differ diff --git a/static/emojis/qq/247@2x.png b/static/emojis/qq/247@2x.png new file mode 100644 index 0000000..1af33df Binary files /dev/null and b/static/emojis/qq/247@2x.png differ diff --git a/static/emojis/qq/24@2x.gif b/static/emojis/qq/24@2x.gif new file mode 100644 index 0000000..8177e33 Binary files /dev/null and b/static/emojis/qq/24@2x.gif differ diff --git a/static/emojis/qq/24@2x.png b/static/emojis/qq/24@2x.png new file mode 100644 index 0000000..1792db6 Binary files /dev/null and b/static/emojis/qq/24@2x.png differ diff --git a/static/emojis/qq/25@2x.gif b/static/emojis/qq/25@2x.gif new file mode 100644 index 0000000..15fa96f Binary files /dev/null and b/static/emojis/qq/25@2x.gif differ diff --git a/static/emojis/qq/25@2x.png b/static/emojis/qq/25@2x.png new file mode 100644 index 0000000..c3ee373 Binary files /dev/null and b/static/emojis/qq/25@2x.png differ diff --git a/static/emojis/qq/260@2x.gif b/static/emojis/qq/260@2x.gif new file mode 100644 index 0000000..78a867a Binary files /dev/null and b/static/emojis/qq/260@2x.gif differ diff --git a/static/emojis/qq/260@2x.png b/static/emojis/qq/260@2x.png new file mode 100644 index 0000000..78a867a Binary files /dev/null and b/static/emojis/qq/260@2x.png differ diff --git a/static/emojis/qq/261@2x.gif b/static/emojis/qq/261@2x.gif new file mode 100644 index 0000000..0834b6d Binary files /dev/null and b/static/emojis/qq/261@2x.gif differ diff --git a/static/emojis/qq/261@2x.png b/static/emojis/qq/261@2x.png new file mode 100644 index 0000000..6fd324f Binary files /dev/null and b/static/emojis/qq/261@2x.png differ diff --git a/static/emojis/qq/262@2x.gif b/static/emojis/qq/262@2x.gif new file mode 100644 index 0000000..6637ba0 Binary files /dev/null and b/static/emojis/qq/262@2x.gif differ diff --git a/static/emojis/qq/262@2x.png b/static/emojis/qq/262@2x.png new file mode 100644 index 0000000..8ae6183 Binary files /dev/null and b/static/emojis/qq/262@2x.png differ diff --git a/static/emojis/qq/263@2x.gif b/static/emojis/qq/263@2x.gif new file mode 100644 index 0000000..6c97b68 Binary files /dev/null and b/static/emojis/qq/263@2x.gif differ diff --git a/static/emojis/qq/263@2x.png b/static/emojis/qq/263@2x.png new file mode 100644 index 0000000..348f119 Binary files /dev/null and b/static/emojis/qq/263@2x.png differ diff --git a/static/emojis/qq/264@2x.gif b/static/emojis/qq/264@2x.gif new file mode 100644 index 0000000..cb430a8 Binary files /dev/null and b/static/emojis/qq/264@2x.gif differ diff --git a/static/emojis/qq/264@2x.png b/static/emojis/qq/264@2x.png new file mode 100644 index 0000000..fcccf91 Binary files /dev/null and b/static/emojis/qq/264@2x.png differ diff --git a/static/emojis/qq/265@2x.gif b/static/emojis/qq/265@2x.gif new file mode 100644 index 0000000..4aa0d10 Binary files /dev/null and b/static/emojis/qq/265@2x.gif differ diff --git a/static/emojis/qq/265@2x.png b/static/emojis/qq/265@2x.png new file mode 100644 index 0000000..e288fba Binary files /dev/null and b/static/emojis/qq/265@2x.png differ diff --git a/static/emojis/qq/266@2x.gif b/static/emojis/qq/266@2x.gif new file mode 100644 index 0000000..9822497 Binary files /dev/null and b/static/emojis/qq/266@2x.gif differ diff --git a/static/emojis/qq/266@2x.png b/static/emojis/qq/266@2x.png new file mode 100644 index 0000000..4178304 Binary files /dev/null and b/static/emojis/qq/266@2x.png differ diff --git a/static/emojis/qq/267@2x.gif b/static/emojis/qq/267@2x.gif new file mode 100644 index 0000000..4e010db Binary files /dev/null and b/static/emojis/qq/267@2x.gif differ diff --git a/static/emojis/qq/267@2x.png b/static/emojis/qq/267@2x.png new file mode 100644 index 0000000..c555b2b Binary files /dev/null and b/static/emojis/qq/267@2x.png differ diff --git a/static/emojis/qq/268@2x.gif b/static/emojis/qq/268@2x.gif new file mode 100644 index 0000000..ce85d5a Binary files /dev/null and b/static/emojis/qq/268@2x.gif differ diff --git a/static/emojis/qq/268@2x.png b/static/emojis/qq/268@2x.png new file mode 100644 index 0000000..887e5b6 Binary files /dev/null and b/static/emojis/qq/268@2x.png differ diff --git a/static/emojis/qq/269@2x.gif b/static/emojis/qq/269@2x.gif new file mode 100644 index 0000000..f5b37f8 Binary files /dev/null and b/static/emojis/qq/269@2x.gif differ diff --git a/static/emojis/qq/269@2x.png b/static/emojis/qq/269@2x.png new file mode 100644 index 0000000..d3f4bc8 Binary files /dev/null and b/static/emojis/qq/269@2x.png differ diff --git a/static/emojis/qq/26@2x.gif b/static/emojis/qq/26@2x.gif new file mode 100644 index 0000000..25a0e2e Binary files /dev/null and b/static/emojis/qq/26@2x.gif differ diff --git a/static/emojis/qq/26@2x.png b/static/emojis/qq/26@2x.png new file mode 100644 index 0000000..4c40e67 Binary files /dev/null and b/static/emojis/qq/26@2x.png differ diff --git a/static/emojis/qq/270@2x.gif b/static/emojis/qq/270@2x.gif new file mode 100644 index 0000000..0e6816d Binary files /dev/null and b/static/emojis/qq/270@2x.gif differ diff --git a/static/emojis/qq/270@2x.png b/static/emojis/qq/270@2x.png new file mode 100644 index 0000000..0aafe1e Binary files /dev/null and b/static/emojis/qq/270@2x.png differ diff --git a/static/emojis/qq/271@2x.gif b/static/emojis/qq/271@2x.gif new file mode 100644 index 0000000..841f305 Binary files /dev/null and b/static/emojis/qq/271@2x.gif differ diff --git a/static/emojis/qq/271@2x.png b/static/emojis/qq/271@2x.png new file mode 100644 index 0000000..5a14b69 Binary files /dev/null and b/static/emojis/qq/271@2x.png differ diff --git a/static/emojis/qq/272@2x.gif b/static/emojis/qq/272@2x.gif new file mode 100644 index 0000000..21ad966 Binary files /dev/null and b/static/emojis/qq/272@2x.gif differ diff --git a/static/emojis/qq/272@2x.png b/static/emojis/qq/272@2x.png new file mode 100644 index 0000000..e8dc426 Binary files /dev/null and b/static/emojis/qq/272@2x.png differ diff --git a/static/emojis/qq/273@2x.gif b/static/emojis/qq/273@2x.gif new file mode 100644 index 0000000..39828d7 Binary files /dev/null and b/static/emojis/qq/273@2x.gif differ diff --git a/static/emojis/qq/273@2x.png b/static/emojis/qq/273@2x.png new file mode 100644 index 0000000..39828d7 Binary files /dev/null and b/static/emojis/qq/273@2x.png differ diff --git a/static/emojis/qq/274@2x.gif b/static/emojis/qq/274@2x.gif new file mode 100644 index 0000000..a74e76d Binary files /dev/null and b/static/emojis/qq/274@2x.gif differ diff --git a/static/emojis/qq/274@2x.png b/static/emojis/qq/274@2x.png new file mode 100644 index 0000000..a74e76d Binary files /dev/null and b/static/emojis/qq/274@2x.png differ diff --git a/static/emojis/qq/27@2x.gif b/static/emojis/qq/27@2x.gif new file mode 100644 index 0000000..da474f1 Binary files /dev/null and b/static/emojis/qq/27@2x.gif differ diff --git a/static/emojis/qq/27@2x.png b/static/emojis/qq/27@2x.png new file mode 100644 index 0000000..072a5bc Binary files /dev/null and b/static/emojis/qq/27@2x.png differ diff --git a/static/emojis/qq/28@2x.gif b/static/emojis/qq/28@2x.gif new file mode 100644 index 0000000..3cce229 Binary files /dev/null and b/static/emojis/qq/28@2x.gif differ diff --git a/static/emojis/qq/28@2x.png b/static/emojis/qq/28@2x.png new file mode 100644 index 0000000..4b6bb51 Binary files /dev/null and b/static/emojis/qq/28@2x.png differ diff --git a/static/emojis/qq/29@2x.gif b/static/emojis/qq/29@2x.gif new file mode 100644 index 0000000..e2f1710 Binary files /dev/null and b/static/emojis/qq/29@2x.gif differ diff --git a/static/emojis/qq/29@2x.png b/static/emojis/qq/29@2x.png new file mode 100644 index 0000000..79010ed Binary files /dev/null and b/static/emojis/qq/29@2x.png differ diff --git a/static/emojis/qq/2@2x.gif b/static/emojis/qq/2@2x.gif new file mode 100644 index 0000000..74567e8 Binary files /dev/null and b/static/emojis/qq/2@2x.gif differ diff --git a/static/emojis/qq/2@2x.png b/static/emojis/qq/2@2x.png new file mode 100644 index 0000000..746436b Binary files /dev/null and b/static/emojis/qq/2@2x.png differ diff --git a/static/emojis/qq/30@2x.gif b/static/emojis/qq/30@2x.gif new file mode 100644 index 0000000..453c2d2 Binary files /dev/null and b/static/emojis/qq/30@2x.gif differ diff --git a/static/emojis/qq/30@2x.png b/static/emojis/qq/30@2x.png new file mode 100644 index 0000000..7e5e6d5 Binary files /dev/null and b/static/emojis/qq/30@2x.png differ diff --git a/static/emojis/qq/31@2x.gif b/static/emojis/qq/31@2x.gif new file mode 100644 index 0000000..47d225b Binary files /dev/null and b/static/emojis/qq/31@2x.gif differ diff --git a/static/emojis/qq/31@2x.png b/static/emojis/qq/31@2x.png new file mode 100644 index 0000000..fafde70 Binary files /dev/null and b/static/emojis/qq/31@2x.png differ diff --git a/static/emojis/qq/32@2x.gif b/static/emojis/qq/32@2x.gif new file mode 100644 index 0000000..6b08420 Binary files /dev/null and b/static/emojis/qq/32@2x.gif differ diff --git a/static/emojis/qq/32@2x.png b/static/emojis/qq/32@2x.png new file mode 100644 index 0000000..488627a Binary files /dev/null and b/static/emojis/qq/32@2x.png differ diff --git a/static/emojis/qq/33@2x.gif b/static/emojis/qq/33@2x.gif new file mode 100644 index 0000000..ff5f916 Binary files /dev/null and b/static/emojis/qq/33@2x.gif differ diff --git a/static/emojis/qq/33@2x.png b/static/emojis/qq/33@2x.png new file mode 100644 index 0000000..dc6a793 Binary files /dev/null and b/static/emojis/qq/33@2x.png differ diff --git a/static/emojis/qq/34@2x.gif b/static/emojis/qq/34@2x.gif new file mode 100644 index 0000000..eb3cb99 Binary files /dev/null and b/static/emojis/qq/34@2x.gif differ diff --git a/static/emojis/qq/34@2x.png b/static/emojis/qq/34@2x.png new file mode 100644 index 0000000..47884a5 Binary files /dev/null and b/static/emojis/qq/34@2x.png differ diff --git a/static/emojis/qq/35@2x.gif b/static/emojis/qq/35@2x.gif new file mode 100644 index 0000000..4553061 Binary files /dev/null and b/static/emojis/qq/35@2x.gif differ diff --git a/static/emojis/qq/35@2x.png b/static/emojis/qq/35@2x.png new file mode 100644 index 0000000..89d83bf Binary files /dev/null and b/static/emojis/qq/35@2x.png differ diff --git a/static/emojis/qq/36@2x.gif b/static/emojis/qq/36@2x.gif new file mode 100644 index 0000000..541575d Binary files /dev/null and b/static/emojis/qq/36@2x.gif differ diff --git a/static/emojis/qq/36@2x.png b/static/emojis/qq/36@2x.png new file mode 100644 index 0000000..2191fe2 Binary files /dev/null and b/static/emojis/qq/36@2x.png differ diff --git a/static/emojis/qq/37@2x.gif b/static/emojis/qq/37@2x.gif new file mode 100644 index 0000000..842e8a7 Binary files /dev/null and b/static/emojis/qq/37@2x.gif differ diff --git a/static/emojis/qq/37@2x.png b/static/emojis/qq/37@2x.png new file mode 100644 index 0000000..2c8b787 Binary files /dev/null and b/static/emojis/qq/37@2x.png differ diff --git a/static/emojis/qq/38@2x.gif b/static/emojis/qq/38@2x.gif new file mode 100644 index 0000000..3f52e3c Binary files /dev/null and b/static/emojis/qq/38@2x.gif differ diff --git a/static/emojis/qq/38@2x.png b/static/emojis/qq/38@2x.png new file mode 100644 index 0000000..095956f Binary files /dev/null and b/static/emojis/qq/38@2x.png differ diff --git a/static/emojis/qq/39@2x.gif b/static/emojis/qq/39@2x.gif new file mode 100644 index 0000000..35b983f Binary files /dev/null and b/static/emojis/qq/39@2x.gif differ diff --git a/static/emojis/qq/39@2x.png b/static/emojis/qq/39@2x.png new file mode 100644 index 0000000..dfcf125 Binary files /dev/null and b/static/emojis/qq/39@2x.png differ diff --git a/static/emojis/qq/3@2x.gif b/static/emojis/qq/3@2x.gif new file mode 100644 index 0000000..8fe5a4f Binary files /dev/null and b/static/emojis/qq/3@2x.gif differ diff --git a/static/emojis/qq/3@2x.png b/static/emojis/qq/3@2x.png new file mode 100644 index 0000000..bb19077 Binary files /dev/null and b/static/emojis/qq/3@2x.png differ diff --git a/static/emojis/qq/41@2x.gif b/static/emojis/qq/41@2x.gif new file mode 100644 index 0000000..1a9fffe Binary files /dev/null and b/static/emojis/qq/41@2x.gif differ diff --git a/static/emojis/qq/41@2x.png b/static/emojis/qq/41@2x.png new file mode 100644 index 0000000..0720069 Binary files /dev/null and b/static/emojis/qq/41@2x.png differ diff --git a/static/emojis/qq/42@2x.gif b/static/emojis/qq/42@2x.gif new file mode 100644 index 0000000..c44276e Binary files /dev/null and b/static/emojis/qq/42@2x.gif differ diff --git a/static/emojis/qq/42@2x.png b/static/emojis/qq/42@2x.png new file mode 100644 index 0000000..19a6cde Binary files /dev/null and b/static/emojis/qq/42@2x.png differ diff --git a/static/emojis/qq/43@2x.gif b/static/emojis/qq/43@2x.gif new file mode 100644 index 0000000..c84a223 Binary files /dev/null and b/static/emojis/qq/43@2x.gif differ diff --git a/static/emojis/qq/43@2x.png b/static/emojis/qq/43@2x.png new file mode 100644 index 0000000..469c89e Binary files /dev/null and b/static/emojis/qq/43@2x.png differ diff --git a/static/emojis/qq/46@2x.gif b/static/emojis/qq/46@2x.gif new file mode 100644 index 0000000..99bb848 Binary files /dev/null and b/static/emojis/qq/46@2x.gif differ diff --git a/static/emojis/qq/46@2x.png b/static/emojis/qq/46@2x.png new file mode 100644 index 0000000..4a2ac26 Binary files /dev/null and b/static/emojis/qq/46@2x.png differ diff --git a/static/emojis/qq/49@2x.gif b/static/emojis/qq/49@2x.gif new file mode 100644 index 0000000..473229f Binary files /dev/null and b/static/emojis/qq/49@2x.gif differ diff --git a/static/emojis/qq/49@2x.png b/static/emojis/qq/49@2x.png new file mode 100644 index 0000000..e733da3 Binary files /dev/null and b/static/emojis/qq/49@2x.png differ diff --git a/static/emojis/qq/4@2x.gif b/static/emojis/qq/4@2x.gif new file mode 100644 index 0000000..05b2d29 Binary files /dev/null and b/static/emojis/qq/4@2x.gif differ diff --git a/static/emojis/qq/4@2x.png b/static/emojis/qq/4@2x.png new file mode 100644 index 0000000..b0a0ab9 Binary files /dev/null and b/static/emojis/qq/4@2x.png differ diff --git a/static/emojis/qq/53@2x.gif b/static/emojis/qq/53@2x.gif new file mode 100644 index 0000000..2536450 Binary files /dev/null and b/static/emojis/qq/53@2x.gif differ diff --git a/static/emojis/qq/53@2x.png b/static/emojis/qq/53@2x.png new file mode 100644 index 0000000..d98319a Binary files /dev/null and b/static/emojis/qq/53@2x.png differ diff --git a/static/emojis/qq/54@2x.gif b/static/emojis/qq/54@2x.gif new file mode 100644 index 0000000..36bd07d Binary files /dev/null and b/static/emojis/qq/54@2x.gif differ diff --git a/static/emojis/qq/54@2x.png b/static/emojis/qq/54@2x.png new file mode 100644 index 0000000..f980da1 Binary files /dev/null and b/static/emojis/qq/54@2x.png differ diff --git a/static/emojis/qq/55@2x.gif b/static/emojis/qq/55@2x.gif new file mode 100644 index 0000000..5574b72 Binary files /dev/null and b/static/emojis/qq/55@2x.gif differ diff --git a/static/emojis/qq/55@2x.png b/static/emojis/qq/55@2x.png new file mode 100644 index 0000000..9bada0e Binary files /dev/null and b/static/emojis/qq/55@2x.png differ diff --git a/static/emojis/qq/56@2x.gif b/static/emojis/qq/56@2x.gif new file mode 100644 index 0000000..37215f4 Binary files /dev/null and b/static/emojis/qq/56@2x.gif differ diff --git a/static/emojis/qq/56@2x.png b/static/emojis/qq/56@2x.png new file mode 100644 index 0000000..1eab3bf Binary files /dev/null and b/static/emojis/qq/56@2x.png differ diff --git a/static/emojis/qq/57@2x.gif b/static/emojis/qq/57@2x.gif new file mode 100644 index 0000000..a3f69ed Binary files /dev/null and b/static/emojis/qq/57@2x.gif differ diff --git a/static/emojis/qq/57@2x.png b/static/emojis/qq/57@2x.png new file mode 100644 index 0000000..ec8139a Binary files /dev/null and b/static/emojis/qq/57@2x.png differ diff --git a/static/emojis/qq/59@2x.gif b/static/emojis/qq/59@2x.gif new file mode 100644 index 0000000..7ed4197 Binary files /dev/null and b/static/emojis/qq/59@2x.gif differ diff --git a/static/emojis/qq/59@2x.png b/static/emojis/qq/59@2x.png new file mode 100644 index 0000000..f257e51 Binary files /dev/null and b/static/emojis/qq/59@2x.png differ diff --git a/static/emojis/qq/5@2x.gif b/static/emojis/qq/5@2x.gif new file mode 100644 index 0000000..e602647 Binary files /dev/null and b/static/emojis/qq/5@2x.gif differ diff --git a/static/emojis/qq/5@2x.png b/static/emojis/qq/5@2x.png new file mode 100644 index 0000000..36ac774 Binary files /dev/null and b/static/emojis/qq/5@2x.png differ diff --git a/static/emojis/qq/60@2x.gif b/static/emojis/qq/60@2x.gif new file mode 100644 index 0000000..b793271 Binary files /dev/null and b/static/emojis/qq/60@2x.gif differ diff --git a/static/emojis/qq/60@2x.png b/static/emojis/qq/60@2x.png new file mode 100644 index 0000000..452454b Binary files /dev/null and b/static/emojis/qq/60@2x.png differ diff --git a/static/emojis/qq/61@2x.gif b/static/emojis/qq/61@2x.gif new file mode 100644 index 0000000..1992bd3 Binary files /dev/null and b/static/emojis/qq/61@2x.gif differ diff --git a/static/emojis/qq/61@2x.png b/static/emojis/qq/61@2x.png new file mode 100644 index 0000000..2b0496e Binary files /dev/null and b/static/emojis/qq/61@2x.png differ diff --git a/static/emojis/qq/62@2x.gif b/static/emojis/qq/62@2x.gif new file mode 100644 index 0000000..7baca14 Binary files /dev/null and b/static/emojis/qq/62@2x.gif differ diff --git a/static/emojis/qq/62@2x.png b/static/emojis/qq/62@2x.png new file mode 100644 index 0000000..b8baa8a Binary files /dev/null and b/static/emojis/qq/62@2x.png differ diff --git a/static/emojis/qq/63@2x.gif b/static/emojis/qq/63@2x.gif new file mode 100644 index 0000000..d29a7d6 Binary files /dev/null and b/static/emojis/qq/63@2x.gif differ diff --git a/static/emojis/qq/63@2x.png b/static/emojis/qq/63@2x.png new file mode 100644 index 0000000..bd3e7d8 Binary files /dev/null and b/static/emojis/qq/63@2x.png differ diff --git a/static/emojis/qq/64@2x.gif b/static/emojis/qq/64@2x.gif new file mode 100644 index 0000000..08ed2c6 Binary files /dev/null and b/static/emojis/qq/64@2x.gif differ diff --git a/static/emojis/qq/64@2x.png b/static/emojis/qq/64@2x.png new file mode 100644 index 0000000..429e523 Binary files /dev/null and b/static/emojis/qq/64@2x.png differ diff --git a/static/emojis/qq/66@2x.gif b/static/emojis/qq/66@2x.gif new file mode 100644 index 0000000..13600b9 Binary files /dev/null and b/static/emojis/qq/66@2x.gif differ diff --git a/static/emojis/qq/66@2x.png b/static/emojis/qq/66@2x.png new file mode 100644 index 0000000..e733ee7 Binary files /dev/null and b/static/emojis/qq/66@2x.png differ diff --git a/static/emojis/qq/67@2x.gif b/static/emojis/qq/67@2x.gif new file mode 100644 index 0000000..e9ac6cc Binary files /dev/null and b/static/emojis/qq/67@2x.gif differ diff --git a/static/emojis/qq/67@2x.png b/static/emojis/qq/67@2x.png new file mode 100644 index 0000000..7c78576 Binary files /dev/null and b/static/emojis/qq/67@2x.png differ diff --git a/static/emojis/qq/69@2x.gif b/static/emojis/qq/69@2x.gif new file mode 100644 index 0000000..a41a029 Binary files /dev/null and b/static/emojis/qq/69@2x.gif differ diff --git a/static/emojis/qq/69@2x.png b/static/emojis/qq/69@2x.png new file mode 100644 index 0000000..69fa67c Binary files /dev/null and b/static/emojis/qq/69@2x.png differ diff --git a/static/emojis/qq/6@2x.gif b/static/emojis/qq/6@2x.gif new file mode 100644 index 0000000..18025fc Binary files /dev/null and b/static/emojis/qq/6@2x.gif differ diff --git a/static/emojis/qq/6@2x.png b/static/emojis/qq/6@2x.png new file mode 100644 index 0000000..990061d Binary files /dev/null and b/static/emojis/qq/6@2x.png differ diff --git a/static/emojis/qq/72@2x.gif b/static/emojis/qq/72@2x.gif new file mode 100644 index 0000000..2d6dbad Binary files /dev/null and b/static/emojis/qq/72@2x.gif differ diff --git a/static/emojis/qq/72@2x.png b/static/emojis/qq/72@2x.png new file mode 100644 index 0000000..878f9da Binary files /dev/null and b/static/emojis/qq/72@2x.png differ diff --git a/static/emojis/qq/74@2x.gif b/static/emojis/qq/74@2x.gif new file mode 100644 index 0000000..f9874d8 Binary files /dev/null and b/static/emojis/qq/74@2x.gif differ diff --git a/static/emojis/qq/74@2x.png b/static/emojis/qq/74@2x.png new file mode 100644 index 0000000..338c3ee Binary files /dev/null and b/static/emojis/qq/74@2x.png differ diff --git a/static/emojis/qq/75@2x.gif b/static/emojis/qq/75@2x.gif new file mode 100644 index 0000000..7573b7f Binary files /dev/null and b/static/emojis/qq/75@2x.gif differ diff --git a/static/emojis/qq/75@2x.png b/static/emojis/qq/75@2x.png new file mode 100644 index 0000000..bb27879 Binary files /dev/null and b/static/emojis/qq/75@2x.png differ diff --git a/static/emojis/qq/76@2x.gif b/static/emojis/qq/76@2x.gif new file mode 100644 index 0000000..1147107 Binary files /dev/null and b/static/emojis/qq/76@2x.gif differ diff --git a/static/emojis/qq/76@2x.png b/static/emojis/qq/76@2x.png new file mode 100644 index 0000000..1c59200 Binary files /dev/null and b/static/emojis/qq/76@2x.png differ diff --git a/static/emojis/qq/77@2x.gif b/static/emojis/qq/77@2x.gif new file mode 100644 index 0000000..b588e18 Binary files /dev/null and b/static/emojis/qq/77@2x.gif differ diff --git a/static/emojis/qq/77@2x.png b/static/emojis/qq/77@2x.png new file mode 100644 index 0000000..2c2b095 Binary files /dev/null and b/static/emojis/qq/77@2x.png differ diff --git a/static/emojis/qq/78@2x.gif b/static/emojis/qq/78@2x.gif new file mode 100644 index 0000000..88b8dc9 Binary files /dev/null and b/static/emojis/qq/78@2x.gif differ diff --git a/static/emojis/qq/78@2x.png b/static/emojis/qq/78@2x.png new file mode 100644 index 0000000..30de849 Binary files /dev/null and b/static/emojis/qq/78@2x.png differ diff --git a/static/emojis/qq/79@2x.gif b/static/emojis/qq/79@2x.gif new file mode 100644 index 0000000..5c9c26e Binary files /dev/null and b/static/emojis/qq/79@2x.gif differ diff --git a/static/emojis/qq/79@2x.png b/static/emojis/qq/79@2x.png new file mode 100644 index 0000000..c0c0b5d Binary files /dev/null and b/static/emojis/qq/79@2x.png differ diff --git a/static/emojis/qq/7@2x.gif b/static/emojis/qq/7@2x.gif new file mode 100644 index 0000000..f3dc4da Binary files /dev/null and b/static/emojis/qq/7@2x.gif differ diff --git a/static/emojis/qq/7@2x.png b/static/emojis/qq/7@2x.png new file mode 100644 index 0000000..e25e879 Binary files /dev/null and b/static/emojis/qq/7@2x.png differ diff --git a/static/emojis/qq/85@2x.gif b/static/emojis/qq/85@2x.gif new file mode 100644 index 0000000..b259c8f Binary files /dev/null and b/static/emojis/qq/85@2x.gif differ diff --git a/static/emojis/qq/85@2x.png b/static/emojis/qq/85@2x.png new file mode 100644 index 0000000..86abc48 Binary files /dev/null and b/static/emojis/qq/85@2x.png differ diff --git a/static/emojis/qq/86@2x.gif b/static/emojis/qq/86@2x.gif new file mode 100644 index 0000000..747c000 Binary files /dev/null and b/static/emojis/qq/86@2x.gif differ diff --git a/static/emojis/qq/86@2x.png b/static/emojis/qq/86@2x.png new file mode 100644 index 0000000..57244e4 Binary files /dev/null and b/static/emojis/qq/86@2x.png differ diff --git a/static/emojis/qq/89@2x.gif b/static/emojis/qq/89@2x.gif new file mode 100644 index 0000000..f7a2426 Binary files /dev/null and b/static/emojis/qq/89@2x.gif differ diff --git a/static/emojis/qq/89@2x.png b/static/emojis/qq/89@2x.png new file mode 100644 index 0000000..8a1fcbb Binary files /dev/null and b/static/emojis/qq/89@2x.png differ diff --git a/static/emojis/qq/8@2x.gif b/static/emojis/qq/8@2x.gif new file mode 100644 index 0000000..452d39a Binary files /dev/null and b/static/emojis/qq/8@2x.gif differ diff --git a/static/emojis/qq/8@2x.png b/static/emojis/qq/8@2x.png new file mode 100644 index 0000000..83ab9e7 Binary files /dev/null and b/static/emojis/qq/8@2x.png differ diff --git a/static/emojis/qq/90@2x.gif b/static/emojis/qq/90@2x.gif new file mode 100644 index 0000000..1d0438e Binary files /dev/null and b/static/emojis/qq/90@2x.gif differ diff --git a/static/emojis/qq/90@2x.png b/static/emojis/qq/90@2x.png new file mode 100644 index 0000000..e4c777b Binary files /dev/null and b/static/emojis/qq/90@2x.png differ diff --git a/static/emojis/qq/91@2x.gif b/static/emojis/qq/91@2x.gif new file mode 100644 index 0000000..660f0a5 Binary files /dev/null and b/static/emojis/qq/91@2x.gif differ diff --git a/static/emojis/qq/91@2x.png b/static/emojis/qq/91@2x.png new file mode 100644 index 0000000..cc9e740 Binary files /dev/null and b/static/emojis/qq/91@2x.png differ diff --git a/static/emojis/qq/96@2x.gif b/static/emojis/qq/96@2x.gif new file mode 100644 index 0000000..f4b7aba Binary files /dev/null and b/static/emojis/qq/96@2x.gif differ diff --git a/static/emojis/qq/96@2x.png b/static/emojis/qq/96@2x.png new file mode 100644 index 0000000..6739147 Binary files /dev/null and b/static/emojis/qq/96@2x.png differ diff --git a/static/emojis/qq/97@2x.gif b/static/emojis/qq/97@2x.gif new file mode 100644 index 0000000..ea55622 Binary files /dev/null and b/static/emojis/qq/97@2x.gif differ diff --git a/static/emojis/qq/97@2x.png b/static/emojis/qq/97@2x.png new file mode 100644 index 0000000..5f2196d Binary files /dev/null and b/static/emojis/qq/97@2x.png differ diff --git a/static/emojis/qq/98@2x.gif b/static/emojis/qq/98@2x.gif new file mode 100644 index 0000000..f27345f Binary files /dev/null and b/static/emojis/qq/98@2x.gif differ diff --git a/static/emojis/qq/98@2x.png b/static/emojis/qq/98@2x.png new file mode 100644 index 0000000..f1d1ceb Binary files /dev/null and b/static/emojis/qq/98@2x.png differ diff --git a/static/emojis/qq/99@2x.gif b/static/emojis/qq/99@2x.gif new file mode 100644 index 0000000..b955b1c Binary files /dev/null and b/static/emojis/qq/99@2x.gif differ diff --git a/static/emojis/qq/99@2x.png b/static/emojis/qq/99@2x.png new file mode 100644 index 0000000..1651ab5 Binary files /dev/null and b/static/emojis/qq/99@2x.png differ diff --git a/static/emojis/qq/9@2x.gif b/static/emojis/qq/9@2x.gif new file mode 100644 index 0000000..56427e2 Binary files /dev/null and b/static/emojis/qq/9@2x.gif differ diff --git a/static/emojis/qq/9@2x.png b/static/emojis/qq/9@2x.png new file mode 100644 index 0000000..b01db94 Binary files /dev/null and b/static/emojis/qq/9@2x.png differ diff --git a/static/emojis/qq/newemoji_002.gif b/static/emojis/qq/newemoji_002.gif new file mode 100644 index 0000000..b4cdf42 Binary files /dev/null and b/static/emojis/qq/newemoji_002.gif differ diff --git a/static/emojis/qq/newemoji_002.png b/static/emojis/qq/newemoji_002.png new file mode 100644 index 0000000..2625bfb Binary files /dev/null and b/static/emojis/qq/newemoji_002.png differ diff --git a/static/emojis/qq/newemoji_003.gif b/static/emojis/qq/newemoji_003.gif new file mode 100644 index 0000000..a36d8a8 Binary files /dev/null and b/static/emojis/qq/newemoji_003.gif differ diff --git a/static/emojis/qq/newemoji_003.png b/static/emojis/qq/newemoji_003.png new file mode 100644 index 0000000..5f210ca Binary files /dev/null and b/static/emojis/qq/newemoji_003.png differ diff --git a/static/emojis/qq/newemoji_004.gif b/static/emojis/qq/newemoji_004.gif new file mode 100644 index 0000000..48e597b Binary files /dev/null and b/static/emojis/qq/newemoji_004.gif differ diff --git a/static/emojis/qq/newemoji_004.png b/static/emojis/qq/newemoji_004.png new file mode 100644 index 0000000..8580d58 Binary files /dev/null and b/static/emojis/qq/newemoji_004.png differ diff --git a/static/emojis/qq/newemoji_005.gif b/static/emojis/qq/newemoji_005.gif new file mode 100644 index 0000000..a68e619 Binary files /dev/null and b/static/emojis/qq/newemoji_005.gif differ diff --git a/static/emojis/qq/newemoji_005.png b/static/emojis/qq/newemoji_005.png new file mode 100644 index 0000000..42655c9 Binary files /dev/null and b/static/emojis/qq/newemoji_005.png differ diff --git a/static/emojis/qq/newemoji_006.gif b/static/emojis/qq/newemoji_006.gif new file mode 100644 index 0000000..7f4c8f6 Binary files /dev/null and b/static/emojis/qq/newemoji_006.gif differ diff --git a/static/emojis/qq/newemoji_006.png b/static/emojis/qq/newemoji_006.png new file mode 100644 index 0000000..259f85a Binary files /dev/null and b/static/emojis/qq/newemoji_006.png differ diff --git a/static/emojis/qq/newemoji_007.gif b/static/emojis/qq/newemoji_007.gif new file mode 100644 index 0000000..4fdaa11 Binary files /dev/null and b/static/emojis/qq/newemoji_007.gif differ diff --git a/static/emojis/qq/newemoji_007.png b/static/emojis/qq/newemoji_007.png new file mode 100644 index 0000000..c7226d2 Binary files /dev/null and b/static/emojis/qq/newemoji_007.png differ diff --git a/static/emojis/qq/newemoji_008.gif b/static/emojis/qq/newemoji_008.gif new file mode 100644 index 0000000..3f4cb69 Binary files /dev/null and b/static/emojis/qq/newemoji_008.gif differ diff --git a/static/emojis/qq/newemoji_008.png b/static/emojis/qq/newemoji_008.png new file mode 100644 index 0000000..23841f3 Binary files /dev/null and b/static/emojis/qq/newemoji_008.png differ diff --git a/static/emojis/qq/newemoji_009.gif b/static/emojis/qq/newemoji_009.gif new file mode 100644 index 0000000..bfeef68 Binary files /dev/null and b/static/emojis/qq/newemoji_009.gif differ diff --git a/static/emojis/qq/newemoji_009.png b/static/emojis/qq/newemoji_009.png new file mode 100644 index 0000000..c353d40 Binary files /dev/null and b/static/emojis/qq/newemoji_009.png differ diff --git a/static/emojis/qq/newemoji_010.gif b/static/emojis/qq/newemoji_010.gif new file mode 100644 index 0000000..cd79614 Binary files /dev/null and b/static/emojis/qq/newemoji_010.gif differ diff --git a/static/emojis/qq/newemoji_010.png b/static/emojis/qq/newemoji_010.png new file mode 100644 index 0000000..2dda232 Binary files /dev/null and b/static/emojis/qq/newemoji_010.png differ diff --git a/static/emojis/qq/newemoji_011.gif b/static/emojis/qq/newemoji_011.gif new file mode 100644 index 0000000..e45d0fd Binary files /dev/null and b/static/emojis/qq/newemoji_011.gif differ diff --git a/static/emojis/qq/newemoji_011.png b/static/emojis/qq/newemoji_011.png new file mode 100644 index 0000000..3ebc0fd Binary files /dev/null and b/static/emojis/qq/newemoji_011.png differ diff --git a/static/emojis/qq/newemoji_012.gif b/static/emojis/qq/newemoji_012.gif new file mode 100644 index 0000000..cbf72f9 Binary files /dev/null and b/static/emojis/qq/newemoji_012.gif differ diff --git a/static/emojis/qq/newemoji_012.png b/static/emojis/qq/newemoji_012.png new file mode 100644 index 0000000..6555448 Binary files /dev/null and b/static/emojis/qq/newemoji_012.png differ diff --git a/static/emojis/qq/newemoji_013.gif b/static/emojis/qq/newemoji_013.gif new file mode 100644 index 0000000..caf95cc Binary files /dev/null and b/static/emojis/qq/newemoji_013.gif differ diff --git a/static/emojis/qq/newemoji_013.png b/static/emojis/qq/newemoji_013.png new file mode 100644 index 0000000..f81247e Binary files /dev/null and b/static/emojis/qq/newemoji_013.png differ diff --git a/static/emojis/qq/newemoji_014.gif b/static/emojis/qq/newemoji_014.gif new file mode 100644 index 0000000..183e8fb Binary files /dev/null and b/static/emojis/qq/newemoji_014.gif differ diff --git a/static/emojis/qq/newemoji_014.png b/static/emojis/qq/newemoji_014.png new file mode 100644 index 0000000..a48bae4 Binary files /dev/null and b/static/emojis/qq/newemoji_014.png differ diff --git a/static/emojis/qq/newemoji_015.gif b/static/emojis/qq/newemoji_015.gif new file mode 100644 index 0000000..2717159 Binary files /dev/null and b/static/emojis/qq/newemoji_015.gif differ diff --git a/static/emojis/qq/newemoji_015.png b/static/emojis/qq/newemoji_015.png new file mode 100644 index 0000000..7ecd1c9 Binary files /dev/null and b/static/emojis/qq/newemoji_015.png differ diff --git a/static/emojis/qq/newemoji_016.gif b/static/emojis/qq/newemoji_016.gif new file mode 100644 index 0000000..30f1d58 Binary files /dev/null and b/static/emojis/qq/newemoji_016.gif differ diff --git a/static/emojis/qq/newemoji_016.png b/static/emojis/qq/newemoji_016.png new file mode 100644 index 0000000..ef888bd Binary files /dev/null and b/static/emojis/qq/newemoji_016.png differ diff --git a/static/emojis/qq/newemoji_017.gif b/static/emojis/qq/newemoji_017.gif new file mode 100644 index 0000000..62e526b Binary files /dev/null and b/static/emojis/qq/newemoji_017.gif differ diff --git a/static/emojis/qq/newemoji_017.png b/static/emojis/qq/newemoji_017.png new file mode 100644 index 0000000..5dcf8f3 Binary files /dev/null and b/static/emojis/qq/newemoji_017.png differ diff --git a/static/home_icon.png b/static/home_icon.png new file mode 100644 index 0000000..f7c18e5 Binary files /dev/null and b/static/home_icon.png differ diff --git a/static/icon/coin.png b/static/icon/coin.png new file mode 100644 index 0000000..9f550d2 Binary files /dev/null and b/static/icon/coin.png differ diff --git a/static/icon/currency.png b/static/icon/currency.png new file mode 100644 index 0000000..ee8dada Binary files /dev/null and b/static/icon/currency.png differ diff --git a/static/icon/hehan.png b/static/icon/hehan.png new file mode 100644 index 0000000..966e05b Binary files /dev/null and b/static/icon/hehan.png differ diff --git a/static/icon/home_bg.jpg b/static/icon/home_bg.jpg new file mode 100644 index 0000000..eae76e3 Binary files /dev/null and b/static/icon/home_bg.jpg differ diff --git a/static/icon/home_icon_logo.jpg b/static/icon/home_icon_logo.jpg new file mode 100644 index 0000000..cc75abf Binary files /dev/null and b/static/icon/home_icon_logo.jpg differ diff --git a/static/icon/ic_agreed.png b/static/icon/ic_agreed.png new file mode 100644 index 0000000..41b3e76 Binary files /dev/null and b/static/icon/ic_agreed.png differ diff --git a/static/icon/ic_close.png b/static/icon/ic_close.png new file mode 100644 index 0000000..2566ffa Binary files /dev/null and b/static/icon/ic_close.png differ diff --git a/static/icon/ic_gender_selected.png b/static/icon/ic_gender_selected.png new file mode 100644 index 0000000..8a3c874 Binary files /dev/null and b/static/icon/ic_gender_selected.png differ diff --git a/static/icon/ic_gender_unselected.png b/static/icon/ic_gender_unselected.png new file mode 100644 index 0000000..0a3f258 Binary files /dev/null and b/static/icon/ic_gender_unselected.png differ diff --git a/static/icon/ic_logon_display.png b/static/icon/ic_logon_display.png new file mode 100644 index 0000000..c6b6dcc Binary files /dev/null and b/static/icon/ic_logon_display.png differ diff --git a/static/icon/ic_logon_hide.png b/static/icon/ic_logon_hide.png new file mode 100644 index 0000000..2282342 Binary files /dev/null and b/static/icon/ic_logon_hide.png differ diff --git a/static/icon/ic_upload.png b/static/icon/ic_upload.png new file mode 100644 index 0000000..49c9d78 Binary files /dev/null and b/static/icon/ic_upload.png differ diff --git a/static/icon/icon-next.png b/static/icon/icon-next.png new file mode 100644 index 0000000..519a9d5 Binary files /dev/null and b/static/icon/icon-next.png differ diff --git a/static/icon/icon-pause.png b/static/icon/icon-pause.png new file mode 100644 index 0000000..0b9d0b4 Binary files /dev/null and b/static/icon/icon-pause.png differ diff --git a/static/icon/icon-play.png b/static/icon/icon-play.png new file mode 100644 index 0000000..10998aa Binary files /dev/null and b/static/icon/icon-play.png differ diff --git a/static/icon/icon-pre.png b/static/icon/icon-pre.png new file mode 100644 index 0000000..2afc249 Binary files /dev/null and b/static/icon/icon-pre.png differ diff --git a/static/icon/icon_bug_c.png b/static/icon/icon_bug_c.png new file mode 100644 index 0000000..4029577 Binary files /dev/null and b/static/icon/icon_bug_c.png differ diff --git a/static/icon/icon_close.png b/static/icon/icon_close.png new file mode 100644 index 0000000..4a0b5fa Binary files /dev/null and b/static/icon/icon_close.png differ diff --git a/static/icon/icon_listen.png b/static/icon/icon_listen.png new file mode 100644 index 0000000..d031277 Binary files /dev/null and b/static/icon/icon_listen.png differ diff --git a/static/icon/icon_listen_c.png b/static/icon/icon_listen_c.png new file mode 100644 index 0000000..84f8ab9 Binary files /dev/null and b/static/icon/icon_listen_c.png differ diff --git a/static/icon/icon_listen_h.png b/static/icon/icon_listen_h.png new file mode 100644 index 0000000..a75a2af Binary files /dev/null and b/static/icon/icon_listen_h.png differ diff --git a/static/icon/icon_look.png b/static/icon/icon_look.png new file mode 100644 index 0000000..7ccdb35 Binary files /dev/null and b/static/icon/icon_look.png differ diff --git a/static/icon/icon_look_c.png b/static/icon/icon_look_c.png new file mode 100644 index 0000000..d7f3b71 Binary files /dev/null and b/static/icon/icon_look_c.png differ diff --git a/static/icon/icon_look_h.png b/static/icon/icon_look_h.png new file mode 100644 index 0000000..4da0684 Binary files /dev/null and b/static/icon/icon_look_h.png differ diff --git a/static/icon/icon_pause_float.png b/static/icon/icon_pause_float.png new file mode 100644 index 0000000..6ba763f Binary files /dev/null and b/static/icon/icon_pause_float.png differ diff --git a/static/icon/icon_pl.png b/static/icon/icon_pl.png new file mode 100644 index 0000000..fa6e175 Binary files /dev/null and b/static/icon/icon_pl.png differ diff --git a/static/icon/icon_play_float.png b/static/icon/icon_play_float.png new file mode 100644 index 0000000..128268f Binary files /dev/null and b/static/icon/icon_play_float.png differ diff --git a/static/icon/icon_right.png b/static/icon/icon_right.png new file mode 100644 index 0000000..baa3e4c Binary files /dev/null and b/static/icon/icon_right.png differ diff --git a/static/icon/icon_sc.png b/static/icon/icon_sc.png new file mode 100644 index 0000000..4a20218 Binary files /dev/null and b/static/icon/icon_sc.png differ diff --git a/static/icon/login_bg.png b/static/icon/login_bg.png new file mode 100644 index 0000000..eaee4cc Binary files /dev/null and b/static/icon/login_bg.png differ diff --git a/static/icon/login_icon.png b/static/icon/login_icon.png new file mode 100644 index 0000000..42e8889 Binary files /dev/null and b/static/icon/login_icon.png differ diff --git a/static/icon/me_lise_more.png b/static/icon/me_lise_more.png new file mode 100644 index 0000000..d016238 Binary files /dev/null and b/static/icon/me_lise_more.png differ diff --git a/static/icon/morenAvavter.png b/static/icon/morenAvavter.png new file mode 100644 index 0000000..5e31962 Binary files /dev/null and b/static/icon/morenAvavter.png differ diff --git a/static/icon/pay_1.png b/static/icon/pay_1.png new file mode 100644 index 0000000..76d6c2d Binary files /dev/null and b/static/icon/pay_1.png differ diff --git a/static/icon/pay_2.png b/static/icon/pay_2.png new file mode 100644 index 0000000..27a0f57 Binary files /dev/null and b/static/icon/pay_2.png differ diff --git a/static/icon/tel.png b/static/icon/tel.png new file mode 100644 index 0000000..226ed93 Binary files /dev/null and b/static/icon/tel.png differ diff --git a/static/logo.png b/static/logo.png new file mode 100644 index 0000000..b5771e2 Binary files /dev/null and b/static/logo.png differ diff --git a/static/null_img.png b/static/null_img.png new file mode 100644 index 0000000..8b28751 Binary files /dev/null and b/static/null_img.png differ diff --git a/static/qiyeWx.jpg b/static/qiyeWx.jpg new file mode 100644 index 0000000..cb5c8e8 Binary files /dev/null and b/static/qiyeWx.jpg differ diff --git a/static/tab/icon1_n.png b/static/tab/icon1_n.png new file mode 100644 index 0000000..f723f29 Binary files /dev/null and b/static/tab/icon1_n.png differ diff --git a/static/tab/icon1_y.png b/static/tab/icon1_y.png new file mode 100644 index 0000000..e3fe8a9 Binary files /dev/null and b/static/tab/icon1_y.png differ diff --git a/static/tab/icon2_n.png b/static/tab/icon2_n.png new file mode 100644 index 0000000..5e24f0e Binary files /dev/null and b/static/tab/icon2_n.png differ diff --git a/static/tab/icon2_y.png b/static/tab/icon2_y.png new file mode 100644 index 0000000..9f7d31e Binary files /dev/null and b/static/tab/icon2_y.png differ diff --git a/static/tab/icon3_n.png b/static/tab/icon3_n.png new file mode 100644 index 0000000..ca48a10 Binary files /dev/null and b/static/tab/icon3_n.png differ diff --git a/static/tab/icon3_y.png b/static/tab/icon3_y.png new file mode 100644 index 0000000..398b654 Binary files /dev/null and b/static/tab/icon3_y.png differ diff --git a/static/tab/icon4_n.png b/static/tab/icon4_n.png new file mode 100644 index 0000000..8126b8c Binary files /dev/null and b/static/tab/icon4_n.png differ diff --git a/static/tab/icon4_y.png b/static/tab/icon4_y.png new file mode 100644 index 0000000..0158bcf Binary files /dev/null and b/static/tab/icon4_y.png differ diff --git a/static/tailwind.css b/static/tailwind.css new file mode 100644 index 0000000..e5814d9 --- /dev/null +++ b/static/tailwind.css @@ -0,0 +1,535 @@ +/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */ +@layer properties; +@layer theme, base, components, utilities; +@layer theme { + :root, :host { + --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", + "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", + "Courier New", monospace; + --color-red-500: oklch(63.7% 0.237 25.331); + --ease-out: cubic-bezier(0, 0, 0.2, 1); + --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); + --default-transition-duration: 150ms; + --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + --default-font-family: var(--font-sans); + --default-mono-font-family: var(--font-mono); + } +} +@layer base { + *, ::after, ::before, ::backdrop, ::file-selector-button { + box-sizing: border-box; + margin: 0; + padding: 0; + border: 0 solid; + } + html, :host { + line-height: 1.5; + -webkit-text-size-adjust: 100%; + tab-size: 4; + font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); + font-feature-settings: var(--default-font-feature-settings, normal); + font-variation-settings: var(--default-font-variation-settings, normal); + -webkit-tap-highlight-color: transparent; + } + hr { + height: 0; + color: inherit; + border-top-width: 1px; + } + abbr:where([title]) { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + } + h1, h2, h3, h4, h5, h6 { + font-size: inherit; + font-weight: inherit; + } + a { + color: inherit; + -webkit-text-decoration: inherit; + text-decoration: inherit; + } + b, strong { + font-weight: bolder; + } + code, kbd, samp, pre { + font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); + font-feature-settings: var(--default-mono-font-feature-settings, normal); + font-variation-settings: var(--default-mono-font-variation-settings, normal); + font-size: 1em; + } + small { + font-size: 80%; + } + sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + sub { + bottom: -0.25em; + } + sup { + top: -0.5em; + } + table { + text-indent: 0; + border-color: inherit; + border-collapse: collapse; + } + :-moz-focusring { + outline: auto; + } + progress { + vertical-align: baseline; + } + summary { + display: list-item; + } + ol, ul, menu { + list-style: none; + } + img, svg, video, canvas, audio, iframe, embed, object { + display: block; + vertical-align: middle; + } + img, video { + max-width: 100%; + height: auto; + } + button, input, select, optgroup, textarea, ::file-selector-button { + font: inherit; + font-feature-settings: inherit; + font-variation-settings: inherit; + letter-spacing: inherit; + color: inherit; + border-radius: 0; + background-color: transparent; + opacity: 1; + } + :where(select:is([multiple], [size])) optgroup { + font-weight: bolder; + } + :where(select:is([multiple], [size])) optgroup option { + padding-inline-start: 20px; + } + ::file-selector-button { + margin-inline-end: 4px; + } + ::placeholder { + opacity: 1; + } + @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) { + ::placeholder { + color: currentcolor; + @supports (color: color-mix(in lab, red, red)) { + color: color-mix(in oklab, currentcolor 50%, transparent); + } + } + } + textarea { + resize: vertical; + } + ::-webkit-search-decoration { + -webkit-appearance: none; + } + ::-webkit-date-and-time-value { + min-height: 1lh; + text-align: inherit; + } + ::-webkit-datetime-edit { + display: inline-flex; + } + ::-webkit-datetime-edit-fields-wrapper { + padding: 0; + } + ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field { + padding-block: 0; + } + ::-webkit-calendar-picker-indicator { + line-height: 1; + } + :-moz-ui-invalid { + box-shadow: none; + } + button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button { + appearance: button; + } + ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { + height: auto; + } + [hidden]:where(:not([hidden="until-found"])) { + display: none !important; + } +} +@layer utilities { + .collapse { + visibility: collapse; + } + .visible { + visibility: visible; + } + .absolute { + position: absolute; + } + .fixed { + position: fixed; + } + .relative { + position: relative; + } + .static { + position: static; + } + .sticky { + position: sticky; + } + .isolate { + isolation: isolate; + } + .container { + width: 100%; + @media (width >= 40rem) { + max-width: 40rem; + } + @media (width >= 48rem) { + max-width: 48rem; + } + @media (width >= 64rem) { + max-width: 64rem; + } + @media (width >= 80rem) { + max-width: 80rem; + } + @media (width >= 96rem) { + max-width: 96rem; + } + } + .block { + display: block; + } + .contents { + display: contents; + } + .flex { + display: flex; + } + .grid { + display: grid; + } + .hidden { + display: none; + } + .inline { + display: inline; + } + .inline-block { + display: inline-block; + } + .list-item { + display: list-item; + } + .table { + display: table; + } + .flex-shrink { + flex-shrink: 1; + } + .transform { + transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,); + } + .resize { + resize: both; + } + .border { + border-style: var(--tw-border-style); + border-width: 1px; + } + .bg-\[red\] { + background-color: red; + } + .text-left { + text-align: left; + } + .text-\[\#fff\] { + color: #fff; + } + .capitalize { + text-transform: capitalize; + } + .lowercase { + text-transform: lowercase; + } + .uppercase { + text-transform: uppercase; + } + .italic { + font-style: italic; + } + .ordinal { + --tw-ordinal: ordinal; + font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,); + } + .underline { + text-decoration-line: underline; + } + .shadow { + --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .ring { + --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor); + box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow); + } + .outline { + outline-style: var(--tw-outline-style); + outline-width: 1px; + } + .blur { + --tw-blur: blur(8px); + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .filter { + filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,); + } + .transition { + transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events; + transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + .ease-in-out { + --tw-ease: var(--ease-in-out); + transition-timing-function: var(--ease-in-out); + } + .ease-out { + --tw-ease: var(--ease-out); + transition-timing-function: var(--ease-out); + } + .hover\:bg-red-500 { + &:hover { + @media (hover: hover) { + background-color: var(--color-red-500); + } + } + } +} +@property --tw-rotate-x { + syntax: "*"; + inherits: false; +} +@property --tw-rotate-y { + syntax: "*"; + inherits: false; +} +@property --tw-rotate-z { + syntax: "*"; + inherits: false; +} +@property --tw-skew-x { + syntax: "*"; + inherits: false; +} +@property --tw-skew-y { + syntax: "*"; + inherits: false; +} +@property --tw-border-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-ordinal { + syntax: "*"; + inherits: false; +} +@property --tw-slashed-zero { + syntax: "*"; + inherits: false; +} +@property --tw-numeric-figure { + syntax: "*"; + inherits: false; +} +@property --tw-numeric-spacing { + syntax: "*"; + inherits: false; +} +@property --tw-numeric-fraction { + syntax: "*"; + inherits: false; +} +@property --tw-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-inset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-inset-ring-color { + syntax: "*"; + inherits: false; +} +@property --tw-inset-ring-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-ring-inset { + syntax: "*"; + inherits: false; +} +@property --tw-ring-offset-width { + syntax: ""; + inherits: false; + initial-value: 0px; +} +@property --tw-ring-offset-color { + syntax: "*"; + inherits: false; + initial-value: #fff; +} +@property --tw-ring-offset-shadow { + syntax: "*"; + inherits: false; + initial-value: 0 0 #0000; +} +@property --tw-outline-style { + syntax: "*"; + inherits: false; + initial-value: solid; +} +@property --tw-blur { + syntax: "*"; + inherits: false; +} +@property --tw-brightness { + syntax: "*"; + inherits: false; +} +@property --tw-contrast { + syntax: "*"; + inherits: false; +} +@property --tw-grayscale { + syntax: "*"; + inherits: false; +} +@property --tw-hue-rotate { + syntax: "*"; + inherits: false; +} +@property --tw-invert { + syntax: "*"; + inherits: false; +} +@property --tw-opacity { + syntax: "*"; + inherits: false; +} +@property --tw-saturate { + syntax: "*"; + inherits: false; +} +@property --tw-sepia { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-color { + syntax: "*"; + inherits: false; +} +@property --tw-drop-shadow-alpha { + syntax: ""; + inherits: false; + initial-value: 100%; +} +@property --tw-drop-shadow-size { + syntax: "*"; + inherits: false; +} +@property --tw-ease { + syntax: "*"; + inherits: false; +} +@layer properties { + @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) { + *, ::before, ::after, ::backdrop { + --tw-rotate-x: initial; + --tw-rotate-y: initial; + --tw-rotate-z: initial; + --tw-skew-x: initial; + --tw-skew-y: initial; + --tw-border-style: solid; + --tw-ordinal: initial; + --tw-slashed-zero: initial; + --tw-numeric-figure: initial; + --tw-numeric-spacing: initial; + --tw-numeric-fraction: initial; + --tw-shadow: 0 0 #0000; + --tw-shadow-color: initial; + --tw-shadow-alpha: 100%; + --tw-inset-shadow: 0 0 #0000; + --tw-inset-shadow-color: initial; + --tw-inset-shadow-alpha: 100%; + --tw-ring-color: initial; + --tw-ring-shadow: 0 0 #0000; + --tw-inset-ring-color: initial; + --tw-inset-ring-shadow: 0 0 #0000; + --tw-ring-inset: initial; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-offset-shadow: 0 0 #0000; + --tw-outline-style: solid; + --tw-blur: initial; + --tw-brightness: initial; + --tw-contrast: initial; + --tw-grayscale: initial; + --tw-hue-rotate: initial; + --tw-invert: initial; + --tw-opacity: initial; + --tw-saturate: initial; + --tw-sepia: initial; + --tw-drop-shadow: initial; + --tw-drop-shadow-color: initial; + --tw-drop-shadow-alpha: 100%; + --tw-drop-shadow-size: initial; + --tw-ease: initial; + } + } +} diff --git a/stores/user.ts b/stores/user.ts new file mode 100644 index 0000000..57c7dfc --- /dev/null +++ b/stores/user.ts @@ -0,0 +1,69 @@ +// stores/user.ts +import { defineStore } from 'pinia' +import { setAuthToken, clearAuthToken } from '@/utils/auth' +import type { IUserInfo } from '@/types/user' + +export const useUserStore = defineStore('user', { + state: (): IUserInfo => ({ + id: 0, + name: '', + avatar: '', + email: '', + phone: '', + token: uni.getStorageSync('token') || '', + }), + + getters: { + isLoggedIn: (state: any) => Boolean(state.token), + userInfo: (state: any) => { + const { id, name, avatar, email, phone } = state + return { id, name, avatar, email, phone } + }, + }, + + actions: { + /** 设置用户信息(登录成功后调用) */ + setUserInfo(userInfo: IUserInfo) { + Object.assign(this, userInfo) + + if (userInfo.token) { + this.token = userInfo.token + setAuthToken(userInfo.token) + } + + uni.setStorageSync('userInfo', userInfo) + }, + + /** 登出 */ + logout() { + try { + // ✅ 优先使用 Pinia 内置方法(最安全) + this.$reset() + } catch (err) { + // ✅ 如果 $reset 不存在(旧版 pinia),动态清空 + Object.keys(this).forEach((key) => { + // TS安全地访问 this[key] + const val = (this as Record)[key] + if (typeof val === 'string') (this as any)[key] = '' + else if (typeof val === 'number') (this as any)[key] = 0 + else if (Array.isArray(val)) (this as any)[key] = [] + else if (typeof val === 'object' && val !== null) (this as any)[key] = {} + else (this as any)[key] = undefined + }) + } + + clearAuthToken() + uni.removeStorageSync('userInfo') + uni.reLaunch({ url: '/pages/user/login' }) + }, + + /** 从本地存储恢复用户信息 */ + restoreUserInfo() { + const userInfo = uni.getStorageSync('userInfo') + if (userInfo) Object.assign(this, userInfo) + + const token = uni.getStorageSync('token') + if (token) this.token = token + }, + }, +}) diff --git a/tailwind-input.css b/tailwind-input.css new file mode 100644 index 0000000..a461c50 --- /dev/null +++ b/tailwind-input.css @@ -0,0 +1 @@ +@import "tailwindcss"; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..3ac9679 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1 @@ +/** @type {import('tailwindcss').Config} */ module.exports = { separator: '__', // 如果是小程序项目需要设置这一项,将 : 选择器替换成 __,之后 hover:bg-red-500 将改为 hover__bg-red-500 corePlugins: { // 预设样式 preflight: false, // 一般uniapp都有预设样式,所以不需要tailwindcss的预设 // 以下功能小程序不支持 space: false, // > 子节点选择器 divideWidth: false, divideColor: false, divideStyle: false, divideOpacity: false, }, // 指定要处理的文件 content: [ './pages/**/*.{vue,js}', './main.js', './App.vue', './index.html' ], theme: { // 字号,使用 App.vue 中的 --x-font-size 样式变量配置 fontSize(config){ const list = ['2xs','xs','sm','base','md','lg','xl','2xl','3xl']; let result = {} list.forEach(it=>{ result[it] = `var(--x-font-size-${it})` }) return result }, extend: { // 间距,tailwindcss中默认间距是rem单位,可以统一设置为uniapp的rpx单位。 // 类似的设置根据项目需求自己调整一下就好了,没必要去安装别人的预设,其实主要是小程序不兼容的css比较多,H5和App基本都直接兼容tailwindcss默认的预设 spacing(config) { let result = { 0: '0' } // 允许的数值大一些也无所谓,最后打包tailwindcss会摇树优化,未使用的样式并不会打包 for (let i = 1; i <= 300; i++) { result[i] = `${i}rpx` } return result }, // 增加颜色板,现在主流UI组件库大都是采用css变量实现定制主题,所以这里引用了全局的css变量,这个css变量的定义位置可以在 App.vue 中 page{} 选择器下 // 其实tailwindcss只是一个css工具,不必局限于它内部提供的东西,灵活运用css变量这些特性完全可以整合出自己的生产力工具 colors:{ 'primary': 'var(--x-color-primary)', 'tips' : 'var(--x-color-tips)' }, }, }, plugins: [], } \ No newline at end of file diff --git a/types/user.ts b/types/user.ts new file mode 100644 index 0000000..39cad71 --- /dev/null +++ b/types/user.ts @@ -0,0 +1,59 @@ +// types/user.ts + +/** + * 用户信息接口 + */ +export interface IUserInfo { + id: number + name: string + avatar: string + email: string + phone?: string + token?: string + [key: string]: any +} + +/** + * 登录响应接口 + */ +export interface ILoginResponse { + userInfo: IUserInfo + token: { + token: string + [key: string]: any + } +} + +/** + * 协议内容接口 + */ +export interface IAgreement { + id: number + title: string + content: string + [key: string]: any +} + +/** + * 登录表单接口 + */ +export interface ILoginForm { + // 验证码登录 + email?: string + code?: string + // 密码登录 + phoneEmail?: string + password?: string + // 通用 + agree: boolean +} + +/** + * 忘记密码表单接口 + */ +export interface IForgetPasswordForm { + email: string + code: string + password: string + confirmPassword: string +} diff --git a/uni.scss b/uni.scss new file mode 100644 index 0000000..47c8025 --- /dev/null +++ b/uni.scss @@ -0,0 +1,78 @@ +/** + * 这里是uni-app内置的常用样式变量 + * + * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量 + * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App + * + */ + +/** + * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能 + * + * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件 + */ + +/* 颜色变量 */ +/* 主色 */ +$app-theme-color: #54a966; + +/* 行为相关颜色 */ +$uni-color-primary: #007aff; +$uni-color-success: #4cd964; +$uni-color-warning: #f0ad4e; +$uni-color-error: #dd524d; + +/* 文字基本颜色 */ +$uni-text-color:#333;//基本色 +$uni-text-color-inverse:#fff;//反色 +$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息 +$uni-text-color-placeholder: #808080; +$uni-text-color-disable:#c0c0c0; + +/* 背景颜色 */ +$uni-bg-color:#ffffff; +$uni-bg-color-grey:#f8f8f8; +$uni-bg-color-hover:#f1f1f1;//点击状态颜色 +$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色 + +/* 边框颜色 */ +$uni-border-color:#c8c7cc; + +/* 尺寸变量 */ + +/* 文字尺寸 */ +$uni-font-size-sm:12px; +$uni-font-size-base:14px; +$uni-font-size-lg:16; + +/* 图片尺寸 */ +$uni-img-size-sm:20px; +$uni-img-size-base:26px; +$uni-img-size-lg:40px; + +/* Border Radius */ +$uni-border-radius-sm: 2px; +$uni-border-radius-base: 3px; +$uni-border-radius-lg: 6px; +$uni-border-radius-circle: 50%; + +/* 水平间距 */ +$uni-spacing-row-sm: 5px; +$uni-spacing-row-base: 10px; +$uni-spacing-row-lg: 15px; + +/* 垂直间距 */ +$uni-spacing-col-sm: 4px; +$uni-spacing-col-base: 8px; +$uni-spacing-col-lg: 12px; + +/* 透明度 */ +$uni-opacity-disabled: 0.3; // 组件禁用态的透明度 + +/* 文章场景相关 */ +$uni-color-title: #2C405A; // 文章标题颜色 +$uni-font-size-title:20px; +$uni-color-subtitle: #555555; // 二级标题颜色 +$uni-font-size-subtitle:26px; +$uni-color-paragraph: #3F536E; // 文章段落颜色 +$uni-font-size-paragraph:15px; diff --git a/uniCloud-aliyun/database/JQL查询.jql b/uniCloud-aliyun/database/JQL查询.jql new file mode 100644 index 0000000..35d21de --- /dev/null +++ b/uniCloud-aliyun/database/JQL查询.jql @@ -0,0 +1,12 @@ +// 本文件用于,使用JQL语法操作项目关联的uniCloud空间的数据库,方便开发调试和远程数据库管理 +// 编写clientDB的js API(也支持常规js语法,比如var),可以对云数据库进行增删改查操作。不支持uniCloud-db组件写法 +// 可以全部运行,也可以选中部分代码运行。点击工具栏上的运行按钮或者按下【F5】键运行代码 +// 如果文档中存在多条JQL语句,只有最后一条语句生效 +// 如果混写了普通js,最后一条语句需是数据库操作语句 +// 此处代码运行不受DB Schema的权限控制,移植代码到实际业务中注意在schema中配好permission +// 不支持clientDB的action +// 数据库查询有最大返回条数限制,详见:https://uniapp.dcloud.net.cn/uniCloud/cf-database.html#limit +// 详细JQL语法,请参考:https://uniapp.dcloud.net.cn/uniCloud/jql.html + +// 下面示例查询uni-id-users表的所有数据 +db.collection('uni-id-users').get(); diff --git a/uniCloud-aliyun/database/hello.schema.json b/uniCloud-aliyun/database/hello.schema.json new file mode 100644 index 0000000..9f64f33 --- /dev/null +++ b/uniCloud-aliyun/database/hello.schema.json @@ -0,0 +1,27 @@ +// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema +{ + "bsonType": "object", + "required": ["name"], + "permission": { + "read": true, + "create": true, + "update": true, + "delete": true + }, + "properties": { + "_id": { + "description": "ID" + }, + "name": { + "bsonType": "string", + "label": "%name%", + "minLength": 1, + "maxLength": 8, + "errorMessage": { + "format": "{label}%name.format%", + "minLength": "{label}%name.minLength%", + "maxLength": "{label}%name.maxLength%" + } + } + } +} diff --git a/uniCloud-aliyun/database/locale/hello/en.json b/uniCloud-aliyun/database/locale/hello/en.json new file mode 100644 index 0000000..7beffcf --- /dev/null +++ b/uniCloud-aliyun/database/locale/hello/en.json @@ -0,0 +1,6 @@ +{ + "name": "Name", + "name.format": " invalid format", + "name.minLength": "{label} length cannot be less than {{minLength}}", + "name.maxLength": "{label} length cannot exceed {{maxLength}}" +} diff --git a/uniCloud-aliyun/database/locale/hello/zh-Hans.json b/uniCloud-aliyun/database/locale/hello/zh-Hans.json new file mode 100644 index 0000000..92fc8a3 --- /dev/null +++ b/uniCloud-aliyun/database/locale/hello/zh-Hans.json @@ -0,0 +1,6 @@ +{ + "name": "姓名", + "name.format": "格式无效", + "name.minLength": "{label}不能小于{{minLength}}个字符", + "name.maxLength": "{label}不能大于{{maxLength}}个字符" +} diff --git a/uni_modules/no-data/changelog.md b/uni_modules/no-data/changelog.md new file mode 100644 index 0000000..e69de29 diff --git a/uni_modules/no-data/components/no-data/i18n/en.json b/uni_modules/no-data/components/no-data/i18n/en.json new file mode 100644 index 0000000..249bc85 --- /dev/null +++ b/uni_modules/no-data/components/no-data/i18n/en.json @@ -0,0 +1,3 @@ +{ + "no-data.title": "No Data" +} diff --git a/uni_modules/no-data/components/no-data/i18n/index.js b/uni_modules/no-data/components/no-data/i18n/index.js new file mode 100644 index 0000000..f5000b1 --- /dev/null +++ b/uni_modules/no-data/components/no-data/i18n/index.js @@ -0,0 +1,10 @@ +import en from './en.json' +import zhHans from './zh-Hans.json' +import zhHant from './zh-Hant.json' +import ja from './ja.json' +export default { + en, + 'zh-Hans': zhHans, + 'zh-Hant': zhHant, + ja +} diff --git a/uni_modules/no-data/components/no-data/i18n/ja.json b/uni_modules/no-data/components/no-data/i18n/ja.json new file mode 100644 index 0000000..fca47b6 --- /dev/null +++ b/uni_modules/no-data/components/no-data/i18n/ja.json @@ -0,0 +1,3 @@ +{ + "no-data.title": "データなし" +} diff --git a/uni_modules/no-data/components/no-data/i18n/zh-Hans.json b/uni_modules/no-data/components/no-data/i18n/zh-Hans.json new file mode 100644 index 0000000..dd3b343 --- /dev/null +++ b/uni_modules/no-data/components/no-data/i18n/zh-Hans.json @@ -0,0 +1,3 @@ +{ + "no-data.title": "无数据" +} diff --git a/uni_modules/no-data/components/no-data/i18n/zh-Hant.json b/uni_modules/no-data/components/no-data/i18n/zh-Hant.json new file mode 100644 index 0000000..eb758cd --- /dev/null +++ b/uni_modules/no-data/components/no-data/i18n/zh-Hant.json @@ -0,0 +1,3 @@ +{ + "no-data.title": "無數據" +} diff --git a/uni_modules/no-data/components/no-data/no-data.vue b/uni_modules/no-data/components/no-data/no-data.vue new file mode 100644 index 0000000..8e16bfe --- /dev/null +++ b/uni_modules/no-data/components/no-data/no-data.vue @@ -0,0 +1,44 @@ + + + + diff --git a/uni_modules/no-data/package.json b/uni_modules/no-data/package.json new file mode 100644 index 0000000..284d2ef --- /dev/null +++ b/uni_modules/no-data/package.json @@ -0,0 +1,80 @@ +{ + "id": "no-data", + "displayName": "no-data", + "version": "1.0.0", + "description": "no-data", + "keywords": [ + "no-data" +], + "repository": "", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "category": [ + "前端组件", + "通用组件" + ], + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "", + "data": "", + "permissions": "" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "u", + "aliyun": "u" + }, + "client": { + "Vue": { + "vue2": "u", + "vue3": "u" + }, + "App": { + "app-vue": "u", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "u", + "Android Browser": "u", + "微信浏览器(Android)": "u", + "QQ浏览器(Android)": "u" + }, + "H5-pc": { + "Chrome": "u", + "IE": "u", + "Edge": "u", + "Firefox": "u", + "Safari": "u" + }, + "小程序": { + "微信": "u", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + "QQ": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/no-data/readme.md b/uni_modules/no-data/readme.md new file mode 100644 index 0000000..f6364f2 --- /dev/null +++ b/uni_modules/no-data/readme.md @@ -0,0 +1 @@ +# no-data \ No newline at end of file diff --git a/uni_modules/wot-design-uni/changelog.md b/uni_modules/wot-design-uni/changelog.md new file mode 100644 index 0000000..d089f44 --- /dev/null +++ b/uni_modules/wot-design-uni/changelog.md @@ -0,0 +1,2277 @@ +## 1.13.0(2025-09-29) +## [1.13.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.12.4...v1.13.0) (2025-09-28) + + +### ✨ Features | 新功能 + +* ✨ 为 Curtain 组件添加 show-menu-by-longpress 和 close-on-click 属性 ([a905655](https://github.com/Moonofweisheng/wot-design-uni/commit/a90565510ab55431f6d7537da465cc8299d07a46)), closes [#1279](https://github.com/Moonofweisheng/wot-design-uni/issues/1279) +* ✨ 优化 Swiper 使用默认插槽时插槽内容的显示效果 ([#1301](https://github.com/Moonofweisheng/wot-design-uni/issues/1301)) ([41dd417](https://github.com/Moonofweisheng/wot-design-uni/commit/41dd4177b66e6e03357ce79f5c9b92fa2a932a7a)) +* ✨ 优化 Toast 组件图标的体积 ([#1034](https://github.com/Moonofweisheng/wot-design-uni/issues/1034)) ([c984cff](https://github.com/Moonofweisheng/wot-design-uni/commit/c984cff24749ffd753f21f04c79c6f896f7bd9ef)) +* ✨ 增加车牌键盘语言切换功能,支持受控和非受控模式 ([#1294](https://github.com/Moonofweisheng/wot-design-uni/issues/1294)) ([9943011](https://github.com/Moonofweisheng/wot-design-uni/commit/9943011b4c629625091e82115d9241e6503efeae)), closes [#1275](https://github.com/Moonofweisheng/wot-design-uni/issues/1275) [#818](https://github.com/Moonofweisheng/wot-design-uni/issues/818) +* ✨ button组件支持微信小程序的getrealtimephonenumber 事件 ([#1097](https://github.com/Moonofweisheng/wot-design-uni/issues/1097)) ([ed412b6](https://github.com/Moonofweisheng/wot-design-uni/commit/ed412b67261fce04c51d5c5b8836ca4dd0dc22a4)) +* ✨ Cell 新增 icon-siz 属性用于指定左侧图标大小 ([#1298](https://github.com/Moonofweisheng/wot-design-uni/issues/1298)) ([9585db1](https://github.com/Moonofweisheng/wot-design-uni/commit/9585db11503bc5e77e72e78ba7a51f1f6932f510)), closes [#1088](https://github.com/Moonofweisheng/wot-design-uni/issues/1088) +* ✨ Rate 支持清空评分([#1302](https://github.com/Moonofweisheng/wot-design-uni/issues/1302)) ([1333bda](https://github.com/Moonofweisheng/wot-design-uni/commit/1333bdac4f8f605c3c9851d0f43d267205ce5aef)), closes [#1293](https://github.com/Moonofweisheng/wot-design-uni/issues/1293) +* ✨ swiper新增default slot 用户可自定义swiper-item中的内容展示 ([#1164](https://github.com/Moonofweisheng/wot-design-uni/issues/1164)) ([046b135](https://github.com/Moonofweisheng/wot-design-uni/commit/046b135a14a938840c9309c6b9eedb1878866ac9)) +* ✨ wd-picker-view 添加 item-height 属性 ([8d84508](https://github.com/Moonofweisheng/wot-design-uni/commit/8d845081657581a84282f8d4de6039272700e9b0)) + + +### Documentation | 文档 + +* 修复黑暗模式下demo页面样式异常 ([397c883](https://github.com/Moonofweisheng/wot-design-uni/commit/397c88338a65afa71f452a67cec938afd5e25e9a)) +* 补充 Button 组件的 getRealtimePhoneNumber 仅支持微信小程序 ([7466c91](https://github.com/Moonofweisheng/wot-design-uni/commit/7466c91c1a50318c6f80cbcbeb368dad2bff7dd9)) +* 补全一些缺失的文档 ([b0bb46d](https://github.com/Moonofweisheng/wot-design-uni/commit/b0bb46d3a792bc01c7f8fdbe97835fc04ae577bc)) +* 调整 Gap 文档描述错误的问题 ([1a9f626](https://github.com/Moonofweisheng/wot-design-uni/commit/1a9f62698643b5d1e5fc24be52ad3416464ff651)) +* 调整文档站点域名为 wot-ui.cn ([4c8cdb8](https://github.com/Moonofweisheng/wot-design-uni/commit/4c8cdb83d077370f6d81b9250c6651301521eb6b)) +* 更新快速上手项目链接 ([d86dd18](https://github.com/Moonofweisheng/wot-design-uni/commit/d86dd18b49bbaf2a06a6f85338b2e9fe6b9950b6)) +* 添加 vscode 代码提示插件 ([c3c6eb1](https://github.com/Moonofweisheng/wot-design-uni/commit/c3c6eb124985b4620a336c034919085ecaed20d9)) +* 添加博客链接地址 ([d7272eb](https://github.com/Moonofweisheng/wot-design-uni/commit/d7272ebab6fbea321133ee52ce1c6748567bf486)) +* 添加关于全局反馈方案和最佳实践分享的文档 ([a4d2550](https://github.com/Moonofweisheng/wot-design-uni/commit/a4d2550fefe77c64e179ebd22d212827b5fa5217)) +* 添加赞助渠道 ([3564bce](https://github.com/Moonofweisheng/wot-design-uni/commit/3564bce12f4341bd329731c9a18121c611c460c7)) +* 文档首页新增快速上手模板和公众号的入口 ([e80b0df](https://github.com/Moonofweisheng/wot-design-uni/commit/e80b0df51e5049cecf4f0f70cc83535dc52f8e06)) +* 优化演示 Demo 在小屏幕上的显示效果 ([#1296](https://github.com/Moonofweisheng/wot-design-uni/issues/1296)) ([0dbdde9](https://github.com/Moonofweisheng/wot-design-uni/commit/0dbdde9e23645c4735e4051f5c259b0c473df896)) +* 优化演示demo显示效果 ([868b5ad](https://github.com/Moonofweisheng/wot-design-uni/commit/868b5ad3108f45a096da967f92793ae05b645c2b)), closes [#1269](https://github.com/Moonofweisheng/wot-design-uni/issues/1269) +* 友情链接支持一行最多四个 ([4810db7](https://github.com/Moonofweisheng/wot-design-uni/commit/4810db7d6fba25062382be3f862b5ba252052b70)) +* 添加 img 组件 transformAssetUrls 配置介绍 ([#1259](https://github.com/Moonofweisheng/wot-design-uni/issues/1259)) ([96cf9c7](https://github.com/Moonofweisheng/wot-design-uni/commit/96cf9c7082b94904d45ef1a514f66bff60a57071)) +* 修正 Text 组件文档一些语言组织的错误 ([abc4571](https://github.com/Moonofweisheng/wot-design-uni/commit/abc457147a09444fa82868aa73800958b3621796)) +* 修复 starter 地址错误 ([#1316](https://github.com/Moonofweisheng/wot-design-uni/issues/1316)) ([00212b0](https://github.com/Moonofweisheng/wot-design-uni/commit/00212b0e3ecad336edbeec6473db01a67c04cb6b)) + + +### Bug Fixes | Bug 修复 + +* 修复 Segmented 选项点击时无论是否改变选中值都会触发 change 的问题 ([#1326](https://github.com/Moonofweisheng/wot-design-uni/issues/1326)) ([5657aa6](https://github.com/Moonofweisheng/wot-design-uni/commit/5657aa68a8357ca66c626b7e844c18aa95828c6d)), closes [#1323](https://github.com/Moonofweisheng/wot-design-uni/issues/1323) +* 修复 table 组件表头文字溢出样式异常的问题 ([#1297](https://github.com/Moonofweisheng/wot-design-uni/issues/1297)) ([5e186ea](https://github.com/Moonofweisheng/wot-design-uni/commit/5e186ea4b2f8fea09cb1913c6a63f1e60827ec4e)), closes [#1182](https://github.com/Moonofweisheng/wot-design-uni/issues/1182) [#1058](https://github.com/Moonofweisheng/wot-design-uni/issues/1058) +* 修复wd-drop-menu-item组件在popup数据较多在滚动区下拉时和页面onPullDownRefresh之间的冲突 ([#1113](https://github.com/Moonofweisheng/wot-design-uni/issues/1113)) ([73027c0](https://github.com/Moonofweisheng/wot-design-uni/commit/73027c0cefe980c27f46412c5648761c30a01bd0)), closes [#1107](https://github.com/Moonofweisheng/wot-design-uni/issues/1107) + +# 更新日志 + + +## [1.13.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.12.4...v1.13.0) (2025-09-28) + + +### ✨ Features | 新功能 + +* ✨ 为 Curtain 组件添加 show-menu-by-longpress 和 close-on-click 属性 ([a905655](https://github.com/Moonofweisheng/wot-design-uni/commit/a90565510ab55431f6d7537da465cc8299d07a46)), closes [#1279](https://github.com/Moonofweisheng/wot-design-uni/issues/1279) +* ✨ 优化 Swiper 使用默认插槽时插槽内容的显示效果 ([#1301](https://github.com/Moonofweisheng/wot-design-uni/issues/1301)) ([41dd417](https://github.com/Moonofweisheng/wot-design-uni/commit/41dd4177b66e6e03357ce79f5c9b92fa2a932a7a)) +* ✨ 优化 Toast 组件图标的体积 ([#1034](https://github.com/Moonofweisheng/wot-design-uni/issues/1034)) ([c984cff](https://github.com/Moonofweisheng/wot-design-uni/commit/c984cff24749ffd753f21f04c79c6f896f7bd9ef)) +* ✨ 增加车牌键盘语言切换功能,支持受控和非受控模式 ([#1294](https://github.com/Moonofweisheng/wot-design-uni/issues/1294)) ([9943011](https://github.com/Moonofweisheng/wot-design-uni/commit/9943011b4c629625091e82115d9241e6503efeae)), closes [#1275](https://github.com/Moonofweisheng/wot-design-uni/issues/1275) [#818](https://github.com/Moonofweisheng/wot-design-uni/issues/818) +* ✨ button组件支持微信小程序的getrealtimephonenumber 事件 ([#1097](https://github.com/Moonofweisheng/wot-design-uni/issues/1097)) ([ed412b6](https://github.com/Moonofweisheng/wot-design-uni/commit/ed412b67261fce04c51d5c5b8836ca4dd0dc22a4)) +* ✨ Cell 新增 icon-siz 属性用于指定左侧图标大小 ([#1298](https://github.com/Moonofweisheng/wot-design-uni/issues/1298)) ([9585db1](https://github.com/Moonofweisheng/wot-design-uni/commit/9585db11503bc5e77e72e78ba7a51f1f6932f510)), closes [#1088](https://github.com/Moonofweisheng/wot-design-uni/issues/1088) +* ✨ Rate 支持清空评分([#1302](https://github.com/Moonofweisheng/wot-design-uni/issues/1302)) ([1333bda](https://github.com/Moonofweisheng/wot-design-uni/commit/1333bdac4f8f605c3c9851d0f43d267205ce5aef)), closes [#1293](https://github.com/Moonofweisheng/wot-design-uni/issues/1293) +* ✨ swiper新增default slot 用户可自定义swiper-item中的内容展示 ([#1164](https://github.com/Moonofweisheng/wot-design-uni/issues/1164)) ([046b135](https://github.com/Moonofweisheng/wot-design-uni/commit/046b135a14a938840c9309c6b9eedb1878866ac9)) +* ✨ wd-picker-view 添加 item-height 属性 ([8d84508](https://github.com/Moonofweisheng/wot-design-uni/commit/8d845081657581a84282f8d4de6039272700e9b0)) + + +### ✏️ Documentation | 文档 + +* 修复黑暗模式下demo页面样式异常 ([397c883](https://github.com/Moonofweisheng/wot-design-uni/commit/397c88338a65afa71f452a67cec938afd5e25e9a)) +* ✏️ 补充 Button 组件的 getRealtimePhoneNumber 仅支持微信小程序 ([7466c91](https://github.com/Moonofweisheng/wot-design-uni/commit/7466c91c1a50318c6f80cbcbeb368dad2bff7dd9)) +* ✏️ 补全一些缺失的文档 ([b0bb46d](https://github.com/Moonofweisheng/wot-design-uni/commit/b0bb46d3a792bc01c7f8fdbe97835fc04ae577bc)) +* ✏️ 调整 Gap 文档描述错误的问题 ([1a9f626](https://github.com/Moonofweisheng/wot-design-uni/commit/1a9f62698643b5d1e5fc24be52ad3416464ff651)) +* ✏️ 调整文档站点域名为 wot-ui.cn ([4c8cdb8](https://github.com/Moonofweisheng/wot-design-uni/commit/4c8cdb83d077370f6d81b9250c6651301521eb6b)) +* ✏️ 更新快速上手项目链接 ([d86dd18](https://github.com/Moonofweisheng/wot-design-uni/commit/d86dd18b49bbaf2a06a6f85338b2e9fe6b9950b6)) +* ✏️ 添加 vscode 代码提示插件 ([c3c6eb1](https://github.com/Moonofweisheng/wot-design-uni/commit/c3c6eb124985b4620a336c034919085ecaed20d9)) +* ✏️ 添加博客链接地址 ([d7272eb](https://github.com/Moonofweisheng/wot-design-uni/commit/d7272ebab6fbea321133ee52ce1c6748567bf486)) +* ✏️ 添加关于全局反馈方案和最佳实践分享的文档 ([a4d2550](https://github.com/Moonofweisheng/wot-design-uni/commit/a4d2550fefe77c64e179ebd22d212827b5fa5217)) +* ✏️ 添加赞助渠道 ([3564bce](https://github.com/Moonofweisheng/wot-design-uni/commit/3564bce12f4341bd329731c9a18121c611c460c7)) +* ✏️ 文档首页新增快速上手模板和公众号的入口 ([e80b0df](https://github.com/Moonofweisheng/wot-design-uni/commit/e80b0df51e5049cecf4f0f70cc83535dc52f8e06)) +* ✏️ 优化演示 Demo 在小屏幕上的显示效果 ([#1296](https://github.com/Moonofweisheng/wot-design-uni/issues/1296)) ([0dbdde9](https://github.com/Moonofweisheng/wot-design-uni/commit/0dbdde9e23645c4735e4051f5c259b0c473df896)) +* ✏️ 优化演示demo显示效果 ([868b5ad](https://github.com/Moonofweisheng/wot-design-uni/commit/868b5ad3108f45a096da967f92793ae05b645c2b)), closes [#1269](https://github.com/Moonofweisheng/wot-design-uni/issues/1269) +* ✏️ 友情链接支持一行最多四个 ([4810db7](https://github.com/Moonofweisheng/wot-design-uni/commit/4810db7d6fba25062382be3f862b5ba252052b70)) +* ✏️ 添加 img 组件 transformAssetUrls 配置介绍 ([#1259](https://github.com/Moonofweisheng/wot-design-uni/issues/1259)) ([96cf9c7](https://github.com/Moonofweisheng/wot-design-uni/commit/96cf9c7082b94904d45ef1a514f66bff60a57071)) +* ✏️ 修正 Text 组件文档一些语言组织的错误 ([abc4571](https://github.com/Moonofweisheng/wot-design-uni/commit/abc457147a09444fa82868aa73800958b3621796)) +* 修复 starter 地址错误 ([#1316](https://github.com/Moonofweisheng/wot-design-uni/issues/1316)) ([00212b0](https://github.com/Moonofweisheng/wot-design-uni/commit/00212b0e3ecad336edbeec6473db01a67c04cb6b)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Segmented 选项点击时无论是否改变选中值都会触发 change 的问题 ([#1326](https://github.com/Moonofweisheng/wot-design-uni/issues/1326)) ([5657aa6](https://github.com/Moonofweisheng/wot-design-uni/commit/5657aa68a8357ca66c626b7e844c18aa95828c6d)), closes [#1323](https://github.com/Moonofweisheng/wot-design-uni/issues/1323) +* 🐛 修复 table 组件表头文字溢出样式异常的问题 ([#1297](https://github.com/Moonofweisheng/wot-design-uni/issues/1297)) ([5e186ea](https://github.com/Moonofweisheng/wot-design-uni/commit/5e186ea4b2f8fea09cb1913c6a63f1e60827ec4e)), closes [#1182](https://github.com/Moonofweisheng/wot-design-uni/issues/1182) [#1058](https://github.com/Moonofweisheng/wot-design-uni/issues/1058) +* 🐛 修复wd-drop-menu-item组件在popup数据较多在滚动区下拉时和页面onPullDownRefresh之间的冲突 ([#1113](https://github.com/Moonofweisheng/wot-design-uni/issues/1113)) ([73027c0](https://github.com/Moonofweisheng/wot-design-uni/commit/73027c0cefe980c27f46412c5648761c30a01bd0)), closes [#1107](https://github.com/Moonofweisheng/wot-design-uni/issues/1107) + +### [1.12.4](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.12.3...v1.12.4) (2025-08-28) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Upload 设置 multiple 无效的问题 ([#1250](https://github.com/Moonofweisheng/wot-design-uni/issues/1250)) ([784aab4](https://github.com/Moonofweisheng/wot-design-uni/commit/784aab4aa156e2a440db7d1a0a10e36358851763)) + +### [1.12.3](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.12.2...v1.12.3) (2025-08-27) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Fab、Cell组件 Icon 垂直居中异常的问题 ([#1249](https://github.com/Moonofweisheng/wot-design-uni/issues/1249)) ([d7dac97](https://github.com/Moonofweisheng/wot-design-uni/commit/d7dac979982513c88363dd6224352ab099b7d0c3)) + +### [1.12.2](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.12.1...v1.12.2) (2025-08-26) + + +### ✨ Features | 新功能 + +* ✨ 调整 composables 的导出,新增 useCountDown 的导出 ([#1242](https://github.com/Moonofweisheng/wot-design-uni/issues/1242)) ([93fafa1](https://github.com/Moonofweisheng/wot-design-uni/commit/93fafa180fcfb3fa07deab0393449e822179d43b)), closes [#1239](https://github.com/Moonofweisheng/wot-design-uni/issues/1239) +* ✨ DroMenu 图标大小和位置样式逻辑调整为不缩放且不使用绝对定位 ([#1243](https://github.com/Moonofweisheng/wot-design-uni/issues/1243)) ([e59fd56](https://github.com/Moonofweisheng/wot-design-uni/commit/e59fd568be9284b7eb91575a3f59194cd681828c)) + +### [1.12.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.12.0...v1.12.1) (2025-08-25) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 DropDown 图标垂直居中异常的问题 ([37042c7](https://github.com/Moonofweisheng/wot-design-uni/commit/37042c7766bfe366828f51201c6023aeb4cfaec6)) + +## [1.12.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.11.1...v1.12.0) (2025-08-24) + + +### ✨ Features | 新功能 + +* ✨ 为 Cell、Input、Textarea 等组件添加 marker-side 属性控制必填*位置 ([#1181](https://github.com/Moonofweisheng/wot-design-uni/issues/1181)) ([cade06f](https://github.com/Moonofweisheng/wot-design-uni/commit/cade06fe4a776e55a862a58f1eddc1fe0f055a88)), closes [#555](https://github.com/Moonofweisheng/wot-design-uni/issues/555) +* ✨ 新增维语本地化支持 ([b4e8605](https://github.com/Moonofweisheng/wot-design-uni/commit/b4e86053b4bb73ef89ae91330d50b6e68349ad20)) +* ✨ Upload 上传组件调信小程序端使用chooseMedia替换掉chooseImage等 ([57d89f3](https://github.com/Moonofweisheng/wot-design-uni/commit/57d89f33d769362c198048d37b44f7d67ed384f4)), closes [#1193](https://github.com/Moonofweisheng/wot-design-uni/issues/1193) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 签字版组件设置exportScale < 1时在支付宝上导出图片不完整 ([#1129](https://github.com/Moonofweisheng/wot-design-uni/issues/1129)) ([555ae5f](https://github.com/Moonofweisheng/wot-design-uni/commit/555ae5f40049ffd958ec4e58e80ccd3ba4f524f3)) +* 🐛 修复 grid-item 组件 custom-text 失效的问题 ([#1180](https://github.com/Moonofweisheng/wot-design-uni/issues/1180)) ([5abc3b5](https://github.com/Moonofweisheng/wot-design-uni/commit/5abc3b5344bd2f880ef94350e10c2ef9e9f9250f)), closes [#995](https://github.com/Moonofweisheng/wot-design-uni/issues/995) +* 🐛 修复 signature 组件设置background-color为透明色导致撤销无效 ([#1224](https://github.com/Moonofweisheng/wot-design-uni/issues/1224)) ([2e67adf](https://github.com/Moonofweisheng/wot-design-uni/commit/2e67adf2bae212a03f3cef3113326f4d942b0b55)), closes [#1223](https://github.com/Moonofweisheng/wot-design-uni/issues/1223) +* 🐛 修复 Upload 多选时配置为覆盖上传图片达到上限无法替换图片的问题 ([00ab76b](https://github.com/Moonofweisheng/wot-design-uni/commit/00ab76bd91e91a3d0fabdb8b80e00df764055519)) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复基础组件文档问题 - 阶段一完成 ([#1220](https://github.com/Moonofweisheng/wot-design-uni/issues/1220)) ([9132174](https://github.com/Moonofweisheng/wot-design-uni/commit/9132174b11c539d2ec5f8d0aec2044ac1affaaff)) +* ✏️ 修正 drop-menu-item options 默认数据结构注释 ([#1087](https://github.com/Moonofweisheng/wot-design-uni/issues/1087)) ([7a2cd2d](https://github.com/Moonofweisheng/wot-design-uni/commit/7a2cd2da93746761b05e068083b171312c4af0e3)) +* 修复 Button/Icon/ConfigProvider/Popup 组件文档不一致问题 ([#1190](https://github.com/Moonofweisheng/wot-design-uni/issues/1190)) ([04d0d11](https://github.com/Moonofweisheng/wot-design-uni/commit/04d0d1184957bb1ae5b1ee2ddfaa978a989427b3)) + +### [1.11.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.11.0...v1.11.1) (2025-07-25) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 RootPortal 及 Picker 相关组件 type-check 错误的问题 ([1859294](https://github.com/Moonofweisheng/wot-design-uni/commit/185929461c56d596b6a9d0dabe117e229ceda601)) + +## [1.11.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.10.0...v1.11.0) (2025-07-20) + + +### ✨ Features | 新功能 + +* ✨ 结合Cell组件重构Picker相关组件的触发器 ([4a50f2d](https://github.com/Moonofweisheng/wot-design-uni/commit/4a50f2db5956134d579b3be5830f786deb272364)) +* ✨ 新增 root-portal 组件支持从页面中脱离出来,用于解决各种 fixed 失效问题 ([#1155](https://github.com/Moonofweisheng/wot-design-uni/issues/1155)) ([372735a](https://github.com/Moonofweisheng/wot-design-uni/commit/372735a16af7d9a9f3a1a75a8493c2293f2aa216)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 DatetimePicker 超出隐藏 ellipsis 无效的问题 ([cdf1f78](https://github.com/Moonofweisheng/wot-design-uni/commit/cdf1f78513e6116a5f837237af766d00e1244668)) +* 🐛 修复 DatetimePicker 区间选择时无法选择绑定值范围以外的时间的问题 ([3c1023c](https://github.com/Moonofweisheng/wot-design-uni/commit/3c1023c9f6e07b17f684f7a62c5c8ffc462b9808)), closes [#1170](https://github.com/Moonofweisheng/wot-design-uni/issues/1170) +* 🐛 修复 Overlay 组件锁定背景滚动属性 lock-scroll 无法取消的问题 ([#1149](https://github.com/Moonofweisheng/wot-design-uni/issues/1149)) ([f3ccf3d](https://github.com/Moonofweisheng/wot-design-uni/commit/f3ccf3d936d7224468a29f869c326d98ea8c87f8)) + + +### ✏️ Documentation | 文档 + +* ✏️ 更新微信小程序演示二维码 ([28d5970](https://github.com/Moonofweisheng/wot-design-uni/commit/28d5970a4f6a9548469fcdc2be48737c13d4014c)) +* ✏️ 添加脚手架与模板的介绍 ([27243c1](https://github.com/Moonofweisheng/wot-design-uni/commit/27243c134114a7c5c52395f22c07a33760427a33)) +* ✏️ 添加快速上手项目链接 ([ed923ec](https://github.com/Moonofweisheng/wot-design-uni/commit/ed923ecf99728813410164fe4963c520592a12a4)) +* ✏️ 文档侧边栏新增版本号显示 ([6c6d5c9](https://github.com/Moonofweisheng/wot-design-uni/commit/6c6d5c9ea3a3016bd4eb9e85e0a6ae1472c02b13)) +* ✏️ 新增咨询服务章节 ([66f796e](https://github.com/Moonofweisheng/wot-design-uni/commit/66f796e4406309c0f5ad09d1b521aab6962047c9)) +* ✏️ 修复快速上手页面存在死链的问题 ([722103c](https://github.com/Moonofweisheng/wot-design-uni/commit/722103c46dcfec530c7675f5fac4d6b4e8d6c4ea)) +* ✏️ 修复文档中 calendar 类型名 `monthrang` → `monthrange` 的拼写错误。 ([41a6fe3](https://github.com/Moonofweisheng/wot-design-uni/commit/41a6fe3647c9837e0a6cb964882e9e5812ed7b7f)) +* **backtop:** ✏️ 修正文档中 BackTop 组件的 bottom 属性描述从「距离屏幕顶部的距离」修改为「距离屏幕底部的距离」 ([5a458fc](https://github.com/Moonofweisheng/wot-design-uni/commit/5a458fc723fe0745dc7de8ffc7e50b5c7f75654d)) +* **backtop:** ✏️ 修正文档中 bottom 属性的描述 ([b0cd321](https://github.com/Moonofweisheng/wot-design-uni/commit/b0cd321c5ed4e8f6042bd85551b7efe96e891156)) +* **component:** ✏️ 移除多余的 H5 平台标题 ([f851d13](https://github.com/Moonofweisheng/wot-design-uni/commit/f851d139b1b00967fc5f2bcb1d7517a58f40adf7)) +* **datetime-picker:** 添加 before-confirm 回调中使用loading的提示 ([c61b33f](https://github.com/Moonofweisheng/wot-design-uni/commit/c61b33f51a3a8e00900ba765b72d6056b1299c0c)) +* unibest 链接地址更新 ([645e022](https://github.com/Moonofweisheng/wot-design-uni/commit/645e022094122ef3afee81c5f8059429e950a68a)) + +## [1.10.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.9.1...v1.10.0) (2025-06-29) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整微信小程序演示demo激励按钮的文案以应对微信审核 ([06323a9](https://github.com/Moonofweisheng/wot-design-uni/commit/06323a9b3228299fa9cf4ff6cd826514ced1dc32)) +* ✏️ 简化组件库通用名称为 WotUI ([8177978](https://github.com/Moonofweisheng/wot-design-uni/commit/817797801de1228d39ff399c7792d76c2652e94d)) +* ✏️ 添加 WotUI 加群凭证相关介绍 ([341b9e1](https://github.com/Moonofweisheng/wot-design-uni/commit/341b9e1c1e98699510bbdc4587782b3647d2c4ba)) +* ✏️ 修正示例 demo 源码链接地址 ([1ccdb4a](https://github.com/Moonofweisheng/wot-design-uni/commit/1ccdb4a7468ce7984ac4f17305212aebc54f62c3)), closes [#1045](https://github.com/Moonofweisheng/wot-design-uni/issues/1045) +* ✏️ 优化加群文档使其更加清晰明确 ([207dfb8](https://github.com/Moonofweisheng/wot-design-uni/commit/207dfb8c9bbf4434ec51e186886ad8dba6289153)) +* ✏️ 优秀案例改为取线上资源 ([053485b](https://github.com/Moonofweisheng/wot-design-uni/commit/053485b470419b5a451b73aec0dc03d12b7dde56)) +* ✏️ update cases ([f1ad2fa](https://github.com/Moonofweisheng/wot-design-uni/commit/f1ad2fa05efba00d89958adba5ca967eead01cfe)) + + +### ✨ Features | 新功能 + +* ✨ DatetimePicker 支持time和date-time类型下配置选择到秒 ([#1117](https://github.com/Moonofweisheng/wot-design-uni/issues/1117)) ([f2e8fda](https://github.com/Moonofweisheng/wot-design-uni/commit/f2e8fdad8026b4b8ce5d11a2e80d5a565031cdc5)), closes [#844](https://github.com/Moonofweisheng/wot-design-uni/issues/844) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 DropDownItem 自定义样式类 CustomIcon 无效的问题 ([cb408f5](https://github.com/Moonofweisheng/wot-design-uni/commit/cb408f553a2e5d84225b5dcdb447dd784992aa6b)), closes [#1119](https://github.com/Moonofweisheng/wot-design-uni/issues/1119) +* 🐛 修复 DropMenu 设置 Modal 无效的问题 ([#1125](https://github.com/Moonofweisheng/wot-design-uni/issues/1125)) ([eddbd5d](https://github.com/Moonofweisheng/wot-design-uni/commit/eddbd5d22e6cb413e5bf06a642f60f6e081a9074)), closes [#1121](https://github.com/Moonofweisheng/wot-design-uni/issues/1121) +* 🐛 修复 Input、Textarea、Search 组件设置清空后不聚焦时无法触发失焦事件的问题 ([#1046](https://github.com/Moonofweisheng/wot-design-uni/issues/1046)) ([33b5565](https://github.com/Moonofweisheng/wot-design-uni/commit/33b556546a03e240cfcb3662286cc6dc70b70263)) +* 🐛 修复 Slider 处理边界值异常的问题,优化样式和事件处理逻辑 ([#1050](https://github.com/Moonofweisheng/wot-design-uni/issues/1050)) ([0d7ed81](https://github.com/Moonofweisheng/wot-design-uni/commit/0d7ed8129c623c0b423fe8da6814417417ea3114)), closes [#1023](https://github.com/Moonofweisheng/wot-design-uni/issues/1023) +* 🐛 修复 Toast 英文断行样式错误问题 ([#1067](https://github.com/Moonofweisheng/wot-design-uni/issues/1067)) ([09dde62](https://github.com/Moonofweisheng/wot-design-uni/commit/09dde6278ed9bb0a57709c15ea4dff8da6e786cd)) +* 🐛 修复 wd-img-cropper 组件在微信小程序中旋转图片后操作卡顿的问题 ([#1112](https://github.com/Moonofweisheng/wot-design-uni/issues/1112)) ([50782a1](https://github.com/Moonofweisheng/wot-design-uni/commit/50782a16717d483f4dc7095e2f6096591999df01)) +* 🐛 修复 wd-slider 滑块不跟手的问题 ([#1114](https://github.com/Moonofweisheng/wot-design-uni/issues/1114)) ([e3dc36e](https://github.com/Moonofweisheng/wot-design-uni/commit/e3dc36e832a74029348a859adb53f06054e9eea6)) +* 🐛 修复NumberKeyboard组件使用 title 插槽未传入关闭文本时不展示头部的问题 ([#1060](https://github.com/Moonofweisheng/wot-design-uni/issues/1060)) ([875e072](https://github.com/Moonofweisheng/wot-design-uni/commit/875e072b3ea8dff270cb2214f94b95e03fa210db)), closes [#760](https://github.com/Moonofweisheng/wot-design-uni/issues/760) +* 🐛 优化 InputNumbe 处理中间状态值的逻辑,支持配置不立即响应输入变化 ([#1116](https://github.com/Moonofweisheng/wot-design-uni/issues/1116)) ([ff99b22](https://github.com/Moonofweisheng/wot-design-uni/commit/ff99b22a6930ea500539f403f23d46cd836e8bca)) +* 修复 wd-upload 组件的 formData 属性的 ts 类型为 void 的问题 ([#1106](https://github.com/Moonofweisheng/wot-design-uni/issues/1106)) ([6026137](https://github.com/Moonofweisheng/wot-design-uni/commit/60261374acb99f64298c724e1f8d1df3061bd85a)) + +### [1.9.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.9.0...v1.9.1) (2025-05-08) + + +### ✏️ Documentation | 文档 + +* ✏️ 处理小程序超包 ([08e9ee1](https://github.com/Moonofweisheng/wot-design-uni/commit/08e9ee1cb366e4c5ec87d989795d58399cb1df32)) +* ✏️ 修复部分组件二维码显示异常的问题 ([eea9bf7](https://github.com/Moonofweisheng/wot-design-uni/commit/eea9bf7aac36cfd9b7b476392c35e3db097e4891)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Upload 开启 multiple 后只能成功上传最后一个文件的问题 ([#1044](https://github.com/Moonofweisheng/wot-design-uni/issues/1044)) ([f2ae0d3](https://github.com/Moonofweisheng/wot-design-uni/commit/f2ae0d3aacab3b95b48f623623c5bf1f9acecf18)), closes [#1043](https://github.com/Moonofweisheng/wot-design-uni/issues/1043) + +## [1.9.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.8.0...v1.9.0) (2025-05-07) + + +### ⚡ Performance Improvements | 性能优化 + +* ⚡ 增强 wd-drop-menu 组件,优化遮罩层闪烁 ([#974](https://github.com/Moonofweisheng/wot-design-uni/issues/974)) ([f9605b7](https://github.com/Moonofweisheng/wot-design-uni/commit/f9605b71b667cfaad56b7b028d53ccff5112ddf8)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Curtain 幕帘组件 close 事件触发2次的问题 ([460a838](https://github.com/Moonofweisheng/wot-design-uni/commit/460a83802bad5b38d6e7063e481e510ed69dffb9)), closes [#894](https://github.com/Moonofweisheng/wot-design-uni/issues/894) +* 🐛 修复 message-box 配合 layouts 使用全局 message-box 时,切换页面可能会显示上一次的 message-box 内容的问题 ([f137a63](https://github.com/Moonofweisheng/wot-design-uni/commit/f137a6313e45e65dd23a03ae88b304e07b1a377e)) +* 🐛 修复 Textarea 设置为 null 时,显示字数限制显示错误问题 ([#1004](https://github.com/Moonofweisheng/wot-design-uni/issues/1004)) ([60f2fe6](https://github.com/Moonofweisheng/wot-design-uni/commit/60f2fe61ae77e170e2c05e1b20d256ab107ee4db)), closes [#1003](https://github.com/Moonofweisheng/wot-design-uni/issues/1003) +* 🐛 修复部分国际化文本不正确的问题 ([#970](https://github.com/Moonofweisheng/wot-design-uni/issues/970)) ([4319fa9](https://github.com/Moonofweisheng/wot-design-uni/commit/4319fa9badf3e3dd08218e8e90604c91c49b49c7)) +* 🐛 修复多个 ImgCropper 存在时生成图片异常的问题 ([1876fc3](https://github.com/Moonofweisheng/wot-design-uni/commit/1876fc3d0c21c2d9d9c45fe3096690a0bde46493)) + + +### ✨ Features | 新功能 + +* ✨ 将 Tabbar 和 Badge 设置为标准盒子模型 ([#1036](https://github.com/Moonofweisheng/wot-design-uni/issues/1036)) ([7f2ccb2](https://github.com/Moonofweisheng/wot-design-uni/commit/7f2ccb2d372c412670bfe4ac833f8dc957d994e9)) +* ✨ 提供 useUpload hooks 用于便捷上传 ([#969](https://github.com/Moonofweisheng/wot-design-uni/issues/969)) ([49fe25a](https://github.com/Moonofweisheng/wot-design-uni/commit/49fe25a99bb0c60b3a81a11ef7eb06e762fb1d25)) +* ✨ 添加组合式API文档并提供相关API ([#972](https://github.com/Moonofweisheng/wot-design-uni/issues/972)) ([b852376](https://github.com/Moonofweisheng/wot-design-uni/commit/b85237643ce217c14a304e8477487acce327ed49)) +* ✨ 添加input props.type可选类型 ([#983](https://github.com/Moonofweisheng/wot-design-uni/issues/983)) ([91776bf](https://github.com/Moonofweisheng/wot-design-uni/commit/91776bf3de9bdd6c6954ecab8024dddbdcee7e48)), closes [#981](https://github.com/Moonofweisheng/wot-design-uni/issues/981) +* ✨ 文档示例项目支持国际化切换 ([#992](https://github.com/Moonofweisheng/wot-design-uni/issues/992)) ([4ae9587](https://github.com/Moonofweisheng/wot-design-uni/commit/4ae9587d635c1ba80b8855d3b3d5a38939b1825c)) +* ✨ 移除 keyboard 虚拟键盘车牌号模式下不可用的 I、O 键 ([#1037](https://github.com/Moonofweisheng/wot-design-uni/issues/1037)) ([90c53d7](https://github.com/Moonofweisheng/wot-design-uni/commit/90c53d7e2c3208827433093023711c93610df7da)), closes [#1005](https://github.com/Moonofweisheng/wot-design-uni/issues/1005) +* ✨ 引入 vitepress-plugin-llms 优化 AI 理解 ([#1034](https://github.com/Moonofweisheng/wot-design-uni/issues/1034)) ([901c754](https://github.com/Moonofweisheng/wot-design-uni/commit/901c7548fca2bc42c597bb5780769f05e63ede96)) +* ✨ 引入vitest做组件测试 ([7e84c5c](https://github.com/Moonofweisheng/wot-design-uni/commit/7e84c5c91f3c351922e976255dc97281c1fe371b)) +* ✨ grid-item添加hover-class ([#994](https://github.com/Moonofweisheng/wot-design-uni/issues/994)) ([dfaff53](https://github.com/Moonofweisheng/wot-design-uni/commit/dfaff531cb0a78ec1201f323c5d3326ca967c1e7)) +* ✨ ImgCropper 图片剪裁支持设置裁剪框宽高比 ([#973](https://github.com/Moonofweisheng/wot-design-uni/issues/973)) ([5a3f85d](https://github.com/Moonofweisheng/wot-design-uni/commit/5a3f85df6f1e3e54954754b832b0427b67559d58)), closes [#920](https://github.com/Moonofweisheng/wot-design-uni/issues/920) +* ✨ Upload 上传组件支持根据扩展名过滤文件 ([#980](https://github.com/Moonofweisheng/wot-design-uni/issues/980)) ([51adb6b](https://github.com/Moonofweisheng/wot-design-uni/commit/51adb6b8a9911e8d64ef376b19a4aef900b52789)), closes [#796](https://github.com/Moonofweisheng/wot-design-uni/issues/796) [#581](https://github.com/Moonofweisheng/wot-design-uni/issues/581) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档中添加测试覆盖率徽标 ([4ae514c](https://github.com/Moonofweisheng/wot-design-uni/commit/4ae514c716f1c3b0cb2b05443b995eec4fb82b21)) +* ✏️ 修复全局 closeOutside 影响 DropDown 异步开关的问题 ([49e5d63](https://github.com/Moonofweisheng/wot-design-uni/commit/49e5d63dd17b48c00648bcab05cb93e743ca43ab)) +* ✏️ 移除 petercatai 聊天助手 ([5c77483](https://github.com/Moonofweisheng/wot-design-uni/commit/5c77483974189e8b22587407ff9baf484a5779da)) +* ✏️ 优化 `WdConfigProvider` 文档,解决组件命名风格问题导致失效问题 ([#989](https://github.com/Moonofweisheng/wot-design-uni/issues/989)) ([0f693f9](https://github.com/Moonofweisheng/wot-design-uni/commit/0f693f9784224ee0949d4a7efc66985224bf0d5b)) +* ✏️ update cases ([a200337](https://github.com/Moonofweisheng/wot-design-uni/commit/a2003378636a25c253a8596f5afbbbcf6ad3e419)) + +## [1.8.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.7.1...v1.8.0) (2025-03-23) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 DateTimePicker 区域选择时边界值处理错误的问题 ([230e09f](https://github.com/Moonofweisheng/wot-design-uni/commit/230e09ff2ac25550b0efc2628827b70162041aad)) +* 🐛 修复 drop-menu-item 有选项值为空字符串时导致新值错误并触发组件内部警告的问题 ([f63de5b](https://github.com/Moonofweisheng/wot-design-uni/commit/f63de5bd1d3453e844c058a9f185c0a5e56bcf67)) +* 🐛 修复在template中使用readonly无法通过vue-ts校验的问题 ([ee5b25f](https://github.com/Moonofweisheng/wot-design-uni/commit/ee5b25fbc36a24cab02576757226f26fb9e27777)) +* 🐛 修复input、textarea组件placeholder样式在微信小程序无效的问题 ([#944](https://github.com/Moonofweisheng/wot-design-uni/issues/944)) ([1ac115f](https://github.com/Moonofweisheng/wot-design-uni/commit/1ac115fdac310760e630e8745b438f96c6b88386)), closes [#943](https://github.com/Moonofweisheng/wot-design-uni/issues/943) +* 🐛 修复textarea统计多码元字符长度错误的问题 ([#940](https://github.com/Moonofweisheng/wot-design-uni/issues/940)) ([f9d8523](https://github.com/Moonofweisheng/wot-design-uni/commit/f9d85232c4142f0c957fa3c829dd3321c7ad56e5)), closes [#933](https://github.com/Moonofweisheng/wot-design-uni/issues/933) +* **picker:** clear selected value and options when columns is emptied ([496cb73](https://github.com/Moonofweisheng/wot-design-uni/commit/496cb732b1ab0e69517d629e147b673692631f98)), closes [#935](https://github.com/Moonofweisheng/wot-design-uni/issues/935) + + +### ✨ Features | 新功能 + +* ✨ Img 组件添加预览图片属性 ([#945](https://github.com/Moonofweisheng/wot-design-uni/issues/945)) ([34a4878](https://github.com/Moonofweisheng/wot-design-uni/commit/34a48783f37a56fb6ed7a77dd29ee5a406bf989a)) +* ✨ 废弃 DateTimePicker 开启插槽开关use-label-slot和use-default-slot ([8d9e5c6](https://github.com/Moonofweisheng/wot-design-uni/commit/8d9e5c66589f1b6eed5faa093f2c28cf2640f5b5)) +* ✨ 新增 InputNumber 组件支持长按加减功能 ([#910](https://github.com/Moonofweisheng/wot-design-uni/issues/910)) ([9437087](https://github.com/Moonofweisheng/wot-design-uni/commit/94370876e4ce91faec6e10db5e413dfa27d0f4c2)) +* ✨ 重构 Signature 签字板历史记录模式并添加压感模式和横屏示例 ([#967](https://github.com/Moonofweisheng/wot-design-uni/issues/967)) ([aad3e83](https://github.com/Moonofweisheng/wot-design-uni/commit/aad3e8332b4cb6a1f9c0a3c81e9fb7d5068f09b3)) +* ✨ Signature 添加历史记录和历史记录步长(包含文档添加、i18n、代码示例) ([#889](https://github.com/Moonofweisheng/wot-design-uni/issues/889)) ([10ec731](https://github.com/Moonofweisheng/wot-design-uni/commit/10ec731b8986f7bf5903a923fe7f1f7d78623ecf)) +* extend wd-fab component with 4 new positions and update docs ([6f12aa4](https://github.com/Moonofweisheng/wot-design-uni/commit/6f12aa4b04477a2b1f8535e272699333ceb0b9f6)) + + +### ✏️ Documentation | 文档 + +* ✏️ 接入 petercatai 聊天助手 ([34f0299](https://github.com/Moonofweisheng/wot-design-uni/commit/34f02997dd79f88de89da79791d5a6c056367e8a)) +* ✏️ 添加优秀案例页面 ([ef7c98b](https://github.com/Moonofweisheng/wot-design-uni/commit/ef7c98bffb843129d872c8ebc6a1bbaf7d8437bf)) +* ✏️ 新增优秀案例——随享小栈 ([2040230](https://github.com/Moonofweisheng/wot-design-uni/commit/2040230064989bf4816932870920f52ae0797bf2)) +* ✏️ 修复 Navbar 文档部分标题显示 Tabbar 的问题 ([b4b4d59](https://github.com/Moonofweisheng/wot-design-uni/commit/b4b4d594fc29fe1f947b6ea7e8b5b90cc3f58013)) +* ✏️ 修复部分文档拼写错误 ([#911](https://github.com/Moonofweisheng/wot-design-uni/issues/911)) ([15613b3](https://github.com/Moonofweisheng/wot-design-uni/commit/15613b393aaf750a85e03512c41ffed473471228)) +* fix drop-menu demo code type error ([#905](https://github.com/Moonofweisheng/wot-design-uni/issues/905)) ([0c32c29](https://github.com/Moonofweisheng/wot-design-uni/commit/0c32c29969a8fcb748409a17a06cf277202a18a7)) + +### [1.7.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.7.0...v1.7.1) (2025-02-19) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 InputNumber 微信小程序设置了precision后无法输入小数点的问题 ([#902](https://github.com/Moonofweisheng/wot-design-uni/issues/902)) ([e3a03b1](https://github.com/Moonofweisheng/wot-design-uni/commit/e3a03b1dbb6640b76a3034daeebd88d42252508c)), closes [#878](https://github.com/Moonofweisheng/wot-design-uni/issues/878) +* 🐛 修复 Upload 文档自定义唤起上传样式的示例错误的问题 ([3dfa69c](https://github.com/Moonofweisheng/wot-design-uni/commit/3dfa69c282514bd786d3822963f3f1dd18089eb9)) +* 🐛 修复分页组件为0时不更新页数问题 ([#903](https://github.com/Moonofweisheng/wot-design-uni/issues/903)) ([604faeb](https://github.com/Moonofweisheng/wot-design-uni/commit/604faebf4bb19eca96ba84ee48424be12ee72ba3)), closes [#897](https://github.com/Moonofweisheng/wot-design-uni/issues/897) +* 🐛 修复web-types可选值/默认值类型识别错误 ([#899](https://github.com/Moonofweisheng/wot-design-uni/issues/899)) ([8b4d2ed](https://github.com/Moonofweisheng/wot-design-uni/commit/8b4d2ed14b6340003c63d10e31c02f058bed3ef0)) + + +### ✏️ Documentation | 文档 + +* ✏️ 优化demo项目的展示方便支付宝平台提审 ([c48a67b](https://github.com/Moonofweisheng/wot-design-uni/commit/c48a67b027b9b3f66f0b051ee34bde163feda6cf)) + +## [1.7.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.6.1...v1.7.0) (2025-02-16) + + +### ✨ Features | 新功能 + +* ✨ 添加 web-type.json 支持 webstorm 代码提示 ([#871](https://github.com/Moonofweisheng/wot-design-uni/issues/871)) ([4575099](https://github.com/Moonofweisheng/wot-design-uni/commit/4575099b9ba580fee2c03e8f8660bbfd9aa70aa3)), closes [#819](https://github.com/Moonofweisheng/wot-design-uni/issues/819) +* ✨ 重构 Curtain 优化控制展示隐藏的实现逻辑 ([#895](https://github.com/Moonofweisheng/wot-design-uni/issues/895)) ([0e31950](https://github.com/Moonofweisheng/wot-design-uni/commit/0e3195059e0843045533b7ff89b9a3613c5449a8)) +* ✨ ActionSheet 支持 close-on-click-action 控制点击选项后是否关闭菜单功能 ([#891](https://github.com/Moonofweisheng/wot-design-uni/issues/891)) ([a1b035a](https://github.com/Moonofweisheng/wot-design-uni/commit/a1b035a6fe3a9ae3a023032b6c33403853424559)), closes [#698](https://github.com/Moonofweisheng/wot-design-uni/issues/698) +* ✨ NavbarCapsule 导航胶囊组件支持外部传入样式 ([fb980e7](https://github.com/Moonofweisheng/wot-design-uni/commit/fb980e7d9bd90c76570d2069a9d41a6c1187ef30)) +* ✨ Rate 评分新增支持半选和触摸滑动选中 ([#896](https://github.com/Moonofweisheng/wot-design-uni/issues/896)) ([9d34f2e](https://github.com/Moonofweisheng/wot-design-uni/commit/9d34f2e5d90cca1820d69100bca7c546ce16fb0e)), closes [#669](https://github.com/Moonofweisheng/wot-design-uni/issues/669) +* ✨ Toast 支持设置布局方向 ([ed60852](https://github.com/Moonofweisheng/wot-design-uni/commit/ed60852432999d295e4af2efe9f1ee86e235e1ee)), closes [#780](https://github.com/Moonofweisheng/wot-design-uni/issues/780) +* ✨ Toast 支持通过props设置组件属性并新增局中显示的配置 ([#888](https://github.com/Moonofweisheng/wot-design-uni/issues/888)) ([ebbe7e4](https://github.com/Moonofweisheng/wot-design-uni/commit/ebbe7e407904df428564dcf53e5141c14d9e7daa)) + + +### ✏️ Documentation | 文档 + +* ✏️ 标注 Form 组件支持不校验隐藏子组件的版本 ([e5a24c4](https://github.com/Moonofweisheng/wot-design-uni/commit/e5a24c4873baa9db62ad1ab6f3adb078dac89dc2)) +* ✏️ 新增关于页面展示主要团队成员信息 ([031107d](https://github.com/Moonofweisheng/wot-design-uni/commit/031107d5888c2887ea40d47810239cd398f042ef)) +* ✏️ 修复 SwipeAction 文档示例拼写错误的问题 ([1dc48cf](https://github.com/Moonofweisheng/wot-design-uni/commit/1dc48cfce9773a0ec60dd2b6cb8fd6c60bb63281)) +* ✏️ 修复文档拼写的错误 ([8f8cb10](https://github.com/Moonofweisheng/wot-design-uni/commit/8f8cb1077aa318e9fb067dfeebdd04dfbdb12412)) +* ✏️ fix create-uni command error ([#874](https://github.com/Moonofweisheng/wot-design-uni/issues/874)) ([a0da88c](https://github.com/Moonofweisheng/wot-design-uni/commit/a0da88c5db21b7127de9342aabcf6961b611e22d)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 InputNumber 设置了precision后无法输入小数点的问题 ([#886](https://github.com/Moonofweisheng/wot-design-uni/issues/886)) ([dd1a005](https://github.com/Moonofweisheng/wot-design-uni/commit/dd1a00596472023c9b6e545dbf2a9a8238e67baf)), closes [#878](https://github.com/Moonofweisheng/wot-design-uni/issues/878) +* 🐛 修复 Swiper 在微信小程序平台轮播视频时在iOS平台全屏展示异常的问题 ([#898](https://github.com/Moonofweisheng/wot-design-uni/issues/898)) ([34a15ac](https://github.com/Moonofweisheng/wot-design-uni/commit/34a15ac0786d003825491cc9fa2a8961b307c0d2)), closes [#885](https://github.com/Moonofweisheng/wot-design-uni/issues/885) +* 🐛 修复 Tabs 组件导航地图标题不生效的问题 ([#869](https://github.com/Moonofweisheng/wot-design-uni/issues/869)) ([ccf976a](https://github.com/Moonofweisheng/wot-design-uni/commit/ccf976ad631b4ad0272d4897a6245cdd8f13fa4b)) +* 🐛 修复 Upload 组件自定义上传方法不支持asyncfunction的问题 ([#890](https://github.com/Moonofweisheng/wot-design-uni/issues/890)) ([25649db](https://github.com/Moonofweisheng/wot-design-uni/commit/25649dbca55059cb425ba7d7b4e0af7884366dce)), closes [#859](https://github.com/Moonofweisheng/wot-design-uni/issues/859) + +### [1.6.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.6.0...v1.6.1) (2025-01-20) + + +### ✏️ Documentation | 文档 + +* ✏️ 更新文档小程序二维码 ([a5f862b](https://github.com/Moonofweisheng/wot-design-uni/commit/a5f862bdbea6a84df7ad2e3bef4456baae040ae8)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Search placeholder 样式丢失的问题 ([#857](https://github.com/Moonofweisheng/wot-design-uni/issues/857)) ([40565d1](https://github.com/Moonofweisheng/wot-design-uni/commit/40565d19688f6776cdb4ea4b9fc3f6cbaeb4dc66)), closes [#856](https://github.com/Moonofweisheng/wot-design-uni/issues/856) + +## [1.6.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.5.1...v1.6.0) (2025-01-18) + + +### ✏️ Documentation | 文档 + +* ✏️ 常见问题添加Vue 3.3+使用defineOptions设置styleIsolation规则的介绍 ([f3bee13](https://github.com/Moonofweisheng/wot-design-uni/commit/f3bee13b46ccbb8856b9051a99ed2b5356dc0d8e)), closes [#784](https://github.com/Moonofweisheng/wot-design-uni/issues/784) +* ✏️ 更新组件库互助群二维码 ([9b50d6c](https://github.com/Moonofweisheng/wot-design-uni/commit/9b50d6c6922e34c964621cff926565cb9fb723ab)) +* ✏️ 添加互助交流QQ群3群二维码 ([1d0b11b](https://github.com/Moonofweisheng/wot-design-uni/commit/1d0b11b25621b7b585fe1e047093d07861c88a30)) +* ✏️ 微信小程序演示demo提供激励视频广告页面 ([#783](https://github.com/Moonofweisheng/wot-design-uni/issues/783)) ([7ed7dd3](https://github.com/Moonofweisheng/wot-design-uni/commit/7ed7dd3495c84f91ed5e77870da7e5845fc28a94)) +* ✏️ 修复 Tooltip 文档显示异常的问题 ([c89eb92](https://github.com/Moonofweisheng/wot-design-uni/commit/c89eb927a21e0f4e10d317346c31ab45d322720d)) +* ✏️ 演示demo小程序支持分享 ([583acc2](https://github.com/Moonofweisheng/wot-design-uni/commit/583acc2fa942422469abcab5f805a54c72614d69)) +* ✏️ 优化演示demo支持在顶部显示对应页面微信小程序的二维码 ([b1f42af](https://github.com/Moonofweisheng/wot-design-uni/commit/b1f42af640a32d8c9119331a19fe0495a908b16c)) +* ✏️修改自定义样式描述 [#772](https://github.com/Moonofweisheng/wot-design-uni/issues/772) ([1ac352d](https://github.com/Moonofweisheng/wot-design-uni/commit/1ac352da9539e60ac79bd1ec10768e08e4d49ff3)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Calendar 为周选择时跨年周的单元格值显示错误的问题 ([#854](https://github.com/Moonofweisheng/wot-design-uni/issues/854)) ([c0d48b2](https://github.com/Moonofweisheng/wot-design-uni/commit/c0d48b25c11af87629e7feedc6cd0cc3a70b37e4)) +* 🐛 修复 Divider 分割线组件 CustomClass 未生效的问题 ([#790](https://github.com/Moonofweisheng/wot-design-uni/issues/790)) ([44df081](https://github.com/Moonofweisheng/wot-design-uni/commit/44df081dbd80771a9df122be4e3953034194308f)), closes [#789](https://github.com/Moonofweisheng/wot-design-uni/issues/789) +* 🐛 修复 Form 表单 validator 校验不通过且未指定错误信息时无法显示校验信息的问题 ([#791](https://github.com/Moonofweisheng/wot-design-uni/issues/791)) ([bdb5653](https://github.com/Moonofweisheng/wot-design-uni/commit/bdb56537db7fbec59224ebf5aecd3e7a6354424c)) +* 🐛 修复Button初始化margin的问题 ([#831](https://github.com/Moonofweisheng/wot-design-uni/issues/831)) ([3836309](https://github.com/Moonofweisheng/wot-design-uni/commit/38363097a5fbf4c0c7116abd536f90936d2fa86d)) +* 🐛 修复Card footer或者header没写的时候,不会自动隐藏占位 ([8d528cb](https://github.com/Moonofweisheng/wot-design-uni/commit/8d528cb9c06c48456016e0a4cce1cf0699b7311b)) +* 🐛 修复Form组件rules属性,没有按照顺序执行问题 ([#808](https://github.com/Moonofweisheng/wot-design-uni/issues/808)) ([834cd8e](https://github.com/Moonofweisheng/wot-design-uni/commit/834cd8e3f08919800189c1d2710267d4aa99a8d5)), closes [#799](https://github.com/Moonofweisheng/wot-design-uni/issues/799) [#799](https://github.com/Moonofweisheng/wot-design-uni/issues/799) [#799](https://github.com/Moonofweisheng/wot-design-uni/issues/799) +* 🐛 修复Input初始化修改失败的问题 ([#814](https://github.com/Moonofweisheng/wot-design-uni/issues/814)) ([04e9a50](https://github.com/Moonofweisheng/wot-design-uni/commit/04e9a50ede30337c35e9f28b7f7985f3e717a91f)) +* 🐛 修复Picker文档初始选项code错误的问题 ([67f675d](https://github.com/Moonofweisheng/wot-design-uni/commit/67f675d1cc4764e25d357b91c17ad276612340a1)) +* 🐛 修复popover tooltip组件visibleArrow=false时弹出框距离元素间距过远的问题 ([#792](https://github.com/Moonofweisheng/wot-design-uni/issues/792)) ([3b6d10d](https://github.com/Moonofweisheng/wot-design-uni/commit/3b6d10dbb93188adb3aea3fc9f7d1b763b4d5ec9)), closes [#788](https://github.com/Moonofweisheng/wot-design-uni/issues/788) + + +### ✨ Features | 新功能 + +* ✨ 新增Signature签名组件 ([0ad8fcc](https://github.com/Moonofweisheng/wot-design-uni/commit/0ad8fcce28f5692572aeae79f0cc7315aa6e5b54)), closes [#505](https://github.com/Moonofweisheng/wot-design-uni/issues/505) +* ✨ 修复 InputNumber 在设置为 allow-null 时被赋值为空时未触发更新的问题并支持异步更新 ([#812](https://github.com/Moonofweisheng/wot-design-uni/issues/812)) ([0fc90dd](https://github.com/Moonofweisheng/wot-design-uni/commit/0fc90ddcc9b5d478fe3e5bf84e2e780c48a8a341)) +* ✨ 修复Img组件在错误状态下可以预览的问题 ([dbd2c85](https://github.com/Moonofweisheng/wot-design-uni/commit/dbd2c85b83b0992e791c0b828a12f182d4923b81)) +* ✨ Calendar 确认事件 confirm 增加 `type` 参数 ([e0fca91](https://github.com/Moonofweisheng/wot-design-uni/commit/e0fca9161e8282871b2126ecc82999bc9530eb6b)) +* ✨ Form 表单 validate 方法支持传入数组 ([#829](https://github.com/Moonofweisheng/wot-design-uni/issues/829)) ([8e6096a](https://github.com/Moonofweisheng/wot-design-uni/commit/8e6096ab7459b9164ef1ec9b366becf9acc7ab83)), closes [#797](https://github.com/Moonofweisheng/wot-design-uni/issues/797) +* ✨ Search新增customInputClass,placeholderClass等属性 ([#845](https://github.com/Moonofweisheng/wot-design-uni/issues/845)) ([03623f4](https://github.com/Moonofweisheng/wot-design-uni/commit/03623f4989b6bfbf53588058c632eb2f2e830bfd)), closes [#299](https://github.com/Moonofweisheng/wot-design-uni/issues/299) +* ✨ Swiper 轮播视频支持控制静音播放和循环播放 ([#855](https://github.com/Moonofweisheng/wot-design-uni/issues/855)) ([7a0d5ce](https://github.com/Moonofweisheng/wot-design-uni/commit/7a0d5ce9720020e3f0fb148f7b65db129ceb82af)), closes [#846](https://github.com/Moonofweisheng/wot-design-uni/issues/846) +* ✨ Swiper 轮播项type字段的处理逻辑限制在可选值范围内 ([#785](https://github.com/Moonofweisheng/wot-design-uni/issues/785)) ([1fd0a27](https://github.com/Moonofweisheng/wot-design-uni/commit/1fd0a27788db2b467bc53e83a6a4953e5d134c53)) + +### [1.5.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.5.0...v1.5.1) (2024-12-10) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 调整 Upload 的覆盖上传参数 reupload 默认值为 false ([d9ce000](https://github.com/Moonofweisheng/wot-design-uni/commit/d9ce00010a15ae8e168e082a2c4f3a50cf61fa13)) + +## [1.5.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.4.0...v1.5.0) (2024-12-09) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Button 按钮设置为 block 无效的问题 ([#762](https://github.com/Moonofweisheng/wot-design-uni/issues/762)) ([ea8bc66](https://github.com/Moonofweisheng/wot-design-uni/commit/ea8bc6671012a811f49027062e6e7f8f1359a175)) +* 🐛 修复 Cell 设置 label 过长时影响页面结构的问题 ([70058f2](https://github.com/Moonofweisheng/wot-design-uni/commit/70058f2270788fb9d7edd56eff35bd2cbebcd99e)) +* 🐛 修复 Collapse v-model绑定数据变化时未更新折叠面板状态的问题 ([#744](https://github.com/Moonofweisheng/wot-design-uni/issues/744)) ([09f7f9c](https://github.com/Moonofweisheng/wot-design-uni/commit/09f7f9caf5e381ef44fb9a31965f8d2d70d4e271)), closes [#741](https://github.com/Moonofweisheng/wot-design-uni/issues/741) +* 🐛 修复 GridItem 徽标属性类型标注错误的问题 ([c018560](https://github.com/Moonofweisheng/wot-design-uni/commit/c018560b7d3087b89b759b3c83aff91c74354021)), closes [#766](https://github.com/Moonofweisheng/wot-design-uni/issues/766) +* 🐛 修复 Progress 无法设置进度为 0 的问题 ([#748](https://github.com/Moonofweisheng/wot-design-uni/issues/748)) ([c136f54](https://github.com/Moonofweisheng/wot-design-uni/commit/c136f54cda6164ab3653d47342d7c88c5f515efc)), closes [#747](https://github.com/Moonofweisheng/wot-design-uni/issues/747) +* 🐛 修复 Swiper 在支付宝小程序平台点击事件无效的问题 ([f63bf10](https://github.com/Moonofweisheng/wot-design-uni/commit/f63bf101338d7f9d2f72c5941d3405950544a1d7)) +* 🐛 修复 Tab 未渲染项高度会影响整体高度的问题 ([5e06378](https://github.com/Moonofweisheng/wot-design-uni/commit/5e063781a3b58f94f107816473600ce95f3761e9)) +* 🐛 修复 vue-tsc 校验不通过的问题 ([#753](https://github.com/Moonofweisheng/wot-design-uni/issues/753)) ([a90f4ad](https://github.com/Moonofweisheng/wot-design-uni/commit/a90f4ad2f2b68bb79f30a2e6973a4e149b7ba66e)), closes [#752](https://github.com/Moonofweisheng/wot-design-uni/issues/752) +* 🐛 修复微信小程序在iOS设备上处于后台一段时间后抖动的问题 ([6091566](https://github.com/Moonofweisheng/wot-design-uni/commit/6091566380c7c129fca284eb4e5a2ba6e447a7ab)), closes [#694](https://github.com/Moonofweisheng/wot-design-uni/issues/694) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整文档结构增加文档内容可用宽度,支持收起演示demo ([#765](https://github.com/Moonofweisheng/wot-design-uni/issues/765)) ([402f73f](https://github.com/Moonofweisheng/wot-design-uni/commit/402f73f6ee8aa7d022b640333e6bfef4311fdc6f)) +* ✏️ 添加 MessageBox 自定义按钮样式的文档 ([46b1c39](https://github.com/Moonofweisheng/wot-design-uni/commit/46b1c394a024c293fb07c7788691e2ac572a2fa1)) +* ✏️ 添加关于Sass的介绍 ([995a65f](https://github.com/Moonofweisheng/wot-design-uni/commit/995a65f8451801062ae83f0f71470d0c428dba7f)) +* ✏️ 优化 Cell 关于 clickable 和 is-link 的介绍 ([6f58e72](https://github.com/Moonofweisheng/wot-design-uni/commit/6f58e72b1d5436326052a79da19e21d071ab9b3c)) +* ✏️ 增加 ConfigProvider 组件设定全局共享示例 ([#758](https://github.com/Moonofweisheng/wot-design-uni/issues/758)) ([356cb4a](https://github.com/Moonofweisheng/wot-design-uni/commit/356cb4ad11791366138002233754b2d2e79d5d18)) +* ✏️ Table 表格组件提供结合分页器使用的demo ([#738](https://github.com/Moonofweisheng/wot-design-uni/issues/738)) ([fb7580d](https://github.com/Moonofweisheng/wot-design-uni/commit/fb7580df7eee7d81d3826c399e565975cef81625)) + + +### ✨ Features | 新功能 + +* ✨ 优化 Divider 分割线功能支持虚线、垂直等功能 ([#737](https://github.com/Moonofweisheng/wot-design-uni/issues/737)) ([1b9d7e6](https://github.com/Moonofweisheng/wot-design-uni/commit/1b9d7e625256b365a381b30e902bb54692d636cf)) +* ✨ Calendar 优化选中样式和滚动位置处理并支持屏蔽内置cell ([#768](https://github.com/Moonofweisheng/wot-design-uni/issues/768)) ([97c4004](https://github.com/Moonofweisheng/wot-design-uni/commit/97c40047e8ed46af31d4c1647056d90c2edf4842)) +* ✨ Curtain 幕帘新增 close 插槽和自定义关闭插槽样式类 ([#746](https://github.com/Moonofweisheng/wot-design-uni/issues/746)) ([7bc3592](https://github.com/Moonofweisheng/wot-design-uni/commit/7bc359205deb99899baf01c733af9690b12703fa)), closes [#648](https://github.com/Moonofweisheng/wot-design-uni/issues/648) +* ✨ DropMenuItem 增加自定 Popup 样式参数 ([28ad03b](https://github.com/Moonofweisheng/wot-design-uni/commit/28ad03b7afdd38a86f168d15a7c0f3564d122101)) +* ✨ Input、Textarea在APP-VUE和H5端支持inputmode ([#771](https://github.com/Moonofweisheng/wot-design-uni/issues/771)) ([9ceb2e8](https://github.com/Moonofweisheng/wot-design-uni/commit/9ceb2e807e33edd3937db5f57a4306f1ce719cff)), closes [#743](https://github.com/Moonofweisheng/wot-design-uni/issues/743) +* ✨ MessageBox 新增确认、取消按钮的 ButtonProps 属性 ([#761](https://github.com/Moonofweisheng/wot-design-uni/issues/761)) ([80682ba](https://github.com/Moonofweisheng/wot-design-uni/commit/80682ba933427fac7bfefc6c692cd058a14163c5)), closes [#740](https://github.com/Moonofweisheng/wot-design-uni/issues/740) +* ✨ Radio添加icon-placement属性用于控制图标方向 ([#763](https://github.com/Moonofweisheng/wot-design-uni/issues/763)) ([b06a7a7](https://github.com/Moonofweisheng/wot-design-uni/commit/b06a7a751b3115c8e3909af4cbe595684ed9d00f)), closes [#371](https://github.com/Moonofweisheng/wot-design-uni/issues/371) +* ✨ Segmented 提供 updateActiveStyle 方法设置激活样式 ([529e57f](https://github.com/Moonofweisheng/wot-design-uni/commit/529e57fc83b00482f101e84cf0437627e140a59f)) +* ✨ Table 支持设置不固定表头 ([#769](https://github.com/Moonofweisheng/wot-design-uni/issues/769)) ([b0a2461](https://github.com/Moonofweisheng/wot-design-uni/commit/b0a2461a1a6f9691502a1f4a1a06ec4103fabd4b)) +* ✨ Upload 支持文件重传 ([3cd5137](https://github.com/Moonofweisheng/wot-design-uni/commit/3cd5137129ae13f90744a5d0038686cef5602d8c)) + +## [1.4.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.14...v1.4.0) (2024-11-24) + + +### ✨ Features | 新功能 + +* ✨ Curtain 幕帘组件支持设置 z-index ([a1e20af](https://github.com/Moonofweisheng/wot-design-uni/commit/a1e20afef34704e518a96d4b4cb248cab3b7a8b6)) +* ✨ Siderbar 侧边栏添加before-change属性支持异步更新 ([#721](https://github.com/Moonofweisheng/wot-design-uni/issues/721)) ([1f5801d](https://github.com/Moonofweisheng/wot-design-uni/commit/1f5801d3f4c2cfc1b3990d74077e18ea88e8d7f8)), closes [#711](https://github.com/Moonofweisheng/wot-design-uni/issues/711) +* ✨ Swiper 支持指定轮播项的文件类型 ([#720](https://github.com/Moonofweisheng/wot-design-uni/issues/720)) ([1e039cb](https://github.com/Moonofweisheng/wot-design-uni/commit/1e039cb7073d57bd19f59d4ffbb95c74b5cdc42f)), closes [#712](https://github.com/Moonofweisheng/wot-design-uni/issues/712) +* ✨ Tab 添加 lazy 属性支持配置是否开启懒加载 ([bb5b193](https://github.com/Moonofweisheng/wot-design-uni/commit/bb5b19325fc2a0f4d13d353ee9bc8cfbf8605daa)), closes [#641](https://github.com/Moonofweisheng/wot-design-uni/issues/641) +* ✨ Tabs 新增 `autoLineWidth` 设置底部条宽度自动同步文本内容' ([#679](https://github.com/Moonofweisheng/wot-design-uni/issues/679)) ([cb7cbf3](https://github.com/Moonofweisheng/wot-design-uni/commit/cb7cbf33250e3711d631271b1bbcb5f6829e75fa)) +* ✨ Tabs 新增map-title属性支持修改导航地图标题 ([0b7605f](https://github.com/Moonofweisheng/wot-design-uni/commit/0b7605f3ef2ca11cedc2cc61a3eb93e0757e6b86)), closes [#670](https://github.com/Moonofweisheng/wot-design-uni/issues/670) +* ✨ Tabs 支持设置徽标 ([#724](https://github.com/Moonofweisheng/wot-design-uni/issues/724)) ([cd20581](https://github.com/Moonofweisheng/wot-design-uni/commit/cd20581ca6f75a67995a0cf562f524d82e357bbc)), closes [#689](https://github.com/Moonofweisheng/wot-design-uni/issues/689) [#672](https://github.com/Moonofweisheng/wot-design-uni/issues/672) +* ✨ tabs支持左对齐 ([#718](https://github.com/Moonofweisheng/wot-design-uni/issues/718)) ([314c2e8](https://github.com/Moonofweisheng/wot-design-uni/commit/314c2e8c9d08e806dd0ec78fd4b2aa5e536af8f8)), closes [#380](https://github.com/Moonofweisheng/wot-design-uni/issues/380) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Collapse 使用 toggleAall 方法时不会触发 before-expand 钩子的问题 ([#727](https://github.com/Moonofweisheng/wot-design-uni/issues/727)) ([02aa5ce](https://github.com/Moonofweisheng/wot-design-uni/commit/02aa5ceb78713f210d97ecc29f18618084b93096)) +* 🐛 修复 CollapseItem 在微信小程序平台使用 title 插槽时宽度无法撑满的问题 ([4f1d945](https://github.com/Moonofweisheng/wot-design-uni/commit/4f1d9452ecd5054a636fb51871369ee1f183e1f1)) +* 🐛 修复 DateTimePicker 设置为 time 类型时绑定值无法设置为空数组的问题 ([443ac92](https://github.com/Moonofweisheng/wot-design-uni/commit/443ac929820327339062a608ef94db43bdaafb27)), closes [#706](https://github.com/Moonofweisheng/wot-design-uni/issues/706) +* 🐛 修复 FloadingPanel 设置 height 不生效的问题 ([#725](https://github.com/Moonofweisheng/wot-design-uni/issues/725)) ([3cc1805](https://github.com/Moonofweisheng/wot-design-uni/commit/3cc18058aee83ed0abbf804595e38d7934490f4a)), closes [#703](https://github.com/Moonofweisheng/wot-design-uni/issues/703) +* 🐛 修复 Slider 滑块处于极值时会遮挡max和min的问题 ([aa8834d](https://github.com/Moonofweisheng/wot-design-uni/commit/aa8834df630286882425778263ea9ff68811c928)), closes [#714](https://github.com/Moonofweisheng/wot-design-uni/issues/714) +* 🐛 修复 wd-select-picker 组件单选搜索高亮 class 错误 ([7d461a5](https://github.com/Moonofweisheng/wot-design-uni/commit/7d461a54d09b14273fd18ff37310ecf754cf5138)) +* 🐛 修复Collapse折叠面板组件内容溢出问题 ([#710](https://github.com/Moonofweisheng/wot-design-uni/issues/710)) ([4bf8d1e](https://github.com/Moonofweisheng/wot-design-uni/commit/4bf8d1e300c28f405402582dd32fde4245d9ed47)) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整文档中gitee镜像仓库的地址 ([a40dd9f](https://github.com/Moonofweisheng/wot-design-uni/commit/a40dd9f63e52cf178be2fd9a93904cdf26e23f14)) +* ✏️ 调整join-group页面加群的问题 ([9a70d89](https://github.com/Moonofweisheng/wot-design-uni/commit/9a70d89be1e369dc2ea2a4babd3b3fdb326fcecc)) +* ✏️ 添加 Cell 单元格 border 属性的文档 ([fad777d](https://github.com/Moonofweisheng/wot-design-uni/commit/fad777dfa8cf8dcf26288a9f975927dc3de2e80d)), closes [#653](https://github.com/Moonofweisheng/wot-design-uni/issues/653) +* ✏️ 添加关于 Button 自定义样式设置阴影的文档 ([c38321f](https://github.com/Moonofweisheng/wot-design-uni/commit/c38321f69c8f4fcb572cb40c8eef38cf4fa20eae)), closes [#731](https://github.com/Moonofweisheng/wot-design-uni/issues/731) +* ✏️ 文档新增演示页面源码和组件源码链接 ([330e8c7](https://github.com/Moonofweisheng/wot-design-uni/commit/330e8c7bbfc792f4a29cdaa08dec8b35c75b2a30)) +* ✏️ 优化 NoticeBar 垂直滚动示例 ([ff1d377](https://github.com/Moonofweisheng/wot-design-uni/commit/ff1d37723b38169fc1a1f75676a8464343b42bec)) +* ✏️ 增加 Input 字数限制的示例 ([5aa1c00](https://github.com/Moonofweisheng/wot-design-uni/commit/5aa1c00acd72f17cea108ffccecc427711e2cbdb)) +* ✏️ 增加关于Tabs属性autoLineWidth的介绍和最低版本要求 ([08e7d77](https://github.com/Moonofweisheng/wot-design-uni/commit/08e7d774c6b6886fe3f79431b4728176e267144f)) + +### [1.3.14](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.13...v1.3.14) (2024-11-09) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Curtain 幕帘组件在某些情况下关闭按钮不显示的问题 ([8c0e978](https://github.com/Moonofweisheng/wot-design-uni/commit/8c0e97831445183662ce0af79210117eb77e63e9)), closes [#690](https://github.com/Moonofweisheng/wot-design-uni/issues/690) +* 🐛 修复Picker和SelectPicker清空按钮颜色与Input不统一的问题 ([#700](https://github.com/Moonofweisheng/wot-design-uni/issues/700)) ([8fdbfa3](https://github.com/Moonofweisheng/wot-design-uni/commit/8fdbfa319a5c0c5895a3162b56cd3225c54a24d2)) +* 🐛 修复upload组件header默认值错误的问题 ([4cfd1e5](https://github.com/Moonofweisheng/wot-design-uni/commit/4cfd1e568d55eed9efe9cc1dadcc30dd571d3b36)), closes [#691](https://github.com/Moonofweisheng/wot-design-uni/issues/691) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档添加生活小工具 ([6f44a63](https://github.com/Moonofweisheng/wot-design-uni/commit/6f44a631ac067a7321ff0cb6ea8ebaabbc64bd9b)) +* ✏️ 文档中添加wot-demo的介绍 ([66fff60](https://github.com/Moonofweisheng/wot-design-uni/commit/66fff6009b261a62be96d4c279d83833c70a8a0f)) +* ✏️ 增加create-uni创建快速上手项目的介绍 ([92aa1ef](https://github.com/Moonofweisheng/wot-design-uni/commit/92aa1efe68f4a9bd52942122b2f063384eb885fc)) + + +### ✨ Features | 新功能 + +* ✨ 使用Transition重构Popup为center类型的Popup添加zoom-in动画 ([#699](https://github.com/Moonofweisheng/wot-design-uni/issues/699)) ([0dd34d0](https://github.com/Moonofweisheng/wot-design-uni/commit/0dd34d06492f9d071ce6c11aa82789fbcc5cd442)), closes [#687](https://github.com/Moonofweisheng/wot-design-uni/issues/687) +* ✨ 移除Switch默认的size支持在不指定size的情况下使用css变量设置组件尺寸 ([5e55da4](https://github.com/Moonofweisheng/wot-design-uni/commit/5e55da4839677c63534148d4664dbde1c9f950b2)), closes [#516](https://github.com/Moonofweisheng/wot-design-uni/issues/516) +* ✨ 优化Toast、Message和Notify组件的函数式调用方案 ([#696](https://github.com/Moonofweisheng/wot-design-uni/issues/696)) ([9f318bd](https://github.com/Moonofweisheng/wot-design-uni/commit/9f318bdeb37bea643276d3e7f8be51bfc1b19d27)) +* ✨ 支持Button在支付宝小程序平台opentype设为getAuthorize用于获取手机号和用户信息 ([deeb45d](https://github.com/Moonofweisheng/wot-design-uni/commit/deeb45d8cb47284c1a557b50c3fcd95f80f93c22)) +* ✨ Form 校验规则validator支持传入Error作为校验提示 ([db32ef9](https://github.com/Moonofweisheng/wot-design-uni/commit/db32ef962140333a13e2a04ba4642e7423bc4bef)), closes [#667](https://github.com/Moonofweisheng/wot-design-uni/issues/667) +* ✨ Loadmore提供loadingProps属性用于自定义loading样式 ([178e056](https://github.com/Moonofweisheng/wot-design-uni/commit/178e056035511de4123d2bd9ce575948154874b4)) +* ✨ Table 行高支持Number和String类型 ([#682](https://github.com/Moonofweisheng/wot-design-uni/issues/682)) ([21f0b17](https://github.com/Moonofweisheng/wot-design-uni/commit/21f0b178b6e3221a69609dd1603960fc866cb534)) + +### [1.3.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.12...v1.3.13) (2024-10-25) + + +### ✏️ Documentation | 文档 + +* ✏️ 快速上手增加vue和uni-app的快速上手链接 ([20148a7](https://github.com/Moonofweisheng/wot-design-uni/commit/20148a7800d12376adedadb32bf29239f02baef3)) +* ✏️ 添加关于深度选择的介绍 ([63428f2](https://github.com/Moonofweisheng/wot-design-uni/commit/63428f244ae84574027ea89e19598c3600716f7b)) +* ✏️ 文档新增展示优秀案例 ([47c1764](https://github.com/Moonofweisheng/wot-design-uni/commit/47c176490dabda1937abea8342d02cc6cbbcfc02)) +* ✏️ 优化文档快速上手章节 ([4e9a9da](https://github.com/Moonofweisheng/wot-design-uni/commit/4e9a9da914a372f1b0f31cfcc7fbc2f96650ef58)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Notice在Tabbar页面时跳转至其他页面导致播放异常的问题并提供reset方法 ([#680](https://github.com/Moonofweisheng/wot-design-uni/issues/680)) ([7584ac2](https://github.com/Moonofweisheng/wot-design-uni/commit/7584ac2a1249b6bee79669ae57c80da08a17d912)), closes [#358](https://github.com/Moonofweisheng/wot-design-uni/issues/358) [#650](https://github.com/Moonofweisheng/wot-design-uni/issues/650) + + +### ✨ Features | 新功能 + +* ✨ 为Picker和SelectPicker补充clear事件 ([8fffaa6](https://github.com/Moonofweisheng/wot-design-uni/commit/8fffaa646aad195b33c56719ffb28b2529f3f627)) +* ✨ 移除 Navbar 点击热区的激活态样式 ([60b07e5](https://github.com/Moonofweisheng/wot-design-uni/commit/60b07e514b836c55305536e2ba29ec5239b62de3)), closes [#511](https://github.com/Moonofweisheng/wot-design-uni/issues/511) +* ✨ cell组件border属性以props为最高优先级 ([#656](https://github.com/Moonofweisheng/wot-design-uni/issues/656)) ([31353ce](https://github.com/Moonofweisheng/wot-design-uni/commit/31353ceafa3bcae01202c40918e579d141957c0a)) +* ✨ picker和selectPicker添加clearable属性 ([b0d60a0](https://github.com/Moonofweisheng/wot-design-uni/commit/b0d60a0b750e8ed2cbae0b55309145c6963e498a)) +* ✨ Swiper 轮播组件支持展示视频和设置轮播项标题 ([#663](https://github.com/Moonofweisheng/wot-design-uni/issues/663)) ([a50c0be](https://github.com/Moonofweisheng/wot-design-uni/commit/a50c0be38465342e5b688b8e10b377d69ba998a6)) + +### [1.3.12](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.11...v1.3.12) (2024-10-08) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Upload文件小程序找不到文件,显示的问题 ([c13e605](https://github.com/Moonofweisheng/wot-design-uni/commit/c13e6058a2c665c174806aebd353294113c4007e)) +* 🐛 Radio修复在cell里面高度的问题 ([f9deacf](https://github.com/Moonofweisheng/wot-design-uni/commit/f9deacf40eed17a37558ca96319880822ca897d5)) + + +### ✏️ Documentation | 文档 + +* ✏️ 优化捐赠榜单中捐赠人链接的展示效果 ([898f079](https://github.com/Moonofweisheng/wot-design-uni/commit/898f07985e602ad18a84c06b5bd6183dd61142cd)) +* ✏️ Upload添加preview-cover最低版本 ([52f9bf6](https://github.com/Moonofweisheng/wot-design-uni/commit/52f9bf654b26a09c20b7118efb331f7e6228ea79)) + + +### ✨ Features | 新功能 + +* ✨ 新增 FloatingPanel 浮动面板组件 ([#616](https://github.com/Moonofweisheng/wot-design-uni/issues/616)) ([e2966fd](https://github.com/Moonofweisheng/wot-design-uni/commit/e2966fdd01d6c91ab9499fbc95e4f7160a83deb5)), closes [#509](https://github.com/Moonofweisheng/wot-design-uni/issues/509) +* ✨ 新增支持法语、日语等9 种语言 ([#637](https://github.com/Moonofweisheng/wot-design-uni/issues/637)) ([691a7b5](https://github.com/Moonofweisheng/wot-design-uni/commit/691a7b57727af45f3c2f99437740be72e8be0f86)) +* ✨ StatusTip缺省提示组件提供图片内容插槽([#538](https://github.com/Moonofweisheng/wot-design-uni/issues/538)) ([#615](https://github.com/Moonofweisheng/wot-design-uni/issues/615)) ([c6b2cf8](https://github.com/Moonofweisheng/wot-design-uni/commit/c6b2cf84db1cb5536516606999c1fa3d6bd1dbe3)) +* ✨ ToolTip 组件 offset 属性支持数组和对象写法 ([#625](https://github.com/Moonofweisheng/wot-design-uni/issues/625)) ([5092c5a](https://github.com/Moonofweisheng/wot-design-uni/commit/5092c5a6548fe7222e0d6e2614020f15ce95c5df)), closes [#560](https://github.com/Moonofweisheng/wot-design-uni/issues/560) +* ✨ Upload新增preview-cover插槽 ([ef6433d](https://github.com/Moonofweisheng/wot-design-uni/commit/ef6433d81c576db8b55715a14a574a6d392478df)) +* ✨Calendar日历添加open事件 ([#627](https://github.com/Moonofweisheng/wot-design-uni/issues/627)) ([43a5da6](https://github.com/Moonofweisheng/wot-design-uni/commit/43a5da631d4402319d4e3f0739f2ab7e960e497f)), closes [#624](https://github.com/Moonofweisheng/wot-design-uni/issues/624) + +### [1.3.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.10...v1.3.11) (2024-09-23) + + +### ✏️ Documentation | 文档 + +* ✏️ 移除文档中CountTo不支持的type ([cae2e56](https://github.com/Moonofweisheng/wot-design-uni/commit/cae2e56aba98427b1b6c7a2c3f6a2f9ed8acf96f)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复[#598](https://github.com/Moonofweisheng/wot-design-uni/issues/598)产生的使用未定义变量的问题 ([ce64daf](https://github.com/Moonofweisheng/wot-design-uni/commit/ce64daf77d119df509873226c9209cae406e0330)) +* 🐛 修复与@uni-helper/uni-typed搭配使用时tsc报类型错误的问题并更新依赖 ([f9ca2e4](https://github.com/Moonofweisheng/wot-design-uni/commit/f9ca2e4d4ed2ef88a073f7f80ce64df811144b3a)), closes [#586](https://github.com/Moonofweisheng/wot-design-uni/issues/586) +* 🐛 修复Button设置为hairline时圆角显示异常的问题 ([10ebf5c](https://github.com/Moonofweisheng/wot-design-uni/commit/10ebf5c3959099389f1f1349e32ad755740ce0d5)), closes [#486](https://github.com/Moonofweisheng/wot-design-uni/issues/486) +* 🐛 修复Input、Textarea未设置labelWidth时通过CSS变量设置label宽度无效的问题 ([#591](https://github.com/Moonofweisheng/wot-design-uni/issues/591)) ([2f12ac6](https://github.com/Moonofweisheng/wot-design-uni/commit/2f12ac6d2b598c7fa545009a82acd1c07bf21779)), closes [#573](https://github.com/Moonofweisheng/wot-design-uni/issues/573) +* 🐛 修复loadmore组件属性errorText存在默认值导致国际化失效的问题 ([#594](https://github.com/Moonofweisheng/wot-design-uni/issues/594)) ([0bcc3c4](https://github.com/Moonofweisheng/wot-design-uni/commit/0bcc3c498ed9206bea45522f58889ec3f3a5f673)) +* 🐛 修复Radio点击失效的问题 ([5cce125](https://github.com/Moonofweisheng/wot-design-uni/commit/5cce125c737989e1e447394223129e2e585b91f4)), closes [#596](https://github.com/Moonofweisheng/wot-design-uni/issues/596) +* 🐛确保inputNumber输入值在设定的最小值和最大值之间 ([#610](https://github.com/Moonofweisheng/wot-design-uni/issues/610)) ([344b1ac](https://github.com/Moonofweisheng/wot-design-uni/commit/344b1ac9168701bc408f82268f68ef8453527ef9)), closes [#602](https://github.com/Moonofweisheng/wot-design-uni/issues/602) + + +### ✨ Features | 新功能 + +* ✨ 迁移StatusTip组件的图片资源 ([f54ff30](https://github.com/Moonofweisheng/wot-design-uni/commit/f54ff306e7dafcfaead671120d100c4d9482daf9)) +* ✨ count-to组件添加type属性 ([#556](https://github.com/Moonofweisheng/wot-design-uni/issues/556)) ([60c92f2](https://github.com/Moonofweisheng/wot-design-uni/commit/60c92f2f38b563968f88f94267b8d805c28109d1)) +* ✨ Fab 悬浮按钮组件支持自定义触发器和控制能否展开 ([#612](https://github.com/Moonofweisheng/wot-design-uni/issues/612)) ([8e68ef3](https://github.com/Moonofweisheng/wot-design-uni/commit/8e68ef3bf807b5ec3c935daa6ce68f58962a188d)), closes [#512](https://github.com/Moonofweisheng/wot-design-uni/issues/512) +* ✨ Img组件新增属性 show-menu-by-longpress 支持微信小程序长按弹出菜单栏 ([#613](https://github.com/Moonofweisheng/wot-design-uni/issues/613)) ([a7fc229](https://github.com/Moonofweisheng/wot-design-uni/commit/a7fc22964823af1ee1e513a268fb783bbea77ee4)), closes [#611](https://github.com/Moonofweisheng/wot-design-uni/issues/611) +* ✨ Input、Textarea增加ignoreCompositionEvent属性 ([#592](https://github.com/Moonofweisheng/wot-design-uni/issues/592)) ([efcd4bb](https://github.com/Moonofweisheng/wot-design-uni/commit/efcd4bbb38b5bf53a26f0a8834f0cbd9fa26f5e5)), closes [#574](https://github.com/Moonofweisheng/wot-design-uni/issues/574) +* ✨ InputNumber 步进器新增支持adjustPosition属性 ([f8a5240](https://github.com/Moonofweisheng/wot-design-uni/commit/f8a524010a2945941fbefa745756f2e6efbeb88b)), closes [#599](https://github.com/Moonofweisheng/wot-design-uni/issues/599) + +### [1.3.10](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.9...v1.3.10) (2024-09-08) + + +### ✨ Features | 新功能 + +* ✨ 新增Keyboard虚拟键盘支持车牌号输入 ([#567](https://github.com/Moonofweisheng/wot-design-uni/issues/567)) ([59df1b7](https://github.com/Moonofweisheng/wot-design-uni/commit/59df1b7ce56e9253ad046a7898651a866b8c99d7)), closes [#351](https://github.com/Moonofweisheng/wot-design-uni/issues/351) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 col-picker 点击遮罩关闭执行两次问题 ([#584](https://github.com/Moonofweisheng/wot-design-uni/issues/584)) ([8fc5380](https://github.com/Moonofweisheng/wot-design-uni/commit/8fc5380ad1f9a34998aedf1de2a9b05011bd8267)) +* 🐛 修复wd-upload 关闭按钮受项目行高影响的问题 ([#576](https://github.com/Moonofweisheng/wot-design-uni/issues/576)) ([feb64ea](https://github.com/Moonofweisheng/wot-design-uni/commit/feb64ea7be1eada01782bb1fa0d5b848acb4fa64)) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档中添加KeyBoard的版本要求 ([715c054](https://github.com/Moonofweisheng/wot-design-uni/commit/715c054f4c723de73e2d57b940390cc7bcc89273)) +* ✏️ 优化多列选择器组件文档 ([#572](https://github.com/Moonofweisheng/wot-design-uni/issues/572)) ([93e0736](https://github.com/Moonofweisheng/wot-design-uni/commit/93e0736a24aa77d60376b5dd4d073180b88a6411)) + +### [1.3.9](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.8...v1.3.9) (2024-09-01) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复某些场景下wd-textarea属性maxlength无效的问题 ([#558](https://github.com/Moonofweisheng/wot-design-uni/issues/558)) ([4b1b237](https://github.com/Moonofweisheng/wot-design-uni/commit/4b1b2370db4a34716ceedfde3a49d2ae7e20f919)) +* 🐛 修复IndexBar组件更新数据时显示异常的问题 ([f4c751d](https://github.com/Moonofweisheng/wot-design-uni/commit/f4c751dfae3724118c2d842489a5c7d1003996f1)), closes [#545](https://github.com/Moonofweisheng/wot-design-uni/issues/545) +* 🐛 修复Input和Textarea设置为readonly时在部分iOS手机可以点击聚焦的问题 ([ff59403](https://github.com/Moonofweisheng/wot-design-uni/commit/ff594031546a25f4b2831749312171d260a76044)), closes [#533](https://github.com/Moonofweisheng/wot-design-uni/issues/533) +* 🐛 修复Picker多级联动未应用picker选择值时取消后打开展示列数据错误的问题 ([90e86de](https://github.com/Moonofweisheng/wot-design-uni/commit/90e86def95ae458208f8aa50427b845db61d05b4)), closes [#562](https://github.com/Moonofweisheng/wot-design-uni/issues/562) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整数字滚动组件文档路径 ([636a2c5](https://github.com/Moonofweisheng/wot-design-uni/commit/636a2c5e8a8906166947312f085e5fabba5c47df)) +* ✏️ 更正form demo 方法名不一致 ([#534](https://github.com/Moonofweisheng/wot-design-uni/issues/534)) ([59fb1ea](https://github.com/Moonofweisheng/wot-design-uni/commit/59fb1eaabd7fea5428dc860af5ad734c9eebb496)) +* ✏️ 优化MessageBox示例demo ([a827b79](https://github.com/Moonofweisheng/wot-design-uni/commit/a827b79498a48272eb71fd9c0e70a9dae889375b)) +* ✏️ 增加安卓演示demo下载二维码 ([8680e77](https://github.com/Moonofweisheng/wot-design-uni/commit/8680e776e229d96b995de402e12ab423930a27ba)) +* ✏️ 更正text组件doc的type属性默认值 ([#557](https://github.com/Moonofweisheng/wot-design-uni/issues/557)) ([3e51f76](https://github.com/Moonofweisheng/wot-design-uni/commit/3e51f763cf394cd5214bc5c0c3e6e23c9ee974b7)) + + +### ✨ Features | 新功能 + +* ✨ config-provider 支持customClass 与 customeStyle ([#535](https://github.com/Moonofweisheng/wot-design-uni/issues/535)) ([febe730](https://github.com/Moonofweisheng/wot-design-uni/commit/febe73079eceeb2cf0eec9fc5712321fa3434bd2)) +* ✨ Form设置提示模式为toast时优先显示顺序靠前的表单项的错误提示 ([f25409f](https://github.com/Moonofweisheng/wot-design-uni/commit/f25409f5a83df50ecbbf0a21bb2d5199021b9cc1)), closes [#548](https://github.com/Moonofweisheng/wot-design-uni/issues/548) +* ✨ img 图片组件click事件增加mouseEvent参数 ([#539](https://github.com/Moonofweisheng/wot-design-uni/issues/539)) ([4983f48](https://github.com/Moonofweisheng/wot-design-uni/commit/4983f4832a194d399aeb919b8d2c02564789d9ab)) +* ✨ Text支持传入number类型的text ([e1f9ff6](https://github.com/Moonofweisheng/wot-design-uni/commit/e1f9ff60e35c7b6bbb4b5e7b84b2d570471056f6)), closes [#553](https://github.com/Moonofweisheng/wot-design-uni/issues/553) + +### [1.3.8](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.7...v1.3.8) (2024-08-18) + + +### ✏️ Documentation | 文档 + +* ✏️ 补充Form设置error-type的示例 ([0e6ea3e](https://github.com/Moonofweisheng/wot-design-uni/commit/0e6ea3ead02c7b51fac7c5776c92044abeaa4dc3)) +* ✏️ 修复常见问题中useToast入参错误的问题 ([3cd0905](https://github.com/Moonofweisheng/wot-design-uni/commit/3cd0905bab2b0dfc3d05257e01aa16afe61c0002)) +* ✏️ 修复textarea组件的maxlength属性类型标注错误 ([#502](https://github.com/Moonofweisheng/wot-design-uni/issues/502)) ([3698e30](https://github.com/Moonofweisheng/wot-design-uni/commit/3698e30301c6c482135671b0a3f150388421ffae)) +* ✏️ 优化MessageBox和Toast文档中selector的介绍 ([f092838](https://github.com/Moonofweisheng/wot-design-uni/commit/f092838756144677c97155dfb700b1ae2cf56f47)) +* ✏️ Toast 文档增加唯一标识selector的介绍 ([#494](https://github.com/Moonofweisheng/wot-design-uni/issues/494)) ([3f99e1b](https://github.com/Moonofweisheng/wot-design-uni/commit/3f99e1bfc7e78c0359e593a2862d1d885c914858)) + + +### ✨ Features | 新功能 + +* ✨ 调整Statistic为CountTo组件并使用useCountDown重构 ([a01baaf](https://github.com/Moonofweisheng/wot-design-uni/commit/a01baafe327e4feeba0de9735901dfc32e014f6a)) +* ✨ 新增statistic 数值显示 ([#489](https://github.com/Moonofweisheng/wot-design-uni/issues/489)) ([592c37b](https://github.com/Moonofweisheng/wot-design-uni/commit/592c37b15e54049faefd14cb480451895bb34d90)) +* ✨ Collapse 折叠面板组件支持嵌套使用 ([#521](https://github.com/Moonofweisheng/wot-design-uni/issues/521)) ([a5ce5dd](https://github.com/Moonofweisheng/wot-design-uni/commit/a5ce5dd8825e520f8e676a9f400efda1eb27546a)), closes [#503](https://github.com/Moonofweisheng/wot-design-uni/issues/503) +* ✨ datetime-picker 增加自定义 Cell 样式属性 ([#491](https://github.com/Moonofweisheng/wot-design-uni/issues/491)) ([2cc7d7f](https://github.com/Moonofweisheng/wot-design-uni/commit/2cc7d7fb106ec0a13104bf8bea964ba375bd7ad5)) +* ✨ form表单新增errorType错误提示类型 ([#487](https://github.com/Moonofweisheng/wot-design-uni/issues/487)) ([5915922](https://github.com/Moonofweisheng/wot-design-uni/commit/5915922b0b4970424e2dc97ef7f922a918fedfce)) +* ✨Upload 组件支持手动上传并增加自定义上传函数 ([3def17e](https://github.com/Moonofweisheng/wot-design-uni/commit/3def17eb16b1355ee0a9a950788ef6299b0179a3)), closes [#481](https://github.com/Moonofweisheng/wot-design-uni/issues/481) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复checkbox-group的shape无法作用到子组件的问题 ([cd96d25](https://github.com/Moonofweisheng/wot-design-uni/commit/cd96d258f618d4a93584307b4100eee448a58884)), closes [#519](https://github.com/Moonofweisheng/wot-design-uni/issues/519) +* 🐛 修复DropDown传入正确direction出现错误警告的问题 ([#499](https://github.com/Moonofweisheng/wot-design-uni/issues/499)) ([35507a1](https://github.com/Moonofweisheng/wot-design-uni/commit/35507a1b24dbdee27eefb960ffa637e842b04f9c)) +* 🐛 修复picker-view动态设置columns时获取选中值异常的问题 ([#518](https://github.com/Moonofweisheng/wot-design-uni/issues/518)) ([8530440](https://github.com/Moonofweisheng/wot-design-uni/commit/8530440e81cb8244d7e6288a2c7a8fda41bc7a11)), closes [#492](https://github.com/Moonofweisheng/wot-design-uni/issues/492) +* 🐛 修复Textarea组件暗黑模式下清空按钮样式不正确的问题 ([8e83a11](https://github.com/Moonofweisheng/wot-design-uni/commit/8e83a117f2acf8b17b021ec833b43d9b2b940d9a)) + +### [1.3.7](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.6...v1.3.7) (2024-08-06) + + +### ✏️ Documentation | 文档 + +* ✏️ 更新爱发电地址和示例demo二维码 ([0ecc4c1](https://github.com/Moonofweisheng/wot-design-uni/commit/0ecc4c194d753a11dfa461d74df1a00d75be0e4e)) +* ✏️ 更新README ([0c33dd4](https://github.com/Moonofweisheng/wot-design-uni/commit/0c33dd48ad8528b4b080125272375bae9fedf352)) +* ✏️ 允许文档组件列表折叠收起 ([#468](https://github.com/Moonofweisheng/wot-design-uni/issues/468)) ([b0e4d23](https://github.com/Moonofweisheng/wot-design-uni/commit/b0e4d235b27a729024951a7b31950e83bd43d3de)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复addUnit工具方法为string类型的参数时未添加单位导致swiper高度丢失的问题 ([3d7775c](https://github.com/Moonofweisheng/wot-design-uni/commit/3d7775c5a93668cb7ac6b50563869d13bbd39bfa)) +* 🐛 修复Input设置为number类型时绑定值重设为0时显示异常的问题 ([df6a6a0](https://github.com/Moonofweisheng/wot-design-uni/commit/df6a6a0ab1f911296002e39299a93bbee5546715)), closes [#470](https://github.com/Moonofweisheng/wot-design-uni/issues/470) +* 🐛 修复LockScroll后切换页面无法滚动 ([#478](https://github.com/Moonofweisheng/wot-design-uni/issues/478)) ([197d61a](https://github.com/Moonofweisheng/wot-design-uni/commit/197d61a678738bda608588d660263e0d5657f940)), closes [#473](https://github.com/Moonofweisheng/wot-design-uni/issues/473) +* 🐛 修复Textarea的placeholder无法设置空字符串问题 ([#472](https://github.com/Moonofweisheng/wot-design-uni/issues/472)) ([bb3d329](https://github.com/Moonofweisheng/wot-design-uni/commit/bb3d3292af56016ad21d7bf49024a0338d93ec3d)), closes [#471](https://github.com/Moonofweisheng/wot-design-uni/issues/471) +* **type:** 🐛 修复vue>=2.7版本的GlobalComponents类型声明问题 ([#464](https://github.com/Moonofweisheng/wot-design-uni/issues/464)) ([a175f05](https://github.com/Moonofweisheng/wot-design-uni/commit/a175f05e01eff86678dd08bd226bd401192b0c0b)) + + +### ✨ Features | 新功能 + +* ✨ 修复Text组件设置color属性后lines失效的问题 ([84826f8](https://github.com/Moonofweisheng/wot-design-uni/commit/84826f8057ba29f65b26ee8f292073edb2f441f0)), closes [#477](https://github.com/Moonofweisheng/wot-design-uni/issues/477) +* ✨ Input 组件新增clear-triger属性 ([#476](https://github.com/Moonofweisheng/wot-design-uni/issues/476)) ([364cfbf](https://github.com/Moonofweisheng/wot-design-uni/commit/364cfbf1af7a9109be9af59b543b4ccef9c32916)), closes [#462](https://github.com/Moonofweisheng/wot-design-uni/issues/462) +* ✨ Swiper 轮播组件增加value-key用于自定义目标字段属性名 ([#485](https://github.com/Moonofweisheng/wot-design-uni/issues/485)) ([f207876](https://github.com/Moonofweisheng/wot-design-uni/commit/f20787690368e341850c2fd51cf725b26b192ec9)), closes [#410](https://github.com/Moonofweisheng/wot-design-uni/issues/410) +* ✨ Textarea 组件新增clear-triger属性 ([1c13f2e](https://github.com/Moonofweisheng/wot-design-uni/commit/1c13f2e629fc259e282d7d859097f8905ef1053e)), closes [#462](https://github.com/Moonofweisheng/wot-design-uni/issues/462) +* 组件text新增金额类型,前后插槽,下划线等功能 ([#452](https://github.com/Moonofweisheng/wot-design-uni/issues/452)) ([95735be](https://github.com/Moonofweisheng/wot-design-uni/commit/95735be75e276b8679a5a76c9cbe49ea29a9b18d)) +* **drop-menu:** 支持自定义图标以及before-toggle ([#479](https://github.com/Moonofweisheng/wot-design-uni/issues/479)) ([108e1b3](https://github.com/Moonofweisheng/wot-design-uni/commit/108e1b36c69cdb28b59f8742d82bb78540a0e043)) + +### [1.3.6](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.5...v1.3.6) (2024-07-26) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Button为disabled状态时仍能触发open-type指定事件的问题 ([a64a570](https://github.com/Moonofweisheng/wot-design-uni/commit/a64a5707d2573c042cd9bb16d6f7fecba9a38291)), closes [#458](https://github.com/Moonofweisheng/wot-design-uni/issues/458) +* 🐛 修复MessageBox设置为prompt时输入框绑定值异常的问题 ([140d960](https://github.com/Moonofweisheng/wot-design-uni/commit/140d96019d91a51f2af2efbd91a279d203a8408b)) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档地址更新并增加QQ2群二维码 ([ef1ad01](https://github.com/Moonofweisheng/wot-design-uni/commit/ef1ad011f205612d6d2a8f5fc8cbf7d05dfffc7d)) +* ✏️ 修复Toast组件文档中关于提示方法描述的错误 ([8ed19a2](https://github.com/Moonofweisheng/wot-design-uni/commit/8ed19a2949064ec93cc281aadae4710d4d24a25f)) +* ✏️ 修正DateTimePicker文档中关于minDate和maxDate类型标注错误的问题 ([b322264](https://github.com/Moonofweisheng/wot-design-uni/commit/b322264c9a84d9acb82276ecacf5f12f1fd25f6e)) + +### [1.3.5](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.4...v1.3.5) (2024-07-20) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Text组件使用日期工具方法路径错误的问题 ([c4071c3](https://github.com/Moonofweisheng/wot-design-uni/commit/c4071c3759d8328f5dd6a6a374bb91dda5af1029)), closes [#453](https://github.com/Moonofweisheng/wot-design-uni/issues/453) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档中全局引入ElTag用于显示组件上线版本 ([1d05654](https://github.com/Moonofweisheng/wot-design-uni/commit/1d056547c89f4b6f39e9f2b503d55790abc02b52)) +* ✏️ 修复RadioBox文档中关于表单模式表述错误的问题 ([1da6c34](https://github.com/Moonofweisheng/wot-design-uni/commit/1da6c34565d20c7fdb0970cfc93dada208b1f82e)) +* ✏️ 优化Segmented分段器关于绑定激活项的文档 ([5caf3b9](https://github.com/Moonofweisheng/wot-design-uni/commit/5caf3b95073c9bf28f280cbe88431a40f937e994)) + +### [1.3.4](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.3...v1.3.4) (2024-07-19) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复双向滑块响应式丢失 ([#436](https://github.com/Moonofweisheng/wot-design-uni/issues/436)) ([825ea9b](https://github.com/Moonofweisheng/wot-design-uni/commit/825ea9b5b81981ae2a8cb497b412bf950caf6aaf)) +* 🐛 修复Input组件[@input](https://github.com/input)事件参数错误的问题 ([82357f9](https://github.com/Moonofweisheng/wot-design-uni/commit/82357f916def6283003aef64ef522a5bb155c307)) +* 🐛 修复Table组件异步填充数据源无效的问题 ([c795c00](https://github.com/Moonofweisheng/wot-design-uni/commit/c795c00560a267de41d8ef3f976fe16c6ad8ba00)), closes [#445](https://github.com/Moonofweisheng/wot-design-uni/issues/445) +* 🐛 修复Upload组件accept为media时图片预览顺序混乱的问题 ([f8c1053](https://github.com/Moonofweisheng/wot-design-uni/commit/f8c1053abd2b0ce3f3bee89fbd0e9adcdf1961d2)), closes [#442](https://github.com/Moonofweisheng/wot-design-uni/issues/442) +* 🐛 Button按钮click事件直接透传event ([017aeda](https://github.com/Moonofweisheng/wot-design-uni/commit/017aeda89d7950024baddc40a4a1e83a36010be3)), closes [#443](https://github.com/Moonofweisheng/wot-design-uni/issues/443) +* 修复 textarea 组件同时使用 auto-height 和 no-border 属性时,no-border 属性不生效 ([#448](https://github.com/Moonofweisheng/wot-design-uni/issues/448)) ([a2f4b32](https://github.com/Moonofweisheng/wot-design-uni/commit/a2f4b322f5b9bd01a36a46b904684d531d5e6730)) + + +### ✨ Features | 新功能 + +* ✨ Button按钮组件支持使用自定义组件 ([517b583](https://github.com/Moonofweisheng/wot-design-uni/commit/517b583f262e374154111d635644dfb225a473c9)), closes [#310](https://github.com/Moonofweisheng/wot-design-uni/issues/310) +* ✨ Toast 轻提示组件支持使用组件库内置和自定义图标 ([723c51b](https://github.com/Moonofweisheng/wot-design-uni/commit/723c51bac98bb751af44f13737fba12deb298dd4)), closes [#444](https://github.com/Moonofweisheng/wot-design-uni/issues/444) +* ✨ Upload上传组件新增支持successStatus属性 ([99eab74](https://github.com/Moonofweisheng/wot-design-uni/commit/99eab74260e1e3c43f9f4b147edb4a5a3147d086)) +* 新增Text 文本组件 ([#403](https://github.com/Moonofweisheng/wot-design-uni/issues/403)) ([14f5f44](https://github.com/Moonofweisheng/wot-design-uni/commit/14f5f4430a7cd599149adf16f7bc704dc42f4d90)) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整QQ群与提问相关文档 ([cb11e98](https://github.com/Moonofweisheng/wot-design-uni/commit/cb11e9822ff714d3c1e03ad5f2b01b0a07e8fcec)) +* ✏️ 移除示例demo中手机号等字样方便过审 ([7488a7f](https://github.com/Moonofweisheng/wot-design-uni/commit/7488a7f708035b5f59c60078190c880cc8d11800)) + +### [1.3.3](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.2...v1.3.3) (2024-07-14) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复IndexBar索引值显示错误的问题 ([#433](https://github.com/Moonofweisheng/wot-design-uni/issues/433)) ([19dc35b](https://github.com/Moonofweisheng/wot-design-uni/commit/19dc35bf40eecc263ed19e9f54d05c004b1d3425)), closes [#408](https://github.com/Moonofweisheng/wot-design-uni/issues/408) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整演示demo中图片到npmmirror上 ([93ff5f9](https://github.com/Moonofweisheng/wot-design-uni/commit/93ff5f938fdb1ced622080bce9168bfe0e7ed771)) +* ✏️ 新增关于messageBox弹出多个的常见问题解答 ([a362928](https://github.com/Moonofweisheng/wot-design-uni/commit/a3629283aa3838803df900512afc990f920b3e0b)) +* ✏️ 修复SelectPicker文档中存在的拼写错误 ([9e28b57](https://github.com/Moonofweisheng/wot-design-uni/commit/9e28b5771a30fa0bf8aad60e8e494e0bc976d9a1)), closes [#426](https://github.com/Moonofweisheng/wot-design-uni/issues/426) +* ✏️ Upload文档增加微信隐私协议的介绍 ([c7f3a4a](https://github.com/Moonofweisheng/wot-design-uni/commit/c7f3a4adc2907bab30f5e075417f34541cba7a5e)) + +### [1.3.2](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.1...v1.3.2) (2024-07-08) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复ActionSheet样式调整导致微信编译错误的问题 ([a9189d2](https://github.com/Moonofweisheng/wot-design-uni/commit/a9189d2c263459a33cdbb68bec3dd0dd0213b5c0)) + +### [1.3.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.3.0...v1.3.1) (2024-07-08) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复暗黑模式下Grid和ActionSheet组件部分样式异常的问题 ([a28938c](https://github.com/Moonofweisheng/wot-design-uni/commit/a28938c91d4b437e6b583793e32f8373cec102ae)), closes [#409](https://github.com/Moonofweisheng/wot-design-uni/issues/409) + +## [1.3.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.28...v1.3.0) (2024-07-07) + + +### ✨ Features | 新功能 + +* ✨ Upload上传组件新增支持上传视频和文件 ([#412](https://github.com/Moonofweisheng/wot-design-uni/issues/412)) ([e07dbdd](https://github.com/Moonofweisheng/wot-design-uni/commit/e07dbdd5305c112fe3648ce988a45b2cc36ae143)), closes [#186](https://github.com/Moonofweisheng/wot-design-uni/issues/186) [#336](https://github.com/Moonofweisheng/wot-design-uni/issues/336) +* ✨select-picker组件增加open、close事件 ([#395](https://github.com/Moonofweisheng/wot-design-uni/issues/395)) ([9237a04](https://github.com/Moonofweisheng/wot-design-uni/commit/9237a04bcbde9960864b9a7b09a64fc2b6c27595)) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整ColPicker多列选择器文档中省市区数据源及演示demo ([d09bd03](https://github.com/Moonofweisheng/wot-design-uni/commit/d09bd037e735b02264074c2a251c59c01b8ff571)) +* ✏️ DropDownItem文档增加closed和opened介绍 ([401bd28](https://github.com/Moonofweisheng/wot-design-uni/commit/401bd284ceaafe957a0f4184d0a009bed70e9377)) +* ✏️ PasswordInput 修复示例代码错误的问题 ([#391](https://github.com/Moonofweisheng/wot-design-uni/issues/391)) ([519d172](https://github.com/Moonofweisheng/wot-design-uni/commit/519d17235b7c61acf2048104a495690bff0b9804)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Calendar等组件暗黑模式部分样式异常的问题 ([281e20f](https://github.com/Moonofweisheng/wot-design-uni/commit/281e20f2a922d98c00321d1316efc96b985c620d)), closes [#388](https://github.com/Moonofweisheng/wot-design-uni/issues/388) +* 🐛 修复IndexBar点击索引序号时未显示预期索引值的问题 ([c33991e](https://github.com/Moonofweisheng/wot-design-uni/commit/c33991ee14b8108bcd084b5d7b59f35cb79b2b35)), closes [#408](https://github.com/Moonofweisheng/wot-design-uni/issues/408) +* 🐛 修复Swiper在微信端长时间处于后台出现抖动的问题 ([#413](https://github.com/Moonofweisheng/wot-design-uni/issues/413)) ([4741439](https://github.com/Moonofweisheng/wot-design-uni/commit/4741439277f1a2668634a4e5e3649236ed95a627)), closes [#411](https://github.com/Moonofweisheng/wot-design-uni/issues/411) + +### [1.2.28](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.27...v1.2.28) (2024-06-24) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复omitBy工具方法实现错误导致Tabbar等组件徽标显示异常的问题 ([1491fe4](https://github.com/Moonofweisheng/wot-design-uni/commit/1491fe44616a0db1c165e2bed29637f8c46fbc7e)) + +### [1.2.27](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.26...v1.2.27) (2024-06-21) + + +### ✨ Features | 新功能 + +* ✨ add title slot for wd-collapse-item ([#372](https://github.com/Moonofweisheng/wot-design-uni/issues/372)) ([0252bd9](https://github.com/Moonofweisheng/wot-design-uni/commit/0252bd98254f8e108e545651127a744640b39692)), closes [#356](https://github.com/Moonofweisheng/wot-design-uni/issues/356) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整文档中关于类型声明文件的配置 ([0c38e98](https://github.com/Moonofweisheng/wot-design-uni/commit/0c38e986f0151b8aa2e17ab1770d1f39b178d354)) +* ✏️ Input 密码输入框示例移除disabled属性 ([3026c78](https://github.com/Moonofweisheng/wot-design-uni/commit/3026c78d237217b08e2fa3cdf64260c294a61b2b)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复ActionSheet禁用和加载状态时仍有点击效果的问题 ([c6baf45](https://github.com/Moonofweisheng/wot-design-uni/commit/c6baf452f0b626dea378148131d624589bb0c47e)), closes [#379](https://github.com/Moonofweisheng/wot-design-uni/issues/379) +* 🐛 修复Sidebar等组件css变量前缀错误的问题 ([0c31e16](https://github.com/Moonofweisheng/wot-design-uni/commit/0c31e16699e0b70b91384da0a5c0537b791e6bcf)) + +### [1.2.26](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.25...v1.2.26) (2024-06-14) + + +### ✨ Features | 新功能 + +* ✨ fab组件添加gap属性 ([#366](https://github.com/Moonofweisheng/wot-design-uni/issues/366)) ([7b44765](https://github.com/Moonofweisheng/wot-design-uni/commit/7b44765adc08fd16e055fbd326698a8f6b708426)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Fab初始化时存在初始位置闪现的问题 ([74c90be](https://github.com/Moonofweisheng/wot-design-uni/commit/74c90beb402e519fee1057870b0631673945cb73)) +* 🐛 修复Transition被打断时出现显示异常的问题 ([#368](https://github.com/Moonofweisheng/wot-design-uni/issues/368)) ([9c21b95](https://github.com/Moonofweisheng/wot-design-uni/commit/9c21b9512076cc95098a36ee7a7283f70386c94b)) + +### [1.2.25](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.24...v1.2.25) (2024-06-09) + + +### ✨ Features | 新功能 + +* ✨ Pickerview选择器新增immediate-change属性,目前微信和支付宝小程序支持。 ([3428ae1](https://github.com/Moonofweisheng/wot-design-uni/commit/3428ae17889a36552010e3f7cc4a9bebb7a94461)) +* ✨ Slider暴露initSlider方法用于外部初始化slider宽度信息 ([fc3e4ef](https://github.com/Moonofweisheng/wot-design-uni/commit/fc3e4ef3bb108e6bb6a660ffead40f4658c119e7)), closes [#344](https://github.com/Moonofweisheng/wot-design-uni/issues/344) + + +### ✏️ Documentation | 文档 + +* ✏️ 常见问题中增加关于交流群的内容 ([9ddaeec](https://github.com/Moonofweisheng/wot-design-uni/commit/9ddaeec32299463406ae2f60406cf39daff575cf)) +* ✏️ 更新文档中组件数量 ([10d2ba9](https://github.com/Moonofweisheng/wot-design-uni/commit/10d2ba9035970c5627fc731219ec529e634d2578)) +* ✏️ 增加关于微信小程序v-if和slot执行顺序异常问题的介绍 ([6a14879](https://github.com/Moonofweisheng/wot-design-uni/commit/6a1487900b214d071fdbda52034f220b8b046eec)) +* ✏️ 修正upload组件文档中change事件的dmeo错误 ([#360](https://github.com/Moonofweisheng/wot-design-uni/issues/360)) ([61004d3](https://github.com/Moonofweisheng/wot-design-uni/commit/61004d30ed3e79b439ef8a3c5d2e78723d7fa017)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复时间选择器设置minDate之后选择器显示值和实际选择值不一致的问题 ([3c0284f](https://github.com/Moonofweisheng/wot-design-uni/commit/3c0284f1f27b743ea3bdb7eeac5c489939057e13)), closes [#339](https://github.com/Moonofweisheng/wot-design-uni/issues/339) +* 🐛 修复ImgCropper未暴露resetImg和setRoate方法的问题 ([e58f111](https://github.com/Moonofweisheng/wot-design-uni/commit/e58f1111f2ae8e2da23e60c0ed60130373117970)), closes [#354](https://github.com/Moonofweisheng/wot-design-uni/issues/354) +* 🐛 修复Tag在钉钉小程序平台close方法不执行的问题 ([242d2f2](https://github.com/Moonofweisheng/wot-design-uni/commit/242d2f25c6ac829b5d20d63d520b1f8c8ae921a8)), closes [#359](https://github.com/Moonofweisheng/wot-design-uni/issues/359) + +### [1.2.24](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.23...v1.2.24) (2024-06-03) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Input支付宝小程序number/digit类型使用maxlength=-1时v-model失效的问题 ([7aa21b0](https://github.com/Moonofweisheng/wot-design-uni/commit/7aa21b0baadeccf4f0eb179f74332013acec6a10)) + +### [1.2.23](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.22...v1.2.23) (2024-06-02) + + +### ✏️ Documentation | 文档 + +* ✏️ 更新LICENSE文件地址 ([dae3ffc](https://github.com/Moonofweisheng/wot-design-uni/commit/dae3ffcc7b488dd6d87bc1c5e8ae16a78b794f85)) +* ✏️ 修复loading组件示例代码中文标点符号、img-cropper组件示例代码标签缺失的问题 ([#347](https://github.com/Moonofweisheng/wot-design-uni/issues/347)) ([d171255](https://github.com/Moonofweisheng/wot-design-uni/commit/d171255899d232f141c84aa1251c03cc1d0a0b75)) +* update select-picker doc ([#346](https://github.com/Moonofweisheng/wot-design-uni/issues/346)) ([7454452](https://github.com/Moonofweisheng/wot-design-uni/commit/7454452ad44331f329408cead9b483cf774cce5f)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Cell的value为0时无法渲染的问题 ([dc64c09](https://github.com/Moonofweisheng/wot-design-uni/commit/dc64c09e6c6f991fe6f8f9fcfa309392e233ce21)) +* 🐛 修复Sticky在h5和App端缓慢拖动时存在几率始终固定在顶部的问题 ([#350](https://github.com/Moonofweisheng/wot-design-uni/issues/350)) ([c5b3c5f](https://github.com/Moonofweisheng/wot-design-uni/commit/c5b3c5f68e1bb376249ed5f2c30b1898cc375abe)) + + +### ✨ Features | 新功能 + +* ✨ 调整Circle环形进度条在微信小程序端使用canvas2d支持同层渲染 ([#351](https://github.com/Moonofweisheng/wot-design-uni/issues/351)) ([4489517](https://github.com/Moonofweisheng/wot-design-uni/commit/44895179e4688ceb995ea1968d23df4f0bf9cdc2)) + +### [1.2.22](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.21...v1.2.22) (2024-05-23) + + +### ✏️ Documentation | 文档 + +* ✏️ 组件库介绍组件数量调整至70+ ([efd55ca](https://github.com/Moonofweisheng/wot-design-uni/commit/efd55ca8afc07368b8d9f348d73c9a25cf186c47)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Form指定prop为`a.b`时校验失败的问题 ([#329](https://github.com/Moonofweisheng/wot-design-uni/issues/329)) ([ab600b9](https://github.com/Moonofweisheng/wot-design-uni/commit/ab600b915a647ff089d5cfbb0ac955e3baa581c3)) + +### [1.2.21](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.20...v1.2.21) (2024-05-20) + + +### ✨ Features | 新功能 + +* ✨ 添加索引栏组件 ([#321](https://github.com/Moonofweisheng/wot-design-uni/issues/321)) ([f84e9af](https://github.com/Moonofweisheng/wot-design-uni/commit/f84e9affb1a044a37661c5d1dc118d834b49239c)) +* ✨ img组件添加loading、error插槽 ([#323](https://github.com/Moonofweisheng/wot-design-uni/issues/323)) ([00ffa9f](https://github.com/Moonofweisheng/wot-design-uni/commit/00ffa9f3e54f3ba9eec967887e195c0266ef0a41)) +* ✨ skeleton添加默认内容插槽 ([#322](https://github.com/Moonofweisheng/wot-design-uni/issues/322)) ([9a68c47](https://github.com/Moonofweisheng/wot-design-uni/commit/9a68c477dbf5e0f30f74882df92251eac707fdde)) +* add backtop ([#314](https://github.com/Moonofweisheng/wot-design-uni/issues/314)) ([bf9e55a](https://github.com/Moonofweisheng/wot-design-uni/commit/bf9e55a24e676a764b1e035ca86bd6fe26b87420)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Cell组件单独使用时设置border无效的问题 ([19b9f19](https://github.com/Moonofweisheng/wot-design-uni/commit/19b9f196466b88456e8b3e7221afd710da3df99b)) +* 🐛 修复Picker选择器多列选择模式绑定值为空数组时将列第一项作为显示值的问题 ([c3b96ce](https://github.com/Moonofweisheng/wot-design-uni/commit/c3b96ce912bfc13d30c09393dd57cbcbf2d0b80a)) +* 🐛 修复Sticky吸顶组件在微信小程序中放置在页面顶部时吸顶失效的问题 ([4ca3ebe](https://github.com/Moonofweisheng/wot-design-uni/commit/4ca3ebe7202f118a1bf6a462b27dc76ab6c720f9)), closes [#325](https://github.com/Moonofweisheng/wot-design-uni/issues/325) +* 修复wd-button在自定义样式时激活态样式问题 ([#312](https://github.com/Moonofweisheng/wot-design-uni/issues/312)) ([7544d69](https://github.com/Moonofweisheng/wot-design-uni/commit/7544d690f176b44a8e016688723af70d2a77388a)) + + +### ✏️ Documentation | 文档 + +* ✏️ 常见问题增加关于useToast等hooks的答疑以及自定义编译平台的内容 ([65597c7](https://github.com/Moonofweisheng/wot-design-uni/commit/65597c76b812e5e61be17879de320989d0873df4)) +* ✏️ 文档中增加解释导入方式的faq ([83fa0b0](https://github.com/Moonofweisheng/wot-design-uni/commit/83fa0b06927fddabd1021ee02c3c7f8377704786)) + +### [1.2.20](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.19...v1.2.20) (2024-05-12) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整捐赠榜单和友情链接的数据到cloudflare上 ([1314373](https://github.com/Moonofweisheng/wot-design-uni/commit/1314373af1dff95aee4cd3cddefebcb3a6a5c5d2)) +* ✏️ 推荐文档地址调整至cloudflare ([9119f30](https://github.com/Moonofweisheng/wot-design-uni/commit/9119f30b23676ad1b9a3869e362a3840ba288dc3)) +* ✏️ Curtain组件width属性标记为number类型 ([d172ce7](https://github.com/Moonofweisheng/wot-design-uni/commit/d172ce7ffcfebf29b184b57a7f74a25acad1f967)), closes [#303](https://github.com/Moonofweisheng/wot-design-uni/issues/303) + + +### ✨ Features | 新功能 + +* Segmented组件添加click事件 ([#301](https://github.com/Moonofweisheng/wot-design-uni/issues/301)) ([225ce22](https://github.com/Moonofweisheng/wot-design-uni/commit/225ce225ac7faedffd4686b908076c47ba111695)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复MessageBox中使用TextArea字数统计样式错误的问题 ([b186ac0](https://github.com/Moonofweisheng/wot-design-uni/commit/b186ac09294a4fede16c514cd96ff94f661fcbc9)), closes [#290](https://github.com/Moonofweisheng/wot-design-uni/issues/290) +* 🐛 修复PickerView可以滚动到禁用选项的问题 ([edd44ed](https://github.com/Moonofweisheng/wot-design-uni/commit/edd44eda3fc9879dc980b02d1885d77530a3d2e8)), closes [#302](https://github.com/Moonofweisheng/wot-design-uni/issues/302) +* 🐛 修复Popover指定placement后箭头显示异常的问题([#306](https://github.com/Moonofweisheng/wot-design-uni/issues/306)) ([a9b108d](https://github.com/Moonofweisheng/wot-design-uni/commit/a9b108d231a8e537aab4ba49781590bcafb9354d)) +* 🐛 修复release脚本处理最低版本号问题 ([c8077c9](https://github.com/Moonofweisheng/wot-design-uni/commit/c8077c9f3790e7844c902528d43596c4bc4025af)) +* 🐛 修复Sticky组件获取节点错误的问题 ([5483ea6](https://github.com/Moonofweisheng/wot-design-uni/commit/5483ea6c447f85229af66b950e34c1dc690fadb1)) +* 修复wd-calendar未抛出事件 ([c1203c9](https://github.com/Moonofweisheng/wot-design-uni/commit/c1203c91841c3d5bcd407923a577711e462207a3)) + +### [1.2.19](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.18...v1.2.19) (2024-05-01) + + +### ✨ Features | 新功能 + +* ✨ `Slider`组件`min`值允许负数 ([9e7c8d3](https://github.com/Moonofweisheng/wot-design-uni/commit/9e7c8d33eb2c0fccc44f465ed3b28d2cd81efa2d)), closes [#266](https://github.com/Moonofweisheng/wot-design-uni/issues/266) +* ✨ fab添加draggable属性 ([#259](https://github.com/Moonofweisheng/wot-design-uni/issues/259)) ([5e0cd6c](https://github.com/Moonofweisheng/wot-design-uni/commit/5e0cd6caa2296a44a3dc1b3d33033d4cc91d01b9)) +* ✨ table组件添加index参数 ([2161705](https://github.com/Moonofweisheng/wot-design-uni/commit/2161705a2f868f874b89ee28b6029677854a7741)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复`slider`组件`step`属性无效问题 ([50133b9](https://github.com/Moonofweisheng/wot-design-uni/commit/50133b9e5e2a18aace8cbf9eb7570579cc563f1d)), closes [#269](https://github.com/Moonofweisheng/wot-design-uni/issues/269) +* 🐛 修复Cell组件title文字对齐方式受外部影响的问题 ([caf66b6](https://github.com/Moonofweisheng/wot-design-uni/commit/caf66b6beeb236a9295cf0d8ec250557dc19e54e)), closes [#282](https://github.com/Moonofweisheng/wot-design-uni/issues/282) +* 🐛 修复SelectPicker无默认值时仍会查找选择项节点的问题 ([130c438](https://github.com/Moonofweisheng/wot-design-uni/commit/130c4383dc862e190b96bc3670a852a4cce3e629)), closes [#281](https://github.com/Moonofweisheng/wot-design-uni/issues/281) +* 🐛 修复Slider组件max和min变化时滑块和进度条未更新的问题 ([#276](https://github.com/Moonofweisheng/wot-design-uni/issues/276)) ([69303b5](https://github.com/Moonofweisheng/wot-design-uni/commit/69303b52077bd268e3563fa9096e91530bb978c5)) + + +### ✏️ Documentation | 文档 + +* ✏️ 补充Table组件关于Events的介绍 ([6760317](https://github.com/Moonofweisheng/wot-design-uni/commit/676031781b189a3a89dba9e57cb989c06999091a)), closes [#260](https://github.com/Moonofweisheng/wot-design-uni/issues/260) + +### [1.2.18](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.17...v1.2.18) (2024-04-23) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复InputNumber步进器组件在初始化时未发生变化仍触发change的问题 ([6ac20fd](https://github.com/Moonofweisheng/wot-design-uni/commit/6ac20fd60728e9056282466571c64ff747af4c9f)) +* 🐛 修复InputNumber的change事件无法取到当前绑定值的更新的问题 ([45980c5](https://github.com/Moonofweisheng/wot-design-uni/commit/45980c526a0b47fb1cb2c95ad50ab9f226464d7c)) + +### [1.2.17](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.16...v1.2.17) (2024-04-18) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复debounce调整后导致tabs无法切换的问题 ([bd594a7](https://github.com/Moonofweisheng/wot-design-uni/commit/bd594a7202d3cd4e641f23a0b98d468227370d6f)) + +### [1.2.16](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.15...v1.2.16) (2024-04-17) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Gap组件文档中safeAreaBottom属性名错误的问题 ([b03e39f](https://github.com/Moonofweisheng/wot-design-uni/commit/b03e39f601a68ff5f7e72aa3605279683e5e5b74)) +* 🐛 修复PickerView在绑定值为0时无法生效的问题 ([742b4d6](https://github.com/Moonofweisheng/wot-design-uni/commit/742b4d65255926a0e8c3899ae3ee2eb9d7b7e5e5)) + + +### ✏️ Documentation | 文档 + +* ✏️ 补充Img图片支持图片预览的最低支持版本 ([82d8e49](https://github.com/Moonofweisheng/wot-design-uni/commit/82d8e493c0723da9e3ba88981a45ea31ae8ef9d5)), closes [#244](https://github.com/Moonofweisheng/wot-design-uni/issues/244) + + +### ✨ Features | 新功能 + +* ✨ 阻止tag的关闭和新增事件冒泡 ([4c22cf5](https://github.com/Moonofweisheng/wot-design-uni/commit/4c22cf515e2e121b3bbe7d9fd64c5777ce72df32)) +* ✨ Checkbox 新增toggle方法 ([6ec0397](https://github.com/Moonofweisheng/wot-design-uni/commit/6ec0397bc9a5e80780b22245c29c6f05f1b25313)), closes [#239](https://github.com/Moonofweisheng/wot-design-uni/issues/239) +* ✨ date-time-picker-view 添加年选择 ([#241](https://github.com/Moonofweisheng/wot-design-uni/issues/241)) ([0073b32](https://github.com/Moonofweisheng/wot-design-uni/commit/0073b323967fe859ed15284607f4117243614d5e)) +* ✨ Noticebar 通知栏新增支持click点击事件 ([6fc786d](https://github.com/Moonofweisheng/wot-design-uni/commit/6fc786d9be63c2f021c10e0c48c466e0114f5c24)) +* ✨ TableColumn组件value插槽新增index参数 ([b8b03c3](https://github.com/Moonofweisheng/wot-design-uni/commit/b8b03c352b62e31a584faa41ced65d72bc427d89)) + +### [1.2.15](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.14...v1.2.15) (2024-04-11) + + +### ✏️ Documentation | 文档 + +* ✏️ 优化文档及演示demo访问速度 ([#232](https://github.com/Moonofweisheng/wot-design-uni/issues/232)) ([8d3f617](https://github.com/Moonofweisheng/wot-design-uni/commit/8d3f617e403fdbf53a29ca0d48624dc5da74fc94)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Button不同尺寸显示固定尺寸icon样式不协调的问题 ([2a73992](https://github.com/Moonofweisheng/wot-design-uni/commit/2a73992d9c551c51f4f3672167b972d0d0cca881)), closes [#235](https://github.com/Moonofweisheng/wot-design-uni/issues/235) +* 🐛 修复Upload自定义上传样式时未应用limit数量限制和customEvokeClass的问题 ([50baac8](https://github.com/Moonofweisheng/wot-design-uni/commit/50baac876279029214062a23072bb7c309110c0c)) + + +### ✨ Features | 新功能 + +* ✨ MessageBox支持确认前置处理钩子beforeConfirm ([78bed6a](https://github.com/Moonofweisheng/wot-design-uni/commit/78bed6a212a12639cd8831e3a1ad4542d6fbf518)), closes [#229](https://github.com/Moonofweisheng/wot-design-uni/issues/229) +* ✨ Toast轻提示增加opened、closed两个钩子 ([ead218b](https://github.com/Moonofweisheng/wot-design-uni/commit/ead218b87b6b0bd53c8c541c38561fdb45396c72)) + +### [1.2.14](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.13...v1.2.14) (2024-04-09) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复NoticeBar通知栏在小程序端垂直滚动无效的问题 ([eaeb935](https://github.com/Moonofweisheng/wot-design-uni/commit/eaeb935a299dee3c5e54dee6b926d625a7ef66a8)) + +### [1.2.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.12...v1.2.13) (2024-04-08) + + +### ✏️ Documentation | 文档 + +* ✏️ demo首页使用Cell组件重构显示样式 ([9ae8a20](https://github.com/Moonofweisheng/wot-design-uni/commit/9ae8a207f3ee8c765e6269b7ef5cb42ff1cd10fd)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复升级vue到3.4.2.之后defineEmits位置不规范导致访问'emit'报错的问题 ([ef574cf](https://github.com/Moonofweisheng/wot-design-uni/commit/ef574cfcb8f805ec308d8364cb887b65394e6108)), closes [#226](https://github.com/Moonofweisheng/wot-design-uni/issues/226) +* 🐛 修复NumberKeyboard暗黑模式无效的问题 ([b0cc958](https://github.com/Moonofweisheng/wot-design-uni/commit/b0cc958e0fd762915fe427275288a87d0c58ed38)) +* 🐛 修复Upload组件sourceType属性丢失默认值导致在iOS系统微信小程序报错的问题 ([b70991a](https://github.com/Moonofweisheng/wot-design-uni/commit/b70991a1133be77439fc139df9019527ded9b71d)), closes [#227](https://github.com/Moonofweisheng/wot-design-uni/issues/227) + +### [1.2.12](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.11...v1.2.12) (2024-04-07) + + +### ✨ Features | 新功能 + +* ✨ 增强`notice-bar`组件`vertical`模式下插槽的功能 ([e3daed5](https://github.com/Moonofweisheng/wot-design-uni/commit/e3daed516c958dbb5bff0d4a51d7d16cf9971da1)) +* ✨ NumberKeyboard数字键盘增加名为title的插槽 ([7edc746](https://github.com/Moonofweisheng/wot-design-uni/commit/7edc7462aa43ea800536ac0a464bb6e6c131a20c)), closes [#213](https://github.com/Moonofweisheng/wot-design-uni/issues/213) +* ✨ StatusTip缺省提示组件新增支持图片mode和自定义图片宽高 ([171c2bb](https://github.com/Moonofweisheng/wot-design-uni/commit/171c2bbdaf9e5ec62fa13fad1079b86daca85d54)) +* ✨ Swiper轮播为image-mode增加ts类型标注 ([9a4ceb2](https://github.com/Moonofweisheng/wot-design-uni/commit/9a4ceb21160dab06a08b39c35e50f69c7c49d023)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 修复 step 的 description 插槽不显示的bug ([f979ccc](https://github.com/Moonofweisheng/wot-design-uni/commit/f979cccc05b9956fe0df121fc2e8cbbb24544766)) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整演示demo iframe加载完成后再同步当前是否暗黑模式 ([9ab370e](https://github.com/Moonofweisheng/wot-design-uni/commit/9ab370e19395aaef013da8a386dd310c7deec59e)), closes [#210](https://github.com/Moonofweisheng/wot-design-uni/issues/210) +* ✏️ Steps步骤条增加控制进度的示例 ([8025174](https://github.com/Moonofweisheng/wot-design-uni/commit/80251742f6f5d560d546bd7cd812c35433158a91)) + +### [1.2.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.10...v1.2.11) (2024-04-06) + + +### ⚡ Performance Improvements | 性能优化 + +* ⚡ 优化Calendar日历选择器打开关闭时的动画效果 ([5fb9542](https://github.com/Moonofweisheng/wot-design-uni/commit/5fb9542087c62b8cf6974d2e5f4b5f455b456495)) + + +### ✏️ Documentation | 文档 + +* ✏️ `notice-bar`组件补充`event`事件 ([8f11c8a](https://github.com/Moonofweisheng/wot-design-uni/commit/8f11c8a0fe02f3bb0a2e7a67e105f2e33d658477)) +* ✏️ 优化文档与演示demo同步暗黑模式的逻辑 ([d057607](https://github.com/Moonofweisheng/wot-design-uni/commit/d0576071ebaeb69828b8c5e789471c3324dabb1f)), closes [#210](https://github.com/Moonofweisheng/wot-design-uni/issues/210) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复ActionSheet丢失props默认值的问题 ([e50cccc](https://github.com/Moonofweisheng/wot-design-uni/commit/e50cccceeccebeb99ca69712b9f64e8a9e5fd23f)) +* 🐛 修复Calendar部分文字运行时切换国际化未应用国际化文字的问题 ([857c922](https://github.com/Moonofweisheng/wot-design-uni/commit/857c922d4f3542cb543b8b99600bf9c48ffa24b9)) +* 🐛 修复Calendar的type为datetime且无默认值时无法在首次选择日期后选择时间的问题 ([3746ba3](https://github.com/Moonofweisheng/wot-design-uni/commit/3746ba304021c56e14414dfaed225c465869a473)), closes [#214](https://github.com/Moonofweisheng/wot-design-uni/issues/214) +* 🐛 修复search组件suffix插槽无法使用的问题 ([6a4af41](https://github.com/Moonofweisheng/wot-design-uni/commit/6a4af41b93e8edd92e297eaea7c1bc566bfb4d6d)) + + +### ✨ Features | 新功能 + +* ✨ `notice-bar`增加垂直滚动功能 ([93d048b](https://github.com/Moonofweisheng/wot-design-uni/commit/93d048b219d66718880609d6ec9086ce058121fa)), closes [#122](https://github.com/Moonofweisheng/wot-design-uni/issues/122) +* ✨ `notice-bar`增加多文本轮播功能 ([c2e5e9b](https://github.com/Moonofweisheng/wot-design-uni/commit/c2e5e9bbd86093a5795d93aa23c2bd03d8416767)) +* ✨ `upload`组件增加`mode`属性传递给预览`image` ([acf3f99](https://github.com/Moonofweisheng/wot-design-uni/commit/acf3f999033df7b2925040ff83ad1088d0e59a44)), closes [#203](https://github.com/Moonofweisheng/wot-design-uni/issues/203) +* ✨ img组件的mode属性增加类型`ImageMode` ([1398982](https://github.com/Moonofweisheng/wot-design-uni/commit/139898209fea4559a69cbaffed2e7b45b91aa107)) +* ✨ img组件增加enable-preview属性来支持点击预览功能 ([e6a3b73](https://github.com/Moonofweisheng/wot-design-uni/commit/e6a3b73142e37547e60b8f1dd1845fc3e9d5d17e)), closes [#193](https://github.com/Moonofweisheng/wot-design-uni/issues/193) +* ✨ swiper组件增加current属性控制轮播项功能 ([443fd8a](https://github.com/Moonofweisheng/wot-design-uni/commit/443fd8a19e3b73ee61ae6a1692c5409e3d0c0b84)), closes [#211](https://github.com/Moonofweisheng/wot-design-uni/issues/211) + +### [1.2.10](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.9...v1.2.10) (2024-04-02) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Step组件description插槽无法使用的问题 ([e431294](https://github.com/Moonofweisheng/wot-design-uni/commit/e431294ea2b97858f93513c112f1a7574654a87d)) +* 🐛 修复Toast、MessageBox二次打开时部分参数未重置的问题 ([e2e7d37](https://github.com/Moonofweisheng/wot-design-uni/commit/e2e7d378e577d3d1f5582464bdd9e6c4e6d82e3d)) + + +### ✨ Features | 新功能 + +* ✨ 为所有组件补充customStyle属性 ([964240e](https://github.com/Moonofweisheng/wot-design-uni/commit/964240e2e7f640586a18bec1c11b0359afcf99e2)), closes [#212](https://github.com/Moonofweisheng/wot-design-uni/issues/212) + + +### ✏️ Documentation | 文档 + +* ✏️ 更新vitepress至1.0.1 ([da7684f](https://github.com/Moonofweisheng/wot-design-uni/commit/da7684f33ada867a9ba2f22bb1489c804a7d840e)) +* ✏️ 修复更新vitepress至1.0.1后友情链接丢失logo的问题 ([1e36c39](https://github.com/Moonofweisheng/wot-design-uni/commit/1e36c39ff7ab814741792ee91a2ee7d9085862f9)) +* ✏️ Steps文档标题调整为步骤条 ([1ea7996](https://github.com/Moonofweisheng/wot-design-uni/commit/1ea79960fd9facef7aa5ef17f0f9bde03daa0d7c)) + +### [1.2.9](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.8...v1.2.9) (2024-04-01) + + +### ✨ Features | 新功能 + +* ✨ Segmented分段器change事件参数类型扩充为SegmentedOption ([5592bc4](https://github.com/Moonofweisheng/wot-design-uni/commit/5592bc49b9439ef34306741f16c4b5c702d562b2)), closes [#204](https://github.com/Moonofweisheng/wot-design-uni/issues/204) + +### [1.2.8](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.7...v1.2.8) (2024-03-30) + + +### 🐛 Bug Fixes | Bug 修复 + +* 修复useLocale 不传 message 会丢失原有语言配置的问题 ([#209](https://github.com/Moonofweisheng/wot-design-uni/issues/209)) ([e854d0e](https://github.com/Moonofweisheng/wot-design-uni/commit/e854d0e758e44cba9213992794974b7ae5985abf)) + + +### ✨ Features | 新功能 + +* ✨ SelectPicker单选模式支持自动完成 ([#207](https://github.com/Moonofweisheng/wot-design-uni/issues/207)) ([11aa887](https://github.com/Moonofweisheng/wot-design-uni/commit/11aa887ae36153c0a6a0cd9053fc94c70acbcb0d)), closes [#206](https://github.com/Moonofweisheng/wot-design-uni/issues/206) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档中增加@uni-helper/vite-plugin-uni-components的使用提示 ([37d9d46](https://github.com/Moonofweisheng/wot-design-uni/commit/37d9d4631e434792b1e97dccac8a52a6d253d616)) + +### [1.2.7](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.6...v1.2.7) (2024-03-29) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复DatePicker占位符展示缺失的问题 ([8fbca94](https://github.com/Moonofweisheng/wot-design-uni/commit/8fbca94e3690e8b86ce59fbe668805839c50192b)) +* 🐛 修复DateTimePicker区域选择极值计算错误的问题 ([a1e9530](https://github.com/Moonofweisheng/wot-design-uni/commit/a1e9530a917981ca4cf96dde1aa268eaf3da059f)) +* 🐛 修复picker-view初始化报错的问题 ([2102f38](https://github.com/Moonofweisheng/wot-design-uni/commit/2102f38a107a7cc8a316cb7fdc5a9738a5bb7499)), closes [#205](https://github.com/Moonofweisheng/wot-design-uni/issues/205) +* 🐛 修复picker选择器在APP端包装二维数组逻辑错误导致无法实现多列选择器的问题 ([ed5d7ac](https://github.com/Moonofweisheng/wot-design-uni/commit/ed5d7ace2050f5ae7541c8fd2ec395de56fa73cc)) +* 🐛 移除文件移动时volar变更文件路径错误导致.vue文件中多出的无用路径字符串 ([1f8f8ae](https://github.com/Moonofweisheng/wot-design-uni/commit/1f8f8ae2bfb2b13a6b6fcd6435a2d75f47d0e775)) + +### [1.2.6](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.5...v1.2.6) (2024-03-27) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Picker 未选择时显示第一列值的问题 ([21839e0](https://github.com/Moonofweisheng/wot-design-uni/commit/21839e0caf170248f454d80645bc3aa2f3ae2cdb)) +* 🐛 修复DatetimePicker区间模式未选值时显示占位符错误的问题 ([37350ee](https://github.com/Moonofweisheng/wot-design-uni/commit/37350ee5234a0f30debd22d33fb168415ec4e72d)) + +### [1.2.5](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.4...v1.2.5) (2024-03-24) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复textarea在支付宝小程序上清除按钮点击热区失效的问题 ([84662f2](https://github.com/Moonofweisheng/wot-design-uni/commit/84662f254b85d3b554113c9ba4f73ca695596fe9)) + +### [1.2.4](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.3...v1.2.4) (2024-03-23) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复textarea、input的label存在icon时高度异常的问题 ([e487ced](https://github.com/Moonofweisheng/wot-design-uni/commit/e487ced1624ce9ba35b29537481302e07050612c)) +* 🐛 修复textarea无法换行的问题 ([25bd564](https://github.com/Moonofweisheng/wot-design-uni/commit/25bd56485508ae8b3dfffd13d47c306fbf42d65e)) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整组件库基于vite配置自动引入组件的介绍 ([2d23607](https://github.com/Moonofweisheng/wot-design-uni/commit/2d2360706fbe2a5d4024ceebd82720014c6b1ea2)) +* ✏️ 文档推荐用户从wot-design-uni.cn迁移至wot-design-uni.gitee.io ([72a567c](https://github.com/Moonofweisheng/wot-design-uni/commit/72a567c44867f049c1526f5d682e46155047516a)) +* ✏️ 增加steps设置激活项的介绍 ([7c0d36c](https://github.com/Moonofweisheng/wot-design-uni/commit/7c0d36c36214517d959aa27e284aacf59d2b074b)) + +### [1.2.3](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.2...v1.2.3) (2024-03-20) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复部分外部链接不可用的问题 ([e2fb515](https://github.com/Moonofweisheng/wot-design-uni/commit/e2fb5155c40e58e44920329cdfb4f2391bb81970)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 修复 checkbox 单独使用时无法切换选中状态的问题 ([#198](https://github.com/Moonofweisheng/wot-design-uni/issues/198)) ([4a20219](https://github.com/Moonofweisheng/wot-design-uni/commit/4a2021908f0d63ca398660950609bd5f4a7ca9b9)) + +### [1.2.2](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.1...v1.2.2) (2024-03-19) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复picker选择器绑定值value值为0时无法生效的问题 ([d4de4ba](https://github.com/Moonofweisheng/wot-design-uni/commit/d4de4ba93824905840adc49e2d85d7168c9fd48e)), closes [#195](https://github.com/Moonofweisheng/wot-design-uni/issues/195) + +### [1.2.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.2.0...v1.2.1) (2024-03-19) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复部分可为null的props丢失null类型的问题 ([604e9f3](https://github.com/Moonofweisheng/wot-design-uni/commit/604e9f3810f38637ee1a7640e642790719cd9d3f)) + +## [1.2.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.10...v1.2.0) (2024-03-19) + + +### ✨ Features | 新功能 + +* ✨ typescript类型支持增强 ([#192](https://github.com/Moonofweisheng/wot-design-uni/issues/192)) ([201e7a1](https://github.com/Moonofweisheng/wot-design-uni/commit/201e7a12b9c4023e35ff9540f5da09794ea3c6f7)) + +### [1.1.10](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.9...v1.1.10) (2024-03-15) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复tabbar默认shape固定底部安全区无遮挡的问题 ([03048bb](https://github.com/Moonofweisheng/wot-design-uni/commit/03048bba17966e13e864c4a3d29047986778d586)) + +### [1.1.9](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.8...v1.1.9) (2024-03-11) + + +### ✏️ Documentation | 文档 + +* ✏️ 推荐使用托管在gitee上的文档地址 ([24ae6ca](https://github.com/Moonofweisheng/wot-design-uni/commit/24ae6cac05b150ff8da3ab47cc4bb3eeac48a369)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复textarea在微信小程序平台下部分安卓手机maxlength不生效的问题 ([512e63b](https://github.com/Moonofweisheng/wot-design-uni/commit/512e63b0ad30ff7acb14fffbb124dba59e34d450)) + +### [1.1.8](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.7...v1.1.8) (2024-03-10) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复transitiont打开后立即关闭时无法关闭的问题 ([c1cebf6](https://github.com/Moonofweisheng/wot-design-uni/commit/c1cebf6de0b1c6a2f8a32aa4815adc8c0466eeca)) + +### [1.1.7](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.6...v1.1.7) (2024-03-09) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复badge组件多出一个script标签的问题 ([e1819b4](https://github.com/Moonofweisheng/wot-design-uni/commit/e1819b4dbcb3dc1244bbe5641cdb538d0ad9c5e7)), closes [#188](https://github.com/Moonofweisheng/wot-design-uni/issues/188) + +### [1.1.6](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.5...v1.1.6) (2024-03-06) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Tabar为round类型时开启safeAreaInsetBottom是样式异常的问题 ([aa9ae88](https://github.com/Moonofweisheng/wot-design-uni/commit/aa9ae88f35236dec15635bd8e4fd0c7023e5fb70)) + +### [1.1.5](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.4...v1.1.5) (2024-03-05) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Search、Input等组件clear事件在value变更前触发的问题 ([8d113a2](https://github.com/Moonofweisheng/wot-design-uni/commit/8d113a285dbffa705e44a31ad05e48f36978c46c)), closes [#185](https://github.com/Moonofweisheng/wot-design-uni/issues/185) + + +### ✏️ Documentation | 文档 + +* ✏️ 首页增加常见问题的入口 ([fd7a7dd](https://github.com/Moonofweisheng/wot-design-uni/commit/fd7a7dd287226f670cf02db9cf2856c9ebe52498)) + +### [1.1.4](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.3...v1.1.4) (2024-03-04) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Navbar显示下边框时fixed不生效的问题 ([18c09d8](https://github.com/Moonofweisheng/wot-design-uni/commit/18c09d87384699c044a9f84838b17f74eaff77b3)) + + +### ✏️ Documentation | 文档 + +* ✏️ 增加支付宝小程序styleIsolation配置的文档 ([68d1262](https://github.com/Moonofweisheng/wot-design-uni/commit/68d1262ed5ac6ccf8c078ba089e045739c2275e8)) + +### [1.1.3](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.2...v1.1.3) (2024-03-03) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档中增加提问的智慧和toast、message组件的常见问题 ([2fdd4b1](https://github.com/Moonofweisheng/wot-design-uni/commit/2fdd4b1c050ed8805637ec0b082ca4d20c3c17b6)) + +### [1.1.2](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.1...v1.1.2) (2024-03-01) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Button会存在一个默认border的问题 ([#182](https://github.com/Moonofweisheng/wot-design-uni/issues/182)) ([3714ffb](https://github.com/Moonofweisheng/wot-design-uni/commit/3714ffb0f1de55f3eae5a36b9235bdbc518b0738)) + +### [1.1.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.1.0...v1.1.1) (2024-02-29) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 ImgCropper 在钉钉小程序平台无法展示所选图片的问题 ([db8d029](https://github.com/Moonofweisheng/wot-design-uni/commit/db8d029db3a227cd062c6e9d7c14eb9d0f3dae87)) +* 🐛 修复微信小程序css使用标签选择器抛出警告的问题(wd-img) ([#181](https://github.com/Moonofweisheng/wot-design-uni/issues/181)) ([ee3da01](https://github.com/Moonofweisheng/wot-design-uni/commit/ee3da016439d68f1d9d061bb1b1cbd10f2863aa4)) + +## [1.1.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v1.0.0...v1.1.0) (2024-02-27) + + +### ✨ Features | 新功能 + +* ✨ Button 支持微信小程序chooseavatar和agreeprivacyauthorization事件 ([177c726](https://github.com/Moonofweisheng/wot-design-uni/commit/177c726e0d0f9bc435f815af2e4fc8e917ef144d)) +* ✨ DropDown组件支持钉钉小程序 ([924c65b](https://github.com/Moonofweisheng/wot-design-uni/commit/924c65b4f66e7d1ff75aa2bcb5c6cbe4e045fb92)) +* ✨ Slider 支持钉钉小程序 ([bea7a49](https://github.com/Moonofweisheng/wot-design-uni/commit/bea7a499edc3e0681ec11dd26333d8a969dd9b0e)) + + +### ✏️ Documentation | 文档 + +* ✏️ 新增支持钉钉小程序平台 ([9525f23](https://github.com/Moonofweisheng/wot-design-uni/commit/9525f23f207af47c10c37614279b8318500e3ede)) +* ✏️ 修复Segment演示demo在钉钉小程序平台展示异常的问题 ([4fbe556](https://github.com/Moonofweisheng/wot-design-uni/commit/4fbe5569b3cb1761c2ef7847a4abc1721d3ed220)) +* ✏️ 支持平台的介绍中新增支付宝小程序 ([320e4dd](https://github.com/Moonofweisheng/wot-design-uni/commit/320e4dd2e102146b8a466d378c8356286faeb28c)) + +## [1.0.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.3.1...v1.0.0) (2024-02-26) + + +### ✨ Features | 新功能 + +* ✨ 支持支付宝小程序并提供ConfigProvider的便利性优化 ([e1baca3](https://github.com/Moonofweisheng/wot-design-uni/commit/e1baca3ce5201c38e6b0aee5e6cb7099ecba9772)) +* ✨ sticky组件支持支付宝平台 ([3805882](https://github.com/Moonofweisheng/wot-design-uni/commit/3805882b8b1f8ad165d8cda528fa0b5cf3f96c27)) + + +### ✏️ Documentation | 文档 + +* ✏️ 演示demo增加组件库版本号的显示 ([19a00e3](https://github.com/Moonofweisheng/wot-design-uni/commit/19a00e34652bf672f7fdfd28899625dac977a1b6)) + +### [0.3.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.3.0...v0.3.1) (2024-02-26) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复大尺寸checkbox选中样式异常的问题 ([413cf3b](https://github.com/Moonofweisheng/wot-design-uni/commit/413cf3b6a04358bca5284704d750cfd224c1d277)) + +## [0.3.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.23...v0.3.0) (2024-02-21) + + +### ✨ Features | 新功能 + +* ✨ 调整Button 按钮样式受主色控制并优化幽灵按钮显示效果 ([5f0d1f5](https://github.com/Moonofweisheng/wot-design-uni/commit/5f0d1f5f8bac81435d248348ec5823e82d35f7a4)) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复select-picker组件绑定值描述错误的问题 ([b287111](https://github.com/Moonofweisheng/wot-design-uni/commit/b2871114311656580ade25c25f0775d9246f32b7)), closes [#178](https://github.com/Moonofweisheng/wot-design-uni/issues/178) +* ✏️ 增加Button细边框幽灵按钮的使用说明 ([366c34b](https://github.com/Moonofweisheng/wot-design-uni/commit/366c34b69faedee4874221c604d1a6d5c8c1a8e0)) + +### [0.2.23](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.22...v0.2.23) (2024-02-07) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档支持显示友情链接 ([adac43f](https://github.com/Moonofweisheng/wot-design-uni/commit/adac43f2a1b300d4169249e108389b3a24ac9ffa)) +* ✏️ 友情链接支持来自线上配置 ([50896bb](https://github.com/Moonofweisheng/wot-design-uni/commit/50896bb475c5e1c5be42bdc22a56a47db9a51481)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 MessageBox 国际化不生效的问题 ([48404a1](https://github.com/Moonofweisheng/wot-design-uni/commit/48404a1ccccf9081cf3e9f9918e20cb58a6bb12f)), closes [#177](https://github.com/Moonofweisheng/wot-design-uni/issues/177) + +### [0.2.22](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.21...v0.2.22) (2024-01-30) + + +### ✏️ Documentation | 文档 + +* ✏️ 修正 Popover 组件文档中menuclick示例错误的问题 ([9df96e7](https://github.com/Moonofweisheng/wot-design-uni/commit/9df96e7629296bfba2b7f951b83508cc9e4a3935)) + +### [0.2.21](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.19...v0.2.21) (2024-01-28) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Dropdown 组件点击已展开项时无法关闭的问题 ([3846590](https://github.com/Moonofweisheng/wot-design-uni/commit/38465905e76b929a4d4af93dfe4ad9f31503b2ad)) + + +### ✨ Features | 新功能 + +* ✨ 支持国际化 ([#168](https://github.com/Moonofweisheng/wot-design-uni/issues/168)) ([ce9f192](https://github.com/Moonofweisheng/wot-design-uni/commit/ce9f19244e4d376c5104be2b89d57426bf722aee)) + +### [0.2.19](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.18...v0.2.19) (2024-01-25) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Input 绑定值无法为null的问题 ([f745e14](https://github.com/Moonofweisheng/wot-design-uni/commit/f745e14d10d64b643aa2f9c0170f72db3a99bb3e)) +* 🐛 修复多列、单复选选择器列更新时显示值未更新的问题 ([5ba45b9](https://github.com/Moonofweisheng/wot-design-uni/commit/5ba45b94b711e1129873fa29b243a616087ddc2a)), closes [#167](https://github.com/Moonofweisheng/wot-design-uni/issues/167) + +### [0.2.18](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.17...v0.2.18) (2024-01-24) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 CheckBox 组件的选中色无法应用到css变量的问题 ([febfb61](https://github.com/Moonofweisheng/wot-design-uni/commit/febfb61cab3b55a9f78920ed4715f05a232fb9f6)) +* 🐛 修复 Radio 组件的选中色无法应用到css变量的问题 ([b7e8631](https://github.com/Moonofweisheng/wot-design-uni/commit/b7e86314139cc6291e851c350219fce837f0f26e)) + +### [0.2.17](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.16...v0.2.17) (2024-01-23) + + +### ✨ Features | 新功能 + +* ✨ Form 表单组件提供开关控制是否model变化时重置提示信息 ([b9f46ba](https://github.com/Moonofweisheng/wot-design-uni/commit/b9f46ba0da85acd7312753a34dd0ad3f2f7379a2)), closes [#166](https://github.com/Moonofweisheng/wot-design-uni/issues/166) + +### [0.2.16](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.15...v0.2.16) (2024-01-21) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复文档中关于日期选择器最大日期描述错误的问题 ([bb76ce3](https://github.com/Moonofweisheng/wot-design-uni/commit/bb76ce332c6977cbae981790aa356bc27c0d9efa)) + +### [0.2.15](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.14...v0.2.15) (2024-01-15) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Tab class类名属性错误的问题 ([dc87df7](https://github.com/Moonofweisheng/wot-design-uni/commit/dc87df70c7920d7cfabc571ace8beb2ce0dc2a7c)) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复 Upload 文档中before-upload钩子参数描述错误的问题 ([3ec7299](https://github.com/Moonofweisheng/wot-design-uni/commit/3ec7299ce724fce771b782f6110ba6ec29376291)) + +### [0.2.14](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.13...v0.2.14) (2024-01-14) + + +### ✨ Features | 新功能 + +* ✨ InputNumber步进器支持禁用输入框 ([933bce3](https://github.com/Moonofweisheng/wot-design-uni/commit/933bce314618956ff922daacef5b3594f36baf9b)) + +### [0.2.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.12...v0.2.13) (2024-01-12) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复演示文档刷新后指向localhost的问题 ([4cd8b16](https://github.com/Moonofweisheng/wot-design-uni/commit/4cd8b16bdf5ea8e93cff85396025844e9ebd031c)) + +### [0.2.12](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.11...v0.2.12) (2024-01-11) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Tabbar 错误地抛出提示信息的问题 ([1c89ed0](https://github.com/Moonofweisheng/wot-design-uni/commit/1c89ed0a7158e79556e83c6aeb89bd1e93e4ea0d)) + + +### ✏️ Documentation | 文档 + +* ✏️ 增加 Circle 组件使用插槽的示例 ([6341594](https://github.com/Moonofweisheng/wot-design-uni/commit/6341594295732dac951c465d95537f36addbbf9c)) +* ✏️ 增加展示gitee的star徽标 ([1abf962](https://github.com/Moonofweisheng/wot-design-uni/commit/1abf962e37e27c1c1688bed2026c66022e63ce9b)) + +### [0.2.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.10...v0.2.11) (2024-01-09) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Overlay 类型声明错误的问题 ([930e59a](https://github.com/Moonofweisheng/wot-design-uni/commit/930e59a9b09aee535ec4c316e44ed3c0e31be628)) + + +### ✏️ Documentation | 文档 + +* ✏️ 提供托管在Giteee上的文档网站 ([6d62e9e](https://github.com/Moonofweisheng/wot-design-uni/commit/6d62e9e7ddda0bd9f51f2ad9e2893f1ed3709c63)) + +### [0.2.10](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.9...v0.2.10) (2024-01-08) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 col-picker 暗黑模式下标题文字颜色不清楚的问题 ([217ffb7](https://github.com/Moonofweisheng/wot-design-uni/commit/217ffb7dacb66b2017145c6e43fc8c873a6e9dd2)) +* 🐛 修复 steps 组件自定义图标显示异常的问题 ([0300f63](https://github.com/Moonofweisheng/wot-design-uni/commit/0300f63f35a5afcd278aba3b4ab721f498716d94)) +* 🐛 修复支付宝小程序暗黑模式下 Input、Textarea 组件显示异常的问题 ([8a9c344](https://github.com/Moonofweisheng/wot-design-uni/commit/8a9c344872bfcd81a73f71520f51b6b849f516d5)) + +### [0.2.9](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.8...v0.2.9) (2024-01-07) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 col-picker 组件首次打开指示线位置异常的问题 ([323fb00](https://github.com/Moonofweisheng/wot-design-uni/commit/323fb00942b7032b678d92ab03360dc7bb8faae8)) + +### [0.2.8](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.7...v0.2.8) (2024-01-06) + + +### ✏️ Documentation | 文档 + +* ✏️ 展示netlify支持 ([410b180](https://github.com/Moonofweisheng/wot-design-uni/commit/410b180ec9c660ab9c49d6eb203d53c35919c512)) + +### [0.2.7](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.5...v0.2.7) (2024-01-06) + + +### ✨ Features | 新功能 + +* ✨ 优化provide/inject的使用方式 ([892f467](https://github.com/Moonofweisheng/wot-design-uni/commit/892f4675a848ee3d4c965c36d5c4034aa5806b6d)) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档网站增加自定义footer ([dd8bc00](https://github.com/Moonofweisheng/wot-design-uni/commit/dd8bc003eedcdc43cdd60bb896c897d108dd4a51)) +* ✏️ 修复vitepress自定义footer展示错误的问题 ([c0701d5](https://github.com/Moonofweisheng/wot-design-uni/commit/c0701d584e5d9b84e6d913dd23666b80d803407b)) + +### [0.2.6](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.5...v0.2.6) (2024-01-06) + + +### ✨ Features | 新功能 + +* ✨ 优化provide/inject的使用方式 ([892f467](https://github.com/Moonofweisheng/wot-design-uni/commit/892f4675a848ee3d4c965c36d5c4034aa5806b6d)) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档网站增加自定义footer ([dd8bc00](https://github.com/Moonofweisheng/wot-design-uni/commit/dd8bc003eedcdc43cdd60bb896c897d108dd4a51)) + +### [0.2.5](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.4...v0.2.5) (2023-12-28) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Form 导入FormRules、ErrorMessage时未指定为type的问题 ([c88c84e](https://github.com/Moonofweisheng/wot-design-uni/commit/c88c84e8b71fc2404643a623c28f4953ffe36e71)) +* 🐛 修复 SwipeAction 组件在H5端导致页面无法上下滚动的问题 ([1f68ce1](https://github.com/Moonofweisheng/wot-design-uni/commit/1f68ce13c8109dd92ca4bf055f66aa8dff24c83d)), closes [#149](https://github.com/Moonofweisheng/wot-design-uni/issues/149) + +### [0.2.4](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.3...v0.2.4) (2023-12-27) + +### [0.2.3](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.2...v0.2.3) (2023-12-27) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复动态表单演示页面标题错误的问题 ([7c65359](https://github.com/Moonofweisheng/wot-design-uni/commit/7c65359c88614ae53c4800d0946d8e09ef547a26)) + +### [0.2.2](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.1...v0.2.2) (2023-12-26) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 移除 Swiper 的list中不必填的属性 ([672f680](https://github.com/Moonofweisheng/wot-design-uni/commit/672f680051009edd23a67d4e32722839f519d9ba)) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复 Textarea 文档示例错误的问题 ([7da3a4c](https://github.com/Moonofweisheng/wot-design-uni/commit/7da3a4cdfe35f87193f57139de0819130424d6ea)) +* ✏️ 优化 Form 相关组件的文档介绍 ([6a0a7a7](https://github.com/Moonofweisheng/wot-design-uni/commit/6a0a7a730fcd8904609f8a48339e1079baf3e9be)) + +### [0.2.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.2.0...v0.2.1) (2023-12-25) + + +### ✏️ Documentation | 文档 + +* ✏️ PassowrdInput 密码输入框组件增加文档标题 ([cccc4cc](https://github.com/Moonofweisheng/wot-design-uni/commit/cccc4cc0d4952f594e5387bad32a7248009ebd9e)) + +## [0.2.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.70...v0.2.0) (2023-12-24) + + +### ✨ Features | 新功能 + +* ✨ 新增 Form 表单组件 ([c8086d6](https://github.com/Moonofweisheng/wot-design-uni/commit/c8086d624c01bfbae3b9dfc324d33d6bfe46e041)) +* ✨ 新增 PasswordInput 密码输入框 ([b8c68f9](https://github.com/Moonofweisheng/wot-design-uni/commit/b8c68f92f7ddbf3ae2a58bf36593a0cd0340f225)) +* ✨ 新增 textarea 文本域组件 ([ed56bcd](https://github.com/Moonofweisheng/wot-design-uni/commit/ed56bcdb0337c198e8834182d47d1cd83513091d)) +* ✨ 增加父子组件 Provide/Inject 的hooks ([eb971d4](https://github.com/Moonofweisheng/wot-design-uni/commit/eb971d4e86733b0337de0c63f26b373424a842f0)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Input 组件在支付宝平台存在一个默认padding的问题 ([921c906](https://github.com/Moonofweisheng/wot-design-uni/commit/921c90606e05ea1b29cdee39cde7858907b2cd4d)) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整主题定制相关文档 ([2d5b1af](https://github.com/Moonofweisheng/wot-design-uni/commit/2d5b1af2787d33ec24eb6e6ab9db6ff941d80c2b)) +* ✏️ 增加 textarea 文本域组件功能的迁移说明 ([61ebc7d](https://github.com/Moonofweisheng/wot-design-uni/commit/61ebc7db1e1db3e8634a87c24fae0869f4b6f17b)) +* ✏️ PasswordInput 密码输入框文档增加版本介绍 ([56ccf60](https://github.com/Moonofweisheng/wot-design-uni/commit/56ccf6005e502237e1ff45b5b52e852b402a10c9)) + +### [0.1.70](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.69...v0.1.70) (2023-12-23) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 picker 的列value为0时回显异常的问题 ([2ba93c3](https://github.com/Moonofweisheng/wot-design-uni/commit/2ba93c328c54c41b6e1e9ead946e9c46e278ebb9)), closes [#155](https://github.com/Moonofweisheng/wot-design-uni/issues/155) + +### [0.1.69](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.68...v0.1.69) (2023-12-13) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Notify 使用文档错误的问题 ([3fe6423](https://github.com/Moonofweisheng/wot-design-uni/commit/3fe6423c9c6727eaa3655029bf862b9be182b70b)), closes [#148](https://github.com/Moonofweisheng/wot-design-uni/issues/148) + +### [0.1.68](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.67...v0.1.68) (2023-12-07) + + +### ✏️ Documentation | 文档 + +* ✏️ 增加 Gap 组件的文档 ([9e3a8c1](https://github.com/Moonofweisheng/wot-design-uni/commit/9e3a8c1506f9ef93f9f0155ac948c8bc4d215ea8)) + +### [0.1.67](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.66...v0.1.67) (2023-12-06) + + +### ✨ Features | 新功能 + +* ✨ 新增 Gap 间隔槽组件 ([#147](https://github.com/Moonofweisheng/wot-design-uni/issues/147)) ([fa7cd16](https://github.com/Moonofweisheng/wot-design-uni/commit/fa7cd163810cbcd63fc2a99a6a92ccd8a803b2f1)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Picker组件v-model数据不更新的问题 ([e60f475](https://github.com/Moonofweisheng/wot-design-uni/commit/e60f47538130625a8c8f93e3a6795b7e71588002)), closes [#146](https://github.com/Moonofweisheng/wot-design-uni/issues/146) + +### [0.1.66](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.65...v0.1.66) (2023-12-01) + + +### ✨ Features | 新功能 + +* ✨ Tag 组件type增加属性值default ([#143](https://github.com/Moonofweisheng/wot-design-uni/issues/143)) ([48f0e4b](https://github.com/Moonofweisheng/wot-design-uni/commit/48f0e4b3c484755a0da4eb11fa814c6b52be74b1)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 ActionSheet 组件设置custom-class无效的问题 ([1e5bcf7](https://github.com/Moonofweisheng/wot-design-uni/commit/1e5bcf7d0a8be66b80de81a0359d3fb429fdf52d)) + +### [0.1.65](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.64...v0.1.65) (2023-11-29) + + +### ✨ Features | 新功能 + +* ✨ 新增 NumberKeyboard 数字键盘组件 ([#139](https://github.com/Moonofweisheng/wot-design-uni/issues/139)) ([7bb4455](https://github.com/Moonofweisheng/wot-design-uni/commit/7bb4455c6d9eca179ba174b8ad0da6ae8a09defc)) +* Tag新增类型标签添加slot ([7977dbb](https://github.com/Moonofweisheng/wot-design-uni/commit/7977dbbe3565eb06b700f2c55a31803647760fa9)) + + +### ✏️ Documentation | 文档 + +* ✏️ 新增关于 Tag 组件的add插槽的介绍 ([537fa5e](https://github.com/Moonofweisheng/wot-design-uni/commit/537fa5ebf8dcdc14ee12fc1f1e5a5f829653a14a)) + +### [0.1.64](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.63...v0.1.64) (2023-11-25) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复DateTimePicker标题展示和模式为区间时before-confirm参数错误的问题 ([7bcd12b](https://github.com/Moonofweisheng/wot-design-uni/commit/7bcd12ba633224dd42b160f0b43fadc99ac76707)) + +### [0.1.63](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.62...v0.1.63) (2023-11-23) + + +### ✨ Features | 新功能 + +* ✨ CountDown 倒计时组件支持custom-class和custom-style ([dd60d6d](https://github.com/Moonofweisheng/wot-design-uni/commit/dd60d6df855cc49eba36beb7bcfb9eeb96ed0c82)) +* ✨ Search 搜索组件支持自动聚焦和清空后自动聚焦 ([2e3ab63](https://github.com/Moonofweisheng/wot-design-uni/commit/2e3ab63d3dad582c44d9d9f8d2b57e21ee22f380)) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复文档中config-provider等页面的错误 ([f71e641](https://github.com/Moonofweisheng/wot-design-uni/commit/f71e6412e770f2043e4cb9a35950a68aacf0e542)) + +### [0.1.62](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.61...v0.1.62) (2023-11-22) + + +### ✨ Features | 新功能 + +* ✨ Badge 徽标组件支持控制是否显示0值 ([65cfb2c](https://github.com/Moonofweisheng/wot-design-uni/commit/65cfb2ca15c29783f6de48de0bda4ddc3d43664a)) +* ✨ Upload 上传组件支持h5端获取文件后缀名 ([59fe70c](https://github.com/Moonofweisheng/wot-design-uni/commit/59fe70c0d0c55c7ecca26902b41599be94e34fe3)) + + +### ✏️ Documentation | 文档 + +* ✏️ 优化 Upload 文档中关于云存储内容的样式 ([607ce05](https://github.com/Moonofweisheng/wot-design-uni/commit/607ce05100ffef9c5c98b503e580a718551f5552)) + +### [0.1.61](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.60...v0.1.61) (2023-11-20) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复 Tag 标签组件文档错乱的问题 ([502203b](https://github.com/Moonofweisheng/wot-design-uni/commit/502203bebf08d7e6851b8dd2f94768f6c620da26)) +* ✏️ ImgCropper 组件演示页面增加微信小程序隐私协议弹框 ([3af9246](https://github.com/Moonofweisheng/wot-design-uni/commit/3af9246d1f1876ba3c83f6829a9716ad37ae5829)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Calendar 日历组件存在未定义属性导致警告的问题 ([d0d3152](https://github.com/Moonofweisheng/wot-design-uni/commit/d0d3152a5ca1a3e06135b12f4565211258619d1f)) +* 🐛 修复 CountDown 倒计时组件文档手动控制示例错误的问题 ([3c373fb](https://github.com/Moonofweisheng/wot-design-uni/commit/3c373fbf3af02c8a73ddd3a4063f9408ec4f33ff)) +* 🐛 修复 SelectPicker 组件loading状态仍可以滚动的问题 ([c5a1bff](https://github.com/Moonofweisheng/wot-design-uni/commit/c5a1bfff576aad8a6f03288a6a12a8ed24f776f2)) + + +### ✨ Features | 新功能 + +* ✨ Upload 上传组件支持上传至云存储 ([523a6be](https://github.com/Moonofweisheng/wot-design-uni/commit/523a6be40b065c4cc28cfe81fdcb200142d9a455)) + +### [0.1.60](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.59...v0.1.60) (2023-11-20) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复 CountDown 倒计时组件默认slot用法的介绍错误的问题 ([2fbb88f](https://github.com/Moonofweisheng/wot-design-uni/commit/2fbb88fcd9fe21de09637d48149278d9aef5e1d9)) + +### [0.1.59](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.58...v0.1.59) (2023-11-19) + +### [0.1.58](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.57...v0.1.58) (2023-11-19) + + +### ✨ Features | 新功能 + +* ✨ 新增 CountDown 倒计时组件 ([a805d04](https://github.com/Moonofweisheng/wot-design-uni/commit/a805d04827600525c08fbc1848cb3a524b48e81a)) +* ✨ CountDown 倒计时组件支持小程序 ([22f249a](https://github.com/Moonofweisheng/wot-design-uni/commit/22f249ae5bdedea1ecebfe31350c7b5a1e394f2e)) + +### [0.1.57](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.56...v0.1.57) (2023-11-17) + + +### ✨ Features | 新功能 + +* ✨ 新增 Fab 悬浮动作按钮组件 ([3c526fe](https://github.com/Moonofweisheng/wot-design-uni/commit/3c526feb102ccf17da0678a6e1c004bb82d57f0f)) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复 Cell 组件点击反馈的介绍错误的问题 ([9096d81](https://github.com/Moonofweisheng/wot-design-uni/commit/9096d81f514348d6103f33590387d0406b217198)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Table 表格组件数字英文换行失效的问题 ([47ac339](https://github.com/Moonofweisheng/wot-design-uni/commit/47ac3390cb58d250129a9db6ade8d90f980855a1)) + +### [0.1.56](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.55...v0.1.56) (2023-11-12) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Tabbar 标签栏组件 bordered 属性无效的问题 ([69c2656](https://github.com/Moonofweisheng/wot-design-uni/commit/69c265638c6fc36a1479a37c052a572da333006f)) + +### [0.1.55](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.54...v0.1.55) (2023-11-12) + + +### 🐛 Bug Fixes | Bug 修复 + +* 修正README.md 中[贡献指南]链接错误,跳转失败的问题。 ([071de88](https://github.com/Moonofweisheng/wot-design-uni/commit/071de88f98fa90492032193606941fbcdfe9283d)) + + +### ✨ Features | 新功能 + +* ✨ Swiper 轮播图组件增加imageMode属性支持自定义图片裁剪缩放模式 ([4205c01](https://github.com/Moonofweisheng/wot-design-uni/commit/4205c0149d3224e318ef21563e96f0a843ad13bc)) + +### [0.1.54](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.53...v0.1.54) (2023-11-10) + + +### 🐛 Bug Fixes | Bug 修复 + +* 修正ColPicker多列选择器v-model类型提示使用Record[]实际上的数据是单维数组的问题 ([c490ac6](https://github.com/Moonofweisheng/wot-design-uni/commit/c490ac607e6f9eb7207b90943b83ce1696a30fd4)) + +### [0.1.53](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.52...v0.1.53) (2023-11-09) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Input 输入框组件包含无用显示内容的问题 ([13a3106](https://github.com/Moonofweisheng/wot-design-uni/commit/13a3106055d66083d640912bfff67f2e08781f03)) + +### [0.1.52](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.51...v0.1.52) (2023-11-09) + + +### ✨ Features | 新功能 + +* ✨ Input绑定值为null时的警告从error改为warn ([70f1407](https://github.com/Moonofweisheng/wot-design-uni/commit/70f1407eec057668da0117c9861b523ab667da70)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Badge 徽标组件暗黑模式下边框颜色未兼容的问题 ([c0a0b5a](https://github.com/Moonofweisheng/wot-design-uni/commit/c0a0b5aaea238f144978a3a9b2ab6db202dfdc21)), closes [#115](https://github.com/Moonofweisheng/wot-design-uni/issues/115) + +### [0.1.51](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.50...v0.1.51) (2023-11-06) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复引入错误依赖的问题 ([15bc876](https://github.com/Moonofweisheng/wot-design-uni/commit/15bc876a3026319c88ce4b757593243f9869ce39)) + +### [0.1.50](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.49...v0.1.50) (2023-11-06) + + +### ✨ Features | 新功能 + +* ✨ SidebarItem、TabbarItem、GridItem组件增加徽标自定义属性badge-props ([7143098](https://github.com/Moonofweisheng/wot-design-uni/commit/71430989bff81a137fc5199eeeefe0a4da3ce31d)) + +### [0.1.49](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.48...v0.1.49) (2023-11-05) + + +### ✨ Features | 新功能 + +* ✨ 新增 Sidebar 侧边栏组件 ([#113](https://github.com/Moonofweisheng/wot-design-uni/issues/113)) ([d189378](https://github.com/Moonofweisheng/wot-design-uni/commit/d189378a02aeb36c275218358849a187e88ce687)) + +### [0.1.48](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.47...v0.1.48) (2023-11-04) + + +### ✨ Features | 新功能 + +* ✨ Input 输入框增加支持微信小程序原生属性always-embed ([57d00ec](https://github.com/Moonofweisheng/wot-design-uni/commit/57d00ececd9849a2d21f59fc863b6ad8933419d8)) + +### [0.1.47](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.46...v0.1.47) (2023-11-02) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复 Image 图片组件演示demo样式不友好的问题 ([cbdab19](https://github.com/Moonofweisheng/wot-design-uni/commit/cbdab1959efff642a60a351ffd6454dcd173b9a4)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Input 组件为textarea类型时show-confirm-bar不生效的问题 ([eebec8a](https://github.com/Moonofweisheng/wot-design-uni/commit/eebec8a74fa9399bfd305cadb1a9b6a526e88568)) +* 🐛 img 预览demo布局错位 ([0397809](https://github.com/Moonofweisheng/wot-design-uni/commit/0397809d81010e109c238eefea56c82bd06a50cb)) + + +### ✨ Features | 新功能 + +* ✨ 图片添加圆角大小设置 ([98edaed](https://github.com/Moonofweisheng/wot-design-uni/commit/98edaed6cb1c81b9ed6e05561814aaa51b31b2b3)) +* ✨ Badge 徽标组件增加customStyle自定义样式 ([d194106](https://github.com/Moonofweisheng/wot-design-uni/commit/d194106f07fb46f6a979967ba327dee1b41ca70e)) + +### [0.1.46](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.45...v0.1.46) (2023-11-02) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Tabs 组件在微信小程序端有概率不绘制下划线的问题 ([d70ec65](https://github.com/Moonofweisheng/wot-design-uni/commit/d70ec65998d1ca1fbdbd3b4ef1af4a292a597f55)) + +### [0.1.45](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.44...v0.1.45) (2023-11-01) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Switch 开关组件自定义大小无效的问题 ([15ffa1f](https://github.com/Moonofweisheng/wot-design-uni/commit/15ffa1f9172d3c11722c71ca370c1016e25f2b41)) + +### [0.1.44](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.43...v0.1.44) (2023-11-01) + + +### ✨ Features | 新功能 + +* ✨ 使用 useQueue hook替换clickOut实现关闭多个气泡等组件的功能 ([3a24999](https://github.com/Moonofweisheng/wot-design-uni/commit/3a24999c1e28414b12806cad3c3bc6f7a445593f)) + + +### ✏️ Documentation | 文档 + +* ✏️ 优化演示项目首页样式 ([e98f30e](https://github.com/Moonofweisheng/wot-design-uni/commit/e98f30e0125e287d2bc5cdbcfff69a35cb7436d8)) + +### [0.1.43](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.42...v0.1.43) (2023-10-31) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Tooltip 文字提示组件微信端关闭按钮样式错误的问题 ([ec1b949](https://github.com/Moonofweisheng/wot-design-uni/commit/ec1b9490b9517d0e4ebe4a5130a418a684b1a589)) + +### [0.1.42](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.41...v0.1.42) (2023-10-31) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Popover、Tooltip 组件展开过程中无法遮盖图片的问题 ([db009c1](https://github.com/Moonofweisheng/wot-design-uni/commit/db009c1229413f7ecc446e3e3a1db4d7678268b3)) + +### [0.1.41](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.40...v0.1.41) (2023-10-31) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Popover、Tooltip 组件展开切换动画不流畅的问题 ([c765b08](https://github.com/Moonofweisheng/wot-design-uni/commit/c765b085a6018433bb95fd7647c091393e2e6e7c)), closes [#101](https://github.com/Moonofweisheng/wot-design-uni/issues/101) + +### [0.1.40](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.39...v0.1.40) (2023-10-30) + + +### ✏️ Documentation | 文档 + +* ✏️ 移除文档中 Search 组件未支持的插槽 ([325e140](https://github.com/Moonofweisheng/wot-design-uni/commit/325e14046de38eb7c4e792a64a290c9997af5cba)) + +### [0.1.39](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.38...v0.1.39) (2023-10-29) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 DateTimePicker 日期选择器组件双向绑定错误的问题 ([1b13873](https://github.com/Moonofweisheng/wot-design-uni/commit/1b13873cef4b7c760698abce7dca500cd548c660)) + + +### ✨ Features | 新功能 + +* ✨ 新增 Table 表格组件 ([#98](https://github.com/Moonofweisheng/wot-design-uni/issues/98)) ([c8395f8](https://github.com/Moonofweisheng/wot-design-uni/commit/c8395f8a7e1ad041b003672081b715a7c755adc1)) +* ✨ Collapse 折叠面板组件增加分割线 ([adc6633](https://github.com/Moonofweisheng/wot-design-uni/commit/adc6633ad80b74e801a48a50917c9a2d378de9e0)), closes [#97](https://github.com/Moonofweisheng/wot-design-uni/issues/97) + +### [0.1.38](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.37...v0.1.38) (2023-10-25) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Upload 组件showLimitNum属性名拼写错误的问题 ([301cbff](https://github.com/Moonofweisheng/wot-design-uni/commit/301cbff20facf60b5645108972f22c8c14235f87)) + +### [0.1.37](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.36...v0.1.37) (2023-10-25) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复Tabbar组件类型警告的问题并优化文档相关链接 ([28c3cef](https://github.com/Moonofweisheng/wot-design-uni/commit/28c3cefdfc24f3f6f2669de5f93456a0db281f72)) +* ✏️ issues 模板更新 ([e34c5cd](https://github.com/Moonofweisheng/wot-design-uni/commit/e34c5cded1c850d22165c544a3c6a351701479ec)) + +### [0.1.36](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.35...v0.1.36) (2023-10-21) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Tabs 指定name时双向绑定值仍为index的问题 ([756cad8](https://github.com/Moonofweisheng/wot-design-uni/commit/756cad8d6fcaefb0bf73f1cd2b9f4a24f5827b37)), closes [#91](https://github.com/Moonofweisheng/wot-design-uni/issues/91) + +### [0.1.35](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.34...v0.1.35) (2023-10-21) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Tabs 组件通过name匹配时抛出异常的问题 ([b36fb1f](https://github.com/Moonofweisheng/wot-design-uni/commit/b36fb1f9def0aa99c521ffc20c6cae8074b56838)), closes [#91](https://github.com/Moonofweisheng/wot-design-uni/issues/91) + +### [0.1.34](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.33...v0.1.34) (2023-10-18) + + +### ✨ Features | 新功能 + +* ✨ SelectPicker 单复选选择器增加 scroll-into-view 属性支持定位到选中值 ([00b27c1](https://github.com/Moonofweisheng/wot-design-uni/commit/00b27c187438426471dab2ea15bc39d627773ab2)), closes [#68](https://github.com/Moonofweisheng/wot-design-uni/issues/68) + +### [0.1.33](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.32...v0.1.33) (2023-10-17) + + +### ✨ Features | 新功能 + +* ✨ 新增 Navbar 导航栏组件 ([#86](https://github.com/Moonofweisheng/wot-design-uni/issues/86)) ([5f66f71](https://github.com/Moonofweisheng/wot-design-uni/commit/5f66f713fae9e693fda4a472bc3e0767a1a6d3e8)) + +### [0.1.32](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.31...v0.1.32) (2023-10-16) + + +### ✨ Features | 新功能 + +* ✨ Tabs 组件调整为受控组件 ([b2a70bc](https://github.com/Moonofweisheng/wot-design-uni/commit/b2a70bc8f32800119924b29283db760af8a3ddb1)), closes [#82](https://github.com/Moonofweisheng/wot-design-uni/issues/82) + +### [0.1.31](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.30...v0.1.31) (2023-10-16) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复wd-popup组件的click-modal方法错误调用的问题 ([224e3e5](https://github.com/Moonofweisheng/wot-design-uni/commit/224e3e53f912a236e8e24f8afef64fa09f6a89aa)) + + +### ✏️ Documentation | 文档 + +* ✏️ 更新文档中关于组件数量的介绍 ([4fa7355](https://github.com/Moonofweisheng/wot-design-uni/commit/4fa7355e69a8bb32d1c9924cfc717caaf3345ee5)) +* ✏️ 增加 Overlay 遮罩层组件的文档 ([3bca4b6](https://github.com/Moonofweisheng/wot-design-uni/commit/3bca4b65c2bc7cd7f90e8b9513c619799f9a438b)) + +### [0.1.30](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.29...v0.1.30) (2023-10-14) + + +### ✨ Features | 新功能 + +* ✨ 新增 Overlay 遮罩层组件 ([41b2c4f](https://github.com/Moonofweisheng/wot-design-uni/commit/41b2c4f3677dcce9c3e18875b7a1ec32d02b3d6a)) +* ✨ Popup 弹出层组件增加 lock-scroll 属性 ([a6987e6](https://github.com/Moonofweisheng/wot-design-uni/commit/a6987e65da2f121d4e95c1b5cb271ed8f9a06e58)) + +### [0.1.29](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.28...v0.1.29) (2023-10-13) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Tabbar 标签栏组件固定底部时不设置placeholder情况下仍占据相应空间的问题 ([b58f9df](https://github.com/Moonofweisheng/wot-design-uni/commit/b58f9dfc8230e9427f2af658c8315c5b022b232c)) + +### [0.1.28](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.27...v0.1.28) (2023-10-12) + + +### ✏️ Documentation | 文档 + +* ✏️ 文档样式优化 ([f21ecb9](https://github.com/Moonofweisheng/wot-design-uni/commit/f21ecb9dfbfbf0afe49a760d24ebdc08e4799717)) + +### [0.1.27](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.26...v0.1.27) (2023-10-12) + + +### ⚡ Performance Improvements | 性能优化 + +* ⚡ Segmented 分段器组件兼容支付宝小程序 ([3fd57a6](https://github.com/Moonofweisheng/wot-design-uni/commit/3fd57a600b537b945a8224bb97344baa9b0929e0)) + + +### ✏️ Documentation | 文档 + +* ✏️ 调整文档中图片的CDN地址 ([f704568](https://github.com/Moonofweisheng/wot-design-uni/commit/f704568f0299acbd3cc2d88934bfa1641b6cc792)) +* ✏️ 修复文档中根节点错写为根结点的问题 ([6da4145](https://github.com/Moonofweisheng/wot-design-uni/commit/6da414503ceb8b6de680b10332af45dbbbe7229d)) + + +### ✨ Features | 新功能 + +* ✨ 新增 Tabbar 标签栏组件 ([aa0bf19](https://github.com/Moonofweisheng/wot-design-uni/commit/aa0bf194865e381af41f7afa18e46105e0c812a9)) +* ✨ Icon 组件新增图标并支持第三方iconfont ([bc241ac](https://github.com/Moonofweisheng/wot-design-uni/commit/bc241acfc103309f196f4c04e08288526a056073)) + +### [0.1.26](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.25...v0.1.26) (2023-10-10) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Slider 滑块组件双向滑动时右边滑块百分比计算错误的问题 ([92db0f2](https://github.com/Moonofweisheng/wot-design-uni/commit/92db0f2c7fb60b04e1562c55f6296b1b2b456144)) + +### [0.1.25](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.24...v0.1.25) (2023-10-10) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Silder 滑块组件双向滑动时自定义最大值小于100无法滚动到最大值的问题 ([a70afa4](https://github.com/Moonofweisheng/wot-design-uni/commit/a70afa43239bc233ee0250e26227dbacd5c7021b)), closes [#69](https://github.com/Moonofweisheng/wot-design-uni/issues/69) + +### [0.1.24](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.23...v0.1.24) (2023-10-10) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 优化 Badge 徽标组件超出max的显示并修复分段器组件错误依赖的问题 ([a48adc8](https://github.com/Moonofweisheng/wot-design-uni/commit/a48adc8395ab167bb88a7a647420b467d7e4c46d)) + +### [0.1.23](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.22...v0.1.23) (2023-09-28) + + +### ✨ Features | 新功能 + +* ✨ 增加 segmented 分段器组件 ([00f52c8](https://github.com/Moonofweisheng/wot-design-uni/commit/00f52c89e0aebc86f70aa8a7391ce1f17412333d)) + +### [0.1.22](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.21...v0.1.22) (2023-09-25) + + +### ✨ Features | 新功能 + +* ✨ 新增 Swiper 轮播图组件 ([cf9fe98](https://github.com/Moonofweisheng/wot-design-uni/commit/cf9fe9807efe863e786bc56eedf506647ac143d2)) + +### [0.1.21](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.20...v0.1.21) (2023-09-22) + +### [0.1.20](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.19...v0.1.20) (2023-09-20) + + +### ✏️ Documentation | 文档 + +* ✏️ 恢复展示 Circle 组件的演示Demo ([c2cba05](https://github.com/Moonofweisheng/wot-design-uni/commit/c2cba056578593172998f03592652ab63ed23aef)) +* ✏️ 文档演示项目 Circle 页面文件调整为大写 ([fff8de8](https://github.com/Moonofweisheng/wot-design-uni/commit/fff8de8f8d5f829c5b054d863905a7bb116f45f4)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Circle 组件重复创建canvas导致警告的问题 ([6917201](https://github.com/Moonofweisheng/wot-design-uni/commit/69172016ba840458dd40755050929a8231fd4cd5)) +* 🐛 修复 Skeleton 骨架屏组件编译到APP端异常的问题([#52](https://github.com/Moonofweisheng/wot-design-uni/issues/52)) ([7a9a31b](https://github.com/Moonofweisheng/wot-design-uni/commit/7a9a31bd5db76419408a114fbed02c108b972049)) +* 🐛 修复 Tag 组件编译到微信小程序平台样式错误的问题([#53](https://github.com/Moonofweisheng/wot-design-uni/issues/53)) ([6aec241](https://github.com/Moonofweisheng/wot-design-uni/commit/6aec2414a384c68e7b4b09f57d028173be942f7b)) + +### [0.1.19](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.18...v0.1.19) (2023-09-20) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Cell、Grid 组件跳转方法在编译到H5端失效的问题([#49](https://github.com/Moonofweisheng/wot-design-uni/issues/49)) ([51425b1](https://github.com/Moonofweisheng/wot-design-uni/commit/51425b107a8b262bf9c1f0c7ee41bb8d56a12837)) + + +### ✨ Features | 新功能 + +* ✨ 新增 Circle 环形进度条组件,支持进度渐变动画 ([7c38a6f](https://github.com/Moonofweisheng/wot-design-uni/commit/7c38a6f03e76d91d82a80d2a4cdd875acfb7290b)) + +### [0.1.18](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.17...v0.1.18) (2023-09-19) + + +### ✏️ Documentation | 文档 + +* ✏️ README中增加展示 star-history ([e7cd794](https://github.com/Moonofweisheng/wot-design-uni/commit/e7cd794201435ae8109b562daf70def74ab4ac98)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 PickerView 组件选中框被遮盖的问题([#46](https://github.com/Moonofweisheng/wot-design-uni/issues/46)) ([a60440b](https://github.com/Moonofweisheng/wot-design-uni/commit/a60440b8c52723e4c194b103e9b1b236a7cb29fe)) + +### [0.1.17](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.16...v0.1.17) (2023-09-19) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复 Slider 滑块组件最大值和最小值不生效的问题([#43](https://github.com/Moonofweisheng/wot-design-uni/issues/43)) ([0fa7f46](https://github.com/Moonofweisheng/wot-design-uni/commit/0fa7f46718e918007491a3d9494292a003924243)) + +### [0.1.16](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.15...v0.1.16) (2023-09-18) + + +### ✨ Features | 新功能 + +* ✨ 新增 WaterMark 水印组件 ([70d8c25](https://github.com/Moonofweisheng/wot-design-uni/commit/70d8c2546135fce1709edb0e1ba0c3b66c1e9e2e)) + +### [0.1.15](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.14...v0.1.15) (2023-09-18) + + +### ✏️ Documentation | 文档 + +* ✏️ 优化DateTimePicker组件关于time类型选择器绑定值格式的介绍 ([9e958c7](https://github.com/Moonofweisheng/wot-design-uni/commit/9e958c73f1d09ee0e02097e3ca8eeabfcc1bc59b)) + +### [0.1.14](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.13...v0.1.14) (2023-09-14) + + +### ✏️ Documentation | 文档 + +* ✏️ 增加QQ群沟通渠道 ([80efad9](https://github.com/Moonofweisheng/wot-design-uni/commit/80efad950613d65e7e65d305ad6efe7cd0e201d8)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复SelectPicker 单复选选择器单选可搜索状态搜索报错的问题([#38](https://github.com/Moonofweisheng/wot-design-uni/issues/38)) ([01cf01d](https://github.com/Moonofweisheng/wot-design-uni/commit/01cf01d46fbc4ac35f0c09e3db6f6d18b2d3455e)) + +### [0.1.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.12...v0.1.13) (2023-09-12) + + +### ✨ Features | 新功能 + +* ✨ Tabs组件增加animated属性支持切换动画 ([2572ea4](https://github.com/Moonofweisheng/wot-design-uni/commit/2572ea4c31f834bb9c8776322c24148ca2bda4e2)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Popover组件content属性必填警告的问题 ([4d8f8e6](https://github.com/Moonofweisheng/wot-design-uni/commit/4d8f8e640742b0588b91b0a5b82a062b976f8306)) + +### [0.1.12](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.11...v0.1.12) (2023-09-12) + + +### ✏️ Documentation | 文档 + +* ✏️ 修复文档中定制主题和反馈组件404的问题 ([c0302ad](https://github.com/Moonofweisheng/wot-design-uni/commit/c0302ada89ea15039ef516f4a425b5e18512c2d5)) +* ✏️ 修复Button组件文档中loading属性重复的问题 ([b26da5a](https://github.com/Moonofweisheng/wot-design-uni/commit/b26da5aba7d698adc75c3e1d143660a698ce5de8)) + +### [0.1.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.10...v0.1.11) (2023-09-08) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复文档中部分页面存在死链问题 ([b3e5cbe](https://github.com/Moonofweisheng/wot-design-uni/commit/b3e5cbef1116d9a356f7c9c18dffc1caec20ea22)) + +### [0.1.10](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.9...v0.1.10) (2023-09-08) + + +### ✏️ Documentation | 文档 + +* ✏️ 将驼峰命名的文档文件改为短横线命名便于爬虫爬取及搜索 ([497e991](https://github.com/Moonofweisheng/wot-design-uni/commit/497e991903559c9d62dcb1b00842ee377d70b445)) +* ✏️ 优化icon组件文档的体验,支持点击图标复制使用示例 ([ce0526b](https://github.com/Moonofweisheng/wot-design-uni/commit/ce0526b99dcd203d3f1081a8fd6a0551da88b9b8)) + +### [0.1.9](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.8...v0.1.9) (2023-09-08) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复npm包未配置主入口导致在使用Hbx创建的项目中通过npm安装编译警告的问题 ([fa95a0d](https://github.com/Moonofweisheng/wot-design-uni/commit/fa95a0d19b6e13157154405ddaa2525545bd9f7e)) + +### [0.1.8](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.7...v0.1.8) (2023-09-07) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复ActionSheet等组件在H5端隐藏导航栏或在tabbar页面高度计算错误的问题 ([39201cb](https://github.com/Moonofweisheng/wot-design-uni/commit/39201cbeddde1c7ea883ad331c0607bced755475)) +* 🐛 修复pmpm安装时ts导入类型信息在H5平台报错的问题 ([237c03c](https://github.com/Moonofweisheng/wot-design-uni/commit/237c03c6ae8d041c565ca6bb984765be4418f9e1)) + +### [0.1.7](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.6...v0.1.7) (2023-09-06) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复tabs组件change事件执行两次的问题 ([819059a](https://github.com/Moonofweisheng/wot-design-uni/commit/819059abe19fcf8f9646703fcc7a472b6ae62d4e)) + +### [0.1.6](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.5...v0.1.6) (2023-09-06) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Input组件内置变量showClear和showWordCount定义为props的问题 ([8021a35](https://github.com/Moonofweisheng/wot-design-uni/commit/8021a35ac9d05d549909531ff4f1c7325127833e)) +* 🐛 修复pnpm安装时运行到h5平台Ref导入报错的问题 ([39c68bf](https://github.com/Moonofweisheng/wot-design-uni/commit/39c68bf57720c1a12b99412c96e46b341cf536b5)) + +### [0.1.5](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.4...v0.1.5) (2023-09-05) + + +### ✏️ Documentation | 文档 + +* ✏️ 增加Stickty和Tabs组件关于H5端自定义导航栏的offset-top的处理方案 ([8a03c4d](https://github.com/Moonofweisheng/wot-design-uni/commit/8a03c4da64296e88a7b3aff5efed4ac04cd039b6)) + +### [0.1.4](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.3...v0.1.4) (2023-09-05) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复CollapseItem组件在微信小程序中展开/收起时指向图标未跟随转动的问题 ([7d0eeae](https://github.com/Moonofweisheng/wot-design-uni/commit/7d0eeae92f2f7b7664a23f7d548187ed8075d5b0)) + +### [0.1.3](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.2...v0.1.3) (2023-09-03) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复通过npm安装时配置自动导入Notify、Toast、Message组件无法打开的问题 ([f45b739](https://github.com/Moonofweisheng/wot-design-uni/commit/f45b73907227c25d9c2fd7b7f0018cc2ab5c47d1)) + +### [0.1.2](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.1...v0.1.2) (2023-09-03) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复部分js引入路径问题 ([67cdfae](https://github.com/Moonofweisheng/wot-design-uni/commit/67cdfaebf9478e286758b2ef851e1a44dc8565a6)) + +### [0.1.1](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.1.0...v0.1.1) (2023-09-02) + +## [0.1.0](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.14...v0.1.0) (2023-09-02) + + +### ✏️ Documentation | 文档 + +* ✏️ ConfigProvider组件演示页面增加手动切换暗黑模式 ([e5f55c7](https://github.com/Moonofweisheng/wot-design-uni/commit/e5f55c72fc1ed6e603f22e501d6cff9d8212a976)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Grid组件不展示border的问题 ([819bbbc](https://github.com/Moonofweisheng/wot-design-uni/commit/819bbbca6ab1c999096936da5e9d2dd664e480ce)) +* 🐛 修复MessageBox组件取消按钮不展示的问题 ([d8563d8](https://github.com/Moonofweisheng/wot-design-uni/commit/d8563d833d75b27d0c497c6c945fae8c00ef8dc7)) + +### [0.0.14](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.13...v0.0.14) (2023-09-02) + + +### ✨ Features | 新功能 + +* ✨ 优化缺省状态组件StautsTip,增加支持自定义url和图片大小 ([f463d32](https://github.com/Moonofweisheng/wot-design-uni/commit/f463d3258a954e64352df36004d34b0f12be9a8f)) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复util中addUnit无法处理有单位的字符串的问题 ([8967540](https://github.com/Moonofweisheng/wot-design-uni/commit/8967540ad0f3f0ad7426ee79571cfc4dee6c4d0c)) + + +### ✏️ Documentation | 文档 + +* ✏️ 完善和修复文档中不详细不正确的内容 ([d1b118e](https://github.com/Moonofweisheng/wot-design-uni/commit/d1b118ea78a797499f465269d3a838c0770d993a)) + +### [0.0.13](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.12...v0.0.13) (2023-09-01) + + +### ✏️ Documentation | 文档 + +* ✏️ 官网地址迁移至阿里云oss ([a98868a](https://github.com/Moonofweisheng/wot-design-uni/commit/a98868ae6213c7d7002e5a88893aabe1d0f5d11b)) + +### [0.0.12](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.11...v0.0.12) (2023-08-30) + +### [0.0.11](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.10...v0.0.11) (2023-08-30) + + +### ✨ Features | 新功能 + +* ✨ util工具类提供更好的类型提示 ([4fed439](https://github.com/Moonofweisheng/wot-design-uni/commit/4fed43926f49be6a86ebab54bb36a1a086df4ac6)) + +### [0.0.10](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.9...v0.0.10) (2023-08-27) + + +### ✨ Features | 新功能 + +* ✨ 新增Notify组件、演示demo、文档 ([#9](https://github.com/Moonofweisheng/wot-design-uni/issues/9)) ([996fc39](https://github.com/Moonofweisheng/wot-design-uni/commit/996fc39d708699214faf2e54224b8d38a8a706f7)) +* ✨ 新增Skeleton组件、演示demo、文档 ([#12](https://github.com/Moonofweisheng/wot-design-uni/issues/12)) ([a49e22c](https://github.com/Moonofweisheng/wot-design-uni/commit/a49e22c370163ec3c93bbeb360cc89b3b3c0abc0)) + +### [0.0.9](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.8...v0.0.9) (2023-08-25) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复Cell 单格组件 is-link 不触发 click ([ece5568](https://github.com/Moonofweisheng/wot-design-uni/commit/ece5568ecc03fd8470c2c02120b94c1ee27d55e7)) + +### [0.0.8](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.7...v0.0.8) (2023-08-24) + + +### ✨ Features | 新功能 + +* ✨ 演示项目新增用户隐私保护指引的处理 ([4dd7efe](https://github.com/Moonofweisheng/wot-design-uni/commit/4dd7efe4049c4c815ea1bc57a7fd1819055f10bc)) +* ✨ ActionSheet组件调整为使用v-model设置显示与隐藏 ([aa92332](https://github.com/Moonofweisheng/wot-design-uni/commit/aa92332f3913be000d1aef36a8aed7f34b736ad6)) + +### [0.0.7](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.6...v0.0.7) (2023-08-23) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复部分组件某些属性必填警告的问题 ([1b866c0](https://github.com/Moonofweisheng/wot-design-uni/commit/1b866c062eb7a4ab894d5b2ecd7b7b3fd50ef864)) + +### [0.0.6](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.5...v0.0.6) (2023-08-22) + +### [0.0.5](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.4...v0.0.5) (2023-08-22) + +### [0.0.4](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.3...v0.0.4) (2023-08-21) + + +### ✨ Features | 新功能 + +* ✨ Picker组件优化性能 ([24dd43f](https://github.com/Moonofweisheng/wot-design-uni/commit/24dd43f3a05b7b4ce6bb897219a215f8198e64ac)) + +### [0.0.3](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.2...v0.0.3) (2023-08-18) + +### [0.0.2](https://github.com/Moonofweisheng/wot-design-uni/compare/v0.0.1...v0.0.2) (2023-08-18) + + +### 🐛 Bug Fixes | Bug 修复 + +* 🐛 修复CheckBoxGroup组件的disabled属性作用在子组件上失效的问题 ([1bab820](https://github.com/Moonofweisheng/wot-design-uni/commit/1bab820c0335c89e099c597caa47af16bb998d83)) + +### 0.0.1 (2023-08-16) + + +### ✨ Features | 新功能 + +* ✨ 适配暗黑模式 ([f5946a4](https://github.com/Moonofweisheng/wot-design-uni/commit/f5946a4b7134fed161bc123d66485e7bc91cdc68)) +* ✨ 新增 50+ 组件 diff --git a/uni_modules/wot-design-uni/components/common/AbortablePromise.ts b/uni_modules/wot-design-uni/components/common/AbortablePromise.ts new file mode 100644 index 0000000..efe5167 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/AbortablePromise.ts @@ -0,0 +1,28 @@ +export class AbortablePromise { + promise: Promise + private _reject: ((res?: any) => void) | null = null + + constructor(executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) { + this.promise = new Promise((resolve, reject) => { + executor(resolve, reject) + this._reject = reject // 保存reject方法的引用,以便在abort时调用 + }) + } + // 提供abort方法来中止Promise + abort(error?: any) { + if (this._reject) { + this._reject(error) // 调用reject方法来中止Promise + } + } + + then( + onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, + onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null + ): Promise { + return this.promise.then(onfulfilled, onrejected) + } + + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise { + return this.promise.catch(onrejected) + } +} diff --git a/uni_modules/wot-design-uni/components/common/abstracts/_config.scss b/uni_modules/wot-design-uni/components/common/abstracts/_config.scss new file mode 100644 index 0000000..fe65cb4 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/abstracts/_config.scss @@ -0,0 +1,7 @@ +/** + * SCSS 配置项:命名空间以及BEM + */ +$namespace: 'wd'; +$elementSeparator: '__'; +$modifierSeparator: '--'; +$state-prefix: 'is-'; \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/common/abstracts/_function.scss b/uni_modules/wot-design-uni/components/common/abstracts/_function.scss new file mode 100644 index 0000000..24c0ca0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/abstracts/_function.scss @@ -0,0 +1,89 @@ +/** + * 辅助函数 + */ +@import 'config'; +$default-theme: #4d80f0 !default; // 正常色 + +/* 转换成字符串 */ +@function selectorToString($selector) { + $selector: inspect($selector); + $selector: str-slice($selector, 2, -2); + + @return $selector; +} + +/* 判断是否存在 Modifier */ +@function containsModifier($selector) { + $selector: selectorToString($selector); + + @if str-index($selector, $modifierSeparator) { + @return true; + } + + @else { + @return false; + } +} + +/* 判断是否存在伪类 */ +@function containsPseudo($selector) { + $selector: selectorToString($selector); + + @if str-index($selector, ':') { + @return true; + } + + @else { + @return false; + } +} + + +/** + * 主题色切换 + * @params $theme-color 主题色 + * @params $type 变暗’dark‘ 变亮 'light' + * @params $mix-color 自己设置的混色 + */ +@function themeColor($theme-color, $type: "", $mix-color: "") { + @if $default-theme !=#4d80f0 { + @if $type=="dark" { + @return darken($theme-color, 10%); + } + + @else if $type=="light" { + @return lighten($theme-color, 10%); + } + + @else { + @return $theme-color; + } + } + + @else { + @return $mix-color; + } +} + +/** + * 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色 + * @params $open-linear 是否开启线性渐变色 + * @params $deg 渐变色角度 + * @params $theme-color 当前配色 + * @params [Array] $set 主题色明暗设置,与 $color-list 数量对应 + * @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同 + * @params [Array] $per-list 渐变色比例 + */ +@function resultColor($deg, $theme-color, $set, $color-list, $per-list) { + // 开启渐变 + + $len: length($color-list); + $arg: $deg; + + @for $i from 1 through $len { + $arg: $arg + ","+ themeColor($theme-color, nth($set, $i), nth($color-list, $i)) + " "+ nth($per-list, $i); + } + + @return linear-gradient(unquote($arg)); + +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/common/abstracts/_mixin.scss b/uni_modules/wot-design-uni/components/common/abstracts/_mixin.scss new file mode 100644 index 0000000..3d1cd94 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/abstracts/_mixin.scss @@ -0,0 +1,385 @@ +/** + * 混合宏 + */ +@import "config"; +@import "function"; + +/** + * BEM,定义块(b) + */ +@mixin b($block) { + $B: $namespace + "-"+ $block !global; + + .#{$B} { + @content; + } +} + +/* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */ +@mixin e($element...) { + $selector: &; + $selectors: ""; + + @if containsPseudo($selector) { + @each $item in $element { + $selectors: #{$selectors + "." + $B + $elementSeparator + $item + ","}; + } + + @at-root { + #{$selector} { + #{$selectors} { + @content; + } + } + } + } + + @else { + @each $item in $element { + $selectors: #{$selectors + $selector + $elementSeparator + $item + ","}; + } + + @at-root { + #{$selectors} { + @content; + } + } + } +} + + + +/* 此方法用于生成穿透样式 */ + +/* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */ +@mixin edeep($element...) { + $selector: &; + $selectors: ""; + + @if containsPseudo($selector) { + @each $item in $element { + $selectors: #{$selectors + "." + $B + $elementSeparator + $item + ","}; + } + + @at-root { + #{$selector} { + :deep() { + #{$selectors} { + @content; + } + } + } + } + } + + @else { + @each $item in $element { + $selectors: #{$selectors + $selector + $elementSeparator + $item + ","}; + } + + @at-root { + :deep() { + #{$selectors} { + @content; + } + } + } + } +} + + +/* 定义状态(m) */ +@mixin m($modifier...) { + $selectors: ""; + + @each $item in $modifier { + $selectors: #{$selectors + & + $modifierSeparator + $item + ","}; + } + + @at-root { + #{$selectors} { + @content; + } + } +} + +/* 定义状态(m) */ +@mixin mdeep($modifier...) { + $selectors: ""; + + @each $item in $modifier { + $selectors: #{$selectors + & + $modifierSeparator + $item + ","}; + } + + @at-root { + :deep() { + #{$selectors} { + @content; + } + } + } +} + +/* 对于需要需要嵌套在 m 底下的 e,调用这个混合宏,一般在切换整个组件的状态,如切换颜色的时候 */ +@mixin me($element...) { + $selector: &; + $selectors: ""; + + @if containsModifier($selector) { + @each $item in $element { + $selectors: #{$selectors + "." + $B + $elementSeparator + $item + ","}; + } + + @at-root { + #{$selector} { + #{$selectors} { + @content; + } + } + } + } + + @else { + @each $item in $element { + $selectors: #{$selectors + $selector + $elementSeparator + $item + ","}; + } + + @at-root { + #{$selectors} { + @content; + } + } + } +} + +/* 状态,生成 is-$state 类名 */ +@mixin when($states...) { + @at-root { + @each $state in $states { + &.#{$state-prefix + $state} { + @content; + } + } + } +} + +/** + * 常用混合宏 + */ + +/* 单行超出隐藏 */ +@mixin lineEllipsis { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +/* 多行超出隐藏 */ +@mixin multiEllipsis($lineNumber: 3) { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: $lineNumber; + overflow: hidden; +} + +/* 清除浮动 */ +@mixin clearFloat { + &::after { + display: block; + content: ""; + height: 0; + clear: both; + overflow: hidden; + visibility: hidden; + } +} + +/* 0.5px 边框 指定方向*/ +@mixin halfPixelBorder($direction: "bottom", $left: 0, $color: $-color-border-light) { + position: relative; + + &::after { + position: absolute; + display: block; + content: ""; + + @if ($left==0) { + width: 100%; + } + + @else { + width: calc(100% - #{$left}); + } + + height: 1px; + left: $left; + + @if ($direction=="bottom") { + bottom: 0; + } + + @else { + top: 0; + } + + transform: scaleY(0.5); + background: $color; + } +} + + +/* 0.5px 边框 环绕 */ +@mixin halfPixelBorderSurround($color: $-color-border-light) { + position: relative; + + &::after { + position: absolute; + display: block; + content: ' '; + pointer-events: none; + width: 200%; + height: 200%; + left: 0; + top: 0; + border: 1px solid $color; + transform: scale(0.5); + box-sizing: border-box; + transform-origin: left top; + } +} + +@mixin buttonClear { + outline: none; + -webkit-appearance: none; + -webkit-tap-highlight-color: transparent; + background: transparent; +} + +/** + * 三角形实现尖角样式,适用于背景透明情况 + * @param $size 三角形高,底边为 $size * 2 + * @param $bg 三角形背景颜色 + */ +@mixin triangleArrow($size, $bg) { + @include e(arrow) { + position: absolute; + width: 0; + height: 0; + } + + @include e(arrow-down) { + border-left: $size solid transparent; + border-right: $size solid transparent; + border-top: $size solid $bg; + transform: translateX(-50%); + bottom: calc(-1 * $size) + } + + @include e(arrow-up) { + border-left: $size solid transparent; + border-right: $size solid transparent; + border-bottom: $size solid $bg; + transform: translateX(-50%); + top: calc(-1 * $size) + } + + @include e(arrow-left) { + border-top: $size solid transparent; + border-bottom: $size solid transparent; + border-right: $size solid $bg; + transform: translateY(-50%); + left: calc(-1 * $size) + } + + @include e(arrow-right) { + border-top: $size solid transparent; + border-bottom: $size solid transparent; + border-left: $size solid $bg; + transform: translateY(-50%); + right: calc(-1 * $size) + } +} + +/** + * 正方形实现尖角样式,适用于背景不透明情况 + * @param $size 正方形边长 + * @param $bg 正方形背景颜色 + * @param $z-index z-index属性值,不得大于外部包裹器 + * @param $box-shadow 阴影 +*/ +@mixin squareArrow($size, $bg, $z-index, $box-shadow) { + @include e(arrow) { + position: absolute; + width: $size; + height: $size; + z-index: $z-index; + } + + @include e(arrow-down) { + transform: translateX(-50%); + bottom: 0; + + &:after { + content: ""; + width: $size; + height: $size; + background-color: $bg; + position: absolute; + left: 0; + bottom: calc(-1 * $size / 2); + transform: rotateZ(45deg); + box-shadow: $box-shadow; + } + } + + @include e(arrow-up) { + transform: translateX(-50%); + top: 0; + + &:after { + content: ""; + width: $size; + height: $size; + background-color: $bg; + position: absolute; + left: 0; + top: calc(-1 * $size / 2); + transform: rotateZ(45deg); + box-shadow: $box-shadow; + } + } + + @include e(arrow-left) { + transform: translateY(-50%); + left: 0; + + &:after { + content: ""; + width: $size; + height: $size; + background-color: $bg; + position: absolute; + left: calc(-1 * $size / 2); + top: 0; + transform: rotateZ(45deg); + box-shadow: $box-shadow; + } + } + + @include e(arrow-right) { + transform: translateY(-50%); + right: 0; + + &:after { + content: ""; + width: $size; + height: $size; + background-color: $bg; + position: absolute; + right: calc(-1 * $size / 2); + top: 0; + transform: rotateZ(45deg); + box-shadow: $box-shadow; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/common/abstracts/variable.scss b/uni_modules/wot-design-uni/components/common/abstracts/variable.scss new file mode 100644 index 0000000..d8ee70b --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/abstracts/variable.scss @@ -0,0 +1,974 @@ +@import './function'; + +/** + * UI规范基础变量 + */ +/*----------------------------------------- Theme color. start ----------------------------------------*/ +/* 主题颜色 */ +$-color-theme: var(--wot-color-theme, $default-theme) !default; // 主题色 +$-color-white: var(--wot-color-white, rgb(255, 255, 255)) !default; // 用于mix的白色 +$-color-black: var(--wot-color-black, rgb(0, 0, 0)) !default; // 用于mix的黑色 + +/* 辅助色 */ +$-color-success: var(--wot-color-success, #34d19d) !default; // 成功色 +$-color-warning: var(--wot-color-warning, #f0883a) !default; // 警告色 +$-color-danger: var(--wot-color-danger, #fa4350) !default; // 危险出错色 +$-color-purple: var(--wot-color-purple, #8268de) !default; // 紫色 +$-color-yellow: var(--wot-color-yellow, #f0cd1d) !default; // 黄色 +$-color-blue: var(--wot-color-blue, #2bb3ed) !default; // 蓝色 +$-color-info: var(--wot-color-info, #909399) !default; + +$-color-gray-1: var(--wot-color-gray-1, #f7f8fa) !default; +$-color-gray-2: var(--wot-color-gray-2, #f2f3f5) !default; +$-color-gray-3: var(--wot-color-gray-3, #ebedf0) !default; +$-color-gray-4: var(--wot-color-gray-4, #dcdee0) !default; +$-color-gray-5: var(--wot-color-gray-5, #c8c9cc) !default; +$-color-gray-6: var(--wot-color-gray-6, #969799) !default; +$-color-gray-7: var(--wot-color-gray-7, #646566) !default; +$-color-gray-8: var(--wot-color-gray-8, #323233) !default; + +$-font-gray-1: var(--wot-font-gray-1, rgba(0, 0, 0, 0.9)); +$-font-gray-2: var(--wot-font-gray-2, rgba(0, 0, 0, 0.6)); +$-font-gray-3: var(--wot-font-gray-3, rgba(0, 0, 0, 0.4)); +$-font-gray-4: var(--wot-font-gray-4, rgba(0, 0, 0, 0.26)); + +$-font-white-1: var(--wot-font-white-1, rgba(255, 255, 255, 1)); +$-font-white-2: var(--wot-font-white-2, rgba(255, 255, 255, 0.55)); +$-font-white-3: var(--wot-font-white-3, rgba(255, 255, 255, 0.35)); +$-font-white-4: var(--wot-font-white-4, rgba(255, 255, 255, 0.22)); + +/* 文字颜色(默认浅色背景下 */ +$-color-title: var(--wot-color-title, $-color-black) !default; // 模块标题/重要正文 000 +$-color-content: var(--wot-color-content, #262626) !default; // 普通正文 262626 +$-color-secondary: var(--wot-color-secondary, #595959) !default; // 次要信息,注释/补充/正文 595959 +$-color-aid: var(--wot-color-aid, #8c8c8c) !default; // 辅助文字字号,弱化信息,引导性/不可点文字 8c8c8c +$-color-tip: var(--wot-color-tip, #bfbfbf) !default; // 失效、默认提示文字 bfbfbf +$-color-border: var(--wot-color-border, #d9d9d9) !default; // 控件边框线 d9d9d9 +$-color-border-light: var(--wot-color-border-light, #e8e8e8) !default; // 分割线颜色 e8e8e8 +$-color-bg: var(--wot-color-bg, #f5f5f5) !default; // 背景色、禁用填充色 f5f5f5 + +/* 暗黑模式 */ +$-dark-background: var(--wot-dark-background, #131313) !default; +$-dark-background2: var(--wot-dark-background2, #1b1b1b) !default; +$-dark-background3: var(--wot-dark-background3, #141414) !default; +$-dark-background4: var(--wot-dark-background4, #323233) !default; +$-dark-background5: var(--wot-dark-background5, #646566) !default; +$-dark-background6: var(--wot-dark-background6, #380e08) !default; +$-dark-background7: var(--wot-dark-background7, #707070) !default; +$-dark-color: var(--wot-dark-color, $-color-white) !default; +$-dark-color2: var(--wot-dark-color2, #f2270c) !default; +$-dark-color3: var(--wot-dark-color3, rgba(232, 230, 227, 0.8)) !default; +$-dark-color-gray: var(--wot-dark-color-gray, $-color-secondary) !default; +$-dark-border-color: var(--wot-dark-border-color, #3a3a3c) !default; + +/* 图形颜色 */ +$-color-icon: var(--wot-color-icon, #d9d9d9) !default; // icon颜色 +$-color-icon-active: var(--wot-color-icon-active, #eee) !default; // icon颜色hover +$-color-icon-disabled: var(--wot-color-icon-disabled, #a7a7a7) !default; // icon颜色disabled + +/*----------------------------------------- Theme color. end -------------------------------------------*/ + +/*-------------------------------- Theme color application size. start --------------------------------*/ + +/* 文字字号 */ +$-fs-big: var(--wot-fs-big, 24px) !default; // 大型标题 +$-fs-important: var(--wot-fs-important, 19px) !default; // 重要数据 +$-fs-title: var(--wot-fs-title, 16px) !default; // 标题字号/重要正文字号 +$-fs-content: var(--wot-fs-content, 14px) !default; // 普通正文 +$-fs-secondary: var(--wot-fs-secondary, 12px) !default; // 次要信息,注释/补充/正文 +$-fs-aid: var(--wot-fs-aid, 10px) !default; // 辅助文字字号,弱化信息,引导性/不可点文字 + +/* 文字字重 */ +$-fw-medium: var(--wot-fw-medium, 500) !default; // PingFangSC-Medium +$-fw-semibold: var(--wot-fw-semibold, 600) !default; // PingFangSC-Semibold + +/* 尺寸 */ +$-size-side-padding: var(--wot-size-side-padding, 15px) !default; // 屏幕两边留白 +$-size-side-padding-small: var(--wot-size-side-padding-small, 6px) !default; // 屏幕两边留白小值 + +/*-------------------------------- Theme color application size. end --------------------------------*/ + +/* component var */ + +/* action-sheet */ +$-action-sheet-weight: var(--wot-action-sheet-weight, 500) !default; // 面板字重 +$-action-sheet-radius: var(--wot-action-sheet-radius, 16px) !default; // 面板圆角大小 +$-action-sheet-loading-size: var(--wot-action-sheet-loading-size, 20px) !default; // loading动画尺寸 +$-action-sheet-action-height: var(--wot-action-sheet-action-height, 48px) !default; // 单条菜单高度 +$-action-sheet-color: var(--wot-action-sheet-color, rgba(0, 0, 0, 0.85)) !default; // 选项名称颜色 +$-action-sheet-fs: var(--wot-action-sheet-fs, $-fs-title) !default; // 选项名称字号 +$-action-sheet-active-color: var(--wot-action-sheet-active-color, $-color-bg) !default; // 点击高亮颜色 +$-action-sheet-subname-fs: var(--wot-action-sheet-subname-fs, $-fs-secondary) !default; // 描述信息字号 +$-action-sheet-subname-color: var(--wot-action-sheet-subname-color, rgba(0, 0, 0, 0.45)) !default; // 描述信息颜色 +$-action-sheet-disabled-color: var(--wot-action-sheet-disabled-color, rgba(0, 0, 0, 0.25)) !default; // 禁用颜色 +$-action-sheet-bg: var(--wot-action-sheet-bg, $-color-white) !default; // 菜单容器颜色(取消按钮上方的颜色) +$-action-sheet-title-height: var(--wot-action-sheet-title-height, 64px) !default; // 标题高度 +$-action-sheet-title-fs: var(--wot-action-sheet-title-fs, $-fs-title) !default; // 标题字号 +$-action-sheet-close-fs: var(--wot-action-sheet-close-fs, $-fs-title) !default; // 关闭按钮大小 +$-action-sheet-close-color: var(--wot-action-sheet-close-color, rgba(0, 0, 0, 0.65)) !default; // 关闭按钮颜色 +$-action-sheet-close-top: var(--wot-action-sheet-close-top, 25px) !default; // 关闭按钮距离标题顶部距离 +$-action-sheet-close-right: var(--wot-action-sheet-close-right, 15px) !default; // 关闭按钮距离标题右侧距离 +$-action-sheet-cancel-color: var(--wot-action-sheet-cancel-color, #131415) !default; // 取消按钮颜色 +$-action-sheet-cancel-height: var(--wot-action-sheet-cancel-height, 44px) !default; // 取消按钮高度 +$-action-sheet-cancel-bg: var(--wot-action-sheet-cancel-bg, rgba(240, 240, 240, 1)) !default; // 取消按钮背景色 +$-action-sheet-cancel-radius: var(--wot-action-sheet-cancel-radius, 22px) !default; // 取消按钮圆角大小 +$-action-sheet-panel-padding: var(--wot-action-sheet-panel-padding, 12px 0 11px) !default; // 自定义面板内边距大小 +$-action-sheet-panel-img-fs: var(--wot-action-sheet-panel-img-fs, 40px) !default; // 自定义面板图片大小 +$-action-sheet-panel-img-radius: var(--wot-action-sheet-panel-img-radius, 4px) !default; // 自定义面板图片圆角大小 + +/* badge */ +$-badge-bg: var(--wot-badge-bg, $-color-danger) !default; // 背景填充颜色 +$-badge-color: var(--wot-badge-color, #fff) !default; // 文字颜色 +$-badge-fs: var(--wot-badge-fs, 12px) !default; // 文字字号 +$-badge-padding: var(--wot-badge-padding, 0 5px) !default; // padding +$-badge-height: var(--wot-badge-height, 16px) !default; // 高度 +$-badge-primary: var(--wot-badge-primary, $-color-theme) !default; +$-badge-success: var(--wot-badge-success, $-color-success) !default; +$-badge-warning: var(--wot-badge-warning, $-color-warning) !default; +$-badge-danger: var(--wot-badge-danger, $-color-danger) !default; +$-badge-info: var(--wot-badge-info, $-color-info) !default; +$-badge-dot-size: var(--wot-badge-dot-size, 6px) !default; // dot 类型大小 +$-badge-border: var(--wot-badge-border, 2px solid $-badge-color) !default; // 边框样式 + +/* button */ +$-button-disabled-opacity: var(--wot-button-disabled-opacity, 0.6) !default; // button禁用透明度 +$-button-small-height: var(--wot-button-small-height, 28px) !default; // 小型按钮高度 +$-button-small-padding: var(--wot-button-small-padding, 0 12px) !default; // 小型按钮padding +$-button-small-fs: var(--wot-button-small-fs, $-fs-secondary) !default; // 小型按钮字号 +$-button-small-radius: var(--wot-button-small-radius, 2px) !default; // 小型按钮圆角大小 +$-button-small-loading: var(--wot-button-small-loading, 14px) !default; // 小型按钮loading图标大小 +$-button-medium-height: var(--wot-button-medium-height, 36px) !default; // 中型按钮高度 +$-button-medium-padding: var(--wot-button-medium-padding, 0 16px) !default; // 中型按钮padding +$-button-medium-fs: var(--wot-button-medium-fs, $-fs-content) !default; // 中型按钮字号 +$-button-medium-radius: var(--wot-button-medium-radius, 4px) !default; // 中型按钮圆角大小 +$-button-medium-loading: var(--wot-button-medium-loading, 18px) !default; // 中型按钮loading图标大小 +$-button-medium-box-shadow-size: var(--wot-button-medium-box-shadow-size, 0px 2px 4px 0px) !default; // 中尺寸阴影尺寸 +$-button-large-height: var(--wot-button-large-height, 44px) !default; // 大型按钮高度 +$-button-large-padding: var(--wot-button-large-padding, 0 36px) !default; // 大型按钮padding +$-button-large-fs: var(--wot-button-large-fs, $-fs-title) !default; // 大型按钮字号 +$-button-large-radius: var(--wot-button-large-radius, 8px) !default; // 大型按钮圆角大小 +$-button-large-loading: var(--wot-button-large-loading, 24px) !default; // 大小按钮loading图标大小 +$-button-large-box-shadow-size: var(--wot-button-large-box-shadow-size, 0px 4px 8px 0px) !default; // 大尺寸阴影尺寸 +$-button-icon-fs: var(--wot-button-icon-fs, 18px) !default; // 带图标的按钮的图标大小 +$-button-icon-size: var(--wot-button-icon-size, 40px) !default; // icon 类型按钮尺寸 +$-button-icon-color: var(--wot-button-icon-color, rgba(0, 0, 0, 0.65)) !default; // icon 类型按钮颜色 +$-button-icon-disabled-color: var(--wot-button-icon-disabled-color, $-color-icon-disabled) !default; // icon 类型按钮禁用颜色 +$-button-normal-color: var(--wot-button-normal-color, $-color-title) !default; // 文字颜色 +$-button-normal-disabled-color: var(--wot-button-normal-disabled-color, rgba(0, 0, 0, 0.25)) !default; // 默认按钮禁用文字色 +$-button-plain-bg-color: var(--wot-button-plain-bg-color, $-color-white) !default; // 幽灵按钮背景色 +$-button-primary-color: var(--wot-button-primary-color, $-color-white) !default; // 主要按钮颜色 +$-button-primary-bg-color: var(--wot-button-primary-bg-color, $-color-theme) !default; // 主要按钮背景颜色 +$-button-success-color: var(--wot-button-success-color, $-color-white) !default; // 成功按钮文字颜色 +$-button-success-bg-color: var(--wot-button-success-bg-color, $-color-success) !default; // 成功按钮颜色 +$-button-info-color: var(--wot-button-info-color, $-color-title) !default; // 信息按钮颜色 +$-button-info-bg-color: var(--wot-button-info-bg-color, #f0f0f0) !default; // 信息按钮背景颜色 +$-button-info-plain-border-color: var(--wot-button-info-plain-border-color, rgba(0, 0, 0, 0.45)) !default; // 信息按钮禁用颜色 +$-button-info-plain-normal-color: var(--wot-button-info-plain-normal-color, rgba(0, 0, 0, 0.85)) !default; // 信息幽灵按钮默认颜色 +$-button-warning-color: var(--wot-button-warning-color, $-color-white) !default; // 警告按钮字体颜色 +$-button-warning-bg-color: var(--wot-button-warning-bg-color, $-color-warning) !default; // 警告按钮背景颜色 +$-button-error-color: var(--wot-button-error-color, $-color-white) !default; // 错误按钮颜色 +$-button-error-bg-color: var(--wot-button-error-bg-color, $-color-danger) !default; // 错误按钮背景颜色 +$-button-text-hover-opacity: var(--wot-button-text-hover-opacity, 0.7) !default; // 文字button激活时透明度 + +/* cell */ +$-cell-padding: var(--wot-cell-padding, $-size-side-padding) !default; // cell 左右padding距离 +$-cell-line-height: var(--wot-cell-line-height, 24px) !default; // 行高 + +$-cell-group-title-fs: var(--wot-cell-group-title-fs, $-fs-title) !default; // 组标题字号 +$-cell-group-padding: var(--wot-cell-group-padding, 13px $-cell-padding) !default; // 组padding +$-cell-group-title-color: var(--wot-cell-group-title-color, rgba(0, 0, 0, 0.85)) !default; // 组标题文字颜色 +$-cell-group-value-fs: var(--wot-cell-group-value-fs, $-fs-content) !default; // 组值字号 +$-cell-group-value-color: var(--wot-cell-group-value-color, $-color-content) !default; // 组值文字颜色 + +$-cell-wrapper-padding: var(--wot-cell-wrapper-padding, 10px) !default; // cell 容器padding +$-cell-wrapper-padding-large: var(--wot-cell-wrapper-padding-large, 12px) !default; // large类型cell容器padding + +$-cell-wrapper-padding-with-label: var(--wot-cell-wrapper-padding-with-label, 16px) !default; // cell 容器上下padding(有label情况下) +$-cell-icon-right: var(--wot-cell-icon-right, 4px) !default; // 图标距离右边缘 +$-cell-icon-size: var(--wot-cell-icon-size, 16px) !default; // 图标大小 +$-cell-title-fs: var(--wot-cell-title-fs, 14px) !default; // 标题字号 +$-cell-title-color: var(--wot-cell-title-color, rgba(0, 0, 0, 0.85)) !default; // 标题文字颜色 +$-cell-label-fs: var(--wot-cell-label-fs, 12px) !default; // 描述信息字号 +$-cell-label-color: var(--wot-cell-label-color, rgba(0, 0, 0, 0.45)) !default; // 描述信息文字颜色 +$-cell-value-fs: var(--wot-cell-value-fs, 14px) !default; // 右侧内容字号 +$-cell-value-fs-large: var(--wot-cell-value-fs-large, 16px) !default; // 大尺寸右侧内容字号 +$-cell-value-color: var(--wot-cell-value-color, rgba(0, 0, 0, 0.85)) !default; // 右侧内容文字颜色 +$-cell-arrow-size: var(--wot-cell-arrow-size, 18px) !default; // 右箭头大小 +$-cell-arrow-color: var(--wot-cell-arrow-color, rgba(0, 0, 0, 0.25)) !default; // 右箭头颜色 +$-cell-clear-color: var(--wot-cell-clear-color, #585858) !default; // 清空按钮颜色 +$-cell-tap-bg: var(--wot-cell-tap-bg, rgba(0, 0, 0, 0.06)) !default; // 点击态背景色 + +$-cell-title-fs-large: var(--wot-cell-title-fs-large, 16px) !default; // 大尺寸标题字号 +$-cell-label-fs-large: var(--wot-cell-label-fs-large, 14px) !default; // 描述信息字号 +$-cell-icon-size-large: var(--wot-cell-icon-size-large, 18px) !default; // 图标大小 + +$-cell-required-color: var(--wot-cell-required-color, $-color-danger) !default; // 要求必填*颜色 +$-cell-required-size: var(--wot-cell-required-size, 18px) !default; // 必填*字号 +$-cell-required-margin: var(--wot-cell-required-margin, 4px) !default; // 必填*间距 +$-cell-vertical-top: var(--wot-cell-vertical-top, 16px) !default; // 表单类型-上下结构的间距 + +/* calendar */ +$-calendar-fs: var(--wot-calendar-fs, 16px) !default; +$-calendar-panel-padding: var(--wot-calendar-panel-padding, 0 12px) !default; +$-calendar-panel-title-fs: var(--wot-calendar-panel-title-fs, 14px) !default; +$-calendar-panel-title-color: var(--wot-calendar-panel-title-color, rgba(0, 0, 0, 0.85)) !default; +$-calendar-week-color: var(--wot-calendar-week-color, rgba(0, 0, 0, 0.85)) !default; +$-calendar-week-height: var(--wot-calendar-week-height, 36px) !default; +$-calendar-week-fs: var(--wot-calendar-week-fs, 12px) !default; +$-calendar-day-fs: var(--wot-calendar-day-fs, 16px) !default; +$-calendar-day-color: var(--wot-calendar-day-color, rgba(0, 0, 0, 0.85)) !default; +$-calendar-day-fw: var(--wot-calendar-day-fw, 500) !default; +$-calendar-day-height: var(--wot-calendar-day-height, 64px) !default; +$-calendar-month-width: var(--wot-calendar-month-width, 50px) !default; +$-calendar-active-color: var(--wot-calendar-active-color, $-color-theme) !default; +$-calendar-selected-color: var(--wot-calendar-selected-color, $-color-white) !default; +$-calendar-disabled-color: var(--wot-calendar-disabled-color, rgba(0, 0, 0, 0.25)) !default; +$-calendar-range-color: var(--wot-calendar-range-color, rgba(#4d80f0, 0.09)) !default; +$-calendar-active-border: var(--wot-calendar-active-border, 8px) !default; +$-calendar-info-fs: var(--wot-calendar-info-fs, 10px) !default; +$-calendar-item-margin-bottom: var(--wot-calendar-item-margin-bottom, 4px) !default; + + +/* checkbox */ +$-checkbox-margin: var(--wot-checkbox-margin, 10px) !default; // 多个复选框距离 +$-checkbox-bg: var(--wot-checkbox-bg, $-color-white) !default; // 多个复选框距离 +$-checkbox-label-margin: var(--wot-checkbox-label-margin, 9px) !default; // 右侧文字与左侧图标距离 +$-checkbox-size: var(--wot-checkbox-size, 16px) !default; // 左侧图标尺寸 +$-checkbox-icon-size: var(--wot-checkbox-icon-size, 14px) !default; // 左侧图标尺寸 +$-checkbox-border-color: var(--wot-checkbox-border-color, #dcdcdc) !default; // 左侧图标边框颜色 +$-checkbox-check-color: var(--wot-checkbox-check-color, $-color-white) !default; // 左侧图标边框颜色 +$-checkbox-label-fs: var(--wot-checkbox-label-fs, 14px) !default; // 右侧文字字号 +$-checkbox-label-color: var(--wot-checkbox-label-color, rgba(0, 0, 0, 0.85)) !default; // 右侧文字颜色 +$-checkbox-checked-color: var(--wot-checkbox-checked-color, $-color-theme) !default; // 选中颜色 + +$-checkbox-disabled-color: var(--wot-checkbox-disabled-color, rgba(0, 0, 0, 0.04)) !default; // 禁用背景颜色 +$-checkbox-disabled-label-color: var(--wot-checkbox-disabled-label-color, rgba(0, 0, 0, 0.25)) !default; // 禁用文字颜色 +$-checkbox-disabled-check-color: var(--wot-checkbox-disabled-check-color, rgba(0, 0, 0, 0.15)) !default; // 禁用图标颜色 +$-checkbox-disabled-check-bg: var(--wot-checkbox-disabled-check-bg, rgba(0, 0, 0, 0.15)) !default; // 禁用边框背景颜色 +$-checkbox-square-radius: var(--wot-checkbox-square-radius, 4px) !default; // 方型圆角大小 + +$-checkbox-large-size: var(--wot-checkbox-large-size, 18px) !default; // 左侧图标尺寸 +$-checkbox-large-label-fs: var(--wot-checkbox-large-label-fs, 16px) !default; // 右侧文字字号 + +$-checkbox-button-height: var(--wot-checkbox-button-height, 32px) !default; // 按钮模式复选框高 +$-checkbox-button-min-width: var(--wot-checkbox-button-min-width, 78px) !default; // 按钮模式最小宽 +$-checkbox-button-radius: var(--wot-checkbox-button-radius, 16px) !default; // 按钮圆角大小 +$-checkbox-button-bg: var(--wot-checkbox-button-bg, rgba(0, 0, 0, 0.04)) !default; // 按钮模式背景颜色 +$-checkbox-button-font-size: var(--wot-checkbox-button-font-size, 14px) !default; // 按钮模式字号 +$-checkbox-button-border: var(--wot-checkbox-button-border, #f5f5f5) !default; // 按钮边框颜色 +$-checkbox-button-disabled-border: var(--wot-checkbox-button-disabled-border, rgba(0, 0, 0, 0.15)) !default; // 按钮禁用边框颜色 + +/* collapse */ +$-collapse-side-padding: var(--wot-collapse-side-padding, $-size-side-padding) !default; // 左右间距 +$-collapse-body-padding: var(--wot-collapse-body-padding, 14px $-size-side-padding) !default; // body padding +$-collapse-header-padding: var(--wot-collapse-header-padding, 13px $-size-side-padding) !default; // 头部padding +$-collapse-title-color: var(--wot-collapse-title-color, rgba(0, 0, 0, 0.85)) !default; // 标题颜色 +$-collapse-title-fs: var(--wot-collapse-title-fs, 16px) !default; // 标题字号 +$-collapse-arrow-size: var(--wot-collapse-arrow-size, 18px) !default; // 箭头大小 +$-collapse-arrow-color: var(--wot-collapse-arrow-color, #d8d8d8) !default; // 箭头颜色 +$-collapse-body-fs: var(--wot-collapse-body-fs, 14px) !default; // 内容字号 +$-collapse-body-color: var(--wot-collapse-body-color, rgba(0, 0, 0, 0.65)) !default; // 内容颜色 +$-collapse-disabled-color: var(--wot-collapse-disabled-color, rgba(0, 0, 0, 0.15)) !default; // 禁用颜色 +$-collapse-retract-fs: var(--wot-collapse-retract-fs, 14px) !default; // 更多 字号 +$-collapse-more-color: var(--wot-collapse-more-color, $-color-theme) !default; // 更多 颜色 + +/* divider */ +$-divider-padding: var(--wot-divider-padding, 0 $-size-side-padding) !default; // 两边间距 +$-divider-margin: var(--wot-divider-margin, 16px 0) !default; // 上下间距 +$-divider-color: var(--wot-divider-color, rgba(0, 0, 0, 0.45)) !default; // 字体颜色 +$-divider-line-color: var(--wot-divider-line-color, currentColor) !default; // 线条颜色 +$-divider-line-height: var(--wot-divider-line-height, 1px) !default; // 线条高度 +$-divider-fs: var(--wot-divider-fs, 14px) !default; // 字体大小 +$-divider-content-left-width: var(--wot-divider-content-left-width, 10%) !default; // 左侧内容宽度 +$-divider-content-left-margin: var(--wot-divider-content-left-margin, 12px) !default; // 左侧内容距离线距离 +$-divider-content-right-margin: var(--wot-divider-content-right-margin, 12px) !default; // 右侧内容距离线距离 +$-divider-content-right-width: var(--wot-divider-content-right-width, 10%) !default; // 右侧内容宽度 +$-divider-vertical-height: var(--wot-divider-vertical-height, 16px) !default; // 垂直分割线高度 +$-divider-vertical-content-margin: var(--wot-divider-vertical-content-margin, 0 8px) !default; // 垂直分割线内容间距 +$-divider-vertical-line-width: var(--wot-divider-vertical-line-width, 1px) !default; // 线条高度 + + + + +/* drop-menu */ +$-drop-menu-height: var(--wot-drop-menu-height, 48px) !default; // 展示选中项的高度 +$-drop-menu-color: var(--wot-drop-menu-color, $-color-content) !default; // 展示选中项的颜色 +$-drop-menu-fs: var(--wot-drop-menu-fs, $-fs-content) !default; // 展示选中项的字号 +$-drop-menu-arrow-fs: var(--wot-drop-menu-arrow-fs, $-fs-secondary) !default; // 箭头图标大小 + +$-drop-menu-side-padding: var(--wot-drop-menu-side-padding, $-size-side-padding) !default; // 两边留白间距 +$-drop-menu-disabled-color: var(--wot-drop-menu-disabled-color, rgba(0, 0, 0, 0.25)) !default; // 禁用颜色 +$-drop-menu-item-height: var(--wot-drop-menu-item-height, 48px) !default; // 选项高度 +$-drop-menu-item-color: var(--wot-drop-menu-item-color, $-color-content) !default; // 选项颜色 +$-drop-menu-item-fs: var(--wot-drop-menu-item-fs, $-fs-content) !default; // 选项字号 +$-drop-menu-item-color-active: var(--wot-drop-menu-item-color-active, $-color-theme) !default; // 选中颜色 +$-drop-menu-item-color-tip: var(--wot-drop-menu-item-color-tip, rgba(0, 0, 0, 0.45)) !default; // 提示文字颜色 +$-drop-menu-item-fs-tip: var(--wot-drop-menu-item-fs-tip, $-fs-secondary) !default; // 提示文字字号 +$-drop-menu-option-check-size: var(--wot-drop-menu-option-check-size, 20px) !default; // check 图标大小 +$-drop-menu-line-color: var(--wot-drop-menu-line-color, $-color-theme) !default; // 下划线颜色 +$-drop-menu-line-height: var(--wot-drop-menu-line-height, 3px) !default; // 下划线高度 + +/* input-number */ +$-input-number-color: var(--wot-input-number-color, #262626) !default; // 文字颜色 +$-input-number-border-color: var(--wot-input-number-border-color, #e8e8e8) !default; // 边框颜色 +$-input-number-disabled-color: var(--wot-input-number-disabled-color, rgba(0, 0, 0, 0.25)) !default; // 禁用颜色 +$-input-number-height: var(--wot-input-number-height, 24px) !default; // 加减号按钮高度 +$-input-number-btn-width: var(--wot-input-number-btn-width, 26px) !default; // 加减号按钮宽度 +$-input-number-input-width: var(--wot-input-number-input-width, 36px) !default; // 输入框宽度 +$-input-number-radius: var(--wot-input-number-radius, 4px) !default; // 加减号按钮圆角大小 +$-input-number-fs: var(--wot-input-number-fs, 12px) !default; // 输入框字号 +$-input-number-icon-size: var(--wot-input-number-icon-size, 14px) !default; // 加减号图标大小 +$-input-number-icon-color: var(--wot-input-number-icon-color, rgba(0, 0, 0, 0.65)) !default; // icon颜色 + +/* input */ +$-input-padding: var(--wot-input-padding, $-size-side-padding) !default; // input 左右padding距离 +$-input-border-color: var(--wot-input-border-color, #dadada) !default; // 无label边框颜色 +$-input-not-empty-border-color: var(--wot-input-not-empty-border-color, #262626) !default; // 输入框有值时 无label边框颜色 +$-input-fs: var(--wot-input-fs, $-cell-title-fs) !default; // 字号 +$-input-fs-large: var(--wot-input-fs-large, $-cell-title-fs-large) !default; // 大尺寸字号 +$-input-icon-margin: var(--wot-input-icon-margin, 8px) !default; // 图标距离 +$-input-color: var(--wot-input-color, #262626) !default; // 文字颜色 +$-input-placeholder-color: var(--wot-input-placeholder-color, #bfbfbf) !default; // 占位符颜色 +$-input-disabled-color: var(--wot-input-disabled-color, #d9d9d9) !default; // 输入框禁用颜色 +$-input-error-color: var(--wot-input-error-color, $-color-danger) !default; // 输入框错误颜色 +$-input-icon-color: var(--wot-input-icon-color, #bfbfbf) !default; // 图标颜色 +$-input-clear-color: var(--wot-input-clear-color, #585858) !default; // 关闭按钮颜色 +$-input-count-color: var(--wot-input-count-color, #bfbfbf) !default; // 计数文字颜色 +$-input-count-current-color: var(--wot-input-count-current-color, #262626) !default; // 当前长度颜色 +$-input-bg: var(--wot-input-bg, $-color-white) !default; // 默认背景颜色 + +$-input-cell-bg: var(--wot-input-cell-bg, $-color-white) !default; // cell 类型背景色 +$-input-cell-border-color: var(--wot-input-cell-border-color, $-color-border-light) !default; // cell 类型边框颜色 +$-input-cell-padding: var(--wot-input-cell-padding, 10px) !default; // cell 容器padding +$-input-cell-padding-large: var(--wot-input-cell-padding-large, 12px) !default; // large类型cell容器padding +$-input-cell-height: var(--wot-input-cell-height, 24px) !default; // cell 高度 +$-input-cell-label-width: var(--wot-input-cell-label-width, 33%) !default; // cell 下 label 的宽度 +$-input-inner-height: var(--wot-input-inner-height, 34px) !default; // 非cell和textarea下的高度 +$-input-inner-height-no-border: var(--wot-input-inner-height-no-border, 24px) !default; // 无边框下的高度 +$-input-count-fs: var(--wot-input-count-fs, 14px) !default; // 计数字号 +$-input-count-fs-large: var(--wot-input-count-fs-large, 14px) !default; // 大尺寸计数字号 +$-input-icon-size: var(--wot-input-icon-size, 16px) !default; // 图标大小 +$-input-icon-size-large: var(--wot-input-icon-size-large, 18px) !default; // 大尺寸图标大小 + +/* textarea */ +$-textarea-padding: var(--wot-textarea-padding, $-size-side-padding) !default; // textarea 左右padding距离 +$-textarea-border-color: var(--wot-textarea-border-color, #dadada) !default; // 无label边框颜色 +$-textarea-not-empty-border-color: var(--wot-textarea-not-empty-border-color, #262626) !default; // 输入框有值时 无label边框颜色 +$-textarea-fs: var(--wot-textarea-fs, $-cell-title-fs) !default; // 字号 +$-textarea-fs-large: var(--wot-textarea-fs-large, $-cell-title-fs-large) !default; // 大尺寸字号 +$-textarea-icon-margin: var(--wot-textarea-icon-margin, 8px) !default; // 图标距离 +$-textarea-color: var(--wot-textarea-color, #262626) !default; // 文字颜色 +$-textarea-icon-color: var(--wot-textarea-icon-color, #bfbfbf) !default; // 图标颜色 +$-textarea-clear-color: var(--wot-textarea-clear-color, #585858) !default; // 关闭按钮颜色 +$-textarea-count-color: var(--wot-textarea-count-color, #bfbfbf) !default; // 计数文字颜色 +$-textarea-count-current-color: var(--wot-textarea-count-current-color, #262626) !default; // 当前长度颜色 +$-textarea-bg: var(--wot-textarea-bg, $-color-white) !default; // 默认背景颜色 +$-textarea-cell-border-color: var(--wot-textarea-cell-border-color, $-color-border-light) !default; // cell 类型边框颜色 +$-textarea-cell-padding: var(--wot-textarea-cell-padding, 10px) !default; // cell 容器padding +$-textarea-cell-padding-large: var(--wot-textarea-cell-padding-large, 12px) !default; // large类型cell容器padding +$-textarea-cell-height: var(--wot-textarea-cell-height, 24px) !default; // cell 高度 +$-textarea-count-fs: var(--wot-textarea-count-fs, 14px) !default; // 计数字号 +$-textarea-count-fs-large: var(--wot-textarea-count-fs-large, 14px) !default; // 大尺寸计数字号 +$-textarea-icon-size: var(--wot-textarea-icon-size, 16px) !default; // 图标大小 +$-textarea-icon-size-large: var(--wot-textarea-icon-size-large, 18px) !default; // 大尺寸图标大小 + +/* loadmore */ +$-loadmore-height: var(--wot-loadmore-height, 48px) !default; // 高度 +$-loadmore-color: var(--wot-loadmore-color, rgba(0, 0, 0, 0.45)) !default; // 颜色 +$-loadmore-fs: var(--wot-loadmore-fs, 14px) !default; // 字号 +$-loadmore-error-color: var(--wot-loadmore-error-color, $-color-theme) !default; // 点击重试颜色 +$-loadmore-refresh-fs: var(--wot-loadmore-refresh-fs, $-fs-title) !default; // refresh图标字号 +$-loadmore-loading-size: var(--wot-loadmore-loading-size, $-fs-title) !default; // loading尺寸 + +/* message-box */ +$-message-box-width: var(--wot-message-box-width, 300px) !default; // 宽度 +$-message-box-bg: var(--wot-message-box-bg, $-color-white) !default; // 默认背景颜色 +$-message-box-radius: var(--wot-message-box-radius, 16px) !default; // 圆角大小 +$-message-box-padding: var(--wot-message-box-padding, 25px 24px 0) !default; // 主体内容padding +$-message-box-title-fs: var(--wot-message-box-title-fs, 16px) !default; // 标题字号 +$-message-box-title-color: var(--wot-message-box-title-color, rgba(0, 0, 0, 0.85)) !default; // 标题颜色 +$-message-box-content-fs: var(--wot-message-box-content-fs, 14px) !default; // 内容字号 +$-message-box-content-color: var(--wot-message-box-content-color, #666666) !default; // 内容颜色 +$-message-box-content-max-height: var(--wot-message-box-content-max-height, 264px) !default; // 内容最大高度 +$-message-box-content-scrollbar-width: var(--wot-message-box-content-scrollbar-width, 4px) !default; // 内容滚动条宽度 +$-message-box-content-scrollbar-color: var(--wot-message-box-content-scrollbar-color, rgba(0, 0, 0, 0.1)) !default; // 内容滚动条颜色 +$-message-box-input-error-color: var(--wot-message-box-input-error-color, $-input-error-color) !default; // 输入框错误颜色 + +/* notice-bar */ +$-notice-bar-fs: var(--wot-notice-bar-fs, 12px) !default; // 字号 +$-notice-bar-line-height: var(--wot-notice-bar-line-height, 18px) !default; // 行高 +$-notice-bar-border-radius: var(--wot-notice-bar-border-radius, 8px) !default; // 圆角 +$-notice-bar-padding: var(--wot-notice-bar-padding, 9px 20px 9px 15px) !default; // 非换行下的padding +$-notice-bar-warning-bg: var(--wot-notice-bar-warning-bg, #fff6c8) !default; // 背景色 +$-notice-bar-info-bg: var(--wot-notice-bar-info-bg, #f4f9ff) !default; // 背景色 +$-notice-bar-danger-bg: var(--wot-notice-bar-danger-bg, #feeced) !default; // 背景色 +$-notice-bar-warning-color: var(--wot-notice-bar-warning-color, $-color-warning) !default; // 文字和图标颜色 +$-notice-bar-info-color: var(--wot-notice-bar-info-color, $-color-theme) !default; // 文字和图标颜色 +$-notice-bar-danger-color: var(--wot-notice-bar-danger-color, $-color-danger) !default; // 文字和图标颜色 +$-notice-bar-prefix-size: var(--wot-notice-bar-prefix-size, 18px) !default; // 图标大小 +$-notice-bar-close-bg: var(--wot-notice-bar-close-bg, rgba(0, 0, 0, 0.15)) !default; // 右侧关闭按钮背景颜色 +$-notice-bar-close-size: var(--wot-notice-bar-close-size, 18px) !default; // 右侧关闭按钮背景颜色 +$-notice-bar-close-color: var(--wot-notice-bar-close-color, $-color-white) !default; // 右侧关闭按钮颜色 +$-notice-bar-wrap-padding: var(--wot-notice-bar-wrap-padding, 14px $-size-side-padding) !default; // 换行下的padding + +/* pagination */ +$-pagination-content-padding: var(--wot-pagination-content-padding, 10px 15px) !default; +$-pagination-message-padding: var(--wot-pagination-message-padding, 1px 0 16px 0) !default; +$-pagination-message-fs: var(--wot-pagination-message-fs, 12px) !default; +$-pagination-message-color: var(--wot-pagination-message-color, rgba(0, 0, 0, 0.69)) !default; +$-pagination-nav-border: var(--wot-pagination-nav-border, 1px solid rgba(0, 0, 0, 0.45)) !default; +$-pagination-nav-border-radius: var(--wot-pagination-nav-border-radius, 16px) !default; +$-pagination-nav-fs: var(--wot-pagination-nav-fs, 12px) !default; +$-pagination-nav-width: var(--wot-pagination-nav-width, 60px) !default; +$-pagination-nav-color: var(--wot-pagination-nav-color, rgba(0, 0, 0, 0.85)) !default; +$-pagination-nav-content-fs: var(--wot-pagination-nav-content-fs, 12px) !default; +$-pagination-nav-sepatator-padding: var(--wot-pagination-nav-sepatator-padding, 0 4px) !default; +$-pagination-nav-current-color: var(--wot-pagination-nav-current-color, $-color-theme) !default; +$-pagination-icon-size: var(--wot-pagination-icon-size, $-fs-content) !default; + +/* picker */ +$-picker-toolbar-height: var(--wot-picker-toolbar-height, 54px) !default; // toolbar 操作条的高度 +$-picker-action-height: var(--wot-picker-action-height, 16px) !default; // toolbar 操作条的高度 +$-picker-toolbar-finish-color: var(--wot-picker-toolbar-finish-color, $-color-theme) !default; // toolbar 操作条完成按钮的颜色 +$-picker-toolbar-cancel-color: var(--wot-picker-toolbar-cancel-color, #666666) !default; // toolbar 操作条的边框颜色 +$-picker-toolbar-fs: var(--wot-picker-toolbar-fs, $-fs-title) !default; // toolbar 操作条的字号 +$-picker-toolbar-title-color: var(--wot-picker-toolbar-title-color, rgba(0, 0, 0, 0.85)) !default; // toolbar 操作台的标题颜色 +$-picker-column-fs: var(--wot-picker-column-fs, 16px) !default; // 选择器选项的字号 +$-picker-bg: var(--wot-picker-bg, $-color-white) !default; // 选择器选项的字号 +$-picker-column-active-fs: var(--wot-picker-column-active-fs, 18px) !default; // 选择器选项被选中的字号 +$-picker-column-color: var(--wot-picker-column-color, rgba(0, 0, 0, 0.85)) !default; // 选择器选项的颜色 +$-picker-column-height: var(--wot-picker-column-height, 210px) !default; // 列高 滚筒外部的高度 +$-picker-column-item-height: var(--wot-picker-column-item-height, 35px) !default; // 列高 滚筒外部的高度 +$-picker-column-select-bg: var(--wot-picker-column-select-bg, #f5f5f5) !default; +$-picker-loading-button-color: var(--wot-picker-loading-button-color, rgba(0, 0, 0, 0.25)) !default; // loading 背景颜色 +$-picker-column-padding: var(--wot-picker-column-padding, 0 $-size-side-padding-small) !default; // 选项内间距 + +$-picker-column-disabled-color: var(--wot-picker-column-disabled-color, rgba(0, 0, 0, 0.25)) !default; // 选择器选项禁用的颜色 +$-picker-mask: var(--wot-picker-mask, linear-gradient(180deg, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.25))) + linear-gradient(0deg, hsla(0, 0%, 100%, 0.9), hsla(0, 0%, 100%, 0.25)) !default; // 上下阴影 +$-picker-loading-bg: var(--wot-picker-loading-bg, rgba($-color-white, 0.8)) !default; // loading 背景颜色 +$-picker-region-separator-color: var(--wot-picker-region-separator-color, rgba(0, 0, 0, 0.65)) !default; // 区域选择文字颜色 +$-picker-cell-arrow-size-large: var(--wot-picker-cell-arrow-size-large, $-cell-icon-size) !default; // cell 类型的大尺寸 右侧icon尺寸 + +$-picker-region-color: var(--wot-picker-region-color, rgba(0, 0, 0, 0.45)) !default; // 区域选择文字颜色 +$-picker-region-bg-active-color: var(--wot-picker-region-bg-active-color, $-color-theme) !default; // 区域选择激活选中背景颜色 + +$-picker-region-fs: var(--wot-picker-region-fs, 14px) !default; // 区域选择文字字号 + +/* col-picker */ +$-col-picker-selected-height: var(--wot-col-picker-selected-height, 44px) !default; // 弹框顶部值高度 +$-col-picker-selected-padding: var(--wot-col-picker-selected-padding, 0 16px) !default; // 弹框顶部值左右间距 +$-col-picker-selected-fs: var(--wot-col-picker-selected-fs, 14px) !default; // 弹框顶部值字号 +$-col-picker-selected-color: var(--wot-col-picker-selected-color, rgba(0, 0, 0, 0.85)) !default; // 弹框顶部值文字颜色 +$-col-picker-selected-fw: var(--wot-col-picker-selected-fw, 700) !default; // 弹框顶部值高亮字重 +$-col-picker-line-width: var(--wot-col-picker-line-width, 16px) !default; // 弹框顶部值高亮线条宽度 +$-col-picker-line-height: var(--wot-col-picker-line-height, 3px) !default; // 弹框顶部值高亮线条高度 +$-col-picker-line-color: var( + --wot-col-picker-line-color, + linear-gradient(315deg, rgba(81, 124, 240, 1), rgba(118, 158, 245, 1)) +) !default; // 弹框顶部值高亮线条颜色 +$-col-picker-line-box-shadow: var(--wot-col-picker-line-box-shadow, 0px 1px 2px 0px rgba(1, 87, 255, 0.2)) !default; // 弹框顶部值高亮线条阴影 +$-col-picker-list-height: var(--wot-col-picker-list-height, 53vh) !default; // 弹框列表高度 +$-col-picker-list-padding-bottom: var(--wot-col-picker-list-padding-bottom, 30px) !default; // 弹框列表底部间距 +$-col-picker-list-color: var(--wot-col-picker-list-color, rgba(0, 0, 0, 0.85)) !default; // 弹框列表文字颜色 +$-col-picker-list-color-disabled: var(--wot-col-picker-list-color-disabled, rgba(0, 0, 0, 0.15)) !default; // 弹框列表文字禁用颜色 +$-col-picker-list-color-tip: var(--wot-col-picker-list-color-tip, rgba(0, 0, 0, 0.45)) !default; // 弹框列表提示文字颜色 +$-col-picker-list-fs: var(--wot-col-picker-list-fs, 14px) !default; // 弹框列表文字字号 +$-col-picker-list-fs-tip: var(--wot-col-picker-list-fs-tip, 12px) !default; // 弹框列表提示文字字号 +$-col-picker-list-item-padding: var(--wot-col-picker-list-item-padding, 12px 15px) !default; // 弹框列表选项间距 +$-col-picker-list-checked-icon-size: var(--wot-col-picker-list-checked-icon-size, 18px) !default; // 弹框列表选中箭头大小 +$-col-picker-list-color-checked: var(--wot-col-picker-list-color-checked, $-color-theme) !default; // 弹框列表选中选项颜色 + +/* overlay */ +$-overlay-bg: var(--wot-overlay-bg, rgba(0, 0, 0, 0.65)) !default; +$-overlay-bg-dark: var(--wot-overlay-bg-dark, rgba(0, 0, 0, 0.75)) !default; + +/* popup */ +$-popup-close-size: var(--wot-popup-close-size, 24px) !default; // 关闭按钮尺寸 +$-popup-close-color: var(--wot-popup-close-color, #666) !default; // 关闭按钮颜色 + +/* progress */ +$-progress-padding: var(--wot-progress-padding, 9px 0 8px) !default; // 进度条内边距 +$-progress-bg: var(--wot-progress-bg, rgba(229, 229, 229, 1)) !default; // 进度条底色 +$-progress-danger-color: var(--wot-progress-danger-color, $-color-danger) !default; // 进度条danger颜色 +$-progress-success-color: var(--wot-progress-success-color, $-color-success) !default; // 进度条success进度条颜色 +$-progress-warning-color: var(--wot-progress-warning-color, $-color-warning) !default; // 进度条warning进度条颜色 + +$-progress-color: var(--wot-progress-color, $-color-theme) !default; // 进度条颜色 +$-progress-height: var(--wot-progress-height, 3px) !default; // 进度条高度 +$-progress-label-color: var(--wot-progress-label-color, #333) !default; // 文字颜色 +$-progress-label-fs: var(--wot-progress-label-fs, 14px) !default; // 文字字号 +$-progress-icon-fs: var(--wot-progress-icon-fs, 18px) !default; // 图标字号 + +/* radio */ +$-radio-margin: var(--wot-radio-margin, $-checkbox-margin) !default; // 多个单选框距离 +$-radio-label-margin: var(--wot-radio-label-margin, $-checkbox-label-margin) !default; // 右侧文字与左侧图标距离 +$-radio-size: var(--wot-radio-size, 16px) !default; // 左侧图标尺寸 +$-radio-bg: var(--wot-radio-bg, $-color-white) !default; // 左侧图标尺寸 +$-radio-label-fs: var(--wot-radio-label-fs, $-checkbox-label-fs) !default; // 右侧文字字号 +$-radio-label-color: var(--wot-radio-label-color, $-checkbox-label-color) !default; // 右侧文字颜色 +$-radio-checked-color: var(--wot-radio-checked-color, $-checkbox-checked-color) !default; // 选中颜色 +$-radio-disabled-color: var(--wot-radio-disabled-color, $-checkbox-disabled-color) !default; // 禁用颜色 +$-radio-disabled-label-color: var(--wot-radio-disabled-label-color, $-checkbox-disabled-label-color) !default; // 禁用文字颜色 + +$-radio-large-size: var(--wot-radio-large-size, $-checkbox-large-size) !default; // 左侧图标尺寸 +$-radio-large-label-fs: var(--wot-radio-large-label-fs, $-checkbox-large-label-fs) !default; // 右侧文字字号 + +$-radio-button-height: var(--wot-radio-button-height, $-checkbox-button-height) !default; // 按钮模式复选框高 +$-radio-button-min-width: var(--wot-radio-button-min-width, 60px) !default; // 按钮模式最小宽 +$-radio-button-max-width: var(--wot-radio-button-max-width, 144px) !default; // 按钮模式最大宽 +$-radio-button-radius: var(--wot-radio-button-radius, $-checkbox-button-radius) !default; // 按钮圆角大小 +$-radio-button-bg: var(--wot-radio-button-bg, $-checkbox-button-bg) !default; // 按钮模式背景颜色 +$-radio-button-fs: var(--wot-radio-button-fs, $-checkbox-button-font-size) !default; // 按钮模式字号 +$-radio-button-border: var(--wot-radio-button-border, $-checkbox-button-border) !default; // 按钮边框颜色 +$-radio-button-disabled-border: var(--wot-radio-button-disabled-border, $-checkbox-button-disabled-border) !default; // 按钮禁用边框颜色 + +$-radio-dot-size: var(--wot-radio-dot-size, 8px) !default; // 单选dot模式圆点尺寸 +$-radio-dot-large-size: var(--wot-radio-dot-large-size, 10px) !default; // 单选dot模式大尺寸圆点尺寸 +$-radio-dot-checked-bg: var(--wot-radio-dot-checked-bg, $-color-theme) !default; // 单选dot模式选中背景色 +$-radio-dot-checked-border-color: var(--wot-radio-dot-checked-border-color, $-color-theme) !default; // 单选dot模式选中边框色 +$-radio-dot-border-color: var(--wot-radio-dot-border-color, #dcdcdc) !default; // 单选dot模式边框色 +$-radio-dot-disabled-border: var(--wot-radio-dot-disabled-border, #d9d9d9) !default; // 单选dot模式禁用边框颜色 +$-radio-dot-disabled-bg: var(--wot-radio-dot-disabled-bg, #d9d9d9) !default; // 单选dot模式禁用背景颜色 + +/* search */ +$-search-side-padding: var(--wot-search-side-padding, $-size-side-padding) !default; // 左右间距 +$-search-padding: var(--wot-search-padding, 10px 0 10px $-search-side-padding) !default; // 不包含取消按钮的间距 +$-search-input-radius: var(--wot-search-input-radius, 15px) !default; // 输入框圆角大小 +$-search-input-bg: var(--wot-search-input-bg, $-color-bg) !default; // 输入框背景色 +$-search-input-height: var(--wot-search-input-height, 30px) !default; // 输入框高度 +$-search-input-padding: var(--wot-search-input-padding, 0 32px 0 42px) !default; // 输入框间距 +$-search-input-fs: var(--wot-search-input-fs, $-fs-content) !default; // 输入框字号 +$-search-input-color: var(--wot-search-input-color, #262626) !default; // 输入框文字颜色 +$-search-icon-color: var(--wot-search-icon-color, $-color-icon) !default; // 图标颜色 +$-search-icon-size: var(--wot-search-icon-size, 18px) !default; // 图标大小 +$-search-clear-icon-size: var(--wot-search-clear-icon-size, $-fs-title) !default; // 清除图标大小 +$-search-placeholder-color: var(--wot-search-placeholder-color, #bfbfbf) !default; // placeholder 颜色 +$-search-cancel-padding: var(--wot-search-cancel-padding, 0 $-search-side-padding 0 10px) !default; // 取消按钮间距 +$-search-cancel-fs: var(--wot-search-cancel-fs, $-fs-title) !default; // 取消按钮字号 +$-search-cancel-color: var(--wot-search-cancel-color, rgba(0, 0, 0, 0.65)) !default; // 取消按钮颜色 +$-search-light-bg: var(--wot-search-light-bg, $-color-bg) !default; // light 类型的容器背景色 + +/* slider */ +$-slider-fs: var(--wot-slider-fs, $-fs-content) !default; // 字体大小 +$-slider-handle-radius: var(--wot-slider-handle-radius, 12px) !default; // 滑块半径 +$-slider-handle-bg: var(--wot-slider-handle-bg, resultColor(139deg, $-color-theme, 'dark' 'light', #ffffff #f7f7f7, 0% 100%)) !default; // 滑块背景 +$-slider-axie-height: var(--wot-slider-axie-height, 3px) !default; // 滑轴高度 +$-slider-color: var(--wot-slider-color, #333) !default; // 字体颜色 +$-slider-axie-bg: var(--wot-slider-axie-bg, #e5e5e5) !default; // 滑轴的默认背景色 +$-slider-line-color: var( + --wot-slider-line-color, + resultColor(315deg, $-color-theme, 'dark' 'light', #517cf0 #769ef5, 0% 100%) +) !default; // 进度条颜色 +$-slider-disabled-color: var(--wot-slider-disabled-color, rgba(0, 0, 0, 0.25)) !default; // 禁用状态下字体颜色 + +/* sort-button */ +$-sort-button-fs: var(--wot-sort-button-fs, $-fs-content) !default; // 字号 +$-sort-button-color: var(--wot-sort-button-color, $-color-content) !default; // 颜色 +$-sort-button-height: var(--wot-sort-button-height, 48px) !default; // 高度 +$-sort-button-line-height: var(--wot-sort-button-line-height, 3px) !default; // 下划线高度 +$-sort-button-line-color: var(--wot-sort-button-line-color, $-color-theme) !default; // 下划线颜色 + +/* steps */ +$-steps-icon-size: var(--wot-steps-icon-size, 22px) !default; // 图标尺寸 +$-steps-inactive-color: var(--wot-steps-inactive-color, rgba(0, 0, 0, 0.25)) !default; // 等待状态文字颜色 +$-steps-finished-color: var(--wot-steps-finished-color, $-color-theme) !default; // 完成文字颜色 +$-steps-icon-text-fs: var(--wot-steps-icon-text-fs, $-fs-content) !default; // 数字图标文字字号 +$-steps-error-color: var(--wot-steps-error-color, $-color-danger) !default; // 异常颜色 +$-steps-title-fs: var(--wot-steps-title-fs, $-fs-content) !default; // 标题字号 +$-steps-title-fw: var(--wot-steps-title-fw, $-fw-medium) !default; // 标题字重 +$-steps-label-fs: var(--wot-steps-label-fs, $-fs-secondary) !default; // 描述信息字号 +$-steps-description-color: var(--wot-steps-description-color, rgba(0, 0, 0, 0.45)) !default; // 描述信息颜色 +$-steps-is-icon-width: var(--wot-steps-is-icon-width, 30px) !default; // 自定义图标的宽度,给左右留白 +$-steps-line-color: var(--wot-steps-line-color, rgba(0, 0, 0, 0.15)) !default; // 线条颜色 +$-steps-dot-size: var(--wot-steps-dot-size, 7px) !default; // 点状大小 +$-steps-dot-active-size: var(--wot-steps-dot-active-size, 9px) !default; // 点状高亮大小 + +/* switch */ +$-switch-size: var(--wot-switch-size, 28px) !default; // switch大小 +$-switch-width: var(--wot-switch-width, calc(1.8em + 4px)) !default; // 宽度 +$-switch-height: var(--wot-switch-height, calc(1em + 4px)) !default; // 高度 +$-switch-circle-size: var(--wot-switch-circle-size, 1em) !default; // 圆点大小 +$-switch-border-color: var(--wot-switch-border-color, #e5e5e5) !default; // 边框颜色选中状态背景颜色 +$-switch-active-color: var(--wot-switch-active-color, $-color-theme) !default; // 选中状态背景 +$-switch-active-shadow-color: var(--wot-switch-active-shadow-color, rgba(0, 83, 162, 0.5)) !default; // 选中状态shadow颜色 +$-switch-inactive-color: var(--wot-switch-inactive-color, #eaeaea) !default; // 非选中背景颜色 +$-switch-inactive-shadow-color: var(--wot-switch-inactive-shadow-color, rgba(155, 155, 155, 0.5)) !default; // 非选中状态shadow颜色 + +/* tabs */ +$-tabs-nav-arrow-fs: var(--wot-tabs-nav-arrow-fs, 18px) !default; // 全部Icon字号 +$-tabs-nav-arrow-open-fs: var(--wot-tabs-nav-arrow-open-fs, 14px) !default; // 展开Icon字号 +$-tabs-nav-width: var(--wot-tabs-nav-width, 100vw) !default; // tabs 头部切换宽度 +$-tabs-nav-height: var(--wot-tabs-nav-height, 42px) !default; // 头部切换高度 +$-tabs-nav-fs: var(--wot-tabs-nav-fs, $-fs-content) !default; // 头部切换文字大小 +$-tabs-nav-color: var(--wot-tabs-nav-color, rgba(0, 0, 0, 0.85)) !default; // 头部切换文字颜色 +$-tabs-nav-bg: var(--wot-tabs-nav-bg, $-color-white) !default; // 背景颜色 +$-tabs-nav-active-color: var(--wot-tabs-nav-active-color, $-color-theme) !default; // 头部高亮颜色 +$-tabs-nav-disabled-color: var(--wot-tabs-nav-disabled-color, rgba(0, 0, 0, 0.25)) !default; // 头部禁用颜色 +$-tabs-nav-line-height: var(--wot-tabs-nav-line-height, 3px) !default; // 高亮边框高度 +$-tabs-nav-line-width: var(--wot-tabs-nav-line-width, 19px) !default; // 高亮边框宽度 +$-tabs-nav-line-bg-color: var(--wot-tabs-nav-line-bg-color, $-color-theme) !default; // 底部条颜色 +$-tabs-nav-map-fs: var(--wot-tabs-nav-map-fs, $-fs-content) !default; // map 类型按钮字号 +$-tabs-nav-map-color: var(--wot-tabs-nav-map-color, rgba(0, 0, 0, 0.85)) !default; // map 类型按钮文字颜色 +$-tabs-nav-map-arrow-color: var(--wot-tabs-nav-map-arrow-color, rgba(0, 0, 0, 0.65)) !default; // map 类型箭头颜色 +$-tabs-nav-map-btn-before-bg: var( + --wot-tabs-nav-map-btn-before-bg, + linear-gradient(270deg, rgba(255, 255, 255, 1) 1%, rgba(255, 255, 255, 0) 100%) +) !default; // 左侧map遮罩阴影 +$-tabs-nav-map-button-back-color: var(--wot-tabs-nav-map-button-back-color, rgba(0, 0, 0, 0.04)) !default; // map 类型按钮边框颜色 +$-tabs-nav-map-button-radius: var(--wot-tabs-nav-map-button-radius, 16px) !default; // map 类型按钮圆角大小 +$-tabs-nav-map-modal-bg: var(--wot-tabs-nav-map-modal-bg, $-overlay-bg) !default; // map 类型蒙层背景色 + +/* tag */ +$-tag-fs: var(--wot-tag-fs, $-fs-secondary) !default; // 字号 +$-tag-color: var(--wot-tag-color, $-color-white) !default; // 字体颜色 +$-tag-small-fs: var(--wot-tag-small-fs, $-fs-aid) !default; // 小尺寸字号 +$-tag-info-color: var(--wot-tag-info-color, #585858) !default; // info 颜色 +$-tag-primary-color: var(--wot-tag-primary-color, $-color-theme) !default; // 主颜色 +$-tag-danger-color: var(--wot-tag-danger-color, $-color-danger) !default; // danger 颜色 +$-tag-warning-color: var(--wot-tag-warning-color, $-color-warning) !default; // warning 颜色 +$-tag-success-color: var(--wot-tag-success-color, $-color-success) !default; // success 颜色 +$-tag-info-bg: var(--wot-tag-info-bg, resultColor(49deg, $-color-black, 'dark' 'light', #808080 #999999, 0% 100%)) !default; // info 背景颜色 +$-tag-primary-bg: var(--wot-tag-primary-bg, $-color-theme) !default; // 主背景颜色 +$-tag-danger-bg: var(--wot-tag-danger-bg, $-color-danger) !default; // danger 背景颜色 +$-tag-warning-bg: var(--wot-tag-warning-bg, $-color-warning) !default; // warning 背景颜色 +$-tag-success-bg: var(--wot-tag-success-bg, $-color-success) !default; // success 背景颜色 +$-tag-round-color: var(--wot-tag-round-color, rgba(102, 102, 102, 1)) !default; // round 字体颜色 +$-tag-round-border-color: var(--wot-tag-round-border-color, rgba(225, 225, 225, 1)) !default; // round 边框颜色 +$-tag-round-radius: var(--wot-tag-round-radius, 12px) !default; // round 圆角大小 +$-tag-mark-radius: var(--wot-tag-mark-radius, 6px 2px 6px 2px) !default; // mark 圆角大小 +$-tag-close-size: var(--wot-tag-close-size, 14px) !default; // 关闭按钮字号 +$-tag-close-color: var(--wot-tag-close-color, $-tag-info-color) !default; // 关闭按钮颜色 +$-tag-close-active-color: var(--wot-tag-close-active-color, rgba(0, 0, 0, 0.45)) !default; // 关闭按钮 active 颜色 + +/* toast */ +$-toast-color: var(--wot-toast-color, $-color-white) !default; // 文字颜色 +$-toast-padding: var(--wot-toast-padding, 16px 24px) !default; // padding +$-toast-max-width: var(--wot-toast-max-width, 300px) !default; // 最大宽度 +$-toast-radius: var(--wot-toast-radius, 8px) !default; // 圆角大小 +$-toast-bg: var(--wot-toast-bg, $-overlay-bg) !default; // 背景色 +$-toast-fs: var(--wot-toast-fs, $-fs-content) !default; // 字号 +$-toast-line-height: var(--wot-toast-line-height, 20px) !default; // 行高 +$-toast-with-icon-min-width: var(--wot-toast-with-icon-min-width, 150px) !default; // 有图标的情况下最小宽度 +$-toast-icon-size: var(--wot-toast-icon-size, 32px) !default; // 图标大小 +$-toast-icon-margin-right: var(--wot-toast-icon-margin-right, 12px) !default; // 图标右边距 +$-toast-icon-margin-bottom: var(--wot-toast-icon-margin-bottom, 12px) !default; // 图标下边距 +$-toast-loading-padding: var(--wot-toast-loading-padding, 10px) !default; // loading状态下的padding +$-toast-loading-margin-bottom: var(--wot-toast-loading-margin-bottom, 16px) !default; // loading动画的margin-bottom +$-toast-box-shadow: var(--wot-toast-box-shadow, 0px 6px 16px 0px rgba(0, 0, 0, 0.08)) !default; // 外部阴影 + +/* loading */ +$-loading-size: var(--wot-loading-size, 32px) !default; // loading 大小 + +/* tooltip */ +$-tooltip-bg: var(--wot-tooltip-bg, rgba(38, 39, 40, 0.8)) !default; // 背景色 +$-tooltip-color: var(--wot-tooltip-color, $-color-white) !default; // 文字颜色 +$-tooltip-radius: var(--wot-tooltip-radius, 8px) !default; // 圆角大小 +$-tooltip-arrow-size: var(--wot-tooltip-arrow-size, 5px) !default; // 箭头大小 +$-tooltip-fs: var(--wot-tooltip-fs, $-fs-content) !default; // 字号 +$-tooltip-blur: var(--wot-tooltip-blur, 10px) !default; // 背景高斯模糊效果 +$-tooltip-padding: var(--wot-tooltip-padding, 9px 20px) !default; // 间距 +$-tooltip-close-size: var(--wot-tooltip-close-size, 6px) !default; // 背景高斯模糊效果 +$-tooltip-z-index: var(--wot-tooltip-z-index, 500) !default; +$-tooltip-line-height: var(--wot-tooltip-line-height, 18px) !default; // 行高 + +/* popover */ +$-popover-bg: var(--wot-popover-bg, $-color-white) !default; // 背景色 +$-popover-color: var(--wot-popover-color, rgba(0, 0, 0, 0.85)) !default; // 文字颜色 +$-popover-box-shadow: var(--wot-popover-box-shadow, 0px 2px 10px 0px rgba(0, 0, 0, 0.1)) !default; // 阴影颜色 +$-popover-arrow-box-shadow: var(--wot-popover-arrow-box-shadow, 0px 2px 10px 0px rgba(0, 0, 0, 0.2)) !default; // 阴影颜色 +$-popover-border-color: var(--wot-popover-border-color, rgba(0, 0, 0, 0.09)) !default; // 阴影颜色 +$-popover-radius: var(--wot-popover-radius, 4px) !default; // 圆角大小 +$-popover-arrow-size: var(--wot-popover-arrow-size, 6px) !default; // 箭头大小 +$-popover-fs: var(--wot-popover-fs, $-fs-content) !default; // 字号 +$-popover-padding: var(--wot-popover-padding, 15px) !default; // 间距 +$-popover-line-height: var(--wot-popover-line-height, 18px) !default; // 行高 +$-popover-z-index: var(--wot-popover-z-index, $-tooltip-z-index) !default; + +/* grid-item */ +$-grid-item-fs: var(--wot-grid-item-fs, 12px) !default; // 字号 +$-grid-item-bg: var(--wot-grid-item-bg, $-color-white) !default; // 字号 +$-grid-item-padding: var(--wot-grid-item-padding, 14px 0px) !default; // 内容的 padding +$-grid-item-border-color: var(--wot-grid-item-border-color, $-color-border-light) !default; // 边框颜色 +$-grid-item-hover-bg: var(--wot-grid-item-hover-bg, $-color-gray-3) !default; // hover背景色 +$-grid-item-hover-bg-dark: var(--wot-grid-item-hover-bg-dark, $-color-gray-7) !default; // 暗黑模式hover背景色 + +/* statustip */ +$-statustip-fs: var(--wot-statustip-fs, $-fs-content) !default; // 字号 +$-statustip-color: var(--wot-statustip-color, rgba(0, 0, 0, 0.45)) !default; // 文字颜色 +$-statustip-line-height: var(--wot-statustip-line-height, 16px) !default; // 文字行高 +$-statustip-padding: var(--wot-statustip-padding, 5px 10px) !default; // 间距 + +/* card */ +$-card-bg: var(--wot-card-bg, $-color-white) !default; // 背景色 +$-card-fs: var(--wot-card-fs, $-fs-content) !default; // 卡片字号 +$-card-padding: var(--wot-card-padding, 0 $-size-side-padding) !default; // 内边距 +$-card-footer-padding: var(--wot-card-footer-padding, 12px 0 16px) !default; // 底部内边距 +$-card-shadow-color: var(--wot-card-shadow-color, 0px 4px 8px 0px rgba(0, 0, 0, 0.02)) !default; // 阴影 +$-card-radius: var(--wot-card-radius, 8px) !default; // 圆角大小 +$-card-line-height: var(--wot-card-line-height, 1.1) !default; // 行高 +$-card-margin: var(--wot-card-margin, 0 $-size-side-padding) !default; // 外边距 +$-card-title-color: var(--wot-card-title-color, rgba(0, 0, 0, 0.85)) !default; // 标题颜色 +$-card-title-fs: var(--wot-card-title-fs, $-fs-title) !default; // 矩形卡片标题字号 +$-card-content-border-color: var(--wot-card-content-border-color, rgba(0, 0, 0, 0.09)) !default; // 内容边框 +$-card-rectangle-title-padding: var(--wot-card-rectangle-title-padding, 15px 15px 12px) !default; // 矩形卡片头部内边距 +$-card-rectangle-content-padding: var(--wot-card-rectangle-content-padding, 16px 0) !default; // 矩形卡片内容内边距 +$-card-rectangle-footer-padding: var(--wot-card-rectangle-footer-padding, 12px 0) !default; // 矩形卡片底部内边距 +$-card-content-color: var(--wot-card-content-color, rgba(0, 0, 0, 0.45)) !default; // 文本内容颜色 +$-card-content-line-height: var(--wot-card-content-line-height, 1.428) !default; // 文本内容行高 +$-card-content-margin: var(--wot-card-content-margin, 13px 0 12px) !default; // 内容外边距 +$-card-content-rectangle-margin: var(--wot-card-content-rectangle-margin, 14px 0 12px) !default; // 矩形卡片内容外边距 + +/* upload */ +$-upload-size: var(--wot-upload-size, 80px) !default; // upload的外边框默认尺寸 +$-upload-evoke-icon-size: var(--wot-upload-evoke-icon-size, 32px) !default; // 唤起项的图标大小 +$-upload-evoke-bg: var(--wot-upload-evoke-bg, rgba(0, 0, 0, 0.04)) !default; // 唤起项的背景色 +$-upload-evoke-color: var(--wot-upload-evoke-color, rgba(0, 0, 0, 0.25)) !default; // 唤起项的图标颜色 +$-upload-evoke-disabled-color: var(--wot-upload-evoke-disabled-color, rgba(0, 0, 0, 0.09)) !default; // 唤起项禁用颜色 +$-upload-close-icon-size: var(--wot-upload-close-icon-size, 16px) !default; // 移除按钮尺寸 +$-upload-close-icon-color: var(--wot-upload-close-icon-color, rgba(0, 0, 0, 0.65)) !default; // 移除按钮颜色 +$-upload-progress-fs: var(--wot-upload-progress-fs, 14px) !default; // 进度文字字号 +$-upload-file-fs: var(--wot-upload-file-fs, 12px) !default; // 文件名字号 +$-upload-file-color: var(--wot-upload-file-color, $-color-secondary) !default; // 文件名字颜色 +$-upload-preview-name-fs: var(--wot-upload-preview-name-fs, 12px) !default; // 预览图片名字号 +$-upload-preview-icon-size: var(--wot-upload-preview-icon-size, 24px) !default; // 预览内部图标尺寸 +$-upload-preview-name-bg: var(--wot-upload-preview-name-bg, rgba(0, 0, 0, 0.6)) !default; // 预览文件名背景色 +$-upload-preview-name-height: var(--wot-upload-preview-name-height, 22px) !default; // 预览文件名背景高度 +$-upload-cover-icon-size: var(--wot-upload-cover-icon-size, 22px) !default; // 视频/文件图标尺寸 + +/* curtain */ +$-curtain-content-radius: var(--wot-curtain-content-radius, 24px) !default; // 内容圆角 +$-curtain-content-close-color: var(--wot-curtain-content-close-color, $-color-white) !default; // 关闭按钮颜色 +$-curtain-content-close-fs: var(--wot-curtain-content-close-fs, $-fs-big) !default; // 关闭按钮大小 + +/* notify */ +$-notify-text-color: var(--wot-notify-text-color, $-color-white) !default; +$-notify-padding: var(--wot-notify-padding, 8px 16px) !default; +$-notify-font-size: var(--wot-notify-font-size, $-fs-content) !default; +$-notify-line-height: var(--wot-notify-line-height, 20px) !default; +$-notify-primary-background: var(--wot-notify-primary-background, $-color-theme) !default; +$-notify-success-background: var(--wot-notify-success-background, $-color-success) !default; +$-notify-danger-background: var(--wot-notify-danger-background, $-color-danger) !default; +$-notify-warning-background: var(--wot-notify-warning-background, $-color-warning) !default; + +/* skeleton */ +$-skeleton-background-color: var(--wot-skeleton-background-color, #eee) !default; +$-skeleton-animation-gradient: var(--wot-skeleton-animation-gradient, rgba(0, 0, 0, 0.04)) !default; +$-skeleton-animation-flashed: var(--wot-skeleton-animation-flashed, rgba(230, 230, 230, 0.3)) !default; +$-skeleton-text-height-default: var(--wot-skeleton-text-height-default, 16px) !default; +$-skeleton-rect-height-default: var(--wot-skeleton-rect-height-default, 16px) !default; +$-skeleton-circle-height-default: var(--wot-skeleton-circle-height-default, 48px) !default; +$-skeleton-row-margin-bottom: var(--wot-skeleton-row-margin-bottom, 16px) !default; +$-skeleton-border-radius-text: var(--wot-skeleton-border-radius-text, 2px) !default; +$-skeleton-border-radius-rect: var(--wot-skeleton-border-radius-rect, 4px) !default; +$-skeleton-border-radius-circle: var(--wot-skeleton-border-radius-circle, 50%) !default; + +/* circle */ +$-circle-text-color: var(--wot-circle-text-color, $-color-content) !default; // circle文字颜色 + +/* swiper */ +$-swiper-radius: var(--wot-swiper-radius, 8px); +$-swiper-item-padding: var(--wot-swiper-item-padding, 0); +$-swiper-item-text-color: var(--wot-swiper-item-text-color, #ffffff); +$-swiper-item-text-fs: var(--wot-swiper-item-text-fs, $-fs-title); + + +/* swiper-nav */ +// dot & dots-bar +$-swiper-nav-dot-color: var(--wot-swiper-nav-dot-color, $-font-white-2) !default; +$-swiper-nav-dot-active-color: var(--wot-swiper-nav-dot-active-color, $-font-white-1) !default; +$-swiper-nav-dot-size: var(--wot-swiper-nav-dot-size, 12rpx) !default; +$-swiper-nav-dots-bar-active-width: var(--wot-swiper-nav-dots-bar-active-width, 40rpx) !default; +// fraction +$-swiper-nav-fraction-color: var(--wot-swiper-nav-fraction-color, $-font-white-1) !default; +$-swiper-nav-fraction-bg-color: var(--wot-swiper-nav-fraction-bg-color, $-font-gray-3) !default; +$-swiper-nav-fraction-height: var(--wot-swiper-nav-fraction-height, 48rpx) !default; +$-swiper-nav-fraction-font-size: var(--wot-swiper-nav-fraction-font-size, 24rpx) !default; +// button +$-swiper-nav-btn-color: var(--wot-swiper-nav-btn-color, $-font-white-1) !default; +$-swiper-nav-btn-bg-color: var(--wot-swiper-nav-btn-bg-color, $-font-gray-3) !default; +$-swiper-nav-btn-size: var(--wot-swiper-nav-btn-size, 48rpx) !default; + +/* segmented */ +$-segmented-padding: var(--wot-segmented-padding, 4px) !default; // 分段器padding +$-segmented-item-bg-color: var(--wot-segmented-item-bg-color, #eeeeee) !default; +$-segmented-item-color: var(--wot-segmented-item-color, rgba(0, 0, 0, 0.85)) !default; // 标题文字颜色 +$-segmented-item-acitve-bg: var(--wot-segmented-item-acitve-bg, #ffffff) !default; // 标题文字颜色 +$-segmented-item-disabled-color: var(--wot-segmented-item-disabled-color, rgba(0, 0, 0, 0.25)) !default; // 标题文字禁用颜色 + +/* tabbar */ +$-tabbar-height: var(--wot-tabbar-height, 50px) !default; +$-tabbar-box-shadow: var( + --wot-tabbar-box-shadow, + 0 6px 30px 5px rgba(0, 0, 0, 0.05), + 0 16px 24px 2px rgba(0, 0, 0, 0.04), + 0 8px 10px -5px rgba(0, 0, 0, 0.08) +) !default; // round类型tabbar阴影 + +/* tabbar-item */ +$-tabbar-item-title-font-size: var(--wot-tabbar-item-title-font-size, 10px) !default; // tabbar选项文字大小 +$-tabbar-item-title-line-height: var(--wot-tabbar-item-title-line-height, initial) !default; // tabbar选项标题文字行高 +$-tabbar-inactive-color: var(--wot-tabbar-inactive-color, $-color-title) !default; // 标题文字和图标颜色 +$-tabbar-active-color: var(--wot-tabbar-active-color, $-color-theme) !default; // 选中文字和图标颜色 +$-tabbar-item-icon-size: var(--wot-tabbar-item-icon-size, 20px) !default; // tabbar选项图标大小 + +/* navbar */ +$-navbar-height: var(--wot-navbar-height, 44px) !default; // navbar高度 +$-navbar-color: var(--wot-navbar-color, $-font-gray-1) !default; // navbar字体颜色 +$-navbar-background: var(--wot-navbar-background, $-color-white) !default; // navbar背景颜色 +$-navbar-arrow-size: var(--wot-navbar-arrow-size, 24px) !default; // navbar左箭头图标大小 +$-navbar-desc-font-size: var(--wot-navbar-desc-font-size, 16px); // navbar 左箭头字体大小 +$-navbar-desc-font-color: var(--wot-navbar-desc-font-color, $-font-gray-1) !default; // navbar左右两侧字体颜色 +$-navbar-title-font-size: var(--wot-navbar-title-font-size, 18px); // navbar title字体大小 +$-navbar-title-font-weight: var(--wot-navbar-title-font-weight, 600); // navbar title字重 +$-navbar-disabled-opacity: var(--wot-navbar-disabled-opacity, 0.6) !default; // navbar左右两侧字体禁用 +$-navbar-hover-color: var(--wot-navbar-hover-color, #eee) !default; // navbar hover样式 + +/* navbar-capsule */ +$-navbar-capsule-border-color: var(--wot-navbar-capsule-border-color, #e7e7e7) !default; +$-navbar-capsule-border-radius: var(--wot-navbar-capsule-border-radius, 16px) !default; +$-navbar-capsule-width: var(--wot-navbar-capsule-width, 88px) !default; +$-navbar-capsule-height: var(--wot-navbar-capsule-height, 32px) !default; +$-navbar-capsule-icon-size: var(--wot-navbar-capsule-icon-size, 20px) !default; // navbar capsule图标大小 + +/* table */ +$-table-color: var(--wot-table-color, $-font-gray-1) !default; // 表格字体颜色 +$-table-bg: var(--wot-table-bg, #ffffff) !default; // 表格背景颜色 +$-table-stripe-bg: var(--wot-table-stripe-bg, #f3f3f3) !default; // 表格背景颜色 +$-table-border-color: var(--wot-table-border-color, #ececec) !default; // 表格边框颜色 +$-table-font-size: var(--wot-table-font-size, 13px) !default; // 表格字体大小 + +/* sidebar */ +$-sidebar-bg: var(--wot-sidebar-bg, $-color-gray-1) !default; // 侧边栏背景色 +$-sidebar-width: var(--wot-sidebar-width, 104px) !default; // 侧边栏宽度 +$-sidebar-height: var(--wot-sidebar-height, 100%) !default; // 侧边栏高度 + +/* sidebar-item */ +$-sidebar-color: var(--wot-sidebar-color, $-font-gray-1) !default; +$-sidebar-item-height: var(--wot-sidebar-item-height, 56px) !default; +$-sidebar-item-line-height: var(--wot-sidebar-item-line-height, 24px) !default; +$-sidebar-disabled-color: var(--wot-side-bar-disabled-color, $-font-gray-4) !default; +$-sidebar-active-color: var(--wot-sidebar-active-color, $-color-theme) !default; // 激活项字体颜色 +$-sidebar-active-bg: var(--wot-sidebar-active-bg, $-color-white) !default; // 激活项背景颜色 +$-sidebar-hover-bg: var(--wot-sidebar-hover-bg, $-color-gray-2) !default; // 激活项点击背景颜色 +$-sidebar-border-radius: var(--wot-sidebar-border-radius, 8px) !default; +$-sidebar-font-size: var(--wot-sidebar-font-size, 16px) !default; +$-sidebar-icon-size: var(--wot-sidebar-icon-size, 20px) !default; +$-sidebar-active-border-width: var(--wot-sidebar-active-border-width, 4px) !default; +$-sidebar-active-border-height: var(--wot-sidebar-active-border-height, 16px) !default; + +/* fab */ +$-fab-trigger-height: var(--wot-fab-trigger-height, 56px) !default; +$-fab-trigger-width: var(--wot-fab-trigger-width, 56px) !default; +$-fab-actions-padding: var(--wot-actions-padding, 12px) !default; +$-fab-icon-fs: var(--wot-fab-icon-fs, 20px) !default; + +/* count-down */ +$-count-down-text-color: var(--wot-count-down-text-color, $-color-gray-8) !default; +$-count-down-font-size: var(--wot-count-down-font-size, $-fs-content) !default; +$-count-down-line-height: var(--wot-count-down-line-height, 20px) !default; + +/* keyboard */ +$-keyboard-key-height: var(--wot-keyboard-key-height, 48px) !default; +$-keyboard-key-font-size: var(--wot-keyboard-key-font-size, 28px) !default; +$-keyboard-key-background: var(--wot-keyboard-key-background, $-color-white) !default; +$-keyboard-key-border-radius: var(--wot-keyboard-key-border-radius, 8px) !default; +$-keyboard-delete-font-size: var(--wot-keyboard-delete-font-size, 16px) !default; +$-keyboard-key-active-color: var(--wot-keyboard-key-active-color, $-color-gray-3) !default; +$-keyboard-button-text-color: var(--wot-keyboard-button-text-color, $-color-white) !default; +$-keyboard-button-background: var(--wot-keyboard--button-background, $-color-theme) !default; +$-keyboard-button-active-opacity: var(--wot-keyboard-button-active-opacity, 0.6) !default; +$-keyboard-background: var(--wot-keyboard-background, $-color-gray-2) !default; +$-keyboard-title-height: var(--wot-keyboard-title-height, 34px) !default; +$-keyboard-title-color: var(--wot-keyboard-title-color, $-color-gray-7) !default; +$-keyboard-title-font-size: var(--wot-keyboard-title-font-size, 16px) !default; +$-keyboard-close-padding: var(--wot-keyboard-title-font-size, 0 16px) !default; +$-keyboard-close-color: var(--wot-keyboard-close-color, $-color-theme) !default; +$-keyboard-close-font-size: var(--wot-keyboard-close-font-size, 14px) !default; +$-keyboard-icon-size: var(--wot-keyboard-icon-size, 22px) !default; + +/* number-keyboard */ +$-number-keyboard-key-height: var(--wot-number-keyboard-key-height, 48px) !default; +$-number-keyboard-key-font-size: var(--wot-number-keyboard-key-font-size, 28px) !default; +$-number-keyboard-key-background: var(--wot-number-keyboard-key-background, $-color-white) !default; +$-number-keyboard-key-border-radius: var(--wot-number-keyboard-key-border-radius, 8px) !default; +$-number-keyboard-delete-font-size: var(--wot-number-keyboard-delete-font-size, 16px) !default; +$-number-keyboard-key-active-color: var(--wot-number-keyboard-key-active-color, $-color-gray-3) !default; +$-number-keyboard-button-text-color: var(--wot-number-keyboard-button-text-color, $-color-white) !default; +$-number-keyboard-button-background: var(--wot-number-keyboard--button-background, $-color-theme) !default; +$-number-keyboard-button-active-opacity: var(--wot-number-keyboard-button-active-opacity, 0.6) !default; +$-number-keyboard-background: var(--wot-number-keyboard-background, $-color-gray-2) !default; +$-number-keyboard-title-height: var(--wot-number-keyboard-title-height, 34px) !default; +$-number-keyboard-title-color: var(--wot-number-keyboard-title-color, $-color-gray-7) !default; +$-number-keyboard-title-font-size: var(--wot-number-keyboard-title-font-size, 16px) !default; +$-number-keyboard-close-padding: var(--wot-number-keyboard-title-font-size, 0 16px) !default; +$-number-keyboard-close-color: var(--wot-number-keyboard-close-color, $-color-theme) !default; +$-number-keyboard-close-font-size: var(--wot-number-keyboard-close-font-size, 14px) !default; +$-number-keyboard-icon-size: var(--wot-number-keyboard-icon-size, 22px) !default; + +/* passwod-input */ +$-password-input-height: var(--wot-password-input-height, 50px); +$-password-input-margin: var(--wot-password-input-margin, 16px); +$-password-input-font-size: var(--wot-password-input-margin, 20px); +$-password-input-radius: var(--wot-password-input-radius, 6px); +$-password-input-background: var(--wot-password-input-background, #fff); +$-password-input-info-color: var(--wot-password-input-info-color, $-color-info); +$-password-input-info-font-size: var(--wot-password-input-info-font-size, $-fs-content); +$-password-input-border-color: var(--wot-password-border-color, #ebedf0); +$-password-input-error-info-color: var(--wot-password-input-error-info-color, $-color-danger); +$-password-input-dot-size: var(--wot-password-input-dot-size, 10px); +$-password-input-dot-color: var(--wot-password-input-dot-color, $-color-gray-8); +$-password-input-text-color: var(--wot-password-input-text-color, $-color-gray-8); +$-password-input-cursor-color: var(--wot-password-input-cursor-color, $-color-gray-8); +$-password-input-cursor-width: var(--wot-password-input-cursor-width, 1px); +$-password-input-cursor-height: var(--wot-password-input-cursor-height, 40%); +$-password-input-cursor-duration: var(--wot-password-input-cursor-duration, 1s); + +/* form-item */ +$-form-item-error-message-color: var(--wot-form-item-error-message-color, $-color-danger) !default; +$-form-item-error-message-font-size: var(--wot-form-item-error-message-font-size, $-fs-secondary) !default; +$-form-item-error-message-line-height: var(--wot-form-item-error-message-line-height, 24px) !default; + +/* backtop */ +$-backtop-bg: var(--wot-backtop-bg, #e1e1e1) !default; +$-backtop-icon-size: var(--wot-backtop-icon-size, 20px) !default; + +/* index-bar */ +$-index-bar-index-font-size: var(--wot-index-bar-index-font-size, $-fs-aid) !default; + +/* text */ +$-text-info-color: var(--wot-text-info-color, $-color-info) !default; +$-text-primary-color: var(--wot-text-primary-color, $-color-theme) !default; +$-text-error-color: var(--wot-text-error-color, $-color-danger) !default; +$-text-warning-color: var(--wot-text-warning-color, $-color-warning) !default; +$-text-success-color: var(--wot-text-success-color, $-color-success) !default; + +/* video-preview */ +$-video-preview-bg: var(--wot-video-preview-bg, rgba(0, 0, 0, 0.8)) !default; // 背景色 +$-video-preview-close-color: var(--wot-video-preview-close-color, #fff) !default; // 图标颜色 +$-video-preview-close-font-size: var(--wot-video-preview-close-font-size, 20px) !default; // 图标大小 + +/* img-cropper */ +$-img-cropper-icon-size: var(--wot-img-cropper-icon-size, $-fs-big) !default; // 图标大小 +$-img-cropper-icon-color: var(--wot-img-cropper-icon-color, #fff) !default; // 图标颜色 + +/* floating-panel */ +$-floating-panel-bg: var(--wot-floating-panel-bg, $-color-white) !default; // 背景色 +$-floating-panel-radius: var(--wot-floating-panel-radius, 16px) !default; // 圆角 +$-floating-panel-z-index: var(--wot-floating-panel-z-index, 99) !default; // 层级 +$-floating-panel-header-height: var(--wot-floating-panel-header-height, 30px) !default; // 头部高度 +$-floating-panel-bar-width: var(--wot-floating-panel-bar-width, 20px) !default; // bar 宽度 +$-floating-panel-bar-height: var(--wot-floating-panel-bar-height, 3px) !default; // bar 高度 +$-floating-panel-bar-bg: var(--wot-floating-panel-bar-bg, $-color-gray-5) !default; // bar 背景色 +$-floating-panel-bar-radius: var(--wot-floating-panel-bar-radius, 4px) !default; // bar 圆角 +$-floating-panel-content-bg: var(--wot-floating-panel-content-bg, $-color-white) !default; // 内容背景色 + +/* signature */ +$-signature-bg: var(--wot-signature-bg, $-color-white) !default; // 背景色 +$-signature-radius: var(--wot-signature-radius, 4px) !default; // 圆角 +$-signature-border: var(--wot-signature-border, 1px solid $-color-gray-5) !default; // 边框圆角 +$-signature-footer-margin-top: var(--wot-signature-footer-margin-top, 8px) !default; // 底部按钮上边距 +$-signature-button-margin-left: var(--wot-signature-button-margin-left, 8px) !default; // 底部按钮左边距 + + + diff --git a/uni_modules/wot-design-uni/components/common/base64.ts b/uni_modules/wot-design-uni/components/common/base64.ts new file mode 100644 index 0000000..65aa2e8 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/base64.ts @@ -0,0 +1,29 @@ +const _b64chars: string[] = [...'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'] +const _mkUriSafe = (src: string): string => src.replace(/[+/]/g, (m0: string) => (m0 === '+' ? '-' : '_')).replace(/=+\$/m, '') +const fromUint8Array = (src: Uint8Array, rfc4648 = false): string => { + let b64 = '' + for (let i = 0, l = src.length; i < l; i += 3) { + const [a0, a1, a2] = [src[i], src[i + 1], src[i + 2]] + const ord = (a0 << 16) | (a1 << 8) | a2 + b64 += _b64chars[ord >>> 18] + b64 += _b64chars[(ord >>> 12) & 63] + b64 += typeof a1 !== 'undefined' ? _b64chars[(ord >>> 6) & 63] : '=' + b64 += typeof a2 !== 'undefined' ? _b64chars[ord & 63] : '=' + } + return rfc4648 ? _mkUriSafe(b64) : b64 +} +const _btoa: (s: string) => string = + typeof btoa === 'function' + ? (s: string) => btoa(s) + : (s: string) => { + if (s.charCodeAt(0) > 255) { + throw new RangeError('The string contains invalid characters.') + } + return fromUint8Array(Uint8Array.from(s, (c: string) => c.charCodeAt(0))) + } +const utob = (src: string): string => unescape(encodeURIComponent(src)) + +export default function encode(src: string, rfc4648 = false): string { + const b64 = _btoa(utob(src)) + return rfc4648 ? _mkUriSafe(b64) : b64 +} diff --git a/uni_modules/wot-design-uni/components/common/canvasHelper.ts b/uni_modules/wot-design-uni/components/common/canvasHelper.ts new file mode 100644 index 0000000..ee17e14 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/canvasHelper.ts @@ -0,0 +1,49 @@ +/** + * 适配 canvas 2d 上下文 + * @param ctx canvas 2d 上下文 + * @returns + */ +export function canvas2dAdapter(ctx: CanvasRenderingContext2D): UniApp.CanvasContext { + return Object.assign(ctx, { + setFillStyle(color: string | CanvasGradient) { + ctx.fillStyle = color + }, + setStrokeStyle(color: string | CanvasGradient | CanvasPattern) { + ctx.strokeStyle = color + }, + setLineWidth(lineWidth: number) { + ctx.lineWidth = lineWidth + }, + setLineCap(lineCap: 'butt' | 'round' | 'square') { + ctx.lineCap = lineCap + }, + + setFontSize(font: string) { + ctx.font = font + }, + setGlobalAlpha(alpha: number) { + ctx.globalAlpha = alpha + }, + setLineJoin(lineJoin: 'bevel' | 'round' | 'miter') { + ctx.lineJoin = lineJoin + }, + setTextAlign(align: 'left' | 'center' | 'right') { + ctx.textAlign = align + }, + setMiterLimit(miterLimit: number) { + ctx.miterLimit = miterLimit + }, + setShadow(offsetX: number, offsetY: number, blur: number, color: string) { + ctx.shadowOffsetX = offsetX + ctx.shadowOffsetY = offsetY + ctx.shadowBlur = blur + ctx.shadowColor = color + }, + setTextBaseline(textBaseline: 'top' | 'bottom' | 'middle') { + ctx.textBaseline = textBaseline + }, + createCircularGradient() {}, + draw() {}, + addColorStop() {} + }) as unknown as UniApp.CanvasContext +} diff --git a/uni_modules/wot-design-uni/components/common/clickoutside.ts b/uni_modules/wot-design-uni/components/common/clickoutside.ts new file mode 100644 index 0000000..0800afd --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/clickoutside.ts @@ -0,0 +1,34 @@ +/* + * @Author: weisheng + * @Date: 2023-07-02 22:51:06 + * @LastEditTime: 2024-03-16 19:59:07 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/common/clickoutside.ts + * 记得注释 + */ +let queue: any[] = [] + +export function pushToQueue(comp: any) { + queue.push(comp) +} + +export function removeFromQueue(comp: any) { + queue = queue.filter((item) => { + return item.$.uid !== comp.$.uid + }) +} + +export function closeOther(comp: any) { + queue.forEach((item) => { + if (item.$.uid !== comp.$.uid) { + item.$.exposed.close() + } + }) +} + +export function closeOutside() { + queue.forEach((item) => { + item.$.exposed.close() + }) +} diff --git a/uni_modules/wot-design-uni/components/common/event.ts b/uni_modules/wot-design-uni/components/common/event.ts new file mode 100644 index 0000000..44a00e4 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/event.ts @@ -0,0 +1,8 @@ +export const UPDATE_MODEL_EVENT = 'update:modelValue' +export const CHANGE_EVENT = 'change' +export const INPUT_EVENT = 'input' +export const CLICK_EVENT = 'click' +export const CLOSE_EVENT = 'close' +export const OPEN_EVENT = 'open' +export const CONFIRM_EVENT = 'confirm' +export const CANCEL_EVENT = 'cancel' diff --git a/uni_modules/wot-design-uni/components/common/interceptor.ts b/uni_modules/wot-design-uni/components/common/interceptor.ts new file mode 100644 index 0000000..d573491 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/interceptor.ts @@ -0,0 +1,43 @@ +import { isPromise } from './util' + +function noop() {} + +export type Interceptor = (...args: any[]) => Promise | boolean | undefined | void + +export function callInterceptor( + interceptor: Interceptor | undefined, + { + args = [], + done, + canceled, + error + }: { + args?: unknown[] + done: () => void + canceled?: () => void + error?: () => void + } +) { + if (interceptor) { + // eslint-disable-next-line prefer-spread + const returnVal = interceptor.apply(null, args) + + if (isPromise(returnVal)) { + returnVal + .then((value) => { + if (value) { + done() + } else if (canceled) { + canceled() + } + }) + .catch(error || noop) + } else if (returnVal) { + done() + } else if (canceled) { + canceled() + } + } else { + done() + } +} diff --git a/uni_modules/wot-design-uni/components/common/props.ts b/uni_modules/wot-design-uni/components/common/props.ts new file mode 100644 index 0000000..ebb9dc0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/props.ts @@ -0,0 +1,51 @@ +import type { PropType } from 'vue' + +export const unknownProp = null as unknown as PropType + +export const numericProp = [Number, String] + +export const truthProp = { + type: Boolean, + default: true as const +} + +export const makeRequiredProp = (type: T) => ({ + type, + required: true as const +}) + +export const makeArrayProp = () => ({ + type: Array as PropType, + default: () => [] +}) + +export const makeBooleanProp = (defaultVal: T) => ({ + type: Boolean, + default: defaultVal +}) + +export const makeNumberProp = (defaultVal: T) => ({ + type: Number, + default: defaultVal +}) + +export const makeNumericProp = (defaultVal: T) => ({ + type: numericProp, + default: defaultVal +}) + +export const makeStringProp = (defaultVal: T) => ({ + type: String as unknown as PropType, + default: defaultVal +}) + +export const baseProps = { + /** + * 自定义根节点样式 + */ + customStyle: makeStringProp(''), + /** + * 自定义根节点样式类 + */ + customClass: makeStringProp('') +} diff --git a/uni_modules/wot-design-uni/components/common/util.ts b/uni_modules/wot-design-uni/components/common/util.ts new file mode 100644 index 0000000..7f2819e --- /dev/null +++ b/uni_modules/wot-design-uni/components/common/util.ts @@ -0,0 +1,778 @@ +import { AbortablePromise } from './AbortablePromise' + +type NotUndefined = T extends undefined ? never : T + +/** + * 生成uuid + * @returns string + */ +export function uuid() { + return s4() + s4() + s4() + s4() + s4() + s4() + s4() + s4() +} + +function s4() { + return Math.floor((1 + Math.random()) * 0x10000) + .toString(16) + .substring(1) +} + +/** + * @description 对num自动填充px + * @param {Number} num + * @return {string} num+px + */ +export function addUnit(num: number | string) { + return Number.isNaN(Number(num)) ? `${num}` : `${num}px` +} + +/** + * @description 判断target是否对象 + * @param value + * @return {boolean} + */ +export function isObj(value: any): value is object { + return Object.prototype.toString.call(value) === '[object Object]' || typeof value === 'object' +} + +/** + * 获取目标原始类型 + * @param target 任意类型 + * @returns {string} type 数据类型 + */ +export function getType(target: unknown): string { + // 得到原生类型 + const typeStr = Object.prototype.toString.call(target) + // 拿到类型值 + const match = typeStr.match(/\[object (\w+)\]/) + const type = match && match.length ? match[1].toLowerCase() : '' + // 类型值转小写并返回 + return type +} + +/** + * @description 默认的外部格式化函数 - picker 组件 + * @param items - 要格式化的数据项数组或单个数据项 + * @param kv - 配置对象,包含 labelKey 作为键值 + * @returns 格式化后的字符串 + */ +export const defaultDisplayFormat = function (items: any[] | Record, kv?: { labelKey?: string }): string { + const labelKey: string = kv?.labelKey || 'value' + + if (Array.isArray(items)) { + return items.map((item) => item[labelKey]).join(', ') + } else { + return items[labelKey] + } +} + +/** + * @description 默认函数占位符 - pickerView组件 + * @param value 值 + * @return value + */ +export const defaultFunction = (value: T): T => value + +/** + * @description 检查值是否不为空 + * @param value 值 + * @return {Boolean} 是否不为空 + */ +export const isDef = (value: T): value is NonNullable => value !== undefined && value !== null + +/** + * @description 防止数字小于零 + * @param {number} num + * @param {string} label 标签 + */ +export const checkNumRange = (num: number, label: string = 'value'): void => { + if (num < 0) { + throw new Error(`${label} shouldn't be less than zero`) + } +} + +/** + * @description 防止 pixel 无意义 + * @param {number} num + * @param {string} label 标签 + */ +export const checkPixelRange = (num: number, label: string = 'value'): void => { + if (num <= 0) { + throw new Error(`${label} should be greater than zero`) + } +} + +/** + * 将 RGB 值转换为十六进制颜色代码。 + * @param {number} r - 红色分量 (0-255)。 + * @param {number} g - 绿色分量 (0-255)。 + * @param {number} b - 蓝色分量 (0-255)。 + * @returns {string} 十六进制颜色代码 (#RRGGBB)。 + */ +export function rgbToHex(r: number, g: number, b: number): string { + // 将 RGB 分量组合成一个十六进制数。 + const hex = ((r << 16) | (g << 8) | b).toString(16) + + // 使用零填充十六进制数,确保它有 6 位数字(RGB 范围)。 + const paddedHex = '#' + '0'.repeat(Math.max(0, 6 - hex.length)) + hex + + return paddedHex +} + +/** + * 将十六进制颜色代码转换为 RGB 颜色数组。 + * @param hex 十六进制颜色代码(例如:'#RRGGBB') + * @returns 包含红、绿、蓝三个颜色分量的数组 + */ +export function hexToRgb(hex: string): number[] { + const rgb: number[] = [] + + // 从第一个字符开始,每两个字符代表一个颜色分量 + for (let i = 1; i < 7; i += 2) { + // 将两个字符的十六进制转换为十进制,并添加到 rgb 数组中 + rgb.push(parseInt('0x' + hex.slice(i, i + 2), 16)) + } + + return rgb +} + +/** + * 计算渐变色的中间变量数组。 + * @param {string} startColor 开始颜色 + * @param {string} endColor 结束颜色 + * @param {number} step 获取渲染位置,默认为中间位置 + * @returns {string[]} 渐变色中间颜色变量数组 + */ +export const gradient = (startColor: string, endColor: string, step: number = 2): string[] => { + // 将hex转换为rgb + const sColor: number[] = hexToRgb(startColor) + const eColor: number[] = hexToRgb(endColor) + + // 计算R\G\B每一步的差值 + const rStep: number = (eColor[0] - sColor[0]) / step + const gStep: number = (eColor[1] - sColor[1]) / step + const bStep: number = (eColor[2] - sColor[2]) / step + + const gradientColorArr: string[] = [] + for (let i = 0; i < step; i++) { + // 计算每一步的hex值 + gradientColorArr.push( + rgbToHex(parseInt(String(rStep * i + sColor[0])), parseInt(String(gStep * i + sColor[1])), parseInt(String(bStep * i + sColor[2]))) + ) + } + return gradientColorArr +} + +/** + * 确保数值不超出指定范围。 + * @param {number} num 要限制范围的数值 + * @param {number} min 最小范围 + * @param {number} max 最大范围 + * @returns {number} 在指定范围内的数值 + */ +export const range = (num: number, min: number, max: number): number => { + // 使用 Math.min 和 Math.max 保证 num 不会超出指定范围 + return Math.min(Math.max(num, min), max) +} + +/** + * 比较两个值是否相等。 + * @param {any} value1 第一个值 + * @param {any} value2 第二个值 + * @returns {boolean} 如果值相等则为 true,否则为 false + */ +export const isEqual = (value1: any, value2: any): boolean => { + // 使用严格相等运算符比较值是否相等 + if (value1 === value2) { + return true + } + + // 如果其中一个值不是数组,则认为值不相等 + if (!Array.isArray(value1) || !Array.isArray(value2)) { + return false + } + + // 如果数组长度不相等,则认为值不相等 + if (value1.length !== value2.length) { + return false + } + + // 逐个比较数组元素是否相等 + for (let i = 0; i < value1.length; ++i) { + if (value1[i] !== value2[i]) { + return false + } + } + + // 所有比较均通过,则认为值相等 + return true +} + +/** + * 在数字前补零,使其达到指定长度。 + * @param {number | string} number 要补零的数字 + * @param {number} length 目标长度,默认为 2 + * @returns {string} 补零后的结果 + */ +export const padZero = (number: number | string, length: number = 2): string => { + // 将输入转换为字符串 + let numStr: string = number.toString() + + // 在数字前补零,直到达到指定长度 + while (numStr.length < length) { + numStr = '0' + numStr + } + + return numStr +} + +/** @description 全局变量id */ +export const context = { + id: 1000 +} + +export type RectResultType = T extends true ? UniApp.NodeInfo[] : UniApp.NodeInfo + +/** + * 获取节点信息 + * @param selector 节点选择器 #id,.class + * @param all 是否返回所有 selector 对应的节点 + * @param scope 作用域(支付宝小程序无效) + * @param useFields 是否使用 fields 方法获取节点信息 + * @returns 节点信息或节点信息数组 + */ +export function getRect(selector: string, all: T, scope?: any, useFields?: boolean): Promise> { + return new Promise>((resolve, reject) => { + let query: UniNamespace.SelectorQuery | null = null + if (scope) { + query = uni.createSelectorQuery().in(scope) + } else { + query = uni.createSelectorQuery() + } + + const method = all ? 'selectAll' : 'select' + + const callback = (rect: UniApp.NodeInfo | UniApp.NodeInfo[]) => { + if (all && isArray(rect) && rect.length > 0) { + resolve(rect as RectResultType) + } else if (!all && rect) { + resolve(rect as RectResultType) + } else { + reject(new Error('No nodes found')) + } + } + + if (useFields) { + query[method](selector).fields({ size: true, node: true }, callback).exec() + } else { + query[method](selector).boundingClientRect(callback).exec() + } + }) +} + +/** + * 将驼峰命名转换为短横线命名。 + * @param {string} word 待转换的词条 + * @returns {string} 转换后的结果 + */ +export function kebabCase(word: string): string { + // 使用正则表达式匹配所有大写字母,并在前面加上短横线,然后转换为小写 + const newWord: string = word + .replace(/[A-Z]/g, function (match) { + return '-' + match + }) + .toLowerCase() + + return newWord +} + +/** + * 将短横线链接转换为驼峰命名 + * @param word 需要转换的短横线链接 + * @returns 转换后的驼峰命名字符串 + */ +export function camelCase(word: string): string { + return word.replace(/-(\w)/g, (_, c) => c.toUpperCase()) +} + +/** + * 检查给定值是否为数组。 + * @param {any} value 要检查的值 + * @returns {boolean} 如果是数组则返回 true,否则返回 false + */ +export function isArray(value: any): value is Array { + // 如果 Array.isArray 函数可用,直接使用该函数检查 + if (typeof Array.isArray === 'function') { + return Array.isArray(value) + } + // 否则,使用对象原型的 toString 方法进行检查 + return Object.prototype.toString.call(value) === '[object Array]' +} + +/** + * 检查给定值是否为函数。 + * @param {any} value 要检查的值 + * @returns {boolean} 如果是函数则返回 true,否则返回 false + */ +// eslint-disable-next-line @typescript-eslint/ban-types +export function isFunction(value: any): value is T { + return getType(value) === 'function' || getType(value) === 'asyncfunction' +} + +/** + * 检查给定值是否为字符串。 + * @param {unknown} value 要检查的值 + * @returns {value is string} 如果是字符串则返回 true,否则返回 false + */ +export function isString(value: unknown): value is string { + return getType(value) === 'string' +} + +/** + * 否是数值 + * @param {*} value + */ +export function isNumber(value: any): value is number { + return getType(value) === 'number' +} + +/** + * 检查给定值是否为 Promise 对象。 + * @param {unknown} value 要检查的值 + * @returns {value is Promise} 如果是 Promise 对象则返回 true,否则返回 false + */ +export function isPromise(value: unknown): value is Promise { + // 先将 value 断言为 object 类型 + if (isObj(value) && isDef(value)) { + // 然后进一步检查 value 是否具有 then 和 catch 方法,并且它们是函数类型 + return isFunction((value as Promise).then) && isFunction((value as Promise).catch) + } + return false // 如果 value 不是对象类型,则肯定不是 Promise +} + +/** + * 检查给定的值是否为布尔类型 + * @param value 要检查的值 + * @returns 如果值为布尔类型,则返回true,否则返回false + */ +export function isBoolean(value: any): value is boolean { + return typeof value === 'boolean' +} + +export function isUndefined(value: any): value is undefined { + return typeof value === 'undefined' +} + +export function isNotUndefined(value: T): value is NotUndefined { + return !isUndefined(value) +} + +/** + * 检查给定的值是否为奇数 + * @param value 要检查的值 + * @returns + */ +export function isOdd(value: number): boolean { + if (typeof value !== 'number') { + throw new Error('输入必须为数字') + } + + // 使用取模运算符来判断是否为奇数 + // 如果 number 除以 2 的余数为 1,就是奇数 + // 否则是偶数 + return value % 2 === 1 +} + +/** + * 是否为base64图片 + * @param {string} url + * @return + */ +export function isBase64Image(url: string) { + // 使用正则表达式检查URL是否以"data:image"开头,这是Base64图片的常见前缀 + return /^data:image\/(png|jpg|jpeg|gif|bmp);base64,/.test(url) +} + +/** + * 将外部传入的样式格式化为可读的 CSS 样式。 + * @param {object | object[]} styles 外部传入的样式对象或数组 + * @returns {string} 格式化后的 CSS 样式字符串 + */ +export function objToStyle(styles: Record | Record[]): string { + // 如果 styles 是数组类型 + if (isArray(styles)) { + // 使用过滤函数去除空值和 null 值的元素 + // 对每个非空元素递归调用 objToStyle,然后通过分号连接 + const result = styles + .filter(function (item) { + return item != null && item !== '' + }) + .map(function (item) { + return objToStyle(item) + }) + .join(';') + + // 如果结果不为空,确保末尾有分号 + return result ? (result.endsWith(';') ? result : result + ';') : '' + } + + if (isString(styles)) { + // 如果是字符串且不为空,确保末尾有分号 + return styles ? (styles.endsWith(';') ? styles : styles + ';') : '' + } + + // 如果 styles 是对象类型 + if (isObj(styles)) { + // 使用 Object.keys 获取所有属性名 + // 使用过滤函数去除值为 null 或空字符串的属性 + // 对每个属性名和属性值进行格式化,通过分号连接 + const result = Object.keys(styles) + .filter(function (key) { + return styles[key] != null && styles[key] !== '' + }) + .map(function (key) { + // 使用 kebabCase 函数将属性名转换为 kebab-case 格式 + // 将属性名和属性值格式化为 CSS 样式的键值对 + return [kebabCase(key), styles[key]].join(':') + }) + .join(';') + + // 如果结果不为空,确保末尾有分号 + return result ? (result.endsWith(';') ? result : result + ';') : '' + } + // 如果 styles 不是对象也不是数组,则直接返回 + return '' +} + +/** + * 判断一个对象是否包含任何字段 + * @param obj 要检查的对象 + * @returns {boolean} 如果对象为空(不包含任何字段)则返回 true,否则返回 false + */ +export function hasFields(obj: unknown): boolean { + // 如果不是对象类型或为 null,则认为没有字段 + if (!isObj(obj) || obj === null) { + return false + } + + // 使用 Object.keys 检查对象是否有属性 + return Object.keys(obj).length > 0 +} + +/** + * 判断一个对象是否为空对象(不包含任何字段) + * @param obj 要检查的对象 + * @returns {boolean} 如果对象为空(不包含任何字段)则返回 true,否则返回 false + */ +export function isEmptyObj(obj: unknown): boolean { + return !hasFields(obj) +} + +export const requestAnimationFrame = (cb = () => {}) => { + return new AbortablePromise((resolve) => { + const timer = setInterval(() => { + clearInterval(timer) + resolve(true) + cb() + }, 1000 / 30) + }) +} + +/** + * 暂停指定时间函数 + * @param ms 延迟时间 + * @returns + */ +export const pause = (ms: number = 1000 / 30) => { + return new AbortablePromise((resolve) => { + const timer = setTimeout(() => { + clearTimeout(timer) + resolve(true) + }, ms) + }) +} + +/** + * 深拷贝函数,用于将对象进行完整复制。 + * @param obj 要深拷贝的对象 + * @param cache 用于缓存已复制的对象,防止循环引用 + * @returns 深拷贝后的对象副本 + */ +export function deepClone(obj: T, cache: Map = new Map()): T { + // 如果对象为 null 或或者不是对象类型,则直接返回该对象 + if (obj === null || typeof obj !== 'object') { + return obj + } + + // 处理特殊对象类型:日期、正则表达式、错误对象 + if (isDate(obj)) { + return new Date(obj.getTime()) as any + } + if (obj instanceof RegExp) { + return new RegExp(obj.source, obj.flags) as any + } + if (obj instanceof Error) { + const errorCopy = new Error(obj.message) as any + errorCopy.stack = obj.stack + return errorCopy + } + + // 检查缓存中是否已存在该对象的复制 + if (cache.has(obj)) { + return cache.get(obj) + } + + // 根据原始对象的类型创建对应的空对象或数组 + const copy: any = Array.isArray(obj) ? [] : {} + + // 将当前对象添加到缓存中 + cache.set(obj, copy) + + // 递归地深拷贝对象的每个属性 + for (const key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + copy[key] = deepClone(obj[key], cache) + } + } + + return copy as T +} + +/** + * 深度合并两个对象。 + * @param target 目标对象,将合并的结果存放在此对象中 + * @param source 源对象,要合并到目标对象的对象 + * @returns 合并后的目标对象 + */ +export function deepMerge>(target: T, source: Record): T { + // 深拷贝目标对象,避免修改原始对象 + target = deepClone(target) + + // 检查目标和源是否都是对象类型 + if (typeof target !== 'object' || typeof source !== 'object') { + throw new Error('Both target and source must be objects.') + } + + // 遍历源对象的属性 + for (const prop in source) { + // eslint-disable-next-line no-prototype-builtins + if (!source.hasOwnProperty(prop)) + continue + // 使用类型断言,告诉 TypeScript 这是有效的属性 + ;(target as Record)[prop] = source[prop] + } + + return target +} + +/** + * 深度合并两个对象。 + * @param target + * @param source + * @returns + */ +export function deepAssign(target: Record, source: Record): Record { + Object.keys(source).forEach((key) => { + const targetValue = target[key] + const newObjValue = source[key] + if (isObj(targetValue) && isObj(newObjValue)) { + deepAssign(targetValue, newObjValue) + } else { + target[key] = newObjValue + } + }) + return target +} + +/** + * 构建带参数的URL + * @param baseUrl 基础URL + * @param params 参数对象,键值对表示要添加到URL的参数 + * @returns 返回带有参数的URL + */ +export function buildUrlWithParams(baseUrl: string, params: Record) { + // 将参数对象转换为查询字符串 + const queryString = Object.entries(params) + .map(([key, value]) => `${key}=${encodeURIComponent(value)}`) + .join('&') + + // 检查基础URL是否已包含查询字符串,并选择适当的分隔符 + const separator = baseUrl.includes('?') ? '&' : '?' + + // 返回带有参数的URL + return `${baseUrl}${separator}${queryString}` +} + +type DebounceOptions = { + leading?: boolean // 是否在延迟时间开始时调用函数 + trailing?: boolean // 是否在延迟时间结束时调用函数 +} + +export function debounce any>(func: T, wait: number, options: DebounceOptions = {}): T { + let timeoutId: ReturnType | null = null + let lastArgs: any[] | undefined + let lastThis: any + let result: ReturnType | undefined + const leading = isDef(options.leading) ? options.leading : false + const trailing = isDef(options.trailing) ? options.trailing : true + + function invokeFunc() { + if (lastArgs !== undefined) { + result = func.apply(lastThis, lastArgs) + lastArgs = undefined + } + } + + function startTimer() { + timeoutId = setTimeout(() => { + timeoutId = null + if (trailing) { + invokeFunc() + } + }, wait) + } + + function cancelTimer() { + if (timeoutId !== null) { + clearTimeout(timeoutId) + timeoutId = null + } + } + + function debounced(this: any, ...args: Parameters): ReturnType | undefined { + lastArgs = args + lastThis = this + + if (timeoutId === null) { + if (leading) { + invokeFunc() + } + startTimer() + } else if (trailing) { + cancelTimer() + startTimer() + } + + return result + } + + return debounced as T +} + +// eslint-disable-next-line @typescript-eslint/ban-types +export function throttle(func: Function, wait: number): Function { + let timeout: ReturnType | null = null + let previous: number = 0 + + const throttled = function (this: any, ...args: any[]) { + const now = Date.now() + const remaining = wait - (now - previous) + + if (remaining <= 0) { + if (timeout) { + clearTimeout(timeout) + timeout = null + } + previous = now + func.apply(this, args) + } else if (!timeout) { + timeout = setTimeout(() => { + previous = Date.now() + timeout = null + func.apply(this, args) + }, remaining) + } + } + + return throttled +} + +/** + * 根据属性路径获取对象中的属性值 + * @param obj 目标对象 + * @param path 属性路径,可以是字符串或字符串数组 + * @returns 属性值,如果属性不存在或中间的属性为 null 或 undefined,则返回 undefined + */ +export const getPropByPath = (obj: any, path: string): any => { + const keys: string[] = path.split('.') + + try { + return keys.reduce((acc: any, key: string) => (acc !== undefined && acc !== null ? acc[key] : undefined), obj) + } catch (error) { + return undefined + } +} + +/** + * 检查一个值是否为Date类型 + * @param val 要检查的值 + * @returns 如果值是Date类型,则返回true,否则返回false + */ +export const isDate = (val: unknown): val is Date => Object.prototype.toString.call(val) === '[object Date]' && !Number.isNaN((val as Date).getTime()) + +/** + * 检查提供的URL是否为视频链接。 + * @param url 需要检查的URL字符串。 + * @returns 返回一个布尔值,如果URL是视频链接则为true,否则为false。 + */ +export function isVideoUrl(url: string): boolean { + // 使用正则表达式匹配视频文件类型的URL + const videoRegex = /\.(ogm|webm|ogv|asx|m4v|mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv|video)(?=$|[?#])/i + return videoRegex.test(url) +} + +/** + * 检查提供的URL是否为图片URL。 + * @param url 待检查的URL字符串。 + * @returns 返回一个布尔值,如果URL是图片格式,则为true;否则为false。 + */ +export function isImageUrl(url: string): boolean { + // 使用正则表达式匹配图片URL + const imageRegex = /\.(xbm|tif|pjp|apng|svgz|jpeg|jpg|heif|ico|tiff|heic|pjpeg|avif|gif|png|svg|webp|jfif|bmp|dpg|image)(?=$|[?#])/i + return imageRegex.test(url) +} + +/** + * 判断环境是否是H5 + */ +export const isH5 = (() => { + let isH5 = false + // #ifdef H5 + isH5 = true + // #endif + return isH5 +})() + +/** + * 剔除对象中的某些属性 + * @param obj + * @param predicate + * @returns + */ +export function omitBy>(obj: O, predicate: (value: any, key: keyof O) => boolean): Partial { + const newObj = deepClone(obj) + Object.keys(newObj).forEach((key) => predicate(newObj[key], key) && delete newObj[key]) // 遍历对象的键,删除值为不满足predicate的字段 + return newObj +} + +/** + * 缓动函数,用于在动画或过渡效果中根据时间参数计算当前值 + * @param t 当前时间,通常是从动画开始经过的时间 + * @param b 初始值,动画属性的初始值 + * @param c 变化量,动画属性的目标值与初始值的差值 + * @param d 持续时间,动画持续的总时间长度 + * @returns 计算出的当前值 + */ +export function easingFn(t: number = 0, b: number = 0, c: number = 0, d: number = 0): number { + return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b +} + +/** + * 从数组中寻找最接近目标值的元素 + * + * @param arr 数组 + * @param target 目标值 + * @returns 最接近目标值的元素 + */ +export function closest(arr: number[], target: number) { + return arr.reduce((prev, curr) => (Math.abs(curr - target) < Math.abs(prev - target) ? curr : prev)) +} diff --git a/uni_modules/wot-design-uni/components/composables/index.ts b/uni_modules/wot-design-uni/components/composables/index.ts new file mode 100644 index 0000000..a483a46 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/index.ts @@ -0,0 +1,11 @@ +export { useCell } from './useCell' +export { useChildren, flattenVNodes, sortChildren } from './useChildren' +export { useCountDown } from './useCountDown' +export { useLockScroll } from './useLockScroll' +export { useParent } from './useParent' +export { usePopover } from './usePopover' +export { useQueue } from './useQueue' +export { useRaf } from './useRaf' +export { useTouch } from './useTouch' +export { useTranslate } from './useTranslate' +export { useUpload } from './useUpload' diff --git a/uni_modules/wot-design-uni/components/composables/useCell.ts b/uni_modules/wot-design-uni/components/composables/useCell.ts new file mode 100644 index 0000000..d245312 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useCell.ts @@ -0,0 +1,13 @@ +import { computed } from 'vue' +import { useParent } from './useParent' +import { CELL_GROUP_KEY } from '../wd-cell-group/types' + +export function useCell() { + const { parent: cellGroup, index } = useParent(CELL_GROUP_KEY) + + const border = computed(() => { + return cellGroup && cellGroup.props.border && index.value + }) + + return { border } +} diff --git a/uni_modules/wot-design-uni/components/composables/useChildren.ts b/uni_modules/wot-design-uni/components/composables/useChildren.ts new file mode 100644 index 0000000..b52ac9b --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useChildren.ts @@ -0,0 +1,113 @@ +import { + provide, + reactive, + getCurrentInstance, + type VNode, + type InjectionKey, + type VNodeNormalizedChildren, + type ComponentPublicInstance, + type ComponentInternalInstance +} from 'vue' + +// 小程序端不支持从vue导出的isVNode方法,参考uni-mp-vue的实现 +function isVNode(value: any): value is VNode { + return value ? value.__v_isVNode === true : false +} + +export function flattenVNodes(children: VNodeNormalizedChildren) { + const result: VNode[] = [] + + const traverse = (children: VNodeNormalizedChildren) => { + if (Array.isArray(children)) { + children.forEach((child) => { + if (isVNode(child)) { + result.push(child) + + if (child.component?.subTree) { + result.push(child.component.subTree) + traverse(child.component.subTree.children) + } + + if (child.children) { + traverse(child.children) + } + } + }) + } + } + + traverse(children) + + return result +} + +const findVNodeIndex = (vnodes: VNode[], vnode: VNode) => { + const index = vnodes.indexOf(vnode) + if (index === -1) { + return vnodes.findIndex((item) => vnode.key !== undefined && vnode.key !== null && item.type === vnode.type && item.key === vnode.key) + } + return index +} + +// sort children instances by vnodes order +export function sortChildren( + parent: ComponentInternalInstance, + publicChildren: ComponentPublicInstance[], + internalChildren: ComponentInternalInstance[] +) { + const vnodes = parent && parent.subTree && parent.subTree.children ? flattenVNodes(parent.subTree.children) : [] + + internalChildren.sort((a, b) => findVNodeIndex(vnodes, a.vnode) - findVNodeIndex(vnodes, b.vnode)) + + const orderedPublicChildren = internalChildren.map((item) => item.proxy!) + + publicChildren.sort((a, b) => { + const indexA = orderedPublicChildren.indexOf(a) + const indexB = orderedPublicChildren.indexOf(b) + return indexA - indexB + }) +} + +export function useChildren< + // eslint-disable-next-line + Child extends ComponentPublicInstance = ComponentPublicInstance<{}, any>, + ProvideValue = never +>(key: InjectionKey) { + const publicChildren: Child[] = reactive([]) + const internalChildren: ComponentInternalInstance[] = reactive([]) + const parent = getCurrentInstance()! + + const linkChildren = (value?: ProvideValue) => { + const link = (child: ComponentInternalInstance) => { + if (child.proxy) { + internalChildren.push(child) + publicChildren.push(child.proxy as Child) + sortChildren(parent, publicChildren, internalChildren) + } + } + + const unlink = (child: ComponentInternalInstance) => { + const index = internalChildren.indexOf(child) + publicChildren.splice(index, 1) + internalChildren.splice(index, 1) + } + + provide( + key, + Object.assign( + { + link, + unlink, + children: publicChildren, + internalChildren + }, + value + ) + ) + } + + return { + children: publicChildren, + linkChildren + } +} diff --git a/uni_modules/wot-design-uni/components/composables/useCountDown.ts b/uni_modules/wot-design-uni/components/composables/useCountDown.ts new file mode 100644 index 0000000..50746e4 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useCountDown.ts @@ -0,0 +1,138 @@ +import { ref, computed, onBeforeUnmount } from 'vue' +import { isDef } from '../common/util' +import { useRaf } from './useRaf' + +// 定义倒计时时间的数据结构 +export type CurrentTime = { + days: number + hours: number + total: number + minutes: number + seconds: number + milliseconds: number +} + +// 定义倒计时的配置项 +export type UseCountDownOptions = { + time: number // 倒计时总时间,单位为毫秒 + millisecond?: boolean // 是否开启毫秒级倒计时,默认为 false + onChange?: (current: CurrentTime) => void // 倒计时每次变化时的回调函数 + onFinish?: () => void // 倒计时结束时的回调函数 +} + +// 定义常量 +const SECOND = 1000 +const MINUTE = 60 * SECOND +const HOUR = 60 * MINUTE +const DAY = 24 * HOUR + +// 将时间转换为倒计时数据结构 +function parseTime(time: number): CurrentTime { + const days = Math.floor(time / DAY) + const hours = Math.floor((time % DAY) / HOUR) + const minutes = Math.floor((time % HOUR) / MINUTE) + const seconds = Math.floor((time % MINUTE) / SECOND) + const milliseconds = Math.floor(time % SECOND) + + return { + total: time, + days, + hours, + minutes, + seconds, + milliseconds + } +} + +// 判断两个时间是否在同一秒内 +function isSameSecond(time1: number, time2: number): boolean { + return Math.floor(time1 / 1000) === Math.floor(time2 / 1000) +} + +// 定义 useCountDown 函数 +export function useCountDown(options: UseCountDownOptions) { + let endTime: number // 结束时间 + let counting: boolean // 是否计时中 + + const { start: startRaf, cancel: cancelRaf } = useRaf(tick) + + const remain = ref(options.time) // 剩余时间 + const current = computed(() => parseTime(remain.value)) // 当前倒计时数据 + + // 暂停倒计时 + const pause = () => { + counting = false + cancelRaf() + } + + // 获取当前剩余时间 + const getCurrentRemain = () => Math.max(endTime - Date.now(), 0) + + // 设置剩余时间 + const setRemain = (value: number) => { + remain.value = value + isDef(options.onChange) && options.onChange(current.value) + if (value === 0) { + pause() + isDef(options.onFinish) && options.onFinish() + } + } + + // 每毫秒更新一次倒计时 + const microTick = () => { + if (counting) { + setRemain(getCurrentRemain()) + if (remain.value > 0) { + startRaf() + } + } + } + + // 每秒更新一次倒计时 + const macroTick = () => { + if (counting) { + const remainRemain = getCurrentRemain() + if (!isSameSecond(remainRemain, remain.value) || remainRemain === 0) { + setRemain(remainRemain) + } + + if (remain.value > 0) { + startRaf() + } + } + } + + // 根据配置项选择更新方式 + function tick() { + if (options.millisecond) { + microTick() + } else { + macroTick() + } + } + + // 开始倒计时 + const start = () => { + if (!counting) { + endTime = Date.now() + remain.value + counting = true + startRaf() + } + } + + // 重置倒计时 + const reset = (totalTime: number = options.time) => { + pause() + remain.value = totalTime + } + + // 在组件卸载前暂停倒计时 + onBeforeUnmount(pause) + + return { + start, + pause, + reset, + current + } +} diff --git a/uni_modules/wot-design-uni/components/composables/useLockScroll.ts b/uni_modules/wot-design-uni/components/composables/useLockScroll.ts new file mode 100644 index 0000000..89b3203 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useLockScroll.ts @@ -0,0 +1,37 @@ +import { onBeforeUnmount, onDeactivated, ref, watch } from 'vue' + +export function useLockScroll(shouldLock: () => boolean) { + const scrollLockCount = ref(0) + + const lock = () => { + if (scrollLockCount.value === 0) { + document.getElementsByTagName('body')[0].style.overflow = 'hidden' + } + scrollLockCount.value++ + } + + const unlock = () => { + if (scrollLockCount.value > 0) { + scrollLockCount.value-- + if (scrollLockCount.value === 0) { + document.getElementsByTagName('body')[0].style.overflow = '' + } + } + } + + const destroy = () => { + shouldLock() && unlock() + } + + watch(shouldLock, (value) => { + value ? lock() : unlock() + }) + + onDeactivated(destroy) + onBeforeUnmount(destroy) + + return { + lock, + unlock + } +} diff --git a/uni_modules/wot-design-uni/components/composables/useParent.ts b/uni_modules/wot-design-uni/components/composables/useParent.ts new file mode 100644 index 0000000..f48fea9 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useParent.ts @@ -0,0 +1,41 @@ +import { + ref, + inject, + computed, + onUnmounted, + type InjectionKey, + getCurrentInstance, + type ComponentPublicInstance, + type ComponentInternalInstance +} from 'vue' + +type ParentProvide = T & { + link(child: ComponentInternalInstance): void + unlink(child: ComponentInternalInstance): void + children: ComponentPublicInstance[] + internalChildren: ComponentInternalInstance[] +} + +export function useParent(key: InjectionKey>) { + const parent = inject(key, null) + + if (parent) { + const instance = getCurrentInstance()! + const { link, unlink, internalChildren } = parent + + link(instance) + onUnmounted(() => unlink(instance)) + + const index = computed(() => internalChildren.indexOf(instance)) + + return { + parent, + index + } + } + + return { + parent: null, + index: ref(-1) + } +} diff --git a/uni_modules/wot-design-uni/components/composables/usePopover.ts b/uni_modules/wot-design-uni/components/composables/usePopover.ts new file mode 100644 index 0000000..1c61641 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/usePopover.ts @@ -0,0 +1,176 @@ +import { getCurrentInstance, ref } from 'vue' +import { getRect, isObj } from '../common/util' + +export function usePopover(visibleArrow = true) { + const { proxy } = getCurrentInstance() as any + const popStyle = ref('') + const arrowStyle = ref('') + const showStyle = ref('') + const arrowClass = ref('') + const popWidth = ref(0) + const popHeight = ref(0) + const left = ref(0) + const bottom = ref(0) + const width = ref(0) + const height = ref(0) + const top = ref(0) + + function noop() {} + + function init( + placement: + | 'top' + | 'top-start' + | 'top-end' + | 'bottom' + | 'bottom-start' + | 'bottom-end' + | 'left' + | 'left-start' + | 'left-end' + | 'right' + | 'right-start' + | 'right-end', + visibleArrow: boolean, + selector: string + ) { + // 初始化 class + if (visibleArrow) { + const arrowClassArr = [ + `wd-${selector}__arrow`, + placement === 'bottom' || placement === 'bottom-start' || placement === 'bottom-end' ? `wd-${selector}__arrow-up` : '', + placement === 'left' || placement === 'left-start' || placement === 'left-end' ? `wd-${selector}__arrow-right` : '', + placement === 'right' || placement === 'right-start' || placement === 'right-end' ? `wd-${selector}__arrow-left` : '', + placement === 'top' || placement === 'top-start' || placement === 'top-end' ? `wd-${selector}__arrow-down` : '' + ] + arrowClass.value = arrowClassArr.join(' ') + } + + // 初始化数据获取 + getRect('#target', false, proxy).then((rect) => { + if (!rect) return + left.value = rect.left as number + bottom.value = rect.bottom as number + width.value = rect.width as number + height.value = rect.height as number + top.value = rect.top as number + }) + // 用透明度可在初始化时获取到pop尺寸 + getRect('#pos', false, proxy).then((rect) => { + if (!rect) return + popWidth.value = rect.width as number + popHeight.value = rect.height as number + }) + } + + function control( + placement: + | 'top' + | 'top-start' + | 'top-end' + | 'bottom' + | 'bottom-start' + | 'bottom-end' + | 'left' + | 'left-start' + | 'left-end' + | 'right' + | 'right-start' + | 'right-end', + offset: number | number[] | Record<'x' | 'y', number> + ) { + // arrow size + const arrowSize = visibleArrow ? 9 : 0 + // 上下位(纵轴)对应的距离左边的距离 + const verticalX = width.value / 2 + // 上下位(纵轴)对应的距离底部的距离 + const verticalY = arrowSize + height.value + 5 + // 左右位(横轴)对应的距离左边的距离 + const horizontalX = width.value + arrowSize + 5 + // 左右位(横轴)对应的距离底部的距离 + const horizontalY = height.value / 2 + + let offsetX = 0 + let offsetY = 0 + if (Array.isArray(offset)) { + offsetX = (verticalX - 17 > 0 ? 0 : verticalX - 25) + offset[0] + offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + (offset[1] ? offset[1] : offset[0]) + } else if (isObj(offset)) { + offsetX = (verticalX - 17 > 0 ? 0 : verticalX - 25) + offset.x + offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + offset.y + } else { + offsetX = (verticalX - 17 > 0 ? 0 : verticalX - 25) + offset + offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + offset + } + // const offsetX = (verticalX - 17 > 0 ? 0 : verticalX - 25) + offset + // const offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + offset + + const placements = new Map([ + // 上 + ['top', [`left: ${verticalX}px; bottom: ${verticalY}px; transform: translateX(-50%);`, 'left: 50%;']], + [ + 'top-start', + [ + `left: ${offsetX}px; bottom: ${verticalY}px;`, + `left: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value - 25) - offsetX}px;` + ] + ], + [ + 'top-end', + [ + `right: ${offsetX}px; bottom: ${verticalY}px;`, + `right: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value - 25) - offsetX}px; transform: translateX(50%);` + ] + ], + // 下 + ['bottom', [`left: ${verticalX}px; top: ${verticalY}px; transform: translateX(-50%);`, 'left: 50%;']], + [ + 'bottom-start', + [`left: ${offsetX}px; top: ${verticalY}px;`, `left: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value - 25) - offsetX}px;`] + ], + [ + 'bottom-end', + [ + `right: ${offsetX}px; top: ${verticalY}px;`, + `right: ${(popWidth.value >= width.value ? width.value / 2 : popWidth.value - 25) - offsetX}px; transform: translateX(50%);` + ] + ], + // 左 + ['left', [`right: ${horizontalX}px; top: ${horizontalY}px; transform: translateY(-50%);`, 'top: 50%']], + [ + 'left-start', + [ + `right: ${horizontalX}px; top: ${offsetY}px;`, + `top: ${(popHeight.value >= height.value ? height.value / 2 : popHeight.value - 20) - offsetY}px;` + ] + ], + [ + 'left-end', + [ + `right: ${horizontalX}px; bottom: ${offsetY}px;`, + `bottom: ${(popHeight.value >= height.value ? height.value / 2 : popHeight.value - 20) - offsetY}px; transform: translateY(50%);` + ] + ], + // 右 + ['right', [`left: ${horizontalX}px; top: ${horizontalY}px; transform: translateY(-50%);`, 'top: 50%']], + [ + 'right-start', + [ + `left: ${horizontalX}px; top: ${offsetY}px;`, + `top: ${(popHeight.value >= height.value ? height.value / 2 : popHeight.value - 20) - offsetY}px;` + ] + ], + [ + 'right-end', + [ + `left: ${horizontalX}px; bottom: ${offsetY}px;`, + `bottom: ${(popHeight.value >= height.value ? height.value / 2 : popHeight.value - 20) - offsetY}px; transform: translateY(50%);` + ] + ] + ]) + popStyle.value = placements.get(placement)![0] + arrowStyle.value = placements.get(placement)![1] + } + + return { popStyle, arrowStyle, showStyle, arrowClass, init, control, noop } +} diff --git a/uni_modules/wot-design-uni/components/composables/useQueue.ts b/uni_modules/wot-design-uni/components/composables/useQueue.ts new file mode 100644 index 0000000..80021b3 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useQueue.ts @@ -0,0 +1,52 @@ +import { type Ref, provide, ref } from 'vue' + +export const queueKey = '__QUEUE_KEY__' + +export interface Queue { + queue: Ref + pushToQueue: (comp: any) => void + removeFromQueue: (comp: any) => void + closeOther: (comp: any) => void + closeOutside: () => void +} + +export function useQueue() { + const queue = ref([]) + + function pushToQueue(comp: any) { + queue.value.push(comp) + } + + function removeFromQueue(comp: any) { + queue.value = queue.value.filter((item) => { + return item.$.uid !== comp.$.uid + }) + } + + function closeOther(comp: any) { + queue.value.forEach((item) => { + if (item.$.uid !== comp.$.uid) { + item.$.exposed.close() + } + }) + } + + function closeOutside() { + queue.value.forEach((item) => { + item.$.exposed.close() + }) + } + + provide(queueKey, { + queue, + pushToQueue, + removeFromQueue, + closeOther, + closeOutside + }) + + return { + closeOther, + closeOutside + } +} diff --git a/uni_modules/wot-design-uni/components/composables/useRaf.ts b/uni_modules/wot-design-uni/components/composables/useRaf.ts new file mode 100644 index 0000000..b52c4d8 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useRaf.ts @@ -0,0 +1,37 @@ +import { ref, onUnmounted } from 'vue' +import { isDef, isH5, isNumber } from '../common/util' + +// 定义回调函数类型 +type RafCallback = (time: number) => void + +export function useRaf(callback: RafCallback) { + const requestRef = ref>(null) + + // 启动动画帧 + const start = () => { + const handle = (time: number) => { + callback(time) + } + + if (isH5) { + requestRef.value = requestAnimationFrame(handle) + } else { + requestRef.value = setTimeout(() => handle(Date.now()), 1000 / 30) + } + } + + // 取消动画帧 + const cancel = () => { + if (isH5 && isNumber(requestRef.value)) { + cancelAnimationFrame(requestRef.value!) + } else if (isDef(requestRef.value)) { + clearTimeout(requestRef.value) + } + } + + onUnmounted(() => { + cancel() + }) + + return { start, cancel } +} diff --git a/uni_modules/wot-design-uni/components/composables/useTouch.ts b/uni_modules/wot-design-uni/components/composables/useTouch.ts new file mode 100644 index 0000000..c3e9b37 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useTouch.ts @@ -0,0 +1,43 @@ +import { ref } from 'vue' + +export function useTouch() { + const direction = ref('') + const deltaX = ref(0) + const deltaY = ref(0) + const offsetX = ref(0) + const offsetY = ref(0) + const startX = ref(0) + const startY = ref(0) + + function touchStart(event: any) { + const touch = event.touches[0] + direction.value = '' + deltaX.value = 0 + deltaY.value = 0 + offsetX.value = 0 + offsetY.value = 0 + startX.value = touch.clientX + startY.value = touch.clientY + } + + function touchMove(event: any) { + const touch = event.touches[0] + deltaX.value = touch.clientX - startX.value + deltaY.value = touch.clientY - startY.value + offsetX.value = Math.abs(deltaX.value) + offsetY.value = Math.abs(deltaY.value) + direction.value = offsetX.value > offsetY.value ? 'horizontal' : offsetX.value < offsetY.value ? 'vertical' : '' + } + + return { + touchStart, + touchMove, + direction, + deltaX, + deltaY, + offsetX, + offsetY, + startX, + startY + } +} diff --git a/uni_modules/wot-design-uni/components/composables/useTranslate.ts b/uni_modules/wot-design-uni/components/composables/useTranslate.ts new file mode 100644 index 0000000..79aa795 --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useTranslate.ts @@ -0,0 +1,12 @@ +import { camelCase, getPropByPath, isDef, isFunction } from '../common/util' +import Locale from '../../locale' + +export const useTranslate = (name?: string) => { + const prefix = name ? camelCase(name) + '.' : '' + const translate = (key: string, ...args: unknown[]) => { + const currentMessages = Locale.messages() + const message = getPropByPath(currentMessages, prefix + key) + return isFunction(message) ? message(...args) : isDef(message) ? message : `${prefix}${key}` + } + return { translate } +} diff --git a/uni_modules/wot-design-uni/components/composables/useUpload.ts b/uni_modules/wot-design-uni/components/composables/useUpload.ts new file mode 100644 index 0000000..87cf54b --- /dev/null +++ b/uni_modules/wot-design-uni/components/composables/useUpload.ts @@ -0,0 +1,364 @@ +import { isArray, isDef, isFunction } from '../common/util' +import type { ChooseFile, ChooseFileOption, UploadFileItem, UploadMethod, UploadStatusType } from '../wd-upload/types' + +export const UPLOAD_STATUS: Record = { + PENDING: 'pending', + LOADING: 'loading', + SUCCESS: 'success', + FAIL: 'fail' +} + +export interface UseUploadReturn { + // 开始上传文件 + startUpload: (file: UploadFileItem, options: UseUploadOptions) => UniApp.UploadTask | void | Promise + // 中断上传 + abort: (task?: UniApp.UploadTask) => void + // 上传状态常量 + UPLOAD_STATUS: Record + // 选择文件 + chooseFile: (options: ChooseFileOption) => Promise +} + +export interface UseUploadOptions { + // 上传地址 + action: string + // 请求头 + header?: Record + // 文件对应的 key + name?: string + // 其它表单数据 + formData?: Record + // 文件类型 仅支付宝支持且在支付宝平台必填 + fileType?: 'image' | 'video' | 'audio' + // 成功状态码 + statusCode?: number + // 文件状态的key + statusKey?: string + // 自定义上传方法 + uploadMethod?: UploadMethod + // 上传成功回调 + onSuccess?: (res: UniApp.UploadFileSuccessCallbackResult, file: UploadFileItem, formData: Record) => void + // 上传失败回调 + onError?: (res: UniApp.GeneralCallbackResult, file: UploadFileItem, formData: Record) => void + // 上传进度回调 + onProgress?: (res: UniApp.OnProgressUpdateResult, file: UploadFileItem) => void + // 是否自动中断之前的上传任务 + abortPrevious?: boolean + // 根据文件拓展名过滤(H5支持全部类型过滤,微信小程序支持all和file时过滤,其余平台不支持) + extension?: string[] +} + +export function useUpload(): UseUploadReturn { + let currentTask: UniApp.UploadTask | null = null + + // 中断上传 + const abort = (task?: UniApp.UploadTask) => { + if (task) { + task.abort() + } else if (currentTask) { + currentTask.abort() + currentTask = null + } + } + + /** + * 默认上传方法 + */ + const defaultUpload: UploadMethod = (file, formData, options) => { + // 如果配置了自动中断,则中断之前的上传任务 + if (options.abortPrevious) { + abort() + } + + const uploadTask = uni.uploadFile({ + url: options.action, + header: options.header, + name: options.name, + fileName: options.name, + fileType: options.fileType, + formData, + filePath: file.url, + success(res) { + if (res.statusCode === options.statusCode) { + // 上传成功 + options.onSuccess(res, file, formData) + } else { + // 上传失败 + options.onError({ ...res, errMsg: res.errMsg || '' }, file, formData) + } + }, + fail(err) { + // 上传失败 + options.onError(err, file, formData) + } + }) + + currentTask = uploadTask + + // 获取当前文件加载的百分比 + uploadTask.onProgressUpdate((res) => { + options.onProgress(res, file) + }) + + // 返回上传任务实例,让外部可以控制上传过程 + return uploadTask + } + + /** + * 开始上传文件 + */ + const startUpload = (file: UploadFileItem, options: UseUploadOptions) => { + const { + uploadMethod, + formData = {}, + action, + name = 'file', + header = {}, + fileType = 'image', + statusCode = 200, + statusKey = 'status', + abortPrevious = false + } = options + + // 设置上传中状态 + file[statusKey] = UPLOAD_STATUS.LOADING + + const uploadOptions = { + action, + header, + name, + fileName: name, + fileType, + statusCode, + abortPrevious, + onSuccess: (res: UniApp.UploadFileSuccessCallbackResult, file: UploadFileItem, formData: Record) => { + // 更新文件状态 + file[statusKey] = UPLOAD_STATUS.SUCCESS + currentTask = null + options.onSuccess?.(res, file, formData) + }, + onError: (error: UniApp.GeneralCallbackResult, file: UploadFileItem, formData: Record) => { + // 更新文件状态和错误信息 + file[statusKey] = UPLOAD_STATUS.FAIL + file.error = error.errMsg + currentTask = null + options.onError?.(error, file, formData) + }, + onProgress: (res: UniApp.OnProgressUpdateResult, file: UploadFileItem) => { + // 更新上传进度 + file.percent = res.progress + options.onProgress?.(res, file) + } + } + + // 返回上传任务实例,支持外部获取uploadTask进行操作 + if (isFunction(uploadMethod)) { + return uploadMethod(file, formData, uploadOptions) + } else { + return defaultUpload(file, formData, uploadOptions) + } + } + + /** + * 格式化图片信息 + */ + function formatImage(res: UniApp.ChooseImageSuccessCallbackResult): ChooseFile[] { + // #ifdef MP-DINGTALK + // 钉钉文件在files中 + res.tempFiles = isDef((res as any).files) ? (res as any).files : res.tempFiles + // #endif + if (isArray(res.tempFiles)) { + return res.tempFiles.map((item: any) => ({ + path: item.path || '', + name: item.name || '', + size: item.size, + type: 'image', + thumb: item.path || '' + })) + } + return [ + { + path: (res.tempFiles as any).path || '', + name: (res.tempFiles as any).name || '', + size: (res.tempFiles as any).size, + type: 'image', + thumb: (res.tempFiles as any).path || '' + } + ] + } + + /** + * 格式化视频信息 + */ + function formatVideo(res: UniApp.ChooseVideoSuccess): ChooseFile[] { + return [ + { + path: res.tempFilePath || (res as any).filePath || '', + name: res.name || '', + size: res.size, + type: 'video', + thumb: (res as any).thumbTempFilePath || '', + duration: res.duration + } + ] + } + + /** + * 格式化媒体信息 + */ + function formatMedia(res: UniApp.ChooseMediaSuccessCallbackResult): ChooseFile[] { + return res.tempFiles.map((item) => ({ + type: item.fileType, + path: item.tempFilePath, + thumb: item.fileType === 'video' ? item.thumbTempFilePath : item.tempFilePath, + size: item.size, + duration: item.duration + })) + } + + /** + * 选择文件 + */ + function chooseFile({ + multiple, + sizeType, + sourceType, + maxCount, + accept, + compressed, + maxDuration, + camera, + extension + }: ChooseFileOption): Promise { + return new Promise((resolve, reject) => { + switch (accept) { + case 'image': + // #ifdef MP-WEIXIN + uni.chooseMedia({ + count: multiple ? maxCount : 1, + mediaType: ['image'], + sourceType, + sizeType, + camera, + success: (res) => resolve(formatMedia(res)), + fail: reject + }) + // #endif + // #ifndef MP-WEIXIN + uni.chooseImage({ + count: multiple ? maxCount : 1, + sizeType, + sourceType, + // #ifdef H5 + extension, + // #endif + success: (res) => resolve(formatImage(res)), + fail: reject + }) + // #endif + break + case 'video': + // #ifdef MP-WEIXIN + uni.chooseMedia({ + count: multiple ? maxCount : 1, + mediaType: ['video'], + sourceType, + camera, + maxDuration, + success: (res) => resolve(formatMedia(res)), + fail: reject + }) + // #endif + // #ifndef MP-WEIXIN + uni.chooseVideo({ + sourceType, + compressed, + maxDuration, + camera, + // #ifdef H5 + extension, + // #endif + success: (res) => resolve(formatVideo(res)), + fail: reject + }) + // #endif + break + // #ifdef MP-WEIXIN + case 'media': + uni.chooseMedia({ + count: multiple ? maxCount : 1, + sourceType, + sizeType, + camera, + maxDuration, + success: (res) => resolve(formatMedia(res)), + fail: reject + }) + break + case 'file': + uni.chooseMessageFile({ + count: multiple ? (isDef(maxCount) ? maxCount : 100) : 1, + type: accept, + extension, + success: (res) => resolve(res.tempFiles), + fail: reject + }) + break + // #endif + case 'all': + // #ifdef H5 + uni.chooseFile({ + count: multiple ? maxCount : 1, + type: accept, + extension, + success: (res) => resolve(res.tempFiles as ChooseFile[]), + fail: reject + }) + // #endif + // #ifdef MP-WEIXIN + uni.chooseMessageFile({ + count: multiple ? Number(maxCount) : 1, + type: accept, + extension, + success: (res) => resolve(res.tempFiles), + fail: reject + }) + // #endif + + break + default: + // #ifdef MP-WEIXIN + uni.chooseMedia({ + count: multiple ? maxCount : 1, + mediaType: ['image'], + sourceType, + sizeType, + camera, + success: (res) => resolve(formatMedia(res)), + fail: reject + }) + // #endif + // #ifndef MP-WEIXIN + uni.chooseImage({ + count: multiple ? maxCount : 1, + sizeType, + sourceType, + // #ifdef H5 + extension, + // #endif + success: (res) => resolve(formatImage(res)), + fail: reject + }) + // #endif + break + } + }) + } + + return { + startUpload, + abort, + UPLOAD_STATUS, + chooseFile + } +} diff --git a/uni_modules/wot-design-uni/components/wd-action-sheet/index.scss b/uni_modules/wot-design-uni/components/wd-action-sheet/index.scss new file mode 100644 index 0000000..8831de3 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-action-sheet/index.scss @@ -0,0 +1,204 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(action-sheet) { + background-color: $-dark-background2; + color: $-dark-color; + + @include e(action) { + color: $-dark-color; + background: $-dark-background2; + + &:not(.wd-action-sheet__action--disabled):not(.wd-action-sheet__action--loading):active { + background: $-dark-background4; + } + + @include m(disabled) { + color: $-dark-color-gray; + } + } + + @include e(subname) { + color: $-dark-color3; + } + + @include e(cancel) { + color: $-dark-color; + background: $-dark-background4; + + &:active { + background: $-dark-background5; + } + } + + :deep(.wd-action-sheet__close) { + color: $-dark-color3; + } + + @include e(panel-title) { + color: $-dark-color; + } + + @include e(header) { + color: $-dark-color; + } + } +} + +:deep(.wd-action-sheet__popup) { + border-radius: $-action-sheet-radius $-action-sheet-radius 0 0; +} + +@include b(action-sheet) { + background-color: $-color-white; + padding-bottom: 1px; + + @include edeep(popup) { + border-radius: $-action-sheet-radius $-action-sheet-radius 0 0; + } + + @include e(actions) { + padding: 8px 0; + max-height: 50vh; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + } + + @include e(action) { + position: relative; + display: block; + width: 100%; + height: $-action-sheet-action-height; + line-height: $-action-sheet-action-height; + color: $-action-sheet-color; + font-size: $-action-sheet-fs; + text-align: center; + border: none; + background: $-action-sheet-bg; + outline: none; + + &:after { + display: none; + } + + &:not(&--disabled):not(&--loading):active { + background: $-action-sheet-active-color; + } + + @include m(disabled) { + color: $-action-sheet-disabled-color; + cursor: not-allowed; + } + + @include m(loading) { + display: flex; + align-items: center; + justify-content: center; + line-height: initial; + } + } + + @include edeep(action-loading){ + width: $-action-sheet-loading-size; + height: $-action-sheet-loading-size; + } + + @include e(name) { + display: inline-block; + } + + @include e(subname) { + display: inline-block; + margin-left: 4px; + font-size: $-action-sheet-subname-fs; + color: $-action-sheet-subname-color; + } + + @include e(cancel) { + display: block; + width: calc(100% - 48px); + line-height: $-action-sheet-cancel-height; + padding: 0; + color: $-action-sheet-cancel-color; + font-size: $-action-sheet-fs; + text-align: center; + border-radius: $-action-sheet-cancel-radius; + border: none; + background: $-action-sheet-cancel-bg; + outline: none; + margin: 0 auto 24px; + font-weight: $-action-sheet-weight; + + &:active { + background: $-action-sheet-active-color; + } + + &:after { + display: none; + } + } + + @include e(header) { + color: $-action-sheet-color; + position: relative; + height: $-action-sheet-title-height; + line-height: $-action-sheet-title-height; + text-align: center; + font-size: $-action-sheet-title-fs; + font-weight: $-action-sheet-weight; + } + + @include edeep(close) { + position: absolute; + top: $-action-sheet-close-top; + right: $-action-sheet-close-right; + color: $-action-sheet-close-color; + font-size: $-action-sheet-close-fs; + transform: rotate(-45deg); + line-height: 1.1; + } + + @include e(panels) { + height: 84px; + overflow-y: hidden; + + &:first-of-type { + margin-top: 20px; + } + + &:last-of-type { + margin-bottom: 12px; + } + } + + @include e(panels-content) { + display: flex; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } + + @include e(panel) { + width: 88px; + flex: 0 0 auto; + display: inline-block; + padding: $-action-sheet-panel-padding; + } + + @include e(panel-img) { + display: block; + width: $-action-sheet-panel-img-fs; + height: $-action-sheet-panel-img-fs; + margin: 0 auto; + margin-bottom: 7px; + border-radius: $-action-sheet-panel-img-radius; + } + + @include e(panel-title) { + font-size: $-action-sheet-subname-fs; + line-height: 1.2; + text-align: center; + color: $-action-sheet-color; + @include lineEllipsis; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-action-sheet/types.ts b/uni_modules/wot-design-uni/components/wd-action-sheet/types.ts new file mode 100644 index 0000000..b2086a7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-action-sheet/types.ts @@ -0,0 +1,118 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props' + +export type Action = { + /** + * 选项名称 + */ + name: string + /** + * 描述信息 + */ + subname?: string + /** + * 颜色 + */ + color?: string + /** + * 禁用 + */ + disabled?: boolean + /** + * 加载中状态 + */ + loading?: boolean +} + +export type Panel = { + /** + * 图片地址 + */ + iconUrl: string + /** + * 标题内容 + */ + title: string +} + +export const actionSheetProps = { + ...baseProps, + /** + * header 头部样式 + * @default '' + * @type {string} + */ + customHeaderClass: makeStringProp(''), + /** + * 设置菜单显示隐藏 + * @default false + * @type {boolean} + */ + modelValue: { ...makeBooleanProp(false), ...makeRequiredProp(Boolean) }, + /** + * 菜单选项 + * @default [] + * @type {Action[]} + */ + actions: makeArrayProp(), + /** + * 自定义面板项,可以为字符串数组,也可以为对象数组,如果为二维数组,则为多行展示 + * @default [] + * @type {Array} + */ + panels: makeArrayProp(), + /** + * 标题 + * @type {string} + */ + title: String, + /** + * 取消按钮文案 + * @type {string} + */ + cancelText: String, + /** + * 点击选项后是否关闭菜单 + * @default true + * @type {boolean} + */ + closeOnClickAction: makeBooleanProp(true), + /** + * 点击遮罩是否关闭 + * @default true + * @type {boolean} + */ + closeOnClickModal: makeBooleanProp(true), + /** + * 弹框动画持续时间 + * @default 200 + * @type {number} + */ + duration: makeNumberProp(200), + /** + * 菜单层级 + * @default 10 + * @type {number} + */ + zIndex: makeNumberProp(10), + /** + * 弹层内容懒渲染,触发展示时才渲染内容 + * @default true + * @type {boolean} + */ + lazyRender: makeBooleanProp(true), + /** + * 弹出面板是否设置底部安全距离(iphone X 类型的机型) + * @default true + * @type {boolean} + */ + safeAreaInsetBottom: makeBooleanProp(true), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + * 类型:boolean + * 默认值:false + */ + rootPortal: makeBooleanProp(false) +} + +export type ActionSheetProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue b/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue new file mode 100644 index 0000000..111e04e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue @@ -0,0 +1,155 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-backtop/index.scss b/uni_modules/wot-design-uni/components/wd-backtop/index.scss new file mode 100644 index 0000000..a9dc001 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-backtop/index.scss @@ -0,0 +1,25 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(backtop) { + position: fixed; + background-color: $-backtop-bg; + width: 40px; + height: 40px; + display: flex; + justify-content: center; + align-items: center; + color: $-color-gray-8; + + @include edeep(backicon) { + font-size: $-backtop-icon-size; + } + + @include when(circle) { + border-radius: 50%; + } + + @include when(square) { + border-radius: 4px; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-backtop/types.ts b/uni_modules/wot-design-uni/components/wd-backtop/types.ts new file mode 100644 index 0000000..209c67a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-backtop/types.ts @@ -0,0 +1,37 @@ +import { baseProps, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props' + +export const backtopProps = { + ...baseProps, + /** + * 页面滚动距离 + */ + scrollTop: makeRequiredProp(Number), + /** + * 距离顶部多少距离时显示 + */ + top: makeNumberProp(300), + /** + * 返回顶部滚动时间 + */ + duration: makeNumberProp(100), + /** + * 层级 + */ + zIndex: makeNumberProp(10), + /** + * icon样式 + */ + iconStyle: makeStringProp(''), + /** + * 形状 + */ + shape: makeStringProp('circle'), + /** + * 距离屏幕底部距离 + */ + bottom: makeNumberProp(100), + /** + * 距离屏幕右边距离 + */ + right: makeNumberProp(20) +} diff --git a/uni_modules/wot-design-uni/components/wd-backtop/wd-backtop.vue b/uni_modules/wot-design-uni/components/wd-backtop/wd-backtop.vue new file mode 100644 index 0000000..12df252 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-backtop/wd-backtop.vue @@ -0,0 +1,45 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-badge/index.scss b/uni_modules/wot-design-uni/components/wd-badge/index.scss new file mode 100644 index 0000000..d75390a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-badge/index.scss @@ -0,0 +1,63 @@ +@import './../common/abstracts/_mixin.scss'; +@import './../common/abstracts/variable.scss'; + +.wot-theme-dark { + @include b(badge) { + @include e(content) { + border-color: $-dark-background2; + } + } +} + + +@include b(badge) { + position: relative; + vertical-align: middle; + display: inline-block; + + @include e(content) { + display: inline-block; + box-sizing: content-box; + height: $-badge-height; + line-height: $-badge-height; + padding: $-badge-padding; + background-color: $-badge-bg; + border-radius: calc($-badge-height / 2 + 2px); + color: $-badge-color; + font-size: $-badge-fs; + text-align: center; + white-space: nowrap; + border: $-badge-border; + font-weight: 500; + + @include when(fixed) { + position: absolute; + top: 0px; + right: 0px; + transform: translateY(-50%) translateX(50%); + } + + @include when(dot) { + height: $-badge-dot-size; + width: $-badge-dot-size; + padding: 0; + border-radius: 50%; + } + + @each $type in (primary, success, warning, info, danger) { + @include m($type) { + @if $type == primary { + background-color: $-badge-primary; + } @else if $type == success { + background-color: $-badge-success; + } @else if $type == warning { + background-color: $-badge-warning; + } @else if $type == info { + background-color: $-badge-info; + } @else { + background-color: $-badge-danger; + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-badge/types.ts b/uni_modules/wot-design-uni/components/wd-badge/types.ts new file mode 100644 index 0000000..49cffa5 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-badge/types.ts @@ -0,0 +1,50 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 11:36:12 + * @LastEditTime: 2024-11-20 20:29:03 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-badge/types.ts + * 记得注释 + */ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeStringProp, numericProp } from '../common/props' + +export type BadgeType = 'primary' | 'success' | 'warning' | 'danger' | 'info' + +export const badgeProps = { + ...baseProps, + /** + * 显示值 + */ + modelValue: numericProp, + /** 当数值为 0 时,是否展示徽标 */ + showZero: makeBooleanProp(false), + bgColor: String, + /** + * 最大值,超过最大值会显示 '{max}+',要求 value 是 Number 类型 + */ + max: Number, + /** + * 是否为红色点状标注 + */ + isDot: Boolean, + /** + * 是否隐藏 badge + */ + hidden: Boolean, + /** + * badge类型,可选值primary / success / warning / danger / info + */ + type: makeStringProp(undefined), + /** + * 为正时,角标向下偏移对应的像素 + */ + top: numericProp, + /** + * 为正时,角标向左偏移对应的像素 + */ + right: numericProp +} + +export type BadgeProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-badge/wd-badge.vue b/uni_modules/wot-design-uni/components/wd-badge/wd-badge.vue new file mode 100644 index 0000000..a47b1ac --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-badge/wd-badge.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-button/index.scss b/uni_modules/wot-design-uni/components/wd-button/index.scss new file mode 100644 index 0000000..d8ebba2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-button/index.scss @@ -0,0 +1,336 @@ +@import './../common/abstracts/_mixin.scss'; +@import './../common/abstracts/variable.scss'; + + +.wot-theme-dark { + @include b(button) { + @include when(info) { + background: $-dark-background4; + color: $-dark-color3; + } + + @include when(plain) { + background: transparent; + + @include when(info) { + color: $-dark-color; + + &::after { + border-color: $-dark-background5; + } + } + } + + @include when(text) { + @include when(disabled) { + color: $-dark-color-gray; + background: transparent; + } + } + + @include when(icon) { + color: $-dark-color; + + @include when(disabled) { + color: $-dark-color-gray; + background: transparent; + } + + } + } +} + +@include b(button) { + margin-left: initial; + margin-right: initial; + position: relative; + display: inline-block; + outline: none; + -webkit-appearance: none; + outline: none; + background: transparent; + box-sizing: border-box; + border: none; + border-radius: 0; + color: $-button-normal-color; + transition: opacity 0.2s; + user-select: none; + font-weight: normal; + + + &::before { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 100%; + background: $-color-black; + border: inherit; + border-color: $-color-black; + border-radius: inherit; + transform: translate(-50%, -50%); + opacity: 0; + content: ' '; + } + + + &::after { + border: none; + border-radius: 0; + } + + @include e(content) { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + } + + @include m(active) { + &:active::before { + opacity: 0.15; + } + } + + @include when(disabled) { + opacity: $-button-disabled-opacity; + } + + @include e(loading) { + margin-right: 5px; + animation: wd-rotate 0.8s linear infinite; + animation-duration: 2s; + } + + @include e(loading-svg) { + width: 100%; + height: 100%; + background-size: cover; + background-repeat: no-repeat; + } + + @include when(loading) {} + + @include when(primary) { + background: $-button-primary-bg-color; + color: $-button-primary-color; + } + + @include when(success) { + background: $-button-success-bg-color; + color: $-button-success-color; + } + + @include when(info) { + background: $-button-info-bg-color; + color: $-button-info-color; + } + + @include when(warning) { + background: $-button-warning-bg-color; + color: $-button-warning-color; + } + + @include when(error) { + background: $-button-error-bg-color; + color: $-button-error-color; + } + + @include when(small) { + height: $-button-small-height; + padding: $-button-small-padding; + border-radius: $-button-small-radius; + font-size: $-button-small-fs; + font-weight: normal; + + .wd-button__loading { + width: $-button-small-loading; + height: $-button-small-loading; + } + } + + @include when(medium) { + height: $-button-medium-height; + padding: $-button-medium-padding; + border-radius: $-button-medium-radius; + font-size: $-button-medium-fs; + min-width: 120px; + + + @include when(round) { + + @include when(icon) { + min-width: 0; + border-radius: 50%; + } + + @include when(text) { + border-radius: 0; + min-width: 0; + } + } + + .wd-button__loading { + width: $-button-medium-loading; + height: $-button-medium-loading; + } + } + + @include when(large) { + height: $-button-large-height; + padding: $-button-large-padding; + border-radius: $-button-large-radius; + font-size: $-button-large-fs; + + &::after { + border-radius: $-button-large-radius; + } + + .wd-button__loading { + width: $-button-large-loading; + height: $-button-large-loading; + } + } + + + @include when(round) { + border-radius: 999px; + } + + @include when(text) { + color: $-button-primary-bg-color; + min-width: 0; + padding: 4px 0; + + &::after { + display: none; + } + + &.wd-button--active { + opacity: $-button-text-hover-opacity; + + &:active::before { + display: none; + } + + } + + @include when(disabled) { + color: $-button-normal-disabled-color; + background: transparent; + } + } + + @include when(plain) { + background: $-button-plain-bg-color; + border: 1px solid currentColor; + + @include when(primary) { + color: $-button-primary-bg-color; + } + + @include when(success) { + color: $-button-success-bg-color; + } + + @include when(info) { + color: $-button-info-plain-normal-color; + border-color: $-button-info-plain-border-color; + } + + @include when(warning) { + color: $-button-warning-bg-color; + } + + @include when(error) { + color: $-button-error-bg-color; + } + } + + @include when(hairline) { + border-width: 0; + + &.is-plain { + @include halfPixelBorderSurround(); + + &::before { + border-radius: inherit; + } + + &::after { + border-color: inherit; + } + + &.is-round { + &::after { + border-radius: inherit !important; + } + } + + &.is-large { + &::after { + border-radius: calc(2 * $-button-large-radius); + } + } + + &.is-medium { + &::after { + border-radius: calc(2 * $-button-medium-radius); + } + } + + &.is-small { + &::after { + border-radius: calc(2 * $-button-small-radius); + } + } + } + } + + @include when(block) { + display: block; + } + + @include when(icon) { + width: $-button-icon-size; + height: $-button-icon-size; + padding: 0; + border-radius: 50%; + color: $-button-icon-color; + + &::after { + display: none; + } + + :deep(.wd-button__icon) { + margin-right: 0; + } + + @include when(disabled) { + color: $-button-icon-disabled-color; + background: transparent; + } + } + + @include edeep(icon) { + display: block; + margin-right: 6px; + font-size: $-button-icon-fs; + vertical-align: middle; + } + + @include e(text) { + user-select: none; + white-space: nowrap; + } +} + +@keyframes wd-rotate { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} diff --git a/uni_modules/wot-design-uni/components/wd-button/types.ts b/uni_modules/wot-design-uni/components/wd-button/types.ts new file mode 100644 index 0000000..04c85e0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-button/types.ts @@ -0,0 +1,142 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 11:36:12 + * @LastEditTime: 2024-11-04 21:33:52 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-button\types.ts + * 记得注释 + */ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeStringProp } from '../common/props' + +export type ButtonType = 'primary' | 'success' | 'info' | 'warning' | 'error' | 'default' | 'text' | 'icon' +export type ButtonSize = 'small' | 'medium' | 'large' +export type ButtonLang = 'zh_CN' | 'zh_TW' | 'en' + +export type ButtonOpenType = + | 'feedback' + | 'share' + | 'getUserInfo' + | 'contact' + | 'getPhoneNumber' + | 'getRealtimePhoneNumber' + | 'launchApp' + | 'openSetting' + | 'chooseAvatar' + | 'getAuthorize' + | 'lifestyle' + | 'contactShare' + | 'openGroupProfile' + | 'openGuildProfile' + | 'openPublicProfile' + | 'shareMessageToFriend' + | 'addFriend' + | 'addColorSign' + | 'addGroupApp' + | 'addToFavorites' + | 'chooseAddress' + | 'chooseInvoiceTitle' + | 'login' + | 'subscribe' + | 'favorite' + | 'watchLater' + | 'openProfile' + | 'agreePrivacyAuthorization' + +export type ButtonScope = 'phoneNumber' | 'userInfo' + +export const buttonProps = { + ...baseProps, + /** + * 幽灵按钮 + */ + plain: makeBooleanProp(false), + /** + * 圆角按钮 + */ + round: makeBooleanProp(true), + /** + * 禁用按钮 + */ + disabled: makeBooleanProp(false), + /** + * 是否细边框 + */ + hairline: makeBooleanProp(false), + /** + * 块状按钮 + */ + block: makeBooleanProp(false), + /** + * 按钮类型,可选值:primary / success / info / warning / error / text / icon + */ + type: makeStringProp('primary'), + /** + * 按钮尺寸,可选值:small / medium / large + */ + size: makeStringProp('medium'), + /** + * 图标类名 + */ + icon: String, + /** + * 类名前缀,用于使用自定义图标,用法参考Icon组件 + */ + classPrefix: makeStringProp('wd-icon'), + /** + * 加载中按钮 + */ + loading: makeBooleanProp(false), + /** + * 加载图标颜色 + */ + loadingColor: String, + /** + * 开放能力 + */ + openType: String as PropType, + /** + * 指定是否阻止本节点的祖先节点出现点击态 + */ + hoverStopPropagation: Boolean, + /** + * 指定返回用户信息的语言,zh_CN 简体中文,zh_TW 繁体中文,en 英文 + */ + lang: String as PropType, + /** + * 会话来源,open-type="contact"时有效 + */ + sessionFrom: String, + /** + * 会话内消息卡片标题,open-type="contact"时有效 + */ + sendMessageTitle: String, + /** + * 会话内消息卡片点击跳转小程序路径,open-type="contact"时有效 + */ + sendMessagePath: String, + /** + * 会话内消息卡片图片,open-type="contact"时有效 + */ + sendMessageImg: String, + /** + * 打开 APP 时,向 APP 传递的参数,open-type=launchApp时有效 + */ + appParameter: String, + /** + * 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息,open-type="contact"时有效 + */ + showMessageCard: Boolean, + /** + * 按钮的唯一标识,可用于设置隐私同意授权按钮的id + */ + buttonId: String, + /** + * 支付宝小程序,当 open-type 为 getAuthorize 时有效。 + * 可选值:'phoneNumber' | 'userInfo' + */ + scope: String as PropType +} + +export type ButtonProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-button/wd-button.vue b/uni_modules/wot-design-uni/components/wd-button/wd-button.vue new file mode 100644 index 0000000..9be8629 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-button/wd-button.vue @@ -0,0 +1,195 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/index.scss b/uni_modules/wot-design-uni/components/wd-calendar-view/index.scss new file mode 100644 index 0000000..abec32d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/index.scss @@ -0,0 +1,9 @@ +/* + * @Author: weisheng + * @Date: 2023-06-12 10:04:19 + * @LastEditTime: 2023-07-15 16:16:34 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-calendar-view\index.scss + * 记得注释 + */ diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/month/index.scss b/uni_modules/wot-design-uni/components/wd-calendar-view/month/index.scss new file mode 100644 index 0000000..a60250a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/month/index.scss @@ -0,0 +1,162 @@ +@import '../../common/abstracts/variable'; +@import '../../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(month) { + @include e(title) { + color: $-dark-color; + } + + @include e(days) { + color: $-dark-color; + } + + @include e(day) { + @include when(disabled) { + .wd-month__day-text { + color: $-dark-color-gray; + } + } + } + } +} + +@include b(month) { + @include e(title) { + display: flex; + align-items: center; + justify-content: center; + height: 45px; + font-size: $-calendar-panel-title-fs; + color: $-calendar-panel-title-color; + } + + @include e(days) { + display: flex; + flex-wrap: wrap; + font-size: $-calendar-day-fs; + color: $-calendar-day-color; + } + + @include e(day) { + position: relative; + width: 14.285%; + height: $-calendar-day-height; + line-height: $-calendar-day-height; + text-align: center; + margin-bottom: $-calendar-item-margin-bottom; + + @include when(disabled) { + .wd-month__day-text { + color: $-calendar-disabled-color; + } + } + + @include when(current) { + color: $-calendar-active-color; + } + + @include when(selected, multiple-selected) { + .wd-month__day-container { + border-radius: $-calendar-active-border; + background: $-calendar-active-color; + color: $-calendar-selected-color; + } + } + + @include when(middle) { + .wd-month__day-container { + background: $-calendar-range-color; + } + } + @include when(multiple-middle) { + .wd-month__day-container { + background: $-calendar-active-color; + color: $-calendar-selected-color; + } + } + + @include when(start) { + &::after { + position: absolute; + content: ''; + height: $-calendar-day-height; + top: 0; + right: 0; + left: 50%; + background: $-calendar-range-color; + z-index: 1; + } + + &.is-without-end::after { + display: none; + } + + .wd-month__day-container { + background: $-calendar-active-color; + color: $-calendar-selected-color; + border-radius: $-calendar-active-border 0 0 $-calendar-active-border; + } + } + + @include when(end) { + &::after { + position: absolute; + content: ''; + height: $-calendar-day-height; + top: 0; + left: 0; + right: 50%; + background: $-calendar-range-color; + z-index: 1; + } + + .wd-month__day-container { + background: $-calendar-active-color; + color: $-calendar-selected-color; + border-radius: 0 $-calendar-active-border $-calendar-active-border 0; + } + } + + @include when(same) { + .wd-month__day-container { + background: $-calendar-active-color; + color: $-calendar-selected-color; + border-radius: $-calendar-active-border; + } + } + + @include when(last-row){ + margin-bottom: 0; + } + } + + @include e(day-container) { + position: relative; + z-index: 2; + } + + @include e(day-text) { + font-weight: $-calendar-day-fw; + } + + @include e(day-top) { + position: absolute; + top: 10px; + left: 0; + right: 0; + line-height: 1.1; + font-size: $-calendar-info-fs; + text-align: center; + } + + @include e(day-bottom) { + position: absolute; + bottom: 10px; + left: 0; + right: 0; + line-height: 1.1; + font-size: $-calendar-info-fs; + text-align: center; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/month/month.vue b/uni_modules/wot-design-uni/components/wd-calendar-view/month/month.vue new file mode 100644 index 0000000..64442eb --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/month/month.vue @@ -0,0 +1,389 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/month/types.ts b/uni_modules/wot-design-uni/components/wd-calendar-view/month/types.ts new file mode 100644 index 0000000..f25263c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/month/types.ts @@ -0,0 +1,20 @@ +import type { PropType } from 'vue' +import { makeBooleanProp, makeRequiredProp } from '../../common/props' +import type { CalendarFormatter, CalendarType } from '../types' + +export const monthProps = { + type: makeRequiredProp(String as PropType), + date: makeRequiredProp(Number), + value: makeRequiredProp([Number, Array, null] as PropType), + minDate: makeRequiredProp(Number), + maxDate: makeRequiredProp(Number), + firstDayOfWeek: makeRequiredProp(Number), + formatter: Function as PropType, + maxRange: Number, + rangePrompt: String, + allowSameDay: makeBooleanProp(false), + defaultTime: { + type: [Array] as PropType> + }, + showTitle: makeBooleanProp(true) +} diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/index.scss b/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/index.scss new file mode 100644 index 0000000..f8b9fe5 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/index.scss @@ -0,0 +1,89 @@ +@import '../../common/abstracts/variable'; +@import '../../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(month-panel) { + @include e(title) { + color: $-dark-color; + } + + @include e(weeks) { + box-shadow: 0px 4px 8px 0 rgba(255, 255, 255, 0.02); + color: $-dark-color; + } + + @include e(time-label) { + color: $-dark-color; + &::after{ + background: $-dark-background4; + } + } + } +} + +@include b(month-panel) { + font-size: $-calendar-fs; + + @include e(title) { + padding: 5px 0; + text-align: center; + font-size: $-calendar-panel-title-fs; + color: $-calendar-panel-title-color; + padding: $-calendar-panel-padding; + } + + @include e(weeks) { + display: flex; + height: $-calendar-week-height; + line-height: $-calendar-week-height; + box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.02); + color: $-calendar-week-color; + font-size: $-calendar-week-fs; + padding: $-calendar-panel-padding; + } + + @include e(week) { + flex: 1; + text-align: center; + } + + @include e(container) { + padding: $-calendar-panel-padding; + box-sizing: border-box; + } + + @include e(time) { + display: flex; + box-shadow: 0px -4px 8px 0px rgba(0, 0, 0, 0.02); + } + + @include e(time-label) { + position: relative; + flex: 1; + font-size: $-picker-column-fs; + text-align: center; + line-height: 125px; + color: $-picker-column-color; + + &::after { + position: absolute; + content: ''; + height: 35px; + top: 50%; + left: 0; + right: 0; + transform: translateY(-50%); + background: $-picker-column-select-bg; + z-index: 0; + } + } + + @include e(time-text) { + position: relative; + z-index: 1; + } + + @include e(time-picker) { + flex: 3; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/month-panel.vue b/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/month-panel.vue new file mode 100644 index 0000000..86725c8 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/month-panel.vue @@ -0,0 +1,374 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/types.ts b/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/types.ts new file mode 100644 index 0000000..bd27a85 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/monthPanel/types.ts @@ -0,0 +1,48 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { makeBooleanProp, makeRequiredProp } from '../../common/props' +import type { CalendarFormatter, CalendarTimeFilter, CalendarType } from '../types' + +/** + * 月份信息 + */ +export interface MonthInfo { + date: number + height: number +} + +export const monthPanelProps = { + type: makeRequiredProp(String as PropType), + value: makeRequiredProp([Number, Array, null] as PropType), + minDate: makeRequiredProp(Number), + maxDate: makeRequiredProp(Number), + firstDayOfWeek: makeRequiredProp(Number), + formatter: Function as PropType, + maxRange: Number, + rangePrompt: String, + allowSameDay: makeBooleanProp(false), + showPanelTitle: makeBooleanProp(false), + defaultTime: { + type: [Array] as PropType> + }, + panelHeight: makeRequiredProp(Number), + // type 为 'datetime' 或 'datetimerange' 时有效,用于过滤时间选择器的数据 + timeFilter: Function as PropType, + hideSecond: makeBooleanProp(false), + /** + * 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。 + */ + immediateChange: makeBooleanProp(false) +} + +export type MonthPanelProps = ExtractPropTypes + +export type MonthPanelTimeType = 'start' | 'end' | '' + +export type MonthPanelExpose = { + /** + * 使当前日期或者选中日期滚动到可视区域 + */ + scrollIntoView: () => void +} + +export type MonthPanelInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/types.ts b/uni_modules/wot-design-uni/components/wd-calendar-view/types.ts new file mode 100644 index 0000000..cadbf1b --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/types.ts @@ -0,0 +1,109 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props' + +export type CalendarType = 'date' | 'dates' | 'datetime' | 'week' | 'month' | 'daterange' | 'datetimerange' | 'weekrange' | 'monthrange' + +export const calendarViewProps = { + ...baseProps, + /** + * 选中值,为 13 位时间戳或时间戳数组 + */ + modelValue: makeRequiredProp([Number, Array, null] as PropType), + /** + * 日期类型 + */ + type: makeStringProp('date'), + /** + * 最小日期,为 13 位时间戳 + */ + minDate: makeNumberProp(new Date(new Date().getFullYear(), new Date().getMonth() - 6, new Date().getDate()).getTime()), + /** + * 最大日期,为 13 位时间戳 + */ + maxDate: makeNumberProp(new Date(new Date().getFullYear(), new Date().getMonth() + 6, new Date().getDate(), 23, 59, 59).getTime()), + /** + * 周起始天 + */ + firstDayOfWeek: makeNumberProp(0), + /** + * 日期格式化函数 + */ + formatter: Function as PropType, + /** + * type 为范围选择时有效,最大日期范围 + */ + maxRange: Number, + /** + * type 为范围选择时有效,选择超出最大日期范围时的错误提示文案 + */ + rangePrompt: String, + /** + * type 为范围选择时有效,是否允许选择同一天 + */ + allowSameDay: makeBooleanProp(false), + // 是否展示面板标题,自动计算当前滚动的日期月份 + showPanelTitle: makeBooleanProp(true), + /** + * 选中日期所使用的当日内具体时刻 + */ + defaultTime: { + type: [String, Array] as PropType, + default: '00:00:00' + }, + /** + * 可滚动面板的高度 + */ + panelHeight: makeNumberProp(378), + /** + * type 为 'datetime' 或 'datetimerange' 时有效,用于过滤时间选择器的数据 + */ + timeFilter: Function as PropType, + /** + * type 为 'datetime' 或 'datetimerange' 时有效,是否不展示秒修改 + */ + hideSecond: makeBooleanProp(false), + /** + * 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。 + */ + immediateChange: makeBooleanProp(false) +} + +export type CalendarViewProps = ExtractPropTypes + +export type CalendarDayType = '' | 'start' | 'middle' | 'end' | 'selected' | 'same' | 'current' | 'multiple-middle' | 'multiple-selected' + +export type CalendarDayItem = { + date: number + text?: number | string + topInfo?: string + bottomInfo?: string + type?: CalendarDayType + disabled?: boolean + isLastRow?: boolean +} + +export type CalendarFormatter = (day: CalendarDayItem) => CalendarDayItem + +export type CalendarTimeFilterOptionType = 'hour' | 'minute' | 'second' + +export type CalendarTimeFilterOption = { + type: CalendarTimeFilterOptionType + values: CalendarItem[] +} + +export type CalendarTimeFilter = (option: CalendarTimeFilterOption) => CalendarItem[] + +export type CalendarItem = { + label: string + value: number + disabled: boolean +} + +export type CalendarViewExpose = { + /** + * 使当前日期或者选中日期滚动到可视区域 + */ + scrollIntoView: () => void +} + +export type CalendarViewInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/utils.ts b/uni_modules/wot-design-uni/components/wd-calendar-view/utils.ts new file mode 100644 index 0000000..3098e3f --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/utils.ts @@ -0,0 +1,429 @@ +import { computed } from 'vue' +import dayjs from '../../dayjs' +import { isArray, isFunction, padZero } from '../common/util' +import { useTranslate } from '../composables/useTranslate' +import type { CalendarDayType, CalendarItem, CalendarTimeFilter, CalendarType } from './types' +const { translate } = useTranslate('calendar-view') + +const weeks = computed(() => { + return [ + translate('weeks.sun'), + translate('weeks.mon'), + translate('weeks.tue'), + translate('weeks.wed'), + translate('weeks.thu'), + translate('weeks.fri'), + translate('weeks.sat') + ] +}) + +/** + * 比较两个时间的日期是否相等 + * @param {timestamp} date1 + * @param {timestamp} date2 + */ +export function compareDate(date1: number, date2: number | null) { + const dateValue1 = new Date(date1) + const dateValue2 = new Date(date2 || '') + + const year1 = dateValue1.getFullYear() + const year2 = dateValue2.getFullYear() + const month1 = dateValue1.getMonth() + const month2 = dateValue2.getMonth() + const day1 = dateValue1.getDate() + const day2 = dateValue2.getDate() + + if (year1 === year2) { + if (month1 === month2) { + return day1 === day2 ? 0 : day1 > day2 ? 1 : -1 + } + return month1 === month2 ? 0 : month1 > month2 ? 1 : -1 + } + + return year1 > year2 ? 1 : -1 +} + +/** + * 判断是否是范围选择 + * @param {string} type + */ +export function isRange(type: CalendarType) { + return type.indexOf('range') > -1 +} + +/** + * 比较两个日期的月份是否相等 + * @param {timestamp} date1 + * @param {timestamp} date2 + */ +export function compareMonth(date1: number, date2: number) { + const dateValue1 = new Date(date1) + const dateValue2 = new Date(date2) + + const year1 = dateValue1.getFullYear() + const year2 = dateValue2.getFullYear() + const month1 = dateValue1.getMonth() + const month2 = dateValue2.getMonth() + + if (year1 === year2) { + return month1 === month2 ? 0 : month1 > month2 ? 1 : -1 + } + + return year1 > year2 ? 1 : -1 +} + +/** + * 比较两个日期的年份是否一致 + * @param {timestamp} date1 + * @param {timestamp} date2 + */ +export function compareYear(date1: number, date2: number) { + const dateValue1 = new Date(date1) + const dateValue2 = new Date(date2) + + const year1 = dateValue1.getFullYear() + const year2 = dateValue2.getFullYear() + + return year1 === year2 ? 0 : year1 > year2 ? 1 : -1 +} + +/** + * 获取一个月的最后一天 + * @param {number} year + * @param {number} month + */ +export function getMonthEndDay(year: number, month: number) { + return 32 - new Date(year, month - 1, 32).getDate() +} + +/** + * 格式化年月 + * @param {timestamp} date + */ +export function formatMonthTitle(date: number) { + return dayjs(date).format(translate('monthTitle')) +} + +/** + * 根据下标获取星期 + * @param {number} index + */ +export function getWeekLabel(index: number) { + if (index >= 7) { + index = index % 7 + } + + return weeks.value[index] +} + +/** + * 格式化年份 + * @param {timestamp} date + */ +export function formatYearTitle(date: number) { + return dayjs(date).format(translate('yearTitle')) +} + +/** + * 根据最小日期和最大日期获取这之间总共有几个月份 + * @param {timestamp} minDate + * @param {timestamp} maxDate + */ +export function getMonths(minDate: number, maxDate: number) { + const months: number[] = [] + const month = new Date(minDate) + month.setDate(1) + + while (compareMonth(month.getTime(), maxDate) < 1) { + months.push(month.getTime()) + month.setMonth(month.getMonth() + 1) + } + + return months +} + +/** + * 根据最小日期和最大日期获取这之间总共有几年 + * @param {timestamp} minDate + * @param {timestamp} maxDate + */ +export function getYears(minDate: number, maxDate: number) { + const years: number[] = [] + const year = new Date(minDate) + year.setMonth(0) + year.setDate(1) + + while (compareYear(year.getTime(), maxDate) < 1) { + years.push(year.getTime()) + year.setFullYear(year.getFullYear() + 1) + } + + return years +} + +/** + * 获取一个日期所在周的第一天和最后一天 + * @param {timestamp} date + */ +export function getWeekRange(date: number, firstDayOfWeek: number) { + if (firstDayOfWeek >= 7) { + firstDayOfWeek = firstDayOfWeek % 7 + } + + const dateValue = new Date(date) + dateValue.setHours(0, 0, 0, 0) + const year = dateValue.getFullYear() + const month = dateValue.getMonth() + const day = dateValue.getDate() + const week = dateValue.getDay() + + const weekStart = new Date(year, month, day - ((7 + week - firstDayOfWeek) % 7)) + const weekEnd = new Date(year, month, day + 6 - ((7 + week - firstDayOfWeek) % 7)) + + return [weekStart.getTime(), weekEnd.getTime()] +} + +/** + * 获取日期偏移量 + * @param {timestamp} date1 + * @param {timestamp} date2 + */ +export function getDayOffset(date1: number, date2: number) { + return (date1 - date2) / (24 * 60 * 60 * 1000) + 1 +} + +/** + * 获取偏移日期 + * @param {timestamp} date + * @param {number} offset + */ +export function getDayByOffset(date: number, offset: number) { + const dateValue = new Date(date) + dateValue.setDate(dateValue.getDate() + offset) + + return dateValue.getTime() +} + +export const getPrevDay = (date: number) => getDayByOffset(date, -1) +export const getNextDay = (date: number) => getDayByOffset(date, 1) + +/** + * 获取月份偏移量 + * @param {timestamp} date1 + * @param {timestamp} date2 + */ +export function getMonthOffset(date1: number, date2: number) { + const dateValue1 = new Date(date1) + const dateValue2 = new Date(date2) + + const year1 = dateValue1.getFullYear() + const year2 = dateValue2.getFullYear() + let month1 = dateValue1.getMonth() + const month2 = dateValue2.getMonth() + + month1 = (year1 - year2) * 12 + month1 + + return month1 - month2 + 1 +} + +/** + * 获取偏移月份 + * @param {timestamp} date + * @param {number} offset + */ +export function getMonthByOffset(date: number, offset: number) { + const dateValue = new Date(date) + dateValue.setMonth(dateValue.getMonth() + offset) + + return dateValue.getTime() +} + +/** + * 获取默认时间,格式化为数组 + * @param {array|string|null} defaultTime + */ +export function getDefaultTime(defaultTime: string[] | string | null) { + if (isArray(defaultTime)) { + const startTime = (defaultTime[0] || '00:00:00').split(':').map((item: string) => { + return parseInt(item) + }) + const endTime = (defaultTime[1] || '00:00:00').split(':').map((item) => { + return parseInt(item) + }) + return [startTime, endTime] + } else { + const time = (defaultTime || '00:00:00').split(':').map((item) => { + return parseInt(item) + }) + + return [time, time] + } +} + +/** + * 根据默认时间获取日期 + * @param {timestamp} date + * @param {array} defaultTime + */ +export function getDateByDefaultTime(date: number, defaultTime: number[]) { + const dateValue = new Date(date) + dateValue.setHours(defaultTime[0]) + dateValue.setMinutes(defaultTime[1]) + dateValue.setSeconds(defaultTime[2]) + + return dateValue.getTime() +} + +/** + * 获取经过 iteratee 格式化后的长度为 n 的数组 + * @param {number} n + * @param {function} iteratee + */ +const times = (n: number, iteratee: (index: number) => CalendarItem) => { + let index: number = -1 + const result: CalendarItem[] = Array(n < 0 ? 0 : n) + while (++index < n) { + result[index] = iteratee(index) + } + return result +} + +/** + * 获取时分秒 + * @param {timestamp}} date + */ +const getTime = (date: number) => { + const dateValue = new Date(date) + return [dateValue.getHours(), dateValue.getMinutes(), dateValue.getSeconds()] +} + +/** + * 根据最小最大日期获取时间数据,用于填入picker + * @param {*} param0 + */ +export function getTimeData({ + date, + minDate, + maxDate, + isHideSecond, + filter +}: { + date: number + minDate: number + maxDate: number + isHideSecond: boolean + filter?: CalendarTimeFilter +}) { + const compareMin = compareDate(date, minDate) + const compareMax = compareDate(date, maxDate) + + let minHour = 0 + let maxHour = 23 + let minMinute = 0 + let maxMinute = 59 + let minSecond = 0 + let maxSecond = 59 + + if (compareMin === 0) { + const minTime = getTime(minDate) + const currentTime = getTime(date) + + minHour = minTime[0] + if (minTime[0] === currentTime[0]) { + minMinute = minTime[1] + + if (minTime[1] === currentTime[1]) { + minSecond = minTime[2] + } + } + } + + if (compareMax === 0) { + const maxTime = getTime(maxDate) + const currentTime = getTime(date) + + maxHour = maxTime[0] + if (maxTime[0] === currentTime[0]) { + maxMinute = maxTime[1] + + if (maxTime[1] === currentTime[1]) { + maxSecond = maxTime[2] + } + } + } + + let columns: CalendarItem[][] = [] + let hours = times(24, (index) => { + return { + label: translate('hour', padZero(index)), + value: index, + disabled: index < minHour || index > maxHour + } + }) + let minutes = times(60, (index) => { + return { + label: translate('minute', padZero(index)), + value: index, + disabled: index < minMinute || index > maxMinute + } + }) + let seconds: CalendarItem[] = [] + if (filter && isFunction(filter)) { + hours = filter({ + type: 'hour', + values: hours + }) + minutes = filter({ + type: 'minute', + values: minutes + }) + } + + if (!isHideSecond) { + seconds = times(60, (index) => { + return { + label: translate('second', padZero(index)), + value: index, + disabled: index < minSecond || index > maxSecond + } + }) + if (filter && isFunction(filter)) { + seconds = filter({ + type: 'second', + values: seconds + }) + } + } + + columns = isHideSecond ? [hours, minutes] : [hours, minutes, seconds] + + return columns +} + +/** + * 获取当前是第几周 + * @param {timestamp} date + */ +export function getWeekNumber(date: number | Date) { + date = new Date(date) + date.setHours(0, 0, 0, 0) + // Thursday in current week decides the year. + date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7)) + // January 4 is always in week 1. + const week = new Date(date.getFullYear(), 0, 4) + // Adjust to Thursday in week 1 and count number of weeks from date to week 1. + // Rounding should be fine for Daylight Saving Time. Its shift should never be more than 12 hours. + return 1 + Math.round(((date.getTime() - week.getTime()) / 86400000 - 3 + ((week.getDay() + 6) % 7)) / 7) +} + +export function getItemClass(monthType: CalendarDayType, value: number | null | (number | null)[], type: CalendarType) { + const classList = ['is-' + monthType] + + if (type.indexOf('range') > -1 && isArray(value)) { + if (!value || !value[1]) { + classList.push('is-without-end') + } + } + + return classList.join(' ') +} diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/wd-calendar-view.vue b/uni_modules/wot-design-uni/components/wd-calendar-view/wd-calendar-view.vue new file mode 100644 index 0000000..42512d2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/wd-calendar-view.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/year/index.scss b/uni_modules/wot-design-uni/components/wd-calendar-view/year/index.scss new file mode 100644 index 0000000..efb9874 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/year/index.scss @@ -0,0 +1,153 @@ +@import '../../common/abstracts/variable'; +@import '../../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(year) { + @include e(title) { + color: $-dark-color; + } + + @include e(months) { + color: $-dark-color; + } + + @include e(month) { + + @include when(disabled) { + .wd-year__month-text { + color: $-dark-color-gray; + } + } + } + } +} + +@include b(year) { + @include e(title) { + display: flex; + align-items: center; + justify-content: center; + height: 45px; + font-size: $-calendar-panel-title-fs; + color: $-calendar-panel-title-color; + } + + @include e(months) { + display: flex; + flex-wrap: wrap; + font-size: $-calendar-day-fs; + color: $-calendar-day-color; + } + + @include e(month) { + position: relative; + width: 25%; + height: $-calendar-day-height; + line-height: $-calendar-day-height; + text-align: center; + margin-bottom: $-calendar-item-margin-bottom; + + @include when(disabled) { + .wd-year__month-text { + color: $-calendar-disabled-color; + } + } + + @include when(current) { + color: $-calendar-active-color; + } + + @include when(selected) { + color: #fff; + + .wd-year__month-text { + border-radius: $-calendar-active-border; + background: $-calendar-active-color; + } + } + + @include when(middle) { + background: $-calendar-range-color; + } + + @include when(start) { + color: $-calendar-selected-color; + + &::after { + position: absolute; + top: 0; + right: 0; + left: 50%; + bottom: 0; + content: ''; + background: $-calendar-range-color; + } + + .wd-year__month-text { + background: $-calendar-active-color; + border-radius: $-calendar-active-border 0 0 $-calendar-active-border; + } + + &.is-without-end::after { + display: none; + } + } + + @include when(end) { + color: $-calendar-selected-color; + + &::after { + position: absolute; + top: 0; + left: 0; + right: 50%; + bottom: 0; + content: ''; + background: $-calendar-range-color; + } + + .wd-year__month-text { + background: $-calendar-active-color; + border-radius: 0 $-calendar-active-border $-calendar-active-border 0; + } + } + + @include when(same) { + color: $-calendar-selected-color; + + .wd-year__month-text { + background: $-calendar-active-color; + border-radius: $-calendar-active-border; + } + } + @include when(last-row){ + margin-bottom: 0; + } + } + + @include e(month-text) { + width: $-calendar-month-width; + margin: 0 auto; + text-align: center; + } + + @include e(month-top) { + position: absolute; + top: 10px; + left: 0; + right: 0; + line-height: 1.1; + font-size: $-calendar-info-fs; + text-align: center; + } + + @include e(month-bottom) { + position: absolute; + bottom: 10px; + left: 0; + right: 0; + line-height: 1.1; + font-size: $-calendar-info-fs; + text-align: center; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/year/types.ts b/uni_modules/wot-design-uni/components/wd-calendar-view/year/types.ts new file mode 100644 index 0000000..0df05ac --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/year/types.ts @@ -0,0 +1,20 @@ +import type { PropType } from 'vue' +import { makeBooleanProp, makeRequiredProp } from '../../common/props' +import type { CalendarFormatter, CalendarType } from '../types' + +export const yearProps = { + type: makeRequiredProp(String as PropType), + date: makeRequiredProp(Number), + value: makeRequiredProp([Number, Array] as PropType), + minDate: makeRequiredProp(Number), + maxDate: makeRequiredProp(Number), + // 日期格式化函数 + formatter: Function as PropType, + maxRange: Number, + rangePrompt: String, + allowSameDay: makeBooleanProp(false), + defaultTime: { + type: [Array] as PropType> + }, + showTitle: makeBooleanProp(true) +} diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/year/year.vue b/uni_modules/wot-design-uni/components/wd-calendar-view/year/year.vue new file mode 100644 index 0000000..85ee52c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/year/year.vue @@ -0,0 +1,202 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/index.scss b/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/index.scss new file mode 100644 index 0000000..920778a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/index.scss @@ -0,0 +1,24 @@ +@import '../../common/abstracts/variable'; +@import '../../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(year-panel) { + @include e(title) { + color: $-dark-color; + box-shadow: 0px 4px 8px 0 rgba(255, 255,255, 0.02); + } + } +} + +@include b(year-panel) { + font-size: $-calendar-fs; + padding: $-calendar-panel-padding; + + @include e(title) { + padding: 5px 0; + text-align: center; + font-size: $-calendar-panel-title-fs; + color: $-calendar-panel-title-color; + box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.02); + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/types.ts b/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/types.ts new file mode 100644 index 0000000..6e60b01 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/types.ts @@ -0,0 +1,38 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { makeBooleanProp, makeRequiredProp } from '../../common/props' +import type { CalendarFormatter, CalendarType } from '../types' + +/** + * 月份信息 + */ +export interface YearInfo { + date: number + height: number +} + +export const yearPanelProps = { + type: makeRequiredProp(String as PropType), + value: makeRequiredProp([Number, Array] as PropType), + minDate: makeRequiredProp(Number), + maxDate: makeRequiredProp(Number), + formatter: Function as PropType, + maxRange: Number, + rangePrompt: String, + allowSameDay: makeBooleanProp(false), + showPanelTitle: makeBooleanProp(false), + defaultTime: { + type: [Array] as PropType> + }, + panelHeight: makeRequiredProp(Number) +} + +export type YearPanelProps = ExtractPropTypes + +export type YearPanelExpose = { + /** + * 使当前日期或者选中日期滚动到可视区域 + */ + scrollIntoView: () => void +} + +export type YearPanelInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/year-panel.vue b/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/year-panel.vue new file mode 100644 index 0000000..8c48c89 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar-view/yearPanel/year-panel.vue @@ -0,0 +1,135 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-calendar/index.scss b/uni_modules/wot-design-uni/components/wd-calendar/index.scss new file mode 100644 index 0000000..99221a3 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar/index.scss @@ -0,0 +1,158 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(calendar) { + + @include e(title) { + color: $-dark-color; + } + + :deep(.wd-calendar__arrow), + :deep(.wd-calendar__close), + :deep(.wd-calendar__clear) { + color: $-dark-color; + } + + @include e(range-label-item) { + color: $-dark-color; + + @include when(placeholder) { + color: $-dark-color-gray; + } + } + + @include e(range-sperator) { + color: $-dark-color-gray; + } + + :deep(.wd-calendar__cell--placeholder) { + .wd-cell__value { + color: $-dark-color-gray; + } + } + } +} + +@include b(calendar) { + + @include e(header) { + position: relative; + overflow: hidden; + } + + @include e(title) { + color: $-action-sheet-color; + height: $-action-sheet-title-height; + line-height: $-action-sheet-title-height; + text-align: center; + font-size: $-action-sheet-title-fs; + font-weight: $-action-sheet-weight; + } + + @include edeep(close) { + position: absolute; + top: $-action-sheet-close-top; + right: $-action-sheet-close-right; + color: $-action-sheet-close-color; + font-size: $-action-sheet-close-fs; + transform: rotate(-45deg); + line-height: 1.1; + } + + @include e(tabs) { + width: 222px; + margin: 10px auto 12px; + } + + @include e(shortcuts) { + padding: 20px 0; + text-align: center; + } + + @include edeep(tag) { + margin-right: 8px; + } + + @include e(view) { + @include when(show-confirm) { + height: 394px; + + @include when(range) { + height: 384px; + } + } + } + + @include e(range-label) { + display: flex; + justify-content: center; + align-items: center; + font-size: 14px; + + @include when(monthrange) { + padding-bottom: 10px; + box-shadow: 0px 4px 8px 0 rgba(0, 0, 0, 0.02); + } + } + + @include e(range-label-item) { + flex: 1; + color: rgba(0, 0, 0, 0.85); + + @include when(placeholder) { + color: rgba(0, 0, 0, 0.25); + } + } + + @include e(range-sperator) { + margin: 0 24px; + color: rgba(0, 0, 0, 0.25); + } + + @include e(confirm) { + padding: 12px 25px 14px; + } + + @include edeep(cell) { + @include when(disabled) { + .wd-cell__value { + color: $-input-disabled-color; + cursor: not-allowed; + } + } + @include when(error) { + .wd-cell__value { + color: $-input-error-color; + } + :deep(.wd-calendar__arrow) { + color: $-input-error-color; + } + } + @include when(large) { + .wd-calendar__arrow { + font-size: $-cell-icon-size-large; + } + } + + @include m(placeholder) { + .wd-cell__value { + color: $-input-placeholder-color; + } + } + } + + @include edeep(arrow) { + display: block; + font-size: $-cell-icon-size; + color: $-cell-arrow-color; + line-height: $-cell-line-height; + } + + @include edeep(clear) { + display: block; + font-size: $-cell-icon-size; + color: $-cell-clear-color; + line-height: $-cell-line-height; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-calendar/types.ts b/uni_modules/wot-design-uni/components/wd-calendar/types.ts new file mode 100644 index 0000000..813f715 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar/types.ts @@ -0,0 +1,226 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 20:40:34 + * @LastEditTime: 2025-07-11 16:00:26 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-calendar/types.ts + * 记得注释 + */ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props' +import type { CalendarFormatter, CalendarTimeFilter, CalendarType } from '../wd-calendar-view/types' +import type { FormItemRule } from '../wd-form/types' + +export const calendarProps = { + ...baseProps, + /** + * 选中值,为 13 位时间戳或时间戳数组 + */ + modelValue: makeRequiredProp([Number, Array, null] as PropType), + /** + * 日期类型,可选值:date / dates / datetime / week / month / daterange / datetimerange / weekrange / monthrange + */ + type: makeStringProp('date'), + /** + * 最小日期,为 13 位时间戳 + */ + minDate: makeNumberProp(new Date(new Date().getFullYear(), new Date().getMonth() - 6, new Date().getDate()).getTime()), + /** + * 最大日期,为 13 位时间戳 + */ + maxDate: makeNumberProp(new Date(new Date().getFullYear(), new Date().getMonth() + 6, new Date().getDate(), 23, 59, 59).getTime()), + /** + * 周起始天 + */ + firstDayOfWeek: makeNumberProp(0), + /** + * 日期格式化函数 + */ + formatter: Function as PropType, + /** + * type 为范围选择时有效,最大日期范围 + */ + maxRange: Number, + /** + * type 为范围选择时有效,选择超出最大日期范围时的错误提示文案 + */ + rangePrompt: String, + /** + * type 为范围选择时有效,是否允许选择同一天 + */ + allowSameDay: makeBooleanProp(false), + /** + * 选中日期所使用的当日内具体时刻 + */ + defaultTime: { + type: [String, Array] as PropType + }, + /** + * type 为 'datetime' 或 'datetimerange' 时有效,用于过滤时间选择器的数据 + */ + timeFilter: Function as PropType, + /** + * type 为 'datetime' 或 'datetimerange' 时有效,是否不展示秒修改 + */ + hideSecond: makeBooleanProp(false), + /** + * 选择器左侧文案 + */ + label: String, + /** + * 设置左侧标题宽度 + */ + labelWidth: makeStringProp('33%'), + /** + * 禁用 + */ + disabled: makeBooleanProp(false), + /** + * 只读 + */ + readonly: makeBooleanProp(false), + /** + * 选择器占位符 + */ + placeholder: String, + /** + * 弹出层标题 + */ + title: String, + /** + * 选择器的值靠右展示 + */ + alignRight: makeBooleanProp(false), + /** + * 是否为错误状态,错误状态时右侧内容为红色 + */ + error: makeBooleanProp(false), + /** + * 是否必填 + */ + required: makeBooleanProp(false), + /** + * 设置选择器大小,可选值:large + */ + size: String, + /** + * 是否垂直居中 + */ + center: makeBooleanProp(false), + /** + * 点击遮罩是否关闭 + */ + closeOnClickModal: makeBooleanProp(true), + /** + * 弹框层级 + */ + zIndex: makeNumberProp(15), + /** + * 是否显示确定按钮 + */ + showConfirm: makeBooleanProp(true), + /** + * 确定按钮文字 + */ + confirmText: String, + /** + * 自定义展示文案的格式化函数,返回一个字符串 + */ + displayFormat: Function as PropType, + /** + * 自定义范围选择类型的面板内部回显,返回一个字符串 + */ + innerDisplayFormat: Function as PropType, + /** + * 是否超出隐藏 + */ + ellipsis: makeBooleanProp(false), + /** + * 是否显示类型切换功能 + */ + showTypeSwitch: makeBooleanProp(false), + /** + * 快捷选项,为对象数组,其中对象的 text 必传 + */ + shortcuts: makeArrayProp>(), + /** + * 快捷操作点击回调 + */ + onShortcutsClick: Function as PropType, + /** + * 弹出面板是否设置底部安全距离(iphone X 类型的机型) + */ + safeAreaInsetBottom: makeBooleanProp(true), + /** + * 确定前校验函数,接收 { value, resolve } 参数,通过 resolve 继续执行,resolve 接收 1 个 boolean 参数 + */ + beforeConfirm: Function as PropType, + /** + * 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的 + */ + prop: String, + /** + * 表单验证规则,结合wd-form组件使用 + */ + rules: makeArrayProp(), + customViewClass: makeStringProp(''), + /** + * label 外部自定义样式 + */ + customLabelClass: makeStringProp(''), + /** + * value 外部自定义样式 + */ + customValueClass: makeStringProp(''), + /** + * 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。 + */ + immediateChange: makeBooleanProp(false), + /** + * 是否使用内置单元格 + * 默认为 true,使用内置单元格 + */ + withCell: makeBooleanProp(true), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false), + /** + * 必填标记位置,可选值:before、after + */ + markerSide: makeStringProp<'before' | 'after'>('before'), + /** + * 显示清空按钮 + */ + clearable: makeBooleanProp(false) +} + +export type CalendarDisplayFormat = (value: number | number[], type: CalendarType) => string + +export type CalendarInnerDisplayFormat = (value: number, rangeType: 'start' | 'end', type: CalendarType) => string + +export type CalendarBeforeConfirmOption = { + value: number | number[] | null + resolve: (isPass: boolean) => void +} + +export type CalendarBeforeConfirm = (option: CalendarBeforeConfirmOption) => void + +export type CalendarOnShortcutsClickOption = { + item: Record + index: number +} + +export type CalendarOnShortcutsClick = (option: CalendarOnShortcutsClickOption) => number | number[] + +export type CalendarExpose = { + /** 关闭时间选择器弹窗 */ + close: () => void + /** 打开时间选择器弹窗 */ + open: () => void +} + +export type CalendarProps = ExtractPropTypes + +export type CalendarInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue b/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue new file mode 100644 index 0000000..669533c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-calendar/wd-calendar.vue @@ -0,0 +1,451 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-card/index.scss b/uni_modules/wot-design-uni/components/wd-card/index.scss new file mode 100644 index 0000000..ee6562c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-card/index.scss @@ -0,0 +1,71 @@ +@import "../common/abstracts/variable.scss"; +@import "../common/abstracts/_mixin.scss"; +.wot-theme-dark { + @include b(card) { + background-color: $-dark-background2; + + @include when(rectangle) { + + .wd-card__content { + @include halfPixelBorder('top', 0, $-dark-border-color); + } + .wd-card__footer { + @include halfPixelBorder('top', 0, $-dark-border-color); + } + } + + @include e(title-content) { + color: $-dark-color; + } + @include e(content) { + color: $-dark-color3; + } + } +} + +@include b(card) { + padding: $-card-padding; + background-color: $-card-bg; + line-height: $-card-line-height; + margin: $-card-margin; + border-radius: $-card-radius; + box-shadow: $-card-shadow-color; + font-size: $-card-fs; + margin-bottom: 12px; + + @include when(rectangle) { + margin-left: 0; + margin-right: 0; + border-radius: 0; + box-shadow: none; + + .wd-card__title-content { + font-size: $-card-fs; + } + .wd-card__content { + position: relative; + padding: $-card-rectangle-content-padding; + + @include halfPixelBorder('top', 0, $-card-content-border-color); + } + .wd-card__footer { + position: relative; + padding: $-card-rectangle-footer-padding; + + @include halfPixelBorder('top', 0, $-card-content-border-color); + } + } + @include e(title-content) { + padding: 16px 0; + color: $-card-title-color; + font-size: $-card-title-fs; + } + @include e(content) { + color: $-card-content-color; + line-height: $-card-content-line-height; + } + @include e(footer) { + padding: $-card-footer-padding; + text-align: right; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-card/types.ts b/uni_modules/wot-design-uni/components/wd-card/types.ts new file mode 100644 index 0000000..8ee91f2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-card/types.ts @@ -0,0 +1,30 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeStringProp } from '../common/props' + +export type CardType = 'rectangle' + +export const cardProps = { + ...baseProps, + /** + * 卡片类型 + */ + type: String as PropType, + /** + * 卡片标题 + */ + title: String, + /** + * 标题自定义样式 + */ + customTitleClass: makeStringProp(''), + /** + * 内容自定义样式 + */ + customContentClass: makeStringProp(''), + /** + * 底部自定义样式 + */ + customFooterClass: makeStringProp('') +} + +export type CardProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-card/wd-card.vue b/uni_modules/wot-design-uni/components/wd-card/wd-card.vue new file mode 100644 index 0000000..01ba71e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-card/wd-card.vue @@ -0,0 +1,37 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-cell-group/index.scss b/uni_modules/wot-design-uni/components/wd-cell-group/index.scss new file mode 100644 index 0000000..983f8ff --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-cell-group/index.scss @@ -0,0 +1,56 @@ +@import '../common/abstracts/variable.scss'; +@import '../common/abstracts/_mixin.scss'; + +.wot-theme-dark { + @include b(cell-group) { + background-color: $-dark-background2; + + @include when(border) { + .wd-cell-group__title { + @include halfPixelBorder('bottom', 0, $-dark-border-color); + } + } + + @include e(title) { + background: $-dark-background2; + color: $-dark-color; + } + + @include e(right) { + color: $-dark-color3; + } + + @include e(body) { + background: $-dark-background2; + } + + } +} + +@include b(cell-group) { + background-color: $-color-white; + + @include when(border) { + .wd-cell-group__title { + @include halfPixelBorder; + } + } + @include e(title) { + position: relative; + display: flex; + justify-content: space-between; + padding: $-cell-group-padding; + background: $-color-white; + font-size: $-cell-group-title-fs; + color: $-cell-group-title-color; + font-weight: $-fw-medium; + line-height: 1.43; + } + @include e(right) { + color: $-cell-group-value-color; + font-size: $-cell-group-value-fs; + } + @include e(body) { + background: $-color-white; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-cell-group/types.ts b/uni_modules/wot-design-uni/components/wd-cell-group/types.ts new file mode 100644 index 0000000..f24a773 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-cell-group/types.ts @@ -0,0 +1,41 @@ +/* + * @Author: weisheng + * @Date: 2023-12-14 11:21:58 + * @LastEditTime: 2024-03-18 13:57:14 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-cell-group\types.ts + * 记得注释 + */ +import { type ExtractPropTypes, type InjectionKey } from 'vue' +import { baseProps, makeBooleanProp } from '../common/props' + +export type CelllGroupProvide = { + props: { + border?: boolean + } +} + +export const CELL_GROUP_KEY: InjectionKey = Symbol('wd-cell-group') + +export const cellGroupProps = { + ...baseProps, + /** + * 分组标题 + */ + title: String, + /** + * 分组右侧内容 + */ + value: String, + /** + * 分组启用插槽 + */ + useSlot: makeBooleanProp(false), + /** + * 是否展示边框线 + */ + border: makeBooleanProp(false) +} + +export type CellGroupProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.vue b/uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.vue new file mode 100644 index 0000000..d16a8fa --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.vue @@ -0,0 +1,45 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-cell/index.scss b/uni_modules/wot-design-uni/components/wd-cell/index.scss new file mode 100644 index 0000000..a87f91c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-cell/index.scss @@ -0,0 +1,206 @@ +@import '../common/abstracts/variable.scss'; +@import '../common/abstracts/_mixin.scss'; + +.wot-theme-dark { + @include b(cell) { + background-color: $-dark-background2; + color: $-dark-color; + + @include e(value) { + color: $-dark-color; + } + + @include e(label) { + color: $-dark-color3; + } + + @include when(hover) { + background-color: $-dark-background4; + } + + @include when(border) { + .wd-cell__wrapper { + @include halfPixelBorder('top', 0, $-dark-border-color); + } + } + + :deep(.wd-cell__arrow-right) { + color: $-dark-color; + } + } +} + +@include b(cell) { + position: relative; + padding-left: $-cell-padding; + background-color: $-color-white; + text-decoration: none; + color: $-cell-title-color; + line-height: $-cell-line-height; + -webkit-tap-highlight-color: transparent; + box-sizing: border-box; + width: 100%; + overflow: hidden; + + @include when(border) { + .wd-cell__wrapper { + @include halfPixelBorder('top'); + } + } + + @include e(wrapper) { + position: relative; + display: flex; + padding: $-cell-wrapper-padding $-cell-padding $-cell-wrapper-padding 0; + justify-content: space-between; + align-items: flex-start; + overflow: hidden; + + @include when(vertical) { + display: block; + + .wd-cell__right { + margin-top: $-cell-vertical-top; + } + + .wd-cell__value { + text-align: left; + } + + .wd-cell__left { + margin-right: 0; + } + } + + @include when(label) { + padding: $-cell-wrapper-padding-with-label $-cell-padding $-cell-wrapper-padding-with-label 0; + } + } + + @include e(left) { + position: relative; + flex: 1; + display: flex; + text-align: left; + font-size: $-cell-title-fs; + box-sizing: border-box; + margin-right: $-cell-padding; + } + + @include e(right) { + position: relative; + flex: 1; + min-width: 0; + } + + @include e(title) { + font-size: $-cell-title-fs; + } + + @include e(required) { + font-size: $-cell-required-size; + color: $-cell-required-color; + margin-left: $-cell-required-margin; + + @include m(left) { + margin-left: 0; + margin-right: $-cell-required-margin; + } + } + + @include e(label) { + margin-top: 2px; + font-size: $-cell-label-fs; + color: $-cell-label-color; + } + + @include edeep(icon) { + display: block; + position: relative; + margin-right: $-cell-icon-right; + font-size: $-cell-icon-size; + height: $-cell-line-height; + line-height: $-cell-line-height; + } + + @include e(body){ + display: flex; + min-width: 0; + } + + @include e(value) { + position: relative; + flex: 1; + font-size: $-cell-value-fs; + color: $-cell-value-color; + vertical-align: middle; + + @include m(left) { + text-align: left; + } + + @include m(right) { + text-align: right; + } + + @include m(ellipsis) { + @include lineEllipsis; + min-width: 0; + } + } + + @include edeep(arrow-right) { + display: block; + margin-left: 8px; + width: $-cell-arrow-size; + font-size: $-cell-arrow-size; + color: $-cell-arrow-color; + height: $-cell-line-height; + line-height: $-cell-line-height; + } + + @include e(error-message){ + color: $-form-item-error-message-color; + font-size: $-form-item-error-message-font-size; + line-height: $-form-item-error-message-line-height; + text-align: left; + vertical-align: middle; + } + + @include when(link) { + -webkit-tap-highlight-color: $-cell-tap-bg; + } + + @include when(hover) { + background-color: $-cell-tap-bg; + } + + @include when(large) { + .wd-cell__title { + font-size: $-cell-title-fs-large; + } + + .wd-cell__wrapper { + padding-top: $-cell-wrapper-padding-large; + padding-bottom: $-cell-wrapper-padding-large; + } + + .wd-cell__label { + font-size: $-cell-label-fs-large; + } + + .wd-cell__value { + font-size: $-cell-value-fs-large; + } + + :deep(.wd-cell__icon) { + font-size: $-cell-icon-size-large; + } + } + + @include when(center) { + .wd-cell__wrapper { + align-items: center; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-cell/types.ts b/uni_modules/wot-design-uni/components/wd-cell/types.ts new file mode 100644 index 0000000..10a52b9 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-cell/types.ts @@ -0,0 +1,111 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeStringProp, makeNumericProp, numericProp } from '../common/props' + +import { type FormItemRule } from '../wd-form/types' + +export const cellProps = { + ...baseProps, + /** + * 标题 + */ + title: String, + /** + * 右侧内容 + */ + value: makeNumericProp(''), + /** + * 图标类名 + */ + icon: String, + /** + * 图标大小 + */ + iconSize: numericProp, + /** + * 描述信息 + */ + label: String, + /** + * 是否为跳转链接 + */ + isLink: makeBooleanProp(false), + /** + * 跳转地址 + */ + to: String, + /** + * 跳转时是否替换栈顶页面 + */ + replace: makeBooleanProp(false), + /** + * 开启点击反馈,is-link 默认开启 + */ + clickable: makeBooleanProp(false), + /** + * 设置单元格大小,可选值:large + */ + size: String, + /** + * 是否展示边框线 + */ + border: makeBooleanProp(void 0), + /** + * 设置左侧标题宽度 + */ + titleWidth: String, + /** + * 是否垂直居中,默认顶部居中 + */ + center: makeBooleanProp(false), + /** + * 是否必填 + */ + required: makeBooleanProp(false), + /** + * 表单属性,上下结构 + */ + vertical: makeBooleanProp(false), + /** + * 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的 + */ + prop: String, + /** + * 表单验证规则,结合wd-form组件使用 + */ + rules: makeArrayProp(), + /** + * icon 使用 slot 时的自定义样式 + */ + customIconClass: makeStringProp(''), + /** + * label 使用 slot 时的自定义样式 + */ + customLabelClass: makeStringProp(''), + /** + * value 使用 slot 时的自定义样式 + */ + customValueClass: makeStringProp(''), + /** + * title 使用 slot 时的自定义样式 + */ + customTitleClass: makeStringProp(''), + /** + * value 文字对齐方式,可选值:left、right、center + */ + valueAlign: makeStringProp<'left' | 'right'>('right'), + /** + * 是否超出隐藏,显示省略号 + */ + ellipsis: makeBooleanProp(false), + /** + * 是否启用title插槽,默认启用,用来解决插槽传递时v-slot和v-if冲突问题。 + * 问题见:https://github.com/dcloudio/uni-app/issues/4847 + */ + useTitleSlot: makeBooleanProp(true), + /** + * 必填标记位置,可选值:before(标签前)、after(标签后) + */ + markerSide: makeStringProp<'before' | 'after'>('before') +} + +export type CellProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-cell/wd-cell.vue b/uni_modules/wot-design-uni/components/wd-cell/wd-cell.vue new file mode 100644 index 0000000..04adbc7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-cell/wd-cell.vue @@ -0,0 +1,140 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-checkbox-group/index.scss b/uni_modules/wot-design-uni/components/wd-checkbox-group/index.scss new file mode 100644 index 0000000..09d22aa --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-checkbox-group/index.scss @@ -0,0 +1,20 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(checkbox-group) { + background-color: $-dark-background2; + } +} +@include b(checkbox-group) { + background-color: $-checkbox-bg; + + // 上下20px 左右15px 内部间隔12px + @include when(button) { + width: 100%; + padding: 8px 3px 20px 15px; + box-sizing: border-box; + overflow: hidden; + height: auto; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-checkbox-group/types.ts b/uni_modules/wot-design-uni/components/wd-checkbox-group/types.ts new file mode 100644 index 0000000..e1785df --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-checkbox-group/types.ts @@ -0,0 +1,59 @@ +import { type ExtractPropTypes, type InjectionKey, type PropType } from 'vue' +import type { CheckShape } from '../wd-checkbox/types' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export type RequiredModelValue = { + modelValue: Array +} + +export type checkboxGroupProvide = { + props: Partial> & RequiredModelValue + changeSelectState: (value: string | number | boolean) => void +} + +export const CHECKBOX_GROUP_KEY: InjectionKey = Symbol('wd-checkbox-group') + +export const checkboxGroupProps = { + ...baseProps, + /** + * 绑定值 + */ + modelValue: { + type: Array as PropType>, + default: () => [] + }, + /** + * 表单模式 + */ + cell: makeBooleanProp(false), + /** + * 单选框形状,可选值:circle / square / button + */ + shape: makeStringProp('circle'), + /** + * 选中的颜色 + */ + checkedColor: String, + /** + * 禁用 + */ + disabled: makeBooleanProp(false), + /** + * 最小选中的数量 + */ + min: makeNumberProp(0), + /** + * 最大选中的数量,0 为无限数量,默认为 0 + */ + max: makeNumberProp(0), + /** + * 同行展示 + */ + inline: makeBooleanProp(false), + /** + * 设置大小,可选值:large + */ + size: String +} + +export type CheckboxGroupProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-checkbox-group/wd-checkbox-group.vue b/uni_modules/wot-design-uni/components/wd-checkbox-group/wd-checkbox-group.vue new file mode 100644 index 0000000..c6fef2c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-checkbox-group/wd-checkbox-group.vue @@ -0,0 +1,100 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-checkbox/index.scss b/uni_modules/wot-design-uni/components/wd-checkbox/index.scss new file mode 100644 index 0000000..e188d32 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-checkbox/index.scss @@ -0,0 +1,285 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(checkbox) { + @include e(shape) { + background: transparent; + border-color: $-checkbox-border-color; + color: $-checkbox-check-color; + } + + @include e(label) { + color: $-dark-color; + } + + @include when(disabled) { + .wd-checkbox__shape { + border-color: $-dark-color-gray; + background: $-dark-background4; + } + + .wd-checkbox__label { + color: $-dark-color-gray; + } + + :deep(.wd-checkbox__check) { + color: $-dark-color-gray; + } + + @include when(checked) { + .wd-checkbox__shape { + color: $-dark-color-gray; + } + + .wd-checkbox__label { + color: $-dark-color-gray; + } + } + + @include when(button) { + + .wd-checkbox__label { + border-color: #c8c9cc; + background: #3a3a3c; + color: $-dark-color-gray; + } + + @include when(checked) { + .wd-checkbox__label { + border-color: #c8c9cc; + background: #3a3a3c; + color: #c8c9cc; + } + } + } + } + + @include when(button) { + .wd-checkbox__label { + background-color: $-dark-background; + } + + @include when(checked) { + .wd-checkbox__label { + background-color: $-dark-background2; + } + } + } + + } +} + +@include b(checkbox) { + display: block; + margin-bottom: $-checkbox-margin; + font-size: 0; + -webkit-tap-highlight-color: transparent; + line-height: 1.2; + + @include when(last-child) { + margin-bottom: 0; + } + + @include e(shape) { + position: relative; + display: inline-block; + width: $-checkbox-size; + height: $-checkbox-size; + border: 2px solid $-checkbox-border-color; + border-radius: 50%; + color: $-checkbox-check-color; + background: $-checkbox-bg; + vertical-align: middle; + transition: background 0.2s; + box-sizing: border-box; + + @include when(square) { + border-radius: $-checkbox-square-radius; + } + } + + @include e(input) { + position: absolute; + width: 0; + height: 0; + margin: 0; + opacity: 0; + } + + @include edeep(btn-check) { + display: inline-block; + font-size: $-checkbox-icon-size; + margin-right: 4px; + vertical-align: middle; + } + + @include e(txt) { + display: inline-block; + vertical-align: middle; + line-height: 20px; + @include lineEllipsis; + } + + @include e(label) { + position: relative; + display: inline-block; + margin-left: $-checkbox-label-margin; + vertical-align: middle; + font-size: $-checkbox-label-fs; + color: $-checkbox-label-color; + } + + @include edeep(check) { + color: $-checkbox-check-color; + font-size: $-checkbox-icon-size; + opacity: 0; + transition: opacity 0.2s; + } + + @include when(checked) { + .wd-checkbox__shape { + color: $-checkbox-checked-color; + background: currentColor; + border-color: currentColor; + } + + :deep(.wd-checkbox__check) { + opacity: 1; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } + } + + @include when(button) { + display: inline-block; + margin-bottom: 0; + margin-right: $-checkbox-margin; + vertical-align: top; + font-size: $-checkbox-button-font-size; + + @include when(last-child) { + margin-right: 0; + } + + .wd-checkbox__shape { + width: 0; + height: 0; + overflow: hidden; + opacity: 0; + border: none; + } + + .wd-checkbox__label { + display: inline-flex; + flex-direction: row; + justify-content: center; + align-items: center; + min-width: $-checkbox-button-min-width; + height: $-checkbox-button-height; + font-size: $-checkbox-button-font-size; + margin-left: 0; + padding: 5px 15px; + border: 1px solid $-checkbox-button-border; + background-color: $-checkbox-button-bg; + border-radius: $-checkbox-button-radius; + transition: color 0.2s, border 0.2s; + box-sizing: border-box; + } + + @include when(checked) { + .wd-checkbox__label { + color: $-checkbox-checked-color; + background-color: $-checkbox-bg; + border-color: $-checkbox-checked-color; + border-color: currentColor; + } + } + } + + @include when(inline) { + display: inline-block; + margin-bottom: 0; + margin-right: $-checkbox-margin; + + @include when(last-child) { + margin-right: 0; + } + } + + @include when(disabled) { + .wd-checkbox__shape { + border-color: $-checkbox-border-color; + background: $-checkbox-disabled-check-bg; + } + + .wd-checkbox__label { + color: $-checkbox-disabled-label-color; + } + + @include when(checked) { + .wd-checkbox__shape { + color: $-checkbox-disabled-check-color; + } + + .wd-checkbox__label { + color: $-checkbox-disabled-label-color; + } + } + + @include when(button) { + .wd-checkbox__label { + background: $-checkbox-disabled-color; + border-color: $-checkbox-button-border; + color: $-checkbox-disabled-label-color; + } + + @include when(checked) { + .wd-checkbox__label { + border-color: $-checkbox-button-disabled-border; + } + } + } + } + + // 以下内容用于解决父子组件样式隔离的问题 —— START + @include when(cell-box) { + padding: 13px 15px; + margin: 0; + + @include when(large) { + padding: 14px 15px; + } + } + + @include when(button-box) { + display: inline-flex; + width: 33.3333%; + padding: 12px 12px 0 0; + box-sizing: border-box; + + .wd-checkbox__label { + width: 100%; + } + + &:last-child::after { + content: ""; + display: table; + clear: both; + } + } + + @include when(large) { + .wd-checkbox__shape { + width: $-checkbox-large-size; + height: $-checkbox-large-size; + font-size: $-checkbox-large-size; + } + + .wd-checkbox__label { + font-size: $-checkbox-large-label-fs; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-checkbox/types.ts b/uni_modules/wot-design-uni/components/wd-checkbox/types.ts new file mode 100644 index 0000000..86bafc7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-checkbox/types.ts @@ -0,0 +1,68 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeStringProp } from '../common/props' + +export type CheckShape = 'circle' | 'square' | 'button' + +export const checkboxProps = { + ...baseProps, + customLabelClass: makeStringProp(''), + customShapeClass: makeStringProp(''), + /** + * 单选框选中时的值 + */ + modelValue: { + type: [String, Number, Boolean], + required: true, + default: false + }, + /** + * 单选框形状,可选值:circle / square / button + */ + shape: { + type: String as PropType + }, + /** + * 选中的颜色 + */ + checkedColor: String, + /** + * 禁用 + */ + disabled: { + type: [Boolean, null] as PropType, + default: null + }, + /** + * 选中值,在 checkbox-group 中使用无效,需同 false-value 一块使用 + */ + trueValue: { + type: [String, Number, Boolean], + default: true + }, + /** + * 非选中时的值,在 checkbox-group 中使用无效,需同 true-value 一块使用 + */ + falseValue: { + type: [String, Number, Boolean], + default: false + }, + /** + * 设置大小,可选值:large + */ + size: String, + /** + * 文字位置最大宽度 + */ + maxWidth: String +} + +export type CheckboxProps = ExtractPropTypes + +export type CheckboxExpose = { + /** + * 切换当前选中状态 + */ + toggle: () => void +} + +export type CheckboxInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-checkbox/wd-checkbox.vue b/uni_modules/wot-design-uni/components/wd-checkbox/wd-checkbox.vue new file mode 100644 index 0000000..d46c8fe --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-checkbox/wd-checkbox.vue @@ -0,0 +1,177 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-circle/index.scss b/uni_modules/wot-design-uni/components/wd-circle/index.scss new file mode 100644 index 0000000..dc7d13e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-circle/index.scss @@ -0,0 +1,18 @@ +@import "../common/abstracts/variable.scss"; +@import "../common/abstracts/_mixin.scss"; + +@include b(circle) { + position: relative; + display: inline-block; + text-align: center; + + @include e(text) { + position: absolute; + z-index: 1; + top: 50%; + left: 0; + width: 100%; + transform: translateY(-50%); + color: $-circle-text-color; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-circle/types.ts b/uni_modules/wot-design-uni/components/wd-circle/types.ts new file mode 100644 index 0000000..881ef73 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-circle/types.ts @@ -0,0 +1,54 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +// 进度条端点的形状,可选值为 "butt" | "round" | "square" +export type StrokeLinecapType = 'butt' | 'round' | 'square' + +export const circleProps = { + ...baseProps, + /** + * 当前进度 + */ + modelValue: makeNumberProp(0), + /** + * 圆环直径,默认单位为 px + */ + size: makeNumberProp(100), + /** + * 进度条颜色,传入对象格式可以定义渐变色 + */ + color: { + type: [String, Object] as PropType>, + default: '#4d80f0' + }, + /** + * 轨道颜色 + */ + layerColor: makeStringProp('#EBEEF5'), + /** + * 填充颜色 + */ + fill: String, + /** + * 动画速度(单位为 rate/s) + */ + speed: makeNumberProp(50), + /** + * 文字 + */ + text: String, + /** + * 进度条宽度 单位px + */ + strokeWidth: makeNumberProp(10), + /** + * 进度条端点的形状,可选值为 "butt" | "round" | "square" + */ + strokeLinecap: makeStringProp('round'), + /** + * 是否顺时针增加 + */ + clockwise: makeBooleanProp(true) +} + +export type CircleProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-circle/wd-circle.vue b/uni_modules/wot-design-uni/components/wd-circle/wd-circle.vue new file mode 100644 index 0000000..1cb7040 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-circle/wd-circle.vue @@ -0,0 +1,296 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-col-picker/index.scss b/uni_modules/wot-design-uni/components/wd-col-picker/index.scss new file mode 100644 index 0000000..c6fb8db --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-col-picker/index.scss @@ -0,0 +1,168 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(col-picker) { + @include e(list-item) { + @include when(disabled) { + color: $-dark-color3; + } + } + + @include e(list-item-tip) { + color: $-dark-color-gray; + } + + :deep(.wd-col-picker__arrow) { + color: $-dark-color; + } + + @include e(list) { + color: $-dark-color; + } + + @include e(selected) { + color: $-dark-color; + } + + :deep(.wd-col-picker__cell--placeholder) { + .wd-cell__value { + color: $-dark-color-gray; + } + } + } +} + +@include b(col-picker) { + @include edeep(cell) { + @include when(disabled) { + .wd-cell__value { + color: $-input-disabled-color; + cursor: not-allowed; + } + } + @include when(error) { + .wd-cell__value { + color: $-input-error-color; + } + .wd-col-picker__arrow { + color: $-input-error-color; + } + } + @include when(large) { + .wd-col-picker__arrow { + font-size: $-cell-icon-size-large; + } + } + + @include m(placeholder) { + .wd-cell__value { + color: $-input-placeholder-color; + } + } + + } + + @include edeep(arrow) { + display: block; + font-size: $-cell-icon-size; + color: $-cell-arrow-color; + line-height: $-cell-line-height; + } + + @include e(selected) { + height: $-col-picker-selected-height; + font-size: $-col-picker-selected-fs; + color: $-col-picker-selected-color; + overflow: hidden; + } + + @include e(selected-container){ + position: relative; + display: flex; + user-select: none; + } + + @include e(selected-item) { + flex: 0 0 auto; + height: $-col-picker-selected-height; + line-height: $-col-picker-selected-height; + padding: $-col-picker-selected-padding; + + @include when(selected) { + font-weight: $-col-picker-selected-fw; + } + } + + @include e(selected-line) { + position: absolute; + bottom: 5px; + width: $-col-picker-line-width; + left: 0; + height: $-col-picker-line-height; + background: $-col-picker-line-color; + z-index: 1; + border-radius: calc($-col-picker-line-height / 2); + box-shadow: $-col-picker-line-box-shadow; + } + + @include e(list-container){ + position: relative; + } + + @include e(list) { + height: $-col-picker-list-height; + padding-bottom: $-col-picker-list-padding-bottom; + box-sizing: border-box; + overflow: auto; + color: $-col-picker-list-color; + font-size: $-col-picker-list-fs; + -webkit-overflow-scrolling: touch; + } + + @include e(list-item) { + display: flex; + padding: $-col-picker-list-item-padding; + align-items: flex-start; + + @include when(selected) { + color: $-col-picker-list-color-checked; + + :deep(.wd-col-picker__checked) { + opacity: 1; + } + } + @include when(disabled) { + color: $-col-picker-list-color-disabled; + } + } + + @include e(list-item-label) { + line-height: 1.285; + } + + @include e(list-item-tip) { + margin-top: 2px; + font-size: $-col-picker-list-fs-tip; + color: $-col-picker-list-color-tip; + } + + @include edeep(checked) { + display: block; + margin-left: 4px; + font-size: $-col-picker-list-checked-icon-size; + color: $-col-picker-list-color-checked; + opacity: 0; + } + + @include e(loading) { + display: flex; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + align-items: center; + justify-content: center; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-col-picker/types.ts b/uni_modules/wot-design-uni/components/wd-col-picker/types.ts new file mode 100644 index 0000000..ae28eea --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-col-picker/types.ts @@ -0,0 +1,166 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeRequiredProp, makeStringProp, numericProp } from '../common/props' +import type { FormItemRule } from '../wd-form/types' + +export const colPickerProps = { + ...baseProps, + /** + * 选中项 + */ + modelValue: makeRequiredProp(Array as PropType>), + /** + * 选择器数据,二维数组 + */ + columns: makeArrayProp[]>(), + /** + * 选择器左侧文案 + */ + label: String, + /** + * 设置左侧标题宽度 + */ + labelWidth: makeStringProp('33%'), + /** + * 使用 label 插槽时设置该选项 + */ + useLabelSlot: makeBooleanProp(false), + /** + * 使用默认插槽时设置该选项 + */ + useDefaultSlot: makeBooleanProp(false), + /** + * 禁用 + */ + disabled: makeBooleanProp(false), + /** + * 只读 + */ + readonly: makeBooleanProp(false), + /** + * 选择器占位符 + */ + placeholder: String, + /** + * 弹出层标题 + */ + title: String, + /** + * 接收当前列的选中项 item、当前列下标、当前列选中项下标下一列数据处理函数 resolve、结束选择 finish + */ + columnChange: Function as PropType, + /** + * 自定义展示文案的格式化函数,返回一个字符串 + */ + displayFormat: Function as PropType, + /** + * 确定前校验函数,接收 (value, resolve) 参数,通过 resolve 继续执行 picker,resolve 接收 1 个 boolean 参数 + */ + beforeConfirm: Function as PropType, + /** + * 选择器的值靠右展示 + */ + alignRight: makeBooleanProp(false), + /** + * 是否为错误状态,错误状态时右侧内容为红色 + */ + error: makeBooleanProp(false), + /** + * 是否必填 + */ + required: makeBooleanProp(false), + /** + * 设置选择器大小,可选值:large + */ + size: String, + /** + * 选项对象中,value 对应的 key + */ + valueKey: makeStringProp('value'), + /** + * 选项对象中,展示的文本对应的 key + */ + labelKey: makeStringProp('label'), + /** + * 选项对象中,提示文案对应的 key + */ + tipKey: makeStringProp('tip'), + /** + * loading 图标的颜色 + */ + loadingColor: makeStringProp('#4D80F0'), + /** + * 点击遮罩是否关闭 + */ + closeOnClickModal: makeBooleanProp(true), + /** + * 自动触发 column-change 事件来补全数据,当 columns 为空数组或者 columns 数组长度小于 value 数组长度时,会自动触发 column-change + */ + autoComplete: makeBooleanProp(false), + /** + * 弹窗层级 + */ + zIndex: makeNumberProp(15), + /** + * 弹出面板是否设置底部安全距离(iphone X 类型的机型) + */ + safeAreaInsetBottom: makeBooleanProp(true), + /** + * 是否超出隐藏 + */ + ellipsis: makeBooleanProp(false), + /** + * 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的 + */ + prop: String, + /** + * 表单验证规则,结合wd-form组件使用 + */ + rules: makeArrayProp(), + /** + * 底部条宽度,单位像素 + */ + lineWidth: numericProp, + /** + * 底部条高度,单位像素 + */ + lineHeight: numericProp, + /** + * label 外部自定义样式 + */ + customViewClass: makeStringProp(''), + /** + * value 外部自定义样式 + */ + customLabelClass: makeStringProp(''), + customValueClass: makeStringProp(''), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false), + /** + * 必填标记位置,可选值:before、after + */ + markerSide: makeStringProp<'before' | 'after'>('before') +} + +export type ColPickerProps = ExtractPropTypes + +export type ColPickerColumnChangeOption = { + selectedItem: Record + index: number + rowIndex: number + resolve: (nextColumn: Record[]) => void + finish: (isOk?: boolean) => void +} +export type ColPickerColumnChange = (option: ColPickerColumnChangeOption) => void +export type ColPickerDisplayFormat = (selectedItems: Record[]) => string +export type ColPickerBeforeConfirm = (value: (string | number)[], selectedItems: Record[], resolve: (isPass: boolean) => void) => void + +export type ColPickerExpose = { + // 关闭picker弹框 + close: () => void + // 打开picker弹框 + open: () => void +} + +export type ColPickerInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-col-picker/wd-col-picker.vue b/uni_modules/wot-design-uni/components/wd-col-picker/wd-col-picker.vue new file mode 100644 index 0000000..7c494c5 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-col-picker/wd-col-picker.vue @@ -0,0 +1,498 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-col/index.scss b/uni_modules/wot-design-uni/components/wd-col/index.scss new file mode 100644 index 0000000..160b919 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-col/index.scss @@ -0,0 +1,19 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +$i: 1; + +@include b(col) { + float: left; + box-sizing: border-box; +} + +@while $i <= 24 { + .wd-col__#{$i} { + width: calc(100% / 24 * $i); + } + .wd-col__offset-#{$i} { + margin-left: calc(100% / 24 * $i); + } + $i: $i + 1; +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-col/types.ts b/uni_modules/wot-design-uni/components/wd-col/types.ts new file mode 100644 index 0000000..78c6a8a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-col/types.ts @@ -0,0 +1,15 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeNumberProp } from '../common/props' + +export const colProps = { + ...baseProps, + /** + * 列元素宽度 + */ + span: makeNumberProp(24), + /** + * 列元素偏移距离 + */ + offset: makeNumberProp(0) +} +export type ColProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-col/wd-col.vue b/uni_modules/wot-design-uni/components/wd-col/wd-col.vue new file mode 100644 index 0000000..11aad88 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-col/wd-col.vue @@ -0,0 +1,49 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-collapse-item/index.scss b/uni_modules/wot-design-uni/components/wd-collapse-item/index.scss new file mode 100644 index 0000000..97f4655 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-collapse-item/index.scss @@ -0,0 +1,90 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(collapse-item) { + @include halfPixelBorder('top', 0, $-dark-border-color); + + + @include e(title) { + color: $-dark-color; + } + + @include e(body) { + color: $-dark-color3; + } + + @include when(disabled) { + .wd-collapse-item__title { + color: $-dark-color-gray; + } + .wd-collapse-item__arrow { + color: $-dark-color-gray; + } + } + } +} + + +@include b(collapse-item) { + position: relative; + @include halfPixelBorder('top'); + + + @include e(header) { + position: relative; + display: flex; + justify-content: space-between; + align-items: center; + padding: $-collapse-header-padding; + overflow: hidden; + user-select: none; + + @include when(expanded) { + @include halfPixelBorder('bottom'); + } + + @include when(custom) { + display: block; + } + } + + @include e(title) { + color: $-collapse-title-color; + font-weight: $-fw-medium; + font-size: $-collapse-title-fs; + } + + @include edeep(arrow) { + display: block; + font-size: $-collapse-arrow-size; + color: $-collapse-arrow-color; + transition: transform 0.3s; + + @include when(retract) { + transform: rotate(-180deg); + } + } + + @include e(wrapper) { + position: relative; + overflow: hidden; + will-change: height; + } + + @include e(body) { + color: $-collapse-body-color; + font-size: $-collapse-body-fs; + padding: $-collapse-body-padding; + line-height: 1.43; + } + + @include when(disabled) { + .wd-collapse-item__title { + color: $-collapse-disabled-color; + } + .wd-collapse-item__arrow { + color: $-collapse-disabled-color; + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-collapse-item/types.ts b/uni_modules/wot-design-uni/components/wd-collapse-item/types.ts new file mode 100644 index 0000000..07b28f6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-collapse-item/types.ts @@ -0,0 +1,48 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeRequiredProp, makeStringProp } from '../common/props' + +export type CollapseItemBeforeExpand = (name: string) => boolean | Promise + +export const collapseItemProps = { + ...baseProps, + /** + * 自定义折叠栏内容容器样式类名 + */ + customBodyClass: makeStringProp(''), + /** + * 自定义折叠栏内容容器样式 + */ + customBodyStyle: makeStringProp(''), + /** + * 折叠栏的标题, 可通过 slot 传递自定义内容 + */ + title: makeStringProp(''), + /** + * 禁用折叠栏 + */ + disabled: makeBooleanProp(false), + /** + * 折叠栏的标识符 + */ + name: makeRequiredProp(String), + /** + * 打开前的回调函数,返回 false 可以阻止打开,支持返回 Promise + */ + beforeExpend: Function as PropType +} + +export type CollapseItemProps = ExtractPropTypes + +export type CollapseItemExpose = { + /** + * 获取展开状态 + * @returns boolean + */ + getExpanded: () => boolean + /** + * 更新展开状态 + */ + updateExpand: () => Promise +} + +export type CollapseItemInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue b/uni_modules/wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue new file mode 100644 index 0000000..2f1d123 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue @@ -0,0 +1,171 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-collapse/index.scss b/uni_modules/wot-design-uni/components/wd-collapse/index.scss new file mode 100644 index 0000000..552dc97 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-collapse/index.scss @@ -0,0 +1,55 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +.wot-theme-dark { + @include b(collapse) { + background: $-dark-background2; + + @include e(content) { + color: $-dark-color3; + } + } +} + +@include b(collapse) { + background: $-color-white; + + @include when(viewmore) { + padding: $-collapse-side-padding; + } + @include e(content) { + font-size: $-collapse-body-fs; + color: $-collapse-body-color; + + @include when(retract) { + display: -webkit-box; + -webkit-box-orient: vertical; + overflow: hidden; + font-size: $-collapse-retract-fs; + } + } + @include e(more) { + display: inline-block; + font-size: $-collapse-retract-fs; + margin-top: 8px; + color: $-collapse-more-color; + user-select: none; + } + @include e(more-txt) { + display: inline-block; + vertical-align: middle; + margin-right: 4px; + } + @include e(arrow) { + display: inline-block; + vertical-align: middle; + transition: transform 0.1s; + font-size: $-collapse-arrow-size; + height: $-collapse-arrow-size; + line-height: $-collapse-arrow-size; + + @include when(retract) { + transform: rotate(-180deg); + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-collapse/types.ts b/uni_modules/wot-design-uni/components/wd-collapse/types.ts new file mode 100644 index 0000000..e2057f8 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-collapse/types.ts @@ -0,0 +1,58 @@ +import { type ComponentPublicInstance, type ExtractPropTypes, type InjectionKey, type PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export type CollapseToggleAllOptions = + | boolean + | { + expanded?: boolean + skipDisabled?: boolean + } + +export type CollapseProvide = { + props: Partial + toggle: (name: string, expanded: boolean) => void +} + +export const COLLAPSE_KEY: InjectionKey = Symbol('wd-collapse') + +export const collapseProps = { + ...baseProps, + /** + * 查看更多模式下的插槽外部自定义样式 + */ + customMoreSlotClass: makeStringProp(''), + /** + * 绑定值 + */ + modelValue: { + type: [String, Array, Boolean] as PropType | boolean> + }, + /** + * 手风琴模式 + */ + accordion: makeBooleanProp(false), + /** + * 查看更多的折叠面板 + */ + viewmore: makeBooleanProp(false), + /** + * 查看更多的自定义插槽使用标志 + */ + useMoreSlot: makeBooleanProp(false), + /** + * 查看更多的折叠面板,收起时的显示行数 + */ + lineNum: makeNumberProp(2) +} + +export type CollapseProps = ExtractPropTypes + +export type CollapseExpose = { + /** + * 切换所有面板展开状态,传 true 为全部展开,false 为全部收起,不传参为全部切换 + * @param options 面板状态 + */ + toggleAll: (options?: CollapseToggleAllOptions) => void +} + +export type CollapseInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-collapse/wd-collapse.vue b/uni_modules/wot-design-uni/components/wd-collapse/wd-collapse.vue new file mode 100644 index 0000000..d39130d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-collapse/wd-collapse.vue @@ -0,0 +1,151 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-config-provider/types.ts b/uni_modules/wot-design-uni/components/wd-config-provider/types.ts new file mode 100644 index 0000000..cb8f0b9 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-config-provider/types.ts @@ -0,0 +1,1052 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { makeStringProp, baseProps } from '../common/props' + +export type ConfigProviderTheme = 'light' | 'dark' + +export const configProviderProps = { + ...baseProps, + /** + * 主题风格,设置为 dark 来开启深色模式,全局生效 + */ + theme: makeStringProp('light'), + /** + * 自定义主题变量 + */ + themeVars: { + type: Object as PropType, + default: () => ({}) + } +} + +export type ConfigProviderProps = ExtractPropTypes + +export type baseThemeVars = { + colorTheme?: string // 主题色 + colorWhite?: string // 用于mix的白色 + colorBlack?: string // 用于mix的黑色 + colorSuccess?: string // 成功色 + colorWarning?: string // 警告色 + colorDanger?: string // 危险出错色 + colorPurple?: string // 紫色 + colorYellow?: string // 黄色 + colorBlue?: string // 蓝色 + colorInfo?: string // 信息色 + colorGray1?: string // 灰色1 + colorGray2?: string // 灰色2 + colorGray3?: string // 灰色3 + colorGray4?: string // 灰色4 + colorGray5?: string // 灰色5 + colorGray6?: string // 灰色6 + colorGray7?: string // 灰色7 + colorGray8?: string // 灰色8 + fontGray1?: string // 字体灰色1 + fontGray2?: string // 字体灰色2 + fontGray3?: string // 字体灰色3 + fontGray4?: string // 字体灰色4 + fontWhite1?: string // 字体白色1 + fontWhite2?: string // 字体白色2 + fontWhite3?: string // 字体白色3 + fontWhite4?: string // 字体白色4 + colorTitle?: string // 模块标题/重要正文 + colorContent?: string // 普通正文 + colorSecondary?: string // 次要信息,注释/补充/正文 + colorAid?: string // 辅助文字字号,弱化信息,引导性/不可点文字 + colorTip?: string // 失效、默认提示文字 + colorBorder?: string // 控件边框线 + colorBorderLight?: string // 分割线颜色 + colorBg?: string // 背景色、禁用填充色 + darkBackground?: string // 深色背景1 + darkBackground2?: string // 深色背景2 + darkBackground3?: string // 深色背景3 + darkBackground4?: string // 深色背景4 + darkBackground5?: string // 深色背景5 + darkBackground6?: string // 深色背景6 + darkBackground7?: string // 深色背景7 + darkColor?: string // 深色字体1 + darkColor2?: string // 深色字体2 + darkColor3?: string // 深色字体3 + darkColorGray?: string // 深色灰色 + darkBorderColor?: string // 深色边框颜色 + colorIcon?: string // icon颜色 + colorIconActive?: string // icon颜色hover + colorIconDisabled?: string // icon颜色disabled + fsBig?: string // 大型标题字号 + fsImportant?: string // 重要数据字号 + fsTitle?: string // 标题字号/重要正文字号 + fsContent?: string // 普通正文字号 + fsSecondary?: string // 次要信息字号 + fsAid?: string // 辅助文字字号 + fwMedium?: string // 字重500 + fwSemibold?: string // 字重600 + sizeSidePadding?: string // 屏幕两边留白padding +} + +export type actionSheetThemeVars = { + actionSheetWeight?: string + actionSheetRadius?: string + actionSheetLoadingSize?: string + actionSheetActionHeight?: string + actionSheetColor?: string + actionSheetFs?: string + actionSheetActiveColor?: string + actionSheetSubnameFs?: string + actionSheetSubnameColor?: string + actionSheetDisabledColor?: string + actionSheetBg?: string + actionSheetTitleHeight?: string + actionSheetTitleFs?: string + actionSheetCloseFs?: string + actionSheetCloseColor?: string + actionSheetCloseTop?: string + actionSheetCloseRight?: string + actionSheetCancelColor?: string + actionSheetCancelHeight?: string + actionSheetCancelBg?: string + actionSheetCancelRadius?: string + actionSheetPanelPadding?: string + actionSheetPanelImgFs?: string + actionSheetPanelImgRadius?: string +} + +export type badgeThemeVars = { + badgeBg?: string + badgeColor?: string + badgeFs?: string + badgePadding?: string + badgeHeight?: string + badgePrimary?: string + badgeSuccess?: string + badgeWarning?: string + badgeDanger?: string + badgeInfo?: string + badgeDotSize?: string + badgeBorder?: string +} + +export type buttonThemeVars = { + buttonDisabledOpacity?: string + buttonSmallHeight?: string + buttonSmallPadding?: string + buttonSmallFs?: string + buttonSmallRadius?: string + buttonSmallLoading?: string + buttonMediumHeight?: string + buttonMediumPadding?: string + buttonMediumFs?: string + buttonMediumRadius?: string + buttonMediumLoading?: string + buttonMediumBoxShadowSize?: string + buttonLargeHeight?: string + buttonLargePadding?: string + buttonLargeFs?: string + buttonLargeRadius?: string + buttonLargeLoading?: string + buttonLargeBoxShadowSize?: string + buttonIconFs?: string + buttonIconSize?: string + buttonIconColor?: string + buttonIconDisabledColor?: string + buttonNormalColor?: string + buttonNormalDisabledColor?: string + buttonPlainBgColor?: string + buttonPrimaryColor?: string + buttonPrimaryBgColor?: string + buttonSuccessColor?: string + buttonSuccessBgColor?: string + buttonInfoColor?: string + buttonInfoBgColor?: string + buttonInfoPlainBorderColor?: string + buttonInfoPlainNormalColor?: string + buttonWarningColor?: string + buttonWarningBgColor?: string + buttonErrorColor?: string + buttonErrorBgColor?: string + buttonTextHoverOpacity?: string +} + +export type cellThemeVars = { + cellPadding?: string + cellLineHeight?: string + cellGroupTitleFs?: string + cellGroupPadding?: string + cellGroupTitleColor?: string + cellGroupValueFs?: string + cellGroupValueColor?: string + cellWrapperPadding?: string + cellWrapperPaddingLarge?: string + cellWrapperPaddingWithLabel?: string + cellIconRight?: string + cellIconSize?: string + cellTitleFs?: string + cellTitleColor?: string + cellLabelFs?: string + cellLabelColor?: string + cellValueFs?: string + cellValueFsLarge?: string + cellValueColor?: string + cellArrowSize?: string + cellArrowColor?: string + cellClearColor?: string + cellTapBg?: string + cellTitleFsLarge?: string + cellLabelFsLarge?: string + cellIconSizeLarge?: string + cellRequiredColor?: string + cellRequiredSize?: string + cellRequiredMargin?: string + cellVerticalTop?: string +} + +export type calendarThemeVars = { + calendarFs?: string + calendarPanelPadding?: string + calendarPanelTitleFs?: string + calendarPanelTitleColor?: string + calendarWeekColor?: string + calendarWeekHeight?: string + calendarWeekFs?: string + calendarDayFs?: string + calendarDayColor?: string + calendarDayFw?: string + calendarDayHeight?: string + calendarMonthWidth?: string + calendarActiveColor?: string + calendarSelectedColor?: string + calendarDisabledColor?: string + calendarRangeColor?: string + calendarActiveBorder?: string + calendarInfoFs?: string + calendarItemMarginBottom?: string +} + +export type checkboxThemeVars = { + checkboxMargin?: string + checkboxBg?: string + checkboxLabelMargin?: string + checkboxSize?: string + checkboxIconSize?: string + checkboxBorderColor?: string + checkboxCheckColor?: string + checkboxLabelFs?: string + checkboxLabelColor?: string + checkboxCheckedColor?: string + checkboxDisabledColor?: string + checkboxDisabledLabelColor?: string + checkboxDisabledCheckColor?: string + checkboxDisabledCheckBg?: string + checkboxSquareRadius?: string + checkboxLargeSize?: string + checkboxLargeLabelFs?: string + checkboxButtonHeight?: string + checkboxButtonMinWidth?: string + checkboxButtonRadius?: string + checkboxButtonBg?: string + checkboxButtonFontSize?: string + checkboxButtonBorder?: string + checkboxButtonDisabledBorder?: string +} + +export type collapseThemeVars = { + collapseSidePadding?: string + collapseBodyPadding?: string + collapseHeaderPadding?: string + collapseTitleColor?: string + collapseTitleFs?: string + collapseArrowSize?: string + collapseArrowColor?: string + collapseBodyFs?: string + collapseBodyColor?: string + collapseDisabledColor?: string + collapseRetractFs?: string + collapseMoreColor?: string +} + +export type dividerThemeVars = { + dividerPadding?: string + dividerMargin?: string + dividerColor?: string + dividerLineColor?: string + dividerLineHeight?: string + dividerFs?: string + dividerContentLeftWidth?: string + dividerContentLeftMargin?: string + dividerContentRightMargin?: string + dividerContentRightWidth?: string + dividerVerticalHeight?: string + dividerVerticalContentMargin?: string + dividerVerticalLineWidth?: string +} + +export type dropMenuThemeVars = { + dropMenuHeight?: string + dropMenuColor?: string + dropMenuFs?: string + dropMenuArrowFs?: string + dropMenuSidePadding?: string + dropMenuDisabledColor?: string + dropMenuItemHeight?: string + dropMenuItemColor?: string + dropMenuItemFs?: string + dropMenuItemColorActive?: string + dropMenuItemColorTip?: string + dropMenuItemFsTip?: string + dropMenuOptionCheckSize?: string + dropMenuLineColor?: string + dropMenuLineHeight?: string +} + +export type inputNumberThemeVars = { + inputNumberColor?: string + inputNumberBorderColor?: string + inputNumberDisabledColor?: string + inputNumberHeight?: string + inputNumberBtnWidth?: string + inputNumberInputWidth?: string + inputNumberRadius?: string + inputNumberFs?: string + inputNumberIconSize?: string + inputNumberIconColor?: string +} + +export type inputThemeVars = { + inputPadding?: string + inputBorderColor?: string + inputNotEmptyBorderColor?: string + inputFs?: string + inputFsLarge?: string + inputIconMargin?: string + inputColor?: string + inputPlaceholderColor?: string + inputDisabledColor?: string + inputErrorColor?: string + inputIconColor?: string + inputClearColor?: string + inputCountColor?: string + inputCountCurrentColor?: string + inputBg?: string + inputCellBg?: string + inputCellBorderColor?: string + inputCellPadding?: string + inputCellPaddingLarge?: string + inputCellHeight?: string + inputCellLabelWidth?: string + inputInnerHeight?: string + inputInnerHeightNoBorder?: string + inputCountFs?: string + inputCountFsLarge?: string + inputIconSize?: string + inputIconSizeLarge?: string +} + +export type textareaThemeVars = { + textareaPadding?: string + textareaBorderColor?: string + textareaNotEmptyBorderColor?: string + textareaFs?: string + textareaFsLarge?: string + textareaIconMargin?: string + textareaColor?: string + textareaIconColor?: string + textareaClearColor?: string + textareaCountColor?: string + textareaCountCurrentColor?: string + textareaBg?: string + textareaCellBorderColor?: string + textareaCellPadding?: string + textareaCellPaddingLarge?: string + textareaCellHeight?: string + textareaCountFs?: string + textareaCountFsLarge?: string + textareaIconSize?: string + textareaIconSizeLarge?: string +} + +export type loadmoreThemeVars = { + loadmoreHeight?: string + loadmoreColor?: string + loadmoreFs?: string + loadmoreErrorColor?: string + loadmoreRefreshFs?: string + loadmoreLoadingSize?: string +} + +export type messageBoxThemeVars = { + messageBoxWidth?: string + messageBoxBg?: string + messageBoxRadius?: string + messageBoxPadding?: string + messageBoxTitleFs?: string + messageBoxTitleColor?: string + messageBoxContentFs?: string + messageBoxContentColor?: string + messageBoxContentMaxHeight?: string + messageBoxContentScrollbarWidth?: string + messageBoxContentScrollbarColor?: string + messageBoxInputErrorColor?: string +} + +export type noticeBarThemeVars = { + noticeBarFs?: string + noticeBarLineHeight?: string + noticeBarBorderRadius?: string + noticeBarPadding?: string + noticeBarWarningBg?: string + noticeBarInfoBg?: string + noticeBarDangerBg?: string + noticeBarWarningColor?: string + noticeBarInfoColor?: string + noticeBarDangerColor?: string + noticeBarPrefixSize?: string + noticeBarCloseBg?: string + noticeBarCloseSize?: string + noticeBarCloseColor?: string + noticeBarWrapPadding?: string +} + +export type paginationThemeVars = { + paginationContentPadding?: string + paginationMessagePadding?: string + paginationMessageFs?: string + paginationMessageColor?: string + paginationNavBorder?: string + paginationNavBorderRadius?: string + paginationNavFs?: string + paginationNavWidth?: string + paginationNavColor?: string + paginationNavContentFs?: string + paginationNavSepatatorPadding?: string + paginationNavCurrentColor?: string + paginationIconSize?: string +} + +export type pickerThemeVars = { + pickerToolbarHeight?: string + pickerActionHeight?: string + pickerToolbarFinishColor?: string + pickerToolbarCancelColor?: string + pickerToolbarFs?: string + pickerToolbarTitleColor?: string + pickerColumnFs?: string + pickerBg?: string + pickerColumnActiveFs?: string + pickerColumnColor?: string + pickerColumnHeight?: string + pickerColumnItemHeight?: string + pickerColumnSelectBg?: string + pickerLoadingButtonColor?: string + pickerColumnPadding?: string + pickerColumnDisabledColor?: string + pickerMask?: string + pickerLoadingBg?: string + pickerRegionSeparatorColor?: string + pickerCellArrowSizeLarge?: string + pickerRegionColor?: string + pickerRegionBgActiveColor?: string + pickerRegionFs?: string +} + +export type colPickerThemeVars = { + colPickerSelectedHeight?: string + colPickerSelectedPadding?: string + colPickerSelectedFs?: string + colPickerSelectedColor?: string + colPickerSelectedFw?: string + colPickerLineWidth?: string + colPickerLineHeight?: string + colPickerLineColor?: string + colPickerLineBoxShadow?: string + colPickerListHeight?: string + colPickerListPaddingBottom?: string + colPickerListColor?: string + colPickerListColorDisabled?: string + colPickerListColorTip?: string + colPickerListFs?: string + colPickerListFsTip?: string + colPickerListItemPadding?: string + colPickerListCheckedIconSize?: string + colPickerListColorChecked?: string +} + +export type overlayThemeVars = { + overlayBg?: string + overlayBgDark?: string +} + +export type popupThemeVars = { + popupCloseSize?: string + popupCloseColor?: string +} + +export type progressThemeVars = { + progressPadding?: string + progressBg?: string + progressDangerColor?: string + progressSuccessColor?: string + progressWarningColor?: string + progressColor?: string + progressHeight?: string + progressLabelColor?: string + progressLabelFs?: string + progressIconFs?: string +} + +export type radioThemeVars = { + radioMargin?: string + radioLabelMargin?: string + radioSize?: string + radioBg?: string + radioLabelFs?: string + radioLabelColor?: string + radioCheckedColor?: string + radioDisabledColor?: string + radioDisabledLabelColor?: string + radioLargeSize?: string + radioLargeLabelFs?: string + radioButtonHeight?: string + radioButtonMinWidth?: string + radioButtonMaxWidth?: string + radioButtonRadius?: string + radioButtonBg?: string + radioButtonFs?: string + radioButtonBorder?: string + radioButtonDisabledBorder?: string + radioDotSize?: string + radioDotLargeSize?: string + radioDotCheckedBg?: string + radioDotCheckedBorderColor?: string + radioDotBorderColor?: string + radioDotDisabledBorder?: string + radioDotDisabledBg?: string +} + +export type searchThemeVars = { + searchSidePadding?: string + searchPadding?: string + searchInputRadius?: string + searchInputBg?: string + searchInputHeight?: string + searchInputPadding?: string + searchInputFs?: string + searchInputColor?: string + searchIconColor?: string + searchIconSize?: string + searchClearIconSize?: string + searchPlaceholderColor?: string + searchCancelPadding?: string + searchCancelFs?: string + searchCancelColor?: string + searchLightBg?: string +} + +export type sliderThemeVars = { + sliderFs?: string + sliderHandleRadius?: string + sliderHandleBg?: string + sliderAxieHeight?: string + sliderColor?: string + sliderAxieBg?: string + sliderLineColor?: string + sliderDisabledColor?: string +} + +export type sortButtonThemeVars = { + sortButtonFs?: string + sortButtonColor?: string + sortButtonHeight?: string + sortButtonLineHeight?: string + sortButtonLineColor?: string +} + +export type stepsThemeVars = { + stepsIconSize?: string + stepsInactiveColor?: string + stepsFinishedColor?: string + stepsIconTextFs?: string + stepsErrorColor?: string + stepsTitleFs?: string + stepsTitleFw?: string + stepsLabelFs?: string + stepsDescriptionColor?: string + stepsIsIconWidth?: string + stepsLineColor?: string + stepsDotSize?: string + stepsDotActiveSize?: string +} + +export type switchThemeVars = { + switchSize?: string + switchWidth?: string + switchHeight?: string + switchCircleSize?: string + switchBorderColor?: string + switchActiveColor?: string + switchActiveShadowColor?: string + switchInactiveColor?: string + switchInactiveShadowColor?: string +} + +export type tabsThemeVars = { + tabsNavArrowFs?: string + tabsNavArrowOpenFs?: string + tabsNavWidth?: string + tabsNavHeight?: string + tabsNavFs?: string + tabsNavColor?: string + tabsNavBg?: string + tabsNavActiveColor?: string + tabsNavDisabledColor?: string + tabsNavLineHeight?: string + tabsNavLineWidth?: string + tabsNavLineBgColor?: string + tabsNavMapFs?: string + tabsNavMapColor?: string + tabsNavMapArrowColor?: string + tabsNavMapBtnBeforeBg?: string + tabsNavMapButtonBackColor?: string + tabsNavMapButtonRadius?: string + tabsNavMapModalBg?: string +} + +export type tagThemeVars = { + tagFs?: string + tagColor?: string + tagSmallFs?: string + tagInfoColor?: string + tagPrimaryColor?: string + tagDangerColor?: string + tagWarningColor?: string + tagSuccessColor?: string + tagInfoBg?: string + tagPrimaryBg?: string + tagDangerBg?: string + tagWarningBg?: string + tagSuccessBg?: string + tagRoundColor?: string + tagRoundBorderColor?: string + tagRoundRadius?: string + tagMarkRadius?: string + tagCloseSize?: string + tagCloseColor?: string + tagCloseActiveColor?: string +} + +export type toastThemeVars = { + toastColor?: string + toastPadding?: string + toastMaxWidth?: string + toastRadius?: string + toastBg?: string + toastFs?: string + toastLineHeight?: string + toastWithIconMinWidth?: string + toastIconSize?: string + toastIconMarginRight?: string + toastIconMarginBottom?: string + toastLoadingPadding?: string + toastLoadingMarginBottom?: string + toastBoxShadow?: string +} + +export type loadingThemeVars = { + loadingSize?: string +} + +export type tooltipThemeVars = { + tooltipBg?: string + tooltipColor?: string + tooltipRadius?: string + tooltipArrowSize?: string + tooltipFs?: string + tooltipBlur?: string + tooltipPadding?: string + tooltipCloseSize?: string + tooltipZIndex?: string + tooltipLineHeight?: string +} + +export type popoverThemeVars = { + popoverBg?: string + popoverColor?: string + popoverBoxShadow?: string + popoverArrowBoxShadow?: string + popoverBorderColor?: string + popoverRadius?: string + popoverArrowSize?: string + popoverFs?: string + popoverPadding?: string + popoverLineHeight?: string + popoverZIndex?: string +} + +export type gridItemThemeVars = { + gridItemFs?: string + gridItemBg?: string + gridItemPadding?: string + gridItemBorderColor?: string + gridItemHoverBg?: string + gridItemHoverBgDark?: string +} + +export type statustipThemeVars = { + statustipFs?: string + statustipColor?: string + statustipLineHeight?: string + statustipPadding?: string +} + +export type cardThemeVars = { + cardBg?: string + cardFs?: string + cardPadding?: string + cardFooterPadding?: string + cardShadowColor?: string + cardRadius?: string + cardLineHeight?: string + cardMargin?: string + cardTitleColor?: string + cardTitleFs?: string + cardContentBorderColor?: string + cardRectangleTitlePadding?: string + cardRectangleContentPadding?: string + cardRectangleFooterPadding?: string + cardContentColor?: string + cardContentLineHeight?: string + cardContentMargin?: string + cardContentRectangleMargin?: string +} + +export type uploadThemeVars = { + uploadSize?: string + uploadEvokeIconSize?: string + uploadEvokeBg?: string + uploadEvokeColor?: string + uploadEvokeDisabledColor?: string + uploadCloseIconSize?: string + uploadCloseIconColor?: string + uploadProgressFs?: string + uploadFileFs?: string + uploadFileColor?: string + uploadPreviewNameFs?: string + uploadPreviewIconSize?: string + uploadPreviewNameBg?: string + uploadPreviewNameHeight?: string + uploadCoverIconSize?: string +} + +export type curtainThemeVars = { + curtainContentRadius?: string + curtainContentCloseColor?: string + curtainContentCloseFs?: string +} + +export type notifyThemeVars = { + notifyTextColor?: string + notifyPadding?: string + notifyFontSize?: string + notifyLineHeight?: string + notifyPrimaryBackground?: string + notifySuccessBackground?: string + notifyDangerBackground?: string + notifyWarningBackground?: string +} + +export type skeletonThemeVars = { + skeletonBackgroundColor?: string + skeletonAnimationGradient?: string + skeletonAnimationFlashed?: string + skeletonTextHeightDefault?: string + skeletonRectHeightDefault?: string + skeletonCircleHeightDefault?: string + skeletonRowMarginBottom?: string + skeletonBorderRadiusText?: string + skeletonBorderRadiusRect?: string + skeletonBorderRadiusCircle?: string +} + +export type circleThemeVars = { + circleTextColor?: string +} + +export type swiperThemeVars = { + swiperRadius?: string + swiperItemPadding?: string + swiperItemTextColor?: string + swiperItemTextFs?: string +} + +export type swiperNavThemeVars = { + swiperNavDotColor?: string + swiperNavDotActiveColor?: string + swiperNavDotSize?: string + swiperNavDotsBarActiveWidth?: string + swiperNavFractionColor?: string + swiperNavFractionBgColor?: string + swiperNavFractionHeight?: string + swiperNavFractionFontSize?: string + swiperNavBtnColor?: string + swiperNavBtnBgColor?: string + swiperNavBtnSize?: string +} + +export type segmentedThemeVars = { + segmentedPadding?: string + segmentedItemBgColor?: string + segmentedItemColor?: string + segmentedItemAcitveBg?: string + segmentedItemDisabledColor?: string +} + +export type tabbarThemeVars = { + tabbarHeight?: string + tabbarBoxShadow?: string +} + +export type tabbarItemThemeVars = { + tabbarItemTitleFontSize?: string + tabbarItemTitleLineHeight?: string + tabbarInactiveColor?: string + tabbarActiveColor?: string + tabbarItemIconSize?: string +} + +export type navbarThemeVars = { + navbarHeight?: string + navbarColor?: string + navbarBackground?: string + navbarArrowSize?: string + navbarDescFontSize?: string + navbarDescFontColor?: string + navbarTitleFontSize?: string + navbarTitleFontWeight?: string + navbarDisabledOpacity?: string + navbarHoverColor?: string +} + +export type navbarCapsuleThemeVars = { + navbarCapsuleBorderColor?: string + navbarCapsuleBorderRadius?: string + navbarCapsuleWidth?: string + navbarCapsuleHeight?: string + navbarCapsuleIconSize?: string +} + +export type tableThemeVars = { + tableColor?: string + tableBg?: string + tableStripeBg?: string + tableBorderColor?: string + tableFontSize?: string +} + +export type sidebarThemeVars = { + sidebarBg?: string + sidebarWidth?: string + sidebarHeight?: string +} + +export type sidebarItemThemeVars = { + sidebarColor?: string + sidebarItemHeight?: string + sidebarItemLineHeight?: string + sidebarDisabledColor?: string + sidebarActiveColor?: string + sidebarActiveBg?: string + sidebarHoverBg?: string + sidebarBorderRadius?: string + sidebarFontSize?: string + sidebarIconSize?: string + sidebarActiveBorderWidth?: string + sidebarActiveBorderHeight?: string +} + +export type fabThemeVars = { + fabTriggerHeight?: string + fabTriggerWidth?: string + fabActionsPadding?: string + fabIconFs?: string +} + +export type countDownThemeVars = { + countDownTextColor?: string + countDownFontSize?: string + countDownLineHeight?: string +} + +export type keyboardThemeVars = { + keyboardKeyHeight?: string + keyboardKeyFontSize?: string + keyboardKeyBackground?: string + keyboardKeyBorderRadius?: string + keyboardDeleteFontSize?: string + keyboardKeyActiveColor?: string + keyboardButtonTextColor?: string + keyboardButtonBackground?: string + keyboardButtonActiveOpacity?: string + keyboardBackground?: string + keyboardTitleHeight?: string + keyboardTitleColor?: string + keyboardTitleFontSize?: string + keyboardClosePadding?: string + keyboardCloseColor?: string + keyboardCloseFontSize?: string + keyboardIconSize?: string +} + +export type numberKeyboardThemeVars = { + numberKeyboardKeyHeight?: string + numberKeyboardKeyFontSize?: string + numberKeyboardKeyBackground?: string + numberKeyboardKeyBorderRadius?: string + numberKeyboardDeleteFontSize?: string + numberKeyboardKeyActiveColor?: string + numberKeyboardButtonTextColor?: string + numberKeyboardButtonBackground?: string + numberKeyboardButtonActiveOpacity?: string + numberKeyboardBackground?: string + numberKeyboardTitleHeight?: string + numberKeyboardTitleColor?: string + numberKeyboardTitleFontSize?: string + numberKeyboardClosePadding?: string + numberKeyboardCloseColor?: string + numberKeyboardCloseFontSize?: string + numberKeyboardIconSize?: string +} + +export type passwodInputThemeVars = { + passwordInputHeight?: string + passwordInputMargin?: string + passwordInputFontSize?: string + passwordInputRadius?: string + passwordInputBackground?: string + passwordInputInfoColor?: string + passwordInputInfoFontSize?: string + passwordInputBorderColor?: string + passwordInputErrorInfoColor?: string + passwordInputDotSize?: string + passwordInputDotColor?: string + passwordInputTextColor?: string + passwordInputCursorColor?: string + passwordInputCursorWidth?: string + passwordInputCursorHeight?: string + passwordInputCursorDuration?: string +} + +export type formItemThemeVars = { + formItemErrorMessageColor?: string + formItemErrorMessageFontSize?: string + formItemErrorMessageLineHeight?: string +} + +export type backtopThemeVars = { + backtopBg?: string + backtopIconSize?: string +} + +export type indexBarThemeVars = { + indexBarIndexFontSize?: string +} + +export type textThemeVars = { + textInfoColor?: string + textPrimaryColor?: string + textErrorColor?: string + textWarningColor?: string + textSuccessColor?: string +} + +export type videoPreviewThemeVars = { + videoPreviewBg?: string + videoPreviewCloseColor?: string + videoPreviewCloseFontSize?: string +} + +export type imgCropperThemeVars = { + imgCropperIconSize?: string + imgCropperIconColor?: string +} + +export type floatingPanelThemeVars = { + floatingPanelBg?: string + floatingPanelRadius?: string + floatingPanelZIndex?: string + floatingPanelHeaderHeight?: string + floatingPanelBarWidth?: string + floatingPanelBarHeight?: string + floatingPanelBarBg?: string + floatingPanelBarRadius?: string + floatingPanelContentBg?: string +} + +export type signatureThemeVars = { + signatureBg?: string + signatureRadius?: string + signatureBorder?: string + signatureFooterMarginTop?: string + signatureButtonMarginLeft?: string +} + +export type ConfigProviderThemeVars = baseThemeVars & + actionSheetThemeVars & + badgeThemeVars & + buttonThemeVars & + cellThemeVars & + calendarThemeVars & + checkboxThemeVars & + collapseThemeVars & + dividerThemeVars & + dropMenuThemeVars & + inputNumberThemeVars & + inputThemeVars & + textareaThemeVars & + loadmoreThemeVars & + messageBoxThemeVars & + noticeBarThemeVars & + paginationThemeVars & + pickerThemeVars & + colPickerThemeVars & + overlayThemeVars & + popupThemeVars & + progressThemeVars & + radioThemeVars & + searchThemeVars & + sliderThemeVars & + sortButtonThemeVars & + stepsThemeVars & + switchThemeVars & + tabsThemeVars & + tagThemeVars & + toastThemeVars & + loadingThemeVars & + tooltipThemeVars & + popoverThemeVars & + gridItemThemeVars & + statustipThemeVars & + cardThemeVars & + uploadThemeVars & + curtainThemeVars & + notifyThemeVars & + skeletonThemeVars & + circleThemeVars & + swiperThemeVars & + swiperNavThemeVars & + segmentedThemeVars & + tabbarThemeVars & + tabbarItemThemeVars & + navbarThemeVars & + navbarCapsuleThemeVars & + tableThemeVars & + sidebarThemeVars & + sidebarItemThemeVars & + fabThemeVars & + countDownThemeVars & + keyboardThemeVars & + numberKeyboardThemeVars & + passwodInputThemeVars & + formItemThemeVars & + backtopThemeVars & + indexBarThemeVars & + textThemeVars & + videoPreviewThemeVars & + imgCropperThemeVars & + floatingPanelThemeVars & + signatureThemeVars diff --git a/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue b/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue new file mode 100644 index 0000000..482980b --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-config-provider/wd-config-provider.vue @@ -0,0 +1,82 @@ + + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-count-down/index.scss b/uni_modules/wot-design-uni/components/wd-count-down/index.scss new file mode 100644 index 0000000..c9b93f1 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-count-down/index.scss @@ -0,0 +1,15 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(count-down) { + color: $-dark-color; + } +} + + +@include b(count-down) { + color: $-count-down-text-color; + font-size: $-count-down-font-size; + line-height: $-count-down-line-height; +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-count-down/types.ts b/uni_modules/wot-design-uni/components/wd-count-down/types.ts new file mode 100644 index 0000000..7f1bdd7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-count-down/types.ts @@ -0,0 +1,41 @@ +import type { ComponentPublicInstance, ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeRequiredProp, makeStringProp } from '../common/props' + +export const countDownProps = { + ...baseProps, + /** + * 倒计时时长,单位毫秒 + */ + time: makeRequiredProp(Number), + /** + * 是否开启毫秒 + */ + millisecond: makeBooleanProp(false), + /** + * 格式化时间 + */ + format: makeStringProp('HH:mm:ss'), + /** + * 是否自动开始 + */ + autoStart: makeBooleanProp(true) +} + +export type CountDownProps = ExtractPropTypes + +export type CountDownExpose = { + /** + * 开始倒计时 + */ + start: () => void + /** + * 暂停倒计时 + */ + pause: () => void + /** + * 重设倒计时,若 auto-start 为 true,重设后会自动开始倒计时 + */ + reset: () => void +} + +export type CountDownInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-count-down/utils.ts b/uni_modules/wot-design-uni/components/wd-count-down/utils.ts new file mode 100644 index 0000000..efa6200 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-count-down/utils.ts @@ -0,0 +1,52 @@ +import { padZero } from '../common/util' + +export type TimeData = { + days: number + hours: number + minutes: number + seconds: number + milliseconds: number +} + +export function parseFormat(format: string, timeData: TimeData): string { + const { days } = timeData + let { hours, minutes, seconds, milliseconds } = timeData + + if (format.includes('DD')) { + format = format.replace('DD', padZero(days)) + } else { + hours += days * 24 + } + + if (format.includes('HH')) { + format = format.replace('HH', padZero(hours)) + } else { + minutes += hours * 60 + } + + if (format.includes('mm')) { + format = format.replace('mm', padZero(minutes)) + } else { + seconds += minutes * 60 + } + + if (format.includes('ss')) { + format = format.replace('ss', padZero(seconds)) + } else { + milliseconds += seconds * 1000 + } + + if (format.includes('S')) { + const ms = padZero(milliseconds, 3) + + if (format.includes('SSS')) { + format = format.replace('SSS', ms) + } else if (format.includes('SS')) { + format = format.replace('SS', ms.slice(0, 2)) + } else { + format = format.replace('S', ms.charAt(0)) + } + } + + return format +} diff --git a/uni_modules/wot-design-uni/components/wd-count-down/wd-count-down.vue b/uni_modules/wot-design-uni/components/wd-count-down/wd-count-down.vue new file mode 100644 index 0000000..04c10f4 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-count-down/wd-count-down.vue @@ -0,0 +1,60 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-count-to/index.scss b/uni_modules/wot-design-uni/components/wd-count-to/index.scss new file mode 100644 index 0000000..0a96178 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-count-to/index.scss @@ -0,0 +1,7 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + + +.wd-count-to{ + vertical-align: bottom; +} diff --git a/uni_modules/wot-design-uni/components/wd-count-to/types.ts b/uni_modules/wot-design-uni/components/wd-count-to/types.ts new file mode 100644 index 0000000..5cd17ee --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-count-to/types.ts @@ -0,0 +1,117 @@ +import type { ComponentPublicInstance, ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' +import type { TextType } from '../wd-text/types' + +export const countToProps = { + ...baseProps, + + // 字体大小 + fontSize: makeNumberProp(16), + + // 文本颜色 + color: makeStringProp(''), + /** + * 主题类型 + * 类型:string + * 可选值:'default' /'primary' / 'error' / 'warning' / 'success' + * 默认值:'default' + */ + type: makeStringProp('default'), + /** + * 起始值 + * 类型:number + * 默认值:0 + */ + startVal: makeNumberProp(0), + + /** + * 最终值 + * 类型:number + * 默认值:2021 + */ + endVal: makeNumberProp(2024), + + /** + * 从起始值到结束值数字变动的时间,单位毫秒 + * 类型:number + * 默认值:3000 + */ + duration: makeNumberProp(3000), + /** + * 是否自动开始 + * 类型:boolean + * 默认值:true + */ + autoStart: makeBooleanProp(true), + /** + * 保留的小数位数 + * 类型:number + * 默认值:0 + * 校验:大于等于0 + */ + decimals: { + type: Number, + required: false, + default: 0, + validator(value: number) { + return value >= 0 + } + }, + + // 小数点 + decimal: makeStringProp('.'), + + // 三位三位的隔开效果 + separator: makeStringProp(','), + + /** + * 前缀 + * 类型:string + * 默认值:'' + * @example '¥' 人民币前缀 + */ + prefix: makeStringProp(''), + + /** + * 后缀 + * 类型:string + * 默认值:'' + */ + suffix: makeStringProp(''), + + /** + * 是否具有连贯性 + * 类型:boolean + * 默认值:true + */ + useEasing: makeBooleanProp(true), + + /** + * 自定义根节点样式 + */ + customStyle: makeStringProp(''), + + /** + * 自定义根节点样式类 + */ + customClass: makeStringProp('') +} + +export type CountDownProps = ExtractPropTypes + +export type CountUpExpose = { + /** + * 开始倒计时 + */ + start: () => void + /** + * 暂停倒计时 + */ + pause: () => void + /** + * 重设倒计时,若 auto-start 为 true,重设后会自动开始倒计时 + */ + reset: () => void +} + +export type CountToInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-count-to/wd-count-to.vue b/uni_modules/wot-design-uni/components/wd-count-to/wd-count-to.vue new file mode 100644 index 0000000..b72f601 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-count-to/wd-count-to.vue @@ -0,0 +1,125 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-curtain/index.scss b/uni_modules/wot-design-uni/components/wd-curtain/index.scss new file mode 100644 index 0000000..4f7c10a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-curtain/index.scss @@ -0,0 +1,85 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +@include b(curtain-wrapper){ + :deep(.wd-curtain){ + display: inline-block; + border-radius: $-curtain-content-radius; + overflow-y: visible !important; + background: transparent; + font-size: 0; + } +} + + +@include b(curtain) { + + @include e(content) { + position: relative; + display: inline-block; + background: transparent; + border-radius: $-curtain-content-radius; + } + @include e(content-link) { + display: block; + border-radius: $-curtain-content-radius; + } + @include e(content-img) { + display: block; + width: auto; + height: auto; + border-radius: $-curtain-content-radius; + } + @include edeep(content-close) { + position: absolute; + margin: 0; + padding: 6px; + top: 10px; + right: 10px; + color: $-curtain-content-close-color; + font-size: $-curtain-content-close-fs; + -webkit-tap-highlight-color: transparent; + &.top { + margin: 0 0 0 -18px; + top: -62px; + right: unset; + left: 50%; + bottom: unset; + } + &.top-left { + margin: 0; + top: -62px; + right: unset; + left: -6px; + bottom: unset; + } + &.top-right { + margin: 0; + top: -62px; + right: -6px; + left: unset; + bottom: unset; + } + &.bottom { + margin: 0 0 0 -18px; + top: unset; + right: unset; + left: 50%; + bottom: -62px; + } + &.bottom-left { + margin: 0; + top: unset; + right: unset; + left: -6px; + bottom: -62px; + } + &.bottom-right { + margin: 0; + top: unset; + right: -6px; + left: unset; + bottom: -62px; + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-curtain/types.ts b/uni_modules/wot-design-uni/components/wd-curtain/types.ts new file mode 100644 index 0000000..ce12a8d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-curtain/types.ts @@ -0,0 +1,82 @@ +/* + * @Author: weisheng + * @Date: 2025-01-25 23:46:29 + * @LastEditTime: 2025-09-09 10:00:00 + * @LastEditors: rusheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts + * 记得注释 + */ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export type ClosePosition = 'inset' | 'top' | 'bottom' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' + +export const curtainProps = { + ...baseProps, + /** + * 绑定值,展示/关闭幕帘 + * @deprecated 请使用 modelValue + */ + value: makeBooleanProp(false), + /** + * 绑定值,展示/关闭幕帘 + */ + modelValue: makeBooleanProp(false), + /** + * 关闭按钮位置,可选值:inset / top / bottom / top-left / top-right / bottom-left / bottom-right + */ + closePosition: makeStringProp('inset'), + /** + * 幕帘图片地址,必须使用网络地址 + */ + src: String, + /** + * 幕帘图片点击链接 + */ + to: String, + /** + * 幕帘图片宽度 + */ + width: Number, + /** + * 点击遮罩是否关闭 + */ + closeOnClickModal: makeBooleanProp(false), + /** + * 是否当关闭时将弹出层隐藏(display: none) + */ + hideWhenClose: makeBooleanProp(true), + /** + * 设置层级 + * 类型:number + * 默认值:10 + */ + zIndex: makeNumberProp(10), + /** + * 自定义关闭按钮的类名 + * 类型:string + * 默认值:'' + */ + customCloseClass: makeStringProp(''), + /** + * 自定义关闭按钮的样式 + * 类型:string + * 默认值:'' + */ + customCloseStyle: makeStringProp(''), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false), + /** + * 开启长按图片显示识别小程序码菜单,仅在微信小程序平台有效 + */ + showMenuByLongpress: makeBooleanProp(false), + /** + * 点击图片是否关闭幕帘,默认为 true + */ + closeOnClick: makeBooleanProp(true) +} + +export type CurtainProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue b/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue new file mode 100644 index 0000000..f646420 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue @@ -0,0 +1,172 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-datetime-picker-view/types.ts b/uni_modules/wot-design-uni/components/wd-datetime-picker-view/types.ts new file mode 100644 index 0000000..8b95e3d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-datetime-picker-view/types.ts @@ -0,0 +1,120 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props' + +export type DateTimeType = 'date' | 'year-month' | 'time' | 'datetime' | 'year' + +export const datetimePickerViewProps = { + ...baseProps, + /** + * 选中项,当 type 为 time 时,类型为字符串,否则为 时间戳 + */ + modelValue: makeRequiredProp([String, Number]), + /** + * 加载中 + */ + loading: makeBooleanProp(false), + /** + * 加载的颜色,只能使用十六进制的色值写法,且不能使用缩写 + */ + loadingColor: makeStringProp('#4D80F0'), + /** + * picker内部滚筒高 + */ + columnsHeight: makeNumberProp(217), + /** + * picker item的高度 + */ + itemHeight: makeNumberProp(35), + /** + * 选项的key + */ + valueKey: makeStringProp('value'), + /** + * 选项的label + */ + labelKey: makeStringProp('label'), + /** + * 选择器类型,可选值:date / year-month / time + */ + type: makeStringProp('datetime'), + /** + * 自定义过滤选项的函数,返回列的选项数组 + */ + filter: Function as PropType, + /** + * 自定义弹出层选项文案的格式化函数,返回一个字符串 + */ + formatter: Function as PropType, + /** + * 自定义列的格式化函数 + */ + columnFormatter: Function as PropType, + /** + * 最小日期 + */ + minDate: makeNumberProp(new Date(new Date().getFullYear() - 10, 0, 1).getTime()), + /** + * 最大日期 + */ + maxDate: makeNumberProp(new Date(new Date().getFullYear() + 10, 11, 31).getTime()), + /** + * 最小小时,time类型时生效 + */ + minHour: makeNumberProp(0), + /** + * 最大小时,time类型时生效 + */ + maxHour: makeNumberProp(23), + /** + * 最小分钟,time类型时生效 + */ + minMinute: makeNumberProp(0), + /** + * 最大分钟,time类型时生效 + */ + maxMinute: makeNumberProp(59), + /** + * 是否显示秒选择,仅在 time 和 datetime 类型下生效 + */ + useSecond: makeBooleanProp(false), + /** + * 最小秒数,仅在 time 和 datetime 类型下生效 + */ + minSecond: makeNumberProp(0), + /** + * 最大秒数,仅在 time 和 datetime 类型下生效 + */ + maxSecond: makeNumberProp(59), + /** + * 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。 + */ + immediateChange: makeBooleanProp(false) +} + +export type DatetimePickerViewColumnType = 'year' | 'month' | 'date' | 'hour' | 'minute' | 'second' + +export type DatetimePickerViewOption = { + label: string + value: number +} + +export type DatetimePickerViewFilter = (type: DatetimePickerViewColumnType, values: number[]) => number[] + +export type DatetimePickerViewFormatter = (type: string, value: string) => string + +export type DatetimePickerViewColumnFormatter = (picker: DatetimePickerViewExpose) => DatetimePickerViewOption[][] + +export type DatetimePickerViewProps = ExtractPropTypes + +export type DatetimePickerViewExpose = { + updateColumns: () => DatetimePickerViewOption[][] + setColumns: (columnList: DatetimePickerViewOption[][]) => void + getSelects: () => Record | Record[] | undefined + correctValue: (value: string | number) => string | number + getOriginColumns: () => { + type: DatetimePickerViewColumnType + values: number[] + }[] +} + +export type DatetimePickerViewInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-datetime-picker-view/util.ts b/uni_modules/wot-design-uni/components/wd-datetime-picker-view/util.ts new file mode 100644 index 0000000..47e8449 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-datetime-picker-view/util.ts @@ -0,0 +1,30 @@ +import { type DateTimeType } from './types' + +/** + * @description 根据传入的值和类型,获取当前的选项数组,便于传入 pickerView + * @param value + * @param type picker类型 + * @param useSecond 是否使用秒,仅在 time 和 datetime 类型下生效 + */ +export function getPickerValue(value: string | number, type: DateTimeType, useSecond: boolean = false) { + const values: number[] = [] + const date = new Date(value) + if (type === 'time') { + const pair = String(value).split(':') + values.push(parseInt(pair[0]), parseInt(pair[1])) + if (useSecond && pair[2]) { + values.push(parseInt(pair[2])) + } + } else { + values.push(date.getFullYear(), date.getMonth() + 1) + if (type === 'date') { + values.push(date.getDate()) + } else if (type === 'datetime') { + values.push(date.getDate(), date.getHours(), date.getMinutes()) + if (useSecond) { + values.push(date.getSeconds()) + } + } + } + return values +} diff --git a/uni_modules/wot-design-uni/components/wd-datetime-picker-view/wd-datetime-picker-view.vue b/uni_modules/wot-design-uni/components/wd-datetime-picker-view/wd-datetime-picker-view.vue new file mode 100644 index 0000000..2d764e6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-datetime-picker-view/wd-datetime-picker-view.vue @@ -0,0 +1,499 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-datetime-picker/index.scss b/uni_modules/wot-design-uni/components/wd-datetime-picker/index.scss new file mode 100644 index 0000000..b92953e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-datetime-picker/index.scss @@ -0,0 +1,164 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(datetime-picker) { + + @include e(placeholder) { + color: $-dark-color-gray; + } + + :deep(.wd-datetime-picker__arrow), + :deep(.wd-datetime-picker__clear) { + color: $-dark-color; + } + + @include e(action) { + @include m(cancel) { + color: $-dark-color; + } + } + + @include e(region) { + color: $-dark-color; + + @include when(active) { + background: $-picker-region-bg-active-color; + color: $-dark-color; + } + } + } +} + + +@include b(datetime-picker) { + @include edeep(cell) { + @include when(disabled) { + .wd-cell__value { + color: $-input-disabled-color; + cursor: not-allowed; + } + } + @include when(error) { + .wd-cell__value { + color: $-input-error-color; + } + .wd-datetime-picker__arrow { + color: $-input-error-color; + } + } + @include when(large) { + .wd-datetime-picker__arrow { + font-size: $-cell-icon-size-large; + } + } + + .wd-cell__value--ellipsis { + view { + @include lineEllipsis; + width: 100%; + } + + text { + @include lineEllipsis; + max-width: 100%; + } + } + } + + @include e(placeholder) { + color: $-input-placeholder-color; + } + + @include edeep(arrow) { + display: block; + font-size: $-cell-icon-size; + color: $-cell-arrow-color; + line-height: $-cell-line-height; + } + + @include edeep(clear) { + display: block; + font-size: $-cell-icon-size; + color: $-cell-clear-color; + line-height: $-cell-line-height; + } + + @include edeep(popup) { + border-radius: 16px 16px 0px 0px; + } + + @include e(wraper) { + padding-bottom: var(--window-bottom); + } + + @include e(toolbar) { + position: relative; + display: flex; + font-size: $-picker-toolbar-fs; + height: $-picker-toolbar-height; + line-height: $-picker-action-height; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + } + + @include e(action) { + display: block; + border: none; + outline: none; + font-size: $-picker-toolbar-fs; + color: $-picker-toolbar-finish-color; + background: transparent; + padding: 24px 15px 14px 15px; + + @include m(cancel) { + color: $-picker-toolbar-cancel-color; + } + + @include when(loading) { + color: $-picker-loading-button-color; + } + } + @include e(title) { + display: block; + float: 1; + color: $-picker-toolbar-title-color; + } + + @include e(region-tabs) { + display: flex; + } + + @include e(region) { + width: 50%; + display: inline-block; + color: $-picker-region-color; + text-align: center; + padding: 14px 0; + font-size: $-picker-region-fs; + line-height: 16px; + transition: all 0.15s ease-out; + + @include when(active) { + background: $-picker-region-bg-active-color; + color: $-color-white; + } + } + + @include e(region-time) { + font-size: 16px; + margin-top: 2px; + } + + @include e(hidden) { + visibility: hidden; + overflow: hidden; + height: 0; + } + + @include e(show) { + visibility: visible; + height: auto; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-datetime-picker/types.ts b/uni_modules/wot-design-uni/components/wd-datetime-picker/types.ts new file mode 100644 index 0000000..3056a2f --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-datetime-picker/types.ts @@ -0,0 +1,231 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props' +import type { DateTimeType, DatetimePickerViewFilter, DatetimePickerViewFormatter } from '../wd-datetime-picker-view/types' +import type { FormItemRule } from '../wd-form/types' + +export const datetimePickerProps = { + ...baseProps, + /** + * 选择器左侧文案,label可以不传 + */ + label: String, + /** + * 选择器占位符 + */ + placeholder: String, + /** + * 禁用 + */ + disabled: makeBooleanProp(false), + /** + * 只读 + */ + readonly: makeBooleanProp(false), + /** + * 加载中 + */ + loading: makeBooleanProp(false), + /** + * 加载的颜色,只能使用十六进制的色值写法,且不能使用缩写 + */ + loadingColor: makeStringProp('#4D80F0'), + /** + * 弹出层标题 + */ + title: String, + /** + * 取消按钮文案 + */ + cancelButtonText: String, + /** + * 确认按钮文案 + */ + confirmButtonText: String, + /** + * 是否必填 + */ + required: makeBooleanProp(false), + /** + * 设置选择器大小,可选值:large + */ + size: String, + /** + * 设置左侧标题宽度 + */ + labelWidth: makeStringProp('33%'), + /** + * 是否为错误状态,错误状态时右侧内容为红色 + */ + error: makeBooleanProp(false), + /** + * 选择器的值靠右展示 + */ + alignRight: makeBooleanProp(false), + /** + * 点击遮罩是否关闭 + */ + closeOnClickModal: makeBooleanProp(true), + /** + * 弹出面板是否设置底部安全距离(iphone X 类型的机型) + */ + safeAreaInsetBottom: makeBooleanProp(true), + /** + * 是否超出隐藏 + */ + ellipsis: makeBooleanProp(false), + /** + * picker内部滚筒高 + */ + columnsHeight: makeNumberProp(217), + /** + * 选项的key + */ + valueKey: makeStringProp('value'), + /** + * 选项的label + */ + labelKey: makeStringProp('label'), + /** + * 选中项,当 type 为 time 时,类型为字符串;当 type 为 Array 时,类型为范围选择;否则为 时间戳 + */ + modelValue: makeRequiredProp([String, Number, Array] as PropType>), + /** + * 选择器类型,可选值为:date / year-month / time + */ + type: makeStringProp('datetime'), + /** + * 最小日期 + */ + minDate: makeNumberProp(new Date(new Date().getFullYear() - 10, 0, 1).getTime()), + /** + * 最大日期 + */ + maxDate: makeNumberProp(new Date(new Date().getFullYear() + 10, 11, 31, 23, 59, 59).getTime()), + /** + * 最小小时,time类型时生效 + */ + minHour: makeNumberProp(0), + /** + * 最大小时,time类型时生效 + */ + maxHour: makeNumberProp(23), + /** + * 最小分钟,time类型时生效 + */ + minMinute: makeNumberProp(0), + /** + * 最大分钟,time类型时生效 + */ + maxMinute: makeNumberProp(59), + /** + * 是否启用秒选择,仅在 time 和 datetime 类型下生效 + */ + useSecond: makeBooleanProp(false), + /** + * 最小秒数,仅在 time 和 datetime 类型下生效 + */ + minSecond: makeNumberProp(0), + /** + * 最大秒数,仅在 time 和 datetime 类型下生效 + */ + maxSecond: makeNumberProp(59), + /** + * 自定义过滤选项的函数,返回列的选项数组 + */ + filter: Function as PropType, + /** + * 自定义弹出层选项文案的格式化函数,返回一个字符串 + */ + formatter: Function as PropType, + /** + * 自定义展示文案的格式化函数,返回一个字符串 + */ + displayFormat: Function as PropType, + /** + * 确定前校验函数,接收 (value, resolve, picker) 参数,通过 resolve 继续执行 picker,resolve 接收1个boolean参数 + */ + beforeConfirm: Function as PropType, + /** + * 在区域选择模式下,自定义展示tab标签文案的格式化函数,返回一个字符串 + */ + displayFormatTabLabel: Function as PropType, + /** + * 默认日期,类型保持与 value 一致,打开面板时面板自动选到默认日期 + */ + defaultValue: [String, Number, Array] as PropType>, + /** + * 弹窗层级 + */ + zIndex: makeNumberProp(15), + /** + * 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的 + */ + prop: String, + /** + * 表单验证规则,结合wd-form组件使用 + */ + rules: makeArrayProp(), + /** + * picker cell 外部自定义样式 + */ + customCellClass: makeStringProp(''), + /** + * pickerView 外部自定义样式 + */ + customViewClass: makeStringProp(''), + /** + * label 外部自定义样式 + */ + customLabelClass: makeStringProp(''), + /** + * value 外部自定义样式 + */ + customValueClass: makeStringProp(''), + /** + * 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。 + */ + immediateChange: makeBooleanProp(false), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false), + /** + * 显示清空按钮 + */ + clearable: makeBooleanProp(false), + /** + * 必填标记位置,可选值:before、after + */ + markerSide: makeStringProp<'before' | 'after'>('before') +} + +export type DatetimePickerDisplayFormat = (items: Record[]) => string + +export type DatetimePickerBeforeConfirm = ( + value: number | string | (number | string)[], + resolve: (isPass: boolean) => void, + picker: DatetimePickerInstance +) => void + +export type DatetimePickerDisplayFormatTabLabel = (items: Record[]) => string + +export type DatetimePickerExpose = { + /** + * 打开picker弹框 + */ + open: () => void + /** + * 关闭picker弹框 + */ + close: () => void + /** + * 设置加载状态 + * @param loading 加载状态 + * @returns + */ + setLoading: (loading: boolean) => void +} + +export type DatetimePickerProps = ExtractPropTypes + +export type DatetimePickerInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-datetime-picker/wd-datetime-picker.vue b/uni_modules/wot-design-uni/components/wd-datetime-picker/wd-datetime-picker.vue new file mode 100644 index 0000000..17f3397 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-datetime-picker/wd-datetime-picker.vue @@ -0,0 +1,801 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-divider/index.scss b/uni_modules/wot-design-uni/components/wd-divider/index.scss new file mode 100644 index 0000000..c67d106 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-divider/index.scss @@ -0,0 +1,100 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(divider) { + color: $-dark-color3; + + @include e(line) { + background: $-dark-color-gray; + } + } +} + +@include b(divider) { + position: relative; + display: flex; + padding: $-divider-padding; + margin: $-divider-margin; + align-items: center; + color: $-divider-color; + font-size: $-divider-fs; + + &::after, + &::before { + flex: 1; + display: block; + box-sizing: border-box; + border-style: solid; + border-color: $-divider-line-color; + border-width: $-divider-line-height 0 0; + } + + &::before { + content: ''; + } + + @include m(center, left, right) { + &::after { + content: ''; + margin-left: $-divider-content-left-margin; + } + + &::before { + margin-right: $-divider-content-right-margin; + } + } + + @include m(left) { + &::before { + max-width: $-divider-content-left-width; + } + } + + @include m(right) { + &::after { + max-width: $-divider-content-right-width; + } + } + + @include when(hairline) { + + &::before, + &::after { + transform: scaleY(0.5); + } + } + + @include when(dashed) { + + &::before, + &::after { + border-style: dashed; + } + } + + @include m(vertical) { + display: inline-block; + width: $-divider-vertical-line-width; + height: $-divider-vertical-height; + margin: $-divider-vertical-content-margin; + padding: 0; + vertical-align: middle; + + &::before { + height: 100%; + border-width: 0 0 0 $-divider-vertical-line-width; + } + + &::after { + display: none; + } + + @include when(hairline) { + &::before { + transform: scaleX(0.5); + } + } + } + +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-divider/types.ts b/uni_modules/wot-design-uni/components/wd-divider/types.ts new file mode 100644 index 0000000..12d6726 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-divider/types.ts @@ -0,0 +1,35 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeStringProp } from '../common/props' + +export type DividerPosition = 'center' | 'left' | 'right' +export type DividerDirection = 'horizontal' | 'vertical' + +export const dividerProps = { + ...baseProps, + /** + * 自定义颜色 + */ + color: String, + /** + * 内容位置,可选值为 `left` `right` `center` + * 默认值:`center` + */ + contentPosition: makeStringProp('center'), + /** + * 是否显示为虚线 + * 默认值:`false` + */ + dashed: Boolean, + /** + * 是否为垂直分割线 + * 默认值:`false` + */ + vertical: makeBooleanProp(false), + /** + * 是否显示为 0.5px 的线 + * 默认值:`true` + */ + hairline: makeBooleanProp(true) +} + +export type DividerProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-divider/wd-divider.vue b/uni_modules/wot-design-uni/components/wd-divider/wd-divider.vue new file mode 100644 index 0000000..25eb681 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-divider/wd-divider.vue @@ -0,0 +1,52 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-drop-menu-item/index.scss b/uni_modules/wot-design-uni/components/wd-drop-menu-item/index.scss new file mode 100644 index 0000000..8265f54 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-drop-menu-item/index.scss @@ -0,0 +1,66 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(drop-item) { + color: $-dark-color; + + @include e(tip) { + color: $-dark-color3; + } + } +} + +@include b(drop-item) { + position: fixed; + right: 0; + left: 0; + overflow: hidden; + font-size: $-drop-menu-item-fs; + color: $-drop-menu-item-color; + width: 100%; + z-index: 101; + + @include e(popup){ + position: absolute; + max-height: 80%; + } + + @include e(option) { + display: flex; + height: $-drop-menu-item-height; + line-height: $-drop-menu-item-height; + padding: 0 $-drop-menu-side-padding; + justify-content: space-between; + align-items: center; + transition: color .2s; + + @include when(active) { + color: $-drop-menu-item-color-active; + } + } + + @include e(title){ + display: block; + } + + @include e(tip) { + display: inline-block; + color: $-drop-menu-item-color-tip; + font-size: $-drop-menu-item-fs-tip; + margin-left: 2px; + } + + @include edeep(icon){ + display: block; + font-size: $-drop-menu-option-check-size; + } + + @include e(modal) { + position: fixed; + left: 0; + right: 0; + background: rgba(0, 0, 0, 0.7); + height: 100%; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-drop-menu-item/types.ts b/uni_modules/wot-design-uni/components/wd-drop-menu-item/types.ts new file mode 100644 index 0000000..336730a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-drop-menu-item/types.ts @@ -0,0 +1,94 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumericProp, makeStringProp, numericProp } from '../common/props' + +export type DropMenuItemBeforeToggleOption = { + // 操作状态:true 打开下拉菜单,false 关闭下拉菜单 + status: boolean + // 回调函数,用于控制是否允许打开或关闭下拉菜单,true 允许打开或关闭,false 不允许打开或关闭 + resolve: (isPass: boolean) => void +} + +export type DropMenuItemBeforeToggle = (option: DropMenuItemBeforeToggleOption) => void + +export const dorpMenuItemProps = { + ...baseProps, + /** + * DropMenuItem 左侧文字样式 + */ + customTitle: makeStringProp(''), + /** + * DropMenuItem 右侧 icon 样式 + */ + customIcon: makeStringProp(''), + /** + * 当前选中项对应选中的 value + */ + modelValue: [String, Number], + /** + * 列表数据,对应数据结构 [{label: '标题', value: '0', tip: '提示文字'}] + */ + options: makeArrayProp>(), + /** + * 禁用菜单 + */ + disabled: makeBooleanProp(false), + /** + * 选中的图标名称(可选名称在 wd-icon 组件中) + */ + iconName: makeStringProp('check'), + /** + * 菜单标题 + */ + title: String, + /** + * 菜单图标 + */ + icon: makeStringProp('arrow-down'), + /** + * 菜单图标大小 + */ + iconSize: numericProp, + /** + * 自定义点击事件 + */ + beforeToggle: Function as PropType, + /** + * 选项对象中,value 对应的 key + */ + valueKey: makeStringProp('value'), + /** + * 选项对象中,展示的文本对应的 key + */ + labelKey: makeStringProp('label'), + /** + * 选项对象中,选项说明对应的 key + */ + tipKey: makeStringProp('tip'), + /** + * 自定义下拉菜单popup样式类 + */ + customPopupClass: makeStringProp(''), + /** + * 自定义下拉菜单popup样式 + */ + customPopupStyle: makeStringProp(''), + /** + * 弹出层高度 这里设置了 就取这里的 + */ + popupHeight: makeStringProp(''), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false) +} + +export type DropMenuItemProps = ExtractPropTypes + +export type DropMenuItemExpose = { + getShowPop: () => boolean + open: () => void + close: () => void + toggle: () => void +} + +export type DropMenuItemInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue b/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue new file mode 100644 index 0000000..b69c777 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-drop-menu-item/wd-drop-menu-item.vue @@ -0,0 +1,221 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-drop-menu/index.scss b/uni_modules/wot-design-uni/components/wd-drop-menu/index.scss new file mode 100644 index 0000000..94b66dd --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-drop-menu/index.scss @@ -0,0 +1,86 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(drop-menu) { + color: $-dark-color; + @include e(list) { + background-color: $-dark-background2; + } + + @include e(item) { + @include when(disabled) { + color: $-dark-color-gray; + } + } + } +} + +@include b(drop-menu) { + box-sizing: border-box; + color: $-drop-menu-color; + font-size: $-drop-menu-fs; + position: relative; + + @include e(list) { + display: flex; + text-align: center; + background-color: #fff; + } + @include e(item) { + flex: 1; + min-width: 0; + height: $-drop-menu-height; + line-height: $-drop-menu-height; + text-align: center; + + @include when(active) { + font-weight: $-fw-medium; + + .wd-drop-menu__item-title::after { + opacity: 1; + } + :deep(.wd-drop-menu__arrow) { + transform: rotate(-180deg); + transform-origin: center center; + } + } + @include when(disabled) { + color: $-drop-menu-disabled-color; + } + } + + @include e(item-title) { + position: relative; + display: inline-flex; + align-items: center; + justify-content: center; + max-width: 100%; + padding: 0 $-drop-menu-side-padding; + box-sizing: border-box; + + &::after { + position: absolute; + content: ''; + width: 19px; + height: $-drop-menu-line-height; + bottom: 6px; + left: 50%; + transform: translate(-50%, 0); + background: $-drop-menu-line-color; + border-radius: $-drop-menu-line-height; + transition: opacity .15s; + opacity: 0; + } + } + + @include e(item-title-text) { + position: relative; + @include lineEllipsis; + } + + @include edeep(arrow) { + font-size: $-drop-menu-arrow-fs; + margin-left: 2px; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-drop-menu/types.ts b/uni_modules/wot-design-uni/components/wd-drop-menu/types.ts new file mode 100644 index 0000000..dc9e892 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-drop-menu/types.ts @@ -0,0 +1,38 @@ +import { type ExtractPropTypes, type InjectionKey, type Ref } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export type DropDirection = 'up' | 'down' + +export type DropMenuProvide = { + props: Partial + fold: (child?: any) => void + offset: Ref +} + +export const DROP_MENU_KEY: InjectionKey = Symbol('wd-drop-menu') + +export const dropMenuProps = { + ...baseProps, + /** + * 弹框层级 + */ + zIndex: makeNumberProp(12), + /** + * 菜单展开方向,可选值为up 或 down + */ + direction: makeStringProp('down'), + /** + * 是否展示蒙层 + */ + modal: makeBooleanProp(true), + /** + * 是否点击蒙层时关闭 + */ + closeOnClickModal: makeBooleanProp(true), + /** + * 菜单展开收起动画时间,单位 ms + */ + duration: makeNumberProp(200) +} + +export type DropMenuProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue b/uni_modules/wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue new file mode 100644 index 0000000..92b9412 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-drop-menu/wd-drop-menu.vue @@ -0,0 +1,166 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-fab/index.scss b/uni_modules/wot-design-uni/components/wd-fab/index.scss new file mode 100644 index 0000000..16addbf --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-fab/index.scss @@ -0,0 +1,116 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +.wot-theme-dark { + @include b(fab) {} +} + +@include b(fab) { + position: fixed; + z-index: 99; + + @include edeep(trigger) { + min-width: auto !important; + box-sizing: border-box; + width: $-fab-trigger-width !important; + height: $-fab-trigger-height !important; + border-radius: calc($-fab-trigger-height / 2) !important; + } + + :deep() { + @include e(actions) { + position: absolute; + z-index: 0; + display: flex; + justify-content: center; + align-items: center; + padding: $-fab-actions-padding 0; + + @include m(left, right) { + height: 100%; + top: 0; + padding: 0 $-fab-actions-padding; + } + + @include m(left) { + flex-direction: row-reverse; + right: 100%; + } + + @include m(right) { + flex-direction: row; + left: 100%; + } + + @include m(top, bottom) { + width: 100%; + left: 0; + } + + @include m(top) { + flex-direction: column-reverse; + bottom: 100%; + } + + @include m(bottom) { + flex-direction: column; + top: 100%; + } + } + + // 动画 + @include e(transition-enter-active, transition-leave-active) { + transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; + } + + + @include e(transition-enter) { + @include m(top) { + opacity: 0; + transform: translateY(40px); + } + + @include m(bottom) { + opacity: 0; + transform: translateY(-40px); + } + + @include m(left) { + opacity: 0; + transform: translateX(40px); + } + + @include m(right) { + opacity: 0; + transform: translateX(-40px); + } + } + + @include e(transition-leave-to) { + @include m(top) { + opacity: 0; + transform: translateY(40px); + } + + @include m(bottom) { + opacity: 0; + transform: translateY(-40px); + } + + @include m(left) { + opacity: 0; + transform: translateX(40px); + } + + @include m(right) { + opacity: 0; + transform: translateX(-40px); + } + } + + } + + @include edeep(icon) { + font-size: $-fab-icon-fs; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-fab/types.ts b/uni_modules/wot-design-uni/components/wd-fab/types.ts new file mode 100644 index 0000000..269b127 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-fab/types.ts @@ -0,0 +1,66 @@ +import type { ComponentPublicInstance, ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' +import type { PropType } from 'vue' + +export type FabType = 'primary' | 'success' | 'info' | 'warning' | 'error' | 'default' +export type FabPosition = 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'left-center' | 'right-center' | 'top-center' | 'bottom-center' +export type FabDirection = 'top' | 'right' | 'bottom' | 'left' +export type FabGap = Partial> +export const fabProps = { + ...baseProps, + /** + * 是否激活 + */ + active: makeBooleanProp(false), + /** + * 类型,可选值为 default primary info success warning error + */ + type: makeStringProp('primary'), + /** + * 悬浮按钮位置,可选值为 left-top right-top left-bottom right-bottom left-center right-center top-center bottom-center + */ + position: makeStringProp('right-bottom'), + /** + * 悬浮按钮菜单弹出方向,可选值为 top bottom left right + */ + direction: makeStringProp('top'), + /** + * 是否禁用 + */ + disabled: makeBooleanProp(false), + /** + * 悬浮按钮未展开时的图标 + */ + inactiveIcon: makeStringProp('add'), + /** + * 悬浮按钮展开时的图标 + */ + activeIcon: makeStringProp('close'), + /** + * 自定义悬浮按钮层级 + */ + zIndex: makeNumberProp(99), + /** + * 是否可拖动 + */ + draggable: makeBooleanProp(false), + gap: { + type: Object as PropType, + default: () => ({}) + }, + /** + * 用于控制点击时是否展开菜单 + */ + expandable: makeBooleanProp(true) +} + +export type FabProps = ExtractPropTypes + +export type FabExpose = { + // 展开菜单 + open: () => void + // 收起菜单 + close: () => void +} + +export type FabInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-fab/wd-fab.vue b/uni_modules/wot-design-uni/components/wd-fab/wd-fab.vue new file mode 100644 index 0000000..aff2605 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-fab/wd-fab.vue @@ -0,0 +1,276 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-floating-panel/index.scss b/uni_modules/wot-design-uni/components/wd-floating-panel/index.scss new file mode 100644 index 0000000..8fdaaa6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-floating-panel/index.scss @@ -0,0 +1,64 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(floating-panel) { + background: $-dark-background2; + + @include e(content) { + background: $-dark-background2; + } + } +} + +@include b(floating-panel) { + position: fixed; + bottom: 0; + left: 0; + z-index: $-floating-panel-z-index; + display: flex; + flex-direction: column; + box-sizing: border-box; + width: 100vw; + border-top-left-radius: $-floating-panel-radius; + border-top-right-radius: $-floating-panel-radius; + background-color: $-floating-panel-bg; + touch-action: none; + will-change: transform; + @include when(safe) { + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + } + + &::after { + position: absolute; + bottom: -100vh; + display: block; + width: 100vw; + height: 100vh; + content: ''; + background-color: inherit; + } + + @include e(header) { + display: flex; + justify-content: center; + align-items: center; + height: $-floating-panel-header-height; + cursor: grab; + user-select: none; + &-bar { + width: $-floating-panel-bar-width; + height: $-floating-panel-bar-height; + background-color: $-floating-panel-bar-bg; + border-radius: $-floating-panel-bar-radius; + } + } + + @include e(content) { + flex: 1; + min-width: 0; + min-height: 0; + background-color: $-floating-panel-content-bg; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-floating-panel/type.ts b/uni_modules/wot-design-uni/components/wd-floating-panel/type.ts new file mode 100644 index 0000000..af0bc9d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-floating-panel/type.ts @@ -0,0 +1,32 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeNumericProp, truthProp } from '../common/props' + +export const floatingPanelProps = { + ...baseProps, + /** + * 面板的显示高度 + */ + height: makeNumberProp(0), + /** + * 设置自定义锚点,默认值 [100, windowHeight * 0.6] + */ + anchors: makeArrayProp(), + /** + * 弹出面板是否设置底部安全距离(iphone X 类型的机型) + */ + safeAreaInsetBottom: makeBooleanProp(false), + /** + * 是否显示滚动条,默认值为 true + */ + showScrollbar: truthProp, + /** + * 动画时长,单位毫秒,默认值为 300ms + */ + duration: makeNumericProp(300), + /** + * 是否允许内容区容器拖拽,默认值为 true + */ + contentDraggable: truthProp +} + +export type FloatingPanelProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-floating-panel/wd-floating-panel.vue b/uni_modules/wot-design-uni/components/wd-floating-panel/wd-floating-panel.vue new file mode 100644 index 0000000..0f92ec4 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-floating-panel/wd-floating-panel.vue @@ -0,0 +1,140 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-form-item/index.scss b/uni_modules/wot-design-uni/components/wd-form-item/index.scss new file mode 100644 index 0000000..9bf9400 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-form-item/index.scss @@ -0,0 +1,18 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(form-item) { + } +} + + +@include b(form-item) { + @include e(error-message){ + color: $-form-item-error-message-color; + font-size: $-form-item-error-message-font-size; + line-height: $-form-item-error-message-line-height; + text-align: left; + vertical-align: middle; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-form-item/types.ts b/uni_modules/wot-design-uni/components/wd-form-item/types.ts new file mode 100644 index 0000000..ed1a4e2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-form-item/types.ts @@ -0,0 +1,16 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeRequiredProp, makeStringProp } from '../common/props' +import type { FormItemRule } from '../wd-form/types' + +export const formItemProps = { + ...baseProps, + prop: makeRequiredProp(String), + rules: makeArrayProp(), + required: Boolean, + center: makeBooleanProp(false), + label: String, + labelWidth: makeStringProp('100px'), + isLink: Boolean +} + +export type FormItemProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-form-item/wd-form-item.vue b/uni_modules/wot-design-uni/components/wd-form-item/wd-form-item.vue new file mode 100644 index 0000000..c3a36d3 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-form-item/wd-form-item.vue @@ -0,0 +1,65 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-form/types.ts b/uni_modules/wot-design-uni/components/wd-form/types.ts new file mode 100644 index 0000000..87c1044 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-form/types.ts @@ -0,0 +1,85 @@ +/* + * @Author: weisheng + * @Date: 2023-12-14 11:21:58 + * @LastEditTime: 2025-01-11 13:31:20 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-form/types.ts + * 记得注释 + */ +import { type ComponentPublicInstance, type ExtractPropTypes, type InjectionKey, type PropType } from 'vue' +import { baseProps, makeBooleanProp, makeRequiredProp } from '../common/props' + +export type FormProvide = { + props: { + model: Record + rules?: FormRules + border?: boolean + } + errorMessages?: Record +} + +export const FORM_KEY: InjectionKey = Symbol('wd-form') + +export type FormRules = { + [key: string]: FormItemRule[] +} + +export type ErrorMessage = { + prop: string + message: string +} + +export interface FormItemRule { + [key: string]: any + required: boolean + message: string + pattern?: RegExp + validator?: (value: any, rule: FormItemRuleWithoutValidator) => boolean | Promise | Promise | Promise | Promise +} + +export type FormItemRuleWithoutValidator = Omit + +export const formProps = { + ...baseProps, + /** + * 表单数据对象 + */ + model: makeRequiredProp(Object as PropType>), + /** + * 表单验证规则 + */ + rules: { + type: Object as PropType, + default: () => ({}) + }, + /** + * 是否在输入时重置表单校验信息 + */ + resetOnChange: makeBooleanProp(true), + /** + * 错误提示类型 + */ + errorType: { + type: String as PropType<'toast' | 'message' | 'none'>, + default: 'message' + } +} +export type FormProps = ExtractPropTypes + +export type FormExpose = { + /** + * 表单校验 + * @param prop 指定校验字段 + */ + validate: (prop?: string | Array) => Promise<{ + valid: boolean + errors: ErrorMessage[] + }> + /** + * 重置表单项的验证提示 + */ + reset: () => void +} + +export type FormInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-form/wd-form.vue b/uni_modules/wot-design-uni/components/wd-form/wd-form.vue new file mode 100644 index 0000000..b940099 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-form/wd-form.vue @@ -0,0 +1,207 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-gap/index.scss b/uni_modules/wot-design-uni/components/wd-gap/index.scss new file mode 100644 index 0000000..3a44d47 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-gap/index.scss @@ -0,0 +1,9 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +@include b(gap) { + @include m(safe) { + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-gap/types.ts b/uni_modules/wot-design-uni/components/wd-gap/types.ts new file mode 100644 index 0000000..c53522e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-gap/types.ts @@ -0,0 +1,17 @@ +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' + +export const gapProps = { + ...baseProps, + /** + * 背景颜色 + */ + bgColor: makeStringProp('transparent'), + /** + * 是否开启底部安全区 + */ + safeAreaBottom: makeBooleanProp(false), + /** + * 高度 + */ + height: makeNumericProp(15) +} diff --git a/uni_modules/wot-design-uni/components/wd-gap/wd-gap.vue b/uni_modules/wot-design-uni/components/wd-gap/wd-gap.vue new file mode 100644 index 0000000..da5c4dd --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-gap/wd-gap.vue @@ -0,0 +1,36 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-grid-item/index.scss b/uni_modules/wot-design-uni/components/wd-grid-item/index.scss new file mode 100644 index 0000000..8418409 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-grid-item/index.scss @@ -0,0 +1,148 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +.wot-theme-dark { + @include b(grid-item) { + + @include when(border) { + &::before { + background-color: $-dark-border-color; + } + &::after { + background-color: $-dark-border-color; + } + } + + // 第一行元素 + @include when(first) { + &::after { + background-color: $-dark-border-color; + } + } + + + @include e(content) { + background-color: $-dark-background2; + + @include m(hover) { + background-color: $-grid-item-hover-bg-dark !important; + } + } + } +} + +@include b(grid-item) { + height: 100%; + font-size: $-grid-item-fs; + box-sizing: border-box; + + position: relative; + float: left; + + display: flex; + flex-direction: column; + justify-content: center; + text-align: center; + overflow: hidden; + + @include when(border) { + &::before { + content: ""; + position: absolute; + width: 100%; + height: 1px; + transform: scaleY(0.5); + background-color: $-grid-item-border-color; + top: 0; + left: 0; + z-index: 1; + } + &::after { + content: ""; + position: absolute; + width: 1px; + transform: scaleX(0.5); + height: 100%; + background-color: $-grid-item-border-color; + bottom: 0; + right: 0; + } + } + + // 第一行元素 + @include when(first) { + &::after { + content: ""; + position: absolute; + width: 1px; + transform: scaleX(0.5); + height: 100%; + background-color: $-grid-item-border-color; + bottom: 0; + right: 0; + } + } + + // 每行右侧的元素 + @include when(right) { + &::after { + display: none; + } + } + + @include when(last) { + &::after { + display: none; + } + } + @include e(wrapper) { + display: inline-block; + margin: 0 auto; + } + + @include e(content) { + height: 100%; + padding: $-grid-item-padding; + background-color: $-grid-item-bg; + position: relative; + display: flex; + flex-direction: column; + justify-content: center; + + @include when(square) { + box-sizing: border-box; + position: absolute; + top: 0; + right: 0; + left: 0; + padding: 0; + height: 100%; + } + + @include when(round) { + &::after { + content: " "; + position: absolute; + top: 0; + left: 0; + width: 200%; + height: 200%; + border: 1px solid $-grid-item-border-color; + transform-origin: top left; + transform: scale(0.5); + box-sizing: border-box; + } + } + + @include m(hover) { + background-color: $-grid-item-hover-bg !important; + } + } + + @include e(text) { + margin-top: 8px; + font-size: $-grid-item-fs; + line-height: $-grid-item-fs; + @include lineEllipsis; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-grid-item/types.ts b/uni_modules/wot-design-uni/components/wd-grid-item/types.ts new file mode 100644 index 0000000..91f732d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-grid-item/types.ts @@ -0,0 +1,77 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeStringProp, numericProp } from '../common/props' +import type { BadgeProps, BadgeType } from '../wd-badge/types' + +export type LinkType = 'navigateTo' | 'switchTab' | 'reLaunch' | 'redirectTo' + +export const gridItemProps = { + ...baseProps, + /** + * GridItem 下方文字样式 + */ + customText: makeStringProp(''), + /** + * GridItem 上方 icon 样式 + */ + customIcon: makeStringProp(''), + /** + * 图标名称,可选值见 wd-icon 组件 + */ + icon: makeStringProp(''), + /** + * 图标大小 + */ + iconSize: makeStringProp('26px'), + /** + * 文字 + */ + text: String, + /** + * 点击后跳转的链接地址 + */ + url: String, + /** + * 页面跳转方式, 参考微信小程序路由文档,可选值:navigateTo / switchTab / reLaunch + */ + linkType: makeStringProp('navigateTo'), + /** + * 是否开启 GridItem 内容插槽 + * @deprecated 已废弃,直接使用默认插槽即可 + */ + useSlot: makeBooleanProp(false), + /** + * 是否开启 GridItem icon 插槽 + * @deprecated 已废弃,组件会自动根据 icon 插槽是否存在来显示 + */ + useIconSlot: makeBooleanProp(false), + /** + * 是否开启 GridItem text 内容插槽 + * @deprecated 已废弃,组件会自动根据 text 插槽是否存在来显示 + */ + useTextSlot: makeBooleanProp(false), + /** + * 是否显示图标右上角小红点 + */ + isDot: { + type: Boolean, + default: undefined + }, + /** + * 图标右上角显示的 badge 类型,可选值:primary / success / warning / danger / info + */ + type: String as PropType, + /** + * 图标右上角 badge 显示值 + */ + value: numericProp, + /** + * 图标右上角 badge 最大值,超过最大值会显示 '{max}+',要求 value 是 Number 类型 + */ + max: Number, + /** + * 徽标属性,透传给 Badge 组件 + */ + badgeProps: Object as PropType> +} + +export type GridItemProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-grid-item/wd-grid-item.vue b/uni_modules/wot-design-uni/components/wd-grid-item/wd-grid-item.vue new file mode 100644 index 0000000..a37ad9c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-grid-item/wd-grid-item.vue @@ -0,0 +1,176 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-grid/index.scss b/uni_modules/wot-design-uni/components/wd-grid/index.scss new file mode 100644 index 0000000..6996022 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-grid/index.scss @@ -0,0 +1,9 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(grid) { + position: relative; + box-sizing: border-box; + overflow: hidden; + height: auto; +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-grid/types.ts b/uni_modules/wot-design-uni/components/wd-grid/types.ts new file mode 100644 index 0000000..f0908c2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-grid/types.ts @@ -0,0 +1,59 @@ +/* + * @Author: weisheng + * @Date: 2023-12-14 11:21:58 + * @LastEditTime: 2024-03-18 14:38:35 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-grid\types.ts + * 记得注释 + */ +import { type ExtractPropTypes, type InjectionKey } from 'vue' +import { baseProps, makeBooleanProp, makeStringProp } from '../common/props' + +export type GridProvide = { + props: { + clickable?: boolean + square?: boolean + column?: number + border?: boolean + bgColor?: string + gutter?: number + hoverClass?: string + } +} + +export const GRID_KEY: InjectionKey = Symbol('wd-grid') + +export const gridProps = { + ...baseProps, + /** + * 是否开启格子点击反馈 + */ + clickable: makeBooleanProp(false), + /** + * 是否将格子固定为正方形 + */ + square: makeBooleanProp(false), + /** + * 列数 + */ + column: Number, + /** + * 是否显示边框 + */ + border: makeBooleanProp(false), + /** + * 背景颜色 + */ + bgColor: makeStringProp(''), + /** + * 格子之间的间距,默认单位为px + */ + gutter: Number, + /** + * 自定义内容区域hover-class + */ + hoverClass: String +} + +export type GridProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-grid/wd-grid.vue b/uni_modules/wot-design-uni/components/wd-grid/wd-grid.vue new file mode 100644 index 0000000..a4e11f7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-grid/wd-grid.vue @@ -0,0 +1,106 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-icon/index.scss b/uni_modules/wot-design-uni/components/wd-icon/index.scss new file mode 100644 index 0000000..1c8715c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-icon/index.scss @@ -0,0 +1,1230 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@font-face { + font-family: 'wd-icons'; + src: url('https://at.alicdn.com/t/c/font_4245058_s5cpwl25n7o.woff2?t=1696817709651') format('woff2'), + url('https://at.alicdn.com/t/c/font_4245058_s5cpwl25n7o.woff?t=1696817709651') format('woff'), + url('https://at.alicdn.com/t/c/font_4245058_s5cpwl25n7o.ttf?t=1696817709651') format('truetype'); + font-weight: normal; + font-style: normal; +} + +/* #ifdef APP-PLUS || H5 */ +@font-face { + font-family: 'wd-icons'; + src: + url('./wd-icons.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +/* #endif */ + +@include b(icon) { + display: inline-block; + font-family: 'wd-icons' !important; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + + &::before { + display: inline-block; + } + + @include m(image) { + width: 1em; + height: 1em; + } + + @include e(image) { + width: 100%; + height: 100%; + } +} + + + +.wd-icon-usergroup-clear:before { + content: "\e739"; +} + +.wd-icon-user-circle:before { + content: "\e73a"; +} + +.wd-icon-user-talk:before { + content: "\e73b"; +} + +.wd-icon-user-clear:before { + content: "\e73c"; +} + +.wd-icon-user:before { + content: "\e73d"; +} + +.wd-icon-usergroup-add:before { + content: "\e73e"; +} + +.wd-icon-usergroup:before { + content: "\e73f"; +} + +.wd-icon-user-add:before { + content: "\e740"; +} + +.wd-icon-user-avatar:before { + content: "\e741"; +} + +.wd-icon-pointing-hand:before { + content: "\e742"; +} + +.wd-icon-cursor:before { + content: "\e743"; +} + +.wd-icon-fullsreen:before { + content: "\e72c"; +} + +.wd-icon-cloud-download:before { + content: "\e72d"; +} + +.wd-icon-chevron-down-rectangle:before { + content: "\e72e"; +} + +.wd-icon-edit:before { + content: "\e72f"; +} + +.wd-icon-fullscreen-exit:before { + content: "\e730"; +} + +.wd-icon-circle1:before { + content: "\e731"; +} + +.wd-icon-close-normal:before { + content: "\e732"; +} + +.wd-icon-browse:before { + content: "\e733"; +} + +.wd-icon-browse-off:before { + content: "\e734"; +} + +.wd-icon-chevron-up-rectangle:before { + content: "\e735"; +} + +.wd-icon-add-rectangle:before { + content: "\e736"; +} + +.wd-icon-add1:before { + content: "\e737"; +} + +.wd-icon-add-circle1:before { + content: "\e738"; +} + +.wd-icon-download1:before { + content: "\e71c"; +} + +.wd-icon-link:before { + content: "\e71d"; +} + +.wd-icon-edit-1:before { + content: "\e71e"; +} + +.wd-icon-jump:before { + content: "\e71f"; +} + +.wd-icon-chevron-down-circle:before { + content: "\e720"; +} + +.wd-icon-delete1:before { + content: "\e721"; +} + +.wd-icon-filter-clear:before { + content: "\e722"; +} + +.wd-icon-check-rectangle-filled:before { + content: "\e723"; +} + +.wd-icon-minus-circle-filled:before { + content: "\e724"; +} + +.wd-icon-play:before { + content: "\e725"; +} + +.wd-icon-pause-circle-filled:before { + content: "\e726"; +} + +.wd-icon-filter1:before { + content: "\e727"; +} + +.wd-icon-move:before { + content: "\e728"; +} + +.wd-icon-login:before { + content: "\e729"; +} + +.wd-icon-minus-circle:before { + content: "\e72a"; +} + +.wd-icon-close-circle:before { + content: "\e72b"; +} + +.wd-icon-logout:before { + content: "\e70b"; +} + +.wd-icon-search1:before { + content: "\e70c"; +} + +.wd-icon-pause-circle:before { + content: "\e70d"; +} + +.wd-icon-play-circle:before { + content: "\e70e"; +} + +.wd-icon-more1:before { + content: "\e70f"; +} + +.wd-icon-minus-rectangle:before { + content: "\e710"; +} + +.wd-icon-stop:before { + content: "\e711"; +} + +.wd-icon-scan1:before { + content: "\e712"; +} + +.wd-icon-close-rectangle:before { + content: "\e713"; +} + +.wd-icon-rollback:before { + content: "\e714"; +} + +.wd-icon-a-order-adjustmentcolumn:before { + content: "\e715"; +} + +.wd-icon-pause:before { + content: "\e716"; +} + +.wd-icon-ellipsis:before { + content: "\e717"; +} + +.wd-icon-cloud-upload:before { + content: "\e718"; +} + +.wd-icon-stop-circle-filled:before { + content: "\e719"; +} + +.wd-icon-clear:before { + content: "\e71a"; +} + +.wd-icon-remove:before { + content: "\e71b"; +} + +.wd-icon-zoom-out:before { + content: "\e6fb"; +} + +.wd-icon-thumb-down:before { + content: "\e6fc"; +} + +.wd-icon-setting1:before { + content: "\e6fd"; +} + +.wd-icon-save:before { + content: "\e6fe"; +} + +.wd-icon-unfold-more:before { + content: "\e6ff"; +} + +.wd-icon-zoom-in:before { + content: "\e700"; +} + +.wd-icon-thumb-up:before { + content: "\e701"; +} + +.wd-icon-unfold-less:before { + content: "\e702"; +} + +.wd-icon-play-circle-filled:before { + content: "\e703"; +} + +.wd-icon-poweroff:before { + content: "\e704"; +} + +.wd-icon-share:before { + content: "\e705"; +} + +.wd-icon-refresh1:before { + content: "\e706"; +} + +.wd-icon-link-unlink:before { + content: "\e707"; +} + +.wd-icon-upload:before { + content: "\e708"; +} + +.wd-icon-rectangle:before { + content: "\e709"; +} + +.wd-icon-stop-circle:before { + content: "\e70a"; +} + +.wd-icon-backtop-rectangle:before { + content: "\e6ea"; +} + +.wd-icon-caret-down:before { + content: "\e6eb"; +} + +.wd-icon-arrow-left1:before { + content: "\e6ec"; +} + +.wd-icon-help-circle:before { + content: "\e6ed"; +} + +.wd-icon-help-circle-filled:before { + content: "\e6ee"; +} + +.wd-icon-time-filled:before { + content: "\e6ef"; +} + +.wd-icon-close-circle-filled:before { + content: "\e6f0"; +} + +.wd-icon-info-circle:before { + content: "\e6f1"; +} + +.wd-icon-info-circle-filled:before { + content: "\e6f2"; +} + +.wd-icon-check1:before { + content: "\e6f3"; +} + +.wd-icon-help:before { + content: "\e6f4"; +} + +.wd-icon-error:before { + content: "\e6f5"; +} + +.wd-icon-check-circle:before { + content: "\e6f6"; +} + +.wd-icon-error-circle-filled:before { + content: "\e6f7"; +} + +.wd-icon-error-circle:before { + content: "\e6f8"; +} + +.wd-icon-check-rectangle:before { + content: "\e6f9"; +} + +.wd-icon-check-circle-filled:before { + content: "\e6fa"; +} + +.wd-icon-chevron-up:before { + content: "\e6da"; +} + +.wd-icon-chevron-up-circle:before { + content: "\e6db"; +} + +.wd-icon-chevron-right:before { + content: "\e6dc"; +} + +.wd-icon-arrow-down-rectangle:before { + content: "\e6dd"; +} + +.wd-icon-caret-up-small:before { + content: "\e6de"; +} + +.wd-icon-chevron-right-rectangle:before { + content: "\e6df"; +} + +.wd-icon-caret-right-small:before { + content: "\e6e0"; +} + +.wd-icon-arrow-right1:before { + content: "\e6e1"; +} + +.wd-icon-backtop:before { + content: "\e6e2"; +} + +.wd-icon-arrow-up1:before { + content: "\e6e3"; +} + +.wd-icon-caret-up:before { + content: "\e6e4"; +} + +.wd-icon-backward:before { + content: "\e6e5"; +} + +.wd-icon-arrow-down1:before { + content: "\e6e6"; +} + +.wd-icon-chevron-left:before { + content: "\e6e7"; +} + +.wd-icon-caret-right:before { + content: "\e6e8"; +} + +.wd-icon-caret-left:before { + content: "\e6e9"; +} + +.wd-icon-page-last:before { + content: "\e6c9"; +} + +.wd-icon-next:before { + content: "\e6ca"; +} + +.wd-icon-swap:before { + content: "\e6cb"; +} + +.wd-icon-round:before { + content: "\e6cc"; +} + +.wd-icon-previous:before { + content: "\e6cd"; +} + +.wd-icon-enter:before { + content: "\e6ce"; +} + +.wd-icon-chevron-down:before { + content: "\e6cf"; +} + +.wd-icon-caret-down-small:before { + content: "\e6d0"; +} + +.wd-icon-swap-right:before { + content: "\e6d1"; +} + +.wd-icon-chevron-left-circle:before { + content: "\e6d2"; +} + +.wd-icon-caret-left-small:before { + content: "\e6d3"; +} + +.wd-icon-chevron-right-circle:before { + content: "\e6d4"; +} + +.wd-icon-a-chevron-leftdouble:before { + content: "\e6d5"; +} + +.wd-icon-chevron-left-rectangle:before { + content: "\e6d6"; +} + +.wd-icon-a-chevron-rightdouble:before { + content: "\e6d7"; +} + +.wd-icon-page-first:before { + content: "\e6d8"; +} + +.wd-icon-forward:before { + content: "\e6d9"; +} + +.wd-icon-view-column:before { + content: "\e6b9"; +} + +.wd-icon-view-module:before { + content: "\e6ba"; +} + +.wd-icon-format-vertical-align-right:before { + content: "\e6bb"; +} + +.wd-icon-view-list:before { + content: "\e6bc"; +} + +.wd-icon-order-descending:before { + content: "\e6bd"; +} + +.wd-icon-format-horizontal-align-bottom:before { + content: "\e6be"; +} + +.wd-icon-queue:before { + content: "\e6bf"; +} + +.wd-icon-menu-fold:before { + content: "\e6c0"; +} + +.wd-icon-menu-unfold:before { + content: "\e6c1"; +} + +.wd-icon-format-horizontal-align-top:before { + content: "\e6c2"; +} + +.wd-icon-a-rootlist:before { + content: "\e6c3"; +} + +.wd-icon-order-ascending:before { + content: "\e6c4"; +} + +.wd-icon-format-vertical-align-left:before { + content: "\e6c5"; +} + +.wd-icon-format-horizontal-align-center:before { + content: "\e6c6"; +} + +.wd-icon-format-vertical-align-center:before { + content: "\e6c7"; +} + +.wd-icon-swap-left:before { + content: "\e6c8"; +} + +.wd-icon-flag:before { + content: "\e6aa"; +} + +.wd-icon-code:before { + content: "\e6ab"; +} + +.wd-icon-cart:before { + content: "\e6ac"; +} + +.wd-icon-attach:before { + content: "\e6ad"; +} + +.wd-icon-chart:before { + content: "\e6ae"; +} + +.wd-icon-creditcard:before { + content: "\e6af"; +} + +.wd-icon-calendar:before { + content: "\e6b0"; +} + +.wd-icon-app:before { + content: "\e6b1"; +} + +.wd-icon-books:before { + content: "\e6b2"; +} + +.wd-icon-barcode:before { + content: "\e6b3"; +} + +.wd-icon-chart-pie:before { + content: "\e6b4"; +} + +.wd-icon-chart-bar:before { + content: "\e6b5"; +} + +.wd-icon-chart-bubble:before { + content: "\e6b6"; +} + +.wd-icon-bulletpoint:before { + content: "\e6b7"; +} + +.wd-icon-bianjiliebiao:before { + content: "\e6b8"; +} + +.wd-icon-image:before { + content: "\e69a"; +} + +.wd-icon-laptop:before { + content: "\e69b"; +} + +.wd-icon-hourglass:before { + content: "\e69c"; +} + +.wd-icon-call:before { + content: "\e69d"; +} + +.wd-icon-mobile-vibrate:before { + content: "\e69e"; +} + +.wd-icon-mail:before { + content: "\e69f"; +} + +.wd-icon-notification-filled:before { + content: "\e6a0"; +} + +.wd-icon-desktop:before { + content: "\e6a1"; +} + +.wd-icon-history:before { + content: "\e6a2"; +} + +.wd-icon-discount-filled:before { + content: "\e6a3"; +} + +.wd-icon-dashboard:before { + content: "\e6a4"; +} + +.wd-icon-discount:before { + content: "\e6a5"; +} + +.wd-icon-heart-filled:before { + content: "\e6a6"; +} + +.wd-icon-chat1:before { + content: "\e6a7"; +} + +.wd-icon-a-controlplatform:before { + content: "\e6a8"; +} + +.wd-icon-gift:before { + content: "\e6a9"; +} + +.wd-icon-photo:before { + content: "\e692"; +} + +.wd-icon-play-circle-stroke:before { + content: "\e693"; +} + +.wd-icon-notification:before { + content: "\e694"; +} + +.wd-icon-cloud:before { + content: "\e695"; +} + +.wd-icon-gender-female:before { + content: "\e696"; +} + +.wd-icon-fork:before { + content: "\e697"; +} + +.wd-icon-layers:before { + content: "\e698"; +} + +.wd-icon-lock-off:before { + content: "\e699"; +} + +.wd-icon-location:before { + content: "\e68a"; +} + +.wd-icon-mobile:before { + content: "\e68b"; +} + +.wd-icon-qrcode:before { + content: "\e68c"; +} + +.wd-icon-home1:before { + content: "\e68d"; +} + +.wd-icon-time:before { + content: "\e68e"; +} + +.wd-icon-heart:before { + content: "\e68f"; +} + +.wd-icon-lock-on:before { + content: "\e690"; +} + +.wd-icon-print:before { + content: "\e691"; +} + +.wd-icon-slash:before { + content: "\e67a"; +} + +.wd-icon-usb:before { + content: "\e67b"; +} + +.wd-icon-tools:before { + content: "\e67c"; +} + +.wd-icon-wifi:before { + content: "\e67d"; +} + +.wd-icon-star-filled:before { + content: "\e67e"; +} + +.wd-icon-server:before { + content: "\e67f"; +} + +.wd-icon-sound:before { + content: "\e680"; +} + +.wd-icon-a-precisemonitor:before { + content: "\e681"; +} + +.wd-icon-service:before { + content: "\e682"; +} + +.wd-icon-tips:before { + content: "\e683"; +} + +.wd-icon-pin:before { + content: "\e684"; +} + +.wd-icon-secured:before { + content: "\e685"; +} + +.wd-icon-star:before { + content: "\e686"; +} + +.wd-icon-gender-male:before { + content: "\e687"; +} + +.wd-icon-shop:before { + content: "\e688"; +} + +.wd-icon-money-circle:before { + content: "\e689"; +} + +.wd-icon-file-word:before { + content: "\e66a"; +} + +.wd-icon-file-unknown:before { + content: "\e66b"; +} + +.wd-icon-folder-open:before { + content: "\e66c"; +} + +.wd-icon-file-pdf:before { + content: "\e66d"; +} + +.wd-icon-folder:before { + content: "\e66e"; +} + +.wd-icon-folder-add:before { + content: "\e66f"; +} + +.wd-icon-file:before { + content: "\e670"; +} + +.wd-icon-file-image:before { + content: "\e671"; +} + +.wd-icon-file-powerpoint:before { + content: "\e672"; +} + +.wd-icon-file-add:before { + content: "\e673"; +} + +.wd-icon-file-icon:before { + content: "\e674"; +} + +.wd-icon-file-paste:before { + content: "\e675"; +} + +.wd-icon-file-excel:before { + content: "\e676"; +} + +.wd-icon-file-copy:before { + content: "\e677"; +} + +.wd-icon-video1:before { + content: "\e678"; +} + +.wd-icon-wallet:before { + content: "\e679"; +} + +.wd-icon-ie:before { + content: "\e65d"; +} + +.wd-icon-logo-codepen:before { + content: "\e65e"; +} + +.wd-icon-github-filled:before { + content: "\e65f"; +} + +.wd-icon-ie-filled:before { + content: "\e660"; +} + +.wd-icon-apple:before { + content: "\e661"; +} + +.wd-icon-windows-filled:before { + content: "\e662"; +} + +.wd-icon-internet:before { + content: "\e663"; +} + +.wd-icon-github:before { + content: "\e664"; +} + +.wd-icon-windows:before { + content: "\e665"; +} + +.wd-icon-apple-filled:before { + content: "\e666"; +} + +.wd-icon-chrome-filled:before { + content: "\e667"; +} + +.wd-icon-chrome:before { + content: "\e668"; +} + +.wd-icon-android:before { + content: "\e669"; +} + +.wd-icon-edit-outline:before { + content: "\e64a"; +} + +.wd-icon-detection:before { + content: "\e64b"; +} + +.wd-icon-check-outline:before { + content: "\e64c"; +} + +.wd-icon-close:before { + content: "\e64d"; +} + +.wd-icon-check:before { + content: "\e64e"; +} + +.wd-icon-arrow-left:before { + content: "\e64f"; +} + +.wd-icon-computer:before { + content: "\e650"; +} + +.wd-icon-clock:before { + content: "\e651"; +} + +.wd-icon-check-bold:before { + content: "\e652"; +} + +.wd-icon-bags:before { + content: "\e653"; +} + +.wd-icon-arrow-down:before { + content: "\e654"; +} + +.wd-icon-arrow-right:before { + content: "\e655"; +} + +.wd-icon-circle:before { + content: "\e656"; +} + +.wd-icon-arrow-thin-down:before { + content: "\e657"; +} + +.wd-icon-camera:before { + content: "\e658"; +} + +.wd-icon-close-bold:before { + content: "\e659"; +} + +.wd-icon-add-circle:before { + content: "\e65a"; +} + +.wd-icon-arrow-thin-up:before { + content: "\e65b"; +} + +.wd-icon-add:before { + content: "\e65c"; +} + +.wd-icon-keyboard-delete:before { + content: "\e634"; +} + +.wd-icon-transfer:before { + content: "\e635"; +} + +.wd-icon-eye-close:before { + content: "\e61f"; +} + +.wd-icon-delete:before { + content: "\e61e"; +} + +.wd-icon-download:before { + content: "\e636"; +} + +.wd-icon-picture:before { + content: "\e637"; +} + +.wd-icon-refresh:before { + content: "\e638"; +} + +.wd-icon-read:before { + content: "\e639"; +} + +.wd-icon-note:before { + content: "\e63a"; +} + +.wd-icon-phone:before { + content: "\e63b"; +} + +.wd-icon-lenovo:before { + content: "\e63c"; +} + +.wd-icon-home:before { + content: "\e63d"; +} + +.wd-icon-search:before { + content: "\e63e"; +} + +.wd-icon-fill-camera:before { + content: "\e63f"; +} + +.wd-icon-fill-arrow-down:before { + content: "\e640"; +} + +.wd-icon-arrow-up:before { + content: "\e61d"; +} + +.wd-icon-delete-thin:before { + content: "\e641"; +} + +.wd-icon-filter:before { + content: "\e642"; +} + +.wd-icon-evaluation:before { + content: "\e643"; +} + +.wd-icon-close-outline:before { + content: "\e644"; +} + +.wd-icon-dong:before { + content: "\e645"; +} + +.wd-icon-error-fill:before { + content: "\e646"; +} + +.wd-icon-chat:before { + content: "\e647"; +} + +.wd-icon-decrease:before { + content: "\e648"; +} + +.wd-icon-copy:before { + content: "\e649"; +} + +.wd-icon-setting:before { + content: "\e621"; +} + +.wd-icon-subscribe:before { + content: "\e622"; +} + +.wd-icon-jdm:before { + content: "\e620"; +} + +.wd-icon-spool:before { + content: "\e623"; +} + +.wd-icon-warning:before { + content: "\e624"; +} + +.wd-icon-wifi-error:before { + content: "\e625"; +} + +.wd-icon-star-on:before { + content: "\e626"; +} + +.wd-icon-rotate:before { + content: "\e627"; +} + +.wd-icon-translate-bold:before { + content: "\e628"; +} + +.wd-icon-keyboard-collapse:before { + content: "\e629"; +} + +.wd-icon-keywords:before { + content: "\e62a"; +} + +.wd-icon-scan:before { + content: "\e62b"; +} + +.wd-icon-view:before { + content: "\e62c"; +} + +.wd-icon-phone-compute:before { + content: "\e62d"; +} + +.wd-icon-video:before { + content: "\e62e"; +} + +.wd-icon-thin-arrow-left:before { + content: "\e62f"; +} + +.wd-icon-goods:before { + content: "\e630"; +} + +.wd-icon-list:before { + content: "\e631"; +} + +.wd-icon-warn-bold:before { + content: "\e632"; +} + +.wd-icon-more:before { + content: "\e633"; +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-icon/types.ts b/uni_modules/wot-design-uni/components/wd-icon/types.ts new file mode 100644 index 0000000..7416705 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-icon/types.ts @@ -0,0 +1,21 @@ +import { baseProps, makeRequiredProp, makeStringProp, numericProp } from '../common/props' + +export const iconProps = { + ...baseProps, + /** + * 使用的图标名字,可以使用链接图片 + */ + name: makeRequiredProp(String), + /** + * 图标的颜色 + */ + color: String, + /** + * 图标的字体大小 + */ + size: numericProp, + /** + * 类名前缀,用于使用自定义图标 + */ + classPrefix: makeStringProp('wd-icon') +} diff --git a/uni_modules/wot-design-uni/components/wd-icon/wd-icon.vue b/uni_modules/wot-design-uni/components/wd-icon/wd-icon.vue new file mode 100644 index 0000000..3cdae30 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-icon/wd-icon.vue @@ -0,0 +1,53 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-icon/wd-icons.ttf b/uni_modules/wot-design-uni/components/wd-icon/wd-icons.ttf new file mode 100644 index 0000000..7abffe1 Binary files /dev/null and b/uni_modules/wot-design-uni/components/wd-icon/wd-icons.ttf differ diff --git a/uni_modules/wot-design-uni/components/wd-img-cropper/index.scss b/uni_modules/wot-design-uni/components/wd-img-cropper/index.scss new file mode 100644 index 0000000..7f55853 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-img-cropper/index.scss @@ -0,0 +1,231 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +@include b(img-cropper) { + background: rgba(0, 0, 0, 1); + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + z-index: 1; + + // 裁剪框包裹器 + @include e(wrapper) { + position: relative; + background: rgba(0, 0, 0, 0.45); + } + + @include e(cut) { + z-index: 9; + position: absolute; + width: 100vw; + height: 100vh; + display: flex; + flex-direction: column; + pointer-events: none; + + .wd-img-cropper__cut--top, + .wd-img-cropper__cut--bottom, + .wd-img-cropper__cut--left, + .wd-img-cropper__cut--right { + // 拖动中背景蒙层为0 拖动结束为0.85 + background-color: rgba(0, 0, 0, 0.85); + transition: background 0.2s; + + @include when(hightlight) { + background-color: rgba(0, 0, 0, 0); + } + } + + .wd-img-cropper__cut--bottom, + .wd-img-cropper__cut--right { + flex: auto; + } + + @include m(middle) { + display: flex; + } + + @include m(body) { + // 若需要变化窗体大小,支持控制窗体的大小来控制下方所有对应的展示 + background-color: transparent; + position: relative; + + // 节选框的窗体最外部边缘线 + &::before { + content: ""; + border: 1px solid #fff; + width: calc(200% - 1px); + height: calc(200% - 1px); + position: absolute; + transform: scale(0.5) translate(-1px, -1px); + top: -50%; + left: -50%; + } + + // 结算框对角尺寸 + $border-size: 2px; + + // 节选框的四个角 + .is-left-top, + .is-left-bottom, + .is-right-top, + .is-right-bottom { + &::before { + content: ""; + position: absolute; + width: $border-size; + height: 20px; + background-color: #fff; + } + + &::after { + content: ""; + position: absolute; + width: 20px; + height: $border-size; + background-color: #fff; + } + } + + .is-left-top { + + &::before, + &::after { + left: -$border-size; + top: -$border-size; + } + } + + .is-left-bottom { + + &::before, + &::after { + left: -$border-size; + bottom: -$border-size; + } + } + + .is-right-top { + + &::before, + &::after { + right: -$border-size; + top: -$border-size; + } + } + + .is-right-bottom { + + &::before, + &::after { + right: -$border-size; + bottom: -$border-size; + } + } + + // 内部网格线 + .is-gridlines-x, + .is-gridlines-y { + width: 100%; + height: 100%; + position: absolute; + left: 0; + top: 0; + display: flex; + } + + .is-gridlines-x { + justify-content: center; + + &::before { + content: ""; + display: inline-block; + width: 66.66%; + height: 200%; + border: 1px solid #fff; + border-top: none; + border-bottom: none; + transform: scale(0.5) translate(0, -50%); + } + } + + // 内部网格线 - y轴 + .is-gridlines-y { + align-items: center; + + &::after { + content: ""; + flex-shrink: 0; + display: inline-block; + width: 200%; + height: 66.66%; + border: 1px solid #fff; + border-left: none; + border-right: none; + transform: scale(0.5) translate(-50%, 0); + } + } + } + } + + @include e(img) { + z-index: 2; + top: 0; + left: 0; + position: absolute; + border: none; + width: 100%; + backface-visibility: hidden; + transform-origin: center; + } + + @include e(canvas) { + position: fixed; + background: white; + width: 150px; + height: 150px; + z-index: 10; + top: -200%; + pointer-events: none; + } + + @include e(footer) { + position: fixed; + z-index: 10; + bottom: 10px; + width: 100%; + height: 15vh; + text-align: center; + + @include m(button) { + position: relative; + text-align: left; + margin: 0 20px; + padding-top: 4vh; + // line-height: 32px; + box-sizing: border-box; + + .is-cancel { + display: inline-block; + color: #fff; + font-size: 16px; + } + + .is-confirm { + position: absolute; + right: 0; + // height: 32px; + width: 56px; + border-radius: 16px; + font-size: 16px; + } + } + } + + @include edeep(rotate) { + font-size: $-img-cropper-icon-size; + color: $-img-cropper-icon-color; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-img-cropper/types.ts b/uni_modules/wot-design-uni/components/wd-img-cropper/types.ts new file mode 100644 index 0000000..a8682c1 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-img-cropper/types.ts @@ -0,0 +1,85 @@ +/* + * @Author: weisheng + * @Date: 2024-06-03 23:43:43 + * @LastEditTime: 2025-03-25 17:28:13 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-img-cropper/types.ts + * 记得注释 + */ +import type { ComponentPublicInstance, ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' + +export const imgCropperProps = { + ...baseProps, + /** + * 打开图片裁剪组件 + */ + modelValue: makeBooleanProp(false), + /** + * 取消按钮文案 + */ + cancelButtonText: String, + /** + * 确认按钮文案 + */ + confirmButtonText: String, + /** + * 是否禁用旋转 + */ + disabledRotate: makeBooleanProp(false), + /** canvas绘图参数 start **/ + /** + * 目标文件的类型,wx.canvasToTempFilePath属性介绍 + */ + fileType: makeStringProp('png'), + /** + * 生成的图片质量 wx.canvasToTempFilePath属性介绍 + */ + quality: makeNumberProp(1), + /** + * 设置导出图片尺寸 + */ + exportScale: makeNumberProp(2), + /** canvas绘图参数 end **/ + /** + * 图片源路径 + */ + imgSrc: makeStringProp(''), + /** + * 图片宽 + */ + imgWidth: makeNumericProp(''), + /** + * 图片高 + */ + imgHeight: makeNumericProp(''), + /** + * 最大缩放 + */ + maxScale: makeNumberProp(3), + /** + * 裁剪框宽高比,格式为 width:height + */ + aspectRatio: makeStringProp('1:1') +} + +export type ImgCropperProps = ExtractPropTypes + +export type ImgCropperExpose = { + /** + * 逆转是否使用动画 + */ + revertIsAnimation: (animation: boolean) => void + /** + * 初始化图片的大小和角度以及距离 + */ + resetImg: () => void + /** + * 控制旋转角度 + * @param angle 角度 + */ + setRoate: (angle: number) => void +} + +export type ImgCropperInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-img-cropper/wd-img-cropper.vue b/uni_modules/wot-design-uni/components/wd-img-cropper/wd-img-cropper.vue new file mode 100644 index 0000000..a130be2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-img-cropper/wd-img-cropper.vue @@ -0,0 +1,664 @@ + + + + + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-img/index.scss b/uni_modules/wot-design-uni/components/wd-img/index.scss new file mode 100644 index 0000000..9d3eba2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-img/index.scss @@ -0,0 +1,19 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +@include b(img) { + position: relative; + display: inline-block; + + @include e(image) { + display: block; + width: 100%; + height: 100%; + box-sizing: border-box; + } + + @include when(round) { + overflow: hidden; + border-radius: 50%; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-img/types.ts b/uni_modules/wot-design-uni/components/wd-img/types.ts new file mode 100644 index 0000000..afa36c2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-img/types.ts @@ -0,0 +1,61 @@ +import { baseProps, makeBooleanProp, makeStringProp, numericProp } from '../common/props' +export type ImageMode = + | 'scaleToFill' + | 'aspectFit' + | 'aspectFill' + | 'widthFix' + | 'heightFix' + | 'top' + | 'bottom' + | 'center' + | 'left' + | 'right' + | 'top left' + | 'top right' + | 'bottom left' + | 'bottom right' + +export const imgProps = { + ...baseProps, + customImage: makeStringProp(''), + /** + * 图片链接 + */ + src: String, + /** + * 预览图片链接 + */ + previewSrc: String, + /** + * 是否显示为圆形 + */ + round: makeBooleanProp(false), + /** + * 填充模式:'top left' / 'top right' / 'bottom left' / 'bottom right' / 'right' / 'left' / 'center' / 'bottom' / 'top' / 'heightFix' / 'widthFix' / 'aspectFill' / 'aspectFit' / 'scaleToFill' + */ + mode: makeStringProp('scaleToFill'), + /** + * 是否懒加载 + */ + lazyLoad: makeBooleanProp(false), + /** + * 宽度,默认单位为px + */ + width: numericProp, + /** + * 高度,默认单位为px + */ + height: numericProp, + /** + * 圆角大小,默认单位为px + */ + radius: numericProp, + /** + * 是否允许预览 + */ + enablePreview: makeBooleanProp(false), + /** + * 开启长按图片显示识别小程序码菜单,仅在微信小程序平台有效 + */ + showMenuByLongpress: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-img/wd-img.vue b/uni_modules/wot-design-uni/components/wd-img/wd-img.vue new file mode 100644 index 0000000..dba0587 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-img/wd-img.vue @@ -0,0 +1,89 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-index-anchor/index.scss b/uni_modules/wot-design-uni/components/wd-index-anchor/index.scss new file mode 100644 index 0000000..f0a1ac6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-index-anchor/index.scss @@ -0,0 +1,35 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(index-anchor) { + background-color: $-color-gray-8; + color: $-color-white; + } +} + +// #ifdef MP-DINGTALK +@include b(index-anchor-ding) { + + @include when(sticky){ + position: sticky; + top: 0; + left: 0; + z-index: 1; + } +} +// #endif + +@include b(index-anchor) { + background-color: $-color-gray-2; + padding: 10px; + font-size: 14px; + color: $-color-title; + + @include when(sticky){ + position: sticky; + top: 0; + left: 0; + z-index: 1; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-index-anchor/type.ts b/uni_modules/wot-design-uni/components/wd-index-anchor/type.ts new file mode 100644 index 0000000..8a683fc --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-index-anchor/type.ts @@ -0,0 +1,9 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeRequiredProp } from '../common/props' + +export const indexAnchorProps = { + ...baseProps, + index: makeRequiredProp([String, Number]) +} + +export type IndexAnchorProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-index-anchor/wd-index-anchor.vue b/uni_modules/wot-design-uni/components/wd-index-anchor/wd-index-anchor.vue new file mode 100644 index 0000000..8ea7e1a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-index-anchor/wd-index-anchor.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-index-bar/index.scss b/uni_modules/wot-design-uni/components/wd-index-bar/index.scss new file mode 100644 index 0000000..a0cf250 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-index-bar/index.scss @@ -0,0 +1,39 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(index-bar) { + @include e(index) { + color: $-color-white; + } + } +} + +@include b(index-bar) { + position: relative; + width: 100%; + height: 100%; + + @include e(content) { + width: 100%; + height: 100%; + } + + @include e(sidebar) { + position: absolute; + top: 50%; + right: 4px; + transform: translateY(-50%); + } + + @include e(index) { + font-size: 12px; + font-weight: $-fw-medium; + color: $-color-title; + padding: 4px 6px; + + @include when(active) { + color: $-color-theme; + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-index-bar/type.ts b/uni_modules/wot-design-uni/components/wd-index-bar/type.ts new file mode 100644 index 0000000..9a8c603 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-index-bar/type.ts @@ -0,0 +1,23 @@ +import type { InjectionKey } from 'vue' +import type { ExtractPropTypes } from 'vue' +import { makeBooleanProp } from '../common/props' + +export type AnchorIndex = number | string + +export const indexBarProps = { + /** + * @description 索引是否吸顶 + */ + sticky: makeBooleanProp(false) +} + +export type IndexBarProps = ExtractPropTypes + +export type InderBarProvide = { + props: { sticky?: boolean } + anchorState: { + activeIndex: AnchorIndex | null // 当前激活的索引 + } +} + +export const indexBarInjectionKey: InjectionKey = Symbol('wd-index-bar') diff --git a/uni_modules/wot-design-uni/components/wd-index-bar/wd-index-bar.vue b/uni_modules/wot-design-uni/components/wd-index-bar/wd-index-bar.vue new file mode 100644 index 0000000..d822559 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-index-bar/wd-index-bar.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-input-number/index.scss b/uni_modules/wot-design-uni/components/wd-input-number/index.scss new file mode 100644 index 0000000..32879c2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-input-number/index.scss @@ -0,0 +1,132 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(input-number) { + @include e(action) { + color: $-dark-color; + @include when(disabled) { + color: $-dark-color-gray; + } + } + + @include e(input) { + color: $-dark-color; + } + + @include when(disabled) { + .wd-input-number__input { + color: $-dark-color-gray; + } + .wd-input-number__sub, + .wd-input-number__add { + color: $-dark-color-gray; + } + } + } +} + +@include b(input-number) { + display: inline-block; + user-select: none; + line-height: 1.15; + + @include e(action) { + position: relative; + display: inline-block; + width: $-input-number-btn-width; + height: $-input-number-height; + vertical-align: middle; + color: $-input-number-icon-color; + -webkit-tap-highlight-color: transparent; + box-sizing: border-box; + + // 左右加减号的边框 + &::after { + position: absolute; + content: ""; + width: calc(200% - 2px); + height: calc(200% - 2px); + left: 0; + top: 0; + border: 1px solid $-input-number-border-color; + border-top-left-radius: calc($-input-number-radius * 2); + border-bottom-left-radius: calc($-input-number-radius * 2); + transform: scale(0.5); + transform-origin: left top; + } + &:last-child::after { + border-top-left-radius: 0; + border-bottom-left-radius: 0; + border-top-right-radius: calc($-input-number-radius * 2); + border-bottom-right-radius: calc($-input-number-radius * 2); + } + @include when(disabled) { + color: $-input-number-disabled-color; + } + } + + @include e(inner) { + position: relative; + display: inline-block; + vertical-align: middle; + } + + @include e(input) { + position: relative; + display: block; + width: $-input-number-input-width; + height: $-input-number-height; + padding: 0 2px; + box-sizing: border-box; + z-index: 1; + background: transparent; + border: none; + outline: none; + text-align: center; + color: $-input-number-color; + font-size: $-input-number-fs; + -webkit-appearance: none; + -webkit-tap-highlight-color: transparent; + } + + @include e(input-border) { + position: absolute; + width: 100%; + height: calc(200% - 2px); + left: 0; + top: 0; + border-top: 1px solid $-input-number-border-color; + border-bottom: 1px solid $-input-number-border-color; + transform: scaleY(0.5); + transform-origin: left top; + z-index: 0; + } + + @include edeep(action-icon) { + position: absolute; + display: inline-block; + font-size: $-input-number-icon-size; + width: $-input-number-icon-size; + height: $-input-number-icon-size; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } + + @include when(disabled) { + .wd-input-number__input { + color: $-input-number-disabled-color; + z-index: inherit; + } + .wd-input-number__sub, + .wd-input-number__add { + color: $-input-number-disabled-color; + } + } + @include when(without-input) { + .wd-input-number__action:last-child::after { + border-left: none; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-input-number/types.ts b/uni_modules/wot-design-uni/components/wd-input-number/types.ts new file mode 100644 index 0000000..2931f64 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-input-number/types.ts @@ -0,0 +1,110 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 20:40:34 + * @LastEditTime: 2025-06-21 18:23:35 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-input-number/types.ts + * 记得注释 + */ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeRequiredProp, makeStringProp, numericProp } from '../common/props' + +/** + * 输入框值变化前的回调函数类型定义 + * @param value 输入框的新值 + * @returns 返回布尔值或Promise,用于控制是否允许值的变化 + */ +export type InputNumberBeforeChange = (value: number | string) => boolean | Promise + +export type OperationType = 'add' | 'sub' + +export const inputNumberProps = { + ...baseProps, + /** + * 绑定值 + */ + modelValue: makeRequiredProp(numericProp), + /** + * 最小值 + */ + min: makeNumberProp(1), + /** + * 最大值 + */ + max: makeNumberProp(Number.MAX_SAFE_INTEGER), + /** + * 步进值 + */ + step: makeNumberProp(1), + /** + * 是否严格按照步进值递增或递减 + */ + stepStrictly: makeBooleanProp(false), + /** + * 数值精度 + */ + precision: makeNumericProp(0), + /** + * 是否禁用 + */ + disabled: makeBooleanProp(false), + /** + * 是否禁用输入框 + */ + disableInput: makeBooleanProp(false), + /** + * 是否禁用减号按钮 + */ + disableMinus: makeBooleanProp(false), + /** + * 是否禁用加号按钮 + */ + disablePlus: makeBooleanProp(false), + /** + * 是否不显示输入框 + */ + withoutInput: makeBooleanProp(false), + /** + * 输入框宽度 + */ + inputWidth: makeNumericProp(36), + /** + * 是否允许为空 + */ + allowNull: makeBooleanProp(false), + /** + * 输入框占位符 + */ + placeholder: makeStringProp(''), + /** + * 原生属性,键盘弹起时,是否自动上推页面 + */ + adjustPosition: makeBooleanProp(true), + /** + * 输入值变化前的回调函数,返回 `false` 可阻止输入,支持返回 `Promise` + */ + beforeChange: Function as PropType, + /** + * 是否开启长按加减手势 + */ + longPress: makeBooleanProp(false), + /** + * 是否立即响应输入变化,false 时仅在失焦和按钮点击时更新 + */ + immediateChange: makeBooleanProp(true), + /** + * 是否在初始化时更新 v-model 为修正后的值 + * true: 自动修正并更新 v-model + * false: 保持原始值不修正,但仍会进行显示格式化 + */ + updateOnInit: makeBooleanProp(true), + /** + * 输入框类型 + * number: 数字输入 + * digit: 整数输入 + */ + inputType: makeStringProp<'number' | 'digit'>('digit') +} + +export type InputNumberProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-input-number/wd-input-number.vue b/uni_modules/wot-design-uni/components/wd-input-number/wd-input-number.vue new file mode 100644 index 0000000..65e3bc7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-input-number/wd-input-number.vue @@ -0,0 +1,464 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-input/index.scss b/uni_modules/wot-design-uni/components/wd-input/index.scss new file mode 100644 index 0000000..adef5a0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-input/index.scss @@ -0,0 +1,323 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +.wot-theme-dark { + @include b(input) { + background: $-dark-background2; + + &::after { + background: $-dark-color-gray; + } + + @include when(not-empty) { + &:not(.is-disabled) { + &::after { + background-color: $-dark-color; + } + } + } + + + @include e(inner) { + color: $-dark-color; + + &::-webkit-input-placeholder { + color: $-dark-color3; + } + } + + @include e(count) { + color: $-dark-color3; + background: transparent; + } + + @include e(count-current) { + color: $-dark-color; + } + + :deep(.wd-input__icon), + :deep(.wd-input__clear) { + color: $-dark-color; + background: transparent; + } + + @include when(cell) { + background-color: $-dark-background2; + line-height: $-cell-line-height; + + @include when(border) { + @include halfPixelBorder("top", $-input-cell-padding, $-dark-border-color); + } + } + + @include when(disabled) { + + .wd-input__inner { + color: $-dark-color-gray; + background: transparent; + } + } + + + @include e(label) { + color: $-dark-color; + } + } +} + +@include b(input) { + position: relative; + -webkit-tap-highlight-color: transparent; + text-align: left; + background: $-input-bg; + + &::after { + position: absolute; + content: ""; + bottom: 0; + left: 0; + right: 0; + height: 1px; + background: $-input-border-color; + transform: scaleY(0.5); + transition: background-color 0.2s ease-in-out; + } + + @include when(not-empty) { + &:not(.is-disabled) { + &::after { + background-color: $-input-not-empty-border-color; + } + } + } + + @include e(label) { + position: relative; + display: flex; + width: $-input-cell-label-width; + color: $-cell-title-color; + margin-right: $-cell-padding; + box-sizing: border-box; + font-size: $-input-fs; + flex-shrink: 0; + } + + @include e(label-inner) { + display: inline-block; + font-size: $-input-fs; + line-height: $-cell-line-height; + } + + + + @include e(required) { + font-size: $-cell-required-size; + color: $-cell-required-color; + margin-left: $-cell-required-margin; + + @include m(left) { + margin-left: 0; + margin-right: $-cell-required-margin; + } + } + + @include e(body) { + flex: 1; + } + + @include e(value) { + position: relative; + display: flex; + flex-direction: row; + align-items: center; + } + + + @include e(prefix) { + margin-right: $-input-icon-margin; + font-size: $-input-fs; + line-height: initial; + + :deep(.wd-input__icon), + :deep(.wd-input__clear) { + margin-left: 0; + } + } + + @include e(suffix) { + flex-shrink: 0; + line-height: initial; + } + + @include e(error-message){ + color: $-form-item-error-message-color; + font-size: $-form-item-error-message-font-size; + line-height: $-form-item-error-message-line-height; + text-align: left; + vertical-align: middle; + } + + @include when(disabled) { + + .wd-input__inner { + color: $-input-disabled-color; + background: transparent; + } + } + + @include when(error) { + + .wd-input__inner { + color: $-input-error-color; + background: transparent; + } + } + + @include when(no-border) { + &::after { + display: none; + } + + .wd-input__inner { + height: $-input-inner-height-no-border; + padding-top: 0; + padding-bottom: 0; + } + } + + @include when(cell) { + display: flex; + align-items: flex-start; + padding: $-input-cell-padding $-input-padding; + background-color: $-input-cell-bg; + + &.is-error::after { + background: $-input-cell-border-color; + } + + :deep(.wd-input__icon), + :deep(.wd-input__clear) { + display: inline-flex; + align-items: center; + height: $-input-cell-height; + line-height: $-input-cell-height; + } + + .wd-input__prefix { + display: inline-block; + margin-right: $-cell-icon-right; + } + + .wd-input__inner { + height: $-input-cell-height; + } + + &.wd-input::after { + display: none; + } + + + @include when(center) { + align-items: center; + } + + @include when(border) { + @include halfPixelBorder("top", $-input-cell-padding); + } + } + + @include when(large) { + padding: $-input-cell-padding-large; + + .wd-input__prefix { + font-size: $-input-fs-large; + } + + .wd-input__label-inner { + font-size: $-input-fs-large; + } + + .wd-input__inner { + font-size: $-input-fs-large; + } + + + .wd-input__count { + font-size: $-input-count-fs-large; + } + + :deep(.wd-input__icon), + :deep(.wd-input__clear) { + font-size: $-input-icon-size-large; + } + + } + + + @include e(inner) { + flex: 1; + height: $-input-inner-height; + font-size: $-input-fs; + color: $-input-color; + outline: none; + border: none; + background: none; + padding: 0; + box-sizing: border-box; + + &::-webkit-input-placeholder { + color: $-input-placeholder-color; + } + + @include when(align-right) { + text-align: right; + } + } + + @include e(readonly-mask) { + position: absolute; + top: 0; + left: 0; + z-index: 2; + width: 100%; + height: 100%; + } + + + @include edeep(icon) { + margin-left: $-input-icon-margin; + font-size: $-input-icon-size; + color: $-input-icon-color; + vertical-align: middle; + background: $-input-bg; + } + + @include edeep(clear) { + margin-left: $-input-icon-margin; + font-size: $-input-icon-size; + color: $-input-clear-color; + vertical-align: middle; + background: $-input-bg; + } + + @include e(count) { + margin-left: 15px; + font-size: $-input-count-fs; + color: $-input-count-color; + vertical-align: middle; + background: $-input-bg; + } + + @include e(count-current) { + color: $-input-count-current-color; + + @include when(error) { + color: $-input-error-color; + } + } + + .wd-input__count, + .wd-input__count-current { + display: inline-flex; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-input/placeholder.scss b/uni_modules/wot-design-uni/components/wd-input/placeholder.scss new file mode 100644 index 0000000..53ca272 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-input/placeholder.scss @@ -0,0 +1,21 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +.wot-theme-dark { + @include b(input) { + @include e(placeholder) { + color: $-dark-color3; + } + } +} + + +@include b(input) { + @include e(placeholder) { + color: $-input-placeholder-color; + + &.is-error { + color: $-input-error-color; + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-input/types.ts b/uni_modules/wot-design-uni/components/wd-input/types.ts new file mode 100644 index 0000000..a56dab6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-input/types.ts @@ -0,0 +1,189 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' +import type { FormItemRule } from '../wd-form/types' + +export type InputClearTrigger = 'focus' | 'always' + +export type InputType = 'text' | 'number' | 'digit' | 'idcard' | 'safe-password' | 'nickname' | 'tel' + +export type InputConfirmType = 'send' | 'search' | 'next' | 'go' | 'done' + +export type InputSize = 'large' + +export type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url' + +export const inputProps = { + ...baseProps, + customInputClass: makeStringProp(''), + customLabelClass: makeStringProp(''), + // 原生属性 + /** + * 占位文本 + */ + placeholder: String, + /** + * 原生属性,指定 placeholder 的样式,目前仅支持color,font-size和font-weight + */ + placeholderStyle: String, + /** + * 原生属性,指定 placeholder 的样式类 + */ + placeholderClass: makeStringProp(''), + /** + * 原生属性,指定光标与键盘的距离。取 input 距离底部的距离和cursor-spacing指定的距离的最小值作为光标与键盘的距离 + */ + cursorSpacing: makeNumberProp(0), + /** + * 原生属性,指定focus时的光标位置 + */ + cursor: makeNumberProp(-1), + /** + * 原生属性,光标起始位置,自动聚集时有效,需与selection-end搭配使用 + */ + selectionStart: makeNumberProp(-1), + /** + * 原生属性,光标结束位置,自动聚集时有效,需与selection-start搭配使用 + */ + selectionEnd: makeNumberProp(-1), + /** + * 原生属性,键盘弹起时,是否自动上推页面 + */ + adjustPosition: makeBooleanProp(true), + /** + * focus时,点击页面的时候不收起键盘 + */ + holdKeyboard: makeBooleanProp(false), + /** + * 设置键盘右下角按钮的文字,仅在type='text'时生效,可选值:done / go / next / search / send + */ + confirmType: makeStringProp('done'), + /** + * 点击键盘右下角按钮时是否保持键盘不收起 + */ + confirmHold: makeBooleanProp(false), + /** + * 原生属性,获取焦点 + */ + focus: makeBooleanProp(false), + /** + * 类型,可选值:text / number / digit / idcard / safe-password / nickname / tel + */ + type: makeStringProp('text'), + /** + * 原生属性,最大长度 + */ + maxlength: { + type: Number, + // #ifndef MP-ALIPAY + default: -1 + // #endif + }, + /** + * 原生属性,禁用 + */ + disabled: makeBooleanProp(false), + /** + * 微信小程序原生属性,强制 input 处于同层状态,默认 focus 时 input 会切到非同层状态 (仅在 iOS 下生效) + */ + alwaysEmbed: makeBooleanProp(false), + // 原生属性结束 + /** + * 输入框的值靠右展示 + */ + alignRight: makeBooleanProp(false), + /** + * 绑定值 + */ + modelValue: makeNumericProp(''), + /** + * 显示为密码框 + */ + showPassword: makeBooleanProp(false), + /** + * 显示清空按钮 + */ + clearable: makeBooleanProp(false), + /** + * 只读 + */ + readonly: makeBooleanProp(false), + /** + * 前置图标,icon组件中的图标类名 + */ + prefixIcon: String, + /** + * 后置图标,icon组件中的图标类名 + */ + suffixIcon: String, + /** + * 显示字数限制,需要同时设置 maxlength + */ + showWordLimit: makeBooleanProp(false), + /** + * 设置左侧标题 + */ + label: String, + /** + * 设置左侧标题宽度 + */ + labelWidth: makeStringProp(''), + /** + * 设置输入框大小,可选值:large + */ + size: String as PropType, + /** + * 设置输入框错误状态,错误状态时为红色 + */ + error: makeBooleanProp(false), + /** + * 当有label属性时,设置标题和输入框垂直居中,默认为顶部居中 + */ + center: makeBooleanProp(false), + /** + * 非 cell 类型下是否隐藏下划线 + */ + noBorder: makeBooleanProp(false), + /** + * 是否必填 + */ + required: makeBooleanProp(false), + /** + * 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的 + */ + prop: String, + /** + * 表单验证规则,结合wd-form组件使用 + */ + rules: makeArrayProp(), + /** + * 显示清除图标的时机,always 表示输入框不为空时展示,focus 表示输入框聚焦且不为空时展示 + * 类型: "focus" | "always" + * 默认值: "always" + */ + clearTrigger: makeStringProp('always'), + /** + * 是否在点击清除按钮时聚焦输入框 + * 类型: boolean + * 默认值: true + */ + focusWhenClear: makeBooleanProp(true), + /** + * 是否忽略组件内对文本合成系统事件的处理。为 false 时将触发 compositionstart、compositionend、compositionupdate 事件,且在文本合成期间会触发 input 事件 + * 类型: boolean + * 默认值: true + */ + ignoreCompositionEvent: makeBooleanProp(true), + /** + * 它提供了用户在编辑元素或其内容时可能输入的数据类型的提示。在符合条件的高版本webview里,uni-app的web和app-vue平台中可使用本属性。 + * 类型: InputMode + * 可选值: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | "password" + * 默认值: "text" + */ + inputmode: makeStringProp('text'), + /** + * 必填标记位置,可选值:before(标签前)、after(标签后) + */ + markerSide: makeStringProp<'before' | 'after'>('before') +} + +export type InputProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-input/wd-input.vue b/uni_modules/wot-design-uni/components/wd-input/wd-input.vue new file mode 100644 index 0000000..9240123 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-input/wd-input.vue @@ -0,0 +1,300 @@ + + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-keyboard/constants.ts b/uni_modules/wot-design-uni/components/wd-keyboard/constants.ts new file mode 100644 index 0000000..764fb95 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-keyboard/constants.ts @@ -0,0 +1,81 @@ +/** + * 车牌号键盘-省份简称 + */ +export const CAR_KEYBOARD_AREAS = [ + '京', + '沪', + '粤', + '津', + '冀', + '豫', + '云', + '辽', + '黑', + '湘', + '皖', + '鲁', + '苏', + '浙', + '赣', + '鄂', + '桂', + '甘', + '晋', + '陕', + '蒙', + '吉', + '闽', + '贵', + '渝', + '川', + '青', + '琼', + '宁', + '挂', + '藏', + '港', + '澳', + '新', + '使', + '学' +] + +/** + * 车牌号键盘-数字和字母(不包含I和O,因为车牌号规则中不使用这两个字母) + */ +export const CAR_KEYBOARD_KEYS = [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 0, + 'Q', + 'W', + 'E', + 'R', + 'T', + 'Y', + 'U', + 'P', + 'A', + 'S', + 'D', + 'F', + 'G', + 'H', + 'J', + 'K', + 'L', + 'Z', + 'X', + 'C', + 'V', + 'B', + 'N', + 'M' +] diff --git a/uni_modules/wot-design-uni/components/wd-keyboard/index.scss b/uni_modules/wot-design-uni/components/wd-keyboard/index.scss new file mode 100644 index 0000000..feffeb0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-keyboard/index.scss @@ -0,0 +1,102 @@ +@import './../common/abstracts/_mixin.scss'; +@import './../common/abstracts/variable.scss'; + +.wot-theme-dark { + @include b(keyboard) { + background: $-dark-background5; + + @include e(header) { + color: $-dark-color; + } + } +} + +@include b(keyboard) { + width: 100%; + background: $-keyboard-background; + color: $-color-black; + user-select: none; + + @include m(with-title) { + border-radius: 20px 20px 0 0; + } + + @include e(header) { + position: relative; + display: flex; + align-items: center; + justify-content: center; + box-sizing: content-box; + height: $-keyboard-title-height; + padding-top: 6px; + color: $-keyboard-title-color; + font-size: $-keyboard-title-font-size; + } + + @include e(title) { + display: inline-block; + font-weight: normal; + + &-left { + position: absolute; + left: 0; + } + } + + @include e(body) { + display: flex; + padding: 6px 0 0 6px; + } + + @include e(keys) { + display: flex; + flex: 3; + flex-wrap: wrap; + } + + &-car { + @include e(body) { + display: flex; + padding: 6px 0 0 6px; + } + } + + &-car { + @include e(keys) { + display: flex; + flex: 10; + flex-wrap: wrap; + + .wd-key-wrapper { + --wot-keyboard-key-font-size: 18px; + flex-basis: 10%; + + @include m(wider) { + flex-basis: 20%; + } + } + } + } + + @include e(close) { + position: absolute; + display: flex; + align-items: center; + right: 0; + height: 100%; + padding: $-keyboard-close-padding; + color: $-keyboard-close-color; + font-size: $-keyboard-close-font-size; + background-color: transparent; + border: none; + @include m(hover) { + opacity: 0.6; + } + } + + @include e(sidebar) { + display: flex; + flex: 1; + flex-direction: column; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-keyboard/key/index.scss b/uni_modules/wot-design-uni/components/wd-keyboard/key/index.scss new file mode 100644 index 0000000..6e256c2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-keyboard/key/index.scss @@ -0,0 +1,79 @@ +@import './../../common/abstracts/_mixin.scss'; +@import './../../common/abstracts/variable.scss'; + +.wot-theme-dark { + @include b(key) { + background: $-dark-background2; + color: $-dark-color; + + &:active { + background-color: $-dark-background4; + } + + @include m(active) { + background-color: $-dark-background4; + } + } +} + +.wd-key-wrapper { + position: relative; + flex: 1; + flex-basis: 33%; + box-sizing: border-box; + padding: 0 6px 6px 0; + + @include m(wider) { + flex-basis: 66%; + } +} + +@include b(key) { + display: flex; + align-items: center; + justify-content: center; + height: $-keyboard-key-height; + font-size: $-keyboard-key-font-size; + line-height: 1.5; + background: $-keyboard-key-background; + border-radius: $-keyboard-key-border-radius; + + &:active { + background-color: $-keyboard-key-active-color; + } + + @include m(large) { + position: absolute; + top: 0; + right: 6px; + bottom: 6px; + left: 0; + height: auto; + } + + @include m(delete, close) { + font-size: $-keyboard-delete-font-size; + } + + @include m(active) { + background-color: $-keyboard-key-active-color; + } + + @include m(close) { + color: $-keyboard-button-text-color; + background: $-keyboard-button-background; + + &:active { + background: $-keyboard-button-background; + opacity: $-keyboard-button-active-opacity; + } + } + + @include edeep(loading-icon) { + color: $-keyboard-button-text-color; + } + + @include edeep(icon) { + font-size: $-keyboard-icon-size; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-keyboard/key/index.vue b/uni_modules/wot-design-uni/components/wd-keyboard/key/index.vue new file mode 100644 index 0000000..b1a9a7c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-keyboard/key/index.vue @@ -0,0 +1,71 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-keyboard/key/types.ts b/uni_modules/wot-design-uni/components/wd-keyboard/key/types.ts new file mode 100644 index 0000000..efa497a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-keyboard/key/types.ts @@ -0,0 +1,11 @@ +import { makeBooleanProp, makeNumericProp, makeStringProp } from '../../common/props' + +export type NumberKeyType = '' | 'delete' | 'extra' | 'close' + +export const keyProps = { + type: makeStringProp(''), + text: makeNumericProp(''), + wider: makeBooleanProp(false), + large: makeBooleanProp(false), + loading: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-keyboard/types.ts b/uni_modules/wot-design-uni/components/wd-keyboard/types.ts new file mode 100644 index 0000000..789f76b --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-keyboard/types.ts @@ -0,0 +1,92 @@ +import type { PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export type KeyboardMode = 'default' | 'custom' | 'car' +export type KeyType = '' | 'delete' | 'extra' | 'close' +export type CarKeyboardLang = 'zh' | 'en' + +export interface Key { + text?: number | string // key文本 + type?: KeyType // key的类型 + wider?: boolean // 是否占2个key的宽度 +} + +export const keyboardProps = { + ...baseProps, + /** + * 是否可见 + */ + visible: makeBooleanProp(false), + /** + * 绑定的值 + */ + modelValue: makeStringProp(''), + /** + * 标题 + */ + title: String, + /** + * 键盘模式 + */ + mode: makeStringProp('default'), + /** + * 层级 + */ + zIndex: makeNumberProp(100), + /** + * 最大长度 + */ + maxlength: makeNumberProp(Infinity), + /** + * 是否显示删除键 + */ + showDeleteKey: makeBooleanProp(true), + /** + * 是否随机键盘按键顺序 + */ + randomKeyOrder: makeBooleanProp(false), + /** + * 确认按钮文本 + */ + closeText: String, + /** + * 删除按钮文本 + */ + deleteText: String, + /** + * 关闭按钮是否显示加载状态 + */ + closeButtonLoading: makeBooleanProp(false), + /** + * 是否显示蒙层 + */ + modal: makeBooleanProp(false), + /** + * 是否在点击外部时收起键盘 + */ + hideOnClickOutside: makeBooleanProp(true), + /** + * 是否锁定滚动 + */ + lockScroll: makeBooleanProp(true), + /** + * 是否在底部安全区域内 + */ + safeAreaInsetBottom: makeBooleanProp(true), + /** + * 额外按键 + */ + extraKey: [String, Array] as PropType>, + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false), + /** + * 车牌键盘语言模式 当mode=car时生效 + */ + carLang: String as PropType, + /** + * 是否自动切换车牌键盘语言 当mode=car且carLang是非受控状态时生效 + */ + autoSwitchLang: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-keyboard/wd-keyboard.vue b/uni_modules/wot-design-uni/components/wd-keyboard/wd-keyboard.vue new file mode 100644 index 0000000..2a5e48f --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-keyboard/wd-keyboard.vue @@ -0,0 +1,206 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-loading/index.scss b/uni_modules/wot-design-uni/components/wd-loading/index.scss new file mode 100644 index 0000000..bc995a7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-loading/index.scss @@ -0,0 +1,37 @@ +@import "../common/abstracts/_mixin.scss"; +@import "../common/abstracts/variable.scss"; + +@include b(loading) { + font-size: 0; + line-height: 0; + vertical-align: middle; + display: inline-block; + width: $-loading-size; + height: $-loading-size; + + @include e(body) { + width: 100%; + height: 100%; + animation: wd-rotate 0.8s linear infinite; + animation-duration: 2s; + + } + @include e(svg) { + width: 100%; + height: 100%; + background-size: cover; + background-repeat: no-repeat; + } +} + +@keyframes wd-rotate { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} + + diff --git a/uni_modules/wot-design-uni/components/wd-loading/types.ts b/uni_modules/wot-design-uni/components/wd-loading/types.ts new file mode 100644 index 0000000..c997f2a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-loading/types.ts @@ -0,0 +1,31 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 20:40:34 + * @LastEditTime: 2024-07-18 22:09:12 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-loading/types.ts + * 记得注释 + */ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeNumericProp, makeStringProp } from '../common/props' + +export type LoadingType = 'outline' | 'ring' // 提示信息加载状态类型 + +export const loadingProps = { + ...baseProps, + /** + * 加载指示器类型,可选值:'outline' | 'ring' + */ + type: makeStringProp('ring'), + /** + * 设置加载指示器颜色 + */ + color: makeStringProp('#4D80F0'), + /** + * 设置加载指示器大小 + */ + size: makeNumericProp('') +} + +export type LoadingProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue b/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue new file mode 100644 index 0000000..d887e8f --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-loading/wd-loading.vue @@ -0,0 +1,90 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-loadmore/index.scss b/uni_modules/wot-design-uni/components/wd-loadmore/index.scss new file mode 100644 index 0000000..78974f6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-loadmore/index.scss @@ -0,0 +1,39 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; +.wot-theme-dark { + @include b(loadmore) { + color: $-dark-color; + } +} + +@include b(loadmore) { + width: 100%; + height: $-loadmore-height; + line-height: $-loadmore-height; + text-align: center; + color: $-loadmore-color; + + @include edeep(loading) { + display: inline-block; + margin-right: 8px; + vertical-align: middle; + width: $-loadmore-loading-size; + height: $-loadmore-loading-size; + } + @include e(text) { + display: inline-block; + font-size: $-loadmore-fs; + vertical-align: middle; + + @include when(light) { + margin: 0 6px; + color: $-loadmore-error-color; + } + } + @include edeep(refresh) { + display: inline-block; + color: $-loadmore-error-color; + vertical-align: middle; + font-size: $-loadmore-refresh-fs; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-loadmore/types.ts b/uni_modules/wot-design-uni/components/wd-loadmore/types.ts new file mode 100644 index 0000000..8ee2d00 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-loadmore/types.ts @@ -0,0 +1,30 @@ +import type { PropType } from 'vue' +import { baseProps } from '../common/props' +import type { LoadingProps } from '../wd-loading/types' + +export type LoadMoreState = 'loading' | 'error' | 'finished' + +export const loadmoreProps = { + ...baseProps, + /** + * 加载状态,可选值:'loading' | 'error' | 'finished' + */ + state: String as PropType, + /** + * 加载提示文案 + */ + loadingText: String, + /** + * 全部加载完的提示文案 + */ + finishedText: String, + /** + * 加载失败的提示文案 + */ + errorText: String, + /** + * 加载中loading组件的属性 + * 参考loading组件 + */ + loadingProps: Object as PropType> +} diff --git a/uni_modules/wot-design-uni/components/wd-loadmore/wd-loadmore.vue b/uni_modules/wot-design-uni/components/wd-loadmore/wd-loadmore.vue new file mode 100644 index 0000000..2852119 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-loadmore/wd-loadmore.vue @@ -0,0 +1,68 @@ + + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-message-box/index.scss b/uni_modules/wot-design-uni/components/wd-message-box/index.scss new file mode 100644 index 0000000..b4c39e3 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-message-box/index.scss @@ -0,0 +1,108 @@ +@import "../common/abstracts/variable.scss"; +@import "../common/abstracts/_mixin.scss"; + +.wot-theme-dark { + @include b(message-box) { + @include e(body) { + background-color: $-dark-background2; + } + + @include e(title) { + color: $-dark-color; + } + + @include e(content) { + color: $-dark-color3; + + &::-webkit-scrollbar-thumb { + background: $-dark-border-color; + } + } + } +} + +:deep(.wd-message-box){ + border-radius: $-message-box-radius; + overflow: hidden; +} + +@include b(message-box) { + border-radius: $-message-box-radius; + overflow: hidden; + + @include e(container) { + width: $-message-box-width; + box-sizing: border-box; + } + + @include e(body) { + background-color: $-message-box-bg; + padding: $-message-box-padding; + + @include when(no-title) { + padding: 25px 24px 0px; + } + } + + @include e(title) { + text-align: center; + font-size: $-message-box-title-fs; + color: $-message-box-title-color; + line-height: 20px; + font-weight: 500; + padding-top: 5px; + padding-bottom: 10px; + } + + @include e(content) { + max-height: $-message-box-content-max-height; + color: $-message-box-content-color; + font-size: $-message-box-content-fs; + text-align: center; + overflow: auto; + line-height: 20px; + + &::-webkit-scrollbar { + width: $-message-box-content-scrollbar-width; + } + + &::-webkit-scrollbar-thumb { + width: $-message-box-content-scrollbar-width; + background: $-message-box-content-scrollbar-color; + border-radius: calc($-message-box-content-scrollbar-width / 2); + } + } + + @include e(input-error) { + min-height: 18px; + margin-top: 2px; + color: $-message-box-input-error-color; + text-align: left; + + @include when(hidden) { + visibility: hidden; + } + } + + @include e(actions) { + padding: 24px; + } + + @include edeep(actions-btn) { + &:not(:last-child) { + margin-right: 16px; + } + } + + @include e(flex) { + display: flex; + } + + @include e(block) { + display: block; + } + + @include e(cancel) { + margin-right: 16px; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-message-box/index.ts b/uni_modules/wot-design-uni/components/wd-message-box/index.ts new file mode 100644 index 0000000..5e67a4e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-message-box/index.ts @@ -0,0 +1,96 @@ +/* + * @Author: weisheng + * @Date: 2022-12-14 17:33:21 + * @LastEditTime: 2024-12-05 13:23:17 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-message-box\index.ts + * 记得注释 + */ +import { inject, provide, ref } from 'vue' +import type { Message, MessageOptions, MessageOptionsWithCallBack, MessageResult, MessageType } from './types' +import { deepMerge } from '../common/util' + +const messageDefaultOptionKey = '__MESSAGE_OPTION__' + +const None = Symbol('None') + +// 默认模板 +export const defaultOptions: MessageOptionsWithCallBack = { + title: '', + showCancelButton: false, + show: false, + closeOnClickModal: true, + msg: '', + type: 'alert', + inputType: 'text', + inputValue: '', + showErr: false, + zIndex: 99, + lazyRender: true, + inputError: '' +} + +export function useMessage(selector: string = ''): Message { + const messageOptionKey = selector ? messageDefaultOptionKey + selector : messageDefaultOptionKey + const messageOption = inject(messageOptionKey, ref(None)) // Message选项 + if (messageOption.value === None) { + messageOption.value = defaultOptions + provide(messageOptionKey, messageOption) + } + + const createMethod = (type: MessageType) => { + // 优先级:options->MessageOptions->defaultOptions + return (options: MessageOptions | string) => { + const messageOptions = deepMerge({ type: type }, typeof options === 'string' ? { title: options } : options) as MessageOptions + if (messageOptions.type === 'confirm' || messageOptions.type === 'prompt') { + messageOptions.showCancelButton = true + } else { + messageOptions.showCancelButton = false + } + return show(messageOptions) + } + } + + const show = (option: MessageOptions | string) => { + // 返回一个promise + return new Promise((resolve, reject) => { + const options = deepMerge(defaultOptions, typeof option === 'string' ? { title: option } : option) + messageOption.value = deepMerge(options, { + show: true, + success: (res: MessageResult) => { + close() + resolve(res) + }, + fail: (res: MessageResult) => { + close() + reject(res) + } + }) + }) + } + + // 打开Alert 弹框 + const alert = createMethod('alert') + // 打开Confirm 弹框 + const confirm = createMethod('confirm') + // 打开Prompt 弹框 + const prompt = createMethod('prompt') + + const close = () => { + if (messageOption.value !== None) { + messageOption.value.show = false + } + } + return { + show, + alert, + confirm, + prompt, + close + } +} + +export const getMessageDefaultOptionKey = (selector: string) => { + return selector ? `${messageDefaultOptionKey}${selector}` : messageDefaultOptionKey +} diff --git a/uni_modules/wot-design-uni/components/wd-message-box/types.ts b/uni_modules/wot-design-uni/components/wd-message-box/types.ts new file mode 100644 index 0000000..d4e74a3 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-message-box/types.ts @@ -0,0 +1,141 @@ +/* + * @Author: weisheng + * @Date: 2024-04-08 22:34:01 + * @LastEditTime: 2024-12-05 13:26:50 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-message-box\types.ts + * 记得注释 + */ +import { baseProps, makeStringProp, makeBooleanProp } from '../common/props' +import type { ButtonProps } from '../wd-button/types' +import { type InputSize, type InputType } from '../wd-input/types' + +export type MessageType = 'alert' | 'confirm' | 'prompt' + +export type MessageBeforeConfirmOption = { + resolve: (isPass: boolean) => void +} + +export type MessageOptions = { + /** + * 标题 + */ + title?: string + /** + * 是否展示取消按钮 + */ + showCancelButton?: boolean + /** + * 是否支持点击蒙层进行关闭,点击蒙层回调传入的action为'modal' + */ + closeOnClickModal?: boolean + /** + * 确定按钮文案 + */ + confirmButtonText?: string + /** + * 取消按钮文案 + */ + cancelButtonText?: string + /** + * 消息文案 + */ + msg?: string + /** + * 弹框类型 + */ + type?: MessageType + /** + * 当type为prompt时,输入框类型 + */ + inputType?: InputType + /** + * 设置输入框大小,可选值:large + */ + inputSize?: InputSize + /** + * 当type为prompt时,输入框初始值 + */ + inputValue?: string | number + /** + * 当type为prompt时,输入框placeholder + */ + inputPlaceholder?: string + /** + * 当type为prompt时,输入框正则校验,点击确定按钮时进行校验 + */ + inputPattern?: RegExp + /** + * 当type为prompt时,输入框校验函数,点击确定按钮时进行校验 + */ + inputValidate?: InputValidate + /** + * 当type为prompt时,输入框检验不通过时的错误提示文案 + */ + inputError?: string + /** + * 是否展示错误信息 + */ + showErr?: boolean + /** + * 弹窗层级 + */ + zIndex?: number + /** + * 弹层内容懒渲染,触发展示时才渲染内容 + */ + lazyRender?: boolean + /** + * 确认前钩子 + */ + beforeConfirm?: (options: MessageBeforeConfirmOption) => void + /** + * 取消按钮Props + */ + cancelButtonProps?: Partial + /** + * 确认按钮Props + */ + confirmButtonProps?: Partial +} + +export type MessageOptionsWithCallBack = MessageOptions & { + show?: boolean + success?: (res: MessageResult) => void + fail?: (res: MessageResult) => void +} + +export type ActionType = 'confirm' | 'cancel' | 'modal' + +export type InputValidate = (inputValue: string | number) => boolean + +export interface MessageResult { + action: ActionType + value?: string | number +} + +export interface Message { + // 打开Message + show(toastOptions: MessageOptions | string): Promise + // 打开Alert 弹框 + alert(toastOptions: MessageOptions | string): Promise + // 打开Confirm 弹框 + confirm(toastOptions: MessageOptions | string): Promise + // 打开Prompt 弹框 + prompt(toastOptions: MessageOptions | string): Promise + // 关闭Message + close(): void +} + +export const messageBoxProps = { + ...baseProps, + /** + * 指定唯一标识 + */ + selector: makeStringProp(''), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.vue b/uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.vue new file mode 100644 index 0000000..6421528 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.vue @@ -0,0 +1,291 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-navbar-capsule/index.scss b/uni_modules/wot-design-uni/components/wd-navbar-capsule/index.scss new file mode 100644 index 0000000..b41d43d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-navbar-capsule/index.scss @@ -0,0 +1,66 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(navbar-capsule) { + &::before { + border: 2rpx solid $-dark-border-color; + } + + &::after { + background: $-dark-border-color; + } + + :deep(.wd-navbar-capsule__icon) { + color: $-dark-color; + } + } +} + + +@include b(navbar-capsule) { + position: relative; + box-sizing: border-box; + width: $-navbar-capsule-width; + height: $-navbar-capsule-height; + display: flex; + align-items: center; + justify-content: center; + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 200%; + height: 200%; + transform: scale(0.5); + transform-origin: 0 0; + box-sizing: border-box; + border-radius: calc($-navbar-capsule-border-radius * 2); + border: 2rpx solid $-navbar-capsule-border-color; + } + + &::after { + content: ''; + display: block; + position: absolute; + left: 50%; + top: 50%; + transform: translateY(-50%); + width: 1px; + height: 36rpx; + background: $-navbar-capsule-border-color; + } + + &:empty { + display: none; + } + + @include edeep(icon) { + flex: 1; + position: relative; + color: $-navbar-desc-font-color; + font-size: $-navbar-capsule-icon-size; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-navbar-capsule/types.ts b/uni_modules/wot-design-uni/components/wd-navbar-capsule/types.ts new file mode 100644 index 0000000..2aee4bc --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-navbar-capsule/types.ts @@ -0,0 +1,8 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps } from '../common/props' + +export const navbarCapsuleProps = { + ...baseProps +} + +export type NavbarCapsuleProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-navbar-capsule/wd-navbar-capsule.vue b/uni_modules/wot-design-uni/components/wd-navbar-capsule/wd-navbar-capsule.vue new file mode 100644 index 0000000..8b3568e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-navbar-capsule/wd-navbar-capsule.vue @@ -0,0 +1,35 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-navbar/index.scss b/uni_modules/wot-design-uni/components/wd-navbar/index.scss new file mode 100644 index 0000000..e1685f2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-navbar/index.scss @@ -0,0 +1,93 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(navbar) { + background-color: $-dark-background; + + @include e(title) { + color: $-dark-color; + } + + @include e(text) { + color: $-dark-color; + } + + :deep(.wd-navbar__arrow) { + color: $-dark-color; + } + } +} + + +@include b(navbar) { + position: relative; + text-align: center; + user-select: none; + height: $-navbar-height; + line-height: $-navbar-height; + background-color: $-navbar-background; + box-sizing: content-box; + + @include e(content) { + position: relative; + height: 100%; + width: 100%; + } + + @include e(title) { + max-width: 60%; + height: 100%; + margin: 0 auto; + color: $-navbar-color; + font-weight: $-navbar-title-font-weight; + font-size: $-navbar-title-font-size; + @include lineEllipsis(); + } + + @include e(text) { + display: inline-block; + vertical-align: middle; + color: $-navbar-desc-font-color; + } + + @include e(left, right, capsule) { + position: absolute; + top: 0; + bottom: 0; + font-size: $-navbar-desc-font-size; + display: flex; + align-items: center; + padding: 0 12px; + + @include when(disabled) { + opacity: $-navbar-disabled-opacity; + } + } + + @include e(left, capsule) { + left: 0; + } + + @include e(right) { + right: 0; + } + + @include edeep(arrow) { + font-size: $-navbar-arrow-size; + color: $-navbar-color; + } + + + @include when(border) { + @include halfPixelBorder('bottom'); + } + + @include when(fixed) { + position: fixed; + top: 0; + left: 0; + width: 100%; + z-index: 500; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-navbar/types.ts b/uni_modules/wot-design-uni/components/wd-navbar/types.ts new file mode 100644 index 0000000..1879865 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-navbar/types.ts @@ -0,0 +1,52 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp } from '../common/props' + +export const navbarProps = { + ...baseProps, + /** + * 标题文字 + */ + title: String, + /** + * 左侧文案 + */ + leftText: String, + /** + * 右侧文案 + */ + rightText: String, + /** + * 是否显示左侧箭头 + */ + leftArrow: makeBooleanProp(false), + /** + * 是否显示下边框 + */ + bordered: makeBooleanProp(true), + /** + * 是否固定到顶部 + */ + fixed: makeBooleanProp(false), + /** + * 固定在顶部时,是否在标签位置生成一个等高的占位元素 + */ + placeholder: makeBooleanProp(false), + /** + * 导航栏 z-index + */ + zIndex: makeNumberProp(500), + /** + * 是否开启顶部安全区适配 + */ + safeAreaInsetTop: makeBooleanProp(false), + /** + * 是否禁用左侧按钮,禁用时透明度降低,且无法点击 + */ + leftDisabled: makeBooleanProp(false), + /** + * 是否禁用右侧按钮,禁用时透明度降低,且无法点击 + */ + rightDisabled: makeBooleanProp(false) +} + +export type NavbarProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.vue b/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.vue new file mode 100644 index 0000000..0965d55 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-notice-bar/index.scss b/uni_modules/wot-design-uni/components/wd-notice-bar/index.scss new file mode 100644 index 0000000..5ee8d3c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-notice-bar/index.scss @@ -0,0 +1,68 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(notice-bar) { + display: flex; + padding: $-notice-bar-padding; + align-items: center; + font-size: $-notice-bar-fs; + border-radius: $-notice-bar-border-radius; + position: relative; + box-sizing: border-box; + @include when(warning) { + background: $-notice-bar-warning-bg; + color: $-notice-bar-warning-color; + } + @include when(info) { + background: $-notice-bar-info-bg; + color: $-notice-bar-info-color; + } + @include when(danger) { + background: $-notice-bar-danger-bg; + color: $-notice-bar-danger-color; + } + @include edeep(prefix) { + padding-right: 4px; + font-size: $-notice-bar-prefix-size; + } + + @include edeep(suffix) { + text-align: center; + font-size: $-notice-bar-close-size; + display: inline-block; + background-color: $-notice-bar-close-bg; + color: $-notice-bar-close-color; + padding: 0; + border-radius: 0px 8px 0px 4px; + position: absolute; + right: 0; + top: 0; + } + @include e(wrap) { + position: relative; + flex: 1; + height: $-notice-bar-line-height; + overflow: hidden; + line-height: $-notice-bar-line-height; + } + @include e(content) { + position: absolute; + white-space: nowrap; + } + @include m(ellipse) { + .wd-notice-bar__content { + position: static; + @include lineEllipsis; + } + } + @include m(wrap) { + + .wd-notice-bar__wrap { + height: auto; + } + .wd-notice-bar__content { + position: static; + white-space: normal; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-notice-bar/types.ts b/uni_modules/wot-design-uni/components/wd-notice-bar/types.ts new file mode 100644 index 0000000..df6f796 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-notice-bar/types.ts @@ -0,0 +1,67 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export type NoticeBarType = 'warning' | 'info' | 'danger' | '' +export type NoticeBarScrollDirection = 'horizontal' | 'vertical' + +export const noticeBarProps = { + ...baseProps, + /** + * 设置通知栏文案 + */ + text: { + type: [String, Array] as PropType, + default: '' + }, + /** + * 设置通知栏类型,可选值为:'warning' | 'info' | 'danger' + */ + type: makeStringProp('warning'), + /** + * 是否可滚动 + */ + scrollable: makeBooleanProp(true), + /** + * 滚动延迟时间(秒) + */ + delay: makeNumberProp(1), + /** + * 滚动速度(px/s) + */ + speed: makeNumberProp(50), + /** + * 是否可关闭 + */ + closable: makeBooleanProp(false), + /** + * 是否换行显示 + */ + wrapable: makeBooleanProp(false), + /** + * 设置左侧图标,使用 icon 章节中的图标名 + */ + prefix: String, + /** + * 文字、图标颜色 + */ + color: String, + /** + * 背景颜色 + */ + backgroundColor: String, + /** + * 滚动方向 + */ + direction: makeStringProp('horizontal') +} + +export type NoticeBarProps = ExtractPropTypes + +export type NoticeBarExpose = { + /** + * 重置NoticeBar动画 + */ + reset: () => void +} + +export type NoticeBarInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue b/uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue new file mode 100644 index 0000000..1c0e16a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue @@ -0,0 +1,266 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-notify/index.scss b/uni_modules/wot-design-uni/components/wd-notify/index.scss new file mode 100644 index 0000000..5df8f4d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-notify/index.scss @@ -0,0 +1,34 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(notify) { + display: flex; + align-items: center; + justify-content: center; + box-sizing: border-box; + padding: $-notify-padding; + font-size: $-notify-font-size; + line-height: $-notify-line-height; + color: $-notify-text-color; + + // allow newline character + white-space: pre-wrap; + text-align: center; + word-wrap: break-word; + + @include m(primary) { + background: $-notify-primary-background; + } + + @include m(success) { + background: $-notify-success-background; + } + + @include m(danger) { + background: $-notify-danger-background; + } + + @include m(warning) { + background: $-notify-warning-background; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-notify/index.ts b/uni_modules/wot-design-uni/components/wd-notify/index.ts new file mode 100644 index 0000000..aaefa7c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-notify/index.ts @@ -0,0 +1,61 @@ +import { inject, provide, reactive, ref } from 'vue' +import type { NotifyProps } from './types' +import { deepMerge, isString } from '../common/util' + +let timer: ReturnType +let currentOptions = getDefaultOptions() +const notifyDefaultOptionKey = '__NOTIFY_OPTION__' +const None = Symbol('None') +export const setNotifyDefaultOptions = (options: NotifyProps) => { + currentOptions = deepMerge(currentOptions, options) as NotifyProps +} +export const resetNotifyDefaultOptions = () => { + currentOptions = getDefaultOptions() +} +export const useNotify = (selector: string = '') => { + const notifyOptionKey = getNotifyOptionKey(selector) + + const notifyOption = inject(notifyOptionKey, ref(None)) + if (notifyOption.value === None) { + notifyOption.value = currentOptions + provide(notifyOptionKey, notifyOption) + } + const showNotify = (option: NotifyProps | string) => { + const options = deepMerge(currentOptions, isString(option) ? { message: option } : option) as NotifyProps + notifyOption.value = deepMerge(options, { visible: true }) + if (notifyOption.value.duration && notifyOption.value.duration > 0) { + timer && clearTimeout(timer) + timer = setTimeout(() => closeNotify(), options.duration) + } + } + const closeNotify = () => { + timer && clearTimeout(timer) + if (notifyOption.value !== None) { + notifyOption.value.visible = false + } + } + + return { + showNotify, + closeNotify + } +} +export const getNotifyOptionKey = (selector: string) => { + return selector ? `${notifyDefaultOptionKey}${selector}` : notifyDefaultOptionKey +} + +function getDefaultOptions(): NotifyProps { + return { + type: 'danger', + color: undefined, + zIndex: 99, + message: '', + duration: 3000, + position: 'top', + safeHeight: undefined, + background: undefined, + onClick: undefined, + onClosed: undefined, + onOpened: undefined + } +} diff --git a/uni_modules/wot-design-uni/components/wd-notify/types.ts b/uni_modules/wot-design-uni/components/wd-notify/types.ts new file mode 100644 index 0000000..6b6e6d0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-notify/types.ts @@ -0,0 +1,66 @@ +import type { PropType, ExtractPropTypes } from 'vue' +import { makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' + +export type NotifyType = 'primary' | 'success' | 'danger' | 'warning' +export type NotifyPosition = 'top' | 'bottom' +export type NotifyProps = Omit>, 'selector'> & { + onClick?: (event: MouseEvent) => void + onClosed?: () => void + onOpened?: () => void +} +export type NotifyThemeVars = { + notifyPadding?: string + notifyFontSize?: string + notifyTextColor?: string + notifyLineHeight?: number | string + notifyDangerBackground?: string + notifyPrimaryBackground?: string + notifySuccessBackground?: string + notifyWarningBackground?: string +} +export const notifyProps = { + /** + * 类型,可选值为 primary success danger warning + */ + type: makeStringProp('danger'), + /** + * 字体颜色 + */ + color: makeStringProp(''), + /** + * 将组件的 z-index 层级设置为一个固定值 + */ + zIndex: makeNumberProp(99), + /** + * 显示 + */ + visible: makeBooleanProp(false), + /** + * 展示文案,支持通过\n换行 + */ + message: makeNumericProp(''), + /** + * 指定唯一标识 + */ + selector: makeStringProp(''), + /** + * 展示时长(ms),值为 0 时,notify 不会消失 + */ + duration: makeNumberProp(3000), + /** + * 弹出位置,可选值为 top bottom + */ + position: makeStringProp('top'), + /** + * 顶部安全高度( + */ + safeHeight: Number, + /** + * 背景颜色 + */ + background: makeStringProp(''), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue b/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue new file mode 100644 index 0000000..390c2be --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-notify/wd-notify.vue @@ -0,0 +1,85 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-number-keyboard/index.scss b/uni_modules/wot-design-uni/components/wd-number-keyboard/index.scss new file mode 100644 index 0000000..09a903a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-number-keyboard/index.scss @@ -0,0 +1,78 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(number-keyboard) { + background: $-dark-background5; + + @include e(header){ + color: $-dark-color; + } + } +} + +@include b(number-keyboard) { + width: 100%; + background: $-number-keyboard-background; + color: $-color-black; + user-select: none; + + @include m(with-title) { + border-radius: 20px 20px 0 0; + } + + @include e(header) { + position: relative; + display: flex; + align-items: center; + justify-content: center; + box-sizing: content-box; + height: $-number-keyboard-title-height; + padding-top: 6px; + color: $-number-keyboard-title-color; + font-size: $-number-keyboard-title-font-size; + } + + @include e(title) { + display: inline-block; + font-weight: normal; + + &-left { + position: absolute; + left: 0; + } + } + + @include e(body) { + display: flex; + padding: 6px 0 0 6px; + } + + @include e(keys) { + display: flex; + flex: 3; + flex-wrap: wrap; + } + + @include e(close) { + position: absolute; + display: flex; + align-items: center; + right: 0; + height: 100%; + padding: $-number-keyboard-close-padding; + color: $-number-keyboard-close-color; + font-size: $-number-keyboard-close-font-size; + background-color: transparent; + border: none; + @include m(hover){ + opacity: 0.6; + } + } + + @include e(sidebar) { + display: flex; + flex: 1; + flex-direction: column; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-number-keyboard/key/index.scss b/uni_modules/wot-design-uni/components/wd-number-keyboard/key/index.scss new file mode 100644 index 0000000..e2f9692 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-number-keyboard/key/index.scss @@ -0,0 +1,81 @@ +@import "./../../common/abstracts/_mixin.scss"; +@import "./../../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(key) { + background: $-dark-background2; + color: $-dark-color; + + &:active { + background-color: $-dark-background4; + } + + @include m(active) { + background-color: $-dark-background4; + } + + } +} + +.wd-key-wrapper { + position: relative; + flex: 1; + flex-basis: 33%; + box-sizing: border-box; + padding: 0 6px 6px 0; + + @include m(wider) { + flex-basis: 66%; + } +} + +@include b(key) { + display: flex; + align-items: center; + justify-content: center; + height: $-number-keyboard-key-height; + font-size: $-number-keyboard-key-font-size; + line-height: 1.5; + background: $-number-keyboard-key-background; + border-radius: $-number-keyboard-key-border-radius; + + &:active { + background-color: $-number-keyboard-key-active-color; + } + + @include m(large) { + position: absolute; + top: 0; + right: 6px; + bottom: 6px; + left: 0; + height: auto; + } + + @include m(delete, close) { + font-size: $-number-keyboard-delete-font-size; + } + + @include m(active) { + background-color: $-number-keyboard-key-active-color; + } + + @include m(close) { + color: $-number-keyboard-button-text-color; + background: $-number-keyboard-button-background; + + &:active { + background: $-number-keyboard-button-background; + opacity: $-number-keyboard-button-active-opacity; + } + } + + @include edeep(loading-icon) { + color: $-number-keyboard-button-text-color; + } + + @include edeep(icon) { + font-size: $-number-keyboard-icon-size; + } + +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-number-keyboard/key/index.vue b/uni_modules/wot-design-uni/components/wd-number-keyboard/key/index.vue new file mode 100644 index 0000000..4ff505c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-number-keyboard/key/index.vue @@ -0,0 +1,73 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-number-keyboard/key/types.ts b/uni_modules/wot-design-uni/components/wd-number-keyboard/key/types.ts new file mode 100644 index 0000000..efa497a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-number-keyboard/key/types.ts @@ -0,0 +1,11 @@ +import { makeBooleanProp, makeNumericProp, makeStringProp } from '../../common/props' + +export type NumberKeyType = '' | 'delete' | 'extra' | 'close' + +export const keyProps = { + type: makeStringProp(''), + text: makeNumericProp(''), + wider: makeBooleanProp(false), + large: makeBooleanProp(false), + loading: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-number-keyboard/types.ts b/uni_modules/wot-design-uni/components/wd-number-keyboard/types.ts new file mode 100644 index 0000000..16dc216 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-number-keyboard/types.ts @@ -0,0 +1,83 @@ +import type { PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export type KeyboardMode = 'default' | 'custom' +export type KeyType = '' | 'delete' | 'extra' | 'close' + +export interface Key { + text?: number | string // key文本 + type?: KeyType // key的类型 + wider?: boolean // 是否占2个key的宽度 +} + +export const numberKeyboardProps = { + ...baseProps, + /** + * 是否可见 + */ + visible: makeBooleanProp(false), + /** + * 绑定的值 + */ + modelValue: makeStringProp(''), + /** + * 标题 + */ + title: String, + /** + * 键盘模式 + */ + mode: makeStringProp('default'), + /** + * 层级 + */ + zIndex: makeNumberProp(100), + /** + * 最大长度 + */ + maxlength: makeNumberProp(Infinity), + /** + * 是否显示删除键 + */ + showDeleteKey: makeBooleanProp(true), + /** + * 是否随机键盘按键顺序 + */ + randomKeyOrder: makeBooleanProp(false), + /** + * 确认按钮文本 + */ + closeText: String, + /** + * 删除按钮文本 + */ + deleteText: String, + /** + * 关闭按钮是否显示加载状态 + */ + closeButtonLoading: makeBooleanProp(false), + /** + * 是否显示蒙层 + */ + modal: makeBooleanProp(false), + /** + * 是否在点击外部时收起键盘 + */ + hideOnClickOutside: makeBooleanProp(true), + /** + * 是否锁定滚动 + */ + lockScroll: makeBooleanProp(true), + /** + * 是否在底部安全区域内 + */ + safeAreaInsetBottom: makeBooleanProp(true), + /** + * 额外按键 + */ + extraKey: [String, Array] as PropType>, + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-number-keyboard/wd-number-keyboard.vue b/uni_modules/wot-design-uni/components/wd-number-keyboard/wd-number-keyboard.vue new file mode 100644 index 0000000..e3d96d6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-number-keyboard/wd-number-keyboard.vue @@ -0,0 +1,151 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-overlay/index.scss b/uni_modules/wot-design-uni/components/wd-overlay/index.scss new file mode 100644 index 0000000..4cb37fa --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-overlay/index.scss @@ -0,0 +1,17 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(overlay) { + background: $-overlay-bg-dark; + } +} + +@include b(overlay) { + position: fixed; + left: 0; + top: 0; + right: 0; + bottom: 0; + background: $-overlay-bg; +} diff --git a/uni_modules/wot-design-uni/components/wd-overlay/types.ts b/uni_modules/wot-design-uni/components/wd-overlay/types.ts new file mode 100644 index 0000000..fd15be2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-overlay/types.ts @@ -0,0 +1,25 @@ +import type { PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp } from '../common/props' + +export const overlayProps = { + ...baseProps, + /** + * 是否展示遮罩层 + */ + show: makeBooleanProp(false), + /** + * 动画时长,单位毫秒 + */ + duration: { + type: [Object, Number, Boolean] as PropType | number | boolean>, + default: 300 + }, + /** + * 是否锁定滚动 + */ + lockScroll: makeBooleanProp(true), + /** + * 层级 + */ + zIndex: makeNumberProp(10) +} diff --git a/uni_modules/wot-design-uni/components/wd-overlay/wd-overlay.vue b/uni_modules/wot-design-uni/components/wd-overlay/wd-overlay.vue new file mode 100644 index 0000000..fce1c10 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-overlay/wd-overlay.vue @@ -0,0 +1,47 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-pagination/index.scss b/uni_modules/wot-design-uni/components/wd-pagination/index.scss new file mode 100644 index 0000000..c464c50 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-pagination/index.scss @@ -0,0 +1,57 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(pager) { + background-color: $-dark-background; + @include e(message) { + color: $-dark-color3; + } + } +} + +@include b(pager) { + user-select: none; + background-color: #fff; + + @include edeep(icon) { + font-size: $-pagination-icon-size; + } + + @include e(content) { + display: flex; + justify-content: flex-start; + align-items: center; + padding: $-pagination-content-padding; + } + @include e(message) { + text-align: center; + color:$-pagination-message-color; + font-size: $-pagination-message-fs; + padding: $-pagination-message-padding; + } + @include edeep(nav) { + min-width: $-pagination-nav-width; + @include m(active){ + color: rgba(0,0,0,0.65) + } + @include m(disabled){ + color: rgba(0,0,0,0.15) + } + } + @include e(size){ + flex: 1; + text-align: center; + font-size: $-pagination-nav-content-fs; + } + @include e(separator){ + padding: $-pagination-nav-sepatator-padding; + } + @include edeep(left){ + transform: rotate(180deg) translateY(1px); + display: inline-block; + } + @include e(current){ + color: $-pagination-nav-current-color; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-pagination/types.ts b/uni_modules/wot-design-uni/components/wd-pagination/types.ts new file mode 100644 index 0000000..a40c687 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-pagination/types.ts @@ -0,0 +1,41 @@ +import { baseProps, makeBooleanProp, makeNumberProp, makeRequiredProp } from '../common/props' + +export const paginationProps = { + ...baseProps, + /** + * 当前页 + */ + modelValue: makeRequiredProp(Number), + /** + * 总页数,如果有total,则优先使用total计算页数 + */ + totalPage: makeNumberProp(1), + /** + * 是否展示分页为Icon图标 + */ + showIcon: makeBooleanProp(false), + /** + * 是否展示总条数 + */ + showMessage: makeBooleanProp(false), + /** + * 总条数 + */ + total: makeNumberProp(0), + /** + * 每页条数 + */ + pageSize: makeNumberProp(10), + /** + * 上一页文本 + */ + prevText: String, + /** + * 下一页文本 + */ + nextText: String, + /** + * 总页数只有一页时是否隐藏 + */ + hideIfOnePage: makeBooleanProp(true) +} diff --git a/uni_modules/wot-design-uni/components/wd-pagination/wd-pagination.vue b/uni_modules/wot-design-uni/components/wd-pagination/wd-pagination.vue new file mode 100644 index 0000000..bf52e1b --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-pagination/wd-pagination.vue @@ -0,0 +1,110 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-password-input/index.scss b/uni_modules/wot-design-uni/components/wd-password-input/index.scss new file mode 100644 index 0000000..347bb00 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-password-input/index.scss @@ -0,0 +1,124 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +.wot-theme-dark { + @include b(password-input) { + @include e(item) { + color: $-dark-color; + background: $-dark-background2; + + @include when(border) { + border-color: $-dark-border-color; + } + } + + @include e(mask) { + background-color: $-dark-color; + } + + @include e(cursor) { + background-color: $-dark-color; + } + + @include e(info) { + color: $-dark-color; + + @include when(border) { + color: $-dark-color2; + } + } + } +} + +@include b(password-input) { + position: relative; + margin: 0 $-password-input-margin; + user-select: none; + + @include e(security) { + display: flex; + width: 100%; + height: $-password-input-height; + cursor: pointer; + } + + @include e(item) { + position: relative; + display: flex; + flex: 1; + align-items: center; + justify-content: center; + height: 100%; + color: $-password-input-text-color; + font-size: $-password-input-font-size; + line-height: 1.2; + background: $-password-input-background; + + @include when(border) { + border: 1px solid $-password-input-border-color; + + &:not(:last-child) { + border-right: none; + } + + &:first-child { + border-top-left-radius: $-password-input-radius; + border-bottom-left-radius: $-password-input-radius; + } + + &:last-child { + border-top-right-radius: $-password-input-radius; + border-bottom-right-radius: $-password-input-radius; + } + } + } + + @include e(mask) { + position: absolute; + top: 50%; + left: 50%; + width: $-password-input-dot-size; + height: $-password-input-dot-size; + background: $-password-input-dot-color; + border-radius: 100%; + transform: translate(-50%, -50%); + visibility: hidden; + } + + @include e(cursor) { + position: absolute; + top: 50%; + left: 50%; + width: $-password-input-cursor-width; + height: $-password-input-cursor-height; + background: $-password-input-cursor-color; + transform: translate(-50%, -50%); + animation: $-password-input-cursor-duration cursor-flicker infinite; + } + + @include e(info) { + margin-top: $-password-input-margin; + font-size: $-password-input-info-font-size; + text-align: center; + color: $-password-input-info-color; + + @include when(error) { + color: $-password-input-error-info-color; + } + + } +} + +@keyframes cursor-flicker { + from { + opacity: 0; + } + + 50% { + opacity: 1; + } + + 100% { + opacity: 0; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-password-input/types.ts b/uni_modules/wot-design-uni/components/wd-password-input/types.ts new file mode 100644 index 0000000..550788c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-password-input/types.ts @@ -0,0 +1,42 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 20:40:34 + * @LastEditTime: 2024-03-18 15:12:17 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-password-input\types.ts + * 记得注释 + */ +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' + +export const passwordInputProps = { + ...baseProps, + /** + * 绑定的值 + */ + modelValue: makeStringProp(''), + /** + * 是否隐藏密码内容 + */ + mask: makeBooleanProp(true), + /** + * 输入框下方文字提示 + */ + info: makeStringProp(''), + /** + * 输入框下方错误提示 + */ + errorInfo: makeStringProp(''), + /** + * 输入框格子之间的间距,如 20px 2em,默认单位为 px + */ + gutter: makeNumericProp(0), + /** + * 密码最大长度 + */ + length: makeNumberProp(6), + /** + * 是否已聚焦,聚焦时会显示光标 + */ + focused: makeBooleanProp(true) +} diff --git a/uni_modules/wot-design-uni/components/wd-password-input/wd-password-input.vue b/uni_modules/wot-design-uni/components/wd-password-input/wd-password-input.vue new file mode 100644 index 0000000..1bad247 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-password-input/wd-password-input.vue @@ -0,0 +1,49 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-picker-view/index.scss b/uni_modules/wot-design-uni/components/wd-picker-view/index.scss new file mode 100644 index 0000000..83d4aaf --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-picker-view/index.scss @@ -0,0 +1,92 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(picker-view) { + @include e(columns) { + background: $-dark-background2; + } + + :deep(.wd-picker-view__roller) { + background: $-dark-background4; + } + } + + @include b(picker-view-column) { + color: $-dark-color; + + @include e(item) { + @include m(disabled) { + color: $-dark-color-gray; + } + } + } +} + + +@include b(picker-view) { + position: relative; + padding: 10px 0; + + @include e(columns) { + position: relative; + display: flex; + background: $-picker-bg; + overflow: hidden; + align-items: center; + } + + @include edeep(mask) { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: $-picker-mask; + background-position: top, bottom; + background-repeat: no-repeat; + z-index: 2; + pointer-events: none; + filter: blur(4px); + } + + @include e(loading) { + position: absolute; + display: flex; + top: 0; + right: 0; + bottom: 0; + left: 0; + align-items: center; + justify-content: center; + z-index: 3; + background: $-picker-loading-bg; + } + + @include edeep(roller) { + background: rgba(245, 245, 245, 1); + z-index: 0; + + &::before, + &::after { + display: none; + } + } +} + +@include b(picker-view-column) { + flex: 1; + font-size: $-picker-column-fs; + color: $-picker-column-color; + text-align: center; + transition-timing-function: cubic-bezier(0.28, 0.8, 0.63, 1); + + @include e(item) { + padding: $-picker-column-padding; + @include lineEllipsis; + + @include m(disabled) { + color: $-picker-column-disabled-color; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-picker-view/types.ts b/uni_modules/wot-design-uni/components/wd-picker-view/types.ts new file mode 100644 index 0000000..c21a9f4 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-picker-view/types.ts @@ -0,0 +1,152 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType, Ref } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' +import { getType, isArray, isObj } from '../common/util' + +export type ColumnItem = { + [key: string]: any + value?: string | number | boolean + label?: string + disabled?: boolean +} + +export type PickerViewColumnChange = ( + pickerView: PickerViewInstance, + selects: Record | Record[], + index: number, + reslove: () => void +) => void + +export const pickerViewProps = { + ...baseProps, + /** + * 加载状态 + */ + loading: makeBooleanProp(false), + /** + * 加载的颜色,只能使用十六进制的色值写法,且不能使用缩写 + */ + loadingColor: makeStringProp('#4D80F0'), + /** + * picker内部滚筒高 + */ + columnsHeight: makeNumberProp(217), + /** + * picker item的高度 + */ + itemHeight: makeNumberProp(35), + /** + * 选项对象中,value对应的 key + */ + valueKey: makeStringProp('value'), + /** + * 选项对象中,展示的文本对应的 key + */ + labelKey: makeStringProp('label'), + /** + * 是否在手指松开时立即触发picker-view的 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。 + */ + immediateChange: makeBooleanProp(false), + /** + * 选中项,如果为多列选择器,则其类型应为数组 + */ + modelValue: { + type: [String, Number, Boolean, Array, Array, Array] as PropType< + string | number | boolean | Array | Array | Array + >, + default: '', + required: true + }, + /** + * 选择器数据,可以为字符串数组,也可以为对象数组,如果为二维数组,则为多列选择器 + */ + columns: makeArrayProp | Array | Array>(), + /** + * 接收 pickerView 实例、选中项、当前修改列的下标、resolve 作为入参,根据选中项和列下标进行判断,通过 pickerView 实例暴露出来的 setColumnData 方法修改其他列的数据源。 + */ + columnChange: Function as PropType +} + +export type PickerViewExpose = { + getSelects: () => Record | Record[] + getValues: () => string | string[] + setColumnData: (columnIndex: number, data: Array>, rowIndex?: number) => void + getColumnsData: () => Record[][] + getColumnData: (columnIndex: number) => Record[] + getColumnIndex: (columnIndex: number) => number + getLabels: () => string[] + getSelectedIndex: () => number[] + resetColumns: (columns: (string | number | string[] | number[] | ColumnItem | ColumnItem[])[]) => void +} + +export type PickerViewProps = ExtractPropTypes + +export type PickerViewInstance = ComponentPublicInstance + +/** + * 格式化传入的列数据 + * 列数据统一格式化为二维数组 + * @param array 列数据 + * @param valueKey + * @param labelKey + * @returns + */ +export function formatArray( + array: Array>, + valueKey: string, + labelKey: string +): ColumnItem[][] { + let tempArray: Array> = isArray(array) ? array : [array] + // 判断数组第一层的数据类型,如果存在多种类型,则抛错 + const firstLevelTypeList = new Set(array.map(getType)) + /** + * 存在三种类型的合法数据 + * 1.数组是一维元素,所有元素都是原始值 + * 2.数组是一维元素,所有元素都是object + * 3.数组是二维元素,二维元素可以是任意内容 + */ + if (firstLevelTypeList.size !== 1 && firstLevelTypeList.has('object')) { + // 原始值和引用类型不用混用 + throw Error('The columns are correct') + } + /** + * 简单处理,如果数组第一项不是数组则认为它是一个一维数组 + * 所以需要把一维的转成二维,这样方便统一处理 + */ + if (!isArray(array[0])) { + tempArray = [tempArray as Array] + } + // 转化为二维数组后需要将每一项包装成ColumnItem + const result: Array> = (tempArray as Array>).map((col) => { + return col.map((row) => { + // 非对象类型直接将值作为label和value + if (!isObj(row)) { + return { + [valueKey]: row, + [labelKey]: row + } + } + /** + * 针对已经是object的,修补成{valueKey,labelKey} + * 如果没有labelKey,用valueKey代替 + * 如果没有valueKey,用labelKey代替 + * valueKey,labelKey都没有,直接抛错 + */ + // eslint-disable-next-line no-prototype-builtins + if (!row.hasOwnProperty(valueKey) && !row.hasOwnProperty(labelKey)) { + // eslint-disable-next-line prettier/prettier + throw Error('Can\'t find valueKey and labelKey in columns') + } + // eslint-disable-next-line no-prototype-builtins + if (!row.hasOwnProperty(labelKey)) { + row[labelKey] = row[valueKey] + } + // eslint-disable-next-line no-prototype-builtins + if (!row.hasOwnProperty(valueKey)) { + row[valueKey] = row[labelKey] + } + return row + }) + }) + + return result +} diff --git a/uni_modules/wot-design-uni/components/wd-picker-view/wd-picker-view.vue b/uni_modules/wot-design-uni/components/wd-picker-view/wd-picker-view.vue new file mode 100644 index 0000000..a6be803 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-picker-view/wd-picker-view.vue @@ -0,0 +1,369 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-picker/index.scss b/uni_modules/wot-design-uni/components/wd-picker/index.scss new file mode 100644 index 0000000..00015d6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-picker/index.scss @@ -0,0 +1,110 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(picker) { + @include e(action) { + @include m(cancel) { + color: $-dark-color; + } + @include when(loading) { + color: $-dark-color3; + } + } + + :deep(.wd-picker__arrow), + :deep(.wd-picker__clear) { + color: $-dark-color; + } + + :deep(.wd-picker__cell--placeholder) { + .wd-cell__value { + color: $-dark-color-gray; + } + } + } +} + +@include b(picker) { + @include edeep(popup) { + border-radius: 16px 16px 0px 0px; + } + + @include edeep(cell) { + @include when(disabled) { + .wd-cell__value { + color: $-input-disabled-color; + cursor: not-allowed; + } + } + @include when(error) { + .wd-cell__value { + color: $-input-error-color; + } + .wd-picker__arrow { + color: $-input-error-color; + } + } + @include when(large) { + .wd-picker__arrow, + .wd-picker__clear { + font-size: $-cell-icon-size-large; + } + } + @include m(placeholder) { + .wd-cell__value { + color: $-input-placeholder-color; + } + } + } + + @include edeep(arrow, clear) { + display: block; + font-size: $-cell-icon-size; + color: $-cell-arrow-color; + line-height: $-cell-line-height; + } + + @include edeep(clear) { + color: $-cell-clear-color; + } + + @include e(wraper) { + padding-bottom: var(--window-bottom); + } + + @include e(toolbar) { + position: relative; + display: flex; + font-size: $-picker-toolbar-fs; + height: $-picker-toolbar-height; + line-height: $-picker-action-height; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + } + + @include e(action) { + display: block; + border: none; + outline: none; + font-size: $-picker-toolbar-fs; + color: $-picker-toolbar-finish-color; + background: transparent; + padding: 24px 15px 14px 15px; + + @include m(cancel) { + color: $-picker-toolbar-cancel-color; + } + + @include when(loading) { + color: $-picker-loading-button-color; + } + } + + @include e(title) { + display: block; + float: 1; + color: $-picker-toolbar-title-color; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-picker/types.ts b/uni_modules/wot-design-uni/components/wd-picker/types.ts new file mode 100644 index 0000000..391c851 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-picker/types.ts @@ -0,0 +1,189 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' +import type { ColumnItem, PickerViewColumnChange } from '../wd-picker-view/types' +import type { FormItemRule } from '../wd-form/types' + +export const pickerProps = { + ...baseProps, + /** + * label 外部自定义样式 + */ + customLabelClass: makeStringProp(''), + /** + * value 外部自定义样式 + */ + customValueClass: makeStringProp(''), + /** + * pickerView 外部自定义样式 + */ + customViewClass: makeStringProp(''), + /** + * 选择器左侧文案 + */ + label: String, + /** + * 选择器占位符 + */ + placeholder: String, + /** + * 是否禁用 + */ + disabled: makeBooleanProp(false), + /** + * 是否只读 + */ + readonly: makeBooleanProp(false), + /** + * 加载中 + */ + loading: makeBooleanProp(false), + /** + * 加载中颜色 + */ + loadingColor: makeStringProp('#4D80F0'), + /* popup */ + /** + * 弹出层标题 + */ + title: String, + /** + * 取消按钮文案 + */ + cancelButtonText: String, + /** + * 确认按钮文案 + */ + confirmButtonText: String, + /** + * 是否必填 + */ + required: makeBooleanProp(false), + /** + * 尺寸 + */ + size: String, + /** + * 设置左侧标题宽度 + */ + labelWidth: makeStringProp('33%'), + /** + * 使用默认插槽 + * @deprecated 可以直接使用默认插槽,无需配置此选项 + */ + useDefaultSlot: makeBooleanProp(false), + /** + * 使用标签插槽 + * @deprecated 可以直接使用标签插槽,无需配置此选项 + */ + useLabelSlot: makeBooleanProp(false), + /** + * 错误状态 + */ + error: makeBooleanProp(false), + /** + * 右对齐 + */ + alignRight: makeBooleanProp(false), + /** + * 确定前校验函数,接收 (value, resolve, picker) 参数,通过 resolve 继续执行 picker,resolve 接收1个boolean参数 + */ + beforeConfirm: Function as PropType, + /** + * 点击蒙层关闭 + */ + closeOnClickModal: makeBooleanProp(true), + /** + * 底部安全区域内 + */ + safeAreaInsetBottom: makeBooleanProp(true), + /** + * 文本溢出显示省略号 + */ + ellipsis: makeBooleanProp(false), + /** + * 选项总高度 + */ + columnsHeight: makeNumberProp(217), + /** + * 选项值对应的键名 + */ + valueKey: makeStringProp('value'), + /** + * 选项文本对应的键名 + */ + labelKey: makeStringProp('label'), + /** + * 选中项,如果为多列选择器,则其类型应为数组 + */ + modelValue: { + type: [String, Number, Array] as PropType | Array>, + default: '' + }, + /** + * 选择器数据,可以为字符串数组,也可以为对象数组,如果为二维数组,则为多列选择器 + */ + columns: { + type: Array as PropType>>, + default: () => [] + }, + /** + * 接收 pickerView 实例、选中项、当前修改列的下标、resolve 作为入参,根据选中项和列下标进行判断,通过 pickerView 实例暴露出来的 setColumnData 方法修改其他列的数据源。 + */ + columnChange: Function as PropType, + /** + * 自定义展示文案的格式化函数,返回一个字符串 + */ + displayFormat: Function as PropType, + /** + * 自定义层级 + */ + zIndex: makeNumberProp(15), + /** + * 表单域 model 字段名,在使用表单校验功能的情况下,该属性是必填的 + */ + prop: String, + /** + * 表单验证规则,结合wd-form组件使用 + */ + rules: makeArrayProp(), + /** + * 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,1.2.25版本起提供,仅微信小程序和支付宝小程序支持。 + */ + immediateChange: makeBooleanProp(false), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false), + /** + * 显示清空按钮 + */ + clearable: makeBooleanProp(false), + /** + * 必填标记位置,可选值:before、after + */ + markerSide: makeStringProp<'before' | 'after'>('before') +} + +export type PickerProps = ExtractPropTypes + +export type PickerDisplayFormat = (item: ColumnItem | ColumnItem[], vl: { valueKey: string; labelKey: string }) => string + +export type PickerBeforeConfirm = ( + value: string | number | boolean | string[] | number[] | boolean[], + resolve: (isPass: boolean) => void, + picker: any +) => void + +export type PickerExpose = { + // 打开picker弹框 + open: () => void + // 关闭picker弹框 + close: () => void + /** + * 设置加载状态 + * @param loading 加载状态 + */ + setLoading: (loading: boolean) => void +} + +export type PickerInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue b/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue new file mode 100644 index 0000000..82b5abe --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-picker/wd-picker.vue @@ -0,0 +1,412 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-popover/index.scss b/uni_modules/wot-design-uni/components/wd-popover/index.scss new file mode 100644 index 0000000..6d6e1f7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-popover/index.scss @@ -0,0 +1,116 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(popover) { + + @include e(pos) { + background: rgb(75, 76, 77); + color: $-dark-color; + box-shadow: 0px 2px 10px 0px rgba(75, 76, 77, 0.1); + } + + @include e(menu) { + background: rgb(75, 76, 77); + } + + @include e(inner) { + background-color: rgb(75, 76, 77); + } + + @include e(menu-inner) { + + @include halfPixelBorder("top", 0, $-dark-border-color); + } + + @include squareArrow($-popover-arrow-size, rgb(75, 76, 77), $-popover-z-index - 1, $-popover-arrow-box-shadow); + + } +} + +@include b(popover) { + position: relative; + display: inline-block; + + @include edeep(icon) { + vertical-align: middle; + font-size: 18px; + margin-right: 5px; + } + + @include e(menu-inner) { + position: relative; + padding: $-popover-padding 0; + display: flex; + align-items: center; + + @include halfPixelBorder("top", 0, $-popover-border-color); + + &:first-child::after { + display: none; + } + } + + @include e(menu) { + display: inline-block; + padding: 0 $-popover-padding; + white-space: nowrap; + z-index: $-popover-z-index; + position: relative; + background: $-popover-bg; + border-radius: $-popover-radius; + } + + @include edeep(pos) { + position: absolute; + box-sizing: border-box; + background-clip: padding-box; + text-align: center; + min-height: 36px; + z-index: $-popover-z-index; + line-height: $-popover-line-height; + font-size: $-popover-fs; + border-radius: $-popover-radius; + transition: opacity 0.2s; + background: $-popover-bg; + box-shadow: $-popover-box-shadow; + color: $-popover-color; + } + + // @include edeep(transition) { + // position: relative; + // z-index: $-popover-z-index; + // } + + @include e(hidden) { + left: -100vw; + visibility: hidden; + } + + @include e(container) { + position: relative; + line-height: $-tooltip-line-height; + font-size: $-tooltip-fs; + } + + @include e(inner) { + position: relative; + white-space: nowrap; + padding: $-popover-padding; + line-height: $-popover-line-height; + z-index: $-popover-z-index; + background-color: $-popover-bg; + border-radius: $-popover-radius; + } + + @include edeep(close-icon) { + font-size: 12px; + position: absolute; + right: -8px; + top: -10px; + transform: scale(0.5); + padding: 10px; + } + + @include squareArrow($-popover-arrow-size, $-popover-bg, $-popover-z-index - 1, $-popover-arrow-box-shadow); +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-popover/types.ts b/uni_modules/wot-design-uni/components/wd-popover/types.ts new file mode 100644 index 0000000..8faa789 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-popover/types.ts @@ -0,0 +1,69 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export type PlacementType = + | 'top' + | 'top-start' + | 'top-end' + | 'bottom' + | 'bottom-start' + | 'bottom-end' + | 'left' + | 'left-start' + | 'left-end' + | 'right' + | 'right-start' + | 'right-end' + +export type PopoverMode = 'menu' | 'normal' + +export const popoverProps = { + ...baseProps, + customArrow: makeStringProp(''), + customPop: makeStringProp(''), + /** + * 是否显示 popover 箭头 + */ + visibleArrow: makeBooleanProp(true), + /** + * 显示的内容,也可以通过 slot#content 传入 + */ + content: [String, Object] as PropType[]>, + /** + * 指定 popover 的放置位置:top / top-start / top-end / bottom / bottom-start / bottom-end / left / left-start / left-end / right / right-start / right-end + */ + placement: makeStringProp('bottom'), + /** + * 偏移量 + */ + offset: makeNumberProp(0), + /** + * 是否使用内容插槽 + */ + useContentSlot: makeBooleanProp(false), + /** + * 是否禁用 popover + */ + disabled: makeBooleanProp(false), + /** + * 是否显示关闭按钮 + */ + showClose: makeBooleanProp(false), + /** + * 控制 popover 的显示状态 + */ + modelValue: makeBooleanProp(false), + /** + * 当前显示的模式,决定内容的展现形式,可选值:normal(普通模式)/ menu(菜单模式) + */ + mode: makeStringProp('normal') +} + +export type PopoverProps = ExtractPropTypes + +export type PopoverExpose = { + // 打开popover + open: () => void + // 关闭popover + close: () => void +} diff --git a/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue b/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue new file mode 100644 index 0000000..b3d15de --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-popover/wd-popover.vue @@ -0,0 +1,180 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-popup/index.scss b/uni_modules/wot-design-uni/components/wd-popup/index.scss new file mode 100644 index 0000000..e23439c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-popup/index.scss @@ -0,0 +1,84 @@ +@import './../common/abstracts/_mixin.scss'; +@import './../common/abstracts/variable.scss'; + +.wot-theme-dark { + @include b(popup-wrapper) { + :deep() { + .wd-popup { + background: $-dark-background2; + } + + .wd-popup__close { + color: $-dark-color; + } + } + } +} + +@include b(popup-wrapper) { + :deep() { + .wd-popup { + position: fixed; + max-height: 100%; + overflow-y: auto; + background: #fff; + } + } +} + + +@include b(popup) { + @include edeep(close) { + position: absolute; + top: 10px; + right: 10px; + color: $-popup-close-color; + font-size: $-popup-close-size; + transform: rotate(-45deg); + } + + @include mdeep(center) { + left: 50%; + top: 50%; + transform: translate3d(-50%, -50%, 0); + transform-origin: 0% 0%; + + &.wd-zoom-in-enter, + &.wd-zoom-in-leave-to { + transform: scale(0.8) translate3d(-50%, -50%, 0) !important; + } + + @include when(deep) { + + &.wd-zoom-in-enter, + &.wd-zoom-in-leave-to { + transform: scale(0.1) translate3d(-50%, -50%, 0) !important; + } + } + + } + + @include mdeep(left) { + top: 0; + bottom: 0; + left: 0; + } + + @include mdeep(right) { + top: 0; + right: 0; + bottom: 0; + } + + @include mdeep(top) { + top: 0; + left: 0; + right: 0; + } + + @include mdeep(bottom) { + right: 0; + bottom: 0; + left: 0; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-popup/types.ts b/uni_modules/wot-design-uni/components/wd-popup/types.ts new file mode 100644 index 0000000..ee11904 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-popup/types.ts @@ -0,0 +1,104 @@ +/* + * @Author: weisheng + * @Date: 2024-03-18 11:22:03 + * @LastEditTime: 2025-07-06 21:00:04 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-popup/types.ts + * 记得注释 + */ +import type { PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' +import type { TransitionName } from '../wd-transition/types' + +export type PopupType = 'center' | 'top' | 'right' | 'bottom' | 'left' + +export const popupProps = { + ...baseProps, + /** + * 动画类型,参见 wd-transition 组件的name + * 类型:string + * 可选值:fade / fade-up / fade-down / fade-left / fade-right / slide-up / slide-down / slide-left / slide-right / zoom-in + */ + transition: String as PropType, + /** + * 关闭按钮 + * 类型:boolean + * 默认值:false + */ + closable: makeBooleanProp(false), + /** + * 弹出框的位置 + * 类型:string + * 默认值:center + * 可选值:center / top / right / bottom / left + */ + position: makeStringProp('center'), + /** + * 点击遮罩是否关闭 + * 类型:boolean + * 默认值:true + */ + closeOnClickModal: makeBooleanProp(true), + /** + * 动画持续时间 + * 类型:number | boolean + * 默认值:300 + */ + duration: { + type: [Number, Boolean], + default: 300 + }, + /** + * 是否显示遮罩 + * 类型:boolean + * 默认值:true + */ + modal: makeBooleanProp(true), + /** + * 设置层级 + * 类型:number + * 默认值:10 + */ + zIndex: makeNumberProp(10), + /** + * 是否当关闭时将弹出层隐藏(display: none) + * 类型:boolean + * 默认值:true + */ + hideWhenClose: makeBooleanProp(true), + /** + * 遮罩样式 + * 类型:string + * 默认值:'' + */ + modalStyle: makeStringProp(''), + /** + * 弹出面板是否设置底部安全距离(iphone X 类型的机型) + * 类型:boolean + * 默认值:false + */ + safeAreaInsetBottom: makeBooleanProp(false), + /** + * 弹出层是否显示 + */ + modelValue: makeBooleanProp(false), + /** + * 弹层内容懒渲染,触发展示时才渲染内容 + * 类型:boolean + * 默认值:true + */ + lazyRender: makeBooleanProp(true), + /** + * 是否锁定滚动 + * 类型:boolean + * 默认值:true + */ + lockScroll: makeBooleanProp(true), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + * 类型:boolean + * 默认值:false + */ + rootPortal: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-popup/wd-popup.vue b/uni_modules/wot-design-uni/components/wd-popup/wd-popup.vue new file mode 100644 index 0000000..8ff8917 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-popup/wd-popup.vue @@ -0,0 +1,169 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-progress/index.scss b/uni_modules/wot-design-uni/components/wd-progress/index.scss new file mode 100644 index 0000000..fc5cd32 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-progress/index.scss @@ -0,0 +1,68 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(progress) { + @include e(label) { + color: $-dark-color3; + } + } +} + +@include b(progress) { + width: 100%; + height: $-progress-height; + display: flex; + align-items: center; + padding: $-progress-padding; + + @include e(outer) { + display: block; + position: relative; + flex: 1; + height: $-progress-height; + border-radius: calc($-progress-height / 2); + background: $-progress-bg; + } + @include e(inner) { + display: block; + position: absolute; + top: 0; + left: 0; + height: 100%; + border-radius: calc($-progress-height / 2); + background: $-progress-color; + transition-property: width; + transition-timing-function: linear; + font-size: $-progress-icon-fs; + + @include when(danger) { + background: $-progress-danger-color; + } + @include when(success) { + background: $-progress-success-color; + } + @include when(warning) { + background: $-progress-warning-color; + } + } + @include edeep(label) { + width: 30px; + margin-left: 9px; + color: $-progress-label-color; + font-size: $-progress-label-fs; + } + @include edeep(icon) { + font-size: $-progress-icon-fs; + + @include when(danger) { + color: $-progress-danger-color; + } + @include when(success) { + color: $-progress-success-color; + } + @include when(warning) { + color: $-progress-warning-color; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-progress/types.ts b/uni_modules/wot-design-uni/components/wd-progress/types.ts new file mode 100644 index 0000000..0ae22c7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-progress/types.ts @@ -0,0 +1,44 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 20:40:34 + * @LastEditTime: 2024-11-30 00:01:23 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-progress/types.ts + * 记得注释 + */ +import type { PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp } from '../common/props' + +export type ProgressStatus = 'success' | 'danger' | 'warning' // 状态类型 + +export type ProgressColor = { + color: string // 颜色 + percentage: number // 百分比 +} + +export const progressProps = { + ...baseProps, + /** + * 进度数值,最大值100 + */ + percentage: makeNumberProp(0), + /** + * 是否隐藏进度条上的文字,默认值为false + */ + hideText: makeBooleanProp(false), + /** + * 进度条颜色 + */ + color: { + type: [String, Array] as PropType + }, + /** + * 进度增加1%所需毫秒数 + */ + duration: makeNumberProp(30), + /** + * 进度条状态 + */ + status: String as PropType +} diff --git a/uni_modules/wot-design-uni/components/wd-progress/wd-progress.vue b/uni_modules/wot-design-uni/components/wd-progress/wd-progress.vue new file mode 100644 index 0000000..7e4df51 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-progress/wd-progress.vue @@ -0,0 +1,197 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-radio-group/index.scss b/uni_modules/wot-design-uni/components/wd-radio-group/index.scss new file mode 100644 index 0000000..b21629c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-radio-group/index.scss @@ -0,0 +1,23 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(radio-group) { + background-color: $-dark-background2; + } +} + +@include b(radio-group) { + background-color: $-radio-bg; + font-size: 0; + + // 上下20px 左右15px 内部间隔12px + @include when(button) { + width: 100%; + height: 100%; + padding: 8px 3px 20px 15px; + box-sizing: border-box; + overflow: hidden; + height: auto; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-radio-group/types.ts b/uni_modules/wot-design-uni/components/wd-radio-group/types.ts new file mode 100644 index 0000000..83d5cd7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-radio-group/types.ts @@ -0,0 +1,39 @@ +import { type InjectionKey } from 'vue' +import type { RadioShape, RadioIconPlacement } from '../wd-radio/types' +import { baseProps, makeBooleanProp, makeStringProp } from '../common/props' + +export type RadioGroupProvide = { + props: { + modelValue?: string | number | boolean + shape?: RadioShape + checkedColor?: string + disabled?: boolean + cell?: boolean + size?: string + inline?: boolean + iconPlacement?: RadioIconPlacement + } + updateValue: (value: string | number | boolean) => void +} + +export const RADIO_GROUP_KEY: InjectionKey = Symbol('wd-radio-group') + +export const radioGroupProps = { + ...baseProps, + /** 会自动选中value对应的单选框 */ + modelValue: [String, Number, Boolean], + /** 单选框形状,可选值为 dot / button / check,默认为 check */ + shape: makeStringProp('check'), + /** 选中的颜色,默认为 #4D80F0 */ + checkedColor: String, + /** 是否禁用,默认为 false */ + disabled: makeBooleanProp(false), + /** 表单模式,默认为 false */ + cell: makeBooleanProp(false), + /** 设置大小,默认为空 */ + size: makeStringProp(''), + /** 同行展示,默认为 false */ + inline: makeBooleanProp(false), + /** 图标位置,默认为 left */ + iconPlacement: makeStringProp('auto') +} diff --git a/uni_modules/wot-design-uni/components/wd-radio-group/wd-radio-group.vue b/uni_modules/wot-design-uni/components/wd-radio-group/wd-radio-group.vue new file mode 100644 index 0000000..321613b --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-radio-group/wd-radio-group.vue @@ -0,0 +1,51 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-radio/index.scss b/uni_modules/wot-design-uni/components/wd-radio/index.scss new file mode 100644 index 0000000..e029624 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-radio/index.scss @@ -0,0 +1,301 @@ +@import "./../common/abstracts/_mixin.scss"; +@import "./../common/abstracts/variable.scss"; + +.wot-theme-dark { + @include b(radio) { + @include e(shape) { + background: transparent; + } + @include e(label) { + color: $-dark-color; + } + @include when(button) { + .wd-radio__label { + background-color: $-dark-background; + } + @include when(checked) { + .wd-radio__label { + background-color: $-dark-background2; + } + } + } + + @include when(disabled) { + .wd-radio__label { + color: $-dark-color-gray; + } + @include when(checked) { + .wd-radio__label { + color: $-dark-color-gray; + } + } + + @include when(button) { + .wd-radio__label { + border-color: #c8c9cc; + background: #3a3a3c; + color: $-dark-color-gray; + } + @include when(checked) { + .wd-radio__label { + border-color: #c8c9cc; + background: #3a3a3c; + color: #c8c9cc; + } + } + } + + @include when(dot) { + .wd-radio__shape { + border-color: #c8c9cc; + background: #3a3a3c; + &::before { + background-color: #c8c9cc; + } + } + } + } + } +} + +@include b(radio) { + display: flex; + margin-top: $-radio-margin; + justify-content: space-between; + align-items: center; + text-align: center; + line-height: 1.2; + + @include when(first) { + margin-top: 0; + } + @include e(shape) { + position: relative; + display: inline-block; + width: $-radio-size; + height: $-radio-size; + font-size: $-radio-size; + color: transparent; + display: none; + vertical-align: middle; + transition: background 0.2s; + } + @include e(input) { + position: absolute; + width: 0; + height: 0; + margin: 0; + opacity: 0; + } + @include e(label) { + display: inline-block; + vertical-align: top; + font-size: $-radio-label-fs; + color: $-radio-label-color; + line-height: 20px; + word-break: break-all; + } + @include when(checked) { + .wd-radio__shape { + color: $-radio-checked-color; + border-color: currentColor; + display: inline-block; + } + .wd-radio__check { + color: $-radio-checked-color; + opacity: 1; + } + } + + @include when(dot) { + .wd-radio__shape { + border: 2px solid $-radio-dot-border-color; + border-radius: 50%; + position: relative; + display: inline-block; + box-sizing: border-box; + transition: none; + + &::before { + content: ""; + position: absolute; + width: $-radio-dot-size; + height: $-radio-dot-size; + left: calc(50% - #{$-radio-dot-size / 2}); + top: calc(50% - #{$-radio-dot-size / 2}); + border-radius: 50%; + background-color: #fff; + transform: scale(0); + transition: transform .2s ease-in; + } + } + @include when(checked) { + .wd-radio__shape { + background-color: currentColor; + border-color: currentColor; + // background-color: $-radio-dot-checked-bg; + // border-color: $-radio-dot-checked-border-color; + &::before { + transform: scale(1); + } + } + } + } + + @include when(button) { + display: inline-block; + margin-top: 0; + margin-right: 10px; + + .wd-radio__shape { + display: none; + } + .wd-radio__label { + height: $-radio-button-height; + min-width: $-radio-button-min-width; + max-width: $-radio-button-max-width; + padding: 5px 15px; + margin-right: 0; + border-radius: $-radio-button-radius; + background-color: $-radio-button-bg; + font-size: $-radio-button-fs; + box-sizing: border-box; + border: 1px solid $-radio-button-border; + transition: all 0.2s; + @include lineEllipsis; + } + @include when(checked) { + .wd-radio__label { + color: $-radio-checked-color; + border-color: currentColor; + background-color: $-radio-bg; + } + } + } + + &.icon-placement-left { + flex-direction: row-reverse; + } + + @include when(inline) { + display: inline-block; + margin-top: 0; + margin-right: $-radio-margin; + + @include when(first) { + margin-left: 0; + } + .wd-radio__shape { + display: block; + margin-right: 4px; + float: left; + &::after { + content: ""; + display: table; + clear: both; + } + } + + @include when(dot) { + .wd-radio__shape { + margin-top: 2px; + } + @include when(large) { + .wd-radio__shape { + margin-top: 0; + } + } + } + + &.icon-placement-right { + .wd-radio__shape { + margin-right: 0; + margin-left: 4px; + float: right; + } + } + } + + @include when(disabled) { + .wd-radio__label { + color: $-radio-disabled-label-color; + } + @include when(checked) { + .wd-radio__shape { + color: $-radio-disabled-label-color; + } + .wd-radio__check { + color: $-radio-disabled-label-color; + } + .wd-radio__label { + color: $-radio-disabled-label-color; + } + } + + @include when(button) { + .wd-radio__label { + border-color: $-radio-disabled-color; + background: $-radio-disabled-color; + border-color: $-radio-button-border; + color: $-radio-disabled-label-color; + } + @include when(checked) { + .wd-radio__label { + border-color: $-radio-button-disabled-border; + background: $-radio-disabled-color; + } + } + } + + @include when(dot) { + .wd-radio__shape { + background: $-radio-dot-disabled-bg; + border-color: $-radio-dot-disabled-border; + } + } + } + + // 以下内容用于解决父子组件样式隔离的问题 —— START + @include when(cell-radio) { + padding: 13px 15px; + margin: 0; + + @include when(large) { + padding: 14px 15px; + } + } + + @include when(button-radio) { + display: inline-flex; + width: 33.3333%; + padding: 12px 12px 0px 0px; + box-sizing: border-box; + + .wd-radio__label { + width: 100%; + max-width: inherit; + } + } + @include when(large) { + .wd-radio__shape { + width: $-radio-large-size; + height: $-radio-large-size; + font-size: $-radio-large-size; + } + .wd-radio__label { + font-size: $-radio-large-label-fs; + } + + @include when(dot) { + .wd-radio__shape { + &::before { + width: $-radio-dot-large-size; + height: $-radio-dot-large-size; + left: calc(50% - #{$-radio-dot-large-size / 2}); + top: calc(50% - #{$-radio-dot-large-size / 2}); + } + } + } + } + // 以下内容用于解决父子组件样式隔离的问题 —— END +} diff --git a/uni_modules/wot-design-uni/components/wd-radio/types.ts b/uni_modules/wot-design-uni/components/wd-radio/types.ts new file mode 100644 index 0000000..d0f03cc --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-radio/types.ts @@ -0,0 +1,51 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 20:40:34 + * @LastEditTime: 2024-12-07 18:52:34 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-radio/types.ts + * 记得注释 + */ +import type { PropType } from 'vue' +import { baseProps, makeRequiredProp, makeStringProp } from '../common/props' + +export type RadioShape = 'dot' | 'button' | 'check' + +export type RadioIconPlacement = 'left' | 'right' | 'auto' + +export const radioProps = { + ...baseProps, + /** 选中时的值 */ + value: makeRequiredProp([String, Number, Boolean]), + /** 单选框的形状 */ + shape: String as PropType, + /** 选中的颜色 */ + checkedColor: String, + /** 禁用 */ + disabled: { + type: [Boolean, null] as PropType, + default: null + }, + /** 单元格 */ + cell: { + type: [Boolean, null] as PropType, + default: null + }, + /** 大小 */ + size: String, + /** 内联 */ + inline: { + type: [Boolean, null] as PropType, + default: null + }, + /** 最大宽度 */ + maxWidth: String, + /** + * 图标位置 + * 可选值: 'left' | 'right' | 'auto' + */ + iconPlacement: { + type: String as PropType + } +} diff --git a/uni_modules/wot-design-uni/components/wd-radio/wd-radio.vue b/uni_modules/wot-design-uni/components/wd-radio/wd-radio.vue new file mode 100644 index 0000000..14cecdf --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-radio/wd-radio.vue @@ -0,0 +1,118 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-rate/index.scss b/uni_modules/wot-design-uni/components/wd-rate/index.scss new file mode 100644 index 0000000..12b71b1 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-rate/index.scss @@ -0,0 +1,25 @@ +@import './../common/abstracts/_mixin.scss'; +@import './../common/abstracts/variable.scss'; + +@include b(rate) { + display: inline-block; + vertical-align: middle; + line-height: 1; + + @include e(item) { + position: relative; + display: inline-block; + touch-action: none; // 禁用默认触摸行为 + } + @include edeep(item-star) { + -webkit-background-clip: text !important; + color: transparent; + } + @include e(item-half) { + position: absolute; + left: 0; + top: 0; + overflow: hidden; + width: 50%; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-rate/types.ts b/uni_modules/wot-design-uni/components/wd-rate/types.ts new file mode 100644 index 0000000..f890184 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-rate/types.ts @@ -0,0 +1,103 @@ +import type { PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export const rateProps = { + ...baseProps, + + /** + * 评分最大值 + * 类型: number + * 默认值: 5 + */ + num: makeNumberProp(5), + + /** + * 当前分数,使用v-model进行双向绑定 + * 类型: string | number | null + * 默认值: null + */ + modelValue: { + type: [String, Number, null] as PropType, + default: null + }, + + /** + * 是否只读 + * 类型: boolean + * 默认值: false + */ + readonly: makeBooleanProp(false), + + /** + * 图标大小 + * 类型: string + * 默认值: '16px' + */ + size: makeStringProp('16px'), + + /** + * 图标间距 + * 类型: string + * 默认值: '4px' + */ + space: makeStringProp('4px'), + + /** + * 未选中的图标颜色 + * 类型: string + * 默认值: '#E8E8E8' + */ + color: makeStringProp('#E8E8E8'), + + /** + * 选中的图标颜色,支持传颜色数组(用于分段颜色) + * 类型: string | Array + * 默认值: 'linear-gradient(180deg, rgba(255,238,0,1) 0%,rgba(250,176,21,1) 100%)' + */ + activeColor: { + type: [String, Array] as PropType>, + default: 'linear-gradient(180deg, rgba(255,238,0,1) 0%,rgba(250,176,21,1) 100%)' + }, + + /** + * 未选中的图标类名 + * 类型: string + * 默认值: 'star-on' + */ + icon: makeStringProp('star-on'), + + /** + * 选中的图标类名 + * 类型: string + * 默认值: 'star-on' + */ + activeIcon: makeStringProp('star-on'), + + /** + * 是否禁用 + * 类型: boolean + * 默认值: false + */ + disabled: makeBooleanProp(false), + + /** + * 禁用的图标颜色 + * 类型: string + * 默认值: 'linear-gradient(315deg, rgba(177,177,177,1) 0%,rgba(199,199,199,1) 100%)' + */ + disabledColor: makeStringProp('linear-gradient(315deg, rgba(177,177,177,1) 0%,rgba(199,199,199,1) 100%)'), + + /** + * 是否允许半选 + * 类型: boolean + * 默认值: false + */ + allowHalf: makeBooleanProp(false), + + /** + * 当 clearable 属性设置为 true,再次点击相同的值时,可以将值重置为 0。 + * 类型: boolean + * 默认值: false + */ + clearable: makeBooleanProp(false) +} diff --git a/uni_modules/wot-design-uni/components/wd-rate/wd-rate.vue b/uni_modules/wot-design-uni/components/wd-rate/wd-rate.vue new file mode 100644 index 0000000..45d8171 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-rate/wd-rate.vue @@ -0,0 +1,178 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-resize/index.scss b/uni_modules/wot-design-uni/components/wd-resize/index.scss new file mode 100644 index 0000000..cb0a039 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-resize/index.scss @@ -0,0 +1,27 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(resize) { + + @include e(container) { + position: absolute; + min-width: 1px; + min-height: 1px; + } + + @include e(wrapper) { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: -9999; + overflow: hidden; + visibility: hidden; + + @include m(placeholder) { + transition: 0s; + animation: none; + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-resize/types.ts b/uni_modules/wot-design-uni/components/wd-resize/types.ts new file mode 100644 index 0000000..094de17 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-resize/types.ts @@ -0,0 +1,6 @@ +import { baseProps, makeStringProp } from '../common/props' + +export const resizeProps = { + ...baseProps, + customContainerClass: makeStringProp('') +} diff --git a/uni_modules/wot-design-uni/components/wd-resize/wd-resize.vue b/uni_modules/wot-design-uni/components/wd-resize/wd-resize.vue new file mode 100644 index 0000000..2b65423 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-resize/wd-resize.vue @@ -0,0 +1,144 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-root-portal/wd-root-portal.vue b/uni_modules/wot-design-uni/components/wd-root-portal/wd-root-portal.vue new file mode 100644 index 0000000..a038e69 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-root-portal/wd-root-portal.vue @@ -0,0 +1,50 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-row/index.scss b/uni_modules/wot-design-uni/components/wd-row/index.scss new file mode 100644 index 0000000..26ffdbd --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-row/index.scss @@ -0,0 +1,10 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(row) { + &::after { + display: table; + clear: both; + content: ""; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-row/types.ts b/uni_modules/wot-design-uni/components/wd-row/types.ts new file mode 100644 index 0000000..f03f970 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-row/types.ts @@ -0,0 +1,16 @@ +import { type InjectionKey } from 'vue' +import { baseProps, makeNumberProp } from '../common/props' + +export type RowProvide = { + props: { gutter?: number } +} + +export const ROW_KEY: InjectionKey = Symbol('wd-row') + +export const rowProps = { + ...baseProps, + /** + * 列元素之间的间距(单位为px) + */ + gutter: makeNumberProp(0) +} diff --git a/uni_modules/wot-design-uni/components/wd-row/wd-row.vue b/uni_modules/wot-design-uni/components/wd-row/wd-row.vue new file mode 100644 index 0000000..7f74b90 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-row/wd-row.vue @@ -0,0 +1,42 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-search/index.scss b/uni_modules/wot-design-uni/components/wd-search/index.scss new file mode 100644 index 0000000..c57330c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-search/index.scss @@ -0,0 +1,148 @@ +@import '../common/abstracts/_mixin.scss'; +@import '../common/abstracts/variable.scss'; + +.wot-theme-dark { + @include b(search) { + background: $-dark-background4; + + @include e(block) { + background-color: $-dark-background; + } + + @include e(input) { + color: $-dark-color; + } + + @include e(cover) { + background-color: $-dark-background; + } + + @include e(search-icon) { + color: $-dark-color; + } + @include e(search-left-icon) { + color: $-dark-color; + } + @include e(clear) { + color: $-dark-color; + } + @include e(cancel) { + color: $-dark-color; + } + + @include when(light) { + background: $-dark-background4; + + .wd-search__block { + background: $-dark-background7; + } + + .wd-search__cover { + background: $-dark-background7; + } + } + } +} + +@include b(search) { + display: flex; + padding: $-search-padding; + align-items: center; + background: #fff; + + @include e(block) { + flex: 1; + background-color: $-search-input-bg; + border-radius: $-search-input-radius; + display: flex; + flex-direction: row; + align-items: center; + position: relative; + } + @include e(field) { + flex: 1; + display: flex; + flex-direction: row; + align-items: center; + position: relative; + } + @include e(input) { + flex: 1; + height: $-search-input-height; + box-sizing: border-box; + padding: $-search-input-padding; + border: none; + background: transparent; + font-size: $-search-input-fs; + -webkit-appearance: none; + outline: none; + color: $-search-input-color; + z-index: 0; + + @include lineEllipsis; + + &::-webkit-search-cancel-button { + -webkit-appearance: none; + } + } + @include e(cover) { + width: 100%; + height: $-search-input-height; + background-color: $-search-input-bg; + line-height: $-search-input-height; + font-size: $-search-input-fs; + border-radius: $-search-input-radius; + flex-direction: row; + justify-content: center; + align-items: center; + } + @include edeep(search-icon) { + margin-right: 8px; + color: $-search-icon-color; + font-size: $-search-icon-size; + } + @include edeep(search-left-icon) { + position: absolute; + font-size: $-search-icon-size; + top: 50%; + left: 16px; + transform: translateY(-50%); + color: $-search-icon-color; + } + @include e(placeholder-txt) { + color: $-search-placeholder-color; + font-size: $-search-input-fs; + } + @include edeep(clear) { + position: absolute; + right: 0; + padding: 6px 9px 6px 7px; + color: $-search-cancel-color; + } + @include edeep(clear-icon) { + vertical-align: middle; + font-size: $-search-clear-icon-size; + } + @include e(cancel) { + padding: $-search-cancel-padding; + height: $-search-input-height; + line-height: $-search-input-height; + font-size: $-search-cancel-fs; + color: $-search-cancel-color; + -webkit-tap-highlight-color: transparent; + } + @include when(light) { + background: $-search-light-bg; + + .wd-search__block { + background: #fff; + } + + .wd-search__cover { + background: #fff; + } + } + @include when(without-cancel) { + padding-right: $-search-side-padding; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-search/types.ts b/uni_modules/wot-design-uni/components/wd-search/types.ts new file mode 100644 index 0000000..dc9a0cd --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-search/types.ts @@ -0,0 +1,102 @@ +/* + * @Author: weisheng + * @Date: 2024-09-01 15:42:04 + * @LastEditTime: 2024-09-21 15:36:09 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-search\types.ts + * 记得注释 + */ +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' + +export const searchProps = { + ...baseProps, + customInputClass: makeStringProp(''), + /** + * 输入框内容,双向绑定 + * 类型: string + * 默认值: '' + */ + modelValue: makeStringProp(''), + + /** + * 是否使用输入框右侧插槽 + * 类型: boolean + * 默认值: false + * @deprecated 该属性已废弃,将在下一个minor版本被移除,直接使用插槽即可 + */ + useSuffixSlot: makeBooleanProp(false), + + /** + * 搜索框占位文本 + * 类型: string + */ + placeholder: String, + + /** + * 搜索框右侧文本 + * 类型: string + */ + cancelTxt: String, + + /** + * 搜索框亮色(白色) + * 类型: boolean + * 默认值: false + */ + light: makeBooleanProp(false), + + /** + * 是否隐藏右侧文本 + * 类型: boolean + * 默认值: false + */ + hideCancel: makeBooleanProp(false), + + /** + * 是否禁用搜索框 + * 类型: boolean + * 默认值: false + */ + disabled: makeBooleanProp(false), + + /** + * 原生属性,设置最大长度。-1 表示无限制 + * 类型: string / number + * 默认值: -1 + */ + maxlength: makeNumberProp(-1), + + /** + * placeholder 居左边 + * 类型: boolean + * 默认值: false + */ + placeholderLeft: makeBooleanProp(false), + + /** + * 是否自动聚焦 + * 类型: boolean + * 默认值: false + * 最低版本: 0.1.63 + */ + focus: makeBooleanProp(false), + + /** + * 是否在点击清除按钮时聚焦输入框 + * 类型: boolean + * 默认值: false + * 最低版本: 0.1.63 + */ + focusWhenClear: makeBooleanProp(false), + + /** + * 原生属性,指定 placeholder 的样式,目前仅支持color,font-size和font-weight + */ + placeholderStyle: String, + + /** + * 原生属性,指定 placeholder 的样式类 + */ + placeholderClass: makeStringProp('') +} diff --git a/uni_modules/wot-design-uni/components/wd-search/wd-search.vue b/uni_modules/wot-design-uni/components/wd-search/wd-search.vue new file mode 100644 index 0000000..b15ee90 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-search/wd-search.vue @@ -0,0 +1,187 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-segmented/index.scss b/uni_modules/wot-design-uni/components/wd-segmented/index.scss new file mode 100644 index 0000000..f79061e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-segmented/index.scss @@ -0,0 +1,101 @@ +@import './../common/abstracts/_mixin.scss'; +@import './../common/abstracts/variable.scss'; + +.wot-theme-dark { + @include b(segmented) { + background: $-dark-background2; + + @include e(item) { + color: $-dark-color3; + + @include when(active) { + color: $-dark-color; + + @include when(disabled) { + color: $-dark-color3; + } + } + + @include when(disabled) { + color: $-dark-color-gray; + } + + @include m(active) { + background-color: $-color-theme; + + @include when(disabled) { + opacity: 0.6; + } + } + } + + } +} + +@include b(segmented) { + position: relative; + display: flex; + align-items: stretch; + justify-items: flex-start; + width: 100%; + background-color: $-segmented-item-bg-color; + padding: $-segmented-padding; + border-radius: 4px; + box-sizing: border-box; + + + @include e(item) { + position: relative; + text-align: center; + border-radius: 4px; + flex: 1; + min-width: 0; + z-index: 1; + min-height: 28px; + line-height: 28px; + padding: 0 12px; + font-size: 14px; + color: $-segmented-item-color; + font-weight: 400; + + @include when(active) { + font-weight: 550; + } + + @include when(large) { + min-height: 32px; + line-height: 32px; + padding: 0 12px; + font-size: 16px; + } + + + @include when(small) { + min-height: 24px; + line-height: 24px; + padding: 0 7px; + font-size: 12px; + } + + @include when(disabled) { + cursor: no-drop; + color: $-segmented-item-disabled-color; + } + + @include m(active) { + background-color: $-segmented-item-acitve-bg; + border-radius: 4px; + height: calc(100% - $-segmented-padding * 2); + @include when(disabled) { + opacity: 0.8; + } + } + } + + @include e(item-label) { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-segmented/types.ts b/uni_modules/wot-design-uni/components/wd-segmented/types.ts new file mode 100644 index 0000000..99c3a39 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-segmented/types.ts @@ -0,0 +1,80 @@ +/* + * @Author: weisheng + * @Date: 2024-03-18 11:22:03 + * @LastEditTime: 2024-11-24 23:04:55 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-segmented/types.ts + * 记得注释 + */ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeRequiredProp, makeStringProp } from '../common/props' + +export type SegmentedType = 'large' | 'middle' | 'small' + +export interface SegmentedOption { + value: string | number // 选中值 + disabled?: boolean // 是否禁用 + payload?: any // 更多数据 +} + +export const segmentedProps = { + ...baseProps, + + /** + * 当前选中的值 + * 类型: string | number + * 最低版本: 0.1.23 + */ + value: makeRequiredProp([String, Number]), + + /** + * 是否禁用分段器 + * 类型: boolean + * 默认值: false + * 最低版本: 0.1.23 + */ + disabled: makeBooleanProp(false), + + /** + * 控件尺寸 + * 类型: string + * 可选值: 'large' | 'middle' | 'small' + * 默认值: 'middle' + * 最低版本: 0.1.23 + */ + size: makeStringProp('middle'), + + /** + * 数据集合 + * 类型: string[] | number[] | SegmentedOption[] + * 必需: 是 + * 默认值: [] + * 最低版本: 0.1.23 + */ + options: { + type: Array as PropType, + required: true, + default: () => [] + }, + + /** + * 切换选项时是否振动 + * 类型: boolean + * 默认值: false + * 最低版本: 0.1.23 + */ + vibrateShort: makeBooleanProp(false) +} + +export type SegmentedExpose = { + /** + * 更新滑块偏移量 + * @param animation 是否开启动画,默认开启 + */ + updateActiveStyle: (animation?: boolean) => void +} + +export type SegmentedProps = ExtractPropTypes + +export type SegmentedInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-segmented/wd-segmented.vue b/uni_modules/wot-design-uni/components/wd-segmented/wd-segmented.vue new file mode 100644 index 0000000..e836658 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-segmented/wd-segmented.vue @@ -0,0 +1,143 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-select-picker/index.scss b/uni_modules/wot-design-uni/components/wd-select-picker/index.scss new file mode 100644 index 0000000..25d94da --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-select-picker/index.scss @@ -0,0 +1,102 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(select-picker) { + :deep(.wd-select-picker__arrow), + :deep(.wd-select-picker__close), + :deep(.wd-select-picker__clear) { + color: $-dark-color; + } + + :deep(.wd-select-picker__cell--placeholder) { + .wd-cell__value { + color: $-dark-color-gray; + } + } + } +} + +@include b(select-picker) { + @include edeep(cell) { + @include when(disabled) { + .wd-cell__value { + color: $-input-disabled-color; + cursor: not-allowed; + } + } + @include when(error) { + .wd-cell__value { + color: $-input-error-color; + } + .wd-select-picker__arrow { + color: $-input-error-color; + } + } + + @include m(placeholder) { + .wd-cell__value { + color: $-input-placeholder-color; + } + } + + @include when(large) { + .wd-select-picker__arrow, + .wd-select-picker__clear { + font-size: $-cell-icon-size-large; + } + } + } + + @include edeep(arrow, clear) { + display: block; + font-size: $-cell-icon-size; + color: $-cell-arrow-color; + line-height: $-cell-line-height; + } + + @include edeep(clear) { + color: $-cell-clear-color; + } + + @include e(loading) { + position: absolute; + display: flex; + top: 0; + right: 0; + bottom: 0; + left: 0; + align-items: center; + justify-content: center; + z-index: 3; + background: $-picker-loading-bg; + } + + @include edeep(header) { + height: 72px; + line-height: 72px; + } + @include e(wrapper) { + padding: 0 10px; + position: relative; + max-height: 356px; + box-sizing: border-box; + overflow: auto; + + @include when(filterable) { + height: 314px; + max-height: 314px; + } + + @include when(loading) { + overflow: hidden; + } + } + @include e(text-active) { + color: $-color-theme; + } + + @include e(footer) { + padding: 24px 15px; + } +} diff --git a/uni_modules/wot-design-uni/components/wd-select-picker/types.ts b/uni_modules/wot-design-uni/components/wd-select-picker/types.ts new file mode 100644 index 0000000..b41f11a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-select-picker/types.ts @@ -0,0 +1,123 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeRequiredProp, makeStringProp } from '../common/props' +import type { FormItemRule } from '../wd-form/types' + +export type SelectPickerType = 'checkbox' | 'radio' + +export const selectPickerProps = { + ...baseProps, + /** 选择器左侧文案 */ + label: String, + /** 设置左侧标题宽度 */ + labelWidth: makeStringProp('33%'), + /** 禁用 */ + disabled: makeBooleanProp(false), + /** 只读 */ + readonly: Boolean, + /** 选择器占位符 */ + placeholder: String, + /** 弹出层标题 */ + title: String, + /** 选择器的值靠右展示 */ + alignRight: makeBooleanProp(false), + /** 是否为错误状态,错误状态时右侧内容为红色 */ + error: makeBooleanProp(false), + /** 必填样式 */ + required: makeBooleanProp(false), + /** + * 使用 label 插槽时设置该选项 + * @deprecated 可以直接使用标签插槽,无需配置此选项 + */ + useLabelSlot: makeBooleanProp(false), + /** + * 使用默认插槽时设置该选项 + * @deprecated 可以直接使用默认插槽,无需配置此选项 + */ + useDefaultSlot: makeBooleanProp(false), + /** 设置选择器大小 */ + size: String, + /** + * 是否垂直居中 + */ + center: makeBooleanProp(false), + /** 选中的颜色(单/复选框) */ + checkedColor: String, + /** 最小选中的数量(仅在复选框类型下生效,`type`类型为`checkbox`) */ + min: makeNumberProp(0), + /** 最大选中的数量,0 为无限数量,默认为 0(仅在复选框类型下生效,`type`类型为`checkbox`) */ + max: makeNumberProp(0), + /** 设置 picker 内部的选项组尺寸大小 (单/复选框) */ + selectSize: String, + /** 加载中 */ + loading: makeBooleanProp(false), + /** 加载的颜色,只能使用十六进制的色值写法,且不能使用缩写 */ + loadingColor: makeStringProp('#4D80F0'), + /** 点击遮罩是否关闭 */ + closeOnClickModal: makeBooleanProp(true), + /** 选中项,`type`类型为`checkbox`时,类型为 array;`type`为`radio` 时 ,类型为 number / boolean / string */ + modelValue: makeRequiredProp([String, Number, Boolean, Array] as PropType), + /** 选择器数据,一维数组 */ + columns: makeArrayProp>(), + /** 单复选选择器类型 */ + type: makeStringProp('checkbox'), + /** 选项对象中,value 对应的 key */ + valueKey: makeStringProp('value'), + /** 选项对象中,展示的文本对应的 key */ + labelKey: makeStringProp('label'), + /** 确认按钮文案 */ + confirmButtonText: String, + /** 自定义展示文案的格式化函数,返回一个字符串 */ + displayFormat: Function as PropType, + /** 确定前校验函数,接收 (value, resolve) 参数,通过 resolve 继续执行 picker,resolve 接收 1 个 boolean 参数 */ + beforeConfirm: Function as PropType, + /** 弹窗层级 */ + zIndex: makeNumberProp(15), + /** 弹出面板是否设置底部安全距离(iphone X 类型的机型) */ + safeAreaInsetBottom: makeBooleanProp(true), + /** 可搜索(目前只支持本地搜索) */ + filterable: makeBooleanProp(false), + /** 搜索框占位符 */ + filterPlaceholder: String, + /** 是否超出隐藏 */ + ellipsis: makeBooleanProp(false), + /** 重新打开是否滚动到选中项 */ + scrollIntoView: makeBooleanProp(true), + /** 表单域 `model` 字段名,在使用表单校验功能的情况下,该属性是必填的 */ + prop: String, + /** 表单验证规则,结合`wd-form`组件使用 */ + rules: makeArrayProp(), + /** 自定义内容样式类 */ + customContentClass: makeStringProp(''), + /** 自定义标签样式类 */ + customLabelClass: makeStringProp(''), + /** 自定义值样式类 */ + customValueClass: makeStringProp(''), + /** 是否显示确认按钮(radio类型生效),默认值为:true */ + showConfirm: makeBooleanProp(true), + /** + * 显示清空按钮 + */ + clearable: makeBooleanProp(false), + /** + * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) + */ + rootPortal: makeBooleanProp(false), + /** + * 必填标记位置,可选值:before、after + */ + markerSide: makeStringProp<'before' | 'after'>('before') +} +export type SelectPickerProps = ExtractPropTypes + +export type SelectPickerDisplayFormat = (items: string | number | boolean | (string | number | boolean)[], columns: Record[]) => string + +export type SelectPickerBeforeConfirm = (value: string | number | boolean | (string | number | boolean)[], resolve: (isPass: boolean) => void) => void + +export type SelectPickerExpose = { + // 打开picker弹框 + open: () => void + // 关闭picker弹框 + close: () => void +} + +export type SelectPickerInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-select-picker/wd-select-picker.vue b/uni_modules/wot-design-uni/components/wd-select-picker/wd-select-picker.vue new file mode 100644 index 0000000..6182fe9 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-select-picker/wd-select-picker.vue @@ -0,0 +1,432 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-sidebar-item/index.scss b/uni_modules/wot-design-uni/components/wd-sidebar-item/index.scss new file mode 100644 index 0000000..bb1b407 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sidebar-item/index.scss @@ -0,0 +1,97 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(sidebar-item) { + background: $-dark-background2; + color: $-dark-color; + + &:active { + background-color: $-dark-background4; + } + + @include m(active) { + background: $-dark-background; + color: $-sidebar-active-color; + } + + @include m(disabled) { + color: $-dark-color-gray; + + &:active { + background-color: $-dark-background2; + } + } + } + +} + +@include b(sidebar-item) { + display: flex; + align-items: center; + justify-content: center; + position: relative; + padding: 32rpx; + font-size: $-sidebar-font-size; + color: $-sidebar-color; + background: $-sidebar-bg; + min-height: $-sidebar-item-height; + box-sizing: border-box; + white-space: wrap; + line-height: $-sidebar-item-line-height; + + &:active { + background-color: $-sidebar-hover-bg; + } + + @include m(active) { + font-weight: 600; + background: $-sidebar-active-bg; + color: $-sidebar-active-color; + + &::before { + position: absolute; + top: 50%; + left: 0; + width: $-sidebar-active-border-width; + height: $-sidebar-active-border-height; + background: $-sidebar-active-color; + transform: translateY(-50%); + content: ''; + border-radius: $-sidebar-active-border-width; + } + + &:active { + background-color: transparent; + } + } + + @include m(prefix) { + border-bottom-right-radius: $-sidebar-border-radius; + } + + @include m(suffix) { + border-top-right-radius: $-sidebar-border-radius; + } + + + @include m(disabled) { + color: $-sidebar-disabled-color; + cursor: not-allowed; + + &:active { + background-color: $-sidebar-bg; + } + } + + @include edeep(badge) { + z-index: 2; + word-break: break-all; + } + + @include edeep(icon) { + font-size: $-sidebar-icon-size; + margin-right: 2px; + } + +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-sidebar-item/types.ts b/uni_modules/wot-design-uni/components/wd-sidebar-item/types.ts new file mode 100644 index 0000000..a51419f --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sidebar-item/types.ts @@ -0,0 +1,31 @@ +import type { ExtractPropTypes, Prop, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeRequiredProp } from '../common/props' +import type { BadgeProps } from '../wd-badge/types' + +export const sidebarItemProps = { + ...baseProps, + /** 当前选项标题 */ + label: makeRequiredProp(String), + /** 当前选项的值,唯一标识 */ + value: makeRequiredProp([Number, String]), + /** 徽标显示值 */ + badge: { + type: [String, Number, null] as PropType, + default: null + }, + /** 徽标属性,透传给 Badge 组件 */ + badgeProps: Object as PropType>, + /** 图标 */ + icon: String, + /** 是否点状徽标 */ + isDot: { + type: Boolean, + default: undefined + }, + /** 徽标最大值 */ + max: Number, + /** 是否禁用 */ + disabled: makeBooleanProp(false) +} + +export type SidebarItemProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-sidebar-item/wd-sidebar-item.vue b/uni_modules/wot-design-uni/components/wd-sidebar-item/wd-sidebar-item.vue new file mode 100644 index 0000000..f20fa52 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sidebar-item/wd-sidebar-item.vue @@ -0,0 +1,116 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-sidebar/index.scss b/uni_modules/wot-design-uni/components/wd-sidebar/index.scss new file mode 100644 index 0000000..2e268fa --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sidebar/index.scss @@ -0,0 +1,25 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(sidebar) { + background: $-dark-background; + @include e(padding){ + background: $-dark-background2; + } + } +} + +@include b(sidebar) { + display: flex; + flex-direction: column; + overflow-y: auto; + width: $-sidebar-width; + height: $-sidebar-height; + background: $-color-white; + + @include e(padding){ + flex: 1 1 auto; + background: $-sidebar-bg; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-sidebar/types.ts b/uni_modules/wot-design-uni/components/wd-sidebar/types.ts new file mode 100644 index 0000000..5491953 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sidebar/types.ts @@ -0,0 +1,47 @@ +/* + * @Author: weisheng + * @Date: 2024-01-05 18:03:27 + * @LastEditTime: 2024-11-18 23:27:55 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-sidebar/types.ts + * 记得注释 + */ +import { type ExtractPropTypes, type InjectionKey, type PropType } from 'vue' +import { baseProps, makeNumericProp } from '../common/props' + +export type SidebarProvide = { + props: Partial + setChange: (value: number | string, label: string) => void +} + +export const SIDEBAR_KEY: InjectionKey = Symbol('wd-sidebar') + +/** + * Sidebar切换前的选项接口 + */ +export type SidebarBeforeChangeOption = { + // 目标值 + value: number | string + resolve: (pass: boolean) => void +} + +/** + * Sidebar切换前的钩子函数类型 + * @param option 切换选项 + */ +export type SidebarBeforeChange = (option: SidebarBeforeChangeOption) => void + +export const sidebarProps = { + ...baseProps, + /** + * 当前导航项的索引 + */ + modelValue: makeNumericProp(0), + /** + * 在改变前执行的函数 + */ + beforeChange: Function as PropType +} + +export type SidebarProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-sidebar/wd-sidebar.vue b/uni_modules/wot-design-uni/components/wd-sidebar/wd-sidebar.vue new file mode 100644 index 0000000..ff659f6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sidebar/wd-sidebar.vue @@ -0,0 +1,63 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-signature/index.scss b/uni_modules/wot-design-uni/components/wd-signature/index.scss new file mode 100644 index 0000000..e8259bb --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-signature/index.scss @@ -0,0 +1,31 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(signature) { + @include e(content) { + justify-content: center; + align-items: center; + display: flex; + overflow: hidden; + background: $-signature-bg; + border-radius: $-signature-radius; + border: $-signature-border; + } + + @include e(content-canvas) { + width: 100%; + } + + + @include e(footer) { + margin-top: $-signature-footer-margin-top; + justify-content: flex-end; + display: flex; + + :deep(){ + .wd-button{ + margin-left: $-signature-button-margin-left; + } + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-signature/types.ts b/uni_modules/wot-design-uni/components/wd-signature/types.ts new file mode 100644 index 0000000..39336e1 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-signature/types.ts @@ -0,0 +1,263 @@ +/* + * @Author: 810505339 + * @Date: 2025-01-10 20:03:57 + * @LastEditors: weisheng + * @LastEditTime: 2025-03-23 16:35:14 + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-signature/types.ts + * 记得注释 + */ +import type { ComponentPublicInstance, ExtractPropTypes } from 'vue' +import { baseProps, numericProp } from '../common/props' + +export const signatureProps = { + ...baseProps, + /** + * 签名笔颜色 + * 类型:string + * 默认值:#000 + */ + penColor: { + type: String, + default: '#000' + }, + /** + * 签名笔宽度 + * 类型:number + * 默认值:3 + */ + lineWidth: { + type: Number, + default: 3 + }, + /** + * 清空按钮的文本 + * 类型:string + */ + clearText: String, + /** + * 撤回按钮的文本 + * 类型:string + */ + revokeText: String, + /** + * 恢复按钮的文本 + * 类型:string + */ + restoreText: String, + /** + * 确认按钮的文本 + * 类型:string + */ + confirmText: String, + /** + * 目标文件的类型 + * 类型:string + * 默认值:png + */ + fileType: { + type: String, + default: 'png' + }, + /** + * 目标文件的质量 + * 类型:number + * 默认值:1 + */ + quality: { + type: Number, + default: 1 + }, + /** + * 导出图片的缩放比例 + * 类型:number + * 默认值:1 + */ + exportScale: { + type: Number, + default: 1 + }, + /** + * 是否禁用签名板 + * 类型:boolean + * 默认值:false + */ + disabled: { + type: Boolean, + default: false + }, + /** + * 画布的高度 + * 类型:number + */ + height: numericProp, + /** + * 画布的宽度 + * 类型:number + */ + width: numericProp, + /** + * 画板的背景色 + * 类型:string + */ + backgroundColor: String, + /** + * 是否禁用画布滚动 + * 类型:boolean + * 默认值:true + */ + disableScroll: { + type: Boolean, + default: true + }, + /** + * 是否开启历史记录 + * 类型:boolean + * 默认值:false + */ + enableHistory: { + type: Boolean, + default: false + }, + /** + * 撤回和恢复的步长 + * 类型:number + * 默认值:1 + */ + step: { + type: Number, + default: 1 + }, + /** + * 撤回按钮的文本 + * 类型:string + * 默认值:撤销 + */ + undoText: String, + /** + * 恢复按钮的文本 + * 类型:string + * 默认值:恢复 + */ + redoText: String, + /** + * 是否启用压感模式(笔锋) + * 类型:boolean + * 默认值:false + */ + pressure: { + type: Boolean, + default: false + }, + /** + * 压感模式下笔画最小宽度 + * 类型:number + * 默认值:2 + */ + minWidth: { + type: Number, + default: 2 + }, + /** + * 压感模式下笔画最大宽度 + * 类型:number + * 默认值:6 + */ + maxWidth: { + type: Number, + default: 6 + }, + /** + * 最小速度阈值,影响压感模式下的笔画宽度变化 + * 类型:number + * 默认值:1.5 + */ + minSpeed: { + type: Number, + default: 1.5 + } +} + +/** + * 签名结果类型 + * @property tempFilePath - 生成图片的临时路径 + * @property success - 是否成功生成图片 + * @property width - 生成图片的宽度 + * @property height - 生成图片的高度 + */ +export type SignatureResult = { + tempFilePath: string + success: boolean + width: number + height: number +} + +/** + * 签名线条类型 + * @property points - 线条所包含的所有点的数组 + * @property color - 线条颜色 + * @property width - 线条宽度 + * @property backgroundColor - 线条背景色 (可选) + * @property isPressure - 是否为笔锋模式的线条 (可选) + */ +export interface Line { + points: Point[] + color: string + width: number + backgroundColor?: string + isPressure?: boolean +} + +/** + * 签名点位类型 + * @property x - 点的横坐标 + * @property y - 点的纵坐标 + * @property t - 点的时间戳 + * @property speed - 当前点的绘制速度 (可选) + * @property distance - 与上一个点的距离 (可选) + * @property lineWidth - 当前点的线宽 (可选,用于笔锋模式) + * @property lastX1 - 贝塞尔曲线第一个控制点的x坐标 (可选) + * @property lastY1 - 贝塞尔曲线第一个控制点的y坐标 (可选) + * @property lastX2 - 贝塞尔曲线第二个控制点的x坐标 (可选) + * @property lastY2 - 贝塞尔曲线第二个控制点的y坐标 (可选) + * @property isFirstPoint - 是否为线条的第一个点 (可选) + */ +export interface Point { + x: number + y: number + t: number + speed?: number + distance?: number + lineWidth?: number + lastX1?: number + lastY1?: number + lastX2?: number + lastY2?: number + isFirstPoint?: boolean +} + +/** + * 签名组件暴露的方法类型 + * @property init - 初始化签名板 + * @property clear - 清除签名 + * @property confirm - 确认签名并生成图片 + * @property restore - 恢复上一步操作 + * @property revoke - 撤销上一步操作 + */ +export type SignatureExpose = { + /** 初始化签名板 + * @param forceUpdate - 是否强制更新 + */ + init: (forceUpdate?: boolean) => void + /** 点击清除按钮清除签名 */ + clear: () => void + /** 点击确定按钮 */ + confirm: () => void + /* 点击恢复 */ + restore: () => void + /* 点击撤回 */ + revoke: () => void +} + +export type SignatureProps = ExtractPropTypes + +export type SignatureInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-signature/wd-signature.vue b/uni_modules/wot-design-uni/components/wd-signature/wd-signature.vue new file mode 100644 index 0000000..0104022 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-signature/wd-signature.vue @@ -0,0 +1,630 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-skeleton/index.scss b/uni_modules/wot-design-uni/components/wd-skeleton/index.scss new file mode 100644 index 0000000..6c0f25c --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-skeleton/index.scss @@ -0,0 +1,96 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(skeleton) { + @include e(col) { + background-color: $-dark-background4; + } + } +} +@include b(skeleton) { + box-sizing: border-box; + + @include e(row) { + justify-content: space-between; + margin-bottom: $-skeleton-row-margin-bottom; + display: flex; + align-items: center; + + &:only-child, + &:last-child { + margin-bottom: 0; + } + } + @include e(col) { + border-radius: $-skeleton-border-radius-text; + background-color: $-skeleton-background-color; + display: flex; + align-items: center; + justify-content: center; + + &:first-child:last-child, + &:last-child { + margin-right: 0; + } + } + @include m(type) { + &-text { + width: 100%; + height: $-skeleton-text-height-default; + border-radius: $-skeleton-border-radius-text; + } + + &-rect { + width: 100%; + height: $-skeleton-rect-height-default; + border-radius: $-skeleton-border-radius-rect; + } + + &-circle { + flex-shrink: 0; + width: $-skeleton-circle-height-default; + height: $-skeleton-circle-height-default; + border-radius: $-skeleton-border-radius-circle; + } + } + @include m(animation) { + &-gradient { + position: relative; + overflow-x: hidden; + + &::after { + content: ' '; + position: absolute; + animation: wd-skeleton-gradient 1.5s linear 2s infinite; + background: linear-gradient(90deg, rgba(255, 255, 255, 0), $-skeleton-animation-gradient, rgba(255, 255, 255, 0)); + inset: 0; + } + } + + &-flashed { + animation: wd-skeleton-flashed 2s linear 2s infinite; + } + } + + @keyframes wd-skeleton-gradient { + 0% { + transform: translateX(-100%) skewX(-15deg); + } + 100% { + transform: translateX(100%) skewX(-15deg); + } + } + @keyframes wd-skeleton-flashed { + 0% { + opacity: 1; + } + 50% { + opacity: 0.3; + background-color: $-skeleton-animation-flashed; + } + 100% { + opacity: 1; + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-skeleton/index.ts b/uni_modules/wot-design-uni/components/wd-skeleton/index.ts new file mode 100644 index 0000000..43e0049 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-skeleton/index.ts @@ -0,0 +1 @@ +export type { SkeletonThemeVars } from './types' diff --git a/uni_modules/wot-design-uni/components/wd-skeleton/types.ts b/uni_modules/wot-design-uni/components/wd-skeleton/types.ts new file mode 100644 index 0000000..5effc14 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-skeleton/types.ts @@ -0,0 +1,69 @@ +import type { PropType, ExtractPropTypes, CSSProperties } from 'vue' +import { makeArrayProp, makeBooleanProp, makeStringProp } from '../common/props' + +export type SkeletonTheme = 'text' | 'avatar' | 'paragraph' | 'image' +export type SkeletonAnimation = 'gradient' | 'flashed' +export type SkeletonRowColObj = { + [key: string]: any + type?: 'rect' | 'circle' | 'text' + size?: string | number + width?: string | number + height?: string | number + margin?: string | number + background?: string + marginLeft?: string | number + marginRight?: string | number + borderRadius?: string | number + backgroundColor?: string +} +export type SkeletonRowCol = number | SkeletonRowColObj | Array +export type SkeletonThemeVars = { + notifyPadding?: string + notifyFontSize?: string + notifyTextColor?: string + notifyLineHeight?: number | string + notifyDangerBackground?: string + notifyPrimaryBackground?: string + notifySuccessBackground?: string + notifyWarningBackground?: string +} +export const skeletonProps = { + /** + * 骨架图风格,有基础、头像组合等两大类 + */ + theme: makeStringProp('text'), + /** + * 用于设置行列数量、宽度高度、间距等。 + * @example + * 【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。 + * 【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。 + * 【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度和间距 + */ + rowCol: makeArrayProp(), + /** + * 是否为加载状态,如果是则显示骨架图,如果不是则显示加载完成的内容 + * @default true + */ + loading: makeBooleanProp(true), + /** + * 动画效果,有「渐变加载动画」和「闪烁加载动画」两种。值为空则表示没有动画 + */ + animation: { + type: String as PropType, + default: '' + }, + // 自定义类名 + customClass: { + type: [String, Array, Object], + default: '' + }, + // 自定义样式 + customStyle: { + type: Object as PropType, + default() { + return {} + } + } +} + +export type SkeletonProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-skeleton/wd-skeleton.vue b/uni_modules/wot-design-uni/components/wd-skeleton/wd-skeleton.vue new file mode 100644 index 0000000..68ec6cc --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-skeleton/wd-skeleton.vue @@ -0,0 +1,119 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-slider/index.scss b/uni_modules/wot-design-uni/components/wd-slider/index.scss new file mode 100644 index 0000000..6301999 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-slider/index.scss @@ -0,0 +1,98 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(slider) { + @include e(label-min, label-max) { + color: $-dark-color; + } + + @include e(label) { + color: $-dark-color; + background-color: rgba($color: $-dark-background2, $alpha: 0.5); + } + + @include m(disabled) { + @include me(label-min, label-max) { + color: $-dark-color-gray; + } + } + } +} + + +@include b(slider) { + display: flex; + flex-flow: row nowrap; + align-items: center; + height: calc($-slider-handle-radius * 3); + + @include e(label-min, label-max) { + font-size: $-slider-fs; + color: $-slider-color; + } + @include e(label) { + text-align: center; + width: calc($-slider-handle-radius * 2); + line-height: calc($-slider-handle-radius * 2); + font-size: $-slider-fs; + line-height: 1.2; + color: $-slider-color; + background-color: rgba($color: #fff, $alpha: 0.5); + border-radius: 100%; + position: absolute; + bottom: calc($-slider-handle-radius * 2 + 8px); + } + @include e(bar-wrapper) { + flex: 1; + position: relative; + border-radius: calc($-slider-axie-height / 2); + background-color: #e5e5e5; + margin: calc($-slider-handle-radius - $-slider-axie-height / 2) 0; + } + @include e(bar) { + position: relative; + border-radius: inherit; + height: $-slider-axie-height; + background: $-slider-line-color; + } + @include e(button-wrapper) { + width: calc($-slider-handle-radius * 2); + /* 右侧滑块按钮定位,向右偏移自身宽度的50% */ + transform: translate3d(50%, -50%, 0); + position: absolute; + right: 0; + + @include m(left){ + left: 0; + /* 左侧滑块按钮定位,向左偏移自身宽度的50% */ + transform: translate3d(-50%, -50%, 0); + } + } + @include e(has-label) { + padding-top: calc($-slider-fs * 1.2 + 8px); + } + @include e(button) { + height: calc($-slider-handle-radius * 2); + width: calc($-slider-handle-radius * 2); + background: $-slider-handle-bg; + border-radius: 100%; + border: 1px solid $-slider-axie-bg; + box-sizing: border-box; + box-shadow: 0 2px 4px 0 rgba($color: #9b9b9b, $alpha: 0.5); + } + @include e(label-min) { + margin-right: calc($-slider-handle-radius * 2); + } + @include e(label-max) { + margin-left: calc($-slider-handle-radius * 2); + } + @include m(disabled) { + @include me(bar) { + opacity: 0.25; + } + @include me(label-min, label-max) { + color: $-slider-disabled-color; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-slider/types.ts b/uni_modules/wot-design-uni/components/wd-slider/types.ts new file mode 100644 index 0000000..989f7dd --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-slider/types.ts @@ -0,0 +1,138 @@ +import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +/** + * 滑块值类型 - 单滑块为数字,双滑块为数组 + */ +export type SliderValue = number | number[] + +export const sliderProps = { + ...baseProps, + + /** + * 自定义最小值的样式类名 + * 类型: string + * 默认值: '' + */ + customMinClass: makeStringProp(''), + + /** + * 自定义最大值的样式类名 + * 类型: string + * 默认值: '' + */ + customMaxClass: makeStringProp(''), + + /** + * 是否隐藏左右的最大最小值 + * 类型: boolean + * 默认值: false + */ + hideMinMax: makeBooleanProp(false), + + /** + * 是否隐藏当前滑块值 + * 类型: boolean + * 默认值: false + */ + hideLabel: makeBooleanProp(false), + + /** + * 是否禁用滑块 + * 类型: boolean + * 默认值: false + */ + disabled: makeBooleanProp(false), + + /** + * 进度条未激活的背景颜色 + * 类型: string + * 默认值: '#e5e5e5' + */ + inactiveColor: makeStringProp('#e5e5e5'), + + /** + * 进度条激活的背景颜色 + * 类型: string + * 默认值: '' + */ + activeColor: makeStringProp(''), + + /** + * 滑块的最大值 + * 类型: number + * 默认值: 100 + */ + max: makeNumberProp(100), + + /** + * 滑块的最小值 + * 类型: number + * 默认值: 0 + */ + min: makeNumberProp(0), + + /** + * 滑块的步进值 + * 类型: number + * 默认值: 1 + */ + step: makeNumberProp(1), + + /** + * 滑块的值,如果为数组,则为双向滑块 + * 类型: number | number[] + * 默认值: 0 + */ + modelValue: { + type: [Number, Array] as PropType, + default: 0 + } +} + +/** + * 滑块拖动事件参数 + */ +export interface SliderDragEvent { + /** + * 当前滑块的值 + * 单滑块模式为数字,双滑块模式为数组 + */ + value: SliderValue +} + +/** + * 滑块组件事件类型定义 + */ +export type SliderEmits = { + /** + * 开始拖动滑块时触发 + */ + dragstart: [event: SliderDragEvent] + + /** + * 拖动滑块过程中触发 + */ + dragmove: [event: SliderDragEvent] + + /** + * 结束拖动滑块时触发 + */ + dragend: [event: SliderDragEvent] + + /** + * 更新滑块值时触发,用于v-model绑定 + */ + 'update:modelValue': [value: SliderValue] +} + +export type SliderExpose = { + /** + * 初始化slider宽度 + */ + initSlider: () => void +} + +export type SliderProps = ExtractPropTypes + +export type SliderInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-slider/wd-slider.vue b/uni_modules/wot-design-uni/components/wd-slider/wd-slider.vue new file mode 100644 index 0000000..3d86731 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-slider/wd-slider.vue @@ -0,0 +1,356 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-sort-button/index.scss b/uni_modules/wot-design-uni/components/wd-sort-button/index.scss new file mode 100644 index 0000000..bbc9af2 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sort-button/index.scss @@ -0,0 +1,89 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(sort-button) { + @include e(wrapper) { + color: $-dark-color; + } + } + +} + +@include b(sort-button) { + display: inline-block; + height: $-sort-button-height; + line-height: $-sort-button-height; + + @include m(line) { + .wd-sort-button__left { + &::after { + position: absolute; + content: ''; + width: 19px; + height: 3px; + bottom: 6px; + left: 50%; + transform: translate(-50%, 0); + background: $-sort-button-line-color; + border-radius: calc($-sort-button-line-height / 2); + transition: opacity .15s; + opacity: 0; + } + + &.is-active::after { + opacity: 1; + } + } + } + + @include e(wrapper) { + font-size: $-sort-button-fs; + color: $-sort-button-color; + word-break: break-all; + white-space: nowrap; + } + + @include e(left) { + position: relative; + display: inline-block; + vertical-align: middle; + + @include when(active) { + font-weight: $-fw-medium; + + .wd-sort-button__right { + justify-content: center; + } + + } + } + + @include e(right) { + display: inline-block; + min-width: 14px; + margin-left: 2px; + vertical-align: middle; + line-height: 1.1; + + @include when(active) { + + :deep(.wd-sort-button__icon-up), + :deep(.wd-sort-button__icon-down) { + transform: scale(calc((10 / 14))); + } + } + } + + @include edeep(icon-up) { + display: block !important; + line-height: 1.1; + transform: scale(calc((10 / 14))) translate(0, 7px); + } + + @include edeep(icon-down) { + display: block !important; + line-height: 1.1; + transform: scale(calc((10 / 14))) translate(0, -7px); + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-sort-button/types.ts b/uni_modules/wot-design-uni/components/wd-sort-button/types.ts new file mode 100644 index 0000000..1d94f4f --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sort-button/types.ts @@ -0,0 +1,43 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' + +export const sortButtonProps = { + ...baseProps, + /** + * 选中的箭头方向,1表示升序,0表示重置状态,-1表示降序。 + * 类型: number + * 可选值: -1, 0, 1 + * 默认值: 0或-1(根据具体实现可能有所不同) + */ + modelValue: makeNumberProp(0), + + /** + * 排序按钮展示的文案。 + * 类型: string + * 默认值: '' + */ + title: makeStringProp(''), + + /** + * 当展示双箭头时,是否允许手动重置按钮。 + * 类型: boolean + * 默认值: false + */ + allowReset: makeBooleanProp(false), + + /** + * 是否优先切换为降序,如果不开启则默认优先切换为升序。 + * 类型: boolean + * 默认值: false + */ + descFirst: makeBooleanProp(false), + + /** + * 是否展示下划线,当只有一个排序按钮时,通常不展示下划线。 + * 类型: boolean + * 默认值: true + */ + line: makeBooleanProp(true) +} + +export type SortButtonProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-sort-button/wd-sort-button.vue b/uni_modules/wot-design-uni/components/wd-sort-button/wd-sort-button.vue new file mode 100644 index 0000000..d8e6c19 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sort-button/wd-sort-button.vue @@ -0,0 +1,69 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-status-tip/index.scss b/uni_modules/wot-design-uni/components/wd-status-tip/index.scss new file mode 100644 index 0000000..9ba494a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-status-tip/index.scss @@ -0,0 +1,37 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + background-color: $-dark-background2; + @include b(status-tip) { + @include e(text) { + color: $-dark-color3; + } + } +} + +@include b(status-tip) { + padding: $-statustip-padding; + width: 100%; + margin: 0 auto; + color: $-statustip-color; + font-size: $-statustip-fs; + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: center; + + @include edeep(image) { + margin: 0 auto; + width: 160px; + height: 160px; + } + @include e(text) { + margin: 20px auto 0; + font-size: $-statustip-fs; + line-height: $-statustip-line-height; + color: $-statustip-color; + text-align: center; + overflow-wrap: break-word; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-status-tip/types.ts b/uni_modules/wot-design-uni/components/wd-status-tip/types.ts new file mode 100644 index 0000000..b4f1938 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-status-tip/types.ts @@ -0,0 +1,65 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 13:49:00 + * @LastEditTime: 2024-09-19 14:45:29 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-status-tip\types.ts + * 记得注释 + */ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeStringProp } from '../common/props' +import type { ImageMode } from '../wd-img/types' + +export type ImageSize = { + /** + * 宽度 + */ + width: number | string + /** + * 高度 + */ + height: number | string +} + +export const statusTipProps = { + ...baseProps, + + /** + * 缺省图片类型,支持传入图片 URL。 + * 类型: string + * 可选值: search, network, content, collect, comment, halo, message + * 默认值: network + */ + image: makeStringProp('network'), + + /** + * 图片大小,默认单位为 `px`。 + * 类型: string 或 number 或 ImageSize + * 默认值: 空字符串 + */ + imageSize: { + type: [String, Number, Object] as PropType, + default: '' + }, + /** + * 提示文案。 + * 类型: string + * 默认值: 空字符串 + */ + tip: makeStringProp(''), + /** + * 图片裁剪、缩放的模式 + * 类型:string + * 默认值:'aspectFill' + */ + imageMode: makeStringProp('aspectFill'), + /** + * 图片路径前缀,指向图片所在目录,用于拼接图片 URL。推荐将图片放到自己的服务器上,并设置此属性。 + * 类型: string + * 默认值: https://registry.npmmirror.com/wot-design-uni-assets/*\/files/ + */ + urlPrefix: makeStringProp('https://registry.npmmirror.com/wot-design-uni-assets/*/files/') +} + +export type StatusTipProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-status-tip/wd-status-tip.vue b/uni_modules/wot-design-uni/components/wd-status-tip/wd-status-tip.vue new file mode 100644 index 0000000..4ab2ee4 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-status-tip/wd-status-tip.vue @@ -0,0 +1,70 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-step/index.scss b/uni_modules/wot-design-uni/components/wd-step/index.scss new file mode 100644 index 0000000..5feb063 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-step/index.scss @@ -0,0 +1,235 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(step) { + @include e(icon) { + background: $-dark-background2; + } + + @include e(content){ + color: $-dark-color3; + } + + @include e(line) { + background: $-dark-color-gray; + } + + @include e(dot) { + background: $-dark-color-gray; + } + + @include e(description) { + color: $-dark-color3; + } + + @include when(wait) { + .wd-step__description { + color: $-dark-color-gray; + } + } + + :deep(.wd-step__icon-outer),:deep(.wd-step__icon-inner){ + color: $-dark-color3; + border-color: $-dark-color-gray; + } + } +} + + +@include b(step) { + position: relative; + display: inline-block; + vertical-align: top; + + @include e(header) { + position: relative; + font-size: 0; + + @include when(dot) { + .wd-step__line { + margin-top: -1px; + } + } + } + @include e(icon) { + display: inline-block; + position: relative; + width: $-steps-icon-size; + height: $-steps-icon-size; + background: #fff; + z-index: 1; + + @include when(icon) { + width: $-steps-is-icon-width; + text-align: center; + } + @include when(dot) { + width: $-steps-dot-size; + height: $-steps-dot-size; + border: 1px solid transparent; + margin-left: -1px; + border-radius: 50%; + background: transparent; + } + } + @include edeep(icon-inner) { + font-size: $-steps-icon-size; + color: $-steps-inactive-color; + } + @include e(icon-outer) { + width: calc($-steps-icon-size - 2px); + height: calc($-steps-icon-size - 2px); + border: 1px solid $-steps-inactive-color; + color: $-steps-inactive-color; + text-align: center; + line-height: calc($-steps-icon-size - 2px); + border-radius: 50%; + font-size: $-steps-icon-text-fs; + } + @include e(line) { + position: absolute; + width: 100%; + height: 1px; + background: $-steps-line-color; + transform: scaleY(0.5); + top: 50%; + left: 0; + } + @include e(dot) { + position: relative; + display: block; + width: 100%; + height: 100%; + border-radius: 50%; + background: $-steps-line-color; + } + @include e(content){ + margin-top: 7px; + color: $-steps-inactive-color; + font-size: $-steps-label-fs; + } + @include e(title) { + font-weight: $-steps-title-fw; + line-height: 1.43; + + @include when(description) { + font-size: $-steps-title-fs; + } + } + @include e(description) { + margin-top: 5px; + padding: 0 2px; + color: $-steps-description-color; + } + @include when(wait) { + .wd-step__description { + color: $-steps-inactive-color; + } + } + @include when(finished) { + :deep(.wd-step__icon-inner) { + color: $-steps-finished-color; + } + .wd-step__icon-outer { + color: $-steps-finished-color; + border-color: $-steps-finished-color; + } + .wd-step__title { + color: $-steps-finished-color; + } + .wd-step__dot { + background: $-steps-finished-color; + } + } + @include when(process) { + .wd-step__icon.is-icon { + :deep(.wd-step__icon-inner) { + color: $-steps-finished-color; + } + } + .wd-step__icon-outer { + color: #fff; + background: $-steps-finished-color; + border-color: $-steps-finished-color; + } + .wd-step__title { + color: $-steps-finished-color; + } + .wd-step__icon { + border-color: $-steps-finished-color; + + &.is-dot { + &::after { + position: absolute; + content: ''; + width: $-steps-dot-size + 10px; + height: $-steps-dot-size + 10px; + left: -5px; + top: -5px; + border-radius: 50%; + background: $-steps-finished-color; + opacity: 0.2; + } + } + } + .wd-step__dot { + background: $-steps-finished-color; + } + } + @include when(error) { + :deep(.wd-step__icon-inner), .wd-step__title { + color: $-steps-error-color; + } + .wd-step__icon-outer { + color: $-steps-error-color; + border-color: $-steps-error-color; + } + .wd-step__dot { + background: $-steps-error-color; + } + } + @include when(center) { + text-align: center; + + .wd-step__line { + left: 50%; + right: -50%; + } + } + @include when(vertical) { + display: block; + + .wd-step__header { + position: absolute; + left: 0; + top: 0; + height: 100%; + + &.is-dot { + top: 6px; + + .wd-step__line { + margin-left: -1px; + margin-top: 0; + } + } + } + .wd-step__content { + margin-left: 30px; + margin-top: 0; + padding-bottom: 20px; + } + .wd-step__line { + top: 0; + left: 50%; + width: 1px; + height: 100%; + transform: scaleX(0.5); + } + .wd-step__icon.is-dot { + margin-left: 0; + margin-top: -1px; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-step/types.ts b/uni_modules/wot-design-uni/components/wd-step/types.ts new file mode 100644 index 0000000..3d24ff6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-step/types.ts @@ -0,0 +1,33 @@ +import type { PropType } from 'vue' +import { baseProps, makeBooleanProp } from '../common/props' + +export type StepStatus = 'finished' | 'process' | 'error' + +export const stepProps = { + ...baseProps, + + /** + * 步骤标题,如果没有则使用默认文案。 + * 当只有标题而没有描述时,标题的字号会小2号。 + * 类型: string + */ + title: String, + + /** + * 步骤描述。 + * 类型: string + */ + description: String, + + /** + * 步骤图标。 + * 类型: string + */ + icon: String, + + /** + * 步骤状态,可选值为 'finished'(已完成)、'process'(进行中)、'error'(出错)。 + * 类型: string + */ + status: String as PropType +} diff --git a/uni_modules/wot-design-uni/components/wd-step/wd-step.vue b/uni_modules/wot-design-uni/components/wd-step/wd-step.vue new file mode 100644 index 0000000..1a40f83 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-step/wd-step.vue @@ -0,0 +1,150 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-steps/index.scss b/uni_modules/wot-design-uni/components/wd-steps/index.scss new file mode 100644 index 0000000..e436a2d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-steps/index.scss @@ -0,0 +1,10 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(steps) { + font-size: 0; + + @include when(vertical) { + display: block; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-steps/types.ts b/uni_modules/wot-design-uni/components/wd-steps/types.ts new file mode 100644 index 0000000..13382c0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-steps/types.ts @@ -0,0 +1,59 @@ +/* + * @Author: weisheng + * @Date: 2024-01-09 11:46:46 + * @LastEditTime: 2024-03-18 17:23:06 + * @LastEditors: weisheng + * @Description: + * @FilePath: \wot-design-uni\src\uni_modules\wot-design-uni\components\wd-steps\types.ts + * 记得注释 + */ +import { type ExtractPropTypes, type InjectionKey } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp } from '../common/props' + +export const stepsProps = { + ...baseProps, + + /** + * 当前激活的步骤进度,以数字表示。 + * 类型: number + * 默认值: 0 + */ + active: makeNumberProp(0), + + /** + * 是否为垂直方向的步骤条。 + * 类型: boolean + * 默认值: false + */ + vertical: makeBooleanProp(false), + + /** + * 是否为点状步骤条样式。 + * 类型: boolean + * 默认值: false + */ + dot: makeBooleanProp(false), + + /** + * 步骤条之间的间距,默认为自动计算。 + * 如果指定,则使用此值作为间距。 + * 类型: string + * 默认值: 自动计算 + */ + space: String, + + /** + * 是否将步骤条水平居中显示,只对横向步骤条有效。 + * 类型: boolean + * 默认值: false + */ + alignCenter: makeBooleanProp(false) +} + +export type StepsProps = ExtractPropTypes + +export type StepsProvide = { + props: Partial +} + +export const STEPS_KEY: InjectionKey = Symbol('wd-steps') diff --git a/uni_modules/wot-design-uni/components/wd-steps/wd-steps.vue b/uni_modules/wot-design-uni/components/wd-steps/wd-steps.vue new file mode 100644 index 0000000..0440038 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-steps/wd-steps.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-sticky-box/index.scss b/uni_modules/wot-design-uni/components/wd-sticky-box/index.scss new file mode 100644 index 0000000..9456c8b --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sticky-box/index.scss @@ -0,0 +1,6 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(sticky-box) { + position: relative; +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-sticky-box/types.ts b/uni_modules/wot-design-uni/components/wd-sticky-box/types.ts new file mode 100644 index 0000000..cb0e125 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sticky-box/types.ts @@ -0,0 +1,20 @@ +/* + * @Author: weisheng + * @Date: 2024-04-08 22:34:01 + * @LastEditTime: 2024-06-01 16:04:56 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-sticky-box/types.ts + * 记得注释 + */ +import type { ComponentInternalInstance, InjectionKey } from 'vue' + +export type stickyBoxProvide = { + boxStyle: { + height: number // 高度 + width: number // 宽度 + } + observerForChild: (child: ComponentInternalInstance) => void // 监听子组件 +} + +export const STICKY_BOX_KEY: InjectionKey = Symbol('wd-sticky-box') diff --git a/uni_modules/wot-design-uni/components/wd-sticky-box/wd-sticky-box.vue b/uni_modules/wot-design-uni/components/wd-sticky-box/wd-sticky-box.vue new file mode 100644 index 0000000..afdb1bd --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sticky-box/wd-sticky-box.vue @@ -0,0 +1,155 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-sticky/index.scss b/uni_modules/wot-design-uni/components/wd-sticky/index.scss new file mode 100644 index 0000000..36392a0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sticky/index.scss @@ -0,0 +1,9 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(sticky) { + display: inline-block; + @include e(container) { + display: inline-block; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-sticky/types.ts b/uni_modules/wot-design-uni/components/wd-sticky/types.ts new file mode 100644 index 0000000..1b14dcf --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sticky/types.ts @@ -0,0 +1,13 @@ +import { baseProps, makeNumberProp } from '../common/props' + +export const stickyProps = { + ...baseProps, + /** + * 层级 + */ + zIndex: makeNumberProp(1), + /** + * 吸顶距离 + */ + offsetTop: makeNumberProp(0) +} diff --git a/uni_modules/wot-design-uni/components/wd-sticky/wd-sticky.vue b/uni_modules/wot-design-uni/components/wd-sticky/wd-sticky.vue new file mode 100644 index 0000000..8b5e0d9 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-sticky/wd-sticky.vue @@ -0,0 +1,190 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-swipe-action/index.scss b/uni_modules/wot-design-uni/components/wd-swipe-action/index.scss new file mode 100644 index 0000000..5310e70 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swipe-action/index.scss @@ -0,0 +1,22 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(swipe-action) { + position: relative; + overflow: hidden; + @include e(left) { + left: 0; + transform: translate3d(-100%, 0, 0); + } + @include e(right) { + right: 0; + transform: translate3d(100%, 0, 0); + } +} + +.wd-swipe-action__left, +.wd-swipe-action__right { + position: absolute; + top: 0; + height: 100%; +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-swipe-action/types.ts b/uni_modules/wot-design-uni/components/wd-swipe-action/types.ts new file mode 100644 index 0000000..dc828f1 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swipe-action/types.ts @@ -0,0 +1,40 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeStringProp } from '../common/props' + +export type SwipeActionStatus = 'left' | 'close' | 'right' + +// 点击关闭按钮、滑动关闭按钮、通过控制value关闭按钮 +export type SwipeActionReason = 'click' | 'swipe' | 'value' + +export type SwipeActionPosition = SwipeActionStatus | 'inside' + +export type SwipeActionBeforeClose = (reason: SwipeActionReason, position: SwipeActionPosition) => void + +export const swipeActionProps = { + ...baseProps, + + /** + * 滑动按钮的状态,使用v-model进行双向绑定。 + * 可选值为:'left'(左滑)、'close'(关闭状态)、'right'(右滑)。 + * 类型:string + * 默认值:'close' + */ + modelValue: makeStringProp('close'), + + /** + * 是否禁用滑动操作。 + * 类型:boolean + * 默认值:false + */ + disabled: makeBooleanProp(false), + + /** + * 在关闭滑动按钮前调用的钩子函数。 + * 可以在此函数中执行一些关闭前的操作,如确认提示等。 + * 类型:function + * 默认值:无 + */ + beforeClose: Function as PropType +} + +export type SwipeActionProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-swipe-action/wd-swipe-action.vue b/uni_modules/wot-design-uni/components/wd-swipe-action/wd-swipe-action.vue new file mode 100644 index 0000000..dcffd6a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swipe-action/wd-swipe-action.vue @@ -0,0 +1,294 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-swiper-nav/index.scss b/uni_modules/wot-design-uni/components/wd-swiper-nav/index.scss new file mode 100644 index 0000000..f7207ca --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swiper-nav/index.scss @@ -0,0 +1,159 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(swiper-nav) { + + @include e(btn) { + @include m(prev, next) { + position: absolute; + top: 50%; + transform: translateY(-50%); + width: $-swiper-nav-btn-size; + height: $-swiper-nav-btn-size; + border-radius: 50%; + background: $-swiper-nav-btn-bg-color; + + &::after { + position: absolute; + left: 50%; + top: 50%; + display: block; + content: ''; + width: 12rpx; + height: 12rpx; + border-color: $-swiper-nav-btn-color; + border-style: solid; + } + } + + @include m(prev) { + left: 30rpx; + + &::after { + margin-left: 4rpx; + border-width: 2rpx 0 0 2rpx; + transform: translate(-50%, -50%) rotateZ(-45deg); + } + } + + @include m(next) { + right: 30rpx; + + &::after { + margin-left: -4rpx; + border-width: 2rpx 2rpx 0 0; + transform: translate(-50%, -50%) rotateZ(45deg); + } + } + } + + @include m(dots, dots-bar) { + display: flex; + flex-direction: row; + } + + @include m(fraction) { + padding: 0 16rpx; + height: $-swiper-nav-fraction-height; + line-height: $-swiper-nav-fraction-height; + border-radius: calc($-swiper-nav-fraction-height / 2); + background: $-swiper-nav-fraction-bg-color; + color: $-swiper-nav-fraction-color; + font-size: $-swiper-nav-fraction-font-size; + } + + + @include e(item) { + @include m(dots, dots-bar) { + width: $-swiper-nav-dot-size; + height: $-swiper-nav-dot-size; + background: $-swiper-nav-dot-color; + border-radius: 50%; + margin: 0 10rpx; + transition: all 0.4s ease-in; + + @include when(vertical) { + margin: 10rpx 0; + } + + @include when(active) { + background-color: $-swiper-nav-dot-active-color; + } + } + + @include m(dots-bar) { + + @include when(vertical) { + @include when(active) { + width: $-swiper-nav-dot-size; + height: $-swiper-nav-dots-bar-active-width; + } + } + + @include when(active) { + width: $-swiper-nav-dots-bar-active-width; + border-radius: calc($-swiper-nav-dot-size / 2); + background-color: $-swiper-nav-dot-active-color; + } + } + + } + + + @include m(left) { + position: absolute; + left: 24rpx; + top: 50%; + transform: translateY(-50%); + } + + @include m(right) { + position: absolute; + right: 24rpx; + top: 50%; + transform: translateY(-50%); + } + + @include m(top-left) { + position: absolute; + top: 24rpx; + left: 24rpx; + } + + @include m(top) { + position: absolute; + left: 50%; + top: 24rpx; + transform: translateX(-50%); + } + + @include m(top-right) { + position: absolute; + top: 24rpx; + right: 24rpx; + } + + @include m(bottom-left) { + position: absolute; + left: 24rpx; + bottom: 24rpx; + } + + @include m(bottom) { + position: absolute; + left: 50%; + bottom: 24rpx; + transform: translateX(-50%); + } + + @include m(bottom-right) { + position: absolute; + right: 24rpx; + bottom: 24rpx; + } + + @include m(vertical) { + flex-direction: column; + } + +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-swiper-nav/types.ts b/uni_modules/wot-design-uni/components/wd-swiper-nav/types.ts new file mode 100644 index 0000000..9ed1909 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swiper-nav/types.ts @@ -0,0 +1,42 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeStringProp } from '../common/props' +import type { DirectionType, IndicatorPositionType } from '../wd-swiper/types' + +/** + * 指示器类型,点状(dots)、点条状(dots-bar)、分式(fraction)等 + */ +export type SwiperIndicatorType = 'dots' | 'dots-bar' | 'fraction' + +export const swiperNavprops = { + ...baseProps, + /** + * 当前轮播在哪一项(下标) + */ + current: makeNumberProp(0), + /** + * 轮播滑动方向,包括横向滑动和纵向滑动两个方向 + */ + direction: makeStringProp('horizontal'), + /** + * 小于这个数字不会显示导航器 + */ + minShowNum: makeNumberProp(2), + /** + * 指示器位置 + */ + indicatorPosition: makeStringProp('bottom'), + /** + * 是否显示两侧的控制按钮 + */ + showControls: makeBooleanProp(false), + /** + * 总共的项数 + */ + total: makeNumberProp(0), + /** + * 指示器类型,点状(dots)、点条状(dots-bar)、分式(fraction)等 + */ + type: makeStringProp('dots') +} + +export type SwiperNavProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-swiper-nav/wd-swiper-nav.vue b/uni_modules/wot-design-uni/components/wd-swiper-nav/wd-swiper-nav.vue new file mode 100644 index 0000000..f7dcc2b --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swiper-nav/wd-swiper-nav.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-swiper/index.scss b/uni_modules/wot-design-uni/components/wd-swiper/index.scss new file mode 100644 index 0000000..132d635 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swiper/index.scss @@ -0,0 +1,53 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(swiper) { + position: relative; + + @include e(track) { + border-radius: $-swiper-radius; + overflow: hidden; + transform: translateY(0); + } + + @include e(item) { + display: flex; + align-items: center; + box-sizing: border-box; + padding: $-swiper-item-padding; + + @include m(slot) { + // 问题来自 https://github.com/dcloudio/uni-app/issues/4629,支付宝小程序不支持属性选择器 + /* #ifdef MP */ + :deep() { + /* #ifdef MP-WEIXIN */ + view:not([class]) { + width: 100%; + height: 100%; + } + /* #endif */ + /* #ifndef MP-WEIXIN */ + view { + width: 100%; + height: 100%; + } + /* #endif */ + } + /* #endif */ + } + } + + @include e(image, video) { + width: 100%; + transition: all 0.3s ease; + } + + @include e(text) { + // 随便搞个样式,反正用户还是会覆盖的 + position: absolute; + right: 24rpx; + top: 24rpx; + color: $-swiper-item-text-color; + font-size: $-swiper-item-text-fs; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-swiper/types.ts b/uni_modules/wot-design-uni/components/wd-swiper/types.ts new file mode 100644 index 0000000..f37fcc5 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swiper/types.ts @@ -0,0 +1,264 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' +import type { SwiperNavProps } from '../wd-swiper-nav/types' +import type { ImageMode } from '../wd-img/types' + +/** + * 轮播滑动方向 + */ +export type DirectionType = 'horizontal' | 'vertical' + +/** + * 切换动画 + */ +export type EasingType = 'default' | 'linear' | 'easeInCubic' | 'easeOutCubic' | 'easeInOutCubic' + +/** + * 指示器位置 + */ +export type IndicatorPositionType = 'left' | 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right' | 'right' + +/** + * first:第一个滑块。 + * current:实时的当前滑块。 + * highest:高度最大的滑块。 + * none:不根据滑块调整高度,容器高度取决于自身样式。 + */ +export type AdjustHeightType = 'first' | 'current' | 'highest' | 'none' + +// 资源类型 +export type SwiperItemType = 'image' | 'video' + +export interface SwiperList { + [key: string]: any + // 图片、视频等资源地址 + value?: string + // 视频资源的封面 + poster?: string + // 资源文件类型,可选值:'image' | 'video' + type?: SwiperItemType +} + +export const swiperProps = { + ...baseProps, + + /** + * 是否自动播放轮播图 + * 类型:boolean + * 默认值:true + */ + autoplay: makeBooleanProp(true), + + /** + * 当前轮播在哪一项(下标) + * 类型:number + * 默认值:0 + */ + current: makeNumberProp(0), + + /** + * 轮播滑动方向,可选值:'horizontal'(水平)或'vertical'(垂直) + * 类型:string + * 默认值:'horizontal' + */ + direction: makeStringProp('horizontal'), + + /** + * 同时显示的滑块数量 + * 类型:number + * 默认值:1 + */ + displayMultipleItems: makeNumberProp(1), + + /** + * 滑动动画时长,单位为毫秒 + * 类型:number + * 默认值:300 + */ + duration: makeNumberProp(300), + + /** + * 指定 swiper 切换缓动动画类型 + * 类型:string + * 默认值:'default' + */ + easingFunction: makeStringProp('default'), + + /** + * 轮播的高度 + * 类型:number 或 string(数字或可转换为数字的字符串) + * 默认值:'192' + */ + height: makeNumericProp('192'), + + /** + * 轮播间隔时间,单位为毫秒 + * 类型:number + * 默认值:5000 + */ + interval: makeNumberProp(5000), + + /** + * 图片列表,可以是一个图片对象数组或字符串数组 + * 类型:array + * 默认值:空数组 + */ + list: { + type: Array as PropType, + default: () => [] + }, + + /** + * 是否循环播放轮播图 + * 类型:boolean + * 默认值:true + */ + loop: makeBooleanProp(true), + + /** + * 视频是否循环播放 + * 类型:boolean + * 默认值:true + */ + videoLoop: makeBooleanProp(true), + + /** + * 视频是否静音播放 + * 类型:boolean + * 默认值:true + */ + muted: makeBooleanProp(true), + + /** + * 后边距 + * 类型:number 或 string(数字或可转换为数字的字符串) + * 默认值:'0' + */ + nextMargin: makeNumericProp('0'), + + /** + * 页码信息展示位置,可选值:'left' | 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right' | 'right' + * 类型:string + * 默认值:'bottom' + */ + indicatorPosition: makeStringProp('bottom'), + /** + * 前边距 + * 类型:number 或 string(数字或可转换为数字的字符串) + * 默认值:'0' + */ + previousMargin: makeNumericProp('0'), + /** + * 是否应用边距到第一个、最后一个元素 + * 类型:boolean + * 默认值:false + */ + snapToEdge: makeBooleanProp(false), + /** + * 指示器全部配置,可以是布尔值或指示器配置对象 + * 类型:boolean 或 object + * 默认值:true + */ + indicator: { + type: [Boolean, Object] as PropType>, + default: true + }, + + /** + * 图片裁剪、缩放的模式 + * 类型:string + * 默认值:'aspectFill' + */ + imageMode: makeStringProp('aspectFill'), + /** + * 选项对象中,value 对应的 key + */ + valueKey: makeStringProp('value'), + /** + * 选项对象中,标题 text 对应的 key + */ + textKey: makeStringProp('text'), + /** + * 视频是否自动播放 + * 类型:boolean + * 默认值:true + */ + autoplayVideo: makeBooleanProp(true), + /** + * 切换轮播项时是否停止上一个视频的播放 + * 类型:boolean + * 默认值:true + */ + stopPreviousVideo: makeBooleanProp(true), + /** + * 视频播放时是否停止自动轮播 + * 类型:boolean + * 默认值:false + */ + stopAutoplayWhenVideoPlay: makeBooleanProp(false), + /** + * 自动以指定滑块的高度为整个容器的高度。当 vertical 为 true 时,默认不调整 + * 仅支付宝小程序支持 + * 类型:'first' | 'current' | 'highest' | 'none' + * 默认值:false + */ + adjustHeight: makeStringProp('highest'), + /** + * vertical 为 true 时强制使 adjust-height 生效。 + * 仅支付宝小程序支持 + * 类型:boolean + * 默认值:false + */ + adjustVerticalHeight: makeBooleanProp(false), + /** + * 自定义指示器类名 + * 类型:string + */ + customIndicatorClass: makeStringProp(''), + + /** + * 自定义图片类名 + * 类型:string + */ + customImageClass: makeStringProp(''), + + /** + * 自定义上一个图片类名 + * 类型:string + */ + customPrevImageClass: makeStringProp(''), + + /** + * 自定义下一个图片类名 + * 类型:string + */ + customNextImageClass: makeStringProp(''), + + /** + * 自定义swiper子项类名 + * 类型:string + */ + customItemClass: makeStringProp(''), + /** + * 自定义上一个子项类名 + * 类型:string + */ + customPrevClass: makeStringProp(''), + /** + * 自定义下一个子项类名 + * 类型:string + */ + customNextClass: makeStringProp(''), + /** + * 自定义文字标题类名 + * 类型:string + */ + customTextClass: makeStringProp(''), + /** + * 自定义文字标题样式 + * 类型:string + */ + customTextStyle: makeStringProp('') +} + +export type SwiperProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-swiper/wd-swiper.vue b/uni_modules/wot-design-uni/components/wd-swiper/wd-swiper.vue new file mode 100644 index 0000000..7d60a0a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-swiper/wd-swiper.vue @@ -0,0 +1,318 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-switch/index.scss b/uni_modules/wot-design-uni/components/wd-switch/index.scss new file mode 100644 index 0000000..6facd99 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-switch/index.scss @@ -0,0 +1,58 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@include b(switch) { + display: inline-block; + position: relative; + width: $-switch-width; + height: $-switch-height; + border-radius: $-switch-circle-size; + background: $-switch-inactive-color; + font-size: $-switch-size; + transition: all .3s; + + @include e(checkbox) { + position: absolute; + width: 0; + height: 0; + opacity: 0; + margin: 0; + } + @include e(circle) { + box-sizing: border-box; + position: absolute; + display: inline-block; + width: $-switch-circle-size; + height: $-switch-circle-size; + top: 2px; + left: 2px; + background: #fff; + border-radius: 50%; + transition: left .3s ease-out; + box-shadow: 0 2px 4px 0 $-switch-inactive-shadow-color; + + &::after { + position: absolute; + content: ''; + width: calc(200% - 2px); + height: calc(200% - 2px); + top: 50%; + left: 50%; + transform: translate(-50%, -50%) scale(0.5); + border: 1px solid $-switch-border-color; + border-radius: 50%; + } + } + @include when(checked) { + background: $-switch-active-color; + border-color: $-switch-active-color; + + .wd-switch__circle { + left: calc($-switch-width - $-switch-circle-size - 2px); + box-shadow: 0 2px 4px 0 $-switch-active-shadow-color + } + } + @include when(disabled) { + opacity: 0.5; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-switch/types.ts b/uni_modules/wot-design-uni/components/wd-switch/types.ts new file mode 100644 index 0000000..ad38038 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-switch/types.ts @@ -0,0 +1,58 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, numericProp } from '../common/props' + +export type SwitchBeforeChangeOption = { + value: number | string | boolean + resolve: (pass: boolean) => void +} + +export type SwitchBeforeChange = (option: SwitchBeforeChangeOption) => void + +export const switchProps = { + ...baseProps, + /** + * 绑定值 + */ + modelValue: { + type: [Boolean, String, Number], + required: true, + default: false + }, + /** + * 是否禁用 + */ + disabled: makeBooleanProp(false), + /** + * 激活值 + */ + activeValue: { + type: [Boolean, String, Number], + default: true + }, + /** + * 非激活值 + */ + inactiveValue: { + type: [Boolean, String, Number], + default: false + }, + /** + * 激活颜色 + */ + activeColor: String, + /** + * 非激活颜色 + */ + inactiveColor: String, + /** + * 大小 + */ + size: { + type: numericProp + }, + /** + * 在改变前执行的函数 + */ + beforeChange: Function as PropType +} +export type SwitchProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-switch/wd-switch.vue b/uni_modules/wot-design-uni/components/wd-switch/wd-switch.vue new file mode 100644 index 0000000..3e8e0d7 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-switch/wd-switch.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-tab/index.scss b/uni_modules/wot-design-uni/components/wd-tab/index.scss new file mode 100644 index 0000000..671d2f0 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tab/index.scss @@ -0,0 +1,16 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + + +@include b(tab) { + width: 100%; + flex-shrink: 0; + box-sizing: border-box; + + @include e(body) { + @include m(inactive) { + height: 0; + transition: height 0.3s ease-in-out; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-tab/types.ts b/uni_modules/wot-design-uni/components/wd-tab/types.ts new file mode 100644 index 0000000..26fde38 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tab/types.ts @@ -0,0 +1,30 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeBooleanProp, numericProp } from '../common/props' +import type { BadgeProps } from '../wd-badge/types' + +export const tabProps = { + ...baseProps, + /** + * 唯一标识符 + */ + name: numericProp, + /** + * tab的标题 + */ + title: String, + /** + * 是否禁用,无法点击 + */ + disabled: makeBooleanProp(false), + /** + * 是否懒加载,切换到该tab时才加载内容 + * @default true + */ + lazy: makeBooleanProp(true), + /** + * 徽标属性,透传给 Badge 组件 + */ + badgeProps: Object as PropType> +} + +export type TabProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-tab/wd-tab.vue b/uni_modules/wot-design-uni/components/wd-tab/wd-tab.vue new file mode 100644 index 0000000..ccfee6e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tab/wd-tab.vue @@ -0,0 +1,88 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-tabbar-item/index.scss b/uni_modules/wot-design-uni/components/wd-tabbar-item/index.scss new file mode 100644 index 0000000..f4958b9 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabbar-item/index.scss @@ -0,0 +1,55 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(tabbar-item) { + @include e(body) { + :deep(){ + @include when(inactive) { + color: $-dark-color-gray; + } + } + } + } +} + + +@include b(tabbar-item) { + flex: 1; + text-align: center; + text-decoration: none; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + + @include e(body) { + display: flex; + align-items: center; + flex-direction: column; + line-height: 1; + padding: 0; + position: relative; + + :deep(){ + @include when(active) { + color: $-tabbar-active-color; + } + + @include when(inactive) { + color: $-tabbar-inactive-color; + } + } + } + + + @include e(body-title) { + font-size: $-tabbar-item-title-font-size; + line-height: $-tabbar-item-title-line-height; + } + + @include edeep(body-icon) { + font-size: $-tabbar-item-icon-size; + } + +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-tabbar-item/types.ts b/uni_modules/wot-design-uni/components/wd-tabbar-item/types.ts new file mode 100644 index 0000000..f620eda --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabbar-item/types.ts @@ -0,0 +1,51 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeNumberProp, numericProp } from '../common/props' +import type { BadgeProps } from '../wd-badge/types' + +/** + * 折叠面板子项 + */ +export interface TabbarItem { + // 唯一标识 + name: string | number +} + +export const tabbarItemProps = { + ...baseProps, + /** + * 标签页的标题 + */ + title: String, + /** + * 唯一标识符 + */ + name: numericProp, + /** + * 图标 + */ + icon: String, + /** + * 徽标显示值 + */ + value: { + type: [Number, String, null] as PropType, + default: null + }, + /** + * 是否点状徽标 + */ + isDot: { + type: Boolean, + default: undefined + }, + /** + * 徽标最大值 + */ + max: Number, + /** + * 徽标属性,透传给 Badge 组件 + */ + badgeProps: Object as PropType +} + +export type TabbarItemProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue b/uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue new file mode 100644 index 0000000..e14f9ba --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabbar-item/wd-tabbar-item.vue @@ -0,0 +1,99 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-tabbar/index.scss b/uni_modules/wot-design-uni/components/wd-tabbar/index.scss new file mode 100644 index 0000000..aa54b07 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabbar/index.scss @@ -0,0 +1,62 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(tabbar) { + background: $-dark-background; + } +} + +@include b(tabbar) { + display: flex; + align-items: center; + flex-wrap: nowrap; + position: relative; + background: $-color-white; + height: $-tabbar-height; + + @include e(placeholder) { + box-sizing: content-box; + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + } + + @include m(round) { + margin-left: 32rpx; + margin-right: 32rpx; + border-radius: 999px; + box-shadow: $-tabbar-box-shadow; + + @include when(fixed) { + @include when(safe) { + bottom: constant(safe-area-inset-bottom); + bottom: env(safe-area-inset-bottom); + } + } + + } + + @include m(default) { + + @include when(fixed) { + @include when(safe) { + box-sizing: content-box; + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + } + } + + + @include when(border) { + @include halfPixelBorder('top'); + } + } + + @include when(fixed) { + position: fixed; + left: 0; + bottom: 0; + right: 0; + z-index: 500; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-tabbar/types.ts b/uni_modules/wot-design-uni/components/wd-tabbar/types.ts new file mode 100644 index 0000000..d3fb28a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabbar/types.ts @@ -0,0 +1,73 @@ +import { type ExtractPropTypes, type InjectionKey } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' +import type { TabbarItem } from '../wd-tabbar-item/types' + +type TabbarShape = 'default' | 'round' + +export type TabbarProvide = { + props: { + // 选中标签的索引值或者名称 + modelValue?: number | string + // 是否固定在底部 + fixed?: boolean + // 是否设置底部安全距离(iphone X 类型的机型) + safeAreaInsetBottom?: boolean + // 是否显示顶部边框 + bordered?: boolean + // 标签栏的形状。可选项:default/round + shape?: TabbarShape + // 激活标签的颜色 + activeColor?: string + // 未激活标签的颜色 + inactiveColor?: string + // 固定在底部时,是否在标签位置生成一个等高的占位元素 + placeholder?: boolean + // 自定义组件的层级 + zIndex?: number + } + setChange: (child: TabbarItem) => void +} + +export const TABBAR_KEY: InjectionKey = Symbol('wd-tabbar') + +export const tabbarProps = { + ...baseProps, + /** + * 选中标签的索引值或者名称 + */ + modelValue: makeNumericProp(0), + /** + * 是否固定在底部 + */ + fixed: makeBooleanProp(false), + /** + * 是否显示顶部边框 + */ + bordered: makeBooleanProp(true), + /** + * 是否设置底部安全距离(iPhone X 类型的机型) + */ + safeAreaInsetBottom: makeBooleanProp(false), + /** + * 标签栏的形状。可选项:default/round + */ + shape: makeStringProp('default'), + /** + * 激活标签的颜色 + */ + activeColor: String, + /** + * 未激活标签的颜色 + */ + inactiveColor: String, + /** + * 固定在底部时,是否在标签位置生成一个等高的占位元素 + */ + placeholder: makeBooleanProp(false), + /** + * 自定义组件的层级 + */ + zIndex: makeNumberProp(99) +} + +export type TabbarProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-tabbar/wd-tabbar.vue b/uni_modules/wot-design-uni/components/wd-tabbar/wd-tabbar.vue new file mode 100644 index 0000000..85a42ee --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabbar/wd-tabbar.vue @@ -0,0 +1,91 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-table-col/index.scss b/uni_modules/wot-design-uni/components/wd-table-col/index.scss new file mode 100644 index 0000000..d1d1f35 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-table-col/index.scss @@ -0,0 +1,46 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@import '../wd-table/index'; + +.wot-theme-dark { + @include b(table-col) { + @include when(shadow) { + &::after { + background: linear-gradient(270deg, rgba(17, 17, 17, 0.2) 0%, rgba(0, 0, 0, 0) 100%); + } + } + } +} + + +@include b(table-col) { + .wd-table__cell { + width: 100%; + } + + @include m(fixed) { + position: sticky; + z-index: 1; + left: 0; + } + + @include when(shadow) { + &::after { + content: ' '; + position: absolute; + height: 100%; + right: -30rpx; + top: 0; + width: 30rpx; + height: 100%; + background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.04) 100%); + } + } + + .wd-table__cell:last-child { + @include when(border) { + border-bottom: none; + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-table-col/types.ts b/uni_modules/wot-design-uni/components/wd-table-col/types.ts new file mode 100644 index 0000000..4f067aa --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-table-col/types.ts @@ -0,0 +1,54 @@ +import type { ComponentPublicInstance, ExtractPropTypes } from 'vue' +import { makeBooleanProp, makeNumericProp, makeRequiredProp, makeStringProp } from '../common/props' + +export type AlignType = 'left' | 'center' | 'right' // 列的对齐方式 + +export type SortDirection = 0 | 1 | -1 // 列的排序方向 + +export interface TableColumn { + // 列对应字段 + prop: string + // 列对应字段标题 + label: string + // 列宽度 + width: string | number + // 是否开启列排序 + sortable?: boolean + // 列的对齐方式,可选值left,center,right + align?: AlignType + // 列的排序方向 + sortDirection: SortDirection + // 是否i固定列 + fixed?: boolean +} + +export const tableColumnProps = { + /** + * 列对应字段 + */ + prop: makeRequiredProp(String), + /** + * 列对应字段标题 + */ + label: makeRequiredProp(String), + /** + * 列宽度,单位px + */ + width: makeNumericProp(100), + /** + * 是否开启列排序 + */ + sortable: makeBooleanProp(false), + /** + * 是否固定本列 + */ + fixed: makeBooleanProp(false), + /** + * 列的对齐方式,可选值left,center,right + */ + align: makeStringProp('left') +} + +export type TableColumnProps = ExtractPropTypes + +export type TableColumnInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-table-col/wd-table-col.vue b/uni_modules/wot-design-uni/components/wd-table-col/wd-table-col.vue new file mode 100644 index 0000000..41abb8e --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-table-col/wd-table-col.vue @@ -0,0 +1,149 @@ + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-table/index.scss b/uni_modules/wot-design-uni/components/wd-table/index.scss new file mode 100644 index 0000000..f751026 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-table/index.scss @@ -0,0 +1,163 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +.wot-theme-dark { + @include b(table) { + background: $-dark-background; + + @include when(border) { + border: 1px solid $-dark-border-color; + } + + @include e(cell) { + color: $-dark-color; + background: $-dark-background2; + + @include when(stripe) { + background: $-dark-background4; + } + + @include when(border) { + border-right: 1px solid $-dark-border-color; + border-bottom: 1px solid $-dark-border-color; + } + + @include when(shadow) { + &::after { + background: linear-gradient(270deg, rgba(17, 17, 17, 0.2) 0%, rgba(0, 0, 0, 0) 100%); + } + } + } + } +} + + + +@include b(table) { + position: relative; + width: 100%; + overflow: auto; + background: $-table-bg; + + @include when(border) { + border: 1px solid $-table-border-color; + } + + :deep() { + .wd-table-col:last-child { + .wd-table__cell { + @include when(border) { + border-right: none; + } + } + } + } + + @include e(header) { + width: 100%; + height: 50px; + position: sticky; + top: 0; + z-index: 2; + display: flex; + overflow-x: auto; + white-space: nowrap; + } + + @include e(body) { + width: 100%; + box-sizing: border-box; + } + + @include e(content) { + display: flex; + + @include m(header) { + position: sticky; + top: 0; + z-index: 2 + } + } + + @include e(cell) { + display: flex; + align-items: center; + box-sizing: border-box; + background: $-table-bg; + width: 100px; + min-height: 50px; + padding: 8px 10px; + font-size: $-table-font-size; + color: $-table-color; + --wot-sort-button-height: 30px; + + @include when(border) { + border-right: 1px solid $-table-border-color; + border-bottom: 1px solid $-table-border-color; + } + + @include when(stripe) { + background: $-table-stripe-bg; + } + + @include when(fixed) { + position: sticky; + z-index: 1; + left: 0; + } + + @include when(shadow) { + &::after { + content: ' '; + position: absolute; + height: 100%; + right: -30rpx; + top: 0; + width: 30rpx; + height: 100%; + background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.04) 100%); + } + } + + @include when(left) { + justify-content: flex-start; + } + + @include when(center) { + justify-content: center; + } + + @include when(right) { + justify-content: flex-end; + } + } + + @include e(wrapper) { + width: 100%; + overflow: auto; + } + + @include e(inner) { + display: flex; + flex-direction: column; + } + + @include e(header-row) { + display: flex; + flex-direction: row; + width: 100%; + } + + @include e(body) { + display: flex; + width: 100%; + } + + @include e(value) { + white-space: normal; + @include when(ellipsis) { + word-break: break-all; + @include multiEllipsis(2); + } + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-table/types.ts b/uni_modules/wot-design-uni/components/wd-table/types.ts new file mode 100644 index 0000000..f09d875 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-table/types.ts @@ -0,0 +1,67 @@ +/* + * @Author: weisheng + * @Date: 2024-03-15 11:36:12 + * @LastEditTime: 2024-12-08 23:22:26 + * @LastEditors: weisheng + * @Description: + * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-table/types.ts + * 记得注释 + */ +import type { CSSProperties, ExtractPropTypes, InjectionKey } from 'vue' +import { baseProps, makeBooleanProp, makeNumericProp, makeRequiredProp, numericProp } from '../common/props' +import type { TableColumnProps } from '../wd-table-col/types' +import type { PropType } from 'vue' + +export const tableProps = { + ...baseProps, + /** + * 显示的数据 + */ + data: makeRequiredProp(Array>), + /** + * 是否带有边框 + */ + border: makeBooleanProp(true), + /** + * 是否为斑马纹 table + */ + stripe: makeBooleanProp(true), + /** + * Table 的高度 + */ + height: numericProp, + /** + * 行高 + */ + rowHeight: makeNumericProp(50), + /** + * 是否显示表头 + */ + showHeader: makeBooleanProp(true), + /** + * 是否超出2行隐藏 + */ + ellipsis: makeBooleanProp(true), + /** + * 是否显示索引列 + */ + index: { + type: [Object, Boolean] as PropType, 'prop'>>, + default: false + }, + fixedHeader: makeBooleanProp(true) +} + +export type TableProps = ExtractPropTypes + +export type TableProvide = { + props: Omit + state: { + scrollLeft: number + } + rowClick: (index: number) => void + getIsLastFixed: (column: { fixed: boolean; prop: string }) => boolean + getFixedStyle: (index: number, style: CSSProperties) => CSSProperties +} + +export const TABLE_KEY: InjectionKey = Symbol('wd-table') diff --git a/uni_modules/wot-design-uni/components/wd-table/wd-table.vue b/uni_modules/wot-design-uni/components/wd-table/wd-table.vue new file mode 100644 index 0000000..123d402 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-table/wd-table.vue @@ -0,0 +1,284 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-tabs/index.scss b/uni_modules/wot-design-uni/components/wd-tabs/index.scss new file mode 100644 index 0000000..54e0295 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabs/index.scss @@ -0,0 +1,299 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + + +.wot-theme-dark { + @include b(tabs) { + background: $-dark-background2; + + @include e(nav) { + background: $-dark-background2; + } + + @include e(nav-item) { + color: $-dark-color3; + + @include when(active) { + font-weight: 600; + color: $-dark-color; + } + + @include when(disabled) { + color: $-dark-color-gray; + } + + } + + @include e(map-nav-btn) { + background-color: $-dark-background4; + color: $-dark-color3; + + @include when(active) { + color: $-dark-color; + border: 1px solid $-tabs-nav-active-color; + background-color: $-dark-background; + } + + @include when(disabled) { + color: $-dark-color-gray; + border-color: #f4f4f4; + } + } + + @include e(map-btn) { + background: $-dark-background2; + color: $-dark-color3; + } + + @include e(map-header) { + background: $-dark-background2; + color: $-dark-color; + + &::after { + background: $-dark-background4; + } + } + + @include e(map-body) { + background: $-dark-background2; + } + + } +} + +@include b(tabs) { + position: relative; + background: #fff; + width: 100%; + + @include e(nav) { + left: 0; + right: 0; + height: $-tabs-nav-height; + background-color: #fff; + width: 100%; + position: relative; + + @include m(wrap) { + height: 100%; + overflow: hidden; + } + + @include m(sticky) { + width: 100vw; + } + } + + @include e(nav-container) { + position: relative; + display: flex; + user-select: none; + } + + @include e(nav-item) { + position: relative; + display: flex; + align-items: center; + justify-content: center; + flex: 1; + min-width: 0; + height: $-tabs-nav-height; + font-size: $-tabs-nav-fs; + color: $-tabs-nav-color; + transition: color .3s; + + @include when(active) { + font-weight: 600; + } + + @include when(disabled) { + color: $-tabs-nav-disabled-color; + } + } + + @include e(nav-item-text) { + @include lineEllipsis(); + } + + @include edeep(nav-item-badge){ + display: flex; + align-items: center; + justify-content: center; + max-width: 100%; + min-width: 0; + } + + @include e(line) { + position: absolute; + bottom: 4px; + left: 0; + z-index: 1; + height: $-tabs-nav-line-height; + width: $-tabs-nav-line-width; + background: $-tabs-nav-line-bg-color; + border-radius: calc($-tabs-nav-line-height / 2); + + @include m(inner) { + left: 50%; + transform: translateX(-50%) + } + } + + @include e(container) { + overflow: hidden; + } + + @include e(body) { + position: relative; + width: 100%; + height: 100%; + + @include when(animated) { + display: flex; + transition-property: left; + } + } + + @include e(map) { + position: absolute; + top: 0; + left: 0; + right: 0; + z-index: 1; + } + + @include e(map-btn) { + position: absolute; + right: 0; + top: 0; + width: $-tabs-nav-height; + height: $-tabs-nav-height; + line-height: $-tabs-nav-height; + text-align: center; + color: $-tabs-nav-map-arrow-color; + z-index: 1; + background: $-tabs-nav-bg; + -webkit-tap-highlight-color: transparent; + + &::before { + position: absolute; + content: ''; + top: 0; + left: -24px; + width: 24px; + height: $-tabs-nav-height - 1; + background: $-tabs-nav-map-btn-before-bg; + } + } + + @include e(map-arrow) { + display: block; + transition: transform .3s; + + @include when(open) { + transform: rotate(180deg); + } + } + + @include e(map-header) { + position: relative; + padding-left: 17px; + height: $-tabs-nav-height; + line-height: $-tabs-nav-height; + font-size: $-tabs-nav-map-fs; + color: $-tabs-nav-map-color; + transition: opacity .3s; + background: #fff; + opacity: 0; + + @include halfPixelBorder; + + &::after { + z-index: 3; + } + } + + @include e(map-body) { + display: flex; + flex-wrap: wrap; + padding: 20px 15px 10px; + background: #fff; + transition: transform .3s; + transform: scaleY(0); + transform-origin: center top; + + @include when(open) { + transform: scaleY(1); + } + } + + @include e(map-nav-item) { + flex-basis: 33%; + + &:nth-child(3n + 2) { + text-align: center; + } + + &:nth-child(3n + 3) { + text-align: right; + } + } + + @include e(map-nav-btn) { + @include buttonClear; + @include lineEllipsis; + display: inline-block; + width: 107px; + height: 32px; + line-height: 32px; + background-color: $-tabs-nav-map-button-back-color; + border-color: transparent; + margin-bottom: 10px; + border-radius: $-tabs-nav-map-button-radius; + color: $-tabs-nav-map-color; + font-size: $-tabs-nav-map-fs; + text-align: center; + transition: color .3s, border-color .3s; + + @include when(active) { + color: $-tabs-nav-active-color; + border: 1px solid $-tabs-nav-active-color; + background-color: $-tabs-nav-bg + } + + @include when(disabled) { + color: $-tabs-nav-disabled-color; + border-color: #f4f4f4; + } + } + + @include e(mask) { + position: absolute; + top: $-tabs-nav-height; + left: 0; + right: 0; + bottom: 0; + background: $-tabs-nav-map-modal-bg; + opacity: 0; + transition: opacity .3s; + } + + @include when(slide) { + .wd-tabs__nav-item { + flex: 0 0 auto; + padding: 0 17px; + } + } + + @include when(map) { + .wd-tabs__nav--wrap { + padding-right: 40px; + } + } +} + +@media screen and (max-width: 330px) { + .wd-tabs__map-nav-btn { + width: 90px; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-tabs/types.ts b/uni_modules/wot-design-uni/components/wd-tabs/types.ts new file mode 100644 index 0000000..7d4f144 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabs/types.ts @@ -0,0 +1,107 @@ +import { type ComponentPublicInstance, type ExtractPropTypes, type InjectionKey } from 'vue' +import { baseProps, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp, numericProp } from '../common/props' + +export type TabsProvide = { + state: { + activeIndex: number + lineStyle: string // 激活项边框线样式 + inited: boolean // 是否初始化 + animating: boolean // 是否动画中 + mapShow: boolean // map的开关 + scrollLeft: number // scroll-view偏移量 + } + props: Partial +} + +export type TabsSlidable = 'auto' | 'always' + +export const TABS_KEY: InjectionKey = Symbol('wd-tabs') + +export const tabsProps = { + ...baseProps, + /** + * 绑定值 + */ + modelValue: makeNumericProp(0), + /** + * 标签数超过阈值可滑动 + */ + slidableNum: makeNumberProp(6), + /** + * 标签数超过阈值显示导航地图 + */ + mapNum: makeNumberProp(10), + /** + * 导航地图的标题 + */ + mapTitle: String, + /** + * 粘性布局 + */ + sticky: makeBooleanProp(false), + /** + * 粘性布局吸顶位置 + */ + offsetTop: makeNumberProp(0), + /** + * 开启手势滑动 + */ + swipeable: makeBooleanProp(false), + /** + * 自动调整底部条宽度,设置了 lineWidth 后无效 + */ + autoLineWidth: makeBooleanProp(false), + /** + * 底部条宽度,单位像素 + */ + lineWidth: numericProp, + /** + * 底部条高度,单位像素 + */ + lineHeight: numericProp, + /** + * 颜色 + */ + color: makeStringProp(''), + /** + * 非活动状态颜色 + */ + inactiveColor: makeStringProp(''), + /** + * 是否开启切换标签内容时的过渡动画 + */ + animated: makeBooleanProp(false), + /** + * 切换动画过渡时间,单位毫秒 + */ + duration: makeNumberProp(300), + /** + * 是否开启滚动导航 + * 可选值:'auto' | 'always' + * @default auto + */ + slidable: makeStringProp('auto') +} + +export type TabsExpose = { + /** + * 设置激活项 + * @param value 激活值 + * @param init 是否已初始化 + * @param setScroll 是否设置scroll-view滚动 + */ + setActive: (value: number | string, init: boolean, setScroll: boolean) => void + /** + * 使选中项滚动到可视区域 + */ + scrollIntoView: () => void + /** + * 更新激活项边框线样式 + * @param animation 是否开启动画,默认开启 + */ + updateLineStyle: (animation?: boolean) => void +} + +export type TabsProps = ExtractPropTypes + +export type TabsInstance = ComponentPublicInstance diff --git a/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue b/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue new file mode 100644 index 0000000..90646b6 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue @@ -0,0 +1,439 @@ + + + + diff --git a/uni_modules/wot-design-uni/components/wd-tag/index.scss b/uni_modules/wot-design-uni/components/wd-tag/index.scss new file mode 100644 index 0000000..3285d58 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tag/index.scss @@ -0,0 +1,115 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + +@mixin tag-type-style ($normalColor, $normalBg) { + background: $normalBg; + + @include when(plain) { + background: transparent; + color: $normalColor; + border: 1px solid $normalColor; + padding: 0 4px; + } + @include when(round) { + line-height: 1.2; + font-size: $-tag-fs; + padding: 4px 11px; + background: transparent; + color: if($normalColor != $-tag-info-color, $normalColor, $-tag-round-color); + border: 1px solid if($normalColor != $-tag-info-color, $normalColor, $-tag-round-border-color); + border-radius: $-tag-round-radius; + } + @include when(mark) { + padding: 1px 6px; + border-radius: $-tag-mark-radius; + + @include when(plain) { + padding: 0 6px; + } + } + @include when(active) { + color: $-tag-primary-color; + border-color: $-tag-primary-color; + } +} +@include b(tag) { + font-size: $-tag-small-fs; + display: inline-block; + color: $-tag-color; + padding: 0 3px; + border-radius: 2px; + transition: opacity .3s; + vertical-align: middle; + line-height: initial; + + @include when(default) { + @include tag-type-style($-tag-info-color, $-tag-info-bg); + } + @include when(primary) { + @include tag-type-style($-tag-primary-color, $-tag-primary-bg); + } + @include when(danger) { + @include tag-type-style($-tag-danger-color, $-tag-danger-bg); + } + @include when(warning) { + @include tag-type-style($-tag-warning-color, $-tag-warning-bg); + } + @include when(success) { + @include tag-type-style($-tag-success-color, $-tag-success-bg); + } + @include when(icon) { + font-size: $-tag-fs; + line-height: 1.2; + padding: 2px 5px; + } + @include when(dynamic) { + box-sizing: border-box; + width: 88px; + transition: .3s; + + &:active { + color: $-tag-primary-color; + border-color: $-tag-primary-color; + } + } + @include when(dynamic-input) { + border-color: $-tag-primary-color; + } + @include edeep(icon) { + display: inline-block; + margin-right: 4px; + font-size: $-tag-fs; + line-height: 1.2; + vertical-align: baseline; + } + @include e(text) { + display: inline-block; + vertical-align: text-top; + } + @include e(add-text) { + width: 60px; + height: 14px; + min-height: 14px; + display: inline-block; + font-size: $-tag-fs; + vertical-align: middle; + padding: 0; + } + @include e(close) { + display: inline-block; + margin-left: 24px; + margin-right: -4px; + font-size: $-tag-close-size; + height: 14px; + line-height: 1.1; + vertical-align: text-bottom; + color: $-tag-close-color; + + &:active { + color: $-tag-close-active-color; + } + } + @include edeep(add) { + vertical-align: bottom; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-tag/types.ts b/uni_modules/wot-design-uni/components/wd-tag/types.ts new file mode 100644 index 0000000..39cc0e9 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tag/types.ts @@ -0,0 +1,81 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeStringProp } from '../common/props' + +export type TagType = 'default' | 'primary' | 'success' | 'warning' | 'danger' + +export const tagProps = { + ...baseProps, + + /** + * 是否开启图标插槽 + * 类型:boolean + * 默认值:false + */ + useIconSlot: makeBooleanProp(false), + + /** + * 标签类型 + * 类型:string + * 可选值:'default' / 'primary' / 'danger' / 'warning' / 'success' + * 默认值:'default' + */ + type: makeStringProp('default'), + + /** + * 左侧图标 + * 类型:string + * 默认值:空字符串 + */ + icon: makeStringProp(''), + + /** + * 是否可关闭(只对圆角类型支持) + * 类型:boolean + * 默认值:false + */ + closable: makeBooleanProp(false), + + /** + * 幽灵类型 + * 类型:boolean + * 默认值:false + */ + plain: makeBooleanProp(false), + + /** + * 是否为新增标签 + * 类型:boolean + * 默认值:false + */ + dynamic: makeBooleanProp(false), + + /** + * 文字颜色 + * 类型:string + * 默认值:空字符串 + */ + color: makeStringProp(''), + + /** + * 背景色和边框色 + * 类型:string + * 默认值:空字符串 + */ + bgColor: makeStringProp(''), + + /** + * 圆角类型 + * 类型:boolean + * 默认值:false + */ + round: makeBooleanProp(false), + + /** + * 标记类型 + * 类型:boolean + * 默认值:false + */ + mark: makeBooleanProp(false) +} + +export type TagProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-tag/wd-tag.vue b/uni_modules/wot-design-uni/components/wd-tag/wd-tag.vue new file mode 100644 index 0000000..09b8e07 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-tag/wd-tag.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-text/index.scss b/uni_modules/wot-design-uni/components/wd-text/index.scss new file mode 100644 index 0000000..888649d --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-text/index.scss @@ -0,0 +1,37 @@ +@import '../common/abstracts/variable'; +@import '../common/abstracts/mixin'; + + + +@include b(text) { + + @include when(bold) { + font-weight: bold; + } + + @for $i from 1 through 5 { + &.is-lines-#{$i} { + @include multiEllipsis($i); + } + } + + @include when(default) { + color: $-text-info-color; + } + + @include when(primary) { + color: $-text-primary-color; + } + + @include when(error) { + color: $-text-error-color; + } + + @include when(warning) { + color: $-text-warning-color; + } + + @include when(success) { + color: $-text-success-color; + } +} \ No newline at end of file diff --git a/uni_modules/wot-design-uni/components/wd-text/types.ts b/uni_modules/wot-design-uni/components/wd-text/types.ts new file mode 100644 index 0000000..6aacac8 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-text/types.ts @@ -0,0 +1,98 @@ +import type { ExtractPropTypes } from 'vue' +import { baseProps, makeBooleanProp, makeNumericProp, makeStringProp } from '../common/props' + +export type TextType = 'default' | 'primary' | 'success' | 'warning' | 'error' + +export const textProps = { + ...baseProps, + /** + * 主题类型 + * 类型:string + * 可选值:'default' /'primary' / 'error' / 'warning' / 'success' + * 默认值:'default' + */ + type: makeStringProp('default'), + /** + * 文字 + * 类型:string | number + * 默认值:'空字符串' + */ + text: makeNumericProp(''), + /** + * 字体大小 + * 类型:string + * 默认值:'空字符串' + */ + size: makeStringProp(''), + /** + * 文本处理的匹配模式 + * 可选值:'text-普通文本' / 'date - 日期' / 'phone - 手机号' / 'name - 姓名' / 'price - 金额' + * 类型:string + * 默认值:'text' + */ + mode: makeStringProp('text'), + /** + * 文字装饰,下划线,中划线等 + * 可选值:'underline/line-through/overline' + * 类型:string + * 默认值:'none' + */ + decoration: makeStringProp('none'), + + /** + * mode=phone时,点击文本是否拨打电话 + * 类型:boolean + * 默认值:false + */ + call: makeBooleanProp(false), + /** + * 是否粗体,默认normal + * 类型:boolean + * 默认值:false + */ + bold: makeBooleanProp(false), + /** + * 是否脱敏,当mode为phone和name时生效 + * 类型:boolean + * 默认值:false + */ + format: makeBooleanProp(false), + /** + * 文本颜色 + * 类型:string + * 默认值:'' + */ + color: makeStringProp(''), + /** + * 前置插槽 + * 类型:string + * 默认值:'' + */ + prefix: String, + /** + * 后置插槽 + * 类型:string + * 默认值:'' + */ + suffix: String, + /** + * 文本显示的行数,如果设置,超出此行数,将会显示省略号。最大值为5。 + */ + lines: Number, + /** + * 文本行高 + * 类型:string + * 默认值:'' + */ + lineHeight: makeStringProp(''), + /** + * 自定义根节点样式 + */ + customStyle: makeStringProp(''), + /** + * 自定义根节点样式类 + */ + customClass: makeStringProp('') +} + +export type TextProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-text/wd-text.vue b/uni_modules/wot-design-uni/components/wd-text/wd-text.vue new file mode 100644 index 0000000..9af8d45 --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-text/wd-text.vue @@ -0,0 +1,139 @@ + + + + + + + diff --git a/uni_modules/wot-design-uni/components/wd-textarea/index.scss b/uni_modules/wot-design-uni/components/wd-textarea/index.scss new file mode 100644 index 0000000..224c1bd --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-textarea/index.scss @@ -0,0 +1,340 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +.wot-theme-dark { + @include b(textarea) { + background: $-dark-background2; + + &::after { + background: $-dark-color-gray; + } + + @include when(not-empty) { + &:not(.is-disabled) { + &::after { + background-color: $-dark-color; + } + } + } + + @include e(value) { + background: $-dark-background2; + } + + @include e(inner) { + color: $-dark-color; + + &::-webkit-input-placeholder { + color: $-dark-color3; + } + } + + @include e(count) { + color: $-dark-color3; + background: transparent; + } + + @include e(count-current) { + color: $-dark-color; + } + + :deep(.wd-textarea__icon), + :deep(.wd-textarea__clear) { + color: $-dark-color; + background: transparent; + } + + @include when(cell) { + background-color: $-dark-background2; + + @include when(border) { + @include halfPixelBorder("top", $-textarea-cell-padding, $-dark-border-color); + } + } + + @include when(disabled) { + + .wd-textarea__inner { + color: $-dark-color-gray; + background: transparent; + } + } + + + @include e(label) { + color: $-dark-color; + } + } +} + +@include b(textarea) { + position: relative; + -webkit-tap-highlight-color: transparent; + text-align: left; + background: $-textarea-bg; + padding: $-textarea-cell-padding $-textarea-padding; + + &::after { + position: absolute; + display: none; + content: ""; + bottom: 0; + left: 0; + right: 0; + height: 1px; + background: $-textarea-border-color; + transform: scaleY(0.5); + transition: background-color 0.2s ease-in-out; + } + + + + @include e(label) { + position: relative; + display: flex; + width: $-input-cell-label-width; + color: $-cell-title-color; + margin-right: $-cell-padding; + box-sizing: border-box; + font-size: $-textarea-fs; + flex-shrink: 0; + + + } + + @include e(label-inner) { + display: inline-block; + line-height: $-cell-line-height; + font-size: $-textarea-fs; + } + + + + @include e(required) { + font-size: $-cell-required-size; + color: $-cell-required-color; + margin-left: $-cell-required-margin; + + @include m(left) { + margin-left: 0; + margin-right: $-cell-required-margin; + } + } + + @include e(prefix) { + margin-right: $-textarea-icon-margin; + font-size: $-textarea-fs; + line-height: initial; + + :deep(.wd-textarea__icon) { + margin-left: 0; + } + } + + @include e(suffix) { + flex-shrink: 0; + line-height: initial; + } + + @include e(value) { + position: relative; + padding: 0; + font-size: 0; + background: $-textarea-bg; + box-sizing: border-box; + + @include when(show-limit) { + padding-bottom: 36px; + } + + @include when(suffix) { + padding-right: calc($-textarea-icon-size + 8px); + } + } + + + @include e(inner) { + padding: 0; + width: 100%; + font-size: $-textarea-fs; + line-height: $-cell-line-height; + color: $-textarea-color; + outline: none; + background: none; + border: none; + box-sizing: border-box; + word-break: break-word; + min-height: 24px; + + &::-webkit-input-placeholder { + color: $-input-placeholder-color; + } + } + + @include e(suffix) { + position: absolute; + z-index: 1; + right: 0; + top: 0; + bottom: 0; + } + + @include edeep(icon) { + margin-left: $-textarea-icon-margin; + font-size: $-textarea-icon-size; + color: $-textarea-icon-color; + background: $-textarea-bg; + } + + @include edeep(clear) { + margin-left: $-textarea-icon-margin; + font-size: $-textarea-icon-size; + color: $-textarea-clear-color; + vertical-align: middle; + background: $-textarea-bg; + line-height: $-cell-line-height; + } + + + @include e(count) { + position: absolute; + bottom: 8px; + right: 0; + font-size: $-textarea-count-fs; + color: $-textarea-count-color; + background: $-textarea-bg; + line-height: 20px; + display: inline-flex; + } + + @include e(count-current) { + color: $-textarea-count-current-color; + + @include when(error) { + color: $-input-error-color; + } + } + + @include e(readonly-mask) { + position: absolute; + top: 0; + left: 0; + z-index: 2; + width: 100%; + height: 100%; + } + + @include e(error-message) { + color: $-form-item-error-message-color; + font-size: $-form-item-error-message-font-size; + line-height: $-form-item-error-message-line-height; + text-align: left; + vertical-align: middle; + } + + @include when(not-empty) { + &:not(.is-disabled) { + &::after { + background-color: $-textarea-not-empty-border-color; + } + } + } + + @include when(disabled) { + + .wd-textarea__inner { + color: $-input-disabled-color; + background: transparent; + } + } + + @include when(error) { + + .wd-textarea__inner { + color: $-input-error-color; + background: transparent; + } + } + + @include when(auto-height) { + &:not(.is-cell) { + padding: 5px 0; + } + + &::after { + display: block; + } + } + + @include when(no-border) { + &::after { + display: none; + } + } + + @include when(cell) { + display: flex; + line-height: $-cell-line-height; + + &.is-error::after { + background: $-textarea-cell-border-color; + } + + .wd-textarea__value { + flex: 1; + } + + :deep(.wd-textarea__icon) { + display: inline-flex; + align-items: center; + height: $-textarea-cell-height; + line-height: $-textarea-cell-height; + } + + .wd-textarea__prefix { + display: inline-block; + margin-right: $-cell-icon-right; + } + + &.wd-textarea::after { + display: none; + } + + .wd-textarea__suffix { + right: 0; + } + + @include when(center) { + align-items: center; + } + + @include when(border) { + @include halfPixelBorder("top", $-textarea-cell-padding); + } + } + + @include when(large) { + padding: $-textarea-cell-padding-large; + + .wd-textarea__prefix { + font-size: $-textarea-fs-large; + } + + .wd-textarea__label-inner { + font-size: $-textarea-fs-large; + } + + .wd-textarea__inner { + font-size: $-textarea-fs-large; + } + + .wd-textarea__count { + font-size: $-textarea-count-fs-large; + } + + :deep(.wd-textarea__icon), + :deep(.wd-textarea__clear) { + font-size: $-textarea-icon-size-large; + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-textarea/placeholder.scss b/uni_modules/wot-design-uni/components/wd-textarea/placeholder.scss new file mode 100644 index 0000000..8abd57a --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-textarea/placeholder.scss @@ -0,0 +1,20 @@ +@import "../common/abstracts/variable"; +@import "../common/abstracts/mixin"; + +.wot-theme-dark { + @include b(textarea) { + @include e(placeholder) { + color: $-dark-color3; + } + } +} + +@include b(textarea) { + @include e(placeholder) { + color: $-input-placeholder-color; + + &.is-error { + color: $-input-error-color; + } + } +} diff --git a/uni_modules/wot-design-uni/components/wd-textarea/types.ts b/uni_modules/wot-design-uni/components/wd-textarea/types.ts new file mode 100644 index 0000000..603c14f --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-textarea/types.ts @@ -0,0 +1,288 @@ +import type { ExtractPropTypes, PropType } from 'vue' +import { baseProps, makeArrayProp, makeBooleanProp, makeNumberProp, makeNumericProp, makeStringProp } from '../common/props' +import type { FormItemRule } from '../wd-form/types' +import type { InputClearTrigger, InputMode } from '../wd-input/types' + +export type ConfirmType = 'send' | 'search' | 'next' | 'go' | 'done' + +export const textareaProps = { + ...baseProps, + /** + * * 自定义文本域容器class名称。 + * 类型:string + */ + customTextareaContainerClass: makeStringProp(''), + + /** + * * 自定义文本域class名称。 + * 类型:string + */ + customTextareaClass: makeStringProp(''), + + /** + * * 自定义标签class名称。 + * 类型:string + */ + customLabelClass: makeStringProp(''), + // 原生属性 + /** + * * 绑定值。 + * 类型:string | number + */ + modelValue: makeNumericProp(''), + + /** + * * 占位文本。 + * 类型:string + * 默认值:'请输入...' + */ + placeholder: String, + + /** + * 指定placeholder的样式。 + * 类型:string + */ + placeholderStyle: String, + + /** + * * 指定placeholder的样式类。 + * 类型:string + * 默认值:空字符串 + */ + placeholderClass: makeStringProp(''), + + /** + * * 禁用输入框。 + * 类型:boolean + * 默认值:false + */ + disabled: makeBooleanProp(false), + + /** + * * 最大输入长度,设置为-1表示不限制最大长度。 + * 类型:number + * 默认值:-1 + */ + maxlength: makeNumberProp(-1), + + /** + * * 自动聚焦并拉起键盘。 + * 类型:boolean + * 默认值:false + */ + autoFocus: makeBooleanProp(false), + + /** + * * 获取焦点。 + * 类型:boolean + * 默认值:false + */ + focus: makeBooleanProp(false), + + /** + * * 是否自动增高输入框高度,style.height属性在auto-height生效时不生效。 + * 类型:boolean + * 默认值:false + */ + autoHeight: makeBooleanProp(false), + + /** + * * 如果textarea处于position:fixed区域,需要设置此属性为true。 + * 类型:boolean + * 默认值:false + */ + fixed: makeBooleanProp(false), + + /** + * * 指定光标与键盘的距离,取textarea距离底部的距离和cursor-spacing指定的距离的最小值作为实际距离。 + * 类型:number + * 默认值:0 + */ + cursorSpacing: makeNumberProp(0), + + /** + * * 指定focus时的光标位置。 + * 类型:number + * 默认值:-1 + */ + cursor: makeNumberProp(-1), + + /** + * * 设置键盘右下角按钮的文字。 + * 类型:string + * 默认值:'done' + * 可选值有'done', 'go', 'next', 'search', 'send' + */ + confirmType: String as PropType, + + /** + * * 点击键盘右下角按钮时是否保持键盘不收起。 + * 类型:boolean + * 默认值:false + */ + confirmHold: makeBooleanProp(false), + + /** + * * 是否显示键盘上方带有“完成”按钮那一栏。 + * 类型:boolean + * 默认值:true + */ + showConfirmBar: makeBooleanProp(true), + + /** + * * 光标起始位置,自动聚集时有效,需与selection-end搭配使用。 + * 类型:number + * 默认值:-1 + */ + selectionStart: makeNumberProp(-1), + + /** + * * 光标结束位置,自动聚集时有效,需与selection-start搭配使用。 + * 类型:number + * 默认值:-1 + */ + selectionEnd: makeNumberProp(-1), + + /** + * * 键盘弹起时是否自动上推页面。 + * 类型:boolean + * 默认值:true + */ + adjustPosition: makeBooleanProp(true), + + /** + * * 是否去掉iOS下的默认内边距。 + * 类型:boolean + * 默认值:false + */ + disableDefaultPadding: makeBooleanProp(false), + + /** + * * focus状态下点击页面时是否不收起键盘。 + * 类型:boolean + * 默认值:false + */ + holdKeyboard: makeBooleanProp(false), + + // 非原生属性 + /** + * * 显示为密码框。 + * 类型:boolean + * 默认值:false + */ + showPassword: makeBooleanProp(false), + + /** + * * 是否显示清空按钮。 + * 类型:boolean + * 默认值:false + */ + clearable: makeBooleanProp(false), + + /** + * * 输入框只读状态。 + * 类型:boolean + * 默认值:false + */ + readonly: makeBooleanProp(false), + + /** + * * 前置图标,icon组件中的图标类名。 + * 类型:string + */ + prefixIcon: String, + /** + * * 是否显示字数限制,需要同时设置maxlength。 + * 类型:boolean + * 默认值:false + */ + showWordLimit: makeBooleanProp(false), + /** + * 设置左侧标题。 + * 类型:string + */ + label: String, + + /** + * 设置左侧标题宽度。 + * 类型:string + */ + labelWidth: makeStringProp(''), + /** + * * 设置输入框大小。 + * 类型:string + */ + size: String, + + /** + * * 设置输入框错误状态(红色)。 + * 类型:boolean + * 默认值:false + */ + error: makeBooleanProp(false), + + /** + * * 当存在label属性时,设置标题和输入框垂直居中,默认为顶部居中。 + * 类型:boolean + * 默认值:false + */ + center: makeBooleanProp(false), + + /** + * * 非cell类型下是否隐藏下划线。 + * 类型:boolean + * 默认值:false + */ + noBorder: makeBooleanProp(false), + + /** + * * cell类型下必填样式。 + * 类型:boolean + * 默认值:false + */ + required: makeBooleanProp(false), + + /** + * * 表单域model字段名,在使用表单校验功能的情况下,该属性是必填的。 + * 类型:string + */ + prop: makeStringProp(''), + + /** + * * 表单验证规则。 + * 类型:FormItemRule[] + * 默认值:[] + */ + rules: makeArrayProp(), + /** + * 显示清除图标的时机,always 表示输入框不为空时展示,focus 表示输入框聚焦且不为空时展示 + * 类型: "focus" | "always" + * 默认值: "always" + */ + clearTrigger: makeStringProp('always'), + /** + * 是否在点击清除按钮时聚焦输入框 + * 类型: boolean + * 默认值: true + */ + focusWhenClear: makeBooleanProp(true), + /** + * 是否忽略组件内对文本合成系统事件的处理。为 false 时将触发 compositionstart、compositionend、compositionupdate 事件,且在文本合成期间会触发 input 事件 + * 类型: boolean + * 默认值: true + */ + ignoreCompositionEvent: makeBooleanProp(true), + /** + * 它提供了用户在编辑元素或其内容时可能输入的数据类型的提示。在符合条件的高版本webview里,uni-app的web和app-vue平台中可使用本属性。 + * 类型: InputMode + * 可选值: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | "password" + * 默认值: "text" + */ + inputmode: makeStringProp('text'), + /** + * 必填标记位置,可选值:before(标签前)、after(标签后) + */ + markerSide: makeStringProp<'before' | 'after'>('before') +} + +export type TextareaProps = ExtractPropTypes diff --git a/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.vue b/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.vue new file mode 100644 index 0000000..31433ca --- /dev/null +++ b/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.vue @@ -0,0 +1,296 @@ +