htui-yllkbz 1.5.31 → 1.5.32
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 +28 -29
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.umd.js +28 -29
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +1 -1
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtDrawer/index.vue +58 -82
- package/src/packages/HtModel/index.vue +2 -2
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -4,104 +4,80 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-09-28 10:24:08
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime:
|
|
7
|
+
* @LastEditTime: 2024-10-15 10:24:26
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
|
-
<el-drawer
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:wrapperClosable="wrapperClosable"
|
|
25
|
-
>
|
|
10
|
+
<el-drawer :visible.sync="state.visible"
|
|
11
|
+
:class="htClass"
|
|
12
|
+
:direction="direction"
|
|
13
|
+
:custom-class="customClass"
|
|
14
|
+
:append-to-body="appendToBody"
|
|
15
|
+
:close-on-press-escape="closeOnPressEscape"
|
|
16
|
+
:destroy-on-close="destroyOnClose"
|
|
17
|
+
:modal-append-to-body="modalAppendToBody"
|
|
18
|
+
:modal="modal"
|
|
19
|
+
@close="close"
|
|
20
|
+
:size="size"
|
|
21
|
+
:show-close="showClose"
|
|
22
|
+
:withHeader="withHeader"
|
|
23
|
+
:wrapperClosable="wrapperClosable">
|
|
26
24
|
<span slot="title">
|
|
27
|
-
<slot name="title"
|
|
28
|
-
><span style="font-size:18px;font-weight:bold;color:#323433">{{
|
|
25
|
+
<slot name="title"><span style="font-size:var(--font-size-main-title,18px);font-weight:bold;">{{
|
|
29
26
|
title
|
|
30
|
-
}}</span></slot
|
|
31
|
-
>
|
|
27
|
+
}}</span></slot>
|
|
32
28
|
</span>
|
|
33
29
|
|
|
34
|
-
<div
|
|
35
|
-
|
|
36
|
-
:style="
|
|
30
|
+
<div style="overflow:hidden;padding:0 16px"
|
|
31
|
+
:style="
|
|
37
32
|
`height:calc(100vh - ${withFooter ? '56px' : '0px'} - ${
|
|
38
33
|
withHeader ? (htClass === 'ht-new-drawer' ? '60px' : '90px') : '0px'
|
|
39
34
|
})`
|
|
40
|
-
"
|
|
41
|
-
>
|
|
35
|
+
">
|
|
42
36
|
<el-scrollbar style="height: calc(100% + 19px)">
|
|
43
37
|
<slot></slot>
|
|
44
38
|
</el-scrollbar>
|
|
45
39
|
</div>
|
|
46
40
|
<!-- <el-divider v-if="withFooter"></el-divider> -->
|
|
47
41
|
<div style="margin-top:16px">
|
|
48
|
-
<slot name="foot"
|
|
42
|
+
<slot name="foot"
|
|
43
|
+
v-if="withFooter">
|
|
49
44
|
<template v-if="!footerRight">
|
|
50
45
|
<template v-if="!readonly">
|
|
51
|
-
<el-button
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<el-button
|
|
60
|
-
:loading="loading"
|
|
61
|
-
style="margin-left:16px"
|
|
62
|
-
@click="onCancel"
|
|
63
|
-
>{{ cancelText }}</el-button
|
|
64
|
-
>
|
|
46
|
+
<el-button style="margin-left:24px"
|
|
47
|
+
:disabled="disabled"
|
|
48
|
+
:loading="loading"
|
|
49
|
+
type="primary"
|
|
50
|
+
@click="onOk">{{ okText }}</el-button>
|
|
51
|
+
<el-button :loading="loading"
|
|
52
|
+
style="margin-left:16px"
|
|
53
|
+
@click="onCancel">{{ cancelText }}</el-button>
|
|
65
54
|
</template>
|
|
66
|
-
<el-button
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@click="onCancel"
|
|
71
|
-
>{{ cancelText }}</el-button
|
|
72
|
-
>
|
|
55
|
+
<el-button v-else
|
|
56
|
+
:loading="loading"
|
|
57
|
+
style="margin-left:24px"
|
|
58
|
+
@click="onCancel">{{ cancelText }}</el-button>
|
|
73
59
|
</template>
|
|
74
60
|
<template v-else>
|
|
75
|
-
<template v-if="!readonly"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
>
|
|
84
|
-
<el-button
|
|
85
|
-
:loading="loading"
|
|
86
|
-
style="margin-right:16px;float:right"
|
|
87
|
-
@click="onCancel"
|
|
88
|
-
>{{ cancelText }}</el-button
|
|
89
|
-
>
|
|
61
|
+
<template v-if="!readonly"><el-button style="margin-right:24px;float:right"
|
|
62
|
+
type="primary"
|
|
63
|
+
:loading="loading"
|
|
64
|
+
:disabled="disabled"
|
|
65
|
+
@click="onOk">{{ okText }}</el-button>
|
|
66
|
+
<el-button :loading="loading"
|
|
67
|
+
style="margin-right:16px;float:right"
|
|
68
|
+
@click="onCancel">{{ cancelText }}</el-button>
|
|
90
69
|
</template>
|
|
91
|
-
<el-button
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
@click="onCancel"
|
|
96
|
-
>{{ cancelText }}</el-button
|
|
97
|
-
>
|
|
70
|
+
<el-button v-else
|
|
71
|
+
:loading="loading"
|
|
72
|
+
style="margin-left:24px"
|
|
73
|
+
@click="onCancel">{{ cancelText }}</el-button>
|
|
98
74
|
</template>
|
|
99
75
|
</slot>
|
|
100
76
|
</div>
|
|
101
77
|
</el-drawer>
|
|
102
78
|
</template>
|
|
103
79
|
<script lang="ts">
|
|
104
|
-
import { Component, Prop, Vue, Watch } from
|
|
80
|
+
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
105
81
|
interface State {
|
|
106
82
|
/** 数据状态 */
|
|
107
83
|
loading: boolean;
|
|
@@ -109,12 +85,12 @@ interface State {
|
|
|
109
85
|
visible: boolean;
|
|
110
86
|
}
|
|
111
87
|
@Component({
|
|
112
|
-
name:
|
|
88
|
+
name: "HtDrawer",
|
|
113
89
|
components: {},
|
|
114
90
|
})
|
|
115
91
|
export default class Index extends Vue {
|
|
116
92
|
/** 抽屉尺寸 */
|
|
117
|
-
@Prop({ default:
|
|
93
|
+
@Prop({ default: "50%" }) size!: string;
|
|
118
94
|
/** 标题 */
|
|
119
95
|
@Prop() title!: string;
|
|
120
96
|
@Prop() htClass!: string;
|
|
@@ -123,7 +99,7 @@ export default class Index extends Vue {
|
|
|
123
99
|
/** 是否显示隐藏来自父级传参 */
|
|
124
100
|
@Prop() value!: boolean;
|
|
125
101
|
/** 展开方式 参考elemen UI */
|
|
126
|
-
@Prop({ default:
|
|
102
|
+
@Prop({ default: "rtl" }) direction!: string;
|
|
127
103
|
|
|
128
104
|
@Prop({ default: true }) appendToBody!: boolean;
|
|
129
105
|
@Prop({ default: false }) wrapperClosable!: boolean;
|
|
@@ -145,8 +121,8 @@ export default class Index extends Vue {
|
|
|
145
121
|
@Prop({ default: false }) disabled!: boolean;
|
|
146
122
|
/** footer的按钮是否靠右 */
|
|
147
123
|
@Prop({ default: false }) footerRight!: boolean;
|
|
148
|
-
@Prop({ default:
|
|
149
|
-
@Prop({ default:
|
|
124
|
+
@Prop({ default: "确定" }) okText?: string;
|
|
125
|
+
@Prop({ default: "取消" }) cancelText?: string;
|
|
150
126
|
/** 数据 */
|
|
151
127
|
state: State = {
|
|
152
128
|
loading: false,
|
|
@@ -158,24 +134,24 @@ export default class Index extends Vue {
|
|
|
158
134
|
this.state.visible = false;
|
|
159
135
|
}
|
|
160
136
|
onOk() {
|
|
161
|
-
this.$emit(
|
|
137
|
+
this.$emit("onOk", true);
|
|
162
138
|
}
|
|
163
139
|
close() {
|
|
164
|
-
this.$emit(
|
|
140
|
+
this.$emit("onCancel", false);
|
|
165
141
|
}
|
|
166
142
|
|
|
167
143
|
/** 监听 */
|
|
168
|
-
@Watch(
|
|
144
|
+
@Watch("value", { immediate: true })
|
|
169
145
|
getVisible(val: boolean, old: boolean) {
|
|
170
146
|
if (val !== old) {
|
|
171
147
|
this.state.visible = val;
|
|
172
148
|
}
|
|
173
149
|
}
|
|
174
150
|
/** 监听 */
|
|
175
|
-
@Watch(
|
|
151
|
+
@Watch("state.visible", { immediate: true })
|
|
176
152
|
setVisible(val: boolean) {
|
|
177
|
-
this.$emit(
|
|
178
|
-
this.$emit(
|
|
153
|
+
this.$emit("input", val);
|
|
154
|
+
this.$emit("change", val);
|
|
179
155
|
}
|
|
180
156
|
/** 计算属性 */
|
|
181
157
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-09-28 10:24:08
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2024-10-15
|
|
7
|
+
* @LastEditTime: 2024-10-15 10:22:59
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<el-dialog :visible.sync="state.visible"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
:withHeader="withHeader"
|
|
28
28
|
:wrapperClosable="wrapperClosable">
|
|
29
29
|
<span slot="title">
|
|
30
|
-
<slot name="title"><span style="font-size:18px;font-weight:bold;padding:0px 0 0 12px">{{
|
|
30
|
+
<slot name="title"><span style="font-size:var(--font-size-main-title,18px);font-weight:bold;padding:0px 0 0 12px">{{
|
|
31
31
|
title
|
|
32
32
|
}}</span></slot>
|
|
33
33
|
</span>
|