wopehq / simplebar-vue3 Goto Github PK
View Code? Open in Web Editor NEWA vue3 wrapper for simplebar
License: MIT License
A vue3 wrapper for simplebar
License: MIT License
Hey! thank you for providing a simple vue3 wrapper. Just to let you know there is a warning from vue with your expose.
[Vue warn]: expose() should be passed a plain object, received ref.
at <SimpleBar class="overflow-x-wrap h-5/6" >
simplebar-vue3/src/Component.ts
Line 49 in eb9255d
Type definitions for typescript projects?
For time being, i have created the types
in my types/index.ts
file
declare module "simplebar-vue3";
Note: for support questions, please use stackoverflow. This repository's issues are reserved for feature requests and bug reports.
I'm submitting a ...
Do you want to request a feature or report a bug?
report a bug
What is the current behavior?
The useSimplebar
hook definition is wrong
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
What is the expected behavior?
the return type of the useSimplebar
hook should be Ref<Simplebar>
not just Simplebar
as per https://github.com/wopehq/simplebar-vue3/blob/main/src/lib.d.ts#L26 file
What is the motivation / use case for changing the behavior?
When using simplebar-vue3, i receive this error, if i remove it, it is working as expected.
I'm using like this.
import { SimpleBar } from "simplebar-vue3";
<SimpleBar style="height: 400px">
// div
</SimpleBar>
Error is happening here;
I'm using the following version.
"simplebar": "^5.3.8",
"simplebar-vue3": "^0.2.0",
"vite": "^3.0.9",
"vue": "^3.2.38"
Good to know that: It is working fine in dev mode (windows), but not working in server (Linux). Please try with those to reproduce this problem.
I'm getting this error after updating from 0.1.6 to 0.1.7 on each build with webpack
Module not found: Error: Can't resolve 'simplebar-vue3'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.