adtec-core-package 2.7.7 → 2.7.8

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adtec-core-package",
3
- "version": "2.7.7",
3
+ "version": "2.7.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  <script setup lang="ts">
18
18
  import { AiEditor } from 'aieditor'
19
19
  import 'aieditor/dist/style.css'
20
- import type { WatchStopHandle } from 'vue'
20
+ import { onActivated, type WatchStopHandle } from 'vue'
21
21
  import { onMounted, onUnmounted, ref, watch } from 'vue'
22
22
  import { ElMessage } from 'element-plus'
23
23
 
@@ -366,6 +366,7 @@ onMounted(() => {
366
366
  ]
367
367
  },
368
368
  onCreated: (editor: AiEditor) => {
369
+ setFooter()
369
370
  stopWatchByType(WatchType.initWatch)
370
371
  watchHandlers.value[WatchType.initWatch] = watch(
371
372
  () => props.isEdit,
@@ -402,7 +403,19 @@ onMounted(() => {
402
403
  aiEditor = new AiEditor(config)
403
404
  }, 100)
404
405
  })
405
-
406
+ onActivated(()=>{
407
+ const header = divRef.value?.querySelector('aie-header') as HTMLElement
408
+ if (header) {
409
+ const div = header.querySelector('div') as HTMLElement
410
+ div.style.justifyContent = props.isEdit ? '' : 'end'
411
+ const menuItems = header.querySelectorAll('.aie-menu-item:not(:last-child)')
412
+ if (menuItems.length) {
413
+ menuItems.forEach((item) => {
414
+ item.style.display = props.isEdit ? '' : 'none'
415
+ })
416
+ }
417
+ }
418
+ })
406
419
  const setFooter = () => {
407
420
  const footer = divRef.value?.querySelector('aie-footer') as HTMLElement
408
421
  if (footer) {
@@ -75,7 +75,7 @@
75
75
  ></el-icons>
76
76
  </el-flex>
77
77
  </el-flex>
78
- <slot @submit.prevent ></slot>
78
+ <slot></slot>
79
79
  <el-flex align="flex-end" justify="flex-end" height="40px" style="border-top: var(--border)">
80
80
  <el-button @click="reset">重置</el-button>
81
81
  <el-button type="primary" @click="search">查询</el-button>