unika-components 1.1.178 → 1.1.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -120,9 +120,9 @@ declare const _default: import("vue").DefineComponent<{
120
120
  borderColor: string | undefined;
121
121
  borderStyle: string | undefined;
122
122
  borderWidth: string;
123
- boxShadow: import("vue").ComputedRef<string>;
123
+ boxShadow: string;
124
124
  opacity: number;
125
- animation: string | undefined;
125
+ animation: string;
126
126
  }>;
127
127
  handleClick: () => void;
128
128
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "trigger"[], "trigger", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -1,5 +1,6 @@
1
1
  import { WorkData, GlobalData, PageData, PersonalData } from '../../defaultProps';
2
2
  import '../../assets/css/workRenderH5.css';
3
+ import '../../assets/css/animate.css';
3
4
  import { px2rem } from '@/composables/px2rem';
4
5
  declare const _default: import("vue").DefineComponent<{
5
6
  workData: {
@@ -19,6 +20,7 @@ declare const _default: import("vue").DefineComponent<{
19
20
  global: import("vue").ComputedRef<GlobalData>;
20
21
  pages: import("vue").ComputedRef<[] | PageData[]>;
21
22
  currentPageId: import("vue").Ref<string>;
23
+ container: import("vue").Ref<HTMLElement | null>;
22
24
  currentTransition: import("vue").ComputedRef<string>;
23
25
  isScrollMode: import("vue").ComputedRef<boolean>;
24
26
  direction: import("vue").Ref<"down" | "up">;
@@ -27,6 +27,7 @@ import UniMenuTel from './components/UniMenuTel';
27
27
  import UniMenuReceipt from './components/UniMenuReceipt';
28
28
  import UniMenuMap from './components/UniMenuMap';
29
29
  declare const install: (app: App) => void;
30
+ export { applyTextAnimation, applyTextAnimationsForPage, restoreTextAnimation } from './utils/applyTextAnimation';
30
31
  export { UniText, UniImage, UniShape, UniMusic, UniVideo, UniCalendar, UniCountdown, UniMap, UniCall, UniEffect, UniLottie, UniButton, UniBarrage, WorkRenderH5, WorkRenderLong, WorkRender, UniFormInput, UniFormSubmit, UniFormSelect, UniFormSingle, UniFormMultiple, UniFormContainer, UniMenu, UniMenuVideo, UniMenuTel, UniMenuReceipt, UniMenuMap, install };
31
32
  declare const _default: {
32
33
  install: (app: App<any>) => void;
@@ -0,0 +1,43 @@
1
+ /**
2
+ * 应用文字动画 - 用于 WorkRender/H5 等场景
3
+ * 支持整段动画(fadeInUp、fadeInDown 等)和逐字动画
4
+ */
5
+ export interface TextAnimationItem {
6
+ animate: string;
7
+ duration?: number;
8
+ delay?: number;
9
+ count?: number;
10
+ loop?: boolean;
11
+ timing?: string;
12
+ order?: string;
13
+ /** 'text' 文字动画 | 'normal' 通用动画,用于区分应用方式 */
14
+ type?: 'text' | 'normal';
15
+ }
16
+ export interface ElementLike {
17
+ id: string | number;
18
+ textContent?: string;
19
+ type?: string;
20
+ css?: unknown;
21
+ properties?: {
22
+ textAni?: TextAnimationItem[];
23
+ };
24
+ }
25
+ /**
26
+ * 恢复文字元素的原始内容(撤销逐字动画后调用)
27
+ * @param element 元素数据
28
+ * @param rootElement 根元素
29
+ */
30
+ export declare function restoreTextAnimation(element: ElementLike, rootElement?: HTMLElement | Document): void;
31
+ /**
32
+ * 对指定页面的文字元素应用 textAni 动画
33
+ * @param elements 页面元素列表
34
+ * @param rootElement 可选的根元素,用于限定查找范围(如当前页的容器)
35
+ */
36
+ export declare function applyTextAnimationsForPage(elements: ElementLike[], rootElement?: HTMLElement): void;
37
+ /**
38
+ * 对单个文字元素应用 textAni 动画
39
+ * @param element 元素数据
40
+ * @param textAni 动画配置数组
41
+ * @param rootElement 可选的根元素
42
+ */
43
+ export declare function applyTextAnimation(element: ElementLike, textAni: TextAnimationItem[], rootElement?: HTMLElement | Document): void;