This commit is contained in:
Truong Nguyen
2024-07-10 18:08:06 +07:00
parent 5f6e80bbe8
commit f0c4f1f39e
86 changed files with 3228 additions and 624 deletions

18
types/directives.d.ts vendored
View File

@@ -3,21 +3,21 @@ import type { CopyEl, OptimizeOptions, RippleOptions } from "@/directives";
declare module "vue" {
export interface ComponentCustomProperties {
/** `Loading` 动画加载指令,具体看:https://element-plus.org/zh-CN/component/loading.html#%E6%8C%87%E4%BB%A4 */
/** Chỉ thị `Loading` cho hoạt ảnh tải, chi tiết xem tại: https://element-plus.org/en-US/component/loading.html
vLoading: Directive<Element, boolean>;
/** 按钮权限指令 */
/** Chỉ thị quyền nút */
vAuth: Directive<HTMLElement, string | Array<string>>;
/** 文本复制指令(默认双击复制) */
/** Chỉ thị sao chép văn bản (mặc định nhấp đúp để sao chép) */
vCopy: Directive<CopyEl, string>;
/** 长按指令 */
/** Chỉ thị nhấn giữ */
vLongpress: Directive<HTMLElement, Function>;
/** 防抖、节流指令 */
/** Chỉ thị chống rung, tiết lưu */
vOptimize: Directive<HTMLElement, OptimizeOptions>;
/**
* `v-ripple`指令,用法如下:
* 1. `v-ripple`代表启用基本的`ripple`功能
* 2. `v-ripple="{ class: 'text-red' }"`代表自定义`ripple`颜色,支持`tailwindcss`,生效样式是`color`
* 3. `v-ripple.center`代表从中心扩散
* Chỉ thị `v-ripple`, cách sử dụng như sau:
* 1. `v-ripple` để kích hoạt tính năng `ripple` cơ bản
* 2. `v-ripple="{ class: 'text-red' }"` để tùy chỉnh màu `ripple`, hỗ trợ `tailwindcss`, màu hiệu lực là `color`
* 3. `v-ripple.center` để lan tỏa từ trung tâm
*/
vRipple: Directive<HTMLElement, RippleOptions>;
}