htui-yllkbz 1.3.59 → 1.3.61

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.3.59",
3
+ "version": "1.3.61",
4
4
  "port": "8082",
5
5
  "typings": "types/index.d.ts",
6
6
  "main": "lib/htui.common.js",
@@ -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: 2022-09-28 11:18:26
8
+ */
9
+
10
+ import HtDrawer from "./index.vue";
11
+ (HtDrawer as any).install = function (Vue: any) {
12
+
13
+ Vue.component("HtDrawer", HtDrawer);
14
+ };
15
+ export default HtDrawer;
@@ -0,0 +1,123 @@
1
+ <!--
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2022-09-28 10:24:08
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-09-28 11:22:34
8
+ -->
9
+ <template>
10
+ <el-drawer
11
+ :visible.sync="state.visible"
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
+ :size="size"
20
+ :show-close="showClose"
21
+ :withHeader="withHeader"
22
+ :wrapperClosable="wrapperClosable"
23
+ >
24
+ <span slot="title">
25
+ <slot name="title"
26
+ ><span style="font-size:18px;font-weight:bold">{{ title }}</span></slot
27
+ >
28
+ </span>
29
+
30
+ <div
31
+ style="overflow:hidden;;padding:0 16px"
32
+ :style="
33
+ `height:calc(100vh - ${withFooter ? '90px' : '0px'} - ${
34
+ withHeader ? '100px' : '0px'
35
+ })`
36
+ "
37
+ >
38
+ <el-scrollbar style="height: calc(100% + 19px)">
39
+ <slot></slot>
40
+ </el-scrollbar>
41
+ </div>
42
+ <el-divider v-if="withFooter"></el-divider>
43
+ <slot name="foot" v-if="withFooter">
44
+ <div>
45
+ <el-button style="margin-left:20px" @click="onCancel">取消</el-button>
46
+ <el-button style="margin-left:20px" type="primary" @click="onOk"
47
+ >确定</el-button
48
+ >
49
+ </div></slot
50
+ >
51
+ </el-drawer>
52
+ </template>
53
+ <script lang="ts">
54
+ import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
55
+ interface State {
56
+ /** 数据状态 */
57
+ loading: boolean;
58
+ /** 弹窗 */
59
+ visible: boolean;
60
+ }
61
+ @Component({
62
+ name: 'HtDrawer',
63
+ components: {},
64
+ })
65
+ export default class Index extends Vue {
66
+ /** 抽屉尺寸 */
67
+ @Prop({ default: '50%' }) size!: string;
68
+ /** 标题 */
69
+ @Prop() title!: string;
70
+ /** 是否显示隐藏来自父级传参 */
71
+ @Prop() value!: boolean;
72
+ /** 展开方式 参考elemen UI */
73
+ @Prop({ default: 'rtl' }) direction!: string;
74
+
75
+ @Prop({ default: true }) appendToBody!: boolean;
76
+ @Prop({ default: false }) wrapperClosable!: boolean;
77
+ /** 是否可以通过按下 ESC 关闭 Drawer */
78
+ @Prop({ default: false }) closeOnPressEscape!: boolean;
79
+ /** 控制是否在关闭 Drawer 之后将子元素全部销毁 */
80
+ @Prop({ default: false }) destroyOnClose!: boolean;
81
+ /** 是否需要遮罩层 */
82
+ @Prop({ default: true }) modal!: boolean;
83
+ /** Drawer 的自定义类名 */
84
+ @Prop() customClass!: string;
85
+ /** 遮罩层是否插入至 body 元素上,若为 false,则遮罩层会插入至 Drawer 的父元素上 */
86
+ @Prop({ default: true }) modalAppendToBody!: boolean;
87
+ @Prop({ default: true }) showClose!: boolean;
88
+ /** 控制是否显示 header 栏, 默认为 true, 当此项为 false 时, title attribute 和 title slot 均不生效 */
89
+ @Prop({ default: true }) withHeader!: boolean;
90
+ /** 控制是否显示 foot 栏, 默认为 true, 当此项为 false 时, foot attribute 和 foot slot 均不生效 */
91
+ @Prop({ default: true }) withFooter!: boolean;
92
+ /** 数据 */
93
+ state: State = {
94
+ loading: false,
95
+ visible: false,
96
+ };
97
+ /** 生命周期 */
98
+ /** 方法 */
99
+ onCancel() {
100
+ this.state.visible = false;
101
+ this.$emit('onCancel', false);
102
+ }
103
+ onOk() {
104
+ this.$emit('onOk', true);
105
+ }
106
+
107
+ /** 监听 */
108
+ @Watch('value', { immediate: true })
109
+ getVisible(val: boolean, old: boolean) {
110
+ if (val !== old) {
111
+ this.state.visible = val;
112
+ }
113
+ }
114
+ /** 监听 */
115
+ @Watch('state.visible', { immediate: true })
116
+ setVisible(val: boolean) {
117
+ this.$emit('input', val);
118
+ this.$emit('change', val);
119
+ }
120
+ /** 计算属性 */
121
+ }
122
+ </script>
123
+ <style lang="scss" scoped></style>
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-10-21 10:08:41
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-05-15 15:58:44
7
+ * @LastEditTime: 2022-09-28 11:19:36
8
8
  */
9
9
 
10
10
  // 导入组件
@@ -26,12 +26,13 @@ import HtShowBaseData from './HtShowBaseData/index'
26
26
  import HtOrgInfo from './HtOrgInfo/index'
27
27
  import HtBaseData from './HtBaseData/index'
28
28
  import HtShowBaseType from './HtShowBaseType'
29
+ import HtDrawer from './HtDrawer'
29
30
 
30
31
 
31
32
 
32
33
 
33
34
  // 存储组件列表
34
- const components = [HtBaseData, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
35
+ const components = [HtBaseData, HtDrawer, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
35
36
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
36
37
  const install = function (Vue: any) {
37
38
  // 判断是否安装
@@ -48,6 +49,6 @@ export default {
48
49
  install,
49
50
  // 以下是具体的组件列表
50
51
  HtSelectTable, HtPagination, HtShowBaseType, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
51
- HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData
52
+ HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData, HtDrawer
52
53
  }
53
54