htui-yllkbz 1.4.23 → 1.4.25
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 +218 -51
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +218 -51
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +79 -79
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtDrawer/index.vue +16 -6
- package/src/packages/HtModel/index.vue +11 -7
- package/src/packages/HtMore/index.vue +16 -5
- package/src/packages/HtPopover/index.ts +15 -0
- package/src/packages/HtPopover/index.vue +99 -0
- package/src/packages/HtTable/index.vue +4 -1
- package/src/packages/index.ts +4 -3
- package/src/packages/style.scss +7 -0
- package/src/views/About.vue +5 -2
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-09-28 10:24:08
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-
|
|
7
|
+
* @LastEditTime: 2023-04-24 13:45:53
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<el-drawer
|
|
@@ -44,9 +44,15 @@
|
|
|
44
44
|
<slot name="foot" v-if="withFooter">
|
|
45
45
|
<div>
|
|
46
46
|
<template v-if="!footerRight">
|
|
47
|
-
<el-button style="margin-left:20px" @click="onCancel"
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
<el-button style="margin-left:20px" @click="onCancel">{{
|
|
48
|
+
cancelText
|
|
49
|
+
}}</el-button>
|
|
50
|
+
<el-button
|
|
51
|
+
style="margin-left:20px"
|
|
52
|
+
:disabled="disabled"
|
|
53
|
+
type="primary"
|
|
54
|
+
@click="onOk"
|
|
55
|
+
>{{ okText }}</el-button
|
|
50
56
|
>
|
|
51
57
|
</template>
|
|
52
58
|
<template v-else>
|
|
@@ -54,14 +60,15 @@
|
|
|
54
60
|
style="margin-right:20px;float:right"
|
|
55
61
|
type="primary"
|
|
56
62
|
:loading="loading"
|
|
63
|
+
:disabled="disabled"
|
|
57
64
|
@click="onOk"
|
|
58
|
-
|
|
65
|
+
>{{ okText }}</el-button
|
|
59
66
|
>
|
|
60
67
|
<el-button
|
|
61
68
|
:loading="loading"
|
|
62
69
|
style="margin-right:20px;float:right"
|
|
63
70
|
@click="onCancel"
|
|
64
|
-
|
|
71
|
+
>{{ cancelText }}</el-button
|
|
65
72
|
>
|
|
66
73
|
</template>
|
|
67
74
|
</div>
|
|
@@ -108,8 +115,11 @@ export default class Index extends Vue {
|
|
|
108
115
|
@Prop({ default: true }) withHeader!: boolean;
|
|
109
116
|
/** 控制是否显示 foot 栏, 默认为 true, 当此项为 false 时, foot attribute 和 foot slot 均不生效 */
|
|
110
117
|
@Prop({ default: true }) withFooter!: boolean;
|
|
118
|
+
@Prop({ default: false }) disabled!: boolean;
|
|
111
119
|
/** footer的按钮是否靠右 */
|
|
112
120
|
@Prop({ default: false }) footerRight!: boolean;
|
|
121
|
+
@Prop({ default: '确定' }) okText?: string;
|
|
122
|
+
@Prop({ default: '取消' }) cancelText?: string;
|
|
113
123
|
/** 数据 */
|
|
114
124
|
state: State = {
|
|
115
125
|
loading: false,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-09-28 10:24:08
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-04-24 13:
|
|
7
|
+
* @LastEditTime: 2023-04-24 13:58:59
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<el-dialog
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
:lock-scroll="lockScroll"
|
|
22
22
|
@close="close"
|
|
23
23
|
:width="width"
|
|
24
|
+
class="ht-model"
|
|
24
25
|
:center="center"
|
|
25
26
|
:show-close="showClose"
|
|
26
27
|
:before-close="beforClose"
|
|
@@ -42,19 +43,20 @@
|
|
|
42
43
|
>
|
|
43
44
|
<slot name="footer" v-if="withFooter">
|
|
44
45
|
<template>
|
|
45
|
-
<el-button
|
|
46
|
-
:loading="loading"
|
|
47
|
-
style="margin-right:6px"
|
|
48
|
-
@click="onCancel"
|
|
49
|
-
>{{ cancelText }}</el-button
|
|
50
|
-
>
|
|
51
46
|
<el-button
|
|
52
47
|
style="margin-right:12px;"
|
|
53
48
|
type="primary"
|
|
54
49
|
:loading="loading"
|
|
50
|
+
:disabled="disabled"
|
|
55
51
|
@click="onOk"
|
|
56
52
|
>{{ okText }}</el-button
|
|
57
53
|
>
|
|
54
|
+
<el-button
|
|
55
|
+
:loading="loading"
|
|
56
|
+
style="margin-right:6px"
|
|
57
|
+
@click="onCancel"
|
|
58
|
+
>{{ cancelText }}</el-button
|
|
59
|
+
>
|
|
58
60
|
</template>
|
|
59
61
|
</slot>
|
|
60
62
|
</span>
|
|
@@ -78,6 +80,8 @@ export default class Index extends Vue {
|
|
|
78
80
|
/** 标题 */
|
|
79
81
|
@Prop() title!: string;
|
|
80
82
|
@Prop() loading!: boolean;
|
|
83
|
+
/** 是否禁用提交按钮 */
|
|
84
|
+
@Prop() disabled!: boolean;
|
|
81
85
|
/** 是否显示隐藏来自父级传参 */
|
|
82
86
|
@Prop() value!: boolean;
|
|
83
87
|
@Prop() fullscreen!: boolean;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2022-09-28 10:24:08
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-04-
|
|
7
|
+
* @LastEditTime: 2023-04-25 09:45:13
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<el-dropdown :trigger="trigger" @command="handleCommand($event, 'command')">
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
>删除</el-dropdown-item
|
|
30
30
|
>
|
|
31
31
|
</el-popconfirm> -->
|
|
32
|
-
<el-popover
|
|
32
|
+
<!-- <el-popover
|
|
33
33
|
width="200"
|
|
34
34
|
trigger="click"
|
|
35
35
|
v-model="state.visible"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
style="color:var(--danger);font-size:16px"
|
|
43
43
|
></i>
|
|
44
44
|
<p style="padding:0 0 0 6px;margin:0">
|
|
45
|
-
{{
|
|
45
|
+
{{ `删除后无法恢复,请确认是否删除${tips ? `【${tips}】` : ''}?` }}
|
|
46
46
|
</p>
|
|
47
47
|
</div>
|
|
48
48
|
<div style="text-align:right;width:100%;margin-top:16px">
|
|
@@ -62,12 +62,22 @@
|
|
|
62
62
|
<el-dropdown-item slot="reference" command="delete"
|
|
63
63
|
>删除</el-dropdown-item
|
|
64
64
|
>
|
|
65
|
-
</el-popover>
|
|
65
|
+
</el-popover> -->
|
|
66
|
+
<ht-popover
|
|
67
|
+
@confirm="handleCommand('delete', 'confirm')"
|
|
68
|
+
:tips="`删除后无法恢复,请确认是否删除${tips ? `【${tips}】` : ''}?`"
|
|
69
|
+
v-if="!!showTabs.includes('delete')"
|
|
70
|
+
>
|
|
71
|
+
<el-dropdown-item slot="reference" command="delete"
|
|
72
|
+
>删除</el-dropdown-item
|
|
73
|
+
>
|
|
74
|
+
</ht-popover>
|
|
66
75
|
</el-dropdown-menu>
|
|
67
76
|
</el-dropdown>
|
|
68
77
|
</template>
|
|
69
78
|
<script lang="ts">
|
|
70
79
|
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
80
|
+
import HtPopover from '@/packages/HtPopover/index.vue';
|
|
71
81
|
interface State {
|
|
72
82
|
/** 数据状态 */
|
|
73
83
|
loading: boolean;
|
|
@@ -76,7 +86,7 @@ interface State {
|
|
|
76
86
|
}
|
|
77
87
|
@Component({
|
|
78
88
|
name: 'HtMore',
|
|
79
|
-
components: {},
|
|
89
|
+
components: { HtPopover },
|
|
80
90
|
})
|
|
81
91
|
export default class Index extends Vue {
|
|
82
92
|
/** droptitle的样式 */
|
|
@@ -92,6 +102,7 @@ export default class Index extends Vue {
|
|
|
92
102
|
};
|
|
93
103
|
/** 生命周期 */
|
|
94
104
|
handleCommand(e: string, type: string) {
|
|
105
|
+
// console.log('e', e, type);
|
|
95
106
|
if (type === 'command' && e === 'delete') {
|
|
96
107
|
//console.log('111');
|
|
97
108
|
// this.$confirm(`请确认是否删除${this.tips ? `【${this.tips}】` : ''}?`)
|
|
@@ -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-24 16:07:02
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import HtPopover from "./index.vue";
|
|
11
|
+
(HtPopover as any).install = function (Vue: any) {
|
|
12
|
+
|
|
13
|
+
Vue.component("HtPopover", HtPopover);
|
|
14
|
+
};
|
|
15
|
+
export default HtPopover;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion: 更多
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-09-28 10:24:08
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-04-25 09:38:05
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<el-popover
|
|
11
|
+
placement="top-start"
|
|
12
|
+
:width="width"
|
|
13
|
+
:disabled="!!disabled"
|
|
14
|
+
:trigger="trigger"
|
|
15
|
+
v-model="state.visible"
|
|
16
|
+
>
|
|
17
|
+
<template
|
|
18
|
+
><slot>
|
|
19
|
+
<div>
|
|
20
|
+
<div style="display:flex;margin-top:12px">
|
|
21
|
+
<i :class="icon" :style="iconStyle"></i>
|
|
22
|
+
<p style="padding:0 0 0 6px;margin:0">
|
|
23
|
+
{{ tips }}
|
|
24
|
+
</p>
|
|
25
|
+
</div>
|
|
26
|
+
<div style="text-align:right;width:100%;margin-top:16px">
|
|
27
|
+
<el-button
|
|
28
|
+
:type="okType"
|
|
29
|
+
size="mini"
|
|
30
|
+
@click="
|
|
31
|
+
state.visible = false;
|
|
32
|
+
$emit('confirm');
|
|
33
|
+
"
|
|
34
|
+
style=""
|
|
35
|
+
>{{ okText }}</el-button
|
|
36
|
+
>
|
|
37
|
+
<el-button
|
|
38
|
+
size="mini"
|
|
39
|
+
:type="cancelType"
|
|
40
|
+
@click="
|
|
41
|
+
state.visible = false;
|
|
42
|
+
$emit('cancel');
|
|
43
|
+
"
|
|
44
|
+
>{{ cancelText }}</el-button
|
|
45
|
+
>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</slot>
|
|
49
|
+
</template>
|
|
50
|
+
<template slot="reference"> <slot name="reference"></slot></template>
|
|
51
|
+
</el-popover>
|
|
52
|
+
</template>
|
|
53
|
+
<script lang="ts">
|
|
54
|
+
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
55
|
+
import '@/packages/style.scss';
|
|
56
|
+
|
|
57
|
+
interface State {
|
|
58
|
+
/** 数据状态 */
|
|
59
|
+
loading: boolean;
|
|
60
|
+
/** 弹窗 */
|
|
61
|
+
visible: boolean;
|
|
62
|
+
}
|
|
63
|
+
@Component({
|
|
64
|
+
name: 'HtPopover',
|
|
65
|
+
components: {},
|
|
66
|
+
})
|
|
67
|
+
export default class Index extends Vue {
|
|
68
|
+
/** droptitle的样式 */
|
|
69
|
+
|
|
70
|
+
/** 分隔符 */
|
|
71
|
+
@Prop() separator?: string;
|
|
72
|
+
@Prop({ default: '取消' }) cancelText?: string;
|
|
73
|
+
@Prop({ default: '确认删除' }) okText?: string;
|
|
74
|
+
@Prop({ default: 'danger' }) okType?: string;
|
|
75
|
+
@Prop() cancelType?: string;
|
|
76
|
+
@Prop({ default: 'el-icon-warning' }) icon?: string;
|
|
77
|
+
@Prop({ default: '删除后无法恢复,请确认是否删除' }) tips?: string;
|
|
78
|
+
@Prop({ default: 'click' }) trigger?: string;
|
|
79
|
+
@Prop({ default: 200 }) width?: number;
|
|
80
|
+
@Prop() disabled?: boolean;
|
|
81
|
+
@Prop({ default: 'color:var(--danger);font-size:16px' }) iconStyle?: string;
|
|
82
|
+
|
|
83
|
+
/** 数据 */
|
|
84
|
+
state: State = {
|
|
85
|
+
loading: false,
|
|
86
|
+
visible: false,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
</script>
|
|
90
|
+
<style lang="scss" scoped>
|
|
91
|
+
.ht-link-title:hover {
|
|
92
|
+
color: var(--primary);
|
|
93
|
+
}
|
|
94
|
+
.ht-icon-more {
|
|
95
|
+
transform: rotate(90deg);
|
|
96
|
+
color: var(--primary);
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-11 11:23:24
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-04-17
|
|
7
|
+
* @LastEditTime: 2023-04-24 17:10:43
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div v-loading="state.loading" style="background:#fff">
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
:row-key="rowKey || 'id'"
|
|
41
41
|
:data="data"
|
|
42
42
|
tooltip-effect="dark"
|
|
43
|
+
:tree-props="treeProps"
|
|
43
44
|
@row-click="
|
|
44
45
|
(row, column, event) => $emit('row-click', row, column, event)
|
|
45
46
|
"
|
|
@@ -354,6 +355,8 @@ export default class HtTable extends Vue {
|
|
|
354
355
|
};
|
|
355
356
|
/** 是否启用展开行功能 */
|
|
356
357
|
@Prop() isExpand?: boolean;
|
|
358
|
+
/** 渲染嵌套数据的配置选项 */
|
|
359
|
+
@Prop() treeProps?: any;
|
|
357
360
|
/** 打开配置列 */
|
|
358
361
|
@Prop() configShow?: boolean;
|
|
359
362
|
/** 是否增加筛选功能 */
|
package/src/packages/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-10-21 10:08:41
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-04-
|
|
7
|
+
* @LastEditTime: 2023-04-24 16:30:18
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
// 导入组件
|
|
@@ -38,6 +38,7 @@ import HtRow from './HtRow'
|
|
|
38
38
|
import HtCol from './HtCol'
|
|
39
39
|
import HtModel from "./HtModel"
|
|
40
40
|
import HtBread from './HtBread'
|
|
41
|
+
import HtPopover from './HtPopover'
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
@@ -45,7 +46,7 @@ import HtBread from './HtBread'
|
|
|
45
46
|
|
|
46
47
|
|
|
47
48
|
// 存储组件列表
|
|
48
|
-
const components = [HtRow, HtCol, HtBread, HtModel, HtMenu, HtSelectCategory, HtSelectUnit, HtSelectPosition, HtMore, HtSelectTimeSlot, HtSelectCron, HtBaseData, HtDrawer, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
|
|
49
|
+
const components = [HtRow, HtCol, HtBread, HtPopover, HtModel, HtMenu, HtSelectCategory, HtSelectUnit, HtSelectPosition, HtMore, HtSelectTimeSlot, HtSelectCron, HtBaseData, HtDrawer, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
|
|
49
50
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
50
51
|
const install = function (Vue: any) {
|
|
51
52
|
// 判断是否安装
|
|
@@ -61,7 +62,7 @@ export default {
|
|
|
61
62
|
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
62
63
|
install,
|
|
63
64
|
// 以下是具体的组件列表
|
|
64
|
-
HtRow, HtCol, HtModel, HtBread,
|
|
65
|
+
HtRow, HtCol, HtModel, HtBread, HtPopover,
|
|
65
66
|
HtSelectTable, HtSelectPosition, HtPagination, HtShowBaseType, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtMore,
|
|
66
67
|
HtSelectUnit, HtSelectCategory, HtMenu,
|
|
67
68
|
HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData, HtDrawer, HtSelectCron, HtSelectTimeSlot
|
package/src/packages/style.scss
CHANGED
package/src/views/About.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-04-24
|
|
7
|
+
* @LastEditTime: 2023-04-24 13:55:36
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
</template>
|
|
69
69
|
</HtTable>
|
|
70
70
|
</div>
|
|
71
|
-
<HtModel v-model="state.visible" :title="'买买买'">
|
|
71
|
+
<HtModel @onOk="submitTest()" v-model="state.visible" :title="'买买买'">
|
|
72
72
|
考了多少会计数控了分手快乐
|
|
73
73
|
</HtModel>
|
|
74
74
|
</div>
|
|
@@ -229,6 +229,9 @@ export default class Index extends Vue {
|
|
|
229
229
|
created() {
|
|
230
230
|
//this.rewriteGetComputedStyle();
|
|
231
231
|
}
|
|
232
|
+
submitTest() {
|
|
233
|
+
console.log('00000');
|
|
234
|
+
}
|
|
232
235
|
/** 方法 */
|
|
233
236
|
// test(e) {
|
|
234
237
|
// // console.log("eee", e);
|