htui-yllkbz 1.2.35 → 1.2.39

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,26 +4,44 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-15 14:41:40
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2021-12-22 09:58:13
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
- <HtMd v-model="state.content"
13
- @save="save"
14
- placeholder="请输入"></HtMd>
15
- <HtTable :data="state.data"
16
- @onchange="test"
17
- :height="200"
18
- :columns="state.columns">
19
- <div slot="sex"
20
- slot-scope="{row}">{{row.sex?'男':'女'}}</div>
21
- <div slot="age"
22
- slot-scope="{row}">
23
- <el-tag>{{row.age}}</el-tag>
24
- </div>
25
- <div slot="header_name">测试名字</div>
26
- </HtTable>
30
+ <ht-md v-model="state.content"
31
+ :subfield="true"></ht-md>
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>
27
45
  <!-- <el-dropdown>
28
46
  <el-select placeholder="请选择">
29
47
  </el-select>
@@ -43,30 +61,73 @@
43
61
  <script lang='ts'>
44
62
  import { Component, Vue } from "vue-property-decorator";
45
63
  import HtTable from "@/packages/HtTable/index.vue";
46
- import HtMd from "@/packages/HtMd/index.vue";
64
+ import HtCountDown from "@/packages/HtCountDown/index.vue";
65
+ import HtExportPdf from "@/packages/HtExportPdf/index.vue";
66
+ import HtUi from "htui-yllkbz";
67
+ import "htui-yllkbz/lib/htui.css";
68
+ Vue.use(HtUi);
47
69
  interface State {
48
70
  /** 数据状态 */
49
71
  loading: boolean;
50
72
  columns: any;
51
73
  data: any;
52
74
  content: string;
75
+ start: boolean;
53
76
  }
54
77
  @Component({
55
78
  components: {
56
79
  HtTable,
57
- HtMd,
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
- { name: "胡涛", age: 12, sex: 0, id: 1, test: { title: "测试" } },
67
- { name: "胡涛", age: 12, sex: 1, id: 2, test: { title: "测试" } },
68
- { name: "胡涛", age: 12, sex: 1, id: 3, test: { title: "测试" } },
69
- { name: "胡涛", age: 12, sex: 0, id: 4, test: { title: "测试" } },
91
+ {
92
+ name: "胡涛",
93
+ age: 12,
94
+ sex: 0,
95
+ id: 1,
96
+ test: { title: "测试" },
97
+ time: "2022-01-20T00:00:00+08:00",
98
+ },
99
+ {
100
+ name: "胡涛",
101
+ age: 12,
102
+ sex: 1,
103
+ id: 2,
104
+ test: { title: "测试" },
105
+ time: "2022-01-20T00:00:00+08:00",
106
+ },
107
+ {
108
+ name: "胡涛",
109
+ age: 12,
110
+ sex: 1,
111
+ id: 3,
112
+ test: { title: "测试" },
113
+ time: "2022-01-20T00:00:00+08:00",
114
+ },
115
+ {
116
+ name: "胡涛",
117
+ age: 12,
118
+ sex: 0,
119
+ id: 4,
120
+ test: { title: "测试" },
121
+ time: "2022-01-20T00:00:00+08:00",
122
+ },
123
+ {
124
+ name: "胡涛",
125
+ age: 12,
126
+ sex: 0,
127
+ id: 41,
128
+ test: { title: "测试" },
129
+ time: "2022-01-20T00:00:00+08:00",
130
+ },
70
131
  ],
71
132
  columns: [
72
133
  {
@@ -82,6 +143,12 @@ export default class Index extends Vue {
82
143
  title: "age",
83
144
  key: "age",
84
145
  },
146
+ {
147
+ title: "time",
148
+ type: "time",
149
+ spread: true,
150
+ key: "time",
151
+ },
85
152
  {
86
153
  title: "性别",
87
154
  key: "sex",
@@ -89,10 +156,24 @@ export default class Index extends Vue {
89
156
  ],
90
157
  };
91
158
  /** 生命周期 */
159
+ created() {
160
+ //this.rewriteGetComputedStyle();
161
+ }
92
162
  /** 方法 */
93
163
  test() {
164
+ (this.$refs.pdf as any).exportPdf(this.$refs["ht-pdf"]);
94
165
  //console.log("ee", e);
95
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
+ // }
96
177
  save(e: string, f: string) {
97
178
  console.log("e,f", e, f);
98
179
  }