-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
This repo is so great. Thanks to your work! We found it because there is a tags-clamping feature in our product. Since we haven't found any vue component supports tags-clamping, we reimplemented vue-clamp. I hope our codes could be merged into master branch so I submit this issue.
Let me explain the main changes:
- Manipulate DOM nodes directly only works for simple text and will cause tags state getting into a mess, so we create invisible DOM nodes for clamped text/tags offset calculation.
- Due to 1, no more
applyChangemethod, we only need to design a proper workflow in Vue style for offset updating. Then just let Vue handle the DOM updating! - Due to 1 again, this logic can also work in React or other VDOM libraries. I have made a reference to
ant-designinutils.js.
Fork repo: https://github.com/boyuai/vue-clamp
Demo: https://boyuai.github.io/vue-clamp/demo/
Metadata
Metadata
Assignees
Labels
No labels