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.
@@ -4,25 +4,44 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-15 14:41:40
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2021-12-23 11:36:52
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
- <HtTable :data="state.data"
15
- @onchange="test"
16
- :height="200"
17
- :columns="state.columns">
18
- <div slot="sex"
19
- slot-scope="{row}">{{row.sex?'男':'女'}}</div>
20
- <div slot="age"
21
- slot-scope="{row}">
22
- <el-tag>{{row.age}}</el-tag>
23
- </div>
24
- <div slot="header_name">测试名字</div>
25
- </HtTable>
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
  }