1.3.10 • Published 3 years ago

vue-selection-share v1.3.10

Weekly downloads
-
License
WTFPL
Repository
github
Last release
3 years ago

vue-selection-share

a medium-like text highlight sharing component with zero dependencies.

to learn how I created this, click this to read a chinese tutorial.

npm.io

well, it's all about reinventing the wheel.


🤤 usage

to install the single file component, run:

npm install --save vue-selection-share

to use the component:

import VueSelectionShare from 'vue-selection-share';
Vue.use(VueSelectionShare)

then add the component outside of the elements that needs the popover, and the clicking behaviours:

<VueSelectionShare @share="onShare" @highlight="onHighlight">
    <p>mother of god</p>
</VueSelectionShare>

lastly add the methods, to onShare and onHighlight:

methods: {
    onShare (text) {
        console.log('share:', text)
    },

    onHighlight (text) {
        console.log('highlight:', text)
    }
}
1.3.10

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.2.6

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.1.2

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago