htui-yllkbz 1.5.44 → 1.5.46
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 +345 -173
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +345 -173
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +9 -9
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtBaseData/index.vue +1 -1
- package/src/packages/HtDialog/index.ts +15 -0
- package/src/packages/HtDialog/index.vue +144 -0
- package/src/packages/HtDrawer/index.vue +56 -57
- package/src/packages/HtModel/index.vue +40 -35
- package/src/packages/HtTable/index.vue +169 -63
- package/src/packages/index.ts +4 -3
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
<!-- 基础数据级联选择 -->
|
|
283
283
|
<template v-else>
|
|
284
284
|
<template v-if="byCode">
|
|
285
|
-
|
|
285
|
+
|
|
286
286
|
<template v-if="state.configJson[item.code] && state.configJson[item.code].show">
|
|
287
287
|
<el-cascader :size="size"
|
|
288
288
|
popper-class="ht-cascader-poper"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Descripttion: 基础数据展示组件
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-04-12 17:34:51
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-04-21 16:31:50
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import HtDialog from "./index.vue";
|
|
11
|
+
(HtDialog as any).install = function (Vue: any) {
|
|
12
|
+
|
|
13
|
+
Vue.component("HtDialog", HtDialog);
|
|
14
|
+
};
|
|
15
|
+
export default HtDialog;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion:
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-09-28 10:24:08
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2024-10-15 10:22:59
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<el-dialog
|
|
11
|
+
:visible.sync="state.visible"
|
|
12
|
+
:fullscreen="fullscreen"
|
|
13
|
+
:top="top"
|
|
14
|
+
:custom-class="customClass"
|
|
15
|
+
:append-to-body="appendToBody"
|
|
16
|
+
:close-on-press-escape="closeOnPressEscape"
|
|
17
|
+
:destroy-on-close="destroyOnClose"
|
|
18
|
+
:modal-append-to-body="modalAppendToBody"
|
|
19
|
+
:close-on-click-modal="closeOnClickModal"
|
|
20
|
+
:modal="modal"
|
|
21
|
+
:lock-scroll="lockScroll"
|
|
22
|
+
@close="close"
|
|
23
|
+
:width="width"
|
|
24
|
+
class="ht-dialog"
|
|
25
|
+
:center="center"
|
|
26
|
+
:show-close="showClose"
|
|
27
|
+
:before-close="beforClose"
|
|
28
|
+
:withHeader="withHeader"
|
|
29
|
+
:wrapperClosable="wrapperClosable"
|
|
30
|
+
>
|
|
31
|
+
<span slot="title">
|
|
32
|
+
<slot name="title">
|
|
33
|
+
<span>
|
|
34
|
+
{{ title }}
|
|
35
|
+
</span>
|
|
36
|
+
</slot>
|
|
37
|
+
</span>
|
|
38
|
+
<div class="ht-dialog-body">
|
|
39
|
+
<slot></slot>
|
|
40
|
+
</div>
|
|
41
|
+
<span slot="footer" class="dialog-footer">
|
|
42
|
+
<slot name="footer" v-if="withFooter">
|
|
43
|
+
<template>
|
|
44
|
+
<el-button
|
|
45
|
+
style="margin-right: 16px"
|
|
46
|
+
type="primary"
|
|
47
|
+
:loading="loading"
|
|
48
|
+
:disabled="disabled"
|
|
49
|
+
@click="onOk"
|
|
50
|
+
>
|
|
51
|
+
{{ okText }}
|
|
52
|
+
</el-button>
|
|
53
|
+
<el-button :loading="loading" @click="onCancel">
|
|
54
|
+
{{ cancelText }}
|
|
55
|
+
</el-button>
|
|
56
|
+
</template>
|
|
57
|
+
</slot>
|
|
58
|
+
</span>
|
|
59
|
+
</el-dialog>
|
|
60
|
+
</template>
|
|
61
|
+
<script lang="ts">
|
|
62
|
+
import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
63
|
+
interface State {
|
|
64
|
+
/** 数据状态 */
|
|
65
|
+
loading: boolean;
|
|
66
|
+
/** 弹窗 */
|
|
67
|
+
visible: boolean;
|
|
68
|
+
}
|
|
69
|
+
@Component({
|
|
70
|
+
name: "HtDialog",
|
|
71
|
+
components: {},
|
|
72
|
+
})
|
|
73
|
+
export default class Index extends Vue {
|
|
74
|
+
/** 抽屉尺寸 */
|
|
75
|
+
@Prop({ default: "500px" }) width!: string;
|
|
76
|
+
/** 标题 */
|
|
77
|
+
@Prop() title!: string;
|
|
78
|
+
@Prop() loading!: boolean;
|
|
79
|
+
/** 是否禁用提交按钮 */
|
|
80
|
+
@Prop() disabled!: boolean;
|
|
81
|
+
/** 是否显示隐藏来自父级传参 */
|
|
82
|
+
@Prop() value!: boolean;
|
|
83
|
+
@Prop() fullscreen!: boolean;
|
|
84
|
+
@Prop() lockScroll!: boolean;
|
|
85
|
+
@Prop() center!: boolean;
|
|
86
|
+
@Prop({ default: "120px" }) top!: string;
|
|
87
|
+
@Prop({ default: false }) closeOnClickModal!: boolean;
|
|
88
|
+
|
|
89
|
+
@Prop({ default: true }) appendToBody!: boolean;
|
|
90
|
+
@Prop({ default: false }) wrapperClosable!: boolean;
|
|
91
|
+
/** 是否可以通过按下 ESC 关闭 Drawer */
|
|
92
|
+
@Prop({ default: false }) closeOnPressEscape!: boolean;
|
|
93
|
+
/** 控制是否在关闭 Drawer 之后将子元素全部销毁 */
|
|
94
|
+
@Prop({ default: true }) destroyOnClose!: boolean;
|
|
95
|
+
/** 是否需要遮罩层 */
|
|
96
|
+
@Prop({ default: true }) modal!: boolean;
|
|
97
|
+
/** Drawer 的自定义类名 */
|
|
98
|
+
@Prop() customClass!: string;
|
|
99
|
+
/** 遮罩层是否插入至 body 元素上,若为 false,则遮罩层会插入至 Drawer 的父元素上 */
|
|
100
|
+
@Prop({ default: true }) modalAppendToBody!: boolean;
|
|
101
|
+
@Prop({ default: true }) showClose!: boolean;
|
|
102
|
+
@Prop() beforClose!: any;
|
|
103
|
+
/** 控制是否显示 header 栏, 默认为 true, 当此项为 false 时, title attribute 和 title slot 均不生效 */
|
|
104
|
+
@Prop({ default: true }) withHeader!: boolean;
|
|
105
|
+
/** 控制是否显示 foot 栏, 默认为 true, 当此项为 false 时, foot attribute 和 foot slot 均不生效 */
|
|
106
|
+
@Prop({ default: true }) withFooter!: boolean;
|
|
107
|
+
/** footer的按钮是否靠右 */
|
|
108
|
+
@Prop({ default: true }) footerRight!: boolean;
|
|
109
|
+
@Prop({ default: "保存" }) okText?: string;
|
|
110
|
+
@Prop({ default: "取消" }) cancelText?: string;
|
|
111
|
+
/** 数据 */
|
|
112
|
+
state: State = {
|
|
113
|
+
loading: false,
|
|
114
|
+
visible: false,
|
|
115
|
+
};
|
|
116
|
+
/** 生命周期 */
|
|
117
|
+
/** 方法 */
|
|
118
|
+
onCancel() {
|
|
119
|
+
this.state.visible = false;
|
|
120
|
+
}
|
|
121
|
+
onOk() {
|
|
122
|
+
this.$emit("onOk", true);
|
|
123
|
+
}
|
|
124
|
+
close() {
|
|
125
|
+
this.$emit("onCancel", false);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** 监听 */
|
|
129
|
+
@Watch("value", { immediate: true })
|
|
130
|
+
getVisible(val: boolean, old: boolean) {
|
|
131
|
+
if (val !== old) {
|
|
132
|
+
this.state.visible = val;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/** 监听 */
|
|
136
|
+
@Watch("state.visible", { immediate: true })
|
|
137
|
+
setVisible(val: boolean) {
|
|
138
|
+
this.$emit("input", val);
|
|
139
|
+
this.$emit("change", val);
|
|
140
|
+
}
|
|
141
|
+
/** 计算属性 */
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
<style lang="scss" scoped></style>
|
|
@@ -7,71 +7,70 @@
|
|
|
7
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
|
-
|
|
10
|
+
<el-drawer
|
|
11
|
+
:visible.sync="state.visible"
|
|
12
|
+
:class="htClass"
|
|
13
|
+
:direction="direction"
|
|
14
|
+
:custom-class="customClass"
|
|
15
|
+
:append-to-body="appendToBody"
|
|
16
|
+
:close-on-press-escape="closeOnPressEscape"
|
|
17
|
+
:destroy-on-close="destroyOnClose"
|
|
18
|
+
:modal-append-to-body="modalAppendToBody"
|
|
19
|
+
:modal="modal"
|
|
20
|
+
@close="close"
|
|
21
|
+
:size="size"
|
|
22
|
+
:show-close="showClose"
|
|
23
|
+
:withHeader="withHeader"
|
|
24
|
+
:wrapperClosable="wrapperClosable"
|
|
25
|
+
>
|
|
24
26
|
<span slot="title">
|
|
25
|
-
<slot name="title"
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
<slot name="title">
|
|
28
|
+
<span style="display: inline-block; height: 24px; line-height: 24px">
|
|
29
|
+
{{ title }}
|
|
30
|
+
</span>
|
|
31
|
+
</slot>
|
|
28
32
|
</span>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
">
|
|
36
|
-
<el-scrollbar style="height: calc(100% + 19px)">
|
|
33
|
+
<div
|
|
34
|
+
style="overflow: hidden; padding: 0 16px"
|
|
35
|
+
:style="`height:calc(100vh - ${withFooter ? '72px' : '0px'} - ${
|
|
36
|
+
withHeader ? (htClass === 'ht-new-drawer' ? '60px' : '56px') : '0px'
|
|
37
|
+
})`"
|
|
38
|
+
>
|
|
39
|
+
<el-scrollbar style="height: calc(100% + 17px)">
|
|
37
40
|
<slot></slot>
|
|
38
41
|
</el-scrollbar>
|
|
39
42
|
</div>
|
|
40
43
|
<!-- <el-divider v-if="withFooter"></el-divider> -->
|
|
41
|
-
<div
|
|
42
|
-
<slot name="foot"
|
|
43
|
-
|
|
44
|
-
<template v-if="!footerRight">
|
|
44
|
+
<div v-if="withFooter">
|
|
45
|
+
<slot name="foot">
|
|
46
|
+
<div style="text-align: right; padding: 16px; box-sizing: border-box">
|
|
45
47
|
<template v-if="!readonly">
|
|
46
|
-
<el-button
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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>
|
|
48
|
+
<el-button
|
|
49
|
+
style="margin-right: 16px"
|
|
50
|
+
type="primary"
|
|
51
|
+
:loading="loading"
|
|
52
|
+
:disabled="disabled"
|
|
53
|
+
@click="onOk"
|
|
54
|
+
>
|
|
55
|
+
{{ okText }}
|
|
56
|
+
</el-button>
|
|
57
|
+
<el-button
|
|
58
|
+
:loading="loading"
|
|
59
|
+
style="margin-right: 16px"
|
|
60
|
+
@click="onCancel"
|
|
61
|
+
>
|
|
62
|
+
{{ cancelText }}
|
|
63
|
+
</el-button>
|
|
69
64
|
</template>
|
|
70
|
-
<el-button
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
65
|
+
<el-button
|
|
66
|
+
v-else
|
|
67
|
+
:loading="loading"
|
|
68
|
+
style="margin-left: 16px"
|
|
69
|
+
@click="onCancel"
|
|
70
|
+
>
|
|
71
|
+
{{ cancelText }}
|
|
72
|
+
</el-button>
|
|
73
|
+
</div>
|
|
75
74
|
</slot>
|
|
76
75
|
</div>
|
|
77
76
|
</el-drawer>
|
|
@@ -7,47 +7,52 @@
|
|
|
7
7
|
* @LastEditTime: 2024-10-15 10:22:59
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
|
-
<el-dialog
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
<el-dialog
|
|
11
|
+
:visible.sync="state.visible"
|
|
12
|
+
:fullscreen="fullscreen"
|
|
13
|
+
:top="top"
|
|
14
|
+
:custom-class="customClass"
|
|
15
|
+
:append-to-body="appendToBody"
|
|
16
|
+
:close-on-press-escape="closeOnPressEscape"
|
|
17
|
+
:destroy-on-close="destroyOnClose"
|
|
18
|
+
:modal-append-to-body="modalAppendToBody"
|
|
19
|
+
:close-on-click-modal="closeOnClickModal"
|
|
20
|
+
:modal="modal"
|
|
21
|
+
:lock-scroll="lockScroll"
|
|
22
|
+
@close="close"
|
|
23
|
+
:width="width"
|
|
24
|
+
class="ht-model"
|
|
25
|
+
:center="center"
|
|
26
|
+
:show-close="showClose"
|
|
27
|
+
:before-close="beforClose"
|
|
28
|
+
:withHeader="withHeader"
|
|
29
|
+
:wrapperClosable="wrapperClosable"
|
|
30
|
+
>
|
|
29
31
|
<span slot="title">
|
|
30
|
-
<slot name="title"
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
<slot name="title">
|
|
33
|
+
<span>
|
|
34
|
+
{{ title }}
|
|
35
|
+
</span>
|
|
36
|
+
</slot>
|
|
33
37
|
</span>
|
|
34
38
|
<div class="ht-model-body">
|
|
35
39
|
<slot></slot>
|
|
36
40
|
</div>
|
|
37
|
-
<span slot="footer"
|
|
38
|
-
|
|
39
|
-
:style="!footerRight ? 'text-align:left' : ''">
|
|
40
|
-
<slot name="footer"
|
|
41
|
-
v-if="withFooter">
|
|
41
|
+
<span slot="footer" class="dialog-footer">
|
|
42
|
+
<slot name="footer" v-if="withFooter">
|
|
42
43
|
<template>
|
|
43
|
-
<el-button
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
<el-button
|
|
45
|
+
style="margin-right: 16px"
|
|
46
|
+
type="primary"
|
|
47
|
+
:loading="loading"
|
|
48
|
+
:disabled="disabled"
|
|
49
|
+
@click="onOk"
|
|
50
|
+
>
|
|
51
|
+
{{ okText }}
|
|
52
|
+
</el-button>
|
|
53
|
+
<el-button :loading="loading" @click="onCancel">
|
|
54
|
+
{{ cancelText }}
|
|
55
|
+
</el-button>
|
|
51
56
|
</template>
|
|
52
57
|
</slot>
|
|
53
58
|
</span>
|