|
@@ -197,6 +197,7 @@
|
|
|
import { ref, defineEmits } from 'vue';
|
|
|
import { TemplateJsCode } from './jscodetpl.js'
|
|
|
import { Link } from '@element-plus/icons-vue'
|
|
|
+import { ServerActionCurrentOpenTab } from "../../../wailsjs/go/main/App"
|
|
|
const emit = defineEmits(['custom-event', 'data-tag', 'form-change']);
|
|
|
let originData = {}
|
|
|
|
|
@@ -349,9 +350,30 @@ const handleDataTag = () => {
|
|
|
emit('data-tag', originData)
|
|
|
}
|
|
|
|
|
|
+// 根据编辑弹窗的内容,获取cssMark
|
|
|
+const getMarkWithEditDialogInfo = info => {
|
|
|
+ const { value, _originData } = info
|
|
|
+ const baseInfo = {
|
|
|
+ code: _originData.code,
|
|
|
+ site: _originData.site,
|
|
|
+ channel: _originData.channel,
|
|
|
+ href: _originData.href,
|
|
|
+ modifyuser: _originData.modifyuser,
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ ...value,
|
|
|
+ ...baseInfo,
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+const onEditFormChange = (info) => {
|
|
|
+ const mark = getMarkWithEditDialogInfo(info)
|
|
|
+ ServerActionCurrentOpenTab(mark)
|
|
|
+}
|
|
|
+
|
|
|
const onCssFormChange = () => {
|
|
|
const payload = getPageData()
|
|
|
- emit('form-change', payload)
|
|
|
+ onEditFormChange(payload)
|
|
|
}
|
|
|
|
|
|
//这里是重点: 向外部组建暴露可供调用的方法
|