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.
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,230 +1,230 @@
1
- <template>
2
- <a class="sh-corner" :style="styles" :class="classes">
3
- <div class="sh-corner-content">
4
- <div v-if="title || slots.title">{{ title }}</div>
5
- <span v-if="slots.default"><slot></slot></span>
6
- </div>
7
- <span class="sh-corner-bg" :style="cornerStyles"></span>
8
- </a>
9
- </template>
10
-
11
- <script>
12
- import { defineComponent, computed } from 'vue'
13
- export default defineComponent({
14
- name: 'ShCorner',
15
- props: {
16
- color: {
17
- type: String,
18
- default: '#e8e8e8'
19
- },
20
- title: {
21
- type: [String, Number],
22
- default: ''
23
- },
24
- width: {
25
- type: [String, Number],
26
- default: '60'
27
- },
28
- height: {
29
- type: [String, Number],
30
- default: '60'
31
- },
32
- font: {
33
- type: [String, Number],
34
- default: '10'
35
- },
36
- placement: {
37
- type: String,
38
- default: 'top-right'
39
- },
40
- rotate: [Boolean],
41
- dark: [Boolean]
42
- },
43
- setup(props, context) {
44
- const { slots } = context
45
- const styles = computed(() => {
46
- return {
47
- borderColor: props.color,
48
- width: `${props.width}px`,
49
- height: `${props.height}px`,
50
- fontSize: `${props.font}px`,
51
- color: props.dark ? '#fff' : ''
52
- }
53
- })
54
- const cornerStyles = computed(() => {
55
- return {
56
- borderWidth: `${props.width}px`
57
- }
58
- })
59
- const placeClass = computed(() => {
60
- return props.placement.toLowerCase().split('-')
61
- })
62
- const classes = computed(() => {
63
- return [
64
- ...placeClass.value,
65
- {
66
- 'sh-rotate': props.rotate
67
- }
68
- ]
69
- })
70
-
71
- return {
72
- styles,
73
- classes,
74
- cornerStyles,
75
- slots
76
- }
77
- }
78
- })
79
- </script>
80
-
81
- <style lang="scss">
82
- $corner-size: 4em;
83
- .sh-corner {
84
- display: inline-block;
85
- position: absolute;
86
- top: 0;
87
- right: 0;
88
- margin: 0;
89
- padding: 0 !important;
90
- text-align: center;
91
- border-color: #e8e8e8;
92
- line-height: 1;
93
- vertical-align: baseline;
94
- overflow: hidden;
95
- width: $corner-size;
96
- height: $corner-size;
97
- z-index: 1;
98
- color: inherit;
99
- background-color: transparent;
100
- &:hover {
101
- color: inherit;
102
- }
103
- > .sh-corner-content {
104
- position: absolute;
105
- margin: 0;
106
- padding: 15% 5px;
107
- width: 100%;
108
- height: 100%;
109
- right: 0;
110
- top: 0;
111
- display: inline-flex;
112
- justify-content: flex-end;
113
- align-items: flex-start;
114
- flex-wrap: wrap;
115
- }
116
- &.sh-rotate {
117
- > .sh-corner-content {
118
- transform-origin: center;
119
- justify-content: center !important;
120
- }
121
- &.top.left {
122
- > .sh-corner-content {
123
- right: auto;
124
- left: 0;
125
- top: 0;
126
- transform: rotateZ(-45deg);
127
- }
128
- }
129
- &.top.right {
130
- > .sh-corner-content {
131
- right: 0;
132
- left: auto;
133
- top: 0;
134
- transform: rotateZ(45deg);
135
- }
136
- }
137
- &.bottom.left {
138
- > .sh-corner-content {
139
- right: auto;
140
- left: 0;
141
- bottom: 0;
142
- top: auto;
143
- transform: rotateZ(45deg);
144
- align-items: flex-end;
145
- }
146
- }
147
- &.bottom.right {
148
- > .sh-corner-content {
149
- right: 0;
150
- left: auto;
151
- bottom: 0;
152
- top: auto;
153
- transform: rotateZ(-45deg);
154
- align-items: flex-end;
155
- }
156
- }
157
- }
158
- & .sh-corner-bg {
159
- position: absolute;
160
- content: '';
161
- right: 0;
162
- top: 0;
163
- z-index: -1;
164
- width: 0;
165
- height: 0;
166
- background-color: transparent;
167
- border-style: solid;
168
- border-color: inherit;
169
- }
170
- &.top.left {
171
- right: auto;
172
- left: 0;
173
- top: 0;
174
- & .sh-corner-bg {
175
- right: auto;
176
- left: 0;
177
- top: 0;
178
- border-bottom-color: transparent !important;
179
- border-right-color: transparent !important;
180
- border-top-width: 0 !important;
181
- }
182
- > .sh-corner-content {
183
- justify-content: flex-start;
184
- }
185
- }
186
- &.top.right {
187
- right: 0;
188
- left: auto;
189
- top: 0;
190
- & .sh-corner-bg {
191
- border-bottom-color: transparent !important;
192
- border-left-color: transparent !important;
193
- border-top-width: 0 !important;
194
- }
195
- }
196
- &.bottom.left {
197
- right: auto;
198
- left: 0;
199
- bottom: 0;
200
- top: auto;
201
- & .sh-corner-bg {
202
- right: auto;
203
- left: 0;
204
- bottom: 0;
205
- top: auto;
206
- border-top-color: transparent !important;
207
- border-right-color: transparent !important;
208
- border-bottom-width: 0 !important;
209
- }
210
- > .sh-corner-content {
211
- justify-content: flex-start;
212
- }
213
- }
214
- &.bottom.right {
215
- right: 0;
216
- left: auto;
217
- bottom: 0;
218
- top: auto;
219
- & .sh-corner-bg {
220
- right: 0;
221
- left: auto;
222
- bottom: 0;
223
- top: auto;
224
- border-top-color: transparent !important;
225
- border-left-color: transparent !important;
226
- border-bottom-width: 0 !important;
227
- }
228
- }
229
- }
230
- </style>
1
+ <template>
2
+ <a class="sh-corner" :style="styles" :class="classes">
3
+ <div class="sh-corner-content">
4
+ <div v-if="title || slots.title">{{ title }}</div>
5
+ <span v-if="slots.default"><slot></slot></span>
6
+ </div>
7
+ <span class="sh-corner-bg" :style="cornerStyles"></span>
8
+ </a>
9
+ </template>
10
+
11
+ <script>
12
+ import { defineComponent, computed } from 'vue'
13
+ export default defineComponent({
14
+ name: 'ShCorner',
15
+ props: {
16
+ color: {
17
+ type: String,
18
+ default: '#e8e8e8'
19
+ },
20
+ title: {
21
+ type: [String, Number],
22
+ default: ''
23
+ },
24
+ width: {
25
+ type: [String, Number],
26
+ default: '60'
27
+ },
28
+ height: {
29
+ type: [String, Number],
30
+ default: '60'
31
+ },
32
+ font: {
33
+ type: [String, Number],
34
+ default: '10'
35
+ },
36
+ placement: {
37
+ type: String,
38
+ default: 'top-right'
39
+ },
40
+ rotate: [Boolean],
41
+ dark: [Boolean]
42
+ },
43
+ setup(props, context) {
44
+ const { slots } = context
45
+ const styles = computed(() => {
46
+ return {
47
+ borderColor: props.color,
48
+ width: `${props.width}px`,
49
+ height: `${props.height}px`,
50
+ fontSize: `${props.font}px`,
51
+ color: props.dark ? '#fff' : ''
52
+ }
53
+ })
54
+ const cornerStyles = computed(() => {
55
+ return {
56
+ borderWidth: `${props.width}px`
57
+ }
58
+ })
59
+ const placeClass = computed(() => {
60
+ return props.placement.toLowerCase().split('-')
61
+ })
62
+ const classes = computed(() => {
63
+ return [
64
+ ...placeClass.value,
65
+ {
66
+ 'sh-rotate': props.rotate
67
+ }
68
+ ]
69
+ })
70
+
71
+ return {
72
+ styles,
73
+ classes,
74
+ cornerStyles,
75
+ slots
76
+ }
77
+ }
78
+ })
79
+ </script>
80
+
81
+ <style lang="scss">
82
+ $corner-size: 4em;
83
+ .sh-corner {
84
+ display: inline-block;
85
+ position: absolute;
86
+ top: 0;
87
+ right: 0;
88
+ margin: 0;
89
+ padding: 0 !important;
90
+ text-align: center;
91
+ border-color: #e8e8e8;
92
+ line-height: 1;
93
+ vertical-align: baseline;
94
+ overflow: hidden;
95
+ width: $corner-size;
96
+ height: $corner-size;
97
+ z-index: 1;
98
+ color: inherit;
99
+ background-color: transparent;
100
+ &:hover {
101
+ color: inherit;
102
+ }
103
+ > .sh-corner-content {
104
+ position: absolute;
105
+ margin: 0;
106
+ padding: 15% 5px;
107
+ width: 100%;
108
+ height: 100%;
109
+ right: 0;
110
+ top: 0;
111
+ display: inline-flex;
112
+ justify-content: flex-end;
113
+ align-items: flex-start;
114
+ flex-wrap: wrap;
115
+ }
116
+ &.sh-rotate {
117
+ > .sh-corner-content {
118
+ transform-origin: center;
119
+ justify-content: center !important;
120
+ }
121
+ &.top.left {
122
+ > .sh-corner-content {
123
+ right: auto;
124
+ left: 0;
125
+ top: 0;
126
+ transform: rotateZ(-45deg);
127
+ }
128
+ }
129
+ &.top.right {
130
+ > .sh-corner-content {
131
+ right: 0;
132
+ left: auto;
133
+ top: 0;
134
+ transform: rotateZ(45deg);
135
+ }
136
+ }
137
+ &.bottom.left {
138
+ > .sh-corner-content {
139
+ right: auto;
140
+ left: 0;
141
+ bottom: 0;
142
+ top: auto;
143
+ transform: rotateZ(45deg);
144
+ align-items: flex-end;
145
+ }
146
+ }
147
+ &.bottom.right {
148
+ > .sh-corner-content {
149
+ right: 0;
150
+ left: auto;
151
+ bottom: 0;
152
+ top: auto;
153
+ transform: rotateZ(-45deg);
154
+ align-items: flex-end;
155
+ }
156
+ }
157
+ }
158
+ & .sh-corner-bg {
159
+ position: absolute;
160
+ content: '';
161
+ right: 0;
162
+ top: 0;
163
+ z-index: -1;
164
+ width: 0;
165
+ height: 0;
166
+ background-color: transparent;
167
+ border-style: solid;
168
+ border-color: inherit;
169
+ }
170
+ &.top.left {
171
+ right: auto;
172
+ left: 0;
173
+ top: 0;
174
+ & .sh-corner-bg {
175
+ right: auto;
176
+ left: 0;
177
+ top: 0;
178
+ border-bottom-color: transparent !important;
179
+ border-right-color: transparent !important;
180
+ border-top-width: 0 !important;
181
+ }
182
+ > .sh-corner-content {
183
+ justify-content: flex-start;
184
+ }
185
+ }
186
+ &.top.right {
187
+ right: 0;
188
+ left: auto;
189
+ top: 0;
190
+ & .sh-corner-bg {
191
+ border-bottom-color: transparent !important;
192
+ border-left-color: transparent !important;
193
+ border-top-width: 0 !important;
194
+ }
195
+ }
196
+ &.bottom.left {
197
+ right: auto;
198
+ left: 0;
199
+ bottom: 0;
200
+ top: auto;
201
+ & .sh-corner-bg {
202
+ right: auto;
203
+ left: 0;
204
+ bottom: 0;
205
+ top: auto;
206
+ border-top-color: transparent !important;
207
+ border-right-color: transparent !important;
208
+ border-bottom-width: 0 !important;
209
+ }
210
+ > .sh-corner-content {
211
+ justify-content: flex-start;
212
+ }
213
+ }
214
+ &.bottom.right {
215
+ right: 0;
216
+ left: auto;
217
+ bottom: 0;
218
+ top: auto;
219
+ & .sh-corner-bg {
220
+ right: 0;
221
+ left: auto;
222
+ bottom: 0;
223
+ top: auto;
224
+ border-top-color: transparent !important;
225
+ border-left-color: transparent !important;
226
+ border-bottom-width: 0 !important;
227
+ }
228
+ }
229
+ }
230
+ </style>