sh-view 2.8.1 → 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.
Files changed (91) hide show
  1. package/.eslintrc.js +25 -20
  2. package/other.js +8 -8
  3. package/package.json +9 -6
  4. package/packages/components/index.js +91 -91
  5. package/packages/components/sh-alert/alert.ts +30 -0
  6. package/packages/components/sh-alert/index.vue +143 -168
  7. package/packages/components/sh-badge/index.vue +242 -242
  8. package/packages/components/sh-calendar/index.vue +650 -650
  9. package/packages/components/sh-card/index.vue +148 -148
  10. package/packages/components/sh-code-editor/index.vue +19 -19
  11. package/packages/components/sh-col/index.vue +92 -92
  12. package/packages/components/sh-corner/index.vue +230 -230
  13. package/packages/components/sh-count-to/index.vue +131 -131
  14. package/packages/components/sh-date/index.vue +301 -301
  15. package/packages/components/sh-drawer/index.vue +579 -579
  16. package/packages/components/sh-drawer/scrollbar.js +78 -78
  17. package/packages/components/sh-empty/index.vue +42 -42
  18. package/packages/components/sh-form/js/props.js +76 -76
  19. package/packages/components/sh-form/js/useForm.js +229 -229
  20. package/packages/components/sh-header/index.vue +261 -260
  21. package/packages/components/sh-icon/css/default/ionicons.svg +869 -869
  22. package/packages/components/sh-icon/css/font/iconfont.json +247 -247
  23. package/packages/components/sh-icon/index.vue +41 -41
  24. package/packages/components/sh-image/index.vue +133 -133
  25. package/packages/components/sh-list/index.vue +146 -146
  26. package/packages/components/sh-loading/index.vue +53 -53
  27. package/packages/components/sh-modal/index.vue +188 -188
  28. package/packages/components/sh-noticebar/index.vue +215 -215
  29. package/packages/components/sh-poptip/index.vue +597 -597
  30. package/packages/components/sh-progress/index.vue +276 -276
  31. package/packages/components/sh-pull-refresh/index.vue +289 -289
  32. package/packages/components/sh-result/index.vue +114 -114
  33. package/packages/components/sh-row/index.vue +66 -66
  34. package/packages/components/sh-split/components/trigger.vue +33 -33
  35. package/packages/components/sh-split/index.vue +342 -342
  36. package/packages/components/sh-table/components/importModal.vue +363 -363
  37. package/packages/components/sh-table/components/sh-column.vue +68 -68
  38. package/packages/components/sh-table/js/excel_to_json.js +313 -313
  39. package/packages/components/sh-table/js/props.js +305 -305
  40. package/packages/components/sh-table/js/tableMethods.js +167 -167
  41. package/packages/components/sh-table/js/useTable.js +636 -636
  42. package/packages/components/sh-table/table.vue +217 -217
  43. package/packages/components/sh-tabs/index.vue +426 -426
  44. package/packages/components/sh-tag/index.vue +168 -168
  45. package/packages/components/sh-toolbar/index.vue +182 -182
  46. package/packages/components/sh-tree/components/table-tree.vue +289 -289
  47. package/packages/components/sh-tree/mixin/treeProps.js +122 -122
  48. package/packages/components/sh-upload/index.vue +535 -535
  49. package/packages/components/sh-water-fall/index.vue +80 -80
  50. package/packages/components/sh-water-mark/index.vue +96 -96
  51. package/packages/css/index.js +4 -4
  52. package/packages/directive/index.js +19 -19
  53. package/packages/directive/module/click-out.js +14 -14
  54. package/packages/directive/module/draggable.js +42 -42
  55. package/packages/directive/module/line-clamp.js +22 -22
  56. package/packages/directive/module/prevent-click.js +18 -18
  57. package/packages/directive/module/resize.js +14 -14
  58. package/packages/directive/module/ripple.js +166 -166
  59. package/packages/index.js +39 -39
  60. package/packages/mixin/index.js +86 -86
  61. package/packages/other/sh-cron-modal/components/cron-content.vue +294 -294
  62. package/packages/other/sh-cron-modal/index.vue +81 -81
  63. package/packages/other/sh-cron-modal/mixin/cron-emits.js +1 -1
  64. package/packages/other/sh-cron-modal/mixin/cron-props.js +9 -9
  65. package/packages/other/sh-cron-modal/tabs/cron-week-box.vue +126 -126
  66. package/packages/other/sh-menu/index.vue +326 -326
  67. package/packages/other/sh-menu/menu-group-content.vue +136 -136
  68. package/packages/other/sh-menu/menu-item-content.vue +71 -71
  69. package/packages/other/sh-menu-card/index.vue +250 -250
  70. package/packages/other/sh-menu-card/menu-box.vue +87 -87
  71. package/packages/other/sh-preview/components/sh-excel.vue +163 -163
  72. package/packages/other/sh-preview/js/data-hook.js +41 -41
  73. package/packages/other/sh-preview/js/data-props.js +15 -15
  74. package/packages/other/sh-system-tip/index.vue +115 -115
  75. package/packages/utils/resize.js +69 -70
  76. package/packages/utils/transfer-queue.js +12 -12
  77. package/packages/vxeTable/index.js +193 -184
  78. package/packages/vxeTable/plugins/export.js +450 -450
  79. package/packages/vxeTable/render/cell/vxe-render-img.vue +27 -27
  80. package/packages/vxeTable/render/cell/vxe-render-table.vue +51 -51
  81. package/packages/vxeTable/render/cell/vxe-render-time.vue +44 -44
  82. package/packages/vxeTable/render/cell/vxe-render-tree.vue +70 -70
  83. package/packages/vxeTable/render/filters/vxe-filter-input.vue +26 -26
  84. package/packages/vxeTable/render/filters/vxe-filter-time.vue +26 -26
  85. package/packages/vxeTable/render/globalRenders.jsx +514 -514
  86. package/packages/vxeTable/render/mixin/cell-hooks.js +198 -198
  87. package/packages/vxeTable/render/mixin/cell-props.js +23 -23
  88. package/packages/vxeTable/render/mixin/filter-hooks.js +46 -46
  89. package/tsconfig.json +25 -0
  90. package/types/component.d.ts +1 -0
  91. package/types/index.ts +0 -0
