@shijiu/jsview-vue 2.2.128 → 2.2.201
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/bin/browser/BrowserApic.vue.mjs +2 -2
- package/bin/browser/BrowserApic2.vue.mjs +2 -2
- package/bin/browser/BrowserApicLib.mjs +8 -2
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +63 -0
- package/bin/jsview-vue.mjs +1604 -423
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +8 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +10 -12
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +3 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +3 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +2 -2
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +3 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +1 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +1 -1
- package/bin/types/JsViewEngineWidget/index.d.ts +10 -1
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +2 -2
- package/bin/types/JsViewVueTools/JsvFederationTools.d.ts +16 -0
- package/bin/types/JsViewVueTools/JsvPerformance.d.ts +5 -0
- package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +33 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +45 -1
- package/bin/types/JsViewVueTools/index.d.ts +19 -11
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +2 -1
- package/bin/types/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +70 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +104 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +43 -17
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +5 -5
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +4 -2
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +7 -7
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +61 -1
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +153 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +9 -4
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/index.d.ts +3 -0
- package/package.json +1 -1
- package/tools/config/rollup.config.mjs +1 -0
- package/utils/JsViewEngineWidget/JsvFocus/{JsvFocusManager.js → JsvFocusManager.ts} +12 -12
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.ts +20 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +27 -10
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +42 -10
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +320 -203
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +11 -0
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +8 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +20 -10
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +18 -0
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +7 -0
- package/utils/JsViewEngineWidget/{index.js → index.ts} +1 -1
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +21 -2
- package/utils/JsViewVueTools/ConstSymbol.ts +2 -2
- package/utils/JsViewVueTools/JsvPreDownloader.ts +3 -3
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +1 -1
- package/utils/JsViewVueTools/index.js +19 -19
- package/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +3 -3
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +3 -3
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +8 -3
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +42 -0
- package/utils/JsViewVueWidget/JsvClipDiv/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +5 -1
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +82 -0
- package/utils/JsViewVueWidget/JsvDriftScope/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +48 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +145 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +18 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +142 -63
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +15 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +19 -7
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +15 -11
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.ts +120 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +5 -1
- package/utils/JsViewVueWidget/JsvNinePatch.vue +13 -1
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +257 -48
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +468 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.ts +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts +13 -4
- package/utils/JsViewVueWidget/JsvScrollBox/index.ts +3 -0
- package/utils/JsViewVueWidget/index.js +3 -0
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.js +0 -19
- package/utils/JsViewVueWidget/JsvScrollBox/index.js +0 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
只显示单列/行的MetroWidget
|
|
3
3
|
-->
|
|
4
4
|
<script setup>
|
|
5
|
-
import { ref, shallowRef, computed, reactive } from "vue";
|
|
5
|
+
import { ref, shallowRef, computed, reactive, onMounted } from "vue";
|
|
6
6
|
import { setup } from "./MetroWidgetSetup";
|
|
7
7
|
import {
|
|
8
8
|
VERTICAL,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
SeamlessSlide,
|
|
12
12
|
RENDER_ITEM_BREAK_KEY,
|
|
13
13
|
} from "../WidgetCommon";
|
|
14
|
+
import { ForgeConst } from "../../JsViewVueTools/ForgeConstDefine.ts";
|
|
14
15
|
|
|
15
16
|
const props = defineProps({
|
|
16
17
|
padding: {
|
|
@@ -200,10 +201,20 @@ const {
|
|
|
200
201
|
touchDivSize,
|
|
201
202
|
"list"
|
|
202
203
|
);
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
|
|
205
|
+
onMounted(() => {
|
|
206
|
+
if (onTouchRelease) {
|
|
207
|
+
touchDiv.value.jsvSetTapListener(
|
|
208
|
+
{
|
|
209
|
+
onTouchEnd: onTouchRelease,
|
|
210
|
+
},
|
|
211
|
+
ForgeConst.DragFlags.TOUCH_RECV_MOVE_BIT |
|
|
212
|
+
ForgeConst.DragFlags.TOUCH_RECV_FLING_BIT |
|
|
213
|
+
ForgeConst.DragFlags.TOUCH_RECV_LAST_END
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
207
218
|
defineExpose(exportObject);
|
|
208
219
|
</script>
|
|
209
220
|
|
|
@@ -238,7 +249,6 @@ defineExpose(exportObject);
|
|
|
238
249
|
width: touchDivSize.width,
|
|
239
250
|
height: touchDivSize.height,
|
|
240
251
|
}"
|
|
241
|
-
v-on="touchDivVOn"
|
|
242
252
|
>
|
|
243
253
|
<div>
|
|
244
254
|
<slot name="background"></slot>
|
|
@@ -256,7 +266,13 @@ defineExpose(exportObject);
|
|
|
256
266
|
>
|
|
257
267
|
<div
|
|
258
268
|
v-for="(item, index) in renderData"
|
|
259
|
-
:key="
|
|
269
|
+
:key="
|
|
270
|
+
pageUpdateToken +
|
|
271
|
+
'_' +
|
|
272
|
+
item.index +
|
|
273
|
+
'-' +
|
|
274
|
+
item.renderKey.value
|
|
275
|
+
"
|
|
260
276
|
:ref="item.divRef"
|
|
261
277
|
data-jsv-vw-test-rect="1"
|
|
262
278
|
:style="{
|
|
@@ -287,9 +303,10 @@ defineExpose(exportObject);
|
|
|
287
303
|
</div>
|
|
288
304
|
<div
|
|
289
305
|
v-if="
|
|
290
|
-
enableItemRenderBreak
|
|
291
|
-
placeHolderSetting
|
|
292
|
-
!item.mounted.value
|
|
306
|
+
enableItemRenderBreak
|
|
307
|
+
&& placeHolderSetting
|
|
308
|
+
&& !item.mounted.value
|
|
309
|
+
&& item.itemConfig.showSkeleton
|
|
293
310
|
"
|
|
294
311
|
:style="{
|
|
295
312
|
width: item.renderStyle.width - normalizedPlaceHolder.gap,
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
uid {string}: item的uid, 可以通过uid来设置焦点
|
|
83
83
|
permanent {boolean}: 出去与是否保留
|
|
84
84
|
enableTap {boolean}: 是否接受触控tap
|
|
85
|
+
showSkeleton {boolean}: 打断描画时, 是否显示骨架图
|
|
85
86
|
}
|
|
86
87
|
*
|
|
87
88
|
* onFocus {function} 控件获取焦点的回调
|
|
@@ -156,7 +157,21 @@
|
|
|
156
157
|
lockChildSlideEvent: {boolean} 设置焦点时忽略子发过来的滚动事件
|
|
157
158
|
}
|
|
158
159
|
refreshData
|
|
159
|
-
@description
|
|
160
|
+
@description 刷新数据, 只有存在provideData时才会生效
|
|
161
|
+
当refresh时,根据下面的数据对比规则找出变化的数据
|
|
162
|
+
refresh时的对比逻辑:
|
|
163
|
+
1. 对比array里的object是否是同一个对象
|
|
164
|
+
2. 对比array里的jsvKey字段, 若一致则认为该数据未改变,即使object不相同
|
|
165
|
+
发现array中存在数据变化时,会如下的场景进行处理
|
|
166
|
+
场景1: array内部的数据变化了,无论末尾有没有增加: 变化的项目会重新触发measure,
|
|
167
|
+
若measure返回尺寸变化则调用所有项目measure重做布局
|
|
168
|
+
若measure返回尺寸未变化,则仅对变化项目的div进行key的调整来触发item的remount
|
|
169
|
+
场景2: array内部未变化,仅array末尾新增内容: 对末尾内容的项目做measure,布局进行追加处理,原布局内容保持(节省性能)
|
|
170
|
+
特别说明: jsvKey的使用方法提示
|
|
171
|
+
1. 用lastModify设置jsvKey,并将所有的item设置成同一个jsvKey,后续局部更新项目的jsvKey代表的lastModify
|
|
172
|
+
2. 后台运营对于素材是只新增不改动的策略时,用素材的id来命名jsvKey,array中间位置素材变化的时候,
|
|
173
|
+
更换jsvKey,以达到局部更新的目的,防止全体更新,从而提高响应的性能
|
|
174
|
+
|
|
160
175
|
@params {boolean} forceUpdate 是否强制刷新
|
|
161
176
|
getVisibleItems
|
|
162
177
|
@description 获取可视item的列表信息
|
|
@@ -265,6 +280,8 @@ import {
|
|
|
265
280
|
SeamlessSlide,
|
|
266
281
|
RENDER_ITEM_BREAK_KEY,
|
|
267
282
|
} from "../WidgetCommon";
|
|
283
|
+
import { ForgeConst } from "../../JsViewVueTools/ForgeConstDefine.ts";
|
|
284
|
+
|
|
268
285
|
const props = defineProps({
|
|
269
286
|
padding: {
|
|
270
287
|
type: Object,
|
|
@@ -454,10 +471,19 @@ const {
|
|
|
454
471
|
touchDivSize,
|
|
455
472
|
"common"
|
|
456
473
|
);
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
474
|
+
|
|
475
|
+
onMounted(() => {
|
|
476
|
+
if (onTouchRelease) {
|
|
477
|
+
touchDiv.value.jsvSetTapListener(
|
|
478
|
+
{
|
|
479
|
+
onTouchEnd: onTouchRelease,
|
|
480
|
+
},
|
|
481
|
+
ForgeConst.DragFlags.TOUCH_RECV_MOVE_BIT |
|
|
482
|
+
ForgeConst.DragFlags.TOUCH_RECV_FLING_BIT |
|
|
483
|
+
ForgeConst.DragFlags.TOUCH_RECV_LAST_END
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
});
|
|
461
487
|
|
|
462
488
|
defineExpose(exportObject);
|
|
463
489
|
</script>
|
|
@@ -493,7 +519,6 @@ defineExpose(exportObject);
|
|
|
493
519
|
width: touchDivSize.width,
|
|
494
520
|
height: touchDivSize.height,
|
|
495
521
|
}"
|
|
496
|
-
v-on="touchDivVOn"
|
|
497
522
|
>
|
|
498
523
|
<div>
|
|
499
524
|
<slot name="background"></slot>
|
|
@@ -511,7 +536,13 @@ defineExpose(exportObject);
|
|
|
511
536
|
>
|
|
512
537
|
<div
|
|
513
538
|
v-for="(item, index) in renderData"
|
|
514
|
-
:key="
|
|
539
|
+
:key="
|
|
540
|
+
pageUpdateToken +
|
|
541
|
+
'_' +
|
|
542
|
+
item.index +
|
|
543
|
+
'-' +
|
|
544
|
+
item.renderKey.value
|
|
545
|
+
"
|
|
515
546
|
:ref="item.divRef"
|
|
516
547
|
data-jsv-vw-test-rect="1"
|
|
517
548
|
:style="{
|
|
@@ -544,9 +575,10 @@ defineExpose(exportObject);
|
|
|
544
575
|
</div>
|
|
545
576
|
<div
|
|
546
577
|
v-if="
|
|
547
|
-
enableItemRenderBreak
|
|
548
|
-
placeHolderSetting
|
|
549
|
-
!item.mounted.value
|
|
578
|
+
enableItemRenderBreak
|
|
579
|
+
&& placeHolderSetting
|
|
580
|
+
&& !item.mounted.value
|
|
581
|
+
&& item.itemConfig.showSkeleton
|
|
550
582
|
"
|
|
551
583
|
:style="{
|
|
552
584
|
width: item.renderStyle.width - normalizedPlaceHolder.gap,
|