sh-view 2.7.8 → 2.8.0
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/other.js +8 -0
- package/package.json +4 -3
- package/packages/components/index.js +35 -35
- package/packages/components/{global-components/sh-alert → sh-alert}/index.vue +8 -15
- package/packages/components/{global-components/sh-badge → sh-badge}/index.vue +6 -5
- package/packages/components/{global-components/sh-calendar → sh-calendar}/index.vue +167 -36
- package/packages/components/{global-components/sh-date → sh-date}/index.vue +37 -9
- package/packages/components/{global-components/sh-drawer → sh-drawer}/index.vue +49 -27
- package/packages/components/{global-components/sh-form → sh-form}/js/useForm.js +2 -2
- package/packages/components/sh-header/index.vue +260 -0
- package/packages/components/sh-icon/css/font/icons.scss +135 -0
- package/packages/components/{global-components/sh-image → sh-image}/index.vue +2 -1
- package/packages/components/{global-components/sh-poptip → sh-poptip}/index.vue +1 -1
- package/packages/components/{global-components/sh-progress → sh-progress}/index.vue +2 -18
- package/packages/components/{global-components/sh-table → sh-table}/css/index.scss +18 -0
- package/packages/components/{global-components/sh-table → sh-table}/js/tableMethods.js +12 -20
- package/packages/components/{global-components/sh-table → sh-table}/js/useTable.js +4 -6
- package/packages/components/{global-components/sh-table → sh-table}/table.vue +217 -218
- package/packages/components/{global-components/sh-tabs → sh-tabs}/index.vue +97 -34
- package/packages/components/{global-components/sh-tree → sh-tree}/components/table-tree.vue +1 -2
- package/packages/components/{global-components/sh-tree → sh-tree}/css/index.scss +1 -0
- package/packages/components/{global-components/sh-tree → sh-tree}/index.vue +228 -217
- package/packages/components/{global-components/sh-tree → sh-tree}/mixin/treeProps.js +1 -1
- package/packages/index.js +39 -39
- package/packages/{components/other-components → other}/sh-cron-modal/tabs/cron-week-box.vue +126 -126
- package/packages/{components/other-components → other}/sh-menu/index.vue +3 -0
- package/packages/{components/other-components → other}/sh-menu/menu-item-content.vue +3 -3
- package/packages/other/sh-preview/components/sh-excel.vue +163 -0
- package/packages/{components/other-components → other}/sh-preview/index.vue +92 -89
- package/packages/vxeTable/css/index.scss +31 -8
- package/packages/vxeTable/render/cell/vxe-render-tree.vue +70 -63
- package/packages/vxeTable/render/filters/vxe-filter-input.vue +26 -25
- package/packages/vxeTable/render/filters/vxe-filter-time.vue +26 -0
- package/packages/vxeTable/render/globalRenders.jsx +26 -7
- package/packages/vxeTable/render/mixin/filter-hooks.js +31 -13
- package/packages/components/global-components/sh-header/index.vue +0 -278
- package/packages/components/global-components/sh-icon/css/font/icons.scss +0 -135
- package/packages/components/other-components/sh-preview/components/sh-excel.vue +0 -929
- /package/packages/components/{global-components/sh-card → sh-card}/index.vue +0 -0
- /package/packages/components/{global-components/sh-code-editor → sh-code-editor}/index.vue +0 -0
- /package/packages/components/{global-components/sh-code-editor → sh-code-editor}/themes/dark.js +0 -0
- /package/packages/components/{global-components/sh-code-editor → sh-code-editor}/themes/dracula.js +0 -0
- /package/packages/components/{global-components/sh-code-editor → sh-code-editor}/themes/index.js +0 -0
- /package/packages/components/{global-components/sh-col → sh-col}/css/index.scss +0 -0
- /package/packages/components/{global-components/sh-col → sh-col}/index.vue +0 -0
- /package/packages/components/{global-components/sh-corner → sh-corner}/index.vue +0 -0
- /package/packages/components/{global-components/sh-count-to → sh-count-to}/index.vue +0 -0
- /package/packages/components/{global-components/sh-drawer → sh-drawer}/scrollbar.js +0 -0
- /package/packages/components/{global-components/sh-empty → sh-empty}/index.vue +0 -0
- /package/packages/components/{global-components/sh-form → sh-form}/form.vue +0 -0
- /package/packages/components/{global-components/sh-form → sh-form}/js/props.js +0 -0
- /package/packages/components/{global-components/sh-form → sh-form}/query.vue +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/default/icons.scss +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/default/ionicons.svg +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/default/ionicons.ttf +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/default/ionicons.woff +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/default/ionicons.woff2 +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/font/iconfont.js +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/font/iconfont.json +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/font/iconfont.ttf +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/font/iconfont.woff +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/font/iconfont.woff2 +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/css/index.scss +0 -0
- /package/packages/components/{global-components/sh-icon → sh-icon}/index.vue +0 -0
- /package/packages/components/{global-components/sh-list → sh-list}/index.vue +0 -0
- /package/packages/components/{global-components/sh-loading → sh-loading}/index.vue +0 -0
- /package/packages/components/{global-components/sh-modal → sh-modal}/index.vue +0 -0
- /package/packages/components/{global-components/sh-noticebar → sh-noticebar}/index.vue +0 -0
- /package/packages/components/{global-components/sh-pull-refresh → sh-pull-refresh}/index.vue +0 -0
- /package/packages/components/{global-components/sh-result → sh-result}/index.vue +0 -0
- /package/packages/components/{global-components/sh-row → sh-row}/css/index.scss +0 -0
- /package/packages/components/{global-components/sh-row → sh-row}/index.vue +0 -0
- /package/packages/components/{global-components/sh-split → sh-split}/components/trigger.vue +0 -0
- /package/packages/components/{global-components/sh-split → sh-split}/index.vue +0 -0
- /package/packages/components/{global-components/sh-table → sh-table}/components/importModal.vue +0 -0
- /package/packages/components/{global-components/sh-table → sh-table}/components/sh-column.vue +0 -0
- /package/packages/components/{global-components/sh-table → sh-table}/grid.vue +0 -0
- /package/packages/components/{global-components/sh-table → sh-table}/js/excel_to_json.js +0 -0
- /package/packages/components/{global-components/sh-table → sh-table}/js/props.js +0 -0
- /package/packages/components/{global-components/sh-tag → sh-tag}/index.vue +0 -0
- /package/packages/components/{global-components/sh-toolbar → sh-toolbar}/index.vue +0 -0
- /package/packages/components/{global-components/sh-upload → sh-upload}/index.vue +0 -0
- /package/packages/components/{global-components/sh-upload → sh-upload}/js/ajax.js +0 -0
- /package/packages/components/{global-components/sh-water-fall → sh-water-fall}/index.vue +0 -0
- /package/packages/components/{global-components/sh-water-mark → sh-water-mark}/index.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/components/cron-content.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/css/index.scss +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/index.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/mixin/cron-emits.js +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/mixin/cron-hooks.js +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/mixin/cron-props.js +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/tabs/cron-day-box.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/tabs/cron-hour-box.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/tabs/cron-minute-box.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/tabs/cron-month-box.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/tabs/cron-second-box.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/tabs/cron-year-box.vue +0 -0
- /package/packages/{components/other-components → other}/sh-cron-modal/utils/index.js +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/index.vue +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/langs/zh-Hans.js +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/content/default/content.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/content.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/content.inline.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/content.inline.min.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/content.min.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/content.mobile.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/content.mobile.min.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/skin.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/skin.min.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/skin.mobile.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/skin.mobile.min.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/skin.shadowdom.css +0 -0
- /package/packages/{components/other-components → other}/sh-markdown/tinymce/skins/ui/oxide/skin.shadowdom.min.css +0 -0
- /package/packages/{components/other-components → other}/sh-menu/menu-group-content.vue +0 -0
- /package/packages/{components/other-components → other}/sh-menu-card/index.vue +0 -0
- /package/packages/{components/other-components → other}/sh-menu-card/menu-box.vue +0 -0
- /package/packages/{components/other-components → other}/sh-preview/components/sh-word.vue +0 -0
- /package/packages/{components/other-components → other}/sh-preview/js/data-hook.js +0 -0
- /package/packages/{components/other-components → other}/sh-preview/js/data-props.js +0 -0
- /package/packages/{components/other-components → other}/sh-system-tip/index.vue +0 -0
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<slot name="footer"></slot>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
|
-
<div v-if="draggable
|
|
28
|
+
<div v-if="draggable" class="sh-drawer-drag" :class="'sh-drawer-drag-' + placement" @mousedown="handleTriggerMousedown">
|
|
29
29
|
<slot name="trigger">
|
|
30
30
|
<div class="sh-drawer-drag-move-trigger">
|
|
31
31
|
<div class="sh-drawer-drag-move-trigger-point"><i></i><i></i><i></i><i></i><i></i></div>
|
|
@@ -127,6 +127,7 @@ export default defineComponent({
|
|
|
127
127
|
const wrapperWidth = ref(props.width)
|
|
128
128
|
const wrapperHeight = ref(props.height)
|
|
129
129
|
const wrapperLeft = ref(0)
|
|
130
|
+
const wrapperTop = ref(0)
|
|
130
131
|
const minWidth = ref(256)
|
|
131
132
|
const minHeight = ref(256)
|
|
132
133
|
const id = ref($vUtils.randomStr(6))
|
|
@@ -134,6 +135,7 @@ export default defineComponent({
|
|
|
134
135
|
const sliderList = ref([])
|
|
135
136
|
let timer = null
|
|
136
137
|
|
|
138
|
+
const isHorizontal = computed(() => ['left', 'right'].includes(props.placement))
|
|
137
139
|
const wrapClasses = computed(() => {
|
|
138
140
|
return {
|
|
139
141
|
'sh-drawer-hidden': !wrapShow.value,
|
|
@@ -145,7 +147,7 @@ export default defineComponent({
|
|
|
145
147
|
})
|
|
146
148
|
const mainStyles = computed(() => {
|
|
147
149
|
let style = {}
|
|
148
|
-
if (
|
|
150
|
+
if (isHorizontal.value) {
|
|
149
151
|
const width = parseInt(dragWidth.value)
|
|
150
152
|
const styleWidth = {
|
|
151
153
|
width: width <= 100 ? `${width}%` : `${width}px`
|
|
@@ -168,7 +170,7 @@ export default defineComponent({
|
|
|
168
170
|
}
|
|
169
171
|
})
|
|
170
172
|
const transitionName = computed(() => {
|
|
171
|
-
if (
|
|
173
|
+
if (isHorizontal.value) return `move-${props.placement}`
|
|
172
174
|
else if (props.placement === 'top') return 'move-up'
|
|
173
175
|
else return 'move-down'
|
|
174
176
|
})
|
|
@@ -205,25 +207,45 @@ export default defineComponent({
|
|
|
205
207
|
}
|
|
206
208
|
const handleMousemove = event => {
|
|
207
209
|
if (!canMove.value || !props.draggable || !visible.value) return
|
|
208
|
-
//
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
210
|
+
// 更新容器距离
|
|
211
|
+
handleSetWrapper()
|
|
212
|
+
if (isHorizontal.value) {
|
|
213
|
+
const left = event.pageX - wrapperLeft.value
|
|
214
|
+
// 如果抽屉方向为右边,宽度计算需用容器宽度减去left
|
|
215
|
+
let width = props.placement === 'right' ? wrapperWidth.value - left : left
|
|
216
|
+
// 限定最小宽度
|
|
217
|
+
width = Math.max(width, parseFloat(minWidth.value))
|
|
218
|
+
event.atMin = width === parseFloat(minWidth.value)
|
|
219
|
+
// 如果当前width不大于100,视为百分比
|
|
220
|
+
if (width <= 100) width = (width / wrapperWidth.value) * 100
|
|
221
|
+
if (width >= window.innerWidth) width = window.innerWidth
|
|
222
|
+
dragWidth.value = width
|
|
223
|
+
emit('resize-width', parseInt(dragWidth.value))
|
|
224
|
+
emit('drag', 'dragging', parseInt(dragWidth.value))
|
|
225
|
+
} else {
|
|
226
|
+
const top = event.pageY - wrapperTop.value
|
|
227
|
+
// 如果抽屉方向为下面,宽度计算需用容器宽度减去left
|
|
228
|
+
let heigth = props.placement === 'bottom' ? wrapperHeight.value - top : top
|
|
229
|
+
// 限定最小高度
|
|
230
|
+
heigth = Math.max(heigth, parseFloat(minHeight.value))
|
|
231
|
+
event.atMin = heigth === parseFloat(minHeight.value)
|
|
232
|
+
// 如果当前heigth不大于100,视为百分比
|
|
233
|
+
if (heigth <= 100) heigth = (heigth / wrapperHeight.value) * 100
|
|
234
|
+
if (heigth >= window.innerHeight) heigth = window.innerHeight
|
|
235
|
+
dragHeight.value = heigth
|
|
236
|
+
emit('resize-width', parseInt(dragHeight.value))
|
|
237
|
+
emit('drag', 'dragging', parseInt(dragHeight.value))
|
|
238
|
+
}
|
|
222
239
|
}
|
|
223
|
-
const
|
|
224
|
-
const { width, left } = drawerRef.value.getBoundingClientRect()
|
|
225
|
-
|
|
226
|
-
|
|
240
|
+
const handleSetWrapper = () => {
|
|
241
|
+
const { width, height, left, top } = drawerRef.value.getBoundingClientRect()
|
|
242
|
+
if (isHorizontal.value) {
|
|
243
|
+
wrapperWidth.value = width
|
|
244
|
+
wrapperLeft.value = left
|
|
245
|
+
} else {
|
|
246
|
+
wrapperHeight.value = height
|
|
247
|
+
wrapperTop.value = top
|
|
248
|
+
}
|
|
227
249
|
}
|
|
228
250
|
const handleMouseup = () => {
|
|
229
251
|
if (!props.draggable || !visible.value) return
|
|
@@ -330,7 +352,7 @@ export default defineComponent({
|
|
|
330
352
|
addDrawer()
|
|
331
353
|
$vUtils.onListener(document, 'mousemove', handleMousemove)
|
|
332
354
|
$vUtils.onListener(document, 'mouseup', handleMouseup)
|
|
333
|
-
|
|
355
|
+
handleSetWrapper()
|
|
334
356
|
})
|
|
335
357
|
onBeforeUnmount(() => {
|
|
336
358
|
removeDrawer()
|
|
@@ -342,17 +364,17 @@ export default defineComponent({
|
|
|
342
364
|
return {
|
|
343
365
|
slots,
|
|
344
366
|
visible,
|
|
345
|
-
handleMask,
|
|
346
367
|
wrapClasses,
|
|
347
|
-
handleWrapClick,
|
|
348
368
|
transitionName,
|
|
349
369
|
classes,
|
|
350
370
|
mainStyles,
|
|
351
|
-
close,
|
|
352
371
|
showHead,
|
|
353
|
-
handleTriggerMousedown,
|
|
354
372
|
drawerRef,
|
|
355
|
-
drawerContent
|
|
373
|
+
drawerContent,
|
|
374
|
+
close,
|
|
375
|
+
handleMask,
|
|
376
|
+
handleWrapClick,
|
|
377
|
+
handleTriggerMousedown
|
|
356
378
|
}
|
|
357
379
|
}
|
|
358
380
|
})
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sh-pageheader" :style="styles" :class="classes">
|
|
3
|
+
<sh-loading :loading="loading" fix />
|
|
4
|
+
<div class="sh-pageheader-heading">
|
|
5
|
+
<div v-if="showback" class="sh-pageheader-back">
|
|
6
|
+
<div class="sh-pageheader-back-button" @click="handleBack"><sh-icon :size="iconSize" type="ios-arrow-back" /></div>
|
|
7
|
+
</div>
|
|
8
|
+
<sh-icon v-if="icon" style="margin-right: 0.5rem" :type="icon" :size="iconSize" :color="iconColor"></sh-icon>
|
|
9
|
+
<span v-if="title || slots.title" class="sh-pageheader-title" :style="titleStyle">
|
|
10
|
+
<slot name="title">{{ title }}</slot>
|
|
11
|
+
</span>
|
|
12
|
+
<span v-if="subTitle || slots.subTitle" class="sh-pageheader-subtitle">
|
|
13
|
+
<slot name="subTitle">{{ subTitle }}</slot>
|
|
14
|
+
</span>
|
|
15
|
+
<div v-if="slots.tags" class="sh-pageheader-tags"><slot name="tags"></slot></div>
|
|
16
|
+
<div v-if="slots.extra" class="sh-pageheader-extra"><slot name="extra"></slot></div>
|
|
17
|
+
</div>
|
|
18
|
+
<div v-if="slots.default" :class="contentClass">
|
|
19
|
+
<slot></slot>
|
|
20
|
+
</div>
|
|
21
|
+
<slot name="body"></slot>
|
|
22
|
+
<div v-if="slots.footer" class="sh-pageheader-footer"><slot name="footer"></slot></div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import { defineComponent, computed } from 'vue'
|
|
28
|
+
export default defineComponent({
|
|
29
|
+
name: 'ShHeader',
|
|
30
|
+
props: {
|
|
31
|
+
size: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: 'default'
|
|
34
|
+
},
|
|
35
|
+
color: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ''
|
|
38
|
+
},
|
|
39
|
+
theme: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: ''
|
|
42
|
+
},
|
|
43
|
+
icon: {
|
|
44
|
+
type: String
|
|
45
|
+
},
|
|
46
|
+
iconSize: {
|
|
47
|
+
type: Number,
|
|
48
|
+
default: 20
|
|
49
|
+
},
|
|
50
|
+
iconColor: {
|
|
51
|
+
type: String
|
|
52
|
+
},
|
|
53
|
+
ghost: {
|
|
54
|
+
type: Boolean
|
|
55
|
+
},
|
|
56
|
+
full: {
|
|
57
|
+
type: Boolean
|
|
58
|
+
},
|
|
59
|
+
border: {
|
|
60
|
+
type: Boolean
|
|
61
|
+
},
|
|
62
|
+
type: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: '' // 'success', 'info', 'warning', 'error'
|
|
65
|
+
},
|
|
66
|
+
title: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ''
|
|
69
|
+
},
|
|
70
|
+
subTitle: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: ''
|
|
73
|
+
},
|
|
74
|
+
loading: {
|
|
75
|
+
type: Boolean
|
|
76
|
+
},
|
|
77
|
+
nowrap: {
|
|
78
|
+
type: Boolean
|
|
79
|
+
},
|
|
80
|
+
showback: {
|
|
81
|
+
type: Boolean
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
emits: ['back'],
|
|
85
|
+
setup(props, context) {
|
|
86
|
+
const { emit, slots } = context
|
|
87
|
+
|
|
88
|
+
let sizeMap = {
|
|
89
|
+
large: '19px',
|
|
90
|
+
default: '17px',
|
|
91
|
+
medium: 'var(--vxe-font-size)',
|
|
92
|
+
small: 'var(--vxe-font-size-small)',
|
|
93
|
+
mini: 'var(--vxe-font-size-smini)'
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const styles = computed(() => {
|
|
97
|
+
return {
|
|
98
|
+
backgroundColor: props.color
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
const classes = computed(() => {
|
|
102
|
+
return {
|
|
103
|
+
'sh-pageheader-ghost': props.ghost,
|
|
104
|
+
'sh-pageheader-full': props.full,
|
|
105
|
+
'sh-pageheader-border': props.border,
|
|
106
|
+
[`sh-pageheader-theme-${props.theme}`]: props.theme,
|
|
107
|
+
'has-footer': slots.footer,
|
|
108
|
+
[`sh-pageheader-type-${props.type}`]: props.type,
|
|
109
|
+
[`${props.size}`]: props.size
|
|
110
|
+
}
|
|
111
|
+
})
|
|
112
|
+
const titleStyle = computed(() => {
|
|
113
|
+
return {
|
|
114
|
+
fontSize: sizeMap[props.size] || sizeMap.default,
|
|
115
|
+
whiteSpace: props.nowrap ? 'nowrap' : ''
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
const contentClass = computed(() => {
|
|
119
|
+
return {
|
|
120
|
+
'sh-pageheader-content': true,
|
|
121
|
+
'no-padding': !props.title && !slots.title && !props.subTitle && !slots.subTitle && !slots.tags && !slots.extra
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
const handleBack = () => {
|
|
126
|
+
emit('back')
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
styles,
|
|
130
|
+
classes,
|
|
131
|
+
titleStyle,
|
|
132
|
+
contentClass,
|
|
133
|
+
slots,
|
|
134
|
+
handleBack
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
</script>
|
|
139
|
+
|
|
140
|
+
<style lang="scss" scoped>
|
|
141
|
+
.sh-pageheader {
|
|
142
|
+
display: block;
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
border-radius: 2px;
|
|
145
|
+
line-height: 1.5;
|
|
146
|
+
position: relative;
|
|
147
|
+
padding: 0.5rem 1rem;
|
|
148
|
+
background-color: var(--vxe-table-body-background-color);
|
|
149
|
+
&-theme {
|
|
150
|
+
color: #fff;
|
|
151
|
+
&-primary {
|
|
152
|
+
background-color: var(--vxe-primary-color);
|
|
153
|
+
}
|
|
154
|
+
&-success {
|
|
155
|
+
background-color: var(--vxe-success-color);
|
|
156
|
+
}
|
|
157
|
+
&-warning {
|
|
158
|
+
background-color: var(--vxe-warning-color);
|
|
159
|
+
}
|
|
160
|
+
&-error {
|
|
161
|
+
background-color: var(--vxe-danger-color);
|
|
162
|
+
}
|
|
163
|
+
&-info {
|
|
164
|
+
background-color: var(--vxe-info-color);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
&-type {
|
|
168
|
+
color: #fff;
|
|
169
|
+
&-primary {
|
|
170
|
+
border-left: 4px solid var(--vxe-primary-color);
|
|
171
|
+
background-color: var(--primary-weak-color);
|
|
172
|
+
.sh-pageheader-heading-title {
|
|
173
|
+
color: var(--vxe-primary-color);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
&-success {
|
|
177
|
+
border-left: 4px solid var(--vxe-success-color);
|
|
178
|
+
background-color: #edfff3;
|
|
179
|
+
.sh-pageheader-heading-title {
|
|
180
|
+
color: var(--vxe-success-color);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
&-warning {
|
|
184
|
+
border-left: 4px solid var(--vxe-warning-color);
|
|
185
|
+
background-color: #fff9e6;
|
|
186
|
+
.sh-pageheader-heading-title {
|
|
187
|
+
color: var(--vxe-warning-color);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
&-error {
|
|
191
|
+
border-left: 4px solid var(--vxe-danger-color);
|
|
192
|
+
background-color: #ffefe6;
|
|
193
|
+
.sh-pageheader-heading-title {
|
|
194
|
+
color: var(--vxe-danger-color);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
&-info {
|
|
198
|
+
border-left: 4px solid var(--vxe-info-color);
|
|
199
|
+
background-color: #f0faff;
|
|
200
|
+
.sh-pageheader-heading-title {
|
|
201
|
+
color: var(--vxe-info-color);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
&-full {
|
|
206
|
+
padding-left: 0;
|
|
207
|
+
padding-right: 0;
|
|
208
|
+
}
|
|
209
|
+
&-ghost {
|
|
210
|
+
background-color: transparent;
|
|
211
|
+
}
|
|
212
|
+
&-border {
|
|
213
|
+
border: 1px solid var(--vxe-table-border-color);
|
|
214
|
+
}
|
|
215
|
+
&-heading {
|
|
216
|
+
width: 100%;
|
|
217
|
+
display: flex;
|
|
218
|
+
justify-content: space-between;
|
|
219
|
+
align-items: center;
|
|
220
|
+
}
|
|
221
|
+
&-content {
|
|
222
|
+
margin-top: 10px;
|
|
223
|
+
&.no-padding {
|
|
224
|
+
padding-top: 0;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
&-footer {
|
|
228
|
+
margin-top: 10px;
|
|
229
|
+
}
|
|
230
|
+
&-back {
|
|
231
|
+
font-size: 1.2rem;
|
|
232
|
+
line-height: 1;
|
|
233
|
+
margin-right: 0.5rem;
|
|
234
|
+
&-button {
|
|
235
|
+
color: inherit;
|
|
236
|
+
text-decoration: none;
|
|
237
|
+
outline: none;
|
|
238
|
+
transition: color 0.3s;
|
|
239
|
+
cursor: pointer;
|
|
240
|
+
&:hover {
|
|
241
|
+
opacity: 0.85;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
&-title {
|
|
246
|
+
display: block;
|
|
247
|
+
margin-right: 0.5rem;
|
|
248
|
+
font-weight: 600;
|
|
249
|
+
}
|
|
250
|
+
&-subtitle {
|
|
251
|
+
margin-right: 0.5rem;
|
|
252
|
+
color: rgba(0, 0, 0, 0.45);
|
|
253
|
+
}
|
|
254
|
+
&-tags {
|
|
255
|
+
}
|
|
256
|
+
&-extra {
|
|
257
|
+
margin-left: auto;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
</style>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
.font-img-error:before {
|
|
2
|
+
content: "\e642";
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.font-code:before {
|
|
6
|
+
content: "\e65d";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.font-half_size:before {
|
|
10
|
+
content: "\e66a";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.font-password:before {
|
|
14
|
+
content: "\e66b";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.font-menu:before {
|
|
18
|
+
content: "\e66d";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.font-sign_out:before {
|
|
22
|
+
content: "\e66e";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.font-close:before {
|
|
26
|
+
content: "\e671";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.font-open_top:before {
|
|
30
|
+
content: "\e672";
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.font-put_it_away_top:before {
|
|
34
|
+
content: "\e673";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.font-right:before {
|
|
38
|
+
content: "\e674";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.font-left:before {
|
|
42
|
+
content: "\e675";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.font-refresh:before {
|
|
46
|
+
content: "\e676";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.font-date:before {
|
|
50
|
+
content: "\e678";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.font-open:before {
|
|
54
|
+
content: "\e679";
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.font-put_it_away:before {
|
|
58
|
+
content: "\e67a";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.font-task:before {
|
|
62
|
+
content: "\e67b";
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.font-short_message:before {
|
|
66
|
+
content: "\e67c";
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.font-modify:before {
|
|
70
|
+
content: "\e67d";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.font-delete:before {
|
|
74
|
+
content: "\e67e";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.font-enlarge:before {
|
|
78
|
+
content: "\e681";
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.font-girl:before {
|
|
82
|
+
content: "\e683";
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.font-boy:before {
|
|
86
|
+
content: "\e684";
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.font-redianzixun:before {
|
|
90
|
+
content: "\e6a4";
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.font-vip:before {
|
|
94
|
+
content: "\e68f";
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.font-VIP2:before {
|
|
98
|
+
content: "\e685";
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.font-VIP4:before {
|
|
102
|
+
content: "\e7b3";
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.font-VIP6:before {
|
|
106
|
+
content: "\e9ee";
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.font-vip2:before {
|
|
110
|
+
content: "\e601";
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.font-bofang:before {
|
|
114
|
+
content: "\e68d";
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.font-bofang1:before {
|
|
118
|
+
content: "\e6f4";
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.font-renzheng:before {
|
|
122
|
+
content: "\e6fb";
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.font-dianhua1:before {
|
|
126
|
+
content: "\e700";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.font-dianhuaguaji:before {
|
|
130
|
+
content: "\e79a";
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.font-youbian:before {
|
|
134
|
+
content: "\e703";
|
|
135
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="sh-image" :style="wrapStyles">
|
|
3
3
|
<div v-if="imageError" class="sh-image-place">
|
|
4
|
-
<slot name="error"><sh-icon type="
|
|
4
|
+
<slot name="error"><sh-icon type="font-img-error" :size="22" color="#999999"></sh-icon></slot>
|
|
5
5
|
</div>
|
|
6
6
|
<div v-else-if="imageloading" class="sh-image-place">
|
|
7
7
|
<slot name="placeholder"><sh-icon type="ios-image" :size="22"></sh-icon></slot>
|
|
@@ -117,6 +117,7 @@ export default defineComponent({
|
|
|
117
117
|
justify-content: center;
|
|
118
118
|
width: 100%;
|
|
119
119
|
height: 100%;
|
|
120
|
+
background-color: var(--vxe-table-header-background-color);
|
|
120
121
|
}
|
|
121
122
|
&-inner {
|
|
122
123
|
width: 100%;
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
<script>
|
|
43
43
|
import { defineComponent, computed, onMounted, onUpdated, onBeforeUnmount, getCurrentInstance, ref, watch, nextTick } from 'vue'
|
|
44
|
-
import { transferIndex, transferIncrease } from '
|
|
44
|
+
import { transferIndex, transferIncrease } from '../../utils/transfer-queue'
|
|
45
45
|
import Popper from 'popper.js'
|
|
46
46
|
const handleGetIndex = () => {
|
|
47
47
|
transferIncrease()
|
|
@@ -72,15 +72,7 @@ export default defineComponent({
|
|
|
72
72
|
return ''
|
|
73
73
|
})
|
|
74
74
|
const bgStyle = computed(() => {
|
|
75
|
-
const style = props.vertical
|
|
76
|
-
? {
|
|
77
|
-
height: `${props.percent}%`,
|
|
78
|
-
width: `${props.strokeWidth}px`
|
|
79
|
-
}
|
|
80
|
-
: {
|
|
81
|
-
width: `${props.percent}%`,
|
|
82
|
-
height: `${props.strokeWidth}px`
|
|
83
|
-
}
|
|
75
|
+
const style = props.vertical ? { height: `${props.percent}%`, width: `${props.strokeWidth}px` } : { width: `${props.percent}%`, height: `${props.strokeWidth}px` }
|
|
84
76
|
if (props.strokeColor) {
|
|
85
77
|
if (typeof props.strokeColor === 'string') {
|
|
86
78
|
style['background-color'] = props.strokeColor
|
|
@@ -91,15 +83,7 @@ export default defineComponent({
|
|
|
91
83
|
return style
|
|
92
84
|
})
|
|
93
85
|
const successBgStyle = computed(() => {
|
|
94
|
-
return props.vertical
|
|
95
|
-
? {
|
|
96
|
-
height: `${props.successPercent}%`,
|
|
97
|
-
width: `${props.strokeWidth}px`
|
|
98
|
-
}
|
|
99
|
-
: {
|
|
100
|
-
width: `${props.successPercent}%`,
|
|
101
|
-
height: `${props.strokeWidth}px`
|
|
102
|
-
}
|
|
86
|
+
return props.vertical ? { height: `${props.successPercent}%`, width: `${props.strokeWidth}px` } : { width: `${props.successPercent}%`, height: `${props.strokeWidth}px` }
|
|
103
87
|
})
|
|
104
88
|
const wrapClasses = computed(() => {
|
|
105
89
|
return {
|
|
@@ -12,6 +12,24 @@
|
|
|
12
12
|
background: transparent;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
+
&.is--loading{
|
|
16
|
+
&:before {
|
|
17
|
+
content: "";
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 0;
|
|
20
|
+
left: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
z-index: 99;
|
|
24
|
+
-webkit-user-select: none;
|
|
25
|
+
-moz-user-select: none;
|
|
26
|
+
user-select: none;
|
|
27
|
+
background-color: var(--vxe-loading-background-color);
|
|
28
|
+
}
|
|
29
|
+
& > .vxe-table .vxe-loading {
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
15
33
|
.sh-table-footer{
|
|
16
34
|
height: 40px;
|
|
17
35
|
padding: 5px;
|
|
@@ -66,28 +66,20 @@ export const tableFooterCompute = (columns, data, computeType, typeObj = {}) =>
|
|
|
66
66
|
}
|
|
67
67
|
// 转化表头过滤配置
|
|
68
68
|
export const turnColumnItemFilters = (column, props) => {
|
|
69
|
+
if (column.filters) return
|
|
69
70
|
let columnRender = column.cellRender || column.editRender || column.contentRender
|
|
70
71
|
let columnProps = Object.assign({}, props)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
case '$vInput':
|
|
83
|
-
column.filters = [{ value: '', data: '' }]
|
|
84
|
-
column.filterRender = { name: '$vFilterInput', props: columnProps }
|
|
85
|
-
break
|
|
86
|
-
default:
|
|
87
|
-
column.filters = [{ value: '', data: '' }]
|
|
88
|
-
column.filterRender = { name: '$vFilterInput', props: columnProps }
|
|
89
|
-
break
|
|
90
|
-
}
|
|
72
|
+
let renderSelects = ['$select', '$vSelect', '$vCheckgroup', '$vRadiogroup', '$vSwitch']
|
|
73
|
+
let renderTimes = ['$vTime']
|
|
74
|
+
if (renderTimes.includes(columnRender.name)) {
|
|
75
|
+
column.filters = [{ data: null }]
|
|
76
|
+
column.filterRender = { name: '$vFilterTime', props: columnProps }
|
|
77
|
+
} else if (renderSelects.includes(columnRender.name)) {
|
|
78
|
+
column.filters = Array.isArray(columnRender.props && columnRender.props.options) ? columnRender.props.options : []
|
|
79
|
+
if (column.filterMultiple === undefined) column.filterMultiple = true
|
|
80
|
+
} else {
|
|
81
|
+
column.filters = [{ data: null }]
|
|
82
|
+
column.filterRender = { name: '$vFilterInput', props: columnProps }
|
|
91
83
|
}
|
|
92
84
|
}
|
|
93
85
|
// 转换表头校验规则
|
|
@@ -202,10 +202,8 @@ export default function (props, context, proxy, isGrid) {
|
|
|
202
202
|
let { property, rname, rprops } = col
|
|
203
203
|
data.forEach(row => {
|
|
204
204
|
let cellValue = $vUtils.get(row, property)
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
$vUtils.set(row, property, visible ? rtext : rvalue)
|
|
208
|
-
}
|
|
205
|
+
let { rvalue, rtext } = $vUtils.formatRender(cellValue, property, row, rname, rprops, proxy)
|
|
206
|
+
$vUtils.set(row, property, visible ? rtext : rvalue)
|
|
209
207
|
if (deleteXid) delete row._XID
|
|
210
208
|
})
|
|
211
209
|
})
|
|
@@ -214,9 +212,9 @@ export default function (props, context, proxy, isGrid) {
|
|
|
214
212
|
// 表格打印、导出统一导出前渲染数据
|
|
215
213
|
const getExportPrintDataByOption = (obj = {}, type) => {
|
|
216
214
|
let { options, content } = obj
|
|
217
|
-
let { data, columns, mode } = options
|
|
215
|
+
let { data, columns, mode, original } = options
|
|
218
216
|
if (!data) {
|
|
219
|
-
options.data = mode === 'selected' ? getSelectionData() : getFullData()
|
|
217
|
+
options.data = mode === 'selected' ? getSelectionData() : getFullData({ visible: !original })
|
|
220
218
|
}
|
|
221
219
|
return type === 'print' ? content : obj
|
|
222
220
|
}
|