4
4
</template >
5
5
6
6
<script >
7
- import * as SurveyJSEditor from " surveyjs-editor" ;
7
+ import * as SurveyEditor from " surveyjs-editor" ;
8
8
import " surveyjs-editor/surveyeditor.css" ;
9
9
import " ../assets/index.scss" ;
10
10
@@ -14,10 +14,38 @@ export default {
14
14
msg: String
15
15
},
16
16
mounted () {
17
+ var mainColor = " #023670" ;
18
+ var mainHoverColor = " #035bbc" ;
19
+ var textColor = " #4a4a4a" ;
20
+ var headerColor = " #160ce8" ;
21
+ var headerBackgroundColor = " #4a4a4a" ;
22
+ var bodyContainerBackgroundColor = " #f8f8f8" ;
23
+
24
+ var defaultThemeColorsSurvey = Survey .StylesManager .ThemeColors [" default" ];
25
+ defaultThemeColorsSurvey[" $main-color" ] = mainColor;
26
+ defaultThemeColorsSurvey[" $main-hover-color" ] = mainHoverColor;
27
+ defaultThemeColorsSurvey[" $text-color" ] = textColor;
28
+ defaultThemeColorsSurvey[" $header-color" ] = headerColor;
29
+ defaultThemeColorsSurvey[" $header-background-color" ] = headerBackgroundColor;
30
+ defaultThemeColorsSurvey[
31
+ " $body-container-background-color"
32
+ ] = bodyContainerBackgroundColor;
33
+
34
+ var defaultThemeColorsEditor =
35
+ SurveyEditor .StylesManager .ThemeColors [" default" ];
36
+ defaultThemeColorsEditor[" $primary-color" ] = mainColor;
37
+ defaultThemeColorsEditor[" $secondary-color" ] = mainColor;
38
+ defaultThemeColorsEditor[" $primary-hover-color" ] = mainHoverColor;
39
+ defaultThemeColorsEditor[" $primary-text-color" ] = textColor;
40
+ defaultThemeColorsEditor[" $selection-border-color" ] = mainColor;
41
+
42
+
17
43
let editorOptions = {};
18
- SurveyJSEditor .StylesManager .applyTheme (" bootstrapmaterial" );
44
+ Survey .Survey .cssType = " bootstrapmaterial" ;
45
+ Survey .StylesManager .applyTheme (" bootstrapmaterial" );
46
+ SurveyEditor .StylesManager .applyTheme (" bootstrapmaterial" );
19
47
20
- let editor = new SurveyJSEditor .SurveyEditor (
48
+ let editor = new SurveyEditor .SurveyEditor (
21
49
" surveyjsEditorContainer" ,
22
50
editorOptions
23
51
);
0 commit comments