htui-yllkbz 1.4.20 → 1.4.22
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 +691 -37
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +691 -37
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +28 -28
- package/lib/htui.umd.min.js.gz +0 -0
- package/package.json +1 -1
- package/src/packages/HtBread/index.ts +15 -0
- package/src/packages/HtBread/index.vue +79 -0
- package/src/packages/HtCol/index.ts +15 -0
- package/src/packages/HtCol/index.vue +121 -0
- package/src/packages/HtModel/index.ts +15 -0
- package/src/packages/HtModel/index.vue +144 -0
- package/src/packages/HtMore/index.vue +61 -23
- package/src/packages/HtRow/index.ts +15 -0
- package/src/packages/HtRow/index.vue +72 -0
- package/src/packages/index.ts +8 -2
- package/src/packages/style.scss +48 -0
- package/src/packages/type.ts +14 -0
- package/src/views/About.vue +25 -2
package/lib/htui.umd.min.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -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-23 13:44:24
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import HtBread from "./index.vue";
|
|
11
|
+
(HtBread as any).install = function (Vue: any) {
|
|
12
|
+
|
|
13
|
+
Vue.component("HtBread", HtBread);
|
|
14
|
+
};
|
|
15
|
+
export default HtBread;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion: 更多
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-09-28 10:24:08
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-04-23 14:23:41
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<el-breadcrumb
|
|
11
|
+
class="ht-breadcrumb"
|
|
12
|
+
:separator-class="separatorClass"
|
|
13
|
+
:separator="separator"
|
|
14
|
+
>
|
|
15
|
+
<el-breadcrumb-item
|
|
16
|
+
:to="item.to ? { path: item.to } : undefined"
|
|
17
|
+
:style="item.style"
|
|
18
|
+
:class="{ ['ht-is-link']: item.to || item.url }"
|
|
19
|
+
:key="item.key"
|
|
20
|
+
v-for="item in dataSource"
|
|
21
|
+
><span class="ht-breadcrumb-item" @click="clickBreadCrumbItem(item)">{{
|
|
22
|
+
item.title
|
|
23
|
+
}}</span></el-breadcrumb-item
|
|
24
|
+
>
|
|
25
|
+
</el-breadcrumb>
|
|
26
|
+
</template>
|
|
27
|
+
<script lang="ts">
|
|
28
|
+
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
29
|
+
import '@/packages/style.scss';
|
|
30
|
+
import { BreadType } from '../type';
|
|
31
|
+
interface State {
|
|
32
|
+
/** 数据状态 */
|
|
33
|
+
loading: boolean;
|
|
34
|
+
/** 弹窗 */
|
|
35
|
+
visible: boolean;
|
|
36
|
+
}
|
|
37
|
+
@Component({
|
|
38
|
+
name: 'HtBread',
|
|
39
|
+
components: {},
|
|
40
|
+
})
|
|
41
|
+
export default class Index extends Vue {
|
|
42
|
+
/** droptitle的样式 */
|
|
43
|
+
|
|
44
|
+
@Prop({ default: 'el-icon-arrow-right' }) separatorClass?: string;
|
|
45
|
+
/** 分隔符 */
|
|
46
|
+
@Prop() separator?: string;
|
|
47
|
+
/** 面包屑的内容 */
|
|
48
|
+
@Prop() data?: BreadType[];
|
|
49
|
+
|
|
50
|
+
/** 数据 */
|
|
51
|
+
state: State = {
|
|
52
|
+
loading: false,
|
|
53
|
+
visible: false,
|
|
54
|
+
};
|
|
55
|
+
clickBreadCrumbItem(item: BreadType) {
|
|
56
|
+
this.$emit('callback', item);
|
|
57
|
+
if (item.url) {
|
|
58
|
+
if (item.target === '_blank') {
|
|
59
|
+
window.open(item.url);
|
|
60
|
+
} else {
|
|
61
|
+
window.location.href = item.url;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
get dataSource(): BreadType[] {
|
|
66
|
+
return this.data || [];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</script>
|
|
70
|
+
<style lang="scss" scoped>
|
|
71
|
+
.ht-link-title:hover {
|
|
72
|
+
color: var(--primary);
|
|
73
|
+
}
|
|
74
|
+
.ht-icon-more {
|
|
75
|
+
transform: rotate(90deg);
|
|
76
|
+
color: var(--primary);
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
@@ -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:35:06
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import HtCol from "./index.vue";
|
|
11
|
+
(HtCol as any).install = function (Vue: any) {
|
|
12
|
+
|
|
13
|
+
Vue.component("HtCol", HtCol);
|
|
14
|
+
};
|
|
15
|
+
export default HtCol;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion: 更多
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-09-28 10:24:08
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-04-21 18:39:03
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div
|
|
11
|
+
class="ht-col"
|
|
12
|
+
:class="{
|
|
13
|
+
[`ht-col-${span || copies}`]: !!(span || copies),
|
|
14
|
+
'ht-col-offset': offset,
|
|
15
|
+
}"
|
|
16
|
+
style="padding-left: 10px; padding-right: 10px;"
|
|
17
|
+
:style="colStyle"
|
|
18
|
+
>
|
|
19
|
+
<slot></slot>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
|
24
|
+
import '@/packages/style.scss';
|
|
25
|
+
interface State {
|
|
26
|
+
/** 数据状态 */
|
|
27
|
+
loading: boolean;
|
|
28
|
+
/** 弹窗 */
|
|
29
|
+
visible: boolean;
|
|
30
|
+
}
|
|
31
|
+
@Component({
|
|
32
|
+
name: 'HtCol',
|
|
33
|
+
components: {},
|
|
34
|
+
})
|
|
35
|
+
export default class Index extends Vue {
|
|
36
|
+
/** droptitle的样式 */
|
|
37
|
+
|
|
38
|
+
@Prop() span?: number;
|
|
39
|
+
|
|
40
|
+
/** 芬兰便宜 */
|
|
41
|
+
@Prop() offset?: number;
|
|
42
|
+
|
|
43
|
+
/** 数据 */
|
|
44
|
+
state: State = {
|
|
45
|
+
loading: false,
|
|
46
|
+
visible: false,
|
|
47
|
+
};
|
|
48
|
+
/** padding值 */
|
|
49
|
+
get gutter() {
|
|
50
|
+
const parent: any = this.$parent;
|
|
51
|
+
|
|
52
|
+
return parent && parent.$options && parent.$options.propsData
|
|
53
|
+
? parent.$options.propsData.gutter
|
|
54
|
+
: 0;
|
|
55
|
+
}
|
|
56
|
+
/** 高度 */
|
|
57
|
+
get colHeight() {
|
|
58
|
+
const parent: any = this.$parent;
|
|
59
|
+
|
|
60
|
+
return parent && parent.$options && parent.$options.propsData
|
|
61
|
+
? parent.$options.propsData.colHeight
|
|
62
|
+
: 0;
|
|
63
|
+
}
|
|
64
|
+
/** 最小高度 */
|
|
65
|
+
get colMinHeight() {
|
|
66
|
+
const parent: any = this.$parent;
|
|
67
|
+
|
|
68
|
+
return parent && parent.$options && parent.$options.propsData
|
|
69
|
+
? parent.$options.propsData.colMinHeight
|
|
70
|
+
: 0;
|
|
71
|
+
}
|
|
72
|
+
/** 总份数默认24份 */
|
|
73
|
+
get copies() {
|
|
74
|
+
const parent: any = this.$parent;
|
|
75
|
+
|
|
76
|
+
return parent && parent.$options && parent.$options.propsData
|
|
77
|
+
? (parent as any).$options.propsData.copies
|
|
78
|
+
: 24;
|
|
79
|
+
}
|
|
80
|
+
/** 计算属性 */
|
|
81
|
+
get colStyle() {
|
|
82
|
+
let styl = this.gutter
|
|
83
|
+
? `padding-left: ${this.gutter / 2}px; padding-right: ${this.gutter /
|
|
84
|
+
2}px;`
|
|
85
|
+
: '';
|
|
86
|
+
if (this.offset) {
|
|
87
|
+
styl = styl + `margin-left:${100 / (this.copies / this.offset)}%;`;
|
|
88
|
+
}
|
|
89
|
+
if (this.colHeight) {
|
|
90
|
+
styl =
|
|
91
|
+
styl +
|
|
92
|
+
`height:${
|
|
93
|
+
isNaN(this.colHeight) ? this.colHeight : this.colHeight + 'px'
|
|
94
|
+
};`;
|
|
95
|
+
}
|
|
96
|
+
if (this.colMinHeight) {
|
|
97
|
+
styl =
|
|
98
|
+
styl +
|
|
99
|
+
`min-height:${
|
|
100
|
+
isNaN(this.colMinHeight)
|
|
101
|
+
? this.colMinHeight
|
|
102
|
+
: this.colMinHeight + 'px'
|
|
103
|
+
};`;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
styl = styl + `width:${100 / (this.copies / (this.span || this.copies))}%;`;
|
|
107
|
+
|
|
108
|
+
return styl;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
</script>
|
|
112
|
+
<style lang="scss" scoped>
|
|
113
|
+
.ht-link-title:hover {
|
|
114
|
+
color: var(--primary);
|
|
115
|
+
}
|
|
116
|
+
.ht-icon-more {
|
|
117
|
+
transform: rotate(90deg);
|
|
118
|
+
color: var(--primary);
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
}
|
|
121
|
+
</style>
|
|
@@ -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 HtModel from "./index.vue";
|
|
11
|
+
(HtModel as any).install = function (Vue: any) {
|
|
12
|
+
|
|
13
|
+
Vue.component("HtModel", HtModel);
|
|
14
|
+
};
|
|
15
|
+
export default HtModel;
|
|
@@ -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: 2023-04-23 14:24:26
|
|
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
|
+
:center="center"
|
|
25
|
+
:show-close="showClose"
|
|
26
|
+
:before-close="beforClose"
|
|
27
|
+
:withHeader="withHeader"
|
|
28
|
+
:wrapperClosable="wrapperClosable"
|
|
29
|
+
>
|
|
30
|
+
<span slot="title">
|
|
31
|
+
<slot name="title"
|
|
32
|
+
><span style="font-size:18px;font-weight:bold;padding:0px 0 0 12px">{{
|
|
33
|
+
title
|
|
34
|
+
}}</span></slot
|
|
35
|
+
>
|
|
36
|
+
</span>
|
|
37
|
+
<div style="padding:0 12px"><slot></slot></div>
|
|
38
|
+
<span
|
|
39
|
+
slot="footer"
|
|
40
|
+
class="dialog-footer ht-model-footer"
|
|
41
|
+
:style="!footerRight ? 'text-align:left' : ''"
|
|
42
|
+
>
|
|
43
|
+
<slot name="footer" v-if="withFooter">
|
|
44
|
+
<template>
|
|
45
|
+
<el-button
|
|
46
|
+
:loading="loading"
|
|
47
|
+
style="margin-right:6px"
|
|
48
|
+
@click="onCancel"
|
|
49
|
+
>{{ cancelText }}</el-button
|
|
50
|
+
>
|
|
51
|
+
<el-button
|
|
52
|
+
style="margin-right:12px;"
|
|
53
|
+
type="primary"
|
|
54
|
+
:loading="loading"
|
|
55
|
+
@click="onOk"
|
|
56
|
+
>{{ okText }}</el-button
|
|
57
|
+
>
|
|
58
|
+
</template>
|
|
59
|
+
</slot>
|
|
60
|
+
</span>
|
|
61
|
+
</el-dialog>
|
|
62
|
+
</template>
|
|
63
|
+
<script lang="ts">
|
|
64
|
+
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
|
65
|
+
interface State {
|
|
66
|
+
/** 数据状态 */
|
|
67
|
+
loading: boolean;
|
|
68
|
+
/** 弹窗 */
|
|
69
|
+
visible: boolean;
|
|
70
|
+
}
|
|
71
|
+
@Component({
|
|
72
|
+
name: 'HtDrawer',
|
|
73
|
+
components: {},
|
|
74
|
+
})
|
|
75
|
+
export default class Index extends Vue {
|
|
76
|
+
/** 抽屉尺寸 */
|
|
77
|
+
@Prop({ default: '500px' }) width!: string;
|
|
78
|
+
/** 标题 */
|
|
79
|
+
@Prop() title!: string;
|
|
80
|
+
@Prop() loading!: 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>
|
|
@@ -4,33 +4,70 @@
|
|
|
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 10:16:37
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<el-dropdown :trigger="trigger" @command="handleCommand($event, 'command')">
|
|
11
|
-
<span class="el-dropdown-link">
|
|
11
|
+
<span class="el-dropdown-link" style="cursor:pointer;color:var(--primary)">
|
|
12
12
|
<slot>
|
|
13
13
|
<i class="ht-icon-more el-icon-more"></i>
|
|
14
14
|
</slot>
|
|
15
15
|
</span>
|
|
16
16
|
<el-dropdown-menu slot="dropdown">
|
|
17
|
-
<slot name="dropdown">
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
<slot name="dropdown"> </slot>
|
|
18
|
+
<el-dropdown-item v-if="!!showTabs.includes('edit')" command="edit"
|
|
19
|
+
>编辑</el-dropdown-item
|
|
20
|
+
>
|
|
21
|
+
<!-- <el-popconfirm
|
|
22
22
|
@confirm="handleCommand('delete', 'confirm')"
|
|
23
23
|
v-if="!!showTabs.includes('delete')"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
icon="el-icon-warning"
|
|
25
|
+
icon-color="var(--danger)"
|
|
26
|
+
:title="`删除后无法回复,请确认是否删除${tips ? `【${tips}】` : ''}?`"
|
|
27
|
+
>
|
|
28
|
+
<el-dropdown-item slot="reference" command="delete"
|
|
29
|
+
>删除</el-dropdown-item
|
|
30
|
+
>
|
|
31
|
+
</el-popconfirm> -->
|
|
32
|
+
<el-popover
|
|
33
|
+
width="200"
|
|
34
|
+
trigger="click"
|
|
35
|
+
v-model="state.visible"
|
|
36
|
+
v-if="!!showTabs.includes('delete')"
|
|
37
|
+
>
|
|
38
|
+
<div>
|
|
39
|
+
<div style="display:flex;margin-top:12px">
|
|
40
|
+
<i
|
|
41
|
+
class="el-icon-warning"
|
|
42
|
+
style="color:var(--danger);font-size:16px"
|
|
43
|
+
></i>
|
|
44
|
+
<p style="padding:0 0 0 6px;margin:0">
|
|
45
|
+
{{ `删除后无法回复,请确认是否删除${tips ? `【${tips}】` : ''}?` }}
|
|
46
|
+
</p>
|
|
47
|
+
</div>
|
|
48
|
+
<div style="text-align:right;width:100%;margin-top:16px">
|
|
49
|
+
<el-button
|
|
50
|
+
type="danger"
|
|
51
|
+
size="mini"
|
|
52
|
+
@click="handleCommand('delete', 'confirm')"
|
|
53
|
+
style=""
|
|
54
|
+
>确认删除</el-button
|
|
55
|
+
>
|
|
56
|
+
<el-button size="mini" @click="state.visible = false"
|
|
57
|
+
>取消</el-button
|
|
58
|
+
>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<el-dropdown-item slot="reference" command="delete"
|
|
63
|
+
>删除</el-dropdown-item
|
|
64
|
+
>
|
|
65
|
+
</el-popover>
|
|
29
66
|
</el-dropdown-menu>
|
|
30
67
|
</el-dropdown>
|
|
31
68
|
</template>
|
|
32
69
|
<script lang="ts">
|
|
33
|
-
import { Component, Prop, Vue
|
|
70
|
+
import { Component, Prop, Vue } from 'vue-property-decorator';
|
|
34
71
|
interface State {
|
|
35
72
|
/** 数据状态 */
|
|
36
73
|
loading: boolean;
|
|
@@ -56,17 +93,18 @@ export default class Index extends Vue {
|
|
|
56
93
|
/** 生命周期 */
|
|
57
94
|
handleCommand(e: string, type: string) {
|
|
58
95
|
if (type === 'command' && e === 'delete') {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
//不管
|
|
96
|
+
//console.log('111');
|
|
97
|
+
// this.$confirm(`请确认是否删除${this.tips ? `【${this.tips}】` : ''}?`)
|
|
98
|
+
// .then((_) => {
|
|
99
|
+
// this.handleCommand('delete', 'confirm');
|
|
100
|
+
// //
|
|
101
|
+
// })
|
|
102
|
+
// .catch((_) => {
|
|
103
|
+
// //
|
|
104
|
+
// });
|
|
105
|
+
//不管1.4.2
|
|
69
106
|
} else {
|
|
107
|
+
this.state.visible = false;
|
|
70
108
|
this.$emit('callback', e);
|
|
71
109
|
}
|
|
72
110
|
}
|
|
@@ -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 HtRow from "./index.vue";
|
|
11
|
+
(HtRow as any).install = function (Vue: any) {
|
|
12
|
+
|
|
13
|
+
Vue.component("HtRow", HtRow);
|
|
14
|
+
};
|
|
15
|
+
export default HtRow;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Descripttion: 更多
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: hutao
|
|
5
|
+
* @Date: 2022-09-28 10:24:08
|
|
6
|
+
* @LastEditors: hutao
|
|
7
|
+
* @LastEditTime: 2023-04-23 10:35:30
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div
|
|
11
|
+
class="ht-row"
|
|
12
|
+
:class="type === 'flex' ? 'ht-row--flex' : ''"
|
|
13
|
+
:style="rowStyle"
|
|
14
|
+
>
|
|
15
|
+
<slot :gutter="gutter"> </slot>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
|
|
20
|
+
import '@/packages/style.scss';
|
|
21
|
+
interface State {
|
|
22
|
+
/** 数据状态 */
|
|
23
|
+
loading: boolean;
|
|
24
|
+
/** 弹窗 */
|
|
25
|
+
visible: boolean;
|
|
26
|
+
}
|
|
27
|
+
@Component({
|
|
28
|
+
name: 'HtRow',
|
|
29
|
+
components: {},
|
|
30
|
+
})
|
|
31
|
+
export default class Index extends Vue {
|
|
32
|
+
/** droptitle的样式 */
|
|
33
|
+
|
|
34
|
+
@Prop() gutter?: number;
|
|
35
|
+
/** s是否为flex布局 */
|
|
36
|
+
@Prop() type?: string;
|
|
37
|
+
@Prop() copies?: number;
|
|
38
|
+
@Prop() colHeight?: number;
|
|
39
|
+
/** col的最小高度 */
|
|
40
|
+
@Prop() colMinHeight?: number;
|
|
41
|
+
@Prop({ default: 'start' }) justify?: string;
|
|
42
|
+
|
|
43
|
+
/** 数据 */
|
|
44
|
+
state: State = {
|
|
45
|
+
loading: false,
|
|
46
|
+
visible: false,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** 计算属性 */
|
|
50
|
+
get rowStyle() {
|
|
51
|
+
let styl = this.gutter
|
|
52
|
+
? `margin-left: -${this.gutter / 2}px; margin-right: -${this.gutter /
|
|
53
|
+
2}px;`
|
|
54
|
+
: '';
|
|
55
|
+
if (this.type === 'flex') {
|
|
56
|
+
styl = styl + `justify-content:${this.justify}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return styl;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
<style lang="scss" scoped>
|
|
64
|
+
.ht-link-title:hover {
|
|
65
|
+
color: var(--primary);
|
|
66
|
+
}
|
|
67
|
+
.ht-icon-more {
|
|
68
|
+
transform: rotate(90deg);
|
|
69
|
+
color: var(--primary);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
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-
|
|
7
|
+
* @LastEditTime: 2023-04-23 10:37:02
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
// 导入组件
|
|
@@ -34,13 +34,18 @@ import HtSelectUnit from './HtSelectUnit'
|
|
|
34
34
|
import HtSelectPosition from './HtSelectPosition'
|
|
35
35
|
import HtSelectCategory from './HtSelectCategory'
|
|
36
36
|
import HtMenu from './HtMenu'
|
|
37
|
+
import HtRow from './HtRow'
|
|
38
|
+
import HtCol from './HtCol'
|
|
39
|
+
import HtModel from "./HtModel"
|
|
40
|
+
import HtBread from './HtBread'
|
|
41
|
+
|
|
37
42
|
|
|
38
43
|
|
|
39
44
|
|
|
40
45
|
|
|
41
46
|
|
|
42
47
|
// 存储组件列表
|
|
43
|
-
const components = [HtMenu, HtSelectCategory, HtSelectUnit, HtSelectPosition, HtMore, HtSelectTimeSlot, HtSelectCron, HtBaseData, HtDrawer, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
|
|
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]
|
|
44
49
|
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
|
|
45
50
|
const install = function (Vue: any) {
|
|
46
51
|
// 判断是否安装
|
|
@@ -56,6 +61,7 @@ export default {
|
|
|
56
61
|
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
57
62
|
install,
|
|
58
63
|
// 以下是具体的组件列表
|
|
64
|
+
HtRow, HtCol, HtModel, HtBread,
|
|
59
65
|
HtSelectTable, HtSelectPosition, HtPagination, HtShowBaseType, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtMore,
|
|
60
66
|
HtSelectUnit, HtSelectCategory, HtMenu,
|
|
61
67
|
HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData, HtDrawer, HtSelectCron, HtSelectTimeSlot
|
package/src/packages/style.scss
CHANGED
|
@@ -58,3 +58,51 @@ $primary-color: var(--primary);
|
|
|
58
58
|
.ht-user-disabled {
|
|
59
59
|
color: #ddd;
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
.ht-row{
|
|
63
|
+
position: relative;
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
// &:after {
|
|
66
|
+
|
|
67
|
+
// };
|
|
68
|
+
// &:before {
|
|
69
|
+
// display: table;
|
|
70
|
+
// content: "";
|
|
71
|
+
// };
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ht-row::before,.ht-row::after{
|
|
76
|
+
display: table;
|
|
77
|
+
content: "";
|
|
78
|
+
}
|
|
79
|
+
.ht-row::after{
|
|
80
|
+
clear: both;
|
|
81
|
+
}
|
|
82
|
+
.ht-row--flex{
|
|
83
|
+
display: flex;
|
|
84
|
+
}
|
|
85
|
+
[class*=ht-col-] {
|
|
86
|
+
float: left;
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ht-breadcrumb{
|
|
91
|
+
.el-breadcrumb__item{
|
|
92
|
+
color: #333;
|
|
93
|
+
.is-link{
|
|
94
|
+
font-weight: 400;
|
|
95
|
+
color: #333;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
.ht-breadcrumb-item{
|
|
99
|
+
color: #333;
|
|
100
|
+
}
|
|
101
|
+
.ht-is-link span{
|
|
102
|
+
&:hover{
|
|
103
|
+
color:var(--primary);
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|