-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please need to know how to add initial guides as default value #69
Comments
@musta-sd |
Can you please show me how to use it |
Based on react, it is as follows. defaultGuides={useMemo(() => [0, 100, 200], [])} When the defaultGuides change, the guides are updated. |
What about vue ? |
Is it Vue3? Is it Vue2? <template>
<Guides :defaultGuides="guides" />
</template>
<script>
setup() {
const guides = [0, 100, 200];
return {
guides,
};
}
// or
data() {
return { guides: [0, 100, 200] };
}
</script> |
Vue3 With composition API , I used this example and it is showing me an error Uncaught TypeError: guides.map is not a function |
Can you show the code you used Guides on? |
|
guides1 and guides2 are used in ref. ref="guides1", ref="guides2" Try below code: :defaultGuides="defaultGuides1"
:defaultGuides="defaultGuides2" const defaultGuides1 = ref([0, 100, 200]);
const defaultGuides2 = ref([0, 100, 200]); |
It is working Thank you so much. |
@musta-sd |
lineColor is for the ruler not the lines , i am using this for ruler |
|
Are you talking about the color of the guidelines? https://codesandbox.io/s/intelligent-heisenberg-9xn421?file=/src/App.vue I updated the new version (0.3.4) of vue3-guides. :guideStyle="{ backgroundColor: '#333' }" |
Thank you brother |
Environments
Description
I need to save the guides then with one click use them
The text was updated successfully, but these errors were encountered: