sh-view 2.4.0 → 2.4.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/package.json
CHANGED
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
</template>
|
|
155
155
|
|
|
156
156
|
<script>
|
|
157
|
-
import { computed, defineComponent, getCurrentInstance, provide, ref } from 'vue'
|
|
157
|
+
import { computed, defineComponent, getCurrentInstance, provide, ref, reactive } from 'vue'
|
|
158
158
|
import './css/index.scss'
|
|
159
159
|
|
|
160
160
|
import props from './js/props'
|
|
@@ -224,11 +224,11 @@ export default defineComponent({
|
|
|
224
224
|
const isPagerSlot = computed(() => useTableHooks.tablePagerConfig.value.enabled)
|
|
225
225
|
const isBottomSlot = computed(() => Boolean(slots.bottom))
|
|
226
226
|
|
|
227
|
-
provide('ShTableInstance', {
|
|
227
|
+
provide('ShTableInstance', reactive({
|
|
228
228
|
columnObjConfig: useTableHooks.tableColumnObjConfig,
|
|
229
229
|
turnColumnItemFilters: useTableHooks.turnColumnItemFilters,
|
|
230
230
|
slots: useTableHooks.slots
|
|
231
|
-
})
|
|
231
|
+
}))
|
|
232
232
|
|
|
233
233
|
const handleResize = e => {
|
|
234
234
|
if (useTableHooks.wrapHeight.value === 'auto') return
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
|
-
import { defineComponent, computed, provide, ref, getCurrentInstance, watch, onMounted } from 'vue'
|
|
12
|
+
import { defineComponent, computed, provide, ref, reactive, getCurrentInstance, watch, onMounted } from 'vue'
|
|
13
13
|
import menuGroupContent from './menu-group-content.vue'
|
|
14
14
|
export default defineComponent({
|
|
15
15
|
name: 'ShMenu',
|
|
@@ -113,14 +113,14 @@ export default defineComponent({
|
|
|
113
113
|
openedNames.value = []
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
provide('MenuInstance', {
|
|
116
|
+
provide('MenuInstance', reactive({
|
|
117
117
|
...props,
|
|
118
118
|
activeName,
|
|
119
119
|
activeNames,
|
|
120
120
|
openedNames,
|
|
121
121
|
onMenuSelect,
|
|
122
122
|
onMenuExpand
|
|
123
|
-
})
|
|
123
|
+
}))
|
|
124
124
|
|
|
125
125
|
watch(
|
|
126
126
|
() => props.modelValue,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
44
|
<script>
|
|
45
|
-
import { defineComponent, computed, provide, getCurrentInstance, ref, onMounted } from 'vue'
|
|
45
|
+
import { defineComponent, computed, provide, getCurrentInstance, ref, reactive, onMounted } from 'vue'
|
|
46
46
|
import menuBox from './menu-box.vue'
|
|
47
47
|
export default defineComponent({
|
|
48
48
|
name: 'MenuCard',
|
|
@@ -169,10 +169,10 @@ export default defineComponent({
|
|
|
169
169
|
emit('select', menu)
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
provide('MenuCardInstance', {
|
|
172
|
+
provide('MenuCardInstance', reactive({
|
|
173
173
|
...props,
|
|
174
174
|
onMenuSelect
|
|
175
|
-
})
|
|
175
|
+
}))
|
|
176
176
|
|
|
177
177
|
return {
|
|
178
178
|
cardActive,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import ResizeObserver from 'resize-observer-polyfill'
|
|
2
|
-
import { utils } from 'sh-tools'
|
|
3
|
-
const throttleTime = 200
|
|
2
|
+
// import { utils } from 'sh-tools'
|
|
3
|
+
// const throttleTime = 200
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
beforeMount(el, binding) {
|
|
7
|
-
const _callback = utils.throttle(binding.value, throttleTime)
|
|
7
|
+
// const _callback = utils.throttle(binding.value, throttleTime)
|
|
8
|
+
const _callback = binding.value
|
|
8
9
|
el.__observer__ = new ResizeObserver(_callback)
|
|
9
10
|
el.__observer__.observe(el)
|
|
10
11
|
},
|