@shijiu/jsview-vue 0.9.254 → 0.9.267
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dom/bin/package.json +11 -11
- package/dom/browser-root-style.css +21 -21
- package/loader/jsview-main.js +41 -41
- package/loader/jsview.config.default.js +37 -37
- package/loader/jsview.default.config.js +37 -37
- package/package.json +1 -5
- package/samples/AdvanceMetroWidget/App.vue +122 -122
- package/samples/AdvanceMetroWidget/Frame.vue +100 -100
- package/samples/AdvanceMetroWidget/Item.vue +57 -57
- package/samples/AdvanceMetroWidget/data.js +136 -136
- package/samples/AnimPicture/App.vue +223 -223
- package/samples/Basic/App.vue +128 -128
- package/samples/Basic/components/TitleBar.vue +28 -28
- package/samples/Basic/components/anim/AnimGroup.vue +67 -67
- package/samples/Basic/components/anim/AnimKeyframeBasic.vue +101 -101
- package/samples/Basic/components/anim/AnimKeyframeComposite.vue +52 -52
- package/samples/Basic/components/anim/AnimTransition.vue +116 -116
- package/samples/Basic/components/div/DivBackground.vue +14 -14
- package/samples/Basic/components/div/DivClip.vue +80 -80
- package/samples/Basic/components/div/DivCssScoped.vue +26 -26
- package/samples/Basic/components/div/DivCssVar.vue +49 -49
- package/samples/Basic/components/div/DivGroup1.vue +32 -32
- package/samples/Basic/components/div/DivGroup2.vue +40 -40
- package/samples/Basic/components/div/DivLayout.vue +11 -11
- package/samples/Basic/components/div/DivRadius.vue +46 -46
- package/samples/Basic/components/text/TextAlign.vue +47 -47
- package/samples/Basic/components/text/TextFontStyle.vue +57 -57
- package/samples/Basic/components/text/TextGroup.vue +31 -31
- package/samples/Basic/components/text/TextOverflow.vue +77 -77
- package/samples/BasicFocusControl/App.vue +124 -124
- package/samples/BasicFocusControl/components/BaseBlock.vue +50 -50
- package/samples/BasicFocusControl/components/MainArea.vue +97 -97
- package/samples/BasicFocusControl/components/MainAreaLeftBlock.vue +20 -20
- package/samples/BasicFocusControl/components/MainAreaRightBlock.vue +29 -29
- package/samples/BasicFocusControl/components/SideBar.vue +72 -72
- package/samples/BasicFocusControl/components/SideBarBlock.vue +29 -29
- package/samples/ClassNameDemo/App.vue +119 -119
- package/samples/ClassNameDemo/components/ContentItem.vue +252 -252
- package/samples/ClassNameDemo/components/LoadingView.vue +43 -43
- package/samples/ClassNameDemo/components/TitleView.vue +24 -24
- package/samples/ClassNameDemo/data.js +24 -24
- package/samples/ColorSpace/App.vue +134 -134
- package/samples/DemoHomepage/App.vue +31 -31
- package/samples/DemoHomepage/components/BodyFrame.vue +81 -81
- package/samples/DemoHomepage/components/Dialog.vue +93 -93
- package/samples/DemoHomepage/components/Item.vue +76 -76
- package/samples/DemoHomepage/components/TabFrame.vue +86 -86
- package/samples/DemoHomepage/router.js +132 -132
- package/samples/DemoHomepage/views/Homepage.vue +186 -186
- package/samples/FlipCard/App.vue +80 -80
- package/samples/FlipCard/FlipCard.vue +123 -123
- package/samples/FlipCard/data.js +12 -12
- package/samples/FlowMultiWidget/App.vue +90 -90
- package/samples/FlowMultiWidget/components/Block.vue +106 -106
- package/samples/FlowMultiWidget/components/FlowPage.vue +59 -59
- package/samples/FlowMultiWidget/components/Item.vue +102 -102
- package/samples/FlowMultiWidget/components/MenuItem.vue +71 -71
- package/samples/FlowMultiWidget/components/MyMenu.vue +89 -89
- package/samples/FlowMultiWidget/data.js +446 -446
- package/samples/HashHistory/App.vue +124 -124
- package/samples/HashHistory/components/HorizontalButtonList.vue +113 -113
- package/samples/HashHistory/components/Item.vue +73 -73
- package/samples/HashHistory/router.js +29 -29
- package/samples/HashHistory/views/BasePage.vue +18 -18
- package/samples/HashHistory/views/MainPage.vue +67 -67
- package/samples/HashHistory/views/SubPage.vue +78 -78
- package/samples/HashHistory/views/SubPageFirst.vue +9 -9
- package/samples/HashHistory/views/SubPageSecond.vue +9 -9
- package/samples/LongImage/App.vue +96 -96
- package/samples/LongImage/Button.vue +153 -153
- package/samples/LongImage/LongImageScroll.vue +126 -126
- package/samples/LongImage/Scroll.vue +15 -15
- package/samples/LongText/App.vue +111 -111
- package/samples/LongText/Button.vue +153 -153
- package/samples/LongText/LongTextScroll.vue +224 -224
- package/samples/LongText/Scroll.vue +15 -15
- package/samples/Preload/App.vue +145 -145
- package/samples/Preload/data.js +22 -22
- package/samples/Preload/preloadItem.vue +21 -21
- package/samples/QrcodeDemo/App.vue +72 -72
- package/samples/SimpleWidgetDemo/App.vue +203 -203
- package/samples/SimpleWidgetDemo/Item.vue +82 -82
- package/samples/SimpleWidgetDemo/components/ContentItem.vue +411 -411
- package/samples/SimpleWidgetDemo/components/MyTab.vue +116 -116
- package/samples/SimpleWidgetDemo/data.js +110 -110
- package/samples/SprayView/App.vue +269 -269
- package/samples/SpriteImage/App.vue +174 -174
- package/samples/SpriteImage/images/egg_break.json +116 -116
- package/samples/TextBox/App.vue +178 -178
- package/samples/TextBox/RenderCenter.vue +108 -108
- package/samples/TextBox/RenderLeft.vue +108 -108
- package/samples/TextBox/RenderOneLine.vue +119 -119
- package/samples/TextBox/RenderRight.vue +106 -106
- package/samples/TextShadowDemo/App.vue +97 -97
- package/samples/TextureSize/App.vue +141 -141
- package/samples/ThrowMoveDemo/AccelerateDemo.vue +117 -117
- package/samples/ThrowMoveDemo/App.vue +113 -113
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +115 -115
- package/samples/ThrowMoveDemo/TargetDemo.vue +116 -116
- package/samples/ThrowMoveDemo/UDParabolicDemo.vue +121 -121
- package/samples/TransitPage/App.vue +40 -40
- package/samples/VideoDemo/App.vue +137 -137
- package/samples/VideoDemo/components/Button.vue +68 -68
- package/samples/VideoDemo/components/Controllor.vue +195 -195
- package/samples/VideoDemo/components/VideoFrame.vue +152 -152
- package/scripts/common.js +57 -115
- package/scripts/jsview-install-local-packages.js +73 -73
- package/scripts/jsview-post-build.js +127 -127
- package/scripts/jsview-post-install.js +78 -78
- package/scripts/jsview-run-android.js +64 -64
- package/utils/JsViewEngineWidget/bin/index.js +1 -1
- package/utils/JsViewEngineWidget/bin/package.json +11 -11
- package/utils/JsViewVueTools/JsvHashHistory.js +111 -111
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +417 -417
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +80 -80
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserQrcode.vue +147 -147
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserSpray.vue +54 -54
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/ApicDataBase.js +28 -28
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/BrowserApic.vue +123 -123
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/GifData.js +83 -83
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/LoopToolBase.js +25 -25
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/NormalLoopTool.js +61 -61
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/PartLoopTool.js +119 -119
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/Viewer.js +106 -106
- package/utils/JsViewVueWidget/BrowserDebugWidget/JsvApic/WebpData.js +141 -141
- package/utils/JsViewVueWidget/BrowserDebugWidget/WidgetLoader.js +20 -20
- package/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.js +204 -204
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +63 -63
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.js +426 -426
- package/utils/JsViewVueWidget/JsvActorMove/index.js +12 -12
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +178 -178
- package/utils/JsViewVueWidget/JsvApic/index.js +17 -17
- package/utils/JsViewVueWidget/JsvMarquee.vue +196 -196
- package/utils/JsViewVueWidget/JsvNinePatch.vue +76 -76
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +350 -350
- package/utils/JsViewVueWidget/JsvPreload/index.js +21 -21
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +140 -140
- package/utils/JsViewVueWidget/JsvQrcode/index.js +18 -18
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +139 -139
- package/utils/JsViewVueWidget/JsvSpray/index.js +14 -14
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +447 -447
- package/utils/JsViewVueWidget/JsvSpriteAnim/SpriteController.js +56 -56
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +6 -6
- package/utils/JsViewVueWidget/JsvSwiper/Indicator.vue +34 -34
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +494 -494
- package/utils/JsViewVueWidget/JsvSwiper/index.js +9 -9
- package/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue +34 -34
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +403 -403
- package/utils/JsViewVueWidget/JsvSwiper3D/index.js +9 -9
- package/utils/JsViewVueWidget/JsvTextBox.vue +110 -110
- package/utils/JsViewVueWidget/JsvVideo.vue +35 -35
- package/patches/node_modules/@babel/preset-env/lib/available-plugins.js +0 -219
- package/patches/node_modules/@vue/cli-plugin-typescript/index.js +0 -100
- package/patches/node_modules/@vue/cli-service/lib/commands/serve.js +0 -395
- package/patches/node_modules/@vue/cli-service/lib/config/app.js +0 -272
- package/patches/node_modules/@vue/cli-service/lib/config/assets.js +0 -70
- package/patches/node_modules/@vue/cli-service/lib/config/base.js +0 -212
- package/patches/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +0 -2566
- package/patches/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js +0 -274
- package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +0 -1596
- package/patches/node_modules/postcss-js/objectifier.js +0 -90
- package/patches/node_modules/vue-loader/dist/resolveScript.js +0 -70
- package/scripts/deploy-fast-pack.js +0 -17
- package/scripts/deploy-fast-publish.js +0 -44
- package/scripts/deploy-git-commit-empty.js +0 -21
- package/scripts/deploy-prepare.js +0 -56
- package/scripts/make-js.sh +0 -181
- package/vetur.config.js +0 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: ChenChanghua
|
|
3
|
-
* @Date: 2021-11-23 09:44:31
|
|
4
|
-
* @LastEditors: ChenChanghua
|
|
5
|
-
* @LastEditTime: 2021-11-23 15:42:46
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
import JsvSwiper from "./JsvSwiper.vue";
|
|
9
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-11-23 09:44:31
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2021-11-23 15:42:46
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
import JsvSwiper from "./JsvSwiper.vue";
|
|
9
|
+
|
|
10
10
|
export default JsvSwiper;
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* Created by chunfeng.luo@qcast.cn on 10/13/20.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* JsvTextBox:Vue高阶组件,文字的垂直对齐方式显示控件
|
|
7
|
-
* props说明:
|
|
8
|
-
* verticalAlign {string} 垂直对齐方式 (必需) top、middle、bottom
|
|
9
|
-
* stylesList {array} 布局样式(必需),数组中可包含样式对象或者JsvStyleClass,或者JsvTextStyleClass对象,
|
|
10
|
-
* 样式对象内容为{left:0, top:0, width:xxx, height:xxx},
|
|
11
|
-
* 布局样式为数组中所有样式的合并。
|
|
12
|
-
* styleToken {string} 类似于react html元素的key,当style变化时,由使用者改变此Token通知hoc进行style重新识别。
|
|
13
|
-
* Token不变的场景,props变化不会引起render,以提高渲染性能
|
|
14
|
-
* enableLatex {bool} 是否启用Latex文字描画模式
|
|
15
|
-
-->
|
|
16
|
-
|
|
17
|
-
<script>
|
|
18
|
-
import {
|
|
19
|
-
JsvTextStyleClass,
|
|
20
|
-
combinedStyles,
|
|
21
|
-
} from "jsview/utils/JsViewVueTools/JsvStyleClass.js";
|
|
22
|
-
|
|
23
|
-
let sAreaAlignStyleMap = new Map();
|
|
24
|
-
export default {
|
|
25
|
-
props: {
|
|
26
|
-
styleToken: String,
|
|
27
|
-
stylesList: Object,
|
|
28
|
-
verticalAlign: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: "middle",
|
|
31
|
-
},
|
|
32
|
-
lineAlign: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: "middle",
|
|
35
|
-
},
|
|
36
|
-
enableLatex: Boolean,
|
|
37
|
-
},
|
|
38
|
-
data() {
|
|
39
|
-
return {
|
|
40
|
-
styleCombined: null,
|
|
41
|
-
styleClasses: null,
|
|
42
|
-
tokenProcesses: null,
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
beforeMount() {
|
|
46
|
-
if (this.styleToken !== this.tokenProcesses) {
|
|
47
|
-
// Token变化时,重新解析style array
|
|
48
|
-
const style_set = combinedStyles(
|
|
49
|
-
this.stylesList,
|
|
50
|
-
!window.JsvDisableReactWrapper // 无ReactWrapper时,全解析style属性
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
this.styleCombined = style_set.combinedStyle;
|
|
54
|
-
// console.log("styleCombined = ", this.styleCombined);
|
|
55
|
-
if (!window.JsvDisableReactWrapper) {
|
|
56
|
-
this.styleClasses = style_set.combinedClass;
|
|
57
|
-
let key = this.verticalAlign + "_" + this.lineAlign;
|
|
58
|
-
if (!sAreaAlignStyleMap.has(key)) {
|
|
59
|
-
const text_class = new JsvTextStyleClass({});
|
|
60
|
-
text_class.setVerticalAlign(this.verticalAlign);
|
|
61
|
-
text_class.setLineAlign(this.lineAlign);
|
|
62
|
-
sAreaAlignStyleMap.set(key, text_class);
|
|
63
|
-
}
|
|
64
|
-
const va_set_class = sAreaAlignStyleMap.get(key);
|
|
65
|
-
if (this.styleClasses.length === 0) {
|
|
66
|
-
this.styleClasses += va_set_class.getName();
|
|
67
|
-
} else {
|
|
68
|
-
this.styleClasses = this.styleClasses + " " + va_set_class.getName();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
this.tokenProcesses = this.styleToken;
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
methods: {
|
|
75
|
-
isJsvDisableReactWrapper() {
|
|
76
|
-
if (window.JsvDisableReactWrapper) {
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
return false;
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
</script>
|
|
84
|
-
|
|
85
|
-
<template>
|
|
86
|
-
<div>
|
|
87
|
-
<div v-if="isJsvDisableReactWrapper()" :style="styleCombined">
|
|
88
|
-
<div :style="{ position: 'static', display: 'table' }">
|
|
89
|
-
<div
|
|
90
|
-
:style="{
|
|
91
|
-
position: 'static',
|
|
92
|
-
display: 'table-cell',
|
|
93
|
-
width: styleCombined.width,
|
|
94
|
-
height: styleCombined.height,
|
|
95
|
-
verticalAlign: verticalAlign,
|
|
96
|
-
}"
|
|
97
|
-
>
|
|
98
|
-
<slot></slot>
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
<div
|
|
103
|
-
v-else
|
|
104
|
-
:className="styleClasses"
|
|
105
|
-
:style="{ ...styleCombined }"
|
|
106
|
-
:jsv_text_latex_enable="enableLatex ? 'true' : ''"
|
|
107
|
-
>
|
|
108
|
-
<slot></slot>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
1
|
+
<!--
|
|
2
|
+
* Created by chunfeng.luo@qcast.cn on 10/13/20.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* JsvTextBox:Vue高阶组件,文字的垂直对齐方式显示控件
|
|
7
|
+
* props说明:
|
|
8
|
+
* verticalAlign {string} 垂直对齐方式 (必需) top、middle、bottom
|
|
9
|
+
* stylesList {array} 布局样式(必需),数组中可包含样式对象或者JsvStyleClass,或者JsvTextStyleClass对象,
|
|
10
|
+
* 样式对象内容为{left:0, top:0, width:xxx, height:xxx},
|
|
11
|
+
* 布局样式为数组中所有样式的合并。
|
|
12
|
+
* styleToken {string} 类似于react html元素的key,当style变化时,由使用者改变此Token通知hoc进行style重新识别。
|
|
13
|
+
* Token不变的场景,props变化不会引起render,以提高渲染性能
|
|
14
|
+
* enableLatex {bool} 是否启用Latex文字描画模式
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import {
|
|
19
|
+
JsvTextStyleClass,
|
|
20
|
+
combinedStyles,
|
|
21
|
+
} from "jsview/utils/JsViewVueTools/JsvStyleClass.js";
|
|
22
|
+
|
|
23
|
+
let sAreaAlignStyleMap = new Map();
|
|
24
|
+
export default {
|
|
25
|
+
props: {
|
|
26
|
+
styleToken: String,
|
|
27
|
+
stylesList: Object,
|
|
28
|
+
verticalAlign: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: "middle",
|
|
31
|
+
},
|
|
32
|
+
lineAlign: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "middle",
|
|
35
|
+
},
|
|
36
|
+
enableLatex: Boolean,
|
|
37
|
+
},
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
styleCombined: null,
|
|
41
|
+
styleClasses: null,
|
|
42
|
+
tokenProcesses: null,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
beforeMount() {
|
|
46
|
+
if (this.styleToken !== this.tokenProcesses) {
|
|
47
|
+
// Token变化时,重新解析style array
|
|
48
|
+
const style_set = combinedStyles(
|
|
49
|
+
this.stylesList,
|
|
50
|
+
!window.JsvDisableReactWrapper // 无ReactWrapper时,全解析style属性
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
this.styleCombined = style_set.combinedStyle;
|
|
54
|
+
// console.log("styleCombined = ", this.styleCombined);
|
|
55
|
+
if (!window.JsvDisableReactWrapper) {
|
|
56
|
+
this.styleClasses = style_set.combinedClass;
|
|
57
|
+
let key = this.verticalAlign + "_" + this.lineAlign;
|
|
58
|
+
if (!sAreaAlignStyleMap.has(key)) {
|
|
59
|
+
const text_class = new JsvTextStyleClass({});
|
|
60
|
+
text_class.setVerticalAlign(this.verticalAlign);
|
|
61
|
+
text_class.setLineAlign(this.lineAlign);
|
|
62
|
+
sAreaAlignStyleMap.set(key, text_class);
|
|
63
|
+
}
|
|
64
|
+
const va_set_class = sAreaAlignStyleMap.get(key);
|
|
65
|
+
if (this.styleClasses.length === 0) {
|
|
66
|
+
this.styleClasses += va_set_class.getName();
|
|
67
|
+
} else {
|
|
68
|
+
this.styleClasses = this.styleClasses + " " + va_set_class.getName();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
this.tokenProcesses = this.styleToken;
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
methods: {
|
|
75
|
+
isJsvDisableReactWrapper() {
|
|
76
|
+
if (window.JsvDisableReactWrapper) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
</script>
|
|
84
|
+
|
|
85
|
+
<template>
|
|
86
|
+
<div>
|
|
87
|
+
<div v-if="isJsvDisableReactWrapper()" :style="styleCombined">
|
|
88
|
+
<div :style="{ position: 'static', display: 'table' }">
|
|
89
|
+
<div
|
|
90
|
+
:style="{
|
|
91
|
+
position: 'static',
|
|
92
|
+
display: 'table-cell',
|
|
93
|
+
width: styleCombined.width,
|
|
94
|
+
height: styleCombined.height,
|
|
95
|
+
verticalAlign: verticalAlign,
|
|
96
|
+
}"
|
|
97
|
+
>
|
|
98
|
+
<slot></slot>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
<div
|
|
103
|
+
v-else
|
|
104
|
+
:className="styleClasses"
|
|
105
|
+
:style="{ ...styleCombined }"
|
|
106
|
+
:jsv_text_latex_enable="enableLatex ? 'true' : ''"
|
|
107
|
+
>
|
|
108
|
+
<slot></slot>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
111
|
</template>
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
/*
|
|
3
|
-
* JsvVideo:Vue高阶组件,包装<video>标签,添加离屏模式这种可以支持圆角和旋转效果,但绘制性能略有焦点的特效
|
|
4
|
-
* props说明:
|
|
5
|
-
* usetexture {bool} 是否使用texture即离屏模式,true:使用离屏模式,false:使用普通video
|
|
6
|
-
* videoref {object} (必须) video 句柄,对video进行播控
|
|
7
|
-
* 特别说明:
|
|
8
|
-
* 其他属性同video标签
|
|
9
|
-
*/
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
import { Options, Vue } from "vue-class-component";
|
|
14
|
-
|
|
15
|
-
@Options({
|
|
16
|
-
props: {
|
|
17
|
-
onRef: { type: Function, default: () => {} },
|
|
18
|
-
useTexture: { type: Boolean, default: false },
|
|
19
|
-
autoplay: { type: String, default: undefined },
|
|
20
|
-
},
|
|
21
|
-
})
|
|
22
|
-
class JsvVideo extends Vue {
|
|
23
|
-
constructor(props) {
|
|
24
|
-
super(props);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default JsvVideo;
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<video :ref="onRef" :jsv-media-usetexture="useTexture" v-bind="$attrs"/>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<style scoped>
|
|
1
|
+
<!--
|
|
2
|
+
/*
|
|
3
|
+
* JsvVideo:Vue高阶组件,包装<video>标签,添加离屏模式这种可以支持圆角和旋转效果,但绘制性能略有焦点的特效
|
|
4
|
+
* props说明:
|
|
5
|
+
* usetexture {bool} 是否使用texture即离屏模式,true:使用离屏模式,false:使用普通video
|
|
6
|
+
* videoref {object} (必须) video 句柄,对video进行播控
|
|
7
|
+
* 特别说明:
|
|
8
|
+
* 其他属性同video标签
|
|
9
|
+
*/
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
import { Options, Vue } from "vue-class-component";
|
|
14
|
+
|
|
15
|
+
@Options({
|
|
16
|
+
props: {
|
|
17
|
+
onRef: { type: Function, default: () => {} },
|
|
18
|
+
useTexture: { type: Boolean, default: false },
|
|
19
|
+
autoplay: { type: String, default: undefined },
|
|
20
|
+
},
|
|
21
|
+
})
|
|
22
|
+
class JsvVideo extends Vue {
|
|
23
|
+
constructor(props) {
|
|
24
|
+
super(props);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default JsvVideo;
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<video :ref="onRef" :jsv-media-usetexture="useTexture" v-bind="$attrs"/>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<style scoped>
|
|
36
36
|
</style>
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.minVersions = exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _pluginSyntaxAsyncGenerators = require("@babel/plugin-syntax-async-generators");
|
|
9
|
-
|
|
10
|
-
var _pluginSyntaxClassProperties = require("@babel/plugin-syntax-class-properties");
|
|
11
|
-
|
|
12
|
-
var _pluginSyntaxClassStaticBlock = require("@babel/plugin-syntax-class-static-block");
|
|
13
|
-
|
|
14
|
-
var _pluginSyntaxDynamicImport = require("@babel/plugin-syntax-dynamic-import");
|
|
15
|
-
|
|
16
|
-
var _pluginSyntaxExportNamespaceFrom = require("@babel/plugin-syntax-export-namespace-from");
|
|
17
|
-
|
|
18
|
-
var _pluginSyntaxJsonStrings = require("@babel/plugin-syntax-json-strings");
|
|
19
|
-
|
|
20
|
-
var _pluginSyntaxLogicalAssignmentOperators = require("@babel/plugin-syntax-logical-assignment-operators");
|
|
21
|
-
|
|
22
|
-
var _pluginSyntaxNullishCoalescingOperator = require("@babel/plugin-syntax-nullish-coalescing-operator");
|
|
23
|
-
|
|
24
|
-
var _pluginSyntaxNumericSeparator = require("@babel/plugin-syntax-numeric-separator");
|
|
25
|
-
|
|
26
|
-
var _pluginSyntaxObjectRestSpread = require("@babel/plugin-syntax-object-rest-spread");
|
|
27
|
-
|
|
28
|
-
var _pluginSyntaxOptionalCatchBinding = require("@babel/plugin-syntax-optional-catch-binding");
|
|
29
|
-
|
|
30
|
-
var _pluginSyntaxOptionalChaining = require("@babel/plugin-syntax-optional-chaining");
|
|
31
|
-
|
|
32
|
-
var _pluginSyntaxPrivatePropertyInObject = require("@babel/plugin-syntax-private-property-in-object");
|
|
33
|
-
|
|
34
|
-
var _pluginSyntaxTopLevelAwait = require("@babel/plugin-syntax-top-level-await");
|
|
35
|
-
|
|
36
|
-
var _pluginProposalAsyncGeneratorFunctions = require("@babel/plugin-proposal-async-generator-functions");
|
|
37
|
-
|
|
38
|
-
var _pluginProposalClassProperties = require("@babel/plugin-proposal-class-properties");
|
|
39
|
-
|
|
40
|
-
var _pluginProposalClassStaticBlock = require("@babel/plugin-proposal-class-static-block");
|
|
41
|
-
|
|
42
|
-
var _pluginProposalDynamicImport = require("@babel/plugin-proposal-dynamic-import");
|
|
43
|
-
|
|
44
|
-
var _pluginProposalExportNamespaceFrom = require("@babel/plugin-proposal-export-namespace-from");
|
|
45
|
-
|
|
46
|
-
var _pluginProposalJsonStrings = require("@babel/plugin-proposal-json-strings");
|
|
47
|
-
|
|
48
|
-
var _pluginProposalLogicalAssignmentOperators = require("@babel/plugin-proposal-logical-assignment-operators");
|
|
49
|
-
|
|
50
|
-
var _pluginProposalNullishCoalescingOperator = require("@babel/plugin-proposal-nullish-coalescing-operator");
|
|
51
|
-
|
|
52
|
-
var _pluginProposalNumericSeparator = require("@babel/plugin-proposal-numeric-separator");
|
|
53
|
-
|
|
54
|
-
var _pluginProposalObjectRestSpread = require("@babel/plugin-proposal-object-rest-spread");
|
|
55
|
-
|
|
56
|
-
var _pluginProposalOptionalCatchBinding = require("@babel/plugin-proposal-optional-catch-binding");
|
|
57
|
-
|
|
58
|
-
var _pluginProposalOptionalChaining = require("@babel/plugin-proposal-optional-chaining");
|
|
59
|
-
|
|
60
|
-
var _pluginProposalPrivateMethods = require("@babel/plugin-proposal-private-methods");
|
|
61
|
-
|
|
62
|
-
var _pluginProposalPrivatePropertyInObject = require("@babel/plugin-proposal-private-property-in-object");
|
|
63
|
-
|
|
64
|
-
var _pluginProposalUnicodePropertyRegex = require("@babel/plugin-proposal-unicode-property-regex");
|
|
65
|
-
|
|
66
|
-
var _pluginTransformAsyncToGenerator = require("@babel/plugin-transform-async-to-generator");
|
|
67
|
-
|
|
68
|
-
var _pluginTransformArrowFunctions = require("@babel/plugin-transform-arrow-functions");
|
|
69
|
-
|
|
70
|
-
var _pluginTransformBlockScopedFunctions = require("@babel/plugin-transform-block-scoped-functions");
|
|
71
|
-
|
|
72
|
-
var _pluginTransformBlockScoping = require("@babel/plugin-transform-block-scoping");
|
|
73
|
-
|
|
74
|
-
var _pluginTransformClasses = require("@babel/plugin-transform-classes");
|
|
75
|
-
|
|
76
|
-
var _pluginTransformComputedProperties = require("@babel/plugin-transform-computed-properties");
|
|
77
|
-
|
|
78
|
-
var _pluginTransformDestructuring = require("@babel/plugin-transform-destructuring");
|
|
79
|
-
|
|
80
|
-
var _pluginTransformDotallRegex = require("@babel/plugin-transform-dotall-regex");
|
|
81
|
-
|
|
82
|
-
var _pluginTransformDuplicateKeys = require("@babel/plugin-transform-duplicate-keys");
|
|
83
|
-
|
|
84
|
-
var _pluginTransformExponentiationOperator = require("@babel/plugin-transform-exponentiation-operator");
|
|
85
|
-
|
|
86
|
-
var _pluginTransformForOf = require("@babel/plugin-transform-for-of");
|
|
87
|
-
|
|
88
|
-
var _pluginTransformFunctionName = require("@babel/plugin-transform-function-name");
|
|
89
|
-
|
|
90
|
-
var _pluginTransformLiterals = require("@babel/plugin-transform-literals");
|
|
91
|
-
|
|
92
|
-
var _pluginTransformMemberExpressionLiterals = require("@babel/plugin-transform-member-expression-literals");
|
|
93
|
-
|
|
94
|
-
var _pluginTransformModulesAmd = require("@babel/plugin-transform-modules-amd");
|
|
95
|
-
|
|
96
|
-
var _pluginTransformModulesCommonjs = require("@babel/plugin-transform-modules-commonjs");
|
|
97
|
-
|
|
98
|
-
var _pluginTransformModulesSystemjs = require("@babel/plugin-transform-modules-systemjs");
|
|
99
|
-
|
|
100
|
-
var _pluginTransformModulesUmd = require("@babel/plugin-transform-modules-umd");
|
|
101
|
-
|
|
102
|
-
var _pluginTransformNamedCapturingGroupsRegex = require("@babel/plugin-transform-named-capturing-groups-regex");
|
|
103
|
-
|
|
104
|
-
var _pluginTransformNewTarget = require("@babel/plugin-transform-new-target");
|
|
105
|
-
|
|
106
|
-
var _pluginTransformObjectSuper = require("@babel/plugin-transform-object-super");
|
|
107
|
-
|
|
108
|
-
var _pluginTransformParameters = require("@babel/plugin-transform-parameters");
|
|
109
|
-
|
|
110
|
-
var _pluginTransformPropertyLiterals = require("@babel/plugin-transform-property-literals");
|
|
111
|
-
|
|
112
|
-
var _pluginTransformRegenerator = require("@babel/plugin-transform-regenerator");
|
|
113
|
-
|
|
114
|
-
var _pluginTransformReservedWords = require("@babel/plugin-transform-reserved-words");
|
|
115
|
-
|
|
116
|
-
var _pluginTransformShorthandProperties = require("@babel/plugin-transform-shorthand-properties");
|
|
117
|
-
|
|
118
|
-
var _pluginTransformSpread = require("@babel/plugin-transform-spread");
|
|
119
|
-
|
|
120
|
-
var _pluginTransformStickyRegex = require("@babel/plugin-transform-sticky-regex");
|
|
121
|
-
|
|
122
|
-
var _pluginTransformTemplateLiterals = require("@babel/plugin-transform-template-literals");
|
|
123
|
-
|
|
124
|
-
var _pluginTransformTypeofSymbol = require("@babel/plugin-transform-typeof-symbol");
|
|
125
|
-
|
|
126
|
-
var _pluginTransformUnicodeEscapes = require("@babel/plugin-transform-unicode-escapes");
|
|
127
|
-
|
|
128
|
-
var _pluginTransformUnicodeRegex = require("@babel/plugin-transform-unicode-regex");
|
|
129
|
-
|
|
130
|
-
var _transformAsyncArrowsInClass = require("@babel/preset-modules/lib/plugins/transform-async-arrows-in-class");
|
|
131
|
-
|
|
132
|
-
var _transformEdgeDefaultParameters = require("@babel/preset-modules/lib/plugins/transform-edge-default-parameters");
|
|
133
|
-
|
|
134
|
-
var _transformEdgeFunctionName = require("@babel/preset-modules/lib/plugins/transform-edge-function-name");
|
|
135
|
-
|
|
136
|
-
var _transformTaggedTemplateCaching = require("@babel/preset-modules/lib/plugins/transform-tagged-template-caching");
|
|
137
|
-
|
|
138
|
-
var _transformSafariBlockShadowing = require("@babel/preset-modules/lib/plugins/transform-safari-block-shadowing");
|
|
139
|
-
|
|
140
|
-
var _transformSafariForShadowing = require("@babel/preset-modules/lib/plugins/transform-safari-for-shadowing");
|
|
141
|
-
|
|
142
|
-
var _pluginBugfixV8SpreadParametersInOptionalChaining = require("@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining");
|
|
143
|
-
|
|
144
|
-
var _default = {
|
|
145
|
-
"bugfix/transform-async-arrows-in-class": () => _transformAsyncArrowsInClass,
|
|
146
|
-
"bugfix/transform-edge-default-parameters": () => _transformEdgeDefaultParameters,
|
|
147
|
-
"bugfix/transform-edge-function-name": () => _transformEdgeFunctionName,
|
|
148
|
-
"bugfix/transform-safari-block-shadowing": () => _transformSafariBlockShadowing,
|
|
149
|
-
"bugfix/transform-safari-for-shadowing": () => _transformSafariForShadowing,
|
|
150
|
-
"bugfix/transform-tagged-template-caching": () => _transformTaggedTemplateCaching,
|
|
151
|
-
// "bugfix/transform-v8-spread-parameters-in-optional-chaining": () => _pluginBugfixV8SpreadParametersInOptionalChaining.default, // QCode Removed
|
|
152
|
-
"proposal-async-generator-functions": () => _pluginProposalAsyncGeneratorFunctions.default,
|
|
153
|
-
"proposal-class-properties": () => _pluginProposalClassProperties.default,
|
|
154
|
-
"proposal-class-static-block": () => _pluginProposalClassStaticBlock.default,
|
|
155
|
-
"proposal-dynamic-import": () => _pluginProposalDynamicImport.default,
|
|
156
|
-
"proposal-export-namespace-from": () => _pluginProposalExportNamespaceFrom.default,
|
|
157
|
-
"proposal-json-strings": () => _pluginProposalJsonStrings.default,
|
|
158
|
-
"proposal-logical-assignment-operators": () => _pluginProposalLogicalAssignmentOperators.default,
|
|
159
|
-
// "proposal-nullish-coalescing-operator": () => _pluginProposalNullishCoalescingOperator.default, // QCode Removed
|
|
160
|
-
"proposal-numeric-separator": () => _pluginProposalNumericSeparator.default,
|
|
161
|
-
"proposal-object-rest-spread": () => _pluginProposalObjectRestSpread.default,
|
|
162
|
-
"proposal-optional-catch-binding": () => _pluginProposalOptionalCatchBinding.default,
|
|
163
|
-
//"proposal-optional-chaining": () => _pluginProposalOptionalChaining.default, // QCode Removed
|
|
164
|
-
"proposal-private-methods": () => _pluginProposalPrivateMethods.default,
|
|
165
|
-
"proposal-private-property-in-object": () => _pluginProposalPrivatePropertyInObject.default,
|
|
166
|
-
"proposal-unicode-property-regex": () => _pluginProposalUnicodePropertyRegex.default,
|
|
167
|
-
"syntax-async-generators": () => _pluginSyntaxAsyncGenerators,
|
|
168
|
-
"syntax-class-properties": () => _pluginSyntaxClassProperties,
|
|
169
|
-
"syntax-class-static-block": () => _pluginSyntaxClassStaticBlock.default,
|
|
170
|
-
"syntax-dynamic-import": () => _pluginSyntaxDynamicImport,
|
|
171
|
-
"syntax-export-namespace-from": () => _pluginSyntaxExportNamespaceFrom,
|
|
172
|
-
"syntax-json-strings": () => _pluginSyntaxJsonStrings,
|
|
173
|
-
"syntax-logical-assignment-operators": () => _pluginSyntaxLogicalAssignmentOperators,
|
|
174
|
-
// "syntax-nullish-coalescing-operator": () => _pluginSyntaxNullishCoalescingOperator, // QCode Removed
|
|
175
|
-
"syntax-numeric-separator": () => _pluginSyntaxNumericSeparator,
|
|
176
|
-
"syntax-object-rest-spread": () => _pluginSyntaxObjectRestSpread,
|
|
177
|
-
"syntax-optional-catch-binding": () => _pluginSyntaxOptionalCatchBinding,
|
|
178
|
-
// "syntax-optional-chaining": () => _pluginSyntaxOptionalChaining, // QCode Removed
|
|
179
|
-
"syntax-private-property-in-object": () => _pluginSyntaxPrivatePropertyInObject.default,
|
|
180
|
-
"syntax-top-level-await": () => _pluginSyntaxTopLevelAwait.default,
|
|
181
|
-
"transform-arrow-functions": () => _pluginTransformArrowFunctions.default,
|
|
182
|
-
// "transform-async-to-generator": () => _pluginTransformAsyncToGenerator.default, // QCode Removed
|
|
183
|
-
"transform-block-scoped-functions": () => _pluginTransformBlockScopedFunctions.default,
|
|
184
|
-
"transform-block-scoping": () => _pluginTransformBlockScoping.default,
|
|
185
|
-
"transform-classes": () => _pluginTransformClasses.default,
|
|
186
|
-
"transform-computed-properties": () => _pluginTransformComputedProperties.default,
|
|
187
|
-
"transform-destructuring": () => _pluginTransformDestructuring.default,
|
|
188
|
-
"transform-dotall-regex": () => _pluginTransformDotallRegex.default,
|
|
189
|
-
"transform-duplicate-keys": () => _pluginTransformDuplicateKeys.default,
|
|
190
|
-
"transform-exponentiation-operator": () => _pluginTransformExponentiationOperator.default,
|
|
191
|
-
"transform-for-of": () => _pluginTransformForOf.default,
|
|
192
|
-
"transform-function-name": () => _pluginTransformFunctionName.default,
|
|
193
|
-
"transform-literals": () => _pluginTransformLiterals.default,
|
|
194
|
-
"transform-member-expression-literals": () => _pluginTransformMemberExpressionLiterals.default,
|
|
195
|
-
"transform-modules-amd": () => _pluginTransformModulesAmd.default,
|
|
196
|
-
"transform-modules-commonjs": () => _pluginTransformModulesCommonjs.default,
|
|
197
|
-
"transform-modules-systemjs": () => _pluginTransformModulesSystemjs.default,
|
|
198
|
-
"transform-modules-umd": () => _pluginTransformModulesUmd.default,
|
|
199
|
-
"transform-named-capturing-groups-regex": () => _pluginTransformNamedCapturingGroupsRegex.default,
|
|
200
|
-
"transform-new-target": () => _pluginTransformNewTarget.default,
|
|
201
|
-
"transform-object-super": () => _pluginTransformObjectSuper.default,
|
|
202
|
-
"transform-parameters": () => _pluginTransformParameters.default,
|
|
203
|
-
"transform-property-literals": () => _pluginTransformPropertyLiterals.default,
|
|
204
|
-
// "transform-regenerator": () => _pluginTransformRegenerator.default, // QCode Removed
|
|
205
|
-
"transform-reserved-words": () => _pluginTransformReservedWords.default,
|
|
206
|
-
"transform-shorthand-properties": () => _pluginTransformShorthandProperties.default,
|
|
207
|
-
"transform-spread": () => _pluginTransformSpread.default,
|
|
208
|
-
"transform-sticky-regex": () => _pluginTransformStickyRegex.default,
|
|
209
|
-
"transform-template-literals": () => _pluginTransformTemplateLiterals.default,
|
|
210
|
-
"transform-typeof-symbol": () => _pluginTransformTypeofSymbol.default,
|
|
211
|
-
"transform-unicode-escapes": () => _pluginTransformUnicodeEscapes.default,
|
|
212
|
-
"transform-unicode-regex": () => _pluginTransformUnicodeRegex.default
|
|
213
|
-
};
|
|
214
|
-
exports.default = _default;
|
|
215
|
-
const minVersions = {
|
|
216
|
-
"proposal-class-static-block": "7.12.0",
|
|
217
|
-
"proposal-private-property-in-object": "7.10.0"
|
|
218
|
-
};
|
|
219
|
-
exports.minVersions = minVersions;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
const path = require('path')
|
|
2
|
-
|
|
3
|
-
module.exports = (api, projectOptions) => {
|
|
4
|
-
const useThreads = process.env.NODE_ENV === 'production' && !!projectOptions.parallel
|
|
5
|
-
|
|
6
|
-
const { semver, loadModule } = require('@vue/cli-shared-utils')
|
|
7
|
-
const vue = loadModule('vue', api.service.context)
|
|
8
|
-
const isVue3 = (vue && semver.major(vue.version) === 3)
|
|
9
|
-
|
|
10
|
-
api.chainWebpack(config => {
|
|
11
|
-
config.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))
|
|
12
|
-
|
|
13
|
-
if (!projectOptions.pages) {
|
|
14
|
-
config.entry('main.jsv') // QCode Modified
|
|
15
|
-
.clear()
|
|
16
|
-
.add('./node_modules/@shijiu/jsview-vue/loader/jsview-main.js') // QCode Modified
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
config.resolve
|
|
20
|
-
.extensions
|
|
21
|
-
.prepend('.ts')
|
|
22
|
-
.prepend('.tsx')
|
|
23
|
-
|
|
24
|
-
const tsRule = config.module.rule('ts').test(/\.ts$/)
|
|
25
|
-
const tsxRule = config.module.rule('tsx').test(/\.tsx$/)
|
|
26
|
-
|
|
27
|
-
// add a loader to both *.ts & vue<lang="ts">
|
|
28
|
-
const addLoader = ({ name, loader, options }) => {
|
|
29
|
-
tsRule.use(name).loader(loader).options(options)
|
|
30
|
-
tsxRule.use(name).loader(loader).options(options)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
addLoader({
|
|
34
|
-
name: 'cache-loader',
|
|
35
|
-
loader: require.resolve('cache-loader'),
|
|
36
|
-
options: api.genCacheConfig('ts-loader', {
|
|
37
|
-
'ts-loader': require('ts-loader/package.json').version,
|
|
38
|
-
'typescript': require('typescript/package.json').version,
|
|
39
|
-
modern: !!process.env.VUE_CLI_MODERN_BUILD
|
|
40
|
-
}, 'tsconfig.json')
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
if (useThreads) {
|
|
44
|
-
addLoader({
|
|
45
|
-
name: 'thread-loader',
|
|
46
|
-
loader: require.resolve('thread-loader'),
|
|
47
|
-
options:
|
|
48
|
-
typeof projectOptions.parallel === 'number'
|
|
49
|
-
? { workers: projectOptions.parallel }
|
|
50
|
-
: {}
|
|
51
|
-
})
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (api.hasPlugin('babel')) {
|
|
55
|
-
addLoader({
|
|
56
|
-
name: 'babel-loader',
|
|
57
|
-
loader: require.resolve('babel-loader')
|
|
58
|
-
})
|
|
59
|
-
}
|
|
60
|
-
addLoader({
|
|
61
|
-
name: 'ts-loader',
|
|
62
|
-
loader: require.resolve('ts-loader'),
|
|
63
|
-
options: {
|
|
64
|
-
transpileOnly: true,
|
|
65
|
-
appendTsSuffixTo: ['\\.vue$'],
|
|
66
|
-
// https://github.com/TypeStrong/ts-loader#happypackmode-boolean-defaultfalse
|
|
67
|
-
happyPackMode: useThreads
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
// make sure to append TSX suffix
|
|
71
|
-
tsxRule.use('ts-loader').loader(require.resolve('ts-loader')).tap(options => {
|
|
72
|
-
options = Object.assign({}, options)
|
|
73
|
-
delete options.appendTsSuffixTo
|
|
74
|
-
options.appendTsxSuffixTo = ['\\.vue$']
|
|
75
|
-
return options
|
|
76
|
-
})
|
|
77
|
-
|
|
78
|
-
// this plugin does not play well with jest + cypress setup (tsPluginE2e.spec.js) somehow
|
|
79
|
-
// so temporarily disabled for vue-cli tests
|
|
80
|
-
if (!process.env.VUE_CLI_TEST) {
|
|
81
|
-
config
|
|
82
|
-
.plugin('fork-ts-checker')
|
|
83
|
-
.use(require('fork-ts-checker-webpack-plugin'), [{
|
|
84
|
-
typescript: {
|
|
85
|
-
extensions: {
|
|
86
|
-
vue: {
|
|
87
|
-
enabled: true,
|
|
88
|
-
compiler: isVue3 ? require.resolve('@vue/compiler-sfc') : require.resolve('vue-template-compiler')
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
diagnosticOptions: {
|
|
92
|
-
semantic: true,
|
|
93
|
-
// https://github.com/TypeStrong/ts-loader#happypackmode
|
|
94
|
-
syntactic: useThreads
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}])
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
}
|