@shijiu/jsview-vue 0.9.359-alpha.0 → 0.9.422
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/target_core_revision.js +3 -3
- package/loader/jsview.config.default.js +1 -1
- package/loader/jsview.default.config.js +1 -1
- package/loader/loader.js +2 -1
- package/package.json +1 -1
- package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-format.js +1 -1
- package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +20 -7
- package/samples/Basic/App.vue +37 -29
- package/samples/Basic/components/ContentBlock.vue +1 -1
- package/samples/Basic/components/FontStyle.css +6 -0
- package/samples/Basic/components/div/DivBackground.vue +1 -1
- package/samples/Basic/components/div/DivCssScoped.vue +6 -13
- package/samples/Basic/components/div/DivCssVar.vue +3 -7
- package/samples/Basic/components/div/DivGroup2.vue +7 -2
- package/samples/Basic/components/div/DivLayout.vue +3 -3
- package/samples/Basic/components/div/DivTransform.vue +27 -0
- package/samples/Basic/components/img/ImageGroup.vue +31 -0
- package/samples/Basic/components/img/ImgLayout.vue +41 -0
- package/samples/Basic/components/panel/Panel1.vue +53 -0
- package/samples/Basic/components/panel/Panel2.vue +35 -0
- package/samples/Basic/components/panel/TitleBar.vue +29 -0
- package/samples/Basic/components/text/TextEmoji.vue +30 -0
- package/samples/Basic/components/text/{TextGroup.vue → TextGroup1.vue} +0 -0
- package/samples/Basic/components/text/TextGroup2.vue +31 -0
- package/utils/JsViewEngineWidget/JsvFocusBlock.vue +13 -0
- package/utils/JsViewEngineWidget/MetroWidget/ContentView.vue +63 -0
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.js +19 -0
- package/utils/JsViewEngineWidget/MetroWidget/DivWrapper.vue +51 -0
- package/utils/JsViewEngineWidget/MetroWidget/ItemView.vue +220 -0
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +1860 -0
- package/utils/JsViewEngineWidget/MetroWidget/RootView.vue +153 -0
- package/utils/JsViewEngineWidget/SimpleWidget/SimpleWidget.vue +137 -118
- package/utils/JsViewEngineWidget/TemplateParser.js +212 -158
- package/utils/JsViewEngineWidget/index.js +3 -2
- package/utils/JsViewPlugin/BrowserPluginLoader.js +14 -0
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +502 -108
- package/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.js +101 -0
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +262 -92
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue +40 -0
- package/utils/JsViewPlugin/JsvPlayer/index.js +27 -0
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserTextureAnim.vue +1 -2
- package/utils/JsViewVueWidget/JsvMarquee.vue +18 -10
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +3 -3
- package/utils/JsViewVueWidget/JsvNinePatch.vue +28 -10
- package/samples/Basic/components/TitleBar.vue +0 -27
|
@@ -5,9 +5,13 @@
|
|
|
5
5
|
* style {Object} 同div的Style,通过width/height来控制.9图片延展后的显示尺寸,另外通过top/left控制坐标
|
|
6
6
|
* imageUrl {String} (必填)显示图片的加载地址
|
|
7
7
|
* imageWidth {int} (必填)原图信息: 原图的宽度(由于正方形,宽高相同)
|
|
8
|
-
* contentWidth {int} (
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* contentWidth {int} (废弃)此值为了兼容,会赋值给centerWidth
|
|
9
|
+
* centerWidth {int} (必填)原图信息: .9图的中心区域宽度(repeat区域)
|
|
10
|
+
* imageDspWidth {int} 原图缩放后的显示宽度,计算方法:
|
|
11
|
+
* 四角为90度圆弧时: imageDspWidth = 显示图形的圆弧半径 / 原图中圆弧的半径 * 原图宽度
|
|
12
|
+
* 原图中圆弧半径 = (原图宽度 - borderOutset * 2) / 2
|
|
13
|
+
* 四角为其他形状时,原图.9图的四角区域,缩放到要和显示图形重合后的宽度。
|
|
14
|
+
* borderOutset {int} (必填)原图信息: 图片边缘到中心内容区域的距离, 快速计算: (原图宽度 - 原图中放内容宽度) / 2
|
|
11
15
|
* animTime {int} (必填)缩放动画的时长(单位毫秒)
|
|
12
16
|
* waitForInit {boolean} 尺寸为0时是否进行描画(例如: 首次显示不展示动画的场合,设置为true),默认值为true
|
|
13
17
|
-->
|
|
@@ -24,12 +28,14 @@ export default {
|
|
|
24
28
|
},
|
|
25
29
|
top: { type: Number, default: 0 },
|
|
26
30
|
left: { type: Number, default: 0 },
|
|
27
|
-
borderOutset: { type: Number, default: 0 },
|
|
28
31
|
waitForInit: { type: Boolean, default: true },
|
|
29
32
|
|
|
30
|
-
imageUrl: String,
|
|
31
|
-
imageWidth: Number,
|
|
32
|
-
|
|
33
|
+
imageUrl: { type:String, required: true },
|
|
34
|
+
imageWidth: { type:Number, required: true },
|
|
35
|
+
imageDspWidth: { type:Number, default:0 },
|
|
36
|
+
contentWidth: { type:Number, default: -1},
|
|
37
|
+
centerWidth: { type:Number, default: -1, required: true },
|
|
38
|
+
borderOutset: { type:Number, required: true },
|
|
33
39
|
animTime: Number,
|
|
34
40
|
},
|
|
35
41
|
|
|
@@ -52,8 +58,20 @@ export default {
|
|
|
52
58
|
},
|
|
53
59
|
|
|
54
60
|
data() {
|
|
61
|
+
let center_width = (this.contentWidth >= 0 ? this.contentWidth : 0); // 兼容处理,contentWidth变更为centerWidth
|
|
62
|
+
if (this.centerWidth >= 0) {
|
|
63
|
+
center_width = this.centerWidth;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// slice_width 获取
|
|
67
|
+
let slice_width = Math.ceil(Math.max(0, (this.imageWidth - center_width) / 2));
|
|
68
|
+
|
|
69
|
+
let image_dsp_width = this.imageDspWidth > 0 ? this.imageDspWidth : this.imageWidth;
|
|
70
|
+
|
|
55
71
|
return {
|
|
56
|
-
sliceWidth:
|
|
72
|
+
sliceWidth: slice_width,
|
|
73
|
+
borderDspWidth: Math.ceil(slice_width * image_dsp_width / this.imageWidth), // 跟进图片的缩放信息
|
|
74
|
+
convertedBorderOutset: Math.ceil(this.borderOutset * image_dsp_width / this.imageWidth),
|
|
57
75
|
};
|
|
58
76
|
},
|
|
59
77
|
};
|
|
@@ -66,8 +84,8 @@ export default {
|
|
|
66
84
|
...style,
|
|
67
85
|
transition: getTransition(),
|
|
68
86
|
borderImage: `url(${imageUrl}) ${sliceWidth} fill`,
|
|
69
|
-
borderImageWidth: `${
|
|
70
|
-
borderImageOutset: `${
|
|
87
|
+
borderImageWidth: `${borderDspWidth}px`,
|
|
88
|
+
borderImageOutset: `${convertedBorderOutset}px`,
|
|
71
89
|
}"
|
|
72
90
|
/>
|
|
73
91
|
</template>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div class='title-font item-style' :style="{...itemSides, left: itemSides.width * 0}">div标签1</div>
|
|
4
|
-
<div class='title-font item-style' :style="{...itemSides, left: itemSides.width * 1}">div标签2</div>
|
|
5
|
-
<div class='title-font item-style' :style="{...itemSides, left: itemSides.width * 2}">div文本</div>
|
|
6
|
-
<div class='title-font item-style' :style="{...itemSides, left: itemSides.width * 3}">动画</div>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
props: {
|
|
13
|
-
itemSides: Object
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<style>
|
|
19
|
-
@import "./FontStyle.css";
|
|
20
|
-
</style>
|
|
21
|
-
|
|
22
|
-
<style scoped>
|
|
23
|
-
.item-style {
|
|
24
|
-
text-align: center;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
</style>
|