htui-yllkbz 1.2.36 → 1.2.40
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 +1779 -73
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.umd.js +1774 -68
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +388 -4
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +56 -53
- package/src/packages/HtCountDown/index.ts +13 -0
- package/src/packages/HtCountDown/index.vue +171 -0
- package/src/packages/HtExportPdf/index.ts +16 -0
- package/src/packages/HtExportPdf/index.vue +46 -0
- package/src/packages/HtTable/index.vue +11 -4
- package/src/packages/index.ts +5 -3
- package/src/packages/type.ts +2 -2
- package/src/shims-vue.d.ts +6 -1
- package/src/unit/htmlToPdf.js +108 -0
- package/src/views/About.vue +52 -13
package/src/views/About.vue
CHANGED
|
@@ -4,25 +4,44 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime:
|
|
7
|
+
* @LastEditTime: 2022-01-04 09:31:44
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
11
|
+
<HtExportPdf selector="f"
|
|
12
|
+
ref="pdf"
|
|
13
|
+
:title="'测试'"></HtExportPdf>
|
|
14
|
+
<el-button type=""
|
|
15
|
+
@click="test">test</el-button>
|
|
16
|
+
<!-- <ht-count-down :stopwatch="true"
|
|
17
|
+
:frequency="200"
|
|
18
|
+
:start="!state.start">
|
|
19
|
+
<template slot-scope="{timeStr}">
|
|
20
|
+
{{timeStr}}
|
|
21
|
+
</template>
|
|
22
|
+
</ht-count-down>
|
|
23
|
+
<ht-count-down :stopwatch="true"
|
|
24
|
+
:start="!state.start">
|
|
25
|
+
<template slot-scope="{timeStr}">
|
|
26
|
+
{{timeStr}}
|
|
27
|
+
</template>
|
|
28
|
+
</ht-count-down> -->
|
|
11
29
|
|
|
12
30
|
<ht-md v-model="state.content"
|
|
13
31
|
:subfield="true"></ht-md>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
32
|
+
<div ref="ht-pdf">
|
|
33
|
+
<HtTable :data="state.data"
|
|
34
|
+
:height="200"
|
|
35
|
+
:columns="state.columns">
|
|
36
|
+
<div slot="sex"
|
|
37
|
+
slot-scope="{row}">{{row.sex?'男':'女'}}</div>
|
|
38
|
+
<div slot="age"
|
|
39
|
+
slot-scope="{row}">
|
|
40
|
+
<el-tag>{{row.age}}</el-tag>
|
|
41
|
+
</div>
|
|
42
|
+
<div slot="header_name">测试名字</div>
|
|
43
|
+
</HtTable>
|
|
44
|
+
</div>
|
|
26
45
|
<!-- <el-dropdown>
|
|
27
46
|
<el-select placeholder="请选择">
|
|
28
47
|
</el-select>
|
|
@@ -42,6 +61,8 @@
|
|
|
42
61
|
<script lang='ts'>
|
|
43
62
|
import { Component, Vue } from "vue-property-decorator";
|
|
44
63
|
import HtTable from "@/packages/HtTable/index.vue";
|
|
64
|
+
import HtCountDown from "@/packages/HtCountDown/index.vue";
|
|
65
|
+
import HtExportPdf from "@/packages/HtExportPdf/index.vue";
|
|
45
66
|
import HtUi from "htui-yllkbz";
|
|
46
67
|
import "htui-yllkbz/lib/htui.css";
|
|
47
68
|
Vue.use(HtUi);
|
|
@@ -51,16 +72,20 @@ interface State {
|
|
|
51
72
|
columns: any;
|
|
52
73
|
data: any;
|
|
53
74
|
content: string;
|
|
75
|
+
start: boolean;
|
|
54
76
|
}
|
|
55
77
|
@Component({
|
|
56
78
|
components: {
|
|
57
79
|
HtTable,
|
|
80
|
+
HtCountDown,
|
|
81
|
+
HtExportPdf,
|
|
58
82
|
},
|
|
59
83
|
})
|
|
60
84
|
export default class Index extends Vue {
|
|
61
85
|
/** 数据 */
|
|
62
86
|
state: State = {
|
|
63
87
|
loading: false,
|
|
88
|
+
start: false,
|
|
64
89
|
content: "",
|
|
65
90
|
data: [
|
|
66
91
|
{
|
|
@@ -131,10 +156,24 @@ export default class Index extends Vue {
|
|
|
131
156
|
],
|
|
132
157
|
};
|
|
133
158
|
/** 生命周期 */
|
|
159
|
+
created() {
|
|
160
|
+
//this.rewriteGetComputedStyle();
|
|
161
|
+
}
|
|
134
162
|
/** 方法 */
|
|
135
163
|
test() {
|
|
164
|
+
(this.$refs.pdf as any).exportPdf(this.$refs["ht-pdf"]);
|
|
136
165
|
//console.log("ee", e);
|
|
137
166
|
}
|
|
167
|
+
// rewriteGetComputedStyle() {
|
|
168
|
+
// const getComputedStyle = window.getComputedStyle;
|
|
169
|
+
// window.getComputedStyle = function (element: any, property) {
|
|
170
|
+
// console.log("element", element, typeof element);
|
|
171
|
+
// if (element != "localhost:8080") {
|
|
172
|
+
// return getComputedStyle(element.host || element, property);
|
|
173
|
+
// }
|
|
174
|
+
// return "";
|
|
175
|
+
// };
|
|
176
|
+
// }
|
|
138
177
|
save(e: string, f: string) {
|
|
139
178
|
console.log("e,f", e, f);
|
|
140
179
|
}
|