{"_id":"@amaoaaaaa/v-text-ellipsis","_rev":"6-fc16b86f73164a0d592a178b0e00eed9","name":"@amaoaaaaa/v-text-ellipsis","dist-tags":{"latest":"0.2.4"},"versions":{"0.1.0":{"name":"@amaoaaaaa/v-text-ellipsis","version":"0.1.0","keywords":["vue3","directive","text-ellipsis"],"author":{"name":"amaoaaaaa"},"license":"MIT","_id":"@amaoaaaaa/v-text-ellipsis@0.1.0","maintainers":[{"name":"amaoaaaaa","email":"z.d.mao@qq.com"}],"homepage":"https://github.com/amaoaaaaa/v-text-ellipsis","bugs":{"url":"https://github.com/amaoaaaaa/v-text-ellipsis/issues"},"dist":{"shasum":"fa99c6901ef895457ce939fefd4a510b83d64211","tarball":"https://registry.npmjs.org/@amaoaaaaa/v-text-ellipsis/-/v-text-ellipsis-0.1.0.tgz","fileCount":6,"integrity":"sha512-mFd0Cqm+iUIhW6ekwzzNsUIgcEf86emOL1FW1jaeiFZ2b/JkK0DC184UPFIPbFn0QUIkxNRtG3JTSWbHyJQUBg==","signatures":[{"sig":"MEYCIQCDAiM1ZGbOYV3f107gUUPTjZTS5kqAZyiAbemQXGU0GQIhAJKw3S0e16jb3D3kH6fe4n4TzJZlWi7McIYg7o8lvtQz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5452},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"619ff6ead598d222388a3242ff3fbf90aabae296","scripts":{"build":"tsc","publish!":"npm publish --access public","publish!:major":"npm run build && npm version major && npm run publish!","publish!:minor":"npm run build && npm version minor && npm run publish!","publish!:patch":"npm run build && npm version patch && npm run publish!"},"_npmUser":{"name":"amaoaaaaa","email":"z.d.mao@qq.com"},"repository":{"url":"git+https://github.com/amaoaaaaa/v-text-ellipsis.git","type":"git"},"_npmVersion":"10.9.2","description":"Vue 3 指令，文本溢出省略号并支持 GSAP 滚动显示全文","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.0.0","gsap":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/v-text-ellipsis_0.1.0_1757582060589_0.6106822214688192","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@amaoaaaaa/v-text-ellipsis","version":"0.2.0","keywords":["vue3","directive","text-ellipsis"],"author":{"name":"amaoaaaaa"},"license":"MIT","_id":"@amaoaaaaa/v-text-ellipsis@0.2.0","maintainers":[{"name":"amaoaaaaa","email":"z.d.mao@qq.com"}],"homepage":"https://github.com/amaoaaaaa/v-text-ellipsis","bugs":{"url":"https://github.com/amaoaaaaa/v-text-ellipsis/issues"},"dist":{"shasum":"7fb841155098e92665bba863880eb1ea6c5a7e5e","tarball":"https://registry.npmjs.org/@amaoaaaaa/v-text-ellipsis/-/v-text-ellipsis-0.2.0.tgz","fileCount":6,"integrity":"sha512-Okynm0tWuMjoovw/iX3HCv4Y6N9NAPsgfQQn6gOMqHFYurHxxZBzEbn2FdTquq/xSqOiQaw5TOvte69y+lTRxQ==","signatures":[{"sig":"MEUCIBzMdcFbBpkALDEdYhNOZRsbBJtPyT5cE/HP9AvCnUPXAiEAsVmeOGt9ztA19PnGQq+iBBMs3Y3r9k+wBVwTX4JxHeA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5672},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"f2b3b82f200181c7c049dd2d9b1d4bb106c93628","scripts":{"build":"tsc","publish!":"npm publish --access public","publish!:major":"npm run build && npm version major && npm run publish!","publish!:minor":"npm run build && npm version minor && npm run publish!","publish!:patch":"npm run build && npm version patch && npm run publish!"},"_npmUser":{"name":"amaoaaaaa","email":"z.d.mao@qq.com"},"deprecated":"此版本有问题，请使用 0.2.1","repository":{"url":"git+https://github.com/amaoaaaaa/v-text-ellipsis.git","type":"git"},"_npmVersion":"10.9.2","description":"Vue 3 指令，文本溢出省略号并支持 GSAP 滚动显示全文","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.0.0","gsap":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/v-text-ellipsis_0.2.0_1757583379907_0.49041868020589474","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@amaoaaaaa/v-text-ellipsis","version":"0.2.1","keywords":["vue3","directive","text-ellipsis"],"author":{"name":"amaoaaaaa"},"license":"MIT","_id":"@amaoaaaaa/v-text-ellipsis@0.2.1","maintainers":[{"name":"amaoaaaaa","email":"z.d.mao@qq.com"}],"homepage":"https://github.com/amaoaaaaa/v-text-ellipsis","bugs":{"url":"https://github.com/amaoaaaaa/v-text-ellipsis/issues"},"dist":{"shasum":"1e15cf85a31bd138e2f54d0695c310351d784cc2","tarball":"https://registry.npmjs.org/@amaoaaaaa/v-text-ellipsis/-/v-text-ellipsis-0.2.1.tgz","fileCount":8,"integrity":"sha512-EhnEa9owqoFgW0uVx4uD8jqiFqUaEcbMJFSMr77dZmJ5lhtLdYHmzVEV1WVWkFwhDdp6DWwYUpgv6BXrSRjVMA==","signatures":[{"sig":"MEQCIH7LkqzxUVbV6M9gl0ylGkJZf0xBFwez190AOJhIaq39AiBA/VisgKVgfzOOSNyAm86I+P6Dg6dPLYgoiXcj1XZWbQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7587},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"af7a0142292d24a535334bba958c9396cde02300","scripts":{"build":"tsc","publish!":"npm publish --access public","publish!:major":"npm run build && npm version major && npm run publish!","publish!:minor":"npm run build && npm version minor && npm run publish!","publish!:patch":"npm run build && npm version patch && npm run publish!"},"_npmUser":{"name":"amaoaaaaa","email":"z.d.mao@qq.com"},"repository":{"url":"git+https://github.com/amaoaaaaa/v-text-ellipsis.git","type":"git"},"_npmVersion":"10.9.2","description":"Vue 3 指令，文本溢出省略号并支持 GSAP 滚动显示全文","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.0.0","gsap":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/v-text-ellipsis_0.2.1_1757583695578_0.6976695921221661","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@amaoaaaaa/v-text-ellipsis","version":"0.2.2","keywords":["vue3","directive","text-ellipsis"],"author":{"name":"amaoaaaaa"},"license":"MIT","_id":"@amaoaaaaa/v-text-ellipsis@0.2.2","maintainers":[{"name":"amaoaaaaa","email":"z.d.mao@qq.com"}],"homepage":"https://github.com/amaoaaaaa/v-text-ellipsis","bugs":{"url":"https://github.com/amaoaaaaa/v-text-ellipsis/issues"},"dist":{"shasum":"90796b015b9d7868d5e3d79d84201e6ae079bc25","tarball":"https://registry.npmjs.org/@amaoaaaaa/v-text-ellipsis/-/v-text-ellipsis-0.2.2.tgz","fileCount":8,"integrity":"sha512-TlbwWUsl6V8wpdoAdI1DoimZXrTO/zWmwHWeKsKb8RJJXsLgE2q3KCwz2xy/KpXo+oQmNz273641vDYzRH9J2w==","signatures":[{"sig":"MEUCIQDk+vHJKHyrvnxkrVS5jZmo7rbj5/mKqrd32NE8EMaH9wIgNio6mPzsKLbmK0rHJ1xHVqyq1pR7P44mBgxLGoEDPNQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8414},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"687c21f84ac10747dcce5ae04f1d1cd3be9f26e5","scripts":{"build":"tsc","publish!":"npm publish --access public","publish!:major":"npm run build && npm version major && npm run publish!","publish!:minor":"npm run build && npm version minor && npm run publish!","publish!:patch":"npm run build && npm version patch && npm run publish!"},"_npmUser":{"name":"amaoaaaaa","email":"z.d.mao@qq.com"},"repository":{"url":"git+https://github.com/amaoaaaaa/v-text-ellipsis.git","type":"git"},"_npmVersion":"10.9.2","description":"Vue 3 指令，文本溢出省略号并支持 GSAP 滚动显示全文","directories":{},"_nodeVersion":"20.18.2","_hasShrinkwrap":false,"peerDependencies":{"vue":"^3.0.0","gsap":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/v-text-ellipsis_0.2.2_1767778458056_0.6113009191369565","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@amaoaaaaa/v-text-ellipsis","version":"0.2.4","description":"Vue 3 指令，文本溢出省略号并支持 GSAP 滚动显示全文","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","publish!":"npm publish --access public","publish!:patch":"npm run build && npm version patch && npm run publish!","publish!:minor":"npm run build && npm version minor && npm run publish!","publish!:major":"npm run build && npm version major && npm run publish!"},"keywords":["vue3","directive","text-ellipsis"],"author":{"name":"amaoaaaaa"},"license":"MIT","peerDependencies":{"vue":"^3.0.0","gsap":"^3.0.0"},"repository":{"type":"git","url":"git+https://github.com/amaoaaaaa/v-text-ellipsis.git"},"bugs":{"url":"https://github.com/amaoaaaaa/v-text-ellipsis/issues"},"homepage":"https://github.com/amaoaaaaa/v-text-ellipsis","_id":"@amaoaaaaa/v-text-ellipsis@0.2.4","gitHead":"cc2fbbfae5a3c815e4c71e8d4ac8708ea3154692","_nodeVersion":"22.22.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-4VNv22D4M0H4DpRVmOLsRXNUkubn8JsLBm9nQoqoMqlzfMnTvqU76CDn7O97oJpgCntsalc5Yek0JrzYrQ4azA==","shasum":"a4d70e6ee8db255ebe721f2038ebacae2114ed79","tarball":"https://registry.npmjs.org/@amaoaaaaa/v-text-ellipsis/-/v-text-ellipsis-0.2.4.tgz","fileCount":6,"unpackedSize":6636,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDD/BfqyZf+PMS7MyeG3bzOElq91NWJMVL0epk/JpkFvAiB3F31acFWICqgGvC15o4aJZ6nkdsLvZkMb6OGzjvBrvg=="}]},"_npmUser":{"name":"amaoaaaaa","email":"z.d.mao@qq.com"},"directories":{},"maintainers":[{"name":"amaoaaaaa","email":"z.d.mao@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/v-text-ellipsis_0.2.4_1780976088131_0.9189746884193637"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-11T09:14:20.515Z","modified":"2026-06-09T03:34:48.367Z","0.1.0":"2025-09-11T09:14:20.768Z","0.2.0":"2025-09-11T09:36:20.086Z","0.2.1":"2025-09-11T09:41:35.752Z","0.2.2":"2026-01-07T09:34:18.192Z","0.2.4":"2026-06-09T03:34:48.279Z"},"bugs":{"url":"https://github.com/amaoaaaaa/v-text-ellipsis/issues"},"author":{"name":"amaoaaaaa"},"license":"MIT","homepage":"https://github.com/amaoaaaaa/v-text-ellipsis","keywords":["vue3","directive","text-ellipsis"],"repository":{"type":"git","url":"git+https://github.com/amaoaaaaa/v-text-ellipsis.git"},"description":"Vue 3 指令，文本溢出省略号并支持 GSAP 滚动显示全文","maintainers":[{"name":"amaoaaaaa","email":"z.d.mao@qq.com"}],"readme":"# @amaoaaaaa/v-text-ellipsis\r\n\r\n一个 Vue 3 指令，给文本添加溢出省略号效果，并在鼠标悬停时使用 GSAP 滚动显示全文。\r\n\r\n---\r\n\r\n## 特性\r\n\r\n- 文本超出容器宽度时显示省略号 (`...`)。\r\n- 鼠标悬停时，文本平滑滚动展示完整内容。\r\n- 支持按需注册指令或全局注册插件。\r\n\r\n---\r\n\r\n## 安装\r\n\r\n```bash\r\nnpm install @amaoaaaaa/v-text-ellipsis\r\n```\r\n\r\n> 注意：`vue` 和 `gsap` 为 peer dependencies，需要在项目中已安装。\r\n\r\n---\r\n\r\n## 使用方法\r\n\r\n### 1. 全局注册插件\r\n\r\n```ts\r\nimport { createApp } from \"vue\";\r\nimport App from \"./App.vue\";\r\nimport TextEllipsis from \"@amaoaaaaa/v-text-ellipsis\";\r\n\r\nconst app = createApp(App);\r\napp.use(TextEllipsis);\r\napp.mount(\"#app\");\r\n```\r\n\r\n在组件中即可使用：\r\n\r\n```vue\r\n<template>\r\n  <div v-text-ellipsis style=\"width: 200px;\">\r\n    这是一段很长的文本，鼠标悬停时会滚动显示完整内容。\r\n  </div>\r\n</template>\r\n```\r\n\r\n---\r\n\r\n### 2. 按需注册指令\r\n\r\n```ts\r\nimport { createApp } from \"vue\";\r\nimport App from \"./App.vue\";\r\nimport { vTextEllipsis } from \"@amaoaaaaa/v-text-ellipsis\";\r\n\r\nconst app = createApp(App);\r\napp.directive(\"text-ellipsis\", vTextEllipsis);\r\napp.mount(\"#app\");\r\n```\r\n\r\n### 3. 在组件内部注册指令\r\n\r\nsetup 语法糖，导入直接就能在 `template` 中用\r\n\r\n```ts\r\n<script lang=\"ts\" setup>\r\nimport { vTextEllipsis } from \"@amaoaaaaa/v-text-ellipsis\";\r\n</script>\r\n```\r\n\r\n---\r\n\r\n## 指令参数\r\n\r\n* `v-text-ellipsis=\"true|false\"`\r\n\r\n  * `true`：启用文本溢出省略和滚动效果\r\n  * `false`：禁用效果\r\n\r\n---\r\n\r\n## 类型拓展\r\n\r\n拓展 Vue 全局属性\r\n\r\n```ts\r\n// types/vue-shim.d.ts\r\nimport 'vue';\r\nimport { vTextEllipsis } from \"@amaoaaaaa/v-text-ellipsis\";\r\n\r\ndeclare module '@vue/runtime-core' {\r\n    export interface ComponentCustomProperties {\r\n        /**\r\n         * 自定义指令：v-text-ellipsis\r\n         * @description 给元素添加文本溢出显示省略号，鼠标移入时内容滚动的效果\r\n         */\r\n        vTextEllipsis: typeof vTextEllipsis; \r\n    }\r\n}\r\n```\r\n\r\n## 注意事项\r\n\r\n* 该指令依赖 `gsap` 实现滚动动画。\r\n* 请确保元素有固定宽度，否则滚动效果可能不明显。\r\n","readmeFilename":"README.md"}