1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
| <template>
| <JInputPop
| :value="innerValue"
| :width="300"
| :height="210"
| :pop-container="getPopupContainer"
| v-bind="cellProps"
| style="width: 100%"
| @blur="handleBlurCommon"
| @change="handleChangeCommon"
| />
| </template>
|
| <script lang="ts">
| import { defineComponent } from 'vue';
| import JInputPop from '/@/components/Form/src/jeecg/components/JInputPop.vue';
| import { dispatchEvent } from '/@/components/jeecg/JVxeTable/utils';
| import { JVxeComponent } from '/@/components/jeecg/JVxeTable/types';
| import { useJVxeComponent, useJVxeCompProps } from '/@/components/jeecg/JVxeTable/hooks';
|
| export default defineComponent({
| name: 'JVxeTextareaCell',
| components: { JInputPop },
| props: useJVxeCompProps(),
| setup(props: JVxeComponent.Props) {
| const { innerValue, cellProps, handleChangeCommon, handleBlurCommon } = useJVxeComponent(props);
|
| function getPopupContainer() {
| return document.body;
| }
|
| return { innerValue, cellProps, handleChangeCommon, handleBlurCommon, getPopupContainer };
| },
| // 【组件增强】注释详见:JVxeComponent.Enhanced
| enhanced: {
| installOptions: {
| autofocus: '.ant-input',
| },
| aopEvents: {
| editActived({ $event, row, column }) {
| // 是否默认打开右侧弹窗
| if (column.params.defaultOpen ?? false) {
| dispatchEvent({
| $event,
| row,
| column,
| props: this.props,
| instance: this,
| className: '.ant-input-suffix .app-iconify',
| isClick: true,
| });
| }
| },
| },
| } as JVxeComponent.EnhancedPartial,
| });
| </script>
|
|