htui-yllkbz 1.3.24 → 1.3.27
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 +153 -1431
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +153 -1431
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +4 -28
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +4 -2
- package/src/App.vue +80 -18
- package/src/packages/HtBaseData/index.vue +28 -11
- package/src/packages/HtShowBaseType/index.ts +15 -0
- package/src/packages/HtShowBaseType/index.vue +68 -0
- package/src/packages/index.ts +6 -5
- package/src/plugins/oidc-client.ts +37 -0
- package/src/views/About.vue +2 -2
- package/src/packages/HtTwee/index.ts +0 -22
- package/src/packages/HtTwee/index.vue +0 -31
- package/src/plugins/EasePack.min.js +0 -22
- package/src/plugins/HtTwee.js +0 -189
- package/src/plugins/TweenLite.min.js +0 -25
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htui-yllkbz",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.27",
|
|
4
|
+
"port": "8082",
|
|
4
5
|
"typings": "types/index.d.ts",
|
|
5
6
|
"main": "lib/htui.common.js",
|
|
6
7
|
"style": "lib/htui.css",
|
|
@@ -23,9 +24,10 @@
|
|
|
23
24
|
"core-js": "^3.6.5",
|
|
24
25
|
"element-ui": "^2.14.1",
|
|
25
26
|
"html2canvas": "1.0.0-rc.1",
|
|
26
|
-
"htui-yllkbz": "^1.3.
|
|
27
|
+
"htui-yllkbz": "^1.3.24",
|
|
27
28
|
"mavon-editor": "^2.10.4",
|
|
28
29
|
"moment": "^2.29.1",
|
|
30
|
+
"oidc-client": "^1.11.5",
|
|
29
31
|
"vue": "^2.6.11",
|
|
30
32
|
"vue-class-component": "^7.2.3",
|
|
31
33
|
"vue-kst-auth": "^2.1.15",
|
package/src/App.vue
CHANGED
|
@@ -4,36 +4,40 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime:
|
|
7
|
+
* @LastEditTime: 2022-05-11 17:52:26
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div id="app">
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
text:'name',
|
|
23
|
-
})"></SelectTable>
|
|
24
|
-
|
|
11
|
+
<el-button type=""
|
|
12
|
+
@click="test">测试</el-button>
|
|
13
|
+
<HtSelectBaseData dataTypeId="chengbenzhongxin"
|
|
14
|
+
v-model="state.value"
|
|
15
|
+
@change="change"></HtSelectBaseData>
|
|
16
|
+
<HtSelectBaseData dataTypeId="positions"
|
|
17
|
+
:multiple="false"
|
|
18
|
+
v-model="state.value"
|
|
19
|
+
@change="change"></HtSelectBaseData>
|
|
20
|
+
<HtSelectOrg :clearable="true"
|
|
21
|
+
@change="testuser"></HtSelectOrg>
|
|
25
22
|
<router-view></router-view>
|
|
26
23
|
</div>
|
|
27
24
|
</template>
|
|
28
25
|
|
|
29
26
|
<script lang="ts">
|
|
30
27
|
import { Component, Vue } from "vue-property-decorator";
|
|
31
|
-
import
|
|
32
|
-
|
|
28
|
+
import HtSelectBaseData from "@/packages/HtSelectBaseData";
|
|
29
|
+
import HtSelectOrg from "@/packages/HtSelectUser";
|
|
30
|
+
import { mgr } from "@/plugins/oidc-client";
|
|
33
31
|
@Component({
|
|
34
|
-
components: {
|
|
32
|
+
components: {
|
|
33
|
+
HtSelectBaseData,
|
|
34
|
+
HtSelectOrg,
|
|
35
|
+
},
|
|
35
36
|
})
|
|
36
37
|
export default class App extends Vue {
|
|
38
|
+
state = {
|
|
39
|
+
value: undefined,
|
|
40
|
+
};
|
|
37
41
|
/** 生命周期 */
|
|
38
42
|
created() {
|
|
39
43
|
// 动态加载引用文件
|
|
@@ -51,6 +55,64 @@ export default class App extends Vue {
|
|
|
51
55
|
});
|
|
52
56
|
document.getElementsByTagName("head")[0].innerHTML = heatStr;
|
|
53
57
|
}
|
|
58
|
+
change() {
|
|
59
|
+
// console.log("eeee", e);
|
|
60
|
+
}
|
|
61
|
+
testuser() {
|
|
62
|
+
//console.log("eee", e);
|
|
63
|
+
}
|
|
64
|
+
test(e: any) {
|
|
65
|
+
//mgr.removeUser();
|
|
66
|
+
// mgr.events.
|
|
67
|
+
//console.log("eeee", mgr.getUser().then(res));
|
|
68
|
+
// mgr.getUser().then((res) => {
|
|
69
|
+
// console.log("eeee", res);
|
|
70
|
+
// });
|
|
71
|
+
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
e.stopPropagation();
|
|
74
|
+
|
|
75
|
+
mgr.signoutRedirect();
|
|
76
|
+
// mgr.revokeAccessToken();
|
|
77
|
+
// mgr.signoutCallback(window.location.href, true).then((res) => {
|
|
78
|
+
// alert;
|
|
79
|
+
// console.log("rrres", res);
|
|
80
|
+
// //
|
|
81
|
+
// });
|
|
82
|
+
mgr.signinRedirect();
|
|
83
|
+
// mgr.signoutRedirectCallback().then(() => {
|
|
84
|
+
// mgr.getUser().then((user) => {
|
|
85
|
+
// console.log("user", user);
|
|
86
|
+
// });
|
|
87
|
+
// });
|
|
88
|
+
// console.log("ttt", tt, mgr.getUser());
|
|
89
|
+
// });
|
|
90
|
+
//mgr.signinSilent();
|
|
91
|
+
// mgr.removeUser().then((res) => {
|
|
92
|
+
// console.log("rres", res);
|
|
93
|
+
// mgr.signinRedirect();
|
|
94
|
+
// });
|
|
95
|
+
// mgr.signoutRedirect(); //退出登录
|
|
96
|
+
//mgr.removeUser();
|
|
97
|
+
// mgr.signoutRedirectCallback().then((res) => {
|
|
98
|
+
// console.log("res", res);
|
|
99
|
+
// }); //登录
|
|
100
|
+
// mgr.getUser(); //获取用户信息
|
|
101
|
+
// mgr.signinRedirectCallback(); //callback
|
|
102
|
+
// mgr.revokeAccessToken();
|
|
103
|
+
//mgr.
|
|
104
|
+
//mgr.signoutPopup();
|
|
105
|
+
//mgr.signinPopup();
|
|
106
|
+
// mgr.signoutRedirectCallback(window.location.href).then((res) => {
|
|
107
|
+
// //window.location.href = window.location.href;
|
|
108
|
+
// console.log("res", res);
|
|
109
|
+
// // mgr.signinRedirect();
|
|
110
|
+
// });
|
|
111
|
+
// mgr.signoutRedirect();
|
|
112
|
+
//mgr.clearStaleState();
|
|
113
|
+
// mgr.signinRedirectCallback(window.location.href);
|
|
114
|
+
// mgr.signinRedirect();
|
|
115
|
+
}
|
|
54
116
|
}
|
|
55
117
|
</script>
|
|
56
118
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
+
|
|
3
4
|
<!-- 选择部门 -->
|
|
4
5
|
<template v-if="
|
|
5
6
|
state.configJson['departmentId'] &&
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
}"
|
|
29
30
|
@click.native="selectClick($event)"
|
|
30
31
|
ref="departmentId"
|
|
31
|
-
@change="setSelctData('departmentId')"
|
|
32
|
+
@change="setSelctData('departmentId',$event)"
|
|
32
33
|
:options="organizationUsersTree">
|
|
33
34
|
</el-cascader>
|
|
34
35
|
<el-cascader-panel v-if="state.configJson['departmentId'].panel"
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
multiple: state.configJson['departmentId'].multiple,
|
|
48
49
|
}"
|
|
49
50
|
ref="departmentId"
|
|
50
|
-
@change="setSelctData('departmentId')"
|
|
51
|
+
@change="setSelctData('departmentId',$event)"
|
|
51
52
|
:options="organizationUsersTree">
|
|
52
53
|
<template slot-scope="{ data }">
|
|
53
54
|
<span>{{ data.label }}</span>
|
|
@@ -116,7 +117,7 @@
|
|
|
116
117
|
}"
|
|
117
118
|
ref="departmentUser"
|
|
118
119
|
@click.native="selectClick($event)"
|
|
119
|
-
@change="setSelctData('departmentUser')"
|
|
120
|
+
@change="setSelctData('departmentUser',$event)"
|
|
120
121
|
:options="organizationUsersTreeUser">
|
|
121
122
|
<template slot-scope="{ data }">
|
|
122
123
|
<p class="ht-user-dot"
|
|
@@ -163,7 +164,7 @@
|
|
|
163
164
|
multiple: state.configJson['departmentUser'].multiple,
|
|
164
165
|
}"
|
|
165
166
|
ref="departmentUser"
|
|
166
|
-
@change="setSelctData('departmentUser')"
|
|
167
|
+
@change="setSelctData('departmentUser',$event)"
|
|
167
168
|
:options="organizationUsersTreeUser">
|
|
168
169
|
<template slot-scope="{ data }">
|
|
169
170
|
<p class="ht-user-dot"
|
|
@@ -281,10 +282,10 @@
|
|
|
281
282
|
multiple: state.configJson[item.code].multiple,
|
|
282
283
|
}"
|
|
283
284
|
:ref="`${item.code}`"
|
|
284
|
-
@change="setSelctData(item.code)"
|
|
285
|
+
@change="setSelctData(item.code,$event)"
|
|
285
286
|
:options="getbaseDataInfo[item.id]"></el-cascader>
|
|
286
287
|
<el-cascader-panel v-else
|
|
287
|
-
@click.native="selectClick($event)"
|
|
288
|
+
@click.native="selectClick($event,)"
|
|
288
289
|
:placeholder="`请选择${item.name}`"
|
|
289
290
|
class="component-item"
|
|
290
291
|
:key="item.id"
|
|
@@ -300,7 +301,7 @@
|
|
|
300
301
|
multiple: state.configJson[item.code].multiple,
|
|
301
302
|
}"
|
|
302
303
|
:ref="`${item.code}`"
|
|
303
|
-
@change="setSelctData(item.code)"
|
|
304
|
+
@change="setSelctData(item.code,$event)"
|
|
304
305
|
:options="getbaseDataInfo[item.id]"></el-cascader-panel>
|
|
305
306
|
</template>
|
|
306
307
|
</template>
|
|
@@ -650,15 +651,28 @@ export default class CommonDatas extends Vue {
|
|
|
650
651
|
// });
|
|
651
652
|
}
|
|
652
653
|
/** 设置下拉数据(级联选择) */
|
|
653
|
-
setSelctData(key: string) {
|
|
654
|
+
setSelctData(key: string, e?: string) {
|
|
655
|
+
const value = e || this.state.selectVal[key];
|
|
656
|
+
|
|
654
657
|
const ref: any | undefined = (this.$refs[key] as any)[0] || this.$refs[key];
|
|
655
|
-
|
|
658
|
+
|
|
659
|
+
let checkList = [];
|
|
660
|
+
if (ref && ref.getCheckedNodes() && ref.getCheckedNodes()[0] !== null) {
|
|
661
|
+
checkList = ref.getCheckedNodes();
|
|
662
|
+
} else if (
|
|
663
|
+
ref &&
|
|
664
|
+
ref.getCheckedNodes() &&
|
|
665
|
+
ref.getCheckedNodes()[0] === null
|
|
666
|
+
) {
|
|
667
|
+
checkList = [ref.panel.getNodeByValue(value)];
|
|
668
|
+
}
|
|
669
|
+
|
|
656
670
|
/** 过滤在多选模式下,Tag时触发删除 */
|
|
657
671
|
const checkNodes = checkList.filter((item: any) => {
|
|
658
|
-
return
|
|
672
|
+
return value?.includes(item.data.id);
|
|
659
673
|
});
|
|
660
|
-
this.state.selectValData[key] = [];
|
|
661
674
|
if (checkNodes && checkNodes.length && checkNodes[0] !== null) {
|
|
675
|
+
this.state.selectValData[key] = [];
|
|
662
676
|
checkNodes.forEach(
|
|
663
677
|
(item: { data?: { id: string; name: string } } | undefined) => {
|
|
664
678
|
const { data } = item || { data: "" };
|
|
@@ -668,6 +682,9 @@ export default class CommonDatas extends Vue {
|
|
|
668
682
|
}
|
|
669
683
|
);
|
|
670
684
|
}
|
|
685
|
+
if (!e && !this.state.selectVal[key]) {
|
|
686
|
+
this.state.selectValData[key] = [];
|
|
687
|
+
}
|
|
671
688
|
this.$emit("change", this.state.selectValData);
|
|
672
689
|
}
|
|
673
690
|
/** 基础数据递归处理 */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Descripttion: 基础数据展示组件
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-04-12 17:34:51
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2022-05-15 14:54:08
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import HtShowBaseType from "./index.vue";
|
|
11
|
+
(HtShowBaseType as any).install = function (Vue: any) {
|
|
12
|
+
|
|
13
|
+
Vue.component("HtShowBaseType", HtShowBaseType);
|
|
14
|
+
};
|
|
15
|
+
export default HtShowBaseType;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion:
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-05-15 14:53:15
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2022-05-15 15:56:08
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<span>{{state.value}}</span>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script lang="ts">
|
|
14
|
+
import { Vue, Prop, Component, Watch } from "vue-property-decorator";
|
|
15
|
+
import { baseConfig } from "vue-kst-auth";
|
|
16
|
+
|
|
17
|
+
interface State {
|
|
18
|
+
value: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
name: "HtShowBaseType",
|
|
23
|
+
})
|
|
24
|
+
export default class HtShowBaseType extends Vue {
|
|
25
|
+
/** 查找不到为空时显示 */
|
|
26
|
+
@Prop() value?: string;
|
|
27
|
+
|
|
28
|
+
/** 人员 */
|
|
29
|
+
/** 数据 */
|
|
30
|
+
state: State = {
|
|
31
|
+
value: "",
|
|
32
|
+
};
|
|
33
|
+
/** 生命周期 */
|
|
34
|
+
created() {
|
|
35
|
+
//
|
|
36
|
+
}
|
|
37
|
+
/** 方法 */
|
|
38
|
+
|
|
39
|
+
@Watch("value")
|
|
40
|
+
setText(val: string) {
|
|
41
|
+
this.state.value = "";
|
|
42
|
+
if (!val) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (!baseConfig.getLoginState()) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const data = window.localStorage.getItem("commonDatas");
|
|
49
|
+
if (data) {
|
|
50
|
+
const dictionaryCategory =
|
|
51
|
+
JSON.parse(data)["dictionaryCategory"]["items"];
|
|
52
|
+
const item = dictionaryCategory.find((item: any) => item.code === val);
|
|
53
|
+
this.state.value = item?.name || "";
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style lang="scss" scoped>
|
|
60
|
+
.show-common-item {
|
|
61
|
+
display: inline-block;
|
|
62
|
+
.item {
|
|
63
|
+
+ .item {
|
|
64
|
+
padding-left: 10px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</style>
|
package/src/packages/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-10-21 10:08:41
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-
|
|
7
|
+
* @LastEditTime: 2022-05-15 15:58:44
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
// 导入组件
|
|
@@ -25,12 +25,13 @@ import HtSelectUser from './HtSelectUser/index'
|
|
|
25
25
|
import HtShowBaseData from './HtShowBaseData/index'
|
|
26
26
|
import HtOrgInfo from './HtOrgInfo/index'
|
|
27
27
|
import HtBaseData from './HtBaseData/index'
|
|
28
|
-
import
|
|
28
|
+
import HtShowBaseType from './HtShowBaseType'
|
|
29
|
+
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
// 存储组件列表
|
|
33
|
-
const components = [
|
|
34
|
+
const components = [HtBaseData, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
|
|
34
35
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
35
36
|
const install = function (Vue: any) {
|
|
36
37
|
// 判断是否安装
|
|
@@ -46,7 +47,7 @@ export default {
|
|
|
46
47
|
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
47
48
|
install,
|
|
48
49
|
// 以下是具体的组件列表
|
|
49
|
-
HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
|
|
50
|
-
HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData
|
|
50
|
+
HtSelectTable, HtPagination, HtShowBaseType, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
|
|
51
|
+
HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData
|
|
51
52
|
}
|
|
52
53
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/camelcase */
|
|
2
|
+
/*
|
|
3
|
+
* @Descripttion:
|
|
4
|
+
* @version:
|
|
5
|
+
* @Author: hutao
|
|
6
|
+
* @Date: 2022-05-06 17:56:08
|
|
7
|
+
* @LastEditors: hutao
|
|
8
|
+
* @LastEditTime: 2022-05-09 14:20:45
|
|
9
|
+
*/
|
|
10
|
+
import Oidc from "oidc-client";
|
|
11
|
+
function getCurrentUrl() {
|
|
12
|
+
let href = window.location.pathname;
|
|
13
|
+
if (href.charAt(href.length - 1) === '/') {
|
|
14
|
+
href = href.substring(0, href.length - 1)
|
|
15
|
+
}
|
|
16
|
+
console.log('href', href, window.location);
|
|
17
|
+
console.log('window.location.host + href', window.location.origin + href);
|
|
18
|
+
return window.location.origin + href
|
|
19
|
+
}
|
|
20
|
+
export const mgr = new Oidc.UserManager({
|
|
21
|
+
// authority: "oauth2/api",//认证服务器
|
|
22
|
+
authority: "http://192.168.3.237:44318",//认证服务器
|
|
23
|
+
client_id: "AuthServer_App", //表示客户端的ID,必选项
|
|
24
|
+
//redirect_uri: "http://192.168.3.113:8082/product_architecture", //表示重定向URI,认证服务器回调的客户端页面。可选项
|
|
25
|
+
redirect_uri: getCurrentUrl(), //表示重定向URI,认证服务器回调的客户端页面。可选项
|
|
26
|
+
// redirect_uri: "http://192.168.3.252:4200", //表示重定向URI,认证服务器回调的客户端页面。可选项
|
|
27
|
+
response_type: "code", // response_type:表示授权类型,必选项
|
|
28
|
+
userStore: new Oidc.WebStorageStateStore({ store: window.localStorage }),
|
|
29
|
+
scope: "offline_access AuthServer", //scope:表示申请的权限范围,可选项
|
|
30
|
+
post_logout_redirect_uri: getCurrentUrl(),
|
|
31
|
+
automaticSilentRenew: false,
|
|
32
|
+
|
|
33
|
+
extraQueryParams: {
|
|
34
|
+
_tenant: 'default'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
});
|
package/src/views/About.vue
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-
|
|
7
|
+
* @LastEditTime: 2022-05-09 10:05:08
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
11
|
-
|
|
11
|
+
...................
|
|
12
12
|
<HtSelectUser :value="['be12db32-1718-a43d-1cf8-39f97d1d872f','5f2d6558-4e98-9054-413f-39fc4c63ebac','959f6988-a74b-f6f7-0fb6-3a0314e0eaad']"
|
|
13
13
|
:multiple="true"></HtSelectUser>
|
|
14
14
|
<!-- <el-button type=""
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Descripttion:
|
|
3
|
-
* @version:
|
|
4
|
-
* @Author: hutao
|
|
5
|
-
* @Date: 2022-04-29 16:30:37
|
|
6
|
-
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-04-29 16:30:37
|
|
8
|
-
*/
|
|
9
|
-
/*
|
|
10
|
-
* @Descripttion:
|
|
11
|
-
* @version:
|
|
12
|
-
* @Author: hutao
|
|
13
|
-
* @Date: 2021-11-15 15:00:57
|
|
14
|
-
* @LastEditors: hutao
|
|
15
|
-
* @LastEditTime: 2021-12-21 14:15:10
|
|
16
|
-
*/
|
|
17
|
-
import HtTwee from "./index.vue";
|
|
18
|
-
(HtTwee as any).install = function (Vue: any) {
|
|
19
|
-
|
|
20
|
-
Vue.component("HtTwee", HtTwee);
|
|
21
|
-
};
|
|
22
|
-
export default HtTwee;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Descripttion:
|
|
3
|
-
* @version:
|
|
4
|
-
* @Author: hutao
|
|
5
|
-
* @Date: 2022-04-29 16:30:40
|
|
6
|
-
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2022-04-29 17:14:19
|
|
8
|
-
-->
|
|
9
|
-
<template>
|
|
10
|
-
|
|
11
|
-
<canvas :ref="tweeRef||'ht-twee'"></canvas>
|
|
12
|
-
|
|
13
|
-
</template>
|
|
14
|
-
<script lang="ts">
|
|
15
|
-
import { Vue, Component, Prop, Watch } from "vue-property-decorator";
|
|
16
|
-
import { Httwee } from "@/plugins/HtTwee";
|
|
17
|
-
require("@/plugins/EasePack.min.js");
|
|
18
|
-
require("@/plugins/TweenLite.min.js");
|
|
19
|
-
@Component
|
|
20
|
-
export default class HtTwee extends Vue {
|
|
21
|
-
@Prop() tweeRef!: string;
|
|
22
|
-
@Prop() outerWidth!: number;
|
|
23
|
-
@Prop() outerHeight!: number;
|
|
24
|
-
created() {
|
|
25
|
-
this.$nextTick(() => {
|
|
26
|
-
Httwee(this.$refs["ht-twee"], this.outerWidth, this.outerHeight);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
2
|
-
/*
|
|
3
|
-
* @Descripttion:
|
|
4
|
-
* @version:
|
|
5
|
-
* @Author: hutao
|
|
6
|
-
* @Date: 2022-04-29 16:32:05
|
|
7
|
-
* @LastEditors: hutao
|
|
8
|
-
* @LastEditTime: 2022-04-29 16:57:19
|
|
9
|
-
*/
|
|
10
|
-
/* eslint-disable no-var */
|
|
11
|
-
/*!
|
|
12
|
-
* VERSION: beta 1.9.4
|
|
13
|
-
* DATE: 2014-07-17
|
|
14
|
-
* UPDATES AND DOCS AT: http://www.greensock.com
|
|
15
|
-
*
|
|
16
|
-
* @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
|
|
17
|
-
* This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
|
|
18
|
-
* Club GreenSock members, the software agreement that was issued with your membership.
|
|
19
|
-
*
|
|
20
|
-
* @author: Jack Doyle, jack@greensock.com
|
|
21
|
-
**/
|
|
22
|
-
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,s,r=_gsScope.GreenSockGlobals||_gsScope,n=r.com.greensock,a=2*Math.PI,o=Math.PI/2,h=n._class,l=function(e,i){var s=h("easing."+e,function(){},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,s},_=t.register||function(){},u=function(t,e,i,s){var r=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0);return _(r,t),r},c=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},p=function(e,i){var s=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,r.config=function(t){return new s(t)},s},f=u("Back",p("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),p("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),p("BackInOut",function(t){return 1>(t*=2)?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),m=h("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=i===!0},!0),d=m.prototype=new t;return d.constructor=m,d.getRatio=function(t){var e=t+(.5-t)*this._p;return this._p1>t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},m.ease=new m(.7,.7),d.config=m.config=function(t,e,i){return new m(t,e,i)},e=h("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),d=e.prototype=new t,d.constructor=e,d.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},d.config=e.config=function(t){return new e(t)},i=h("easing.RoughEase",function(e){e=e||{};for(var i,s,r,n,a,o,h=e.taper||"none",l=[],_=0,u=0|(e.points||20),p=u,f=e.randomize!==!1,m=e.clamp===!0,d=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--p>-1;)i=f?Math.random():1/u*p,s=d?d.getRatio(i):i,"none"===h?r=g:"out"===h?(n=1-i,r=n*n*g):"in"===h?r=i*i*g:.5>i?(n=2*i,r=.5*n*n*g):(n=2*(1-i),r=.5*n*n*g),f?s+=Math.random()*r-.5*r:p%2?s+=.5*r:s-=.5*r,m&&(s>1?s=1:0>s&&(s=0)),l[_++]={x:i,y:s};for(l.sort(function(t,e){return t.x-e.x}),o=new c(1,1,null),p=u;--p>-1;)a=l[p],o=new c(a.x,a.y,o);this._prev=new c(0,0,0!==o.t?o:o.next)},!0),d=i.prototype=new t,d.constructor=i,d.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},d.config=function(t){return new i(t)},i.ease=new i,u("Bounce",l("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),l("BounceIn",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),l("BounceInOut",function(t){var e=.5>t;return t=e?1-2*t:2*t-1,t=1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),u("Circ",l("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),l("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),l("CircInOut",function(t){return 1>(t*=2)?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),s=function(e,i,s){var r=h("easing."+e,function(t,e){this._p1=t||1,this._p2=e||s,this._p3=this._p2/a*(Math.asin(1/this._p1)||0)},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t,e){return new r(t,e)},r},u("Elastic",s("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*a/this._p2)+1},.3),s("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2))},.3),s("ElasticInOut",function(t){return 1>(t*=2)?-.5*this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2):.5*this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*a/this._p2)+1},.45)),u("Expo",l("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),l("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),l("ExpoInOut",function(t){return 1>(t*=2)?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),u("Sine",l("SineOut",function(t){return Math.sin(t*o)}),l("SineIn",function(t){return-Math.cos(t*o)+1}),l("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),_(r.SlowMo,"SlowMo","ease,"),_(i,"RoughEase","ease,"),_(e,"SteppedEase","ease,"),f},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()();
|