sh-view 1.7.6 → 2.0.1
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 +20 -21
- package/dist/css/227.45fab5b7.css +1 -0
- package/dist/css/291.e7facf7d.css +1 -0
- package/dist/css/299.e98df6ce.css +1 -0
- package/dist/css/358.e641c5d1.css +1 -0
- package/dist/css/534.726e6699.css +1 -0
- package/dist/css/769.8008ac6c.css +1 -0
- package/dist/css/index.2bd4fb37.css +1 -0
- package/dist/css/index.2bd4fb37.css.gz +0 -0
- package/dist/fonts/iconfont.03e5a9f9.ttf +0 -0
- package/dist/fonts/iconfont.03e5a9f9.ttf.gz +0 -0
- package/dist/fonts/ionicons.31fd4446.ttf +0 -0
- package/dist/fonts/ionicons.31fd4446.ttf.gz +0 -0
- package/dist/fonts/ionicons.d03f2836.woff2 +0 -0
- package/dist/fonts/ionicons.dacd136b.woff +0 -0
- package/dist/fonts/ionicons.dacd136b.woff.gz +0 -0
- package/dist/img/ionicons.6e8059e8.svg +870 -0
- package/dist/img/ionicons.6e8059e8.svg.gz +0 -0
- package/dist/js/152.588ca5b4.js +1 -0
- package/dist/js/165.f026fdcd.js +1 -0
- package/dist/js/227.6d340a71.js +1 -0
- package/dist/js/257.285f071f.js +1 -0
- package/dist/js/264.32b3a9a5.js +1 -0
- package/dist/js/291.e100da5e.js +1 -0
- package/dist/js/299.2062f9ff.js +1 -0
- package/dist/js/322.ff97ab5e.js +1 -0
- package/dist/js/333.da633859.js +1 -0
- package/dist/js/341.d4433549.js +1 -0
- package/dist/js/358.81429379.js +1 -0
- package/dist/js/387.7b1e3b8a.js +1 -0
- package/dist/js/392.c53bf6c9.js +1 -0
- package/dist/js/400.03e3be15.js +1 -0
- package/dist/js/41.fca2504e.js +1 -0
- package/dist/js/444.a0350517.js +1 -0
- package/dist/js/452.7f75d556.js +2 -0
- package/dist/js/452.7f75d556.js.gz +0 -0
- package/dist/js/497.06080ae1.js +1 -0
- package/dist/js/514.2ea0055a.js +1 -0
- package/dist/js/534.40a67536.js +1 -0
- package/dist/js/558.6175bf20.js +15 -0
- package/dist/js/558.6175bf20.js.gz +0 -0
- package/dist/js/586.098ab36d.js +1 -0
- package/dist/js/593.df7d7c2e.js +1 -0
- package/dist/js/601.abf6f256.js +1 -0
- package/dist/js/654.99b45cd4.js +18 -0
- package/dist/js/654.99b45cd4.js.gz +0 -0
- package/dist/js/668.a15a0058.js +1 -0
- package/dist/js/704.52e87fec.js +1 -0
- package/dist/js/720.aceca876.js +1 -0
- package/dist/js/769.1376ca7f.js +1 -0
- package/dist/js/875.975891f5.js +1 -0
- package/dist/js/89.c7317ccb.js +1 -0
- package/dist/js/94.d54e8b09.js +1 -0
- package/dist/js/chunk-vendors.e05ef0ac.js +438 -0
- package/dist/js/chunk-vendors.e05ef0ac.js.gz +0 -0
- package/dist/js/index.b31868df.js +1 -0
- package/dist/js/index.b31868df.js.gz +0 -0
- package/package.json +10 -10
- package/packages/assets/css/animated.scss +167 -2
- package/packages/assets/css/loader.scss +42 -42
- package/packages/assets/css/main.scss +41 -21
- package/packages/assets/css/theme.scss +83 -44
- package/packages/components/global-components/sh-alert/index.vue +173 -0
- package/packages/components/global-components/sh-badge/index.vue +227 -0
- package/packages/components/global-components/sh-card/index.vue +140 -122
- package/packages/components/global-components/sh-code-editor/index.vue +260 -260
- package/packages/components/global-components/sh-col/css/index.scss +76 -0
- package/packages/components/global-components/sh-col/index.vue +83 -0
- package/packages/components/global-components/sh-corner/index.vue +1 -9
- package/packages/components/global-components/sh-count-to/index.vue +102 -46
- package/packages/components/global-components/sh-date/index.vue +40 -0
- package/packages/components/global-components/sh-drawer/index.vue +518 -0
- package/packages/components/global-components/sh-drawer/scrollbar.js +76 -0
- package/packages/components/global-components/sh-empty/index.vue +43 -43
- package/packages/components/global-components/{sh-vxe-form → sh-form}/css/index.scss +6 -6
- package/packages/components/global-components/{sh-vxe-form → sh-form}/index.vue +114 -115
- package/packages/components/global-components/{sh-vxe-form → sh-form}/js/methods.js +146 -157
- package/packages/components/global-components/{sh-vxe-form → sh-form}/mixin/defaultData.js +32 -33
- package/packages/components/global-components/sh-header/index.vue +293 -269
- package/packages/components/global-components/sh-icon/css/default/fonts/ionicons.svg +870 -0
- package/packages/components/global-components/sh-icon/css/default/fonts/ionicons.ttf +0 -0
- package/packages/components/global-components/sh-icon/css/default/fonts/ionicons.woff +0 -0
- package/packages/components/global-components/sh-icon/css/default/fonts/ionicons.woff2 +0 -0
- package/packages/components/global-components/sh-icon/css/default/icons.scss +2583 -0
- package/packages/components/global-components/sh-icon/css/default/index.scss +27 -0
- package/packages/components/global-components/sh-icon/css/font/fonts/iconfont.js +1 -0
- package/packages/components/global-components/sh-icon/css/font/fonts/iconfont.json +247 -0
- package/packages/components/global-components/sh-icon/css/font/fonts/iconfont.ttf +0 -0
- package/packages/components/global-components/sh-icon/css/font/fonts/iconfont.woff +0 -0
- package/packages/components/global-components/sh-icon/css/font/fonts/iconfont.woff2 +0 -0
- package/packages/components/global-components/sh-icon/css/font/icons.scss +135 -0
- package/packages/components/global-components/sh-icon/css/font/index.scss +16 -0
- package/packages/components/global-components/sh-icon/icon-default.vue +32 -0
- package/packages/components/global-components/sh-icon/{icons.vue → icon-font.vue} +32 -32
- package/packages/components/global-components/sh-icon/index.vue +28 -27
- package/packages/components/global-components/sh-image/index.vue +123 -0
- package/packages/components/global-components/sh-list/index.vue +141 -0
- package/packages/components/global-components/sh-loading/index.vue +49 -42
- package/packages/components/global-components/{sh-vxe-modal → sh-modal}/index.vue +209 -209
- package/packages/components/global-components/sh-noticebar/index.vue +201 -201
- package/packages/components/global-components/sh-poptip/index.vue +479 -0
- package/packages/components/global-components/sh-poptip/popper.js +115 -0
- package/packages/components/global-components/sh-progress/index.vue +290 -0
- package/packages/components/global-components/sh-pull-refresh/index.vue +290 -290
- package/packages/components/global-components/{sh-vxe-query → sh-query}/index.vue +317 -310
- package/packages/components/global-components/sh-result/index.vue +110 -88
- package/packages/components/global-components/sh-row/css/index.scss +21 -0
- package/packages/components/global-components/sh-row/index.vue +63 -0
- package/packages/components/global-components/sh-split/components/trigger.vue +33 -0
- package/packages/components/global-components/sh-split/index.vue +334 -142
- package/packages/components/global-components/sh-table/components/importModal.vue +351 -0
- package/packages/components/global-components/{sh-vxe-table → sh-table}/css/index.scss +4 -22
- package/packages/components/global-components/{sh-vxe-table → sh-table}/index.vue +329 -351
- package/packages/components/global-components/{sh-vxe-table → sh-table}/js/methods.js +33 -88
- package/packages/components/global-components/{sh-vxe-table → sh-table}/js/props.js +304 -313
- package/packages/components/global-components/{sh-vxe-table → sh-table}/mixin/defaultData.js +94 -116
- package/packages/components/global-components/sh-tabs/index.vue +322 -0
- package/packages/components/global-components/sh-tag/index.vue +163 -0
- package/packages/components/global-components/{sh-vxe-toolbar → sh-toolbar}/index.vue +177 -172
- package/packages/components/global-components/sh-tree/components/table-tree.vue +280 -0
- package/packages/components/global-components/sh-tree/css/index.scss +54 -0
- package/packages/components/global-components/sh-tree/index.vue +195 -0
- package/packages/components/global-components/sh-tree/mixin/treeProps.js +124 -0
- package/packages/components/global-components/sh-upload/index.vue +278 -275
- package/packages/components/global-components/sh-water-fall/index.vue +87 -87
- package/packages/components/index.js +85 -59
- package/packages/components/other-components/sh-cron-modal/css/index.scss +2 -2
- package/packages/components/other-components/sh-menu-card/index.vue +224 -224
- package/packages/css/index.js +4 -6
- package/packages/directive/index.js +19 -19
- package/packages/directive/module/click-out.js +14 -0
- package/packages/directive/module/draggable.js +42 -42
- package/packages/directive/module/line-clamp.js +22 -0
- package/packages/directive/module/prevent-click.js +18 -0
- package/packages/directive/module/resize.js +19 -0
- package/packages/directive/module/ripple.js +166 -0
- package/packages/index.js +39 -40
- package/packages/utils/transfer-queue.js +12 -0
- package/packages/vxeTable/css/index.scss +12 -98
- package/packages/vxeTable/css/variable.scss +7 -265
- package/packages/vxeTable/index.js +184 -183
- package/packages/vxeTable/plugins/export.js +450 -0
- package/packages/vxeTable/render/cell/vxe-render-checkgroup.vue +36 -36
- package/packages/vxeTable/render/cell/vxe-render-goption.vue +94 -93
- package/packages/vxeTable/render/cell/vxe-render-img.vue +21 -28
- package/packages/vxeTable/render/cell/vxe-render-input.vue +51 -51
- package/packages/vxeTable/render/cell/vxe-render-progress.vue +19 -19
- package/packages/vxeTable/render/cell/vxe-render-radiogroup.vue +36 -36
- package/packages/vxeTable/render/cell/vxe-render-select.vue +36 -36
- package/packages/vxeTable/render/cell/vxe-render-tree.vue +59 -59
- package/packages/vxeTable/render/globalRenders.jsx +498 -491
- package/packages/assets/icons/demo.css +0 -539
- package/packages/assets/icons/iconfont.css +0 -415
- package/packages/assets/icons/iconfont.js +0 -1
- package/packages/assets/icons/iconfont.json +0 -709
- package/packages/assets/icons/iconfont.ttf +0 -0
- package/packages/assets/icons/iconfont.woff +0 -0
- package/packages/assets/icons/iconfont.woff2 +0 -0
- package/packages/assets/img/image-error.png +0 -0
- package/packages/assets/img/square-image.png +0 -0
- package/packages/components/global-components/sh-iv-form/components/iv-group-item.vue +0 -57
- package/packages/components/global-components/sh-iv-form/components/iv-single-item.vue +0 -76
- package/packages/components/global-components/sh-iv-form/index.vue +0 -255
- package/packages/components/global-components/sh-vxe-list/index.vue +0 -149
- package/packages/components/global-components/sh-vxe-table/components/importModal.vue +0 -377
- package/packages/components/global-components/sh-vxe-tree/components/table-tree.vue +0 -233
- package/packages/components/global-components/sh-vxe-tree/css/index.scss +0 -20
- package/packages/components/global-components/sh-vxe-tree/index.vue +0 -85
- package/packages/components/global-components/sh-vxe-tree/js/props.js +0 -120
- package/packages/components/global-components/sh-vxe-tree/js/treeMethods.js +0 -169
- package/packages/components/global-components/sh-vxe-tree/mixin/defaultData.js +0 -54
- package/packages/components/global-components/sh-vxe-tree/vxe-direct-tree.vue +0 -203
- package/packages/components/global-components/sh-vxe-tree/vxe-select-tree.vue +0 -291
- package/packages/components/other-components/sh-markdown/tinymce/langs/ar.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/az.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/bg_BG.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/bn_BD.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ca.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/cs.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/cy.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/da.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/de.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/dv.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/el.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/eo.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/es.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/es_MX.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/et.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/eu.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/fa.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/fi.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/fr_FR.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ga.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/gl.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/he_IL.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/hi.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/hr.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/hu_HU.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/hy.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/id.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/is_IS.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/it.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ja.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/kab.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/kk.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ko_KR.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ku.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/lt.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/lv.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/nb_NO.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ne.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/nl.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/nl_BE.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/oc.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/pl.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/pt_BR.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ro.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ru.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/sk.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/sl_SI.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/sq.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/sr.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/sv_SE.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ta.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/tg.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/th_TH.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/tr.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/ug.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/uk.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/langs/vi.js +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/content/dark/content.css +0 -72
- package/packages/components/other-components/sh-markdown/tinymce/skins/content/dark/content.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/content/default/content.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/content/document/content.css +0 -72
- package/packages/components/other-components/sh-markdown/tinymce/skins/content/document/content.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/content/writer/content.css +0 -68
- package/packages/components/other-components/sh-markdown/tinymce/skins/content/writer/content.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/content.css +0 -714
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/content.inline.css +0 -726
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/content.inline.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/content.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/content.mobile.css +0 -29
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/content.mobile.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/skin.css +0 -3047
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/skin.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/skin.mobile.css +0 -673
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +0 -7
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +0 -37
- package/packages/components/other-components/sh-markdown/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +0 -7
- package/packages/directive/directives.js +0 -27
- package/packages/iview/css/index.scss +0 -32
- package/packages/iview/index.js +0 -25
- /package/packages/components/global-components/{sh-vxe-form → sh-form}/components/form-item.vue +0 -0
- /package/packages/components/global-components/{sh-vxe-form → sh-form}/js/props.js +0 -0
- /package/packages/components/global-components/{sh-vxe-table → sh-table}/js/excel_to_json.js +0 -0
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<teleport to="body" :disabled="!transfer">
|
|
3
|
+
<div class="sh-drawer-box">
|
|
4
|
+
<transition name="fade">
|
|
5
|
+
<div v-show="visible" v-if="mask" class="sh-drawer-mask" :class="maskClasses" :style="maskStyle" @click="handleMask"></div>
|
|
6
|
+
</transition>
|
|
7
|
+
<div class="sh-drawer-wrap" :class="wrapClasses" @click="handleWrapClick">
|
|
8
|
+
<transition :name="transitionName">
|
|
9
|
+
<div v-show="visible" ref="drawer" class="sh-drawer" :class="classes" :style="mainStyles">
|
|
10
|
+
<div ref="content" class="sh-drawer-content" :class="contentClasses">
|
|
11
|
+
<a v-if="closable" class="sh-drawer-close" @click="close">
|
|
12
|
+
<slot name="close">
|
|
13
|
+
<sh-icon type="ios-close"></sh-icon>
|
|
14
|
+
</slot>
|
|
15
|
+
</a>
|
|
16
|
+
<div v-if="showHead" class="sh-drawer-header">
|
|
17
|
+
<slot name="header">
|
|
18
|
+
<div class="sh-drawer-header-inner">{{ title }}</div>
|
|
19
|
+
</slot>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="sh-drawer-body" :style="styles"><slot></slot></div>
|
|
22
|
+
</div>
|
|
23
|
+
<div v-if="draggable && (placement === 'left' || placement === 'right')" class="sh-drawer-drag" :class="'sh-drawer-drag-' + placement" @mousedown="handleTriggerMousedown">
|
|
24
|
+
<slot name="trigger">
|
|
25
|
+
<div class="sh-drawer-drag-move-trigger">
|
|
26
|
+
<div class="sh-drawer-drag-move-trigger-point"><i></i><i></i><i></i><i></i><i></i></div>
|
|
27
|
+
</div>
|
|
28
|
+
</slot>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</transition>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</teleport>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import ScrollbarMixins from './scrollbar'
|
|
39
|
+
export default {
|
|
40
|
+
name: 'ShDrawer',
|
|
41
|
+
mixins: [ScrollbarMixins],
|
|
42
|
+
props: {
|
|
43
|
+
modelValue: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
title: {
|
|
48
|
+
type: String
|
|
49
|
+
},
|
|
50
|
+
width: {
|
|
51
|
+
type: [Number, String],
|
|
52
|
+
default: 256
|
|
53
|
+
},
|
|
54
|
+
height: {
|
|
55
|
+
type: [Number, String],
|
|
56
|
+
default: 256
|
|
57
|
+
},
|
|
58
|
+
closable: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true
|
|
61
|
+
},
|
|
62
|
+
maskClosable: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: true
|
|
65
|
+
},
|
|
66
|
+
mask: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: true
|
|
69
|
+
},
|
|
70
|
+
maskStyle: {
|
|
71
|
+
type: Object
|
|
72
|
+
},
|
|
73
|
+
styles: {
|
|
74
|
+
type: Object
|
|
75
|
+
},
|
|
76
|
+
scrollable: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
80
|
+
placement: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: 'right' // 'left', 'right', 'top', 'bottom'
|
|
83
|
+
},
|
|
84
|
+
zIndex: {
|
|
85
|
+
type: Number,
|
|
86
|
+
default: 1000
|
|
87
|
+
},
|
|
88
|
+
transfer: {
|
|
89
|
+
type: Boolean
|
|
90
|
+
},
|
|
91
|
+
className: {
|
|
92
|
+
type: String
|
|
93
|
+
},
|
|
94
|
+
inner: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false
|
|
97
|
+
},
|
|
98
|
+
draggable: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false
|
|
101
|
+
},
|
|
102
|
+
beforeClose: Function
|
|
103
|
+
},
|
|
104
|
+
emits: ['update:modelValue', 'close', 'resize-width', 'visible-change', 'drag'],
|
|
105
|
+
data() {
|
|
106
|
+
return {
|
|
107
|
+
visible: this.modelValue,
|
|
108
|
+
wrapShow: false,
|
|
109
|
+
showHead: true,
|
|
110
|
+
canMove: false,
|
|
111
|
+
dragWidth: this.width,
|
|
112
|
+
dragHeight: this.height,
|
|
113
|
+
wrapperWidth: this.width,
|
|
114
|
+
wrapperHeight: this.height,
|
|
115
|
+
wrapperLeft: 0,
|
|
116
|
+
minWidth: 256,
|
|
117
|
+
minHeight: 256,
|
|
118
|
+
id: this.$vUtils.randomStr(6),
|
|
119
|
+
tableList: [],
|
|
120
|
+
sliderList: []
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
computed: {
|
|
124
|
+
wrapClasses() {
|
|
125
|
+
return {
|
|
126
|
+
'sh-drawer-hidden': !this.wrapShow,
|
|
127
|
+
'sh-drawer-no-mask': !this.mask,
|
|
128
|
+
'sh-drawer-wrap-inner': this.inner,
|
|
129
|
+
'sh-drawer-wrap-dragging': this.canMove,
|
|
130
|
+
[`${this.className}`]: !!this.className
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
mainStyles() {
|
|
134
|
+
let style = {}
|
|
135
|
+
if (this.placement === 'left' || this.placement === 'right') {
|
|
136
|
+
const width = parseInt(this.dragWidth)
|
|
137
|
+
const styleWidth = {
|
|
138
|
+
width: width <= 100 ? `${width}%` : `${width}px`
|
|
139
|
+
}
|
|
140
|
+
Object.assign(style, styleWidth)
|
|
141
|
+
} else {
|
|
142
|
+
const height = parseInt(this.dragHeight)
|
|
143
|
+
const styleHeight = {
|
|
144
|
+
height: height <= 100 ? `${height}%` : `${height}px`
|
|
145
|
+
}
|
|
146
|
+
Object.assign(style, styleHeight)
|
|
147
|
+
}
|
|
148
|
+
return style
|
|
149
|
+
},
|
|
150
|
+
contentClasses() {
|
|
151
|
+
return {
|
|
152
|
+
'sh-drawer-content-no-mask': !this.mask
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
classes() {
|
|
156
|
+
return {
|
|
157
|
+
[`sh-drawer-${this.placement}`]: true,
|
|
158
|
+
'sh-drawer-no-header': !this.showHead,
|
|
159
|
+
'sh-drawer-inner': this.inner
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
maskClasses() {
|
|
163
|
+
return {
|
|
164
|
+
'sh-drawer-mask-inner': this.inner
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
transitionName() {
|
|
168
|
+
if (this.placement === 'left' || this.placement === 'right') return `move-${this.placement}`
|
|
169
|
+
else if (this.placement === 'top') return 'move-up'
|
|
170
|
+
else return 'move-down'
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
watch: {
|
|
174
|
+
modelValue(val) {
|
|
175
|
+
this.visible = val
|
|
176
|
+
},
|
|
177
|
+
visible(val) {
|
|
178
|
+
if (val === false) {
|
|
179
|
+
this.timer = setTimeout(() => {
|
|
180
|
+
this.wrapShow = false
|
|
181
|
+
const drawers = this.$root.drawerList.map(item => item.drawer)
|
|
182
|
+
const otherDrawers = drawers.filter(item => item.id !== this.id)
|
|
183
|
+
const isScrollDrawer = otherDrawers.some(item => item.visible && !item.scrollable)
|
|
184
|
+
if (!isScrollDrawer) {
|
|
185
|
+
this.removeScrollEffect()
|
|
186
|
+
}
|
|
187
|
+
}, 300)
|
|
188
|
+
} else {
|
|
189
|
+
if (this.timer) clearTimeout(this.timer)
|
|
190
|
+
this.wrapShow = true
|
|
191
|
+
if (!this.scrollable) {
|
|
192
|
+
this.addScrollEffect()
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
this.tableList.forEach(item => {
|
|
196
|
+
item.table.handleOnVisibleChange(val)
|
|
197
|
+
})
|
|
198
|
+
this.sliderList.forEach(item => {
|
|
199
|
+
item.slider.handleOnVisibleChange(val)
|
|
200
|
+
})
|
|
201
|
+
this.$emit('visible-change', val)
|
|
202
|
+
},
|
|
203
|
+
scrollable(val) {
|
|
204
|
+
if (!val) {
|
|
205
|
+
this.addScrollEffect()
|
|
206
|
+
} else {
|
|
207
|
+
this.removeScrollEffect()
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
title(val) {
|
|
211
|
+
if (this.$slots.header === undefined) {
|
|
212
|
+
this.showHead = !!val
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
width(val) {
|
|
216
|
+
this.dragWidth = val
|
|
217
|
+
},
|
|
218
|
+
height(val) {
|
|
219
|
+
this.dragHeight = val
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
mounted() {
|
|
223
|
+
if (this.visible) {
|
|
224
|
+
this.wrapShow = true
|
|
225
|
+
}
|
|
226
|
+
let showHead = true
|
|
227
|
+
if (this.$slots.header === undefined && !this.title) {
|
|
228
|
+
showHead = false
|
|
229
|
+
}
|
|
230
|
+
this.showHead = showHead
|
|
231
|
+
this.addDrawer()
|
|
232
|
+
this.$vUtils.onListener(document, 'mousemove', this.handleMousemove)
|
|
233
|
+
this.$vUtils.onListener(document, 'mouseup', this.handleMouseup)
|
|
234
|
+
this.handleSetWrapperWidth()
|
|
235
|
+
},
|
|
236
|
+
beforeUnmount() {
|
|
237
|
+
this.removeDrawer()
|
|
238
|
+
this.$vUtils.offListener(document, 'mousemove', this.handleMousemove)
|
|
239
|
+
this.$vUtils.offListener(document, 'mouseup', this.handleMouseup)
|
|
240
|
+
this.removeScrollEffect()
|
|
241
|
+
},
|
|
242
|
+
methods: {
|
|
243
|
+
close() {
|
|
244
|
+
if (!this.beforeClose) {
|
|
245
|
+
return this.handleClose()
|
|
246
|
+
}
|
|
247
|
+
const before = this.beforeClose()
|
|
248
|
+
if (before && before.then) {
|
|
249
|
+
before.then(() => {
|
|
250
|
+
this.handleClose()
|
|
251
|
+
})
|
|
252
|
+
} else {
|
|
253
|
+
this.handleClose()
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
handleClose() {
|
|
257
|
+
this.visible = false
|
|
258
|
+
this.$emit('update:modelValue', false)
|
|
259
|
+
this.$emit('close')
|
|
260
|
+
},
|
|
261
|
+
handleMask() {
|
|
262
|
+
if (this.canMove) return
|
|
263
|
+
if (this.maskClosable && this.mask) {
|
|
264
|
+
this.close()
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
handleWrapClick(event) {
|
|
268
|
+
const className = event.target.getAttribute('class')
|
|
269
|
+
if (className && className.indexOf('sh-drawer-wrap') > -1) this.handleMask()
|
|
270
|
+
},
|
|
271
|
+
handleMousemove(event) {
|
|
272
|
+
if (!this.canMove || !this.draggable || !this.visible) return
|
|
273
|
+
// 更新容器宽度和距离左侧页面距离,如果是window则距左侧距离为0
|
|
274
|
+
this.handleSetWrapperWidth()
|
|
275
|
+
const left = event.pageX - this.wrapperLeft
|
|
276
|
+
// 如果抽屉方向为右边,宽度计算需用容器宽度减去left
|
|
277
|
+
let width = this.placement === 'right' ? this.wrapperWidth - left : left
|
|
278
|
+
// 限定最小宽度
|
|
279
|
+
width = Math.max(width, parseFloat(this.minWidth))
|
|
280
|
+
event.atMin = width === parseFloat(this.minWidth)
|
|
281
|
+
// 如果当前width不大于100,视为百分比
|
|
282
|
+
if (width <= 100) width = (width / this.wrapperWidth) * 100
|
|
283
|
+
if (width >= window.innerWidth) width = window.innerWidth
|
|
284
|
+
this.dragWidth = width
|
|
285
|
+
this.$emit('resize-width', parseInt(this.dragWidth))
|
|
286
|
+
this.$emit('drag', 'dragging', parseInt(this.dragWidth))
|
|
287
|
+
},
|
|
288
|
+
handleSetWrapperWidth() {
|
|
289
|
+
const { width, left } = this.$refs.drawer.getBoundingClientRect()
|
|
290
|
+
this.wrapperWidth = width
|
|
291
|
+
this.wrapperLeft = left
|
|
292
|
+
},
|
|
293
|
+
handleMouseup() {
|
|
294
|
+
if (!this.draggable || !this.visible) return
|
|
295
|
+
setTimeout(() => {
|
|
296
|
+
this.canMove = false
|
|
297
|
+
})
|
|
298
|
+
this.$emit('drag', 'end')
|
|
299
|
+
},
|
|
300
|
+
handleTriggerMousedown() {
|
|
301
|
+
this.canMove = true
|
|
302
|
+
// 防止鼠标选中抽屉中文字,造成拖动trigger触发浏览器原生拖动行为
|
|
303
|
+
window.getSelection().removeAllRanges()
|
|
304
|
+
this.$emit('drag', 'start')
|
|
305
|
+
},
|
|
306
|
+
addDrawer() {
|
|
307
|
+
const root = this.$root
|
|
308
|
+
if (!root.drawerList) root.drawerList = []
|
|
309
|
+
root.drawerList.push({
|
|
310
|
+
id: this.id,
|
|
311
|
+
drawer: this
|
|
312
|
+
})
|
|
313
|
+
},
|
|
314
|
+
removeDrawer() {
|
|
315
|
+
const root = this.$root
|
|
316
|
+
if (!root.drawerList) return
|
|
317
|
+
const index = root.drawerList.findIndex(item => item.id === this.id)
|
|
318
|
+
root.drawerList.splice(index, 1)
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
</script>
|
|
323
|
+
|
|
324
|
+
<style scoped lang="scss">
|
|
325
|
+
.sh-drawer {
|
|
326
|
+
width: auto;
|
|
327
|
+
height: 100%;
|
|
328
|
+
position: fixed;
|
|
329
|
+
top: 0;
|
|
330
|
+
&-inner {
|
|
331
|
+
position: absolute;
|
|
332
|
+
}
|
|
333
|
+
&-left {
|
|
334
|
+
left: 0;
|
|
335
|
+
}
|
|
336
|
+
&-right {
|
|
337
|
+
right: 0;
|
|
338
|
+
}
|
|
339
|
+
&-top,
|
|
340
|
+
&-bottom {
|
|
341
|
+
width: 100%;
|
|
342
|
+
height: auto;
|
|
343
|
+
top: auto;
|
|
344
|
+
}
|
|
345
|
+
&-bottom {
|
|
346
|
+
bottom: 0;
|
|
347
|
+
}
|
|
348
|
+
&-hidden {
|
|
349
|
+
display: none !important;
|
|
350
|
+
}
|
|
351
|
+
&-wrap {
|
|
352
|
+
position: fixed;
|
|
353
|
+
overflow: auto;
|
|
354
|
+
top: 0;
|
|
355
|
+
right: 0;
|
|
356
|
+
bottom: 0;
|
|
357
|
+
left: 0;
|
|
358
|
+
z-index: 1000;
|
|
359
|
+
-webkit-overflow-scrolling: touch;
|
|
360
|
+
outline: 0;
|
|
361
|
+
&-inner {
|
|
362
|
+
position: absolute;
|
|
363
|
+
overflow: hidden;
|
|
364
|
+
}
|
|
365
|
+
&-dragging {
|
|
366
|
+
user-select: none;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
&-wrap * {
|
|
370
|
+
box-sizing: border-box;
|
|
371
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
372
|
+
}
|
|
373
|
+
&-mask {
|
|
374
|
+
position: fixed;
|
|
375
|
+
top: 0;
|
|
376
|
+
bottom: 0;
|
|
377
|
+
left: 0;
|
|
378
|
+
right: 0;
|
|
379
|
+
background-color: rgba(55, 55, 55, 0.6);
|
|
380
|
+
height: 100%;
|
|
381
|
+
z-index: 1000;
|
|
382
|
+
&-hidden {
|
|
383
|
+
display: none;
|
|
384
|
+
}
|
|
385
|
+
&-inner {
|
|
386
|
+
position: absolute;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
&-content {
|
|
390
|
+
width: 100%;
|
|
391
|
+
height: 100%;
|
|
392
|
+
position: absolute;
|
|
393
|
+
top: 0;
|
|
394
|
+
bottom: 0;
|
|
395
|
+
background-color: #fff;
|
|
396
|
+
border: 0;
|
|
397
|
+
background-clip: padding-box;
|
|
398
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
399
|
+
&-no-mask {
|
|
400
|
+
pointer-events: auto;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
&-header {
|
|
404
|
+
border-bottom: 1px solid var(--vxe-table-border-color);
|
|
405
|
+
padding: 14px 16px;
|
|
406
|
+
line-height: 1;
|
|
407
|
+
&-inner {
|
|
408
|
+
display: inline-block;
|
|
409
|
+
width: 100%;
|
|
410
|
+
height: 20px;
|
|
411
|
+
line-height: 20px;
|
|
412
|
+
font-size: var(--vxe-font-size-medium);
|
|
413
|
+
font-weight: 500;
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
text-overflow: ellipsis;
|
|
416
|
+
white-space: nowrap;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
&-close {
|
|
420
|
+
z-index: 1;
|
|
421
|
+
position: absolute;
|
|
422
|
+
right: 8px;
|
|
423
|
+
top: 10px;
|
|
424
|
+
overflow: hidden;
|
|
425
|
+
cursor: pointer;
|
|
426
|
+
font-size: 26px;
|
|
427
|
+
display: inline-block;
|
|
428
|
+
vertical-align: top;
|
|
429
|
+
line-height: 1;
|
|
430
|
+
}
|
|
431
|
+
&-body {
|
|
432
|
+
width: 100%;
|
|
433
|
+
height: calc(100% - 51px);
|
|
434
|
+
padding: 16px;
|
|
435
|
+
font-size: var(--vxe-font-size);
|
|
436
|
+
line-height: 1.5;
|
|
437
|
+
word-wrap: break-word;
|
|
438
|
+
position: absolute;
|
|
439
|
+
overflow: auto;
|
|
440
|
+
}
|
|
441
|
+
&-no-header &-body {
|
|
442
|
+
height: 100%;
|
|
443
|
+
}
|
|
444
|
+
&-no-mask {
|
|
445
|
+
pointer-events: none;
|
|
446
|
+
.sh-drawer-drag {
|
|
447
|
+
pointer-events: auto;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
&-drag {
|
|
451
|
+
top: 0;
|
|
452
|
+
height: 100%;
|
|
453
|
+
width: 0;
|
|
454
|
+
position: absolute;
|
|
455
|
+
&-left {
|
|
456
|
+
right: 0;
|
|
457
|
+
}
|
|
458
|
+
&-top,
|
|
459
|
+
&-bottom {
|
|
460
|
+
top: auto;
|
|
461
|
+
width: 100%;
|
|
462
|
+
height: 0;
|
|
463
|
+
}
|
|
464
|
+
&-top {
|
|
465
|
+
bottom: 0;
|
|
466
|
+
}
|
|
467
|
+
&-bottom {
|
|
468
|
+
top: 0;
|
|
469
|
+
}
|
|
470
|
+
&-move-trigger {
|
|
471
|
+
width: 8px;
|
|
472
|
+
height: 100px;
|
|
473
|
+
line-height: 100px;
|
|
474
|
+
position: absolute;
|
|
475
|
+
top: 50%;
|
|
476
|
+
background: rgb(243, 243, 243);
|
|
477
|
+
transform: translate(-50%, -50%);
|
|
478
|
+
border-radius: 4px;
|
|
479
|
+
box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.2);
|
|
480
|
+
cursor: col-resize;
|
|
481
|
+
&-point {
|
|
482
|
+
display: inline-block;
|
|
483
|
+
width: 50%;
|
|
484
|
+
transform: translateX(50%);
|
|
485
|
+
i {
|
|
486
|
+
display: block;
|
|
487
|
+
border-bottom: 1px solid rgb(192, 192, 192);
|
|
488
|
+
padding-bottom: 2px;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
&-top &-move-trigger,
|
|
493
|
+
&-bottom &-move-trigger {
|
|
494
|
+
width: 100px;
|
|
495
|
+
height: 8px;
|
|
496
|
+
line-height: 8px;
|
|
497
|
+
top: auto;
|
|
498
|
+
left: 50%;
|
|
499
|
+
cursor: row-resize;
|
|
500
|
+
&-point {
|
|
501
|
+
width: 100%;
|
|
502
|
+
height: 50%;
|
|
503
|
+
transform: translateY(-75%);
|
|
504
|
+
text-align: center;
|
|
505
|
+
i {
|
|
506
|
+
display: inline-block;
|
|
507
|
+
border-bottom: inherit;
|
|
508
|
+
width: 1px;
|
|
509
|
+
height: 100%;
|
|
510
|
+
border-left: 1px solid rgb(192, 192, 192);
|
|
511
|
+
padding-bottom: inherit;
|
|
512
|
+
margin-left: 2px;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
</style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
let cached
|
|
2
|
+
export function getScrollBarSize(fresh) {
|
|
3
|
+
if (fresh || cached === undefined) {
|
|
4
|
+
const inner = document.createElement('div')
|
|
5
|
+
inner.style.width = '100%'
|
|
6
|
+
inner.style.height = '200px'
|
|
7
|
+
const outer = document.createElement('div')
|
|
8
|
+
const outerStyle = outer.style
|
|
9
|
+
outerStyle.position = 'absolute'
|
|
10
|
+
outerStyle.top = 0
|
|
11
|
+
outerStyle.left = 0
|
|
12
|
+
outerStyle.pointerEvents = 'none'
|
|
13
|
+
outerStyle.visibility = 'hidden'
|
|
14
|
+
outerStyle.width = '200px'
|
|
15
|
+
outerStyle.height = '150px'
|
|
16
|
+
outerStyle.overflow = 'hidden'
|
|
17
|
+
outer.appendChild(inner)
|
|
18
|
+
document.body.appendChild(outer)
|
|
19
|
+
const widthContained = inner.offsetWidth
|
|
20
|
+
outer.style.overflow = 'scroll'
|
|
21
|
+
let widthScroll = inner.offsetWidth
|
|
22
|
+
if (widthContained === widthScroll) {
|
|
23
|
+
widthScroll = outer.clientWidth
|
|
24
|
+
}
|
|
25
|
+
document.body.removeChild(outer)
|
|
26
|
+
cached = widthContained - widthScroll
|
|
27
|
+
}
|
|
28
|
+
return cached
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default {
|
|
32
|
+
props: {
|
|
33
|
+
lockScroll: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
methods: {
|
|
39
|
+
checkScrollBar() {
|
|
40
|
+
let fullWindowWidth = window.innerWidth
|
|
41
|
+
if (!fullWindowWidth) {
|
|
42
|
+
const documentElementRect = document.documentElement.getBoundingClientRect()
|
|
43
|
+
fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
|
|
44
|
+
}
|
|
45
|
+
this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
|
|
46
|
+
if (this.bodyIsOverflowing) {
|
|
47
|
+
this.scrollBarWidth = getScrollBarSize()
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
checkMaskInVisible() {
|
|
51
|
+
let masks = document.getElementsByClassName('ivu-modal-mask') || []
|
|
52
|
+
return Array.from(masks).every(m => m.style.display === 'none' || m.classList.contains('fade-leave-to'))
|
|
53
|
+
},
|
|
54
|
+
setScrollBar() {
|
|
55
|
+
if (this.bodyIsOverflowing && this.scrollBarWidth !== undefined) {
|
|
56
|
+
document.body.style.paddingRight = `${this.scrollBarWidth}px`
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
resetScrollBar() {
|
|
60
|
+
document.body.style.paddingRight = ''
|
|
61
|
+
},
|
|
62
|
+
addScrollEffect() {
|
|
63
|
+
if (!this.lockScroll) return
|
|
64
|
+
this.checkScrollBar()
|
|
65
|
+
this.setScrollBar()
|
|
66
|
+
document.body.style.overflow = 'hidden'
|
|
67
|
+
},
|
|
68
|
+
removeScrollEffect() {
|
|
69
|
+
if (!this.lockScroll) return
|
|
70
|
+
if (this.checkMaskInVisible()) {
|
|
71
|
+
document.body.style.overflow = ''
|
|
72
|
+
this.resetScrollBar()
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="sh-empty-info">
|
|
3
|
-
<div v-if="
|
|
4
|
-
<div v-if="
|
|
5
|
-
</div>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script>
|
|
9
|
-
export default {
|
|
10
|
-
name: 'ShEmpty',
|
|
11
|
-
components: {},
|
|
12
|
-
props: {
|
|
13
|
-
|
|
14
|
-
type: String,
|
|
15
|
-
default: 'ios-cube-outline'
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
type: String,
|
|
19
|
-
default: '暂无数据'
|
|
20
|
-
},
|
|
21
|
-
clamp: {
|
|
22
|
-
type: Number,
|
|
23
|
-
default: 2
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<style lang="scss" scoped>
|
|
30
|
-
.sh-empty-info {
|
|
31
|
-
width: 100%;
|
|
32
|
-
display: block;
|
|
33
|
-
text-align: center;
|
|
34
|
-
padding: 10px 0;
|
|
35
|
-
.sh-empty-icon {
|
|
36
|
-
padding: 3px;
|
|
37
|
-
box-sizing: border-box;
|
|
38
|
-
color: var(--
|
|
39
|
-
}
|
|
40
|
-
.sh-empty-text {
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sh-empty-info">
|
|
3
|
+
<div v-if="icon" class="sh-empty-icon"><sh-icon :type="icon" size="24" /></div>
|
|
4
|
+
<div v-if="content" v-line-clamp="clamp" class="sh-empty-text">{{ content }}</div>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: 'ShEmpty',
|
|
11
|
+
components: {},
|
|
12
|
+
props: {
|
|
13
|
+
icon: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'ios-cube-outline'
|
|
16
|
+
},
|
|
17
|
+
content: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: '暂无数据'
|
|
20
|
+
},
|
|
21
|
+
clamp: {
|
|
22
|
+
type: Number,
|
|
23
|
+
default: 2
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="scss" scoped>
|
|
30
|
+
.sh-empty-info {
|
|
31
|
+
width: 100%;
|
|
32
|
+
display: block;
|
|
33
|
+
text-align: center;
|
|
34
|
+
padding: 10px 0;
|
|
35
|
+
.sh-empty-icon {
|
|
36
|
+
padding: 3px;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
color: var(--vxe-primary-color);
|
|
39
|
+
}
|
|
40
|
+
.sh-empty-text {
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
cursor: auto;
|
|
7
7
|
color: #333;
|
|
8
8
|
background-color: #fff;
|
|
9
|
-
border-color: var(--
|
|
9
|
+
border-color: var(--vxe-primary-lighten-color);
|
|
10
10
|
}
|
|
11
11
|
.vxe-checkbox.is--disabled{
|
|
12
12
|
cursor: auto;
|
|
13
13
|
color: #333;
|
|
14
14
|
& > input + .vxe-checkbox--icon{
|
|
15
15
|
background-color: #fff;
|
|
16
|
-
border-color: var(--
|
|
16
|
+
border-color: var(--vxe-primary-lighten-color);
|
|
17
17
|
}
|
|
18
18
|
& > input + .vxe-checkbox--icon:before{
|
|
19
|
-
border-color: var(--
|
|
19
|
+
border-color: var(--vxe-primary-color);
|
|
20
20
|
}
|
|
21
21
|
& > input + .vxe-checkbox--icon + .vxe-checkbox--label{
|
|
22
22
|
color: #333;
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
.vxe-form{
|
|
35
|
-
.vxe-form--gather{
|
|
36
|
-
border: 1px solid var(--border-color);
|
|
35
|
+
.vxe-form--gather.shFormTitleItem{
|
|
36
|
+
border: 1px solid var(--vxe-table-border-color);
|
|
37
37
|
}
|
|
38
38
|
.vxe-form--item{
|
|
39
39
|
&.shFormTitleItem{
|
|
40
40
|
padding: 0.2em 0.8em;
|
|
41
|
-
border-left: 5px solid var(--
|
|
41
|
+
border-left: 5px solid var(--vxe-primary-color);
|
|
42
42
|
margin-bottom: 0.5em;
|
|
43
43
|
.vxe-form--item-inner{
|
|
44
44
|
min-height: auto;
|