Skip to content

Commit

Permalink
Merge pull request #6665 from surveyjs/feature/vue3-naming
Browse files Browse the repository at this point in the history
Vue3: Fix root components names
  • Loading branch information
andrewtelnov authored Aug 7, 2023
2 parents d7623dd + 876710c commit ca0e38a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
</script>

<template>
<SurveyRoot :survey="survey"></SurveyRoot>
<SurveyComponent :survey="survey"></SurveyComponent>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const isPopup = shallowRef();
</script>
<template>
<div id="surveyElement">
<SurveyRoot v-if="survey && !isPopup" :survey="survey"></SurveyRoot>
<popup-survey v-if="survey && isPopup" :survey="survey"></popup-survey>
<SurveyComponent v-if="survey && !isPopup" :survey="survey"></SurveyComponent>
<PopupSurveyComponent v-if="survey && isPopup" :survey="survey"></PopupSurveyComponent>
</div>
<div id="surveyResultElement"></div>
</template>
2 changes: 1 addition & 1 deletion packages/survey-vue3-ui/src/PopupSurvey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const doHide = () => {
surveyWindow.value.hide();
};
const getSurveyComponentName = () => {
return "SurveyRoot";
return "SurveyComponent";
};
const doScroll = () => {
surveyWindow.value.onScroll();
Expand Down
6 changes: 4 additions & 2 deletions packages/survey-vue3-ui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ import type { App } from "vue";
export { useBase, useLocString, useQuestion } from "./base";

function registerComponents(app: App) {
app.component("SurveyRoot", SurveyVue);
app.component("SurveyComponent", SurveyVue);
app.component("PopupSurveyComponent", PopupSurvey);
app.component("survey", SurveyVue);
app.component("popup-survey", PopupSurvey);

app.component("survey-header", Header);
app.component("survey-page", Page);
app.component("survey-row", Row);
Expand Down Expand Up @@ -211,7 +214,6 @@ function registerComponents(app: App) {
app.component("sv-notifier", Notifier);
app.component("survey-other-choice", OtherChoice);
app.component("sv-nav-btn", SurveyNavigationButton);
app.component("popup-survey", PopupSurvey);
app.component("survey-customwidget", CustomWidget);
app.component("survey-popup-modal", PopupModal);

Expand Down

0 comments on commit ca0e38a

Please sign in to comment.