Skip to content

Commit

Permalink
work for #8396 fix vue ts
Browse files Browse the repository at this point in the history
  • Loading branch information
OlgaLarina committed Jun 10, 2024
1 parent 9b606ad commit 355ea55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/survey-vue3-ui/src/ElementHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const clickTitleFunction = (e: any) => {
}
};
const getStyle = () => {
const headerStyle = { width: undefined };
const headerStyle: any = { width: undefined };
if("titleWidth" in props.element) {
headerStyle.width = props.element.titleWidth;
}
Expand Down
10 changes: 9 additions & 1 deletion src/vue/elementheader.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="element.cssHeader" @click="clickTitleFunction" :style="{ width: element.titleWidth }">
<div :class="element.cssHeader" @click="clickTitleFunction" :style="titleStyle">
<survey-element-title :element="element" :css="css" />
<div v-if="element.hasDescriptionUnderTitle" v-show="element.hasDescription" :class="element.cssDescription"
:id="element.ariaDescriptionId">
Expand All @@ -24,6 +24,14 @@ export class ElementHeader extends Vue {
(<any>this.element).clickTitleFunction(e);
}
}
get titleStyle() {
const headerStyle: any = { width: undefined };
if("titleWidth" in this.element) {
headerStyle.width = this.element.titleWidth;
}
return headerStyle;
}
}
Vue.component("survey-element-header", ElementHeader);
export default ElementHeader;
Expand Down

0 comments on commit 355ea55

Please sign in to comment.