htui-yllkbz 1.4.20 → 1.4.21
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 +653 -2
- package/lib/htui.common.js.gz +0 -0
- package/lib/htui.css +1 -1
- package/lib/htui.umd.js +653 -2
- package/lib/htui.umd.js.gz +0 -0
- package/lib/htui.umd.min.js +26 -26
- 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/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 +22 -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>
|
|
@@ -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
|
+
|
package/src/packages/type.ts
CHANGED
|
@@ -126,6 +126,20 @@ export interface PageType {
|
|
|
126
126
|
totalCount: number;
|
|
127
127
|
|
|
128
128
|
}
|
|
129
|
+
/** 二次封装面包屑的类型 */
|
|
130
|
+
export interface BreadType {
|
|
131
|
+
/** 唯一值 */
|
|
132
|
+
key: string;
|
|
133
|
+
/** 名称 */
|
|
134
|
+
title: string;
|
|
135
|
+
/** vue的路由跳转 */
|
|
136
|
+
to?: string;
|
|
137
|
+
/** 完成的路由跳转 */
|
|
138
|
+
url?: string;
|
|
139
|
+
style?: string;
|
|
140
|
+
/** 跳转方式针对url */
|
|
141
|
+
target?: string;
|
|
142
|
+
}
|
|
129
143
|
/** cron表达式相关类型 */
|
|
130
144
|
export enum TimeModes {
|
|
131
145
|
Minute = 'Minute',
|
package/src/views/About.vue
CHANGED
|
@@ -4,11 +4,18 @@
|
|
|
4
4
|
* @Author: hutao
|
|
5
5
|
* @Date: 2021-11-15 14:41:40
|
|
6
6
|
* @LastEditors: hutao
|
|
7
|
-
* @LastEditTime: 2023-04-
|
|
7
|
+
* @LastEditTime: 2023-04-23 14:02:59
|
|
8
8
|
-->
|
|
9
9
|
<template>
|
|
10
10
|
<div>
|
|
11
|
-
|
|
11
|
+
<el-button @click="state.visible = true">打开</el-button>
|
|
12
|
+
<ht-row :gutter="16" :copies="10" colMinHeight="56px">
|
|
13
|
+
<ht-col :span="2">iii</ht-col>
|
|
14
|
+
<ht-col style="height:30px;border:1px solid #ccc" :span="4">iii</ht-col>
|
|
15
|
+
<ht-col :span="2">iii</ht-col>
|
|
16
|
+
<ht-col style="height:30px;border:1px solid #ccc" :span="4">iii</ht-col>
|
|
17
|
+
</ht-row>
|
|
18
|
+
<HtBread></HtBread>
|
|
12
19
|
<!-- <HtSelectOrg :multiple="false"></HtSelectOrg> -->
|
|
13
20
|
<!-- <el-button type=""
|
|
14
21
|
@click="test">test</el-button> -->
|
|
@@ -60,6 +67,9 @@
|
|
|
60
67
|
</template>
|
|
61
68
|
</HtTable>
|
|
62
69
|
</div>
|
|
70
|
+
<HtModel v-model="state.visible" :title="'买买买'">
|
|
71
|
+
考了多少会计数控了分手快乐
|
|
72
|
+
</HtModel>
|
|
63
73
|
</div>
|
|
64
74
|
</template>
|
|
65
75
|
<script lang="ts">
|
|
@@ -68,12 +78,17 @@ import HtTable from '@/packages/HtTable/index.vue';
|
|
|
68
78
|
import HtCountDown from '@/packages/HtCountDown/index.vue';
|
|
69
79
|
import HtSelectUser from '@/packages/HtSelectUser/index.vue';
|
|
70
80
|
import HtSelectOrg from '@/packages/HtSelectOrg/index.vue';
|
|
81
|
+
import HtRow from '@/packages/HtRow/index.vue';
|
|
82
|
+
import HtCol from '@/packages/HtCol/index.vue';
|
|
71
83
|
import { Column } from '@/packages/type';
|
|
84
|
+
import HtModel from '@/packages/HtModel';
|
|
85
|
+
import HtBread from '@/packages/HtBread';
|
|
72
86
|
import { getSpanMethod } from '@/packages/HtTable/table-span-method';
|
|
73
87
|
|
|
74
88
|
interface State {
|
|
75
89
|
/** 数据状态 */
|
|
76
90
|
loading: boolean;
|
|
91
|
+
visible: boolean;
|
|
77
92
|
columns: Column[];
|
|
78
93
|
data: any;
|
|
79
94
|
content: string;
|
|
@@ -86,12 +101,17 @@ interface State {
|
|
|
86
101
|
HtCountDown,
|
|
87
102
|
HtSelectUser,
|
|
88
103
|
HtSelectOrg,
|
|
104
|
+
HtRow,
|
|
105
|
+
HtCol,
|
|
106
|
+
HtBread,
|
|
107
|
+
HtModel,
|
|
89
108
|
},
|
|
90
109
|
})
|
|
91
110
|
export default class Index extends Vue {
|
|
92
111
|
/** 数据 */
|
|
93
112
|
state: State = {
|
|
94
113
|
loading: false,
|
|
114
|
+
visible: false,
|
|
95
115
|
start: false,
|
|
96
116
|
content: '',
|
|
97
117
|
colData: [],
|