tianheng-ui 0.0.69 → 0.0.71
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/README.md +4 -0
- package/lib/theme-chalk/styles/dialog.scss +53 -56
- package/lib/theme-chalk/styles/grid.scss +19 -3
- package/lib/theme-chalk/styles/reset.scss +9 -0
- package/lib/tianheng-ui.js +2 -2
- package/package.json +2 -2
- package/packages/Dialog/index.vue +46 -20
- package/packages/Grid/index.vue +4 -2
- package/packages/GridItem/index.vue +23 -9
- package/packages/Table/index.vue +0 -1
- package/packages/Table/tools.vue +2 -2
- package/packages/VueEditor/index.vue +12 -5
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.
|
4
|
+
"version": "0.0.71",
|
5
5
|
"author": "shu lang <403732931@qq.com>",
|
6
6
|
"license": "MIT",
|
7
7
|
"private": false,
|
@@ -78,7 +78,7 @@
|
|
78
78
|
"lib",
|
79
79
|
"packages"
|
80
80
|
],
|
81
|
-
"homepage": "",
|
81
|
+
"homepage": "https://tianhengui.demo.tianhengyun.com/",
|
82
82
|
"keywords": [
|
83
83
|
"tianheng",
|
84
84
|
"tianheng-ui"
|
@@ -1,29 +1,35 @@
|
|
1
1
|
<template>
|
2
2
|
<el-dialog
|
3
3
|
class="th-dialog"
|
4
|
+
:class="[customClass]"
|
4
5
|
:visible.sync="visible"
|
6
|
+
:width="width"
|
7
|
+
:top="top"
|
5
8
|
:fullscreen="dialogFullscreen"
|
6
|
-
:close-on-click-modal="
|
9
|
+
:close-on-click-modal="closeOnClickModal"
|
10
|
+
:close-on-press-escape="closeOnPressEscape"
|
7
11
|
:show-close="false"
|
8
|
-
:
|
12
|
+
:modal="modal"
|
13
|
+
:modal-append-to-body="modalAppendToBody"
|
14
|
+
:append-to-body="appendToBody"
|
15
|
+
:before-close="handleBeforeClose"
|
16
|
+
:destroy-on-close="destroyOnClose"
|
9
17
|
>
|
10
|
-
<div slot="title">
|
11
|
-
<div
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
></i>
|
26
|
-
</div>
|
18
|
+
<div slot="title" class="th-dialog__header">
|
19
|
+
<div class="th-dialog__title">{{ title }}</div>
|
20
|
+
<div class="th-dialog__action">
|
21
|
+
<i
|
22
|
+
v-if="showFullscreen"
|
23
|
+
class="th-dialog__action_item"
|
24
|
+
:class="fullscreenIcon"
|
25
|
+
@click="handleFullscreenChange"
|
26
|
+
></i>
|
27
|
+
<i
|
28
|
+
v-if="showClose"
|
29
|
+
class="th-dialog__action_item "
|
30
|
+
:class="closeIcon"
|
31
|
+
@click="handleBeforeClose"
|
32
|
+
></i>
|
27
33
|
</div>
|
28
34
|
</div>
|
29
35
|
<slot />
|
@@ -57,6 +63,17 @@ export default {
|
|
57
63
|
visible: Boolean,
|
58
64
|
loading: Boolean,
|
59
65
|
title: { type: String, default: "" },
|
66
|
+
width: { type: String, default: "800px" },
|
67
|
+
fullscreen: { type: Boolean, default: false },
|
68
|
+
top: { type: String, default: "15vh" },
|
69
|
+
modal: { type: Boolean, default: true },
|
70
|
+
modalAppendToBody: { type: Boolean, default: true },
|
71
|
+
appendToBody: { type: Boolean, default: false },
|
72
|
+
customClass: String,
|
73
|
+
closeOnClickModal: { type: Boolean, default: false },
|
74
|
+
closeOnPressEscape: { type: Boolean, default: false },
|
75
|
+
beforeClose: Function,
|
76
|
+
destroyOnClose: { type: Boolean, default: false },
|
60
77
|
|
61
78
|
showAffirm: { type: Boolean, default: true },
|
62
79
|
affirmText: { type: String, default: "确 认" },
|
@@ -67,7 +84,6 @@ export default {
|
|
67
84
|
showClose: { type: Boolean, default: true },
|
68
85
|
closeIcon: { type: String, default: "el-icon-close" },
|
69
86
|
|
70
|
-
fullscreen: { type: Boolean, default: false },
|
71
87
|
showFullscreen: { type: Boolean, default: true },
|
72
88
|
fullscreenIcon: { type: String, default: "el-icon-full-screen" },
|
73
89
|
|
@@ -89,6 +105,16 @@ export default {
|
|
89
105
|
this.$emit("input", !this.visible);
|
90
106
|
this.$emit("on-close");
|
91
107
|
},
|
108
|
+
handleBeforeClose(done) {
|
109
|
+
if (this.beforeClose) {
|
110
|
+
const callback = () => {
|
111
|
+
this.handleClose();
|
112
|
+
};
|
113
|
+
this.beforeClose(callback);
|
114
|
+
} else {
|
115
|
+
this.handleClose();
|
116
|
+
}
|
117
|
+
},
|
92
118
|
handleAffirm() {
|
93
119
|
this.$emit("on-affirm");
|
94
120
|
},
|
package/packages/Grid/index.vue
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="th-grid">
|
2
|
+
<div class="th-grid" :class="{ 'th-grid__border': border }">
|
3
3
|
<slot></slot>
|
4
4
|
</div>
|
5
5
|
</template>
|
@@ -8,7 +8,9 @@
|
|
8
8
|
export default {
|
9
9
|
name: "ThGrid",
|
10
10
|
props: {
|
11
|
-
column: Number | String
|
11
|
+
column: Number | String,
|
12
|
+
position: { type: String, default: "block" },
|
13
|
+
border: Boolean
|
12
14
|
},
|
13
15
|
data() {
|
14
16
|
return {};
|
@@ -1,11 +1,19 @@
|
|
1
1
|
<template>
|
2
|
-
<div
|
2
|
+
<div
|
3
|
+
class="th-grid-item"
|
4
|
+
:class="{ 'th-grid-item__border': border }"
|
5
|
+
:style="selfStyle"
|
6
|
+
>
|
3
7
|
<slot v-if="$slots.default"></slot>
|
4
|
-
<div
|
5
|
-
|
8
|
+
<div
|
9
|
+
v-else
|
10
|
+
class="th-grid-item-content"
|
11
|
+
:class="`th-grid-item-content_${position}`"
|
12
|
+
>
|
13
|
+
<i v-if="isIcon" :class="['th-icon', icon]"></i>
|
6
14
|
<img v-else class="th-grid-item-img" src="" alt="" />
|
7
|
-
<
|
8
|
-
<p class="th-grid-item-
|
15
|
+
<slot v-if="$slots.title" name="title"></slot>
|
16
|
+
<p v-else class="th-grid-item-title">{{ title }}</p>
|
9
17
|
</div>
|
10
18
|
</div>
|
11
19
|
</template>
|
@@ -15,11 +23,13 @@ export default {
|
|
15
23
|
name: "ThGridItem",
|
16
24
|
props: {
|
17
25
|
title: String,
|
18
|
-
label: String,
|
19
26
|
icon: String
|
20
27
|
},
|
21
28
|
data() {
|
22
|
-
return {
|
29
|
+
return {
|
30
|
+
position: "",
|
31
|
+
border: false
|
32
|
+
};
|
23
33
|
},
|
24
34
|
computed: {
|
25
35
|
isIcon() {
|
@@ -33,11 +43,15 @@ export default {
|
|
33
43
|
}
|
34
44
|
|
35
45
|
let column = 0;
|
36
|
-
if (parent)
|
46
|
+
if (parent) {
|
47
|
+
column = parent.column;
|
48
|
+
this.position = parent.position;
|
49
|
+
this.border = parent.border;
|
50
|
+
}
|
37
51
|
|
38
52
|
const style = {};
|
39
53
|
if (column) {
|
40
|
-
style.flex =
|
54
|
+
style.flex = "none";
|
41
55
|
style.flexBasis = `${100 / column}%`;
|
42
56
|
}
|
43
57
|
return style;
|
package/packages/Table/index.vue
CHANGED
package/packages/Table/tools.vue
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="th-tools">
|
2
|
+
<div class="th-table-tools">
|
3
3
|
<el-button
|
4
4
|
v-for="(item, index) in options"
|
5
5
|
:key="index"
|
@@ -43,7 +43,7 @@ export default {
|
|
43
43
|
</script>
|
44
44
|
|
45
45
|
<style lang="less" scoped>
|
46
|
-
.th-tools {
|
46
|
+
.th-table-tools {
|
47
47
|
margin-bottom: 10px;
|
48
48
|
}
|
49
49
|
</style>
|
@@ -9,11 +9,11 @@ export default {
|
|
9
9
|
components: { VueEditor },
|
10
10
|
model: {
|
11
11
|
prop: "value",
|
12
|
-
event: "
|
12
|
+
event: "upload:value"
|
13
13
|
},
|
14
14
|
props: {
|
15
15
|
value: String,
|
16
|
-
disabled:
|
16
|
+
disabled: Boolean
|
17
17
|
},
|
18
18
|
data() {
|
19
19
|
return {
|
@@ -21,10 +21,17 @@ export default {
|
|
21
21
|
};
|
22
22
|
},
|
23
23
|
watch: {
|
24
|
-
data
|
25
|
-
|
24
|
+
data: {
|
25
|
+
handler(val) {
|
26
|
+
this.$emit("upload:value", val);
|
27
|
+
},
|
28
|
+
deep: true
|
29
|
+
},
|
30
|
+
value(val) {
|
31
|
+
this.data = val;
|
26
32
|
}
|
27
|
-
}
|
33
|
+
},
|
34
|
+
methods: {}
|
28
35
|
};
|
29
36
|
</script>
|
30
37
|
|