htui-yllkbz 1.3.23 → 1.3.24
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/lib/htui.common.js +6339 -4413
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.umd.js +6339 -4413
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +6 -5
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +2 -2
- package/src/main.ts +10 -0
- package/src/packages/HtTwee/index.vue +7 -6
- package/src/plugins/HtTwee.js +11 -11
- package/src/views/About.vue +2 -3
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htui-yllkbz",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.24",
|
|
4
4
|
"typings": "types/index.d.ts",
|
|
5
5
|
"main": "lib/htui.common.js",
|
|
6
6
|
"style": "lib/htui.css",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"core-js": "^3.6.5",
|
|
24
24
|
"element-ui": "^2.14.1",
|
|
25
25
|
"html2canvas": "1.0.0-rc.1",
|
|
26
|
-
"htui-yllkbz": "^1.
|
|
26
|
+
"htui-yllkbz": "^1.3.23",
|
|
27
27
|
"mavon-editor": "^2.10.4",
|
|
28
28
|
"moment": "^2.29.1",
|
|
29
29
|
"vue": "^2.6.11",
|
package/src/main.ts
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Descripttion:
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2021-11-15 14:41:40
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2022-04-29 17:05:53
|
|
8
|
+
*/
|
|
1
9
|
import Vue from "vue";
|
|
2
10
|
import App from "./App.vue";
|
|
3
11
|
import VueRouter from "vue-router";
|
|
4
12
|
import routes from "./router";
|
|
5
13
|
import store from "./store";
|
|
6
14
|
import ElementUI from "element-ui";
|
|
15
|
+
import HtUi from "htui-yllkbz";
|
|
7
16
|
import "./styles.scss";
|
|
8
17
|
import { _axios, baseConfig } from "vue-kst-auth";
|
|
9
18
|
// import axios from "axios";
|
|
10
19
|
Vue.use(ElementUI);
|
|
11
20
|
Vue.use(VueRouter);
|
|
21
|
+
Vue.use(HtUi);
|
|
12
22
|
|
|
13
23
|
/** 设置axios返回类型 */
|
|
14
24
|
Vue.config.productionTip = false;
|
|
@@ -4,13 +4,11 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-04-29 16:30:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-04-29
|
|
7
|
+
* @LastEditTime: 2022-04-29 17:14:19
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<canvas ref="ht-twee"></canvas>
|
|
13
|
-
</div>
|
|
10
|
+
|
|
11
|
+
<canvas :ref="tweeRef||'ht-twee'"></canvas>
|
|
14
12
|
|
|
15
13
|
</template>
|
|
16
14
|
<script lang="ts">
|
|
@@ -20,9 +18,12 @@ require("@/plugins/EasePack.min.js");
|
|
|
20
18
|
require("@/plugins/TweenLite.min.js");
|
|
21
19
|
@Component
|
|
22
20
|
export default class HtTwee extends Vue {
|
|
21
|
+
@Prop() tweeRef!: string;
|
|
22
|
+
@Prop() outerWidth!: number;
|
|
23
|
+
@Prop() outerHeight!: number;
|
|
23
24
|
created() {
|
|
24
25
|
this.$nextTick(() => {
|
|
25
|
-
Httwee(this.$refs["ht-twee"]);
|
|
26
|
+
Httwee(this.$refs["ht-twee"], this.outerWidth, this.outerHeight);
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
}
|
package/src/plugins/HtTwee.js
CHANGED
|
@@ -47,9 +47,9 @@ function drawLines(p) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
function resize() {
|
|
51
|
-
width = window.innerWidth;
|
|
52
|
-
height = window.innerHeight;
|
|
50
|
+
function resize(outerWidth,outerHeight) {
|
|
51
|
+
width =outerWidth|| window.innerWidth;
|
|
52
|
+
height = outerHeight||window.innerHeight;
|
|
53
53
|
// largeHeader.style.height = height+'px';
|
|
54
54
|
canvas.width = width;
|
|
55
55
|
canvas.height = height;
|
|
@@ -67,9 +67,9 @@ function mouseMove(e) {
|
|
|
67
67
|
target.x = posx;
|
|
68
68
|
target.y = posy;
|
|
69
69
|
}
|
|
70
|
-
function initHeader(ref) {
|
|
71
|
-
width = window.innerWidth;
|
|
72
|
-
height = window.innerHeight;
|
|
70
|
+
function initHeader(ref,outerWidth,outerHeight) {
|
|
71
|
+
width = outerWidth||window.innerWidth;
|
|
72
|
+
height =outerHeight|| window.innerHeight;
|
|
73
73
|
target = {x: width/2, y: height/2};
|
|
74
74
|
|
|
75
75
|
// largeHeader = document.getElementById('large-header');
|
|
@@ -129,12 +129,12 @@ function initHeader(ref) {
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
// Event handling
|
|
132
|
-
function addListeners() {
|
|
132
|
+
function addListeners(width,height) {
|
|
133
133
|
if(!('ontouchstart' in window)) {
|
|
134
134
|
window.addEventListener('mousemove', mouseMove);
|
|
135
135
|
}
|
|
136
136
|
window.addEventListener('scroll', scrollCheck);
|
|
137
|
-
window.addEventListener('resize', resize);
|
|
137
|
+
window.addEventListener('resize', resize(width,height));
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
|
|
@@ -179,11 +179,11 @@ function initAnimation() {
|
|
|
179
179
|
|
|
180
180
|
// Util
|
|
181
181
|
|
|
182
|
-
export function Httwee (ref) {
|
|
182
|
+
export function Httwee (ref,width,height) {
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
// Main
|
|
186
|
-
initHeader(ref);
|
|
186
|
+
initHeader(ref,width,height);
|
|
187
187
|
initAnimation();
|
|
188
|
-
addListeners();
|
|
188
|
+
addListeners(width,height);
|
|
189
189
|
};
|
package/src/views/About.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-04-29
|
|
7
|
+
* @LastEditTime: 2022-04-29 17:03:44
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
@@ -61,7 +61,7 @@ import { Component, Vue } from "vue-property-decorator";
|
|
|
61
61
|
import HtTable from "@/packages/HtTable/index.vue";
|
|
62
62
|
import HtCountDown from "@/packages/HtCountDown/index.vue";
|
|
63
63
|
import HtSelectUser from "@/packages/HtSelectUser/index.vue";
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
import "htui-yllkbz/lib/htui.css";
|
|
66
66
|
interface State {
|
|
67
67
|
/** 数据状态 */
|
|
@@ -76,7 +76,6 @@ interface State {
|
|
|
76
76
|
HtTable,
|
|
77
77
|
HtCountDown,
|
|
78
78
|
HtSelectUser,
|
|
79
|
-
HtTwee,
|
|
80
79
|
},
|
|
81
80
|
})
|
|
82
81
|
export default class Index extends Vue {
|