tianheng-ui 0.0.34 → 0.0.37

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.0.34",
4
+ "version": "0.0.37",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -0,0 +1,8 @@
1
+ import Dialog from "./index.vue";
2
+
3
+ /* istanbul ignore next */
4
+ Dialog.install = function(Vue) {
5
+ Vue.component(Dialog.name, Dialog);
6
+ };
7
+
8
+ export default Dialog;
@@ -0,0 +1,90 @@
1
+ <template>
2
+ <el-dialog
3
+ class="th-dialog"
4
+ :visible.sync="visible"
5
+ :fullscreen="dialogFullscreen"
6
+ :close-on-click-modal="false"
7
+ :show-close="false"
8
+ :before-close="handleClose"
9
+ >
10
+ <div slot="title" style="font-size: 14px;">
11
+ <div slot="title" class="th-dialog__header">
12
+ <div class="th-dialog__title">{{ title }}</div>
13
+ <div class="th-dialog__action">
14
+ <i
15
+ class="th-dialog__action_item"
16
+ v-if="showFullscreen"
17
+ :class="fullscreenIcon"
18
+ @click="handleFullscreenChange"
19
+ ></i>
20
+ <i
21
+ class="th-dialog__action_item "
22
+ v-if="showClose"
23
+ :class="closeIcon"
24
+ @click="handleClose"
25
+ ></i>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ <slot></slot>
30
+ <span slot="footer">
31
+ <el-button
32
+ v-if="showAffirm"
33
+ type="primary"
34
+ :loading="loading"
35
+ @click="handleAffirm"
36
+ >{{ affirmText }}</el-button
37
+ >
38
+ <el-button v-if="showCancel" @click="handleClose">{{
39
+ cancelText
40
+ }}</el-button>
41
+ </span>
42
+ </el-dialog>
43
+ </template>
44
+
45
+ <script>
46
+ export default {
47
+ name: "ThDialog",
48
+ props: {
49
+ visible: Boolean,
50
+ loading: Boolean,
51
+ title: { type: String, default: "温馨提示" },
52
+
53
+ showAffirm: { type: Boolean, default: true },
54
+ affirmText: { type: String, default: "确 认" },
55
+
56
+ showCancel: { type: Boolean, default: true },
57
+ cancelText: { type: String, default: "取 消" },
58
+
59
+ showClose: { type: Boolean, default: true },
60
+ closeIcon: { type: String, default: "el-icon-close" },
61
+
62
+ fullscreen: { type: Boolean, default: false },
63
+ showFullscreen: { type: Boolean, default: true },
64
+ fullscreenIcon: { type: String, default: "el-icon-full-screen" }
65
+ },
66
+ data() {
67
+ return {
68
+ formRules: {},
69
+ dialogFullscreen: this.fullscreen
70
+ };
71
+ },
72
+ watch: {
73
+ fullscreen(value) {
74
+ this.dialogFullscreen = value;
75
+ }
76
+ },
77
+ methods: {
78
+ handleClose() {
79
+ this.$emit("on-close");
80
+ },
81
+ handleAffirm() {
82
+ this.$emit("on-affirm");
83
+ },
84
+ handleFullscreenChange() {
85
+ this.dialogFullscreen = !this.dialogFullscreen;
86
+ this.$emit("fullscreen-change");
87
+ }
88
+ }
89
+ };
90
+ </script>
@@ -32,7 +32,7 @@
32
32
  >
33
33
  </el-popover>
34
34
  <el-dropdown
35
- v-if="item.act === 'more'"
35
+ v-else-if="item.act === 'more'"
36
36
  :key="index"
37
37
  :trigger="item.trigger || 'click'"
38
38
  :placement="item.placement || 'bottom-end'"