sh-view 2.8.0 → 2.8.2
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/.eslintrc.js +25 -20
- package/other.js +8 -8
- package/package.json +9 -6
- package/packages/components/index.js +91 -91
- package/packages/components/sh-alert/alert.ts +30 -0
- package/packages/components/sh-alert/index.vue +143 -168
- package/packages/components/sh-badge/index.vue +242 -242
- package/packages/components/sh-calendar/index.vue +650 -650
- package/packages/components/sh-card/index.vue +148 -148
- package/packages/components/sh-code-editor/index.vue +19 -19
- package/packages/components/sh-col/index.vue +92 -92
- package/packages/components/sh-corner/index.vue +230 -230
- package/packages/components/sh-count-to/index.vue +131 -131
- package/packages/components/sh-date/index.vue +301 -301
- package/packages/components/sh-drawer/index.vue +579 -579
- package/packages/components/sh-drawer/scrollbar.js +78 -78
- package/packages/components/sh-empty/index.vue +42 -42
- package/packages/components/sh-form/js/props.js +76 -76
- package/packages/components/sh-form/js/useForm.js +229 -229
- package/packages/components/sh-header/index.vue +261 -260
- package/packages/components/sh-icon/css/default/ionicons.svg +869 -869
- package/packages/components/sh-icon/css/font/iconfont.json +247 -247
- package/packages/components/sh-icon/index.vue +41 -41
- package/packages/components/sh-image/index.vue +133 -133
- package/packages/components/sh-list/index.vue +146 -146
- package/packages/components/sh-loading/index.vue +53 -53
- package/packages/components/sh-modal/index.vue +188 -188
- package/packages/components/sh-noticebar/index.vue +215 -215
- package/packages/components/sh-poptip/index.vue +597 -597
- package/packages/components/sh-progress/index.vue +276 -276
- package/packages/components/sh-pull-refresh/index.vue +289 -289
- package/packages/components/sh-result/index.vue +114 -114
- package/packages/components/sh-row/index.vue +66 -66
- package/packages/components/sh-split/components/trigger.vue +33 -33
- package/packages/components/sh-split/index.vue +342 -342
- package/packages/components/sh-table/components/importModal.vue +363 -363
- package/packages/components/sh-table/components/sh-column.vue +68 -68
- package/packages/components/sh-table/js/excel_to_json.js +313 -313
- package/packages/components/sh-table/js/props.js +305 -305
- package/packages/components/sh-table/js/tableMethods.js +167 -167
- package/packages/components/sh-table/js/useTable.js +636 -636
- package/packages/components/sh-table/table.vue +217 -217
- package/packages/components/sh-tabs/index.vue +426 -426
- package/packages/components/sh-tag/index.vue +168 -168
- package/packages/components/sh-toolbar/index.vue +182 -182
- package/packages/components/sh-tree/components/table-tree.vue +289 -289
- package/packages/components/sh-tree/mixin/treeProps.js +122 -122
- package/packages/components/sh-upload/index.vue +535 -535
- package/packages/components/sh-water-fall/index.vue +80 -80
- package/packages/components/sh-water-mark/index.vue +96 -96
- package/packages/css/index.js +4 -4
- package/packages/directive/index.js +19 -19
- package/packages/directive/module/click-out.js +14 -14
- package/packages/directive/module/draggable.js +42 -42
- package/packages/directive/module/line-clamp.js +22 -22
- package/packages/directive/module/prevent-click.js +18 -18
- package/packages/directive/module/resize.js +14 -14
- package/packages/directive/module/ripple.js +166 -166
- package/packages/index.js +39 -39
- package/packages/mixin/index.js +86 -86
- package/packages/other/sh-cron-modal/components/cron-content.vue +294 -294
- package/packages/other/sh-cron-modal/index.vue +81 -81
- package/packages/other/sh-cron-modal/mixin/cron-emits.js +1 -1
- package/packages/other/sh-cron-modal/mixin/cron-props.js +9 -9
- package/packages/other/sh-cron-modal/tabs/cron-week-box.vue +126 -126
- package/packages/other/sh-menu/index.vue +326 -326
- package/packages/other/sh-menu/menu-group-content.vue +136 -136
- package/packages/other/sh-menu/menu-item-content.vue +71 -71
- package/packages/other/sh-menu-card/index.vue +250 -250
- package/packages/other/sh-menu-card/menu-box.vue +87 -87
- package/packages/other/sh-preview/components/sh-excel.vue +163 -163
- package/packages/other/sh-preview/js/data-hook.js +41 -41
- package/packages/other/sh-preview/js/data-props.js +15 -15
- package/packages/other/sh-system-tip/index.vue +115 -115
- package/packages/utils/resize.js +69 -70
- package/packages/utils/transfer-queue.js +12 -12
- package/packages/vxeTable/index.js +193 -184
- package/packages/vxeTable/plugins/export.js +450 -450
- package/packages/vxeTable/render/cell/vxe-render-img.vue +27 -27
- package/packages/vxeTable/render/cell/vxe-render-table.vue +51 -51
- package/packages/vxeTable/render/cell/vxe-render-time.vue +44 -44
- package/packages/vxeTable/render/cell/vxe-render-tree.vue +70 -70
- package/packages/vxeTable/render/filters/vxe-filter-input.vue +26 -26
- package/packages/vxeTable/render/filters/vxe-filter-time.vue +26 -26
- package/packages/vxeTable/render/globalRenders.jsx +514 -514
- package/packages/vxeTable/render/mixin/cell-hooks.js +198 -198
- package/packages/vxeTable/render/mixin/cell-props.js +23 -23
- package/packages/vxeTable/render/mixin/filter-hooks.js +46 -46
- package/tsconfig.json +25 -0
- package/types/component.d.ts +1 -0
- package/types/index.ts +0 -0
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="sh-result">
|
|
3
|
-
<div v-if="isicon || slots.icon" class="sh-result-icon" :class="resultType">
|
|
4
|
-
<slot name="icon"><sh-icon :type="resultIcon" :size="iconSize" /></slot>
|
|
5
|
-
</div>
|
|
6
|
-
<div v-if="title || slots.title" class="sh-result-title" :title="title">
|
|
7
|
-
<slot name="title">{{ title }}</slot>
|
|
8
|
-
</div>
|
|
9
|
-
<div v-if="text || slots.text" v-line-clamp="clamp" class="sh-result-text" :title="text">
|
|
10
|
-
<slot name="text">{{ text }}</slot>
|
|
11
|
-
</div>
|
|
12
|
-
<slot name="default"></slot>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import { defineComponent, computed } from 'vue'
|
|
18
|
-
export default defineComponent({
|
|
19
|
-
name: 'ShResult',
|
|
20
|
-
props: {
|
|
21
|
-
type: {
|
|
22
|
-
type: String,
|
|
23
|
-
default: ''
|
|
24
|
-
},
|
|
25
|
-
isicon: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: true
|
|
28
|
-
},
|
|
29
|
-
icon: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: ''
|
|
32
|
-
},
|
|
33
|
-
iconSize: {
|
|
34
|
-
type: Number,
|
|
35
|
-
default: 50
|
|
36
|
-
},
|
|
37
|
-
title: {
|
|
38
|
-
type: String
|
|
39
|
-
},
|
|
40
|
-
text: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: ''
|
|
43
|
-
},
|
|
44
|
-
clamp: {
|
|
45
|
-
type: Number,
|
|
46
|
-
default: 2
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
setup(props, context) {
|
|
50
|
-
const { emit, slots } = context
|
|
51
|
-
let types = ['success', 'error', 'warning', 'info']
|
|
52
|
-
let resultTitleMap = {
|
|
53
|
-
success: '成功',
|
|
54
|
-
error: '失败',
|
|
55
|
-
warning: '警告',
|
|
56
|
-
info: '提示'
|
|
57
|
-
}
|
|
58
|
-
let resultIconMap = {
|
|
59
|
-
success: 'ios-checkmark-circle',
|
|
60
|
-
error: 'ios-close-circle',
|
|
61
|
-
warning: 'ios-alert',
|
|
62
|
-
info: 'ios-information-circle'
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const resultType = computed(() => {
|
|
66
|
-
return types.includes(props.type) ? props.type : 'info'
|
|
67
|
-
})
|
|
68
|
-
const resultIcon = computed(() => {
|
|
69
|
-
return resultIconMap[resultType.value]
|
|
70
|
-
})
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
slots,
|
|
74
|
-
resultType,
|
|
75
|
-
resultIcon
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
</script>
|
|
80
|
-
|
|
81
|
-
<style lang="scss" scoped>
|
|
82
|
-
.sh-result {
|
|
83
|
-
width: 100%;
|
|
84
|
-
display: block;
|
|
85
|
-
text-align: center;
|
|
86
|
-
padding: 10px;
|
|
87
|
-
.sh-result-icon {
|
|
88
|
-
box-sizing: border-box;
|
|
89
|
-
color: var(--vxe-primary-color);
|
|
90
|
-
&.success {
|
|
91
|
-
color: var(--vxe-success-color);
|
|
92
|
-
}
|
|
93
|
-
&.error {
|
|
94
|
-
color: var(--vxe-danger-color);
|
|
95
|
-
}
|
|
96
|
-
&.warning {
|
|
97
|
-
color: var(--vxe-warning-color);
|
|
98
|
-
}
|
|
99
|
-
&.info {
|
|
100
|
-
color: var(--vxe-info-color);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
&-title {
|
|
104
|
-
color: var(--title-color);
|
|
105
|
-
font-size: 1.5em;
|
|
106
|
-
line-height: 1;
|
|
107
|
-
margin-top: 15px;
|
|
108
|
-
}
|
|
109
|
-
&-text {
|
|
110
|
-
color: var(--vxe-font-color);
|
|
111
|
-
margin-top: 15px;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sh-result">
|
|
3
|
+
<div v-if="isicon || slots.icon" class="sh-result-icon" :class="resultType">
|
|
4
|
+
<slot name="icon"><sh-icon :type="resultIcon" :size="iconSize" /></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<div v-if="title || slots.title" class="sh-result-title" :title="title">
|
|
7
|
+
<slot name="title">{{ title }}</slot>
|
|
8
|
+
</div>
|
|
9
|
+
<div v-if="text || slots.text" v-line-clamp="clamp" class="sh-result-text" :title="text">
|
|
10
|
+
<slot name="text">{{ text }}</slot>
|
|
11
|
+
</div>
|
|
12
|
+
<slot name="default"></slot>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import { defineComponent, computed } from 'vue'
|
|
18
|
+
export default defineComponent({
|
|
19
|
+
name: 'ShResult',
|
|
20
|
+
props: {
|
|
21
|
+
type: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ''
|
|
24
|
+
},
|
|
25
|
+
isicon: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
29
|
+
icon: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: ''
|
|
32
|
+
},
|
|
33
|
+
iconSize: {
|
|
34
|
+
type: Number,
|
|
35
|
+
default: 50
|
|
36
|
+
},
|
|
37
|
+
title: {
|
|
38
|
+
type: String
|
|
39
|
+
},
|
|
40
|
+
text: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: ''
|
|
43
|
+
},
|
|
44
|
+
clamp: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 2
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
setup(props, context) {
|
|
50
|
+
const { emit, slots } = context
|
|
51
|
+
let types = ['success', 'error', 'warning', 'info']
|
|
52
|
+
let resultTitleMap = {
|
|
53
|
+
success: '成功',
|
|
54
|
+
error: '失败',
|
|
55
|
+
warning: '警告',
|
|
56
|
+
info: '提示'
|
|
57
|
+
}
|
|
58
|
+
let resultIconMap = {
|
|
59
|
+
success: 'ios-checkmark-circle',
|
|
60
|
+
error: 'ios-close-circle',
|
|
61
|
+
warning: 'ios-alert',
|
|
62
|
+
info: 'ios-information-circle'
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const resultType = computed(() => {
|
|
66
|
+
return types.includes(props.type) ? props.type : 'info'
|
|
67
|
+
})
|
|
68
|
+
const resultIcon = computed(() => {
|
|
69
|
+
return resultIconMap[resultType.value]
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
slots,
|
|
74
|
+
resultType,
|
|
75
|
+
resultIcon
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<style lang="scss" scoped>
|
|
82
|
+
.sh-result {
|
|
83
|
+
width: 100%;
|
|
84
|
+
display: block;
|
|
85
|
+
text-align: center;
|
|
86
|
+
padding: 10px;
|
|
87
|
+
.sh-result-icon {
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
color: var(--vxe-primary-color);
|
|
90
|
+
&.success {
|
|
91
|
+
color: var(--vxe-success-color);
|
|
92
|
+
}
|
|
93
|
+
&.error {
|
|
94
|
+
color: var(--vxe-danger-color);
|
|
95
|
+
}
|
|
96
|
+
&.warning {
|
|
97
|
+
color: var(--vxe-warning-color);
|
|
98
|
+
}
|
|
99
|
+
&.info {
|
|
100
|
+
color: var(--vxe-info-color);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
&-title {
|
|
104
|
+
color: var(--title-color);
|
|
105
|
+
font-size: 1.5em;
|
|
106
|
+
line-height: 1;
|
|
107
|
+
margin-top: 15px;
|
|
108
|
+
}
|
|
109
|
+
&-text {
|
|
110
|
+
color: var(--vxe-font-color);
|
|
111
|
+
margin-top: 15px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="classes" :style="styles">
|
|
3
|
-
<slot></slot>
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import { defineComponent, computed, provide } from 'vue'
|
|
9
|
-
import './css/index.scss'
|
|
10
|
-
export default defineComponent({
|
|
11
|
-
name: 'ShRow',
|
|
12
|
-
props: {
|
|
13
|
-
align: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: 'top' // 'top', 'middle', 'bottom'
|
|
16
|
-
},
|
|
17
|
-
justify: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: 'start' // 'start', 'end', 'center', 'space-around', 'space-between'
|
|
20
|
-
},
|
|
21
|
-
gutter: {
|
|
22
|
-
type: Number,
|
|
23
|
-
default: 0
|
|
24
|
-
},
|
|
25
|
-
wrap: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: true
|
|
28
|
-
},
|
|
29
|
-
margin: {
|
|
30
|
-
type: Boolean
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
setup(props, context) {
|
|
34
|
-
const prefixCls = 'sh-row'
|
|
35
|
-
provide('RowInstance', props)
|
|
36
|
-
|
|
37
|
-
const classes = computed(() => {
|
|
38
|
-
return [
|
|
39
|
-
`${prefixCls}`,
|
|
40
|
-
{
|
|
41
|
-
[`${prefixCls}-${props.align}`]: !!props.align,
|
|
42
|
-
[`${prefixCls}-${props.justify}`]: !!props.justify,
|
|
43
|
-
[`${prefixCls}-wrap`]: props.wrap
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
})
|
|
47
|
-
const styles = computed(() => {
|
|
48
|
-
let style = {}
|
|
49
|
-
if (props.gutter !== 0 && props.margin) {
|
|
50
|
-
style = {
|
|
51
|
-
marginLeft: props.gutter / -2 + 'px',
|
|
52
|
-
marginRight: props.gutter / -2 + 'px'
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return style
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
classes,
|
|
60
|
-
styles
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
</script>
|
|
65
|
-
|
|
66
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classes" :style="styles">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { defineComponent, computed, provide } from 'vue'
|
|
9
|
+
import './css/index.scss'
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'ShRow',
|
|
12
|
+
props: {
|
|
13
|
+
align: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'top' // 'top', 'middle', 'bottom'
|
|
16
|
+
},
|
|
17
|
+
justify: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: 'start' // 'start', 'end', 'center', 'space-around', 'space-between'
|
|
20
|
+
},
|
|
21
|
+
gutter: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 0
|
|
24
|
+
},
|
|
25
|
+
wrap: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: true
|
|
28
|
+
},
|
|
29
|
+
margin: {
|
|
30
|
+
type: Boolean
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
setup(props, context) {
|
|
34
|
+
const prefixCls = 'sh-row'
|
|
35
|
+
provide('RowInstance', props)
|
|
36
|
+
|
|
37
|
+
const classes = computed(() => {
|
|
38
|
+
return [
|
|
39
|
+
`${prefixCls}`,
|
|
40
|
+
{
|
|
41
|
+
[`${prefixCls}-${props.align}`]: !!props.align,
|
|
42
|
+
[`${prefixCls}-${props.justify}`]: !!props.justify,
|
|
43
|
+
[`${prefixCls}-wrap`]: props.wrap
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
const styles = computed(() => {
|
|
48
|
+
let style = {}
|
|
49
|
+
if (props.gutter !== 0 && props.margin) {
|
|
50
|
+
style = {
|
|
51
|
+
marginLeft: props.gutter / -2 + 'px',
|
|
52
|
+
marginRight: props.gutter / -2 + 'px'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return style
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
return {
|
|
59
|
+
classes,
|
|
60
|
+
styles
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style scoped lang="scss"></style>
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="classes">
|
|
3
|
-
<div :class="barConClasses">
|
|
4
|
-
<i v-for="i in 8" v-once :key="`trigger-${i}`" :class="`${prefix}-bar`"></i>
|
|
5
|
-
</div>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
export default {
|
|
11
|
-
name: 'SplitTrigger',
|
|
12
|
-
props: {
|
|
13
|
-
mode: String
|
|
14
|
-
},
|
|
15
|
-
data() {
|
|
16
|
-
return {
|
|
17
|
-
prefix: 'sh-split-trigger',
|
|
18
|
-
initOffset: 0
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
computed: {
|
|
22
|
-
isVertical() {
|
|
23
|
-
return this.mode === 'vertical'
|
|
24
|
-
},
|
|
25
|
-
classes() {
|
|
26
|
-
return [this.prefix, this.isVertical ? `${this.prefix}-vertical` : `${this.prefix}-horizontal`]
|
|
27
|
-
},
|
|
28
|
-
barConClasses() {
|
|
29
|
-
return [`${this.prefix}-bar-con`, this.isVertical ? 'vertical' : 'horizontal']
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classes">
|
|
3
|
+
<div :class="barConClasses">
|
|
4
|
+
<i v-for="i in 8" v-once :key="`trigger-${i}`" :class="`${prefix}-bar`"></i>
|
|
5
|
+
</div>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
name: 'SplitTrigger',
|
|
12
|
+
props: {
|
|
13
|
+
mode: String
|
|
14
|
+
},
|
|
15
|
+
data() {
|
|
16
|
+
return {
|
|
17
|
+
prefix: 'sh-split-trigger',
|
|
18
|
+
initOffset: 0
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
computed: {
|
|
22
|
+
isVertical() {
|
|
23
|
+
return this.mode === 'vertical'
|
|
24
|
+
},
|
|
25
|
+
classes() {
|
|
26
|
+
return [this.prefix, this.isVertical ? `${this.prefix}-vertical` : `${this.prefix}-horizontal`]
|
|
27
|
+
},
|
|
28
|
+
barConClasses() {
|
|
29
|
+
return [`${this.prefix}-bar-con`, this.isVertical ? 'vertical' : 'horizontal']
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</script>
|