@@ -1,188 +1,188 @@
1
- <template>
2
- <vxe-modal ref="modalRef" v-bind="modalConfig" @show="onModalShow" @hide="onModalHide" @zoom="onModalZoom" @close="onModalClose" @cancel="onModalClose" @confirm="onModalConfirm">
3
- <template v-for="slot in Object.keys(slots)" #[slot]="scope">
4
- <!-- 以之前的名字命名插槽,同时把数据原样绑定 -->
5
- <slot :name="slot" v-bind="scope"></slot>
6
- </template>
7
- <template #footer>
8
- <div class="sh-modal-footer">
9
- <div class="sh-modal-footer-left"><slot name="footerLeft"></slot></div>
10
- <div class="sh-modal-footer-right">
11
- <slot name="footerRightLeft"></slot>
12
- <vxe-button v-ripple :content="cancelButtonText" @click="onModalClose"></vxe-button>
13
- <vxe-button v-if="!readonly" v-ripple status="primary" :content="confirmButtonText" @click="onModalConfirm"></vxe-button>
14
- <slot name="footerRight"></slot>
15
- </div>
16
- </div>
17
- </template>
18
- </vxe-modal>
19
- </template>
20
-
21
- <script>
22
- import { defineComponent, watch, ref, computed, getCurrentInstance } from 'vue'
23
- export default defineComponent({
24
- name: 'ShModal',
25
- props: {
26
- modelValue: {
27
- type: Boolean
28
- },
29
- id: {
30
- type: String
31
- },
32
- title: {
33
- type: String
34
- },
35
- size: {
36
- type: String
37
- },
38
- className: {
39
- type: String
40
- },
41
- width: {
42
- type: [String, Number],
43
- default: '80%'
44
- },
45
- height: {
46
- type: [String, Number],
47
- default: 'auto'
48
- },
49
- type: {
50
- type: String,
51
- default: 'modal'
52
- },
53
- status: {
54
- type: String
55
- },
56
- loading: {
57
- type: Boolean
58
- },
59
- destroyOnClose: {
60
- type: Boolean,
61
- default: true
62
- },
63
- transfer: {
64
- type: Boolean,
65
- default: true
66
- },
67
- fullscreen: {
68
- type: Boolean
69
- },
70
- showHeader: {
71
- type: Boolean,
72
- default: true
73
- },
74
- showZoom: {
75
- type: Boolean,
76
- default: true
77
- },
78
- showClose: {
79
- type: Boolean,
80
- default: true
81
- },
82
- showFooter: {
83
- type: Boolean,
84
- default: true
85
- },
86
- resize: {
87
- type: Boolean,
88
- default: true
89
- },
90
- mask: {
91
- type: Boolean,
92
- default: true
93
- },
94
- maskClosable: {
95
- type: Boolean
96
- },
97
- escClosable: {
98
- type: Boolean,
99
- default: true
100
- },
101
- position: {
102
- type: [String, Object],
103
- default: 'center'
104
- },
105
- beforeHideMethod: {
106
- type: Function
107
- },
108
- readonly: {
109
- type: Boolean
110
- },
111
- confirmButtonText: {
112
- type: String,
113
- default: '确认'
114
- },
115
- cancelButtonText: {
116
- type: String,
117
- default: '取消'
118
- }
119
- },
120
- emits: ['update:modelValue', 'show', 'hide', 'zoom', 'confirm', 'close'],
121
- setup(props, context) {
122
- const { proxy } = getCurrentInstance()
123
- const { $vUtils } = proxy
124
- const { emit, slots } = context
125
- const modalRef = ref()
126
-
127
- const modalConfig = computed(() => {
128
- let modelProps = $vUtils.omit(props, ['readonly', 'confirmButtonText', 'cancelButtonText'])
129
- return $vUtils.omit(modelProps, val => val === undefined)
130
- })
131
-
132
- // 弹窗显示回调
133
- const onModalShow = () => {
134
- emit('show')
135
- }
136
- // 弹窗隐藏回调
137
- const onModalHide = () => {
138
- emit('hide')
139
- }
140
- // 弹窗全屏切换回调
141
- const onModalZoom = () => {
142
- emit('zoom')
143
- }
144
- // 确认操作
145
- const onModalConfirm = () => {
146
- emit('confirm')
147
- }
148
- // 取消操作
149
- const onModalClose = () => {
150
- emit('close')
151
- emit('update:modelValue', false)
152
- }
153
-
154
- watch(
155
- () => modalConfig.value.modelValue,
156
- value => {
157
- if (!value) onModalClose()
158
- }
159
- )
160
-
161
- return {
162
- slots,
163
- modalRef,
164
- modalConfig,
165
- onModalShow,
166
- onModalHide,
167
- onModalZoom,
168
- onModalClose,
169
- onModalConfirm
170
- }
171
- }
172
- })
173
- </script>
174
-
175
- <style lang="scss" scoped>
176
- .sh-modal-footer {
177
- display: flex;
178
- justify-content: space-between;
179
- align-items: center;
180
- flex-wrap: wrap;
181
- white-space: nowrap;
182
- .sh-modal-footer-left {
183
- }
184
- .sh-modal-footer-right {
185
- flex: 1;
186
- }
187
- }
188
- </style>
1
+ <template>
2
+ <vxe-modal ref="modalRef" v-bind="modalConfig" @show="onModalShow" @hide="onModalHide" @zoom="onModalZoom" @close="onModalClose" @cancel="onModalClose" @confirm="onModalConfirm">
3
+ <template v-for="slot in Object.keys(slots)" #[slot]="scope">
4
+ <!-- 以之前的名字命名插槽,同时把数据原样绑定 -->
5
+ <slot :name="slot" v-bind="scope"></slot>
6
+ </template>
7
+ <template #footer>
8
+ <div class="sh-modal-footer">
9
+ <div class="sh-modal-footer-left"><slot name="footerLeft"></slot></div>
10
+ <div class="sh-modal-footer-right">
11
+ <slot name="footerRightLeft"></slot>
12
+ <vxe-button v-ripple :content="cancelButtonText" @click="onModalClose"></vxe-button>
13
+ <vxe-button v-if="!readonly" v-ripple status="primary" :content="confirmButtonText" @click="onModalConfirm"></vxe-button>
14
+ <slot name="footerRight"></slot>
15
+ </div>
16
+ </div>
17
+ </template>
18
+ </vxe-modal>
19
+ </template>
20
+
21
+ <script>
22
+ import { defineComponent, watch, ref, computed, getCurrentInstance } from 'vue'
23
+ export default defineComponent({
24
+ name: 'ShModal',
25
+ props: {
26
+ modelValue: {
27
+ type: Boolean
28
+ },
29
+ id: {
30
+ type: String
31
+ },
32
+ title: {
33
+ type: String
34
+ },
35
+ size: {
36
+ type: String
37
+ },
38
+ className: {
39
+ type: String
40
+ },
41
+ width: {
42
+ type: [String, Number],
43
+ default: '80%'
44
+ },
45
+ height: {
46
+ type: [String, Number],
47
+ default: 'auto'
48
+ },
49
+ type: {
50
+ type: String,
51
+ default: 'modal'
52
+ },
53
+ status: {
54
+ type: String
55
+ },
56
+ loading: {
57
+ type: Boolean
58
+ },
59
+ destroyOnClose: {
60
+ type: Boolean,
61
+ default: true
62
+ },
63
+ transfer: {
64
+ type: Boolean,
65
+ default: true
66
+ },
67
+ fullscreen: {
68
+ type: Boolean
69
+ },
70
+ showHeader: {
71
+ type: Boolean,
72
+ default: true
73
+ },
74
+ showZoom: {
75
+ type: Boolean,
76
+ default: true
77
+ },
78
+ showClose: {
79
+ type: Boolean,
80
+ default: true
81
+ },
82
+ showFooter: {
83
+ type: Boolean,
84
+ default: true
85
+ },
86
+ resize: {
87
+ type: Boolean,
88
+ default: true
89
+ },
90
+ mask: {
91
+ type: Boolean,
92
+ default: true
93
+ },
94
+ maskClosable: {
95
+ type: Boolean
96
+ },
97
+ escClosable: {
98
+ type: Boolean,
99
+ default: true
100
+ },
101
+ position: {
102
+ type: [String, Object],
103
+ default: 'center'
104
+ },
105
+ beforeHideMethod: {
106
+ type: Function
107
+ },
108
+ readonly: {
109
+ type: Boolean
110
+ },
111
+ confirmButtonText: {
112
+ type: String,
113
+ default: '确认'
114
+ },
115
+ cancelButtonText: {
116
+ type: String,
117
+ default: '取消'
118
+ }
119
+ },
120
+ emits: ['update:modelValue', 'show', 'hide', 'zoom', 'confirm', 'close'],
121
+ setup(props, context) {
122
+ const { proxy } = getCurrentInstance()
123
+ const { $vUtils } = proxy
124
+ const { emit, slots } = context
125
+ const modalRef = ref()
126
+
127
+ const modalConfig = computed(() => {
128
+ let modelProps = $vUtils.omit(props, ['readonly', 'confirmButtonText', 'cancelButtonText'])
129
+ return $vUtils.omit(modelProps, val => val === undefined)
130
+ })
131
+
132
+ // 弹窗显示回调
133
+ const onModalShow = () => {
134
+ emit('show')
135
+ }
136
+ // 弹窗隐藏回调
137
+ const onModalHide = () => {
138
+ emit('hide')
139
+ }
140
+ // 弹窗全屏切换回调
141
+ const onModalZoom = () => {
142
+ emit('zoom')
143
+ }
144
+ // 确认操作
145
+ const onModalConfirm = () => {
146
+ emit('confirm')
147
+ }
148
+ // 取消操作
149
+ const onModalClose = () => {
150
+ emit('close')
151
+ emit('update:modelValue', false)
152
+ }
153
+
154
+ watch(
155
+ () => modalConfig.value.modelValue,
156
+ value => {
157
+ if (!value) onModalClose()
158
+ }
159
+ )
160
+
161
+ return {
162
+ slots,
163
+ modalRef,
164
+ modalConfig,
165
+ onModalShow,
166
+ onModalHide,
167
+ onModalZoom,
168
+ onModalClose,
169
+ onModalConfirm
170
+ }
171
+ }
172
+ })
173
+ </script>
174
+
175
+ <style lang="scss" scoped>
176
+ .sh-modal-footer {
177
+ display: flex;
178
+ justify-content: space-between;
179
+ align-items: center;
180
+ flex-wrap: wrap;
181
+ white-space: nowrap;
182
+ .sh-modal-footer-left {
183
+ }
184
+ .sh-modal-footer-right {
185
+ flex: 1;
186
+ }
187
+ }
188
+ </style>