Submitted query: {{ requestedKeyword }}
``` - `options.leading` and `trailing` control execution at the start and end of the interval. Debounce also supports `maxWait`. The directive reads the binding on mount. For changing data, read reactive values inside the original callback. - Each bound element has independent timing. Unmounting removes its own listener and queued callback. Change the element's `key` to bind a new interval. - These directives control how often handlers fire. Manage cancellation, concurrency, and idempotency separately for async requests. [Debounce source](https://github.com/XiaoDaiGua-Ray/ray-template/blob/main/packages/directives/src/modules/debounce/index.ts) · [Throttle source](https://github.com/XiaoDaiGua-Ray/ray-template/blob/main/packages/directives/src/modules/throttle/index.ts) ## v-ellipsis `width` is required. Numbers are pixels and strings can be CSS lengths. `type: 'block'` truncates one line. `type: 'line'` uses the `line` count, with one line as the default. `popoverText: true` writes the current text to the native `title`. Styles are written on mount and update. Switching modes or disabling hover text can leave the previous styles or `title`. For frequent changes, use the UI library's ellipsis component or change the node's `key`. ```vueLonger explanatory text is truncated after two lines.
``` [Source](https://github.com/XiaoDaiGua-Ray/ray-template/blob/main/packages/directives/src/modules/ellipsis/index.ts) ## v-ripple Omit the binding or pass `true` to enable, and use `false` to disable. Supply `{ class: '...' }` to style the ripple. `.center` starts it in the center, and `.circle` uses circular geometry. Pointer events draw the visual feedback. The wrapping button owns the interaction semantics. ```vue ``` [Source](https://github.com/XiaoDaiGua-Ray/ray-template/blob/main/packages/directives/src/modules/ripple/index.ts) · [Binding and cleanup](https://github.com/XiaoDaiGua-Ray/ray-template/blob/main/packages/directives/src/modules/ripple/utils.ts) ## v-disabled Native form controls use the Boolean `disabled` attribute. Forms, containers, and custom control roots use `inert`, removing the subtree from keyboard focus and blocking pointer interaction. Set the binding back to `false` to restore interaction. Prefer the component's own `disabled` prop when available. [Source](https://github.com/XiaoDaiGua-Ray/ray-template/blob/main/packages/directives/src/modules/disabled/index.ts) ## Add a directive {#新增指令} Put each directive in its own directory and default-export the factory. Use `CustomDirectiveFC