@shijiu/jsview-vue 0.9.631 → 0.9.766
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/jsview-browser-debug-dom.min.js +1 -1
- package/dom/bin/jsview-dom.min.js +1 -1
- package/dom/bin/jsview-engine-js-browser.min.js +1 -0
- package/dom/bin/jsview-forge-define.min.js +1 -1
- package/dom/jsv-engine-js-browser.js +6 -0
- package/dom/target_core_revision.js +4 -4
- package/loader/loader.js +4 -0
- package/package.json +1 -1
- package/patches/node_modules/@vue/cli-service/lib/config/base.js +1 -1
- package/samples/AnimPicture/App.vue +5 -5
- package/samples/Basic/components/div/DivLayout.vue +1 -1
- package/samples/Basic/components/img/ImageGroup.vue +2 -2
- package/samples/Basic/components/img/ImgLayout.vue +79 -15
- package/samples/Basic/components/text/TextDirection.vue +104 -0
- package/samples/Basic/components/text/TextEmoji.vue +1 -1
- package/samples/Basic/components/text/TextGroup1.vue +1 -1
- package/samples/Basic/components/text/TextGroup2.vue +11 -1
- package/samples/Basic/components/text/TextOverflow.vue +8 -3
- package/samples/BasicFocusControl/components/BaseBlock.vue +2 -2
- package/samples/Collision/App.vue +11 -11
- package/samples/DemoHomepage/App.vue +43 -8
- package/samples/DemoHomepage/router.js +18 -10
- package/samples/DemoHomepage/views/Homepage.vue +83 -96
- package/samples/FilterDemo/App.vue +1 -1
- package/samples/FlipCard/App.vue +2 -2
- package/samples/FlipCard/FlipCard.vue +3 -3
- package/samples/GridDemo/App.vue +3 -3
- package/samples/GridDemo/ButtonBlock.vue +2 -2
- package/samples/GridDemo/FocusItem.vue +2 -2
- package/samples/GridDemo/Item.vue +1 -1
- package/samples/HashHistory/App.vue +10 -3
- package/samples/HashHistory/components/Item.vue +1 -1
- package/samples/ImpactStop/App.vue +15 -11
- package/samples/Input/InputPanel.vue +1 -1
- package/samples/LongImage/Button.vue +1 -1
- package/samples/LongImage/ButtonItem.vue +1 -1
- package/samples/LongImage/LongImageScroll.vue +2 -2
- package/samples/LongText/App.vue +1 -1
- package/samples/LongText/Button.vue +1 -1
- package/samples/LongText/ButtonItem.vue +1 -1
- package/samples/LongText/LongTextScroll.vue +3 -3
- package/samples/Marquee/App.vue +176 -40
- package/samples/Marquee/longText.js +14 -0
- package/samples/MetroWidgetDemos/Advanced/App.vue +5 -6
- package/samples/MetroWidgetDemos/Advanced/ButtonItem.vue +4 -4
- package/samples/MetroWidgetDemos/Advanced/Buttons.vue +5 -5
- package/samples/MetroWidgetDemos/Advanced/Mixed.vue +4 -4
- package/samples/MetroWidgetDemos/Advanced/widgets/Item.vue +82 -0
- package/samples/MetroWidgetDemos/Advanced/widgets/WidgetItem.vue +88 -0
- package/samples/MetroWidgetDemos/Advanced/{Widgets.vue → widgets/Widgets.vue} +56 -11
- package/samples/MetroWidgetDemos/Advanced/widgets/focus1.png +0 -0
- package/samples/MetroWidgetDemos/Item.vue +4 -2
- package/samples/MetroWidgetDemos/PerformanceTest/App.vue +4 -4
- package/samples/MetroWidgetDemos/PerformanceTest/components/ContentItem.vue +1 -1
- package/samples/MetroWidgetDemos/PerformanceTest/components/MyTab.vue +3 -3
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +2 -2
- package/samples/MetroWidgetDemos/PingPong/TabItem.vue +1 -1
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +3 -3
- package/samples/MetroWidgetDemos/Simple/AbsoluteTemplate.vue +2 -2
- package/samples/MetroWidgetDemos/Simple/App.vue +2 -2
- package/samples/MetroWidgetDemos/Simple/RelativeTemplate.vue +6 -6
- package/samples/MetroWidgetDemos/WidgetItem.vue +2 -3
- package/samples/MetroWidgetDemos/data.js +2 -1
- package/samples/NinePatchDemo/App.vue +2 -2
- package/samples/NinePatchDemo/Item.vue +2 -2
- package/samples/Preload/App.vue +1 -1
- package/samples/Preload/Item.vue +1 -1
- package/samples/QrcodeDemo/App.vue +1 -1
- package/samples/ScaleDownNeon/App.vue +107 -0
- package/samples/SoundPool/App.vue +3 -3
- package/samples/SpriteImage/App.vue +5 -0
- package/samples/TextBox/App.vue +9 -82
- package/samples/TextBox/RenderCenter.vue +40 -16
- package/samples/TextBox/RenderLeft.vue +48 -19
- package/samples/TextBox/RenderOneLine.vue +30 -49
- package/samples/TextBox/RenderRight.vue +40 -16
- package/samples/TextShadowDemo/App.vue +11 -17
- package/samples/TextureAnimation/App2.vue +1 -1
- package/samples/TextureSize/App.vue +3 -3
- package/samples/ThrowMoveDemo/LRParabolicDemo.vue +33 -47
- package/samples/TouchSample/MetroWidgetHorizontal.vue +1 -1
- package/samples/TouchSample/MetroWidgetVertical.vue +1 -1
- package/samples/TransitPage/App.vue +1 -1
- package/samples/VideoDemo/App.vue +8 -8
- package/samples/VideoDemo/components/Button.vue +1 -1
- package/samples/VideoDemo/components/Controllor.vue +1 -1
- package/samples/VisibleSensorDemo/App.vue +3 -3
- package/scripts/jsview-run-android.js +5 -4
- package/utils/JsViewEngineWidget/JsvFocusBlock.vue +4 -4
- package/utils/JsViewEngineWidget/MetroWidget/Const.js +11 -0
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +245 -111
- package/utils/JsViewEngineWidget/TemplateParser.js +227 -178
- package/utils/JsViewEngineWidget/WidgetCommon.js +14 -6
- package/utils/JsViewEngineWidget/index.js +3 -2
- package/utils/JsViewPlugin/BrowserPluginLoader.js +4 -2
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +302 -0
- package/utils/JsViewPlugin/JsvAudio/CheckType.js +68 -0
- package/utils/JsViewPlugin/JsvAudio/Events.js +17 -0
- package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +176 -0
- package/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.js +40 -0
- package/utils/JsViewPlugin/JsvAudio/JsvAudioBrowser.vue +46 -0
- package/utils/JsViewPlugin/JsvAudio/PluginLoader.js +140 -0
- package/utils/JsViewPlugin/JsvAudio/index.js +26 -0
- package/utils/JsViewPlugin/JsvAudio/version.js +24 -0
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +61 -12
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +8 -1
- package/utils/JsViewPlugin/JsvPlayer/index.js +14 -0
- package/utils/JsViewPlugin/JsvPlayer/version.js +5 -5
- package/utils/JsViewVueTools/JsvHashHistory.js +34 -8
- package/utils/JsViewVueTools/JsvImpactTracer.js +2 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +46 -8
- package/utils/JsViewVueTools/JsvStyleClass.js +9 -0
- package/utils/JsViewVueTools/JsvTextTools.js +18 -0
- package/utils/JsViewVueTools/TypeCheckAndSet.js +3 -3
- package/utils/JsViewVueTools/index.js +2 -1
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +5 -7
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +20 -22
- package/utils/JsViewVueWidget/JsvApic/JsvApic.vue +4 -4
- package/utils/JsViewVueWidget/JsvGrid.vue +1 -9
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +1 -1
- package/utils/JsViewVueWidget/JsvMarquee.vue +188 -205
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +35 -27
- package/utils/JsViewVueWidget/JsvNinePatch.vue +63 -54
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +10 -5
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -2
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +21 -5
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +23 -3
- package/utils/JsViewVueWidget/JsvTextBox.vue +27 -84
- package/utils/JsViewVueWidget/JsvTouchContainer.vue +5 -6
- package/utils/JsViewVueWidget/JsvTransparentDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +5 -5
- package/utils/JsViewVueWidget/index.js +8 -8
- package/utils/JsViewEngineWidget/MetroPage.js +0 -2128
- package/utils/JsViewEngineWidget/SimpleWidget/ContentView.vue +0 -51
- package/utils/JsViewEngineWidget/SimpleWidget/Dispatcher.js +0 -19
- package/utils/JsViewEngineWidget/SimpleWidget/DivWrapper.vue +0 -53
- package/utils/JsViewEngineWidget/SimpleWidget/ItemView.vue +0 -142
- package/utils/JsViewEngineWidget/SimpleWidget/RootView.vue +0 -140
- package/utils/JsViewEngineWidget/SimpleWidget/SimpleWidget.vue +0 -1629
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
const TargetRevision = {
|
|
6
|
-
"CoreRevision":
|
|
7
|
-
"CoreRevisionAndBranch": "
|
|
8
|
-
"JseRevision": "1.0.
|
|
6
|
+
"CoreRevision": 1021277,
|
|
7
|
+
"CoreRevisionAndBranch": "1021277",
|
|
8
|
+
"JseRevision": "1.0.830",
|
|
9
9
|
"JseUrl":
|
|
10
|
-
"http://cdn.release.qcast.cn/forge_js/master/
|
|
10
|
+
"http://cdn.release.qcast.cn/forge_js/master/JsViewES6_react_r830.jsv.9e271859.js"
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// 不要用export default,update-env脚本不能解析
|
package/loader/loader.js
CHANGED
|
@@ -52,6 +52,10 @@ async function selectJsViewRuntime(js_sub_path, input_designed_map, app_name) {
|
|
|
52
52
|
window.JsView.ForgeExt = app_define.ForgeExtension;
|
|
53
53
|
window.JsView.Dom.JsSubPath = js_sub_path;
|
|
54
54
|
} else {
|
|
55
|
+
// 在PC环境下没有处理加载EngineJs, 所以在此加载一下
|
|
56
|
+
await import("../dom/jsv-engine-js-browser.js");
|
|
57
|
+
|
|
58
|
+
// 加载jsv-dom的调试版本
|
|
55
59
|
await import("../dom/jsv-browser-debug-dom.js");
|
|
56
60
|
}
|
|
57
61
|
}
|
package/package.json
CHANGED
|
@@ -129,7 +129,7 @@ module.exports = (api, options) => {
|
|
|
129
129
|
.loader(require.resolve('vue-loader'))
|
|
130
130
|
.options({
|
|
131
131
|
...vueLoaderCacheConfig,
|
|
132
|
-
compilerOptions: { isCustomElement: tag => tag === 'fdiv' }, // QCode Added
|
|
132
|
+
compilerOptions: { isCustomElement: tag => (tag === 'fdiv' || tag === 'audiotrack') }, // QCode Added
|
|
133
133
|
babelParserPlugins: ['jsx', 'classProperties', 'decorators-legacy']
|
|
134
134
|
})
|
|
135
135
|
.end()
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
|
-
import { ref } from "vue";
|
|
9
|
+
import { ref, shallowRef } from "vue";
|
|
10
10
|
import { useRouter, useRoute } from "vue-router";
|
|
11
11
|
import { LoopType, JsvApic } from "jsview";
|
|
12
12
|
import catRun from "./assets/animated_webp.webp";
|
|
@@ -53,10 +53,10 @@ const ballCallback = {
|
|
|
53
53
|
ballPlay.value = false;
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
|
-
let catRunRef =
|
|
57
|
-
let girlRunRef =
|
|
58
|
-
let quanRef =
|
|
59
|
-
let ballRef =
|
|
56
|
+
let catRunRef = shallowRef(null);
|
|
57
|
+
let girlRunRef = shallowRef(null);
|
|
58
|
+
let quanRef = shallowRef(null);
|
|
59
|
+
let ballRef = shallowRef(null);
|
|
60
60
|
|
|
61
61
|
const onKeyDown = (ev) => {
|
|
62
62
|
if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id='item-root'>
|
|
3
|
-
<ContentBlock :class=contentClass :style="{top:itemSides.height*0}" :=contentBlockProps :index=0 title="
|
|
3
|
+
<ContentBlock :class=contentClass :style="{top:itemSides.height*0}" :=contentBlockProps :index=0 title="img标签ObjectFit">
|
|
4
4
|
<ImgLayout/>
|
|
5
5
|
</ContentBlock>
|
|
6
6
|
</div>
|
|
@@ -23,7 +23,7 @@ export default {
|
|
|
23
23
|
contentBlockProps() {
|
|
24
24
|
return {
|
|
25
25
|
colIndex: 0,
|
|
26
|
-
itemSides: this.itemSides
|
|
26
|
+
itemSides:{...this.itemSides, height: this.itemSides.height * 2}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,13 +1,54 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div id='layout-root'>
|
|
3
3
|
<div style="{top: 0}">
|
|
4
|
-
<div
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
<div id="0列0行" :style="{left: coloumWidth * 0, top: tabLineHeight * 0}">
|
|
5
|
+
<div class="content-font titleStyle"> fill(缩放变形)</div>
|
|
6
|
+
<div class="frameStyle">
|
|
7
|
+
<img class="imageStyle" :style="{ objectFit: 'fill' }"
|
|
8
|
+
:src="testImgPath"/>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div id="1列0行" :style="{left: coloumWidth * 1, top: tabLineHeight * 0}">
|
|
12
|
+
<div class="content-font titleStyle">contain</div>
|
|
13
|
+
<div class="frameStyle">
|
|
14
|
+
<img class="imageStyle" :style="{ objectFit: 'contain' }"
|
|
15
|
+
:src="testImgPath"/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div id="0列1行" :style="{left: coloumWidth * 0, top: tabLineHeight * 1}">
|
|
19
|
+
<div class="content-font titleStyle">none</div>
|
|
20
|
+
<div class="frameStyle">
|
|
21
|
+
<img class="imageStyle" :style="{ objectFit: 'none' }"
|
|
22
|
+
:src="testImgPath"/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div id="1列1行" :style="{left: coloumWidth * 1, top: tabLineHeight * 1}">
|
|
26
|
+
<div class="content-font titleStyle">scale-down</div>
|
|
27
|
+
<div class="frameStyle">
|
|
28
|
+
<img class="imageStyle" :style="{ objectFit: 'scale-down' }"
|
|
29
|
+
:src="testImgPath"/>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div id="0列2行" :style="{left: coloumWidth * 0, top: tabLineHeight * 2}">
|
|
33
|
+
<div class="content-font titleStyle">cover</div>
|
|
34
|
+
<div class="frameStyle">
|
|
35
|
+
<img class="imageStyle" :style="{ objectFit: 'cover' }"
|
|
36
|
+
:src="testImgPath"/>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div id="1列2行" :style="{left: coloumWidth * 1, top: tabLineHeight * 2}">
|
|
40
|
+
<div class="content-font titleStyle">none(小图)</div>
|
|
41
|
+
<div class="frameStyle">
|
|
42
|
+
<img class="imageStyle" :style="{ objectFit: 'none' }"
|
|
43
|
+
:src="tinyImgPath"/>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div id="0列3行" :style="{left: coloumWidth * 0, top: tabLineHeight * 3}">
|
|
47
|
+
<div class="content-font titleStyle">scale-down(小图)</div>
|
|
48
|
+
<div class="frameStyle">
|
|
49
|
+
<img class="imageStyle" :style="{ objectFit: 'scale-down' }"
|
|
50
|
+
:src="tinyImgPath"/>
|
|
51
|
+
</div>
|
|
11
52
|
</div>
|
|
12
53
|
</div>
|
|
13
54
|
</div>
|
|
@@ -15,27 +56,50 @@
|
|
|
15
56
|
|
|
16
57
|
<script>
|
|
17
58
|
import testImgPath from '../../assets/test.jpg';
|
|
59
|
+
import tinyImgPath from '../../assets/icon.png';
|
|
18
60
|
|
|
19
61
|
export default {
|
|
20
62
|
computed: {
|
|
21
63
|
testImgPath() {
|
|
22
64
|
return testImgPath;
|
|
23
65
|
},
|
|
24
|
-
|
|
25
|
-
return
|
|
66
|
+
tinyImgPath() {
|
|
67
|
+
return tinyImgPath;
|
|
26
68
|
},
|
|
27
|
-
|
|
28
|
-
return
|
|
29
|
-
width: 80,
|
|
30
|
-
height: 64,
|
|
31
|
-
}
|
|
69
|
+
coloumWidth() {
|
|
70
|
+
return 120;
|
|
32
71
|
},
|
|
72
|
+
tabLineHeight() {
|
|
73
|
+
return 76; // imageSize.height + 26
|
|
74
|
+
}
|
|
33
75
|
}
|
|
34
76
|
}
|
|
35
77
|
|
|
36
78
|
</script>
|
|
37
79
|
|
|
38
80
|
|
|
39
|
-
<style>
|
|
81
|
+
<style scoped>
|
|
40
82
|
@import "../FontStyle.css";
|
|
83
|
+
</style>
|
|
84
|
+
|
|
85
|
+
<style scoped>
|
|
86
|
+
.titleStyle {
|
|
87
|
+
width: 100;
|
|
88
|
+
height: 16;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.imageStyle {
|
|
92
|
+
top: 2;
|
|
93
|
+
left: 2;
|
|
94
|
+
width: 100;
|
|
95
|
+
height: 50;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.frameStyle {
|
|
99
|
+
top: 16; /* titleHeight */
|
|
100
|
+
width: 104; /* imageSize.width+4 */
|
|
101
|
+
height: 54; /* imageSize.height+4 */
|
|
102
|
+
background-color: rgba(0, 255, 0, 1)
|
|
103
|
+
}
|
|
104
|
+
|
|
41
105
|
</style>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const gap = 5;
|
|
3
|
+
const blockSize = {
|
|
4
|
+
width: 180,
|
|
5
|
+
height: 30,
|
|
6
|
+
};
|
|
7
|
+
const unitHeight = 20 + 35;
|
|
8
|
+
|
|
9
|
+
const ltrText = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
10
|
+
const rtlText = "شلؤيثبلاهتنمةىخحضقسفعررصءغئا";
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div id="layout-root">
|
|
15
|
+
<div
|
|
16
|
+
:style="{
|
|
17
|
+
top: unitHeight * 0,
|
|
18
|
+
}"
|
|
19
|
+
>
|
|
20
|
+
<div class="explain">ltr文字省略尾部</div>
|
|
21
|
+
<div
|
|
22
|
+
class="content-font base"
|
|
23
|
+
:style="{
|
|
24
|
+
direction: 'ltr',
|
|
25
|
+
}"
|
|
26
|
+
>
|
|
27
|
+
{{ ltrText }}
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div
|
|
32
|
+
:style="{
|
|
33
|
+
top: unitHeight * 1,
|
|
34
|
+
}"
|
|
35
|
+
>
|
|
36
|
+
<div class="explain">ltr文字省略头部</div>
|
|
37
|
+
<div
|
|
38
|
+
class="content-font base"
|
|
39
|
+
:style="{
|
|
40
|
+
direction: 'rtl',
|
|
41
|
+
}"
|
|
42
|
+
>
|
|
43
|
+
{{ ltrText }}
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div
|
|
48
|
+
:style="{
|
|
49
|
+
top: unitHeight * 2,
|
|
50
|
+
}"
|
|
51
|
+
>
|
|
52
|
+
<div class="explain">rtl文字省略尾部</div>
|
|
53
|
+
<div
|
|
54
|
+
class="content-font base"
|
|
55
|
+
:style="{
|
|
56
|
+
direction: 'rtl',
|
|
57
|
+
}"
|
|
58
|
+
>
|
|
59
|
+
{{ rtlText }}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div
|
|
64
|
+
:style="{
|
|
65
|
+
top: unitHeight * 3,
|
|
66
|
+
}"
|
|
67
|
+
>
|
|
68
|
+
<div class="explain">rtl文字省略头部</div>
|
|
69
|
+
<div
|
|
70
|
+
class="content-font base"
|
|
71
|
+
:style="{
|
|
72
|
+
direction: 'ltr',
|
|
73
|
+
}"
|
|
74
|
+
>
|
|
75
|
+
{{ rtlText }}
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<style>
|
|
82
|
+
@import "../FontStyle.css";
|
|
83
|
+
|
|
84
|
+
.base {
|
|
85
|
+
top: 25px;
|
|
86
|
+
width: 180px;
|
|
87
|
+
height: 30px;
|
|
88
|
+
line-height: 30px;
|
|
89
|
+
background-color: rgba(255, 255, 0, 0.5);
|
|
90
|
+
color: #ff0000;
|
|
91
|
+
font-size: 25px;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
overflow: hidden;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.explain {
|
|
98
|
+
width: 180px;
|
|
99
|
+
height: 20px;
|
|
100
|
+
line-height: 20px;
|
|
101
|
+
font-size: 15px;
|
|
102
|
+
color: #000000;
|
|
103
|
+
}
|
|
104
|
+
</style>
|
|
@@ -38,7 +38,7 @@ const contentBlockProps = {
|
|
|
38
38
|
<ContentBlock
|
|
39
39
|
:class="contentClass"
|
|
40
40
|
:style="{ top: itemSides.height * 2 }"
|
|
41
|
-
:="{ ...contentBlockProps, itemSides: { ...itemSides, height:
|
|
41
|
+
:="{ ...contentBlockProps, itemSides: { ...itemSides, height: 320 } }"
|
|
42
42
|
:index="2"
|
|
43
43
|
title="文字折行"
|
|
44
44
|
>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import ContentBlock from "../ContentBlock";
|
|
3
3
|
import TextEmoji from "./TextEmoji";
|
|
4
|
+
import TextDirection from "./TextDirection.vue";
|
|
4
5
|
|
|
5
6
|
const props = defineProps({
|
|
6
7
|
contentClass: String,
|
|
@@ -19,10 +20,19 @@ const contentBlockProps = {
|
|
|
19
20
|
:style="{ top: itemSides.height * 0 }"
|
|
20
21
|
:="contentBlockProps"
|
|
21
22
|
:index="0"
|
|
22
|
-
title="
|
|
23
|
+
title="emoji"
|
|
23
24
|
>
|
|
24
25
|
<TextEmoji />
|
|
25
26
|
</ContentBlock>
|
|
27
|
+
<ContentBlock
|
|
28
|
+
:class="contentClass"
|
|
29
|
+
:style="{ top: itemSides.height * 1 }"
|
|
30
|
+
:="{ ...contentBlockProps, itemSides: { ...itemSides, height: 250 } }"
|
|
31
|
+
:index="0"
|
|
32
|
+
title="不同方向文字省略"
|
|
33
|
+
>
|
|
34
|
+
<text-direction />
|
|
35
|
+
</ContentBlock>
|
|
26
36
|
</div>
|
|
27
37
|
</template>
|
|
28
38
|
|
|
@@ -10,7 +10,12 @@ const baseStyle = {
|
|
|
10
10
|
backgroundColor: "rgba(255, 255, 0, 0.5)",
|
|
11
11
|
color: "rgba(255, 0, 0, 1)",
|
|
12
12
|
};
|
|
13
|
-
const
|
|
13
|
+
const multiLineCut =
|
|
14
|
+
"多行文字(末尾截断):" +
|
|
15
|
+
'\n第一行:我末尾有个"\\n"' +
|
|
16
|
+
"\n第二行:一二三四五六七八九十,一二三四五六七八九十,一二三四五六七八九十" +
|
|
17
|
+
"\n第三行:一二三四五六七八九十,一二三四五六七八九十,一二三四五六七八九十";
|
|
18
|
+
const multiLineEllipsis =
|
|
14
19
|
"多行文字(末尾省略):" +
|
|
15
20
|
'\n第一行:我末尾有个"\\n"' +
|
|
16
21
|
"\n第二行:一二三四五六七八九十,一二三四五六七八九十,一二三四五六七八九十" +
|
|
@@ -81,7 +86,7 @@ const multiLine =
|
|
|
81
86
|
overflow: 'hidden',
|
|
82
87
|
}"
|
|
83
88
|
>
|
|
84
|
-
5.{{
|
|
89
|
+
5.{{ multiLineCut }}
|
|
85
90
|
</div>
|
|
86
91
|
|
|
87
92
|
<div
|
|
@@ -95,7 +100,7 @@ const multiLine =
|
|
|
95
100
|
overflow: 'hidden',
|
|
96
101
|
}"
|
|
97
102
|
>
|
|
98
|
-
6.{{
|
|
103
|
+
6.{{ multiLineEllipsis }}
|
|
99
104
|
</div>
|
|
100
105
|
</div>
|
|
101
106
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, onMounted } from "vue";
|
|
2
|
+
import { ref, shallowRef, onMounted } from "vue";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
name: String,
|
|
5
5
|
style: {
|
|
@@ -12,7 +12,7 @@ const props = defineProps({
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
const fullName = ref("");
|
|
15
|
-
const blockRef =
|
|
15
|
+
const blockRef = shallowRef(null);
|
|
16
16
|
const hasFocused = ref(false);
|
|
17
17
|
|
|
18
18
|
onMounted(() => {
|
|
@@ -7,21 +7,21 @@
|
|
|
7
7
|
-->
|
|
8
8
|
<script setup>
|
|
9
9
|
import { createImpactTracer, createImpactCallback } from "jsview";
|
|
10
|
-
import { ref, onMounted, onBeforeUnmount } from "vue";
|
|
10
|
+
import { ref, shallowRef, onMounted, onBeforeUnmount } from "vue";
|
|
11
11
|
import { useRouter } from "vue-router";
|
|
12
12
|
|
|
13
13
|
const router = useRouter();
|
|
14
14
|
|
|
15
|
-
const transEle1 =
|
|
16
|
-
transEle2 =
|
|
17
|
-
rotateEle1 =
|
|
18
|
-
rotateEle2 =
|
|
19
|
-
rotateEle3 =
|
|
20
|
-
rotateEle4 =
|
|
21
|
-
scaleEle1 =
|
|
22
|
-
scaleEle2 =
|
|
23
|
-
skewEle1 =
|
|
24
|
-
skewEle2 =
|
|
15
|
+
const transEle1 = shallowRef(null),
|
|
16
|
+
transEle2 = shallowRef(null),
|
|
17
|
+
rotateEle1 = shallowRef(null),
|
|
18
|
+
rotateEle2 = shallowRef(null),
|
|
19
|
+
rotateEle3 = shallowRef(null),
|
|
20
|
+
rotateEle4 = shallowRef(null),
|
|
21
|
+
scaleEle1 = shallowRef(null),
|
|
22
|
+
scaleEle2 = shallowRef(null),
|
|
23
|
+
skewEle1 = shallowRef(null),
|
|
24
|
+
skewEle2 = shallowRef(null);
|
|
25
25
|
|
|
26
26
|
let sensors = [];
|
|
27
27
|
|
|
@@ -5,23 +5,58 @@
|
|
|
5
5
|
* @LastEditTime: 2022-07-12 13:40:15
|
|
6
6
|
* @Description: file content
|
|
7
7
|
-->
|
|
8
|
+
<script setup>
|
|
9
|
+
import { shallowRef, onMounted, defineExpose } from "vue";
|
|
10
|
+
import { JsvPreload, buildPreloadInfo, jJsvRuntimeBridge } from "jsview";
|
|
11
|
+
|
|
12
|
+
let backgroundImageUrl = shallowRef(null);
|
|
13
|
+
|
|
14
|
+
let preloadInfo = shallowRef([]);
|
|
15
|
+
|
|
16
|
+
let _onPreloadDone = () => {
|
|
17
|
+
console.log("background load done");
|
|
18
|
+
jJsvRuntimeBridge.notifyPageLoaded();
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
console.log("simulate async get background url");
|
|
23
|
+
setTimeout(() => {
|
|
24
|
+
console.log("simulate background url got");
|
|
25
|
+
backgroundImageUrl.value =
|
|
26
|
+
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/BackgroundLongmao.jpg";
|
|
27
|
+
preloadInfo.value = [buildPreloadInfo(backgroundImageUrl.value)];
|
|
28
|
+
}, 0);
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
|
|
8
32
|
<script>
|
|
9
33
|
import { router } from "./router.js";
|
|
10
|
-
import { jJsvRuntimeBridge } from "jsview";
|
|
11
|
-
|
|
12
34
|
export default {
|
|
13
35
|
Router: router,
|
|
14
|
-
mounted() {
|
|
15
|
-
jJsvRuntimeBridge.notifyPageLoaded();
|
|
16
|
-
},
|
|
17
36
|
};
|
|
18
37
|
</script>
|
|
19
38
|
|
|
20
39
|
<template>
|
|
21
40
|
<div>
|
|
22
|
-
<
|
|
41
|
+
<jsv-preload
|
|
42
|
+
:key="backgroundImageUrl"
|
|
43
|
+
:preloadList="preloadInfo"
|
|
44
|
+
:onPreloadDone="_onPreloadDone"
|
|
45
|
+
/>
|
|
46
|
+
<div
|
|
47
|
+
:style="{
|
|
48
|
+
width: 1280,
|
|
49
|
+
height: 720,
|
|
50
|
+
backgroundImage: backgroundImageUrl,
|
|
51
|
+
}"
|
|
52
|
+
/>
|
|
53
|
+
<router-view v-slot="{ Component, route }">
|
|
54
|
+
<keep-alive>
|
|
55
|
+
<component v-if="route.meta.keepAlive" :is="Component" />
|
|
56
|
+
</keep-alive>
|
|
57
|
+
<component v-if="!route.meta.keepAlive" :is="Component" />
|
|
58
|
+
</router-view>
|
|
23
59
|
</div>
|
|
24
60
|
</template>
|
|
25
61
|
|
|
26
|
-
<style scoped>
|
|
27
|
-
</style>
|
|
62
|
+
<style scoped></style>
|
|
@@ -7,6 +7,9 @@ const routeList = [
|
|
|
7
7
|
name: "Home",
|
|
8
8
|
path: "/",
|
|
9
9
|
component: () => import("./views/Homepage"),
|
|
10
|
+
meta: {
|
|
11
|
+
keepAlive: true // 需要被缓存(测试Router keep alive机制)
|
|
12
|
+
}
|
|
10
13
|
},
|
|
11
14
|
{
|
|
12
15
|
name: "基础示例合集",
|
|
@@ -28,11 +31,11 @@ const routeList = [
|
|
|
28
31
|
path: "/feature/NinePatchDemo",
|
|
29
32
|
component: () => import("jsview/samples/NinePatchDemo/App"),
|
|
30
33
|
},
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
34
|
+
// {
|
|
35
|
+
// name: "视频",
|
|
36
|
+
// path: "/feature/VideoDemo",
|
|
37
|
+
// component: () => import("jsview/samples/VideoDemo/App"),
|
|
38
|
+
// },
|
|
36
39
|
{
|
|
37
40
|
name: "焦点切换demo",
|
|
38
41
|
path: "/feature/BasicFocusControl",
|
|
@@ -144,16 +147,21 @@ const routeList = [
|
|
|
144
147
|
path: "/feature/Preload",
|
|
145
148
|
component: () => import("jsview/samples/Preload/App"),
|
|
146
149
|
},
|
|
150
|
+
{
|
|
151
|
+
name: "图片缩小算法",
|
|
152
|
+
path: "/feature/ScaleDownNeon",
|
|
153
|
+
component: () => import("jsview/samples/ScaleDownNeon/App"),
|
|
154
|
+
},
|
|
147
155
|
// {
|
|
148
156
|
// name: "碰撞检测",
|
|
149
157
|
// path: "/feature/Collision",
|
|
150
158
|
// component: () => import("jsview/samples/Collision/App"),
|
|
151
159
|
// },
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
{
|
|
161
|
+
name: "碰撞即停",
|
|
162
|
+
path: "/feature/ImpactStop",
|
|
163
|
+
component: () => import("jsview/samples/ImpactStop/App"),
|
|
164
|
+
},
|
|
157
165
|
|
|
158
166
|
// MetroWidget示例
|
|
159
167
|
{
|