sh-view 2.4.17 → 2.4.19
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/package.json +1 -1
- package/packages/components/global-components/sh-modal/index.vue +1 -9
- package/packages/components/global-components/sh-table/table.vue +8 -5
- package/packages/components/other-components/sh-menu/index.vue +11 -8
- package/packages/components/other-components/sh-menu-card/index.vue +7 -4
- package/packages/components/other-components/sh-preview/js/data-hook.js +7 -4
package/package.json
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<vxe-modal
|
|
3
|
-
ref="modalRef"
|
|
4
|
-
v-bind="modalConfig"
|
|
5
|
-
@show="onModalShow"
|
|
6
|
-
@hide="onModalHide"
|
|
7
|
-
@zoom="onModalZoom"
|
|
8
|
-
@close="onModalClose"
|
|
9
|
-
@cancel="onModalClose"
|
|
10
|
-
@confirm="onModalConfirm">
|
|
2
|
+
<vxe-modal ref="modalRef" v-bind="modalConfig" @show="onModalShow" @hide="onModalHide" @zoom="onModalZoom" @close="onModalClose" @cancel="onModalClose" @confirm="onModalConfirm">
|
|
11
3
|
<template v-for="slot in Object.keys(slots)" #[slot]="scope">
|
|
12
4
|
<!-- 以之前的名字命名插槽,同时把数据原样绑定 -->
|
|
13
5
|
<slot :name="slot" v-bind="scope"></slot>
|
|
@@ -224,11 +224,14 @@ export default defineComponent({
|
|
|
224
224
|
const isPagerSlot = computed(() => useTableHooks.tablePagerConfig.value.enabled)
|
|
225
225
|
const isBottomSlot = computed(() => Boolean(slots.bottom))
|
|
226
226
|
|
|
227
|
-
provide(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
provide(
|
|
228
|
+
'ShTableInstance',
|
|
229
|
+
reactive({
|
|
230
|
+
columnObjConfig: useTableHooks.tableColumnObjConfig,
|
|
231
|
+
turnColumnItemFilters: useTableHooks.turnColumnItemFilters,
|
|
232
|
+
slots: useTableHooks.slots
|
|
233
|
+
})
|
|
234
|
+
)
|
|
232
235
|
|
|
233
236
|
const handleResize = e => {
|
|
234
237
|
if (useTableHooks.wrapHeight.value === 'auto') return
|
|
@@ -113,14 +113,17 @@ export default defineComponent({
|
|
|
113
113
|
openedNames.value = []
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
provide(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
provide(
|
|
117
|
+
'MenuInstance',
|
|
118
|
+
reactive({
|
|
119
|
+
props,
|
|
120
|
+
activeName,
|
|
121
|
+
activeNames,
|
|
122
|
+
openedNames,
|
|
123
|
+
onMenuSelect,
|
|
124
|
+
onMenuExpand
|
|
125
|
+
})
|
|
126
|
+
)
|
|
124
127
|
|
|
125
128
|
watch(
|
|
126
129
|
() => props.modelValue,
|
|
@@ -169,10 +169,13 @@ export default defineComponent({
|
|
|
169
169
|
emit('select', menu)
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
provide(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
provide(
|
|
173
|
+
'MenuCardInstance',
|
|
174
|
+
reactive({
|
|
175
|
+
props,
|
|
176
|
+
onMenuSelect
|
|
177
|
+
})
|
|
178
|
+
)
|
|
176
179
|
|
|
177
180
|
return {
|
|
178
181
|
cardActive,
|
|
@@ -8,12 +8,15 @@ export default function (props, context, state) {
|
|
|
8
8
|
if (!props.src) return
|
|
9
9
|
let container = rootRef.value
|
|
10
10
|
try {
|
|
11
|
-
let fileRes = null
|
|
12
11
|
if (typeof props.src === 'string') {
|
|
13
|
-
|
|
12
|
+
fetch(props.src, props.serverConfig).then(async res => {
|
|
13
|
+
await state.domRender(res, container)
|
|
14
|
+
emit('rendered')
|
|
15
|
+
})
|
|
16
|
+
} else {
|
|
17
|
+
await state.domRender(props.src, container)
|
|
18
|
+
emit('rendered')
|
|
14
19
|
}
|
|
15
|
-
await state.domRender(fileRes, container)
|
|
16
|
-
emit('rendered')
|
|
17
20
|
} catch (e) {
|
|
18
21
|
await state.domRender('', container)
|
|
19
22
|
emit('error', e)
|