workflow-editor 0.0.86-upPocCdn1 → 0.0.87-up
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/lib/{401-246c8506.js → 401-6d407e37.js} +56 -56
- package/lib/{404-129eb9e7.js → 404-44e0676c.js} +14 -14
- package/lib/{iframe-page-2f99e943.js → iframe-page-adb4ea50.js} +1 -1
- package/lib/{index-40c8ab16.js → index-1963da8a.js} +10280 -9849
- package/lib/{tab-content-iframe-index-b4cba0b4.js → tab-content-iframe-index-1468478a.js} +1 -1
- package/lib/{tab-content-index-0f373e6a.js → tab-content-index-3bd25899.js} +1 -1
- package/lib/{tache-subprocess-history-fc1a32d9.js → tache-subprocess-history-e1b89bed.js} +1 -1
- package/lib/workflow-editor.css +1 -1
- package/lib/workflow-editor.js +1 -1
- package/lib/workflow-editor.umd.cjs +66 -82
- package/package.json +3 -2
- package/packages/index.js +3 -3
- package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +6 -1
- package/packages/workflow-editor/src/properties-editors/common/task-title.vue +63 -14
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workflow-editor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.87-up",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/workflow-editor.js",
|
|
7
7
|
"scripts": {
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@vitejs/plugin-vue": "^4.2.3",
|
|
19
|
-
"agilebuilder-ui": "1.1.
|
|
19
|
+
"agilebuilder-ui": "1.1.92",
|
|
20
20
|
"axios": "^1.5.1",
|
|
21
21
|
"element-plus": "^2.4.1",
|
|
22
22
|
"font-awesome": "^4.7.0",
|
|
23
23
|
"nprogress": "^0.2.0",
|
|
24
24
|
"sass": "^1.69.4",
|
|
25
|
+
"sortablejs": "^1.15.2",
|
|
25
26
|
"vite": "^4.4.5",
|
|
26
27
|
"vite-plugin-svg-icons": "^2.0.1",
|
|
27
28
|
"vue": "^3.3.4",
|
package/packages/index.js
CHANGED
|
@@ -22,9 +22,9 @@ const install = function(Vue) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// 判断是否是直接引入vue的js文件,即全局引用可自动安装所有组件
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
if (typeof window !== 'undefined' && window.Vue) {
|
|
26
|
+
install(window.Vue)
|
|
27
|
+
}
|
|
28
28
|
|
|
29
29
|
export default {
|
|
30
30
|
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span>
|
|
3
3
|
<div style="float: left; padding-right: 5px">
|
|
4
|
-
<el-input v-model="zh">
|
|
4
|
+
<el-input v-model="zh" @keydown.native.enter.prevent="onEnter">
|
|
5
5
|
<template #append>
|
|
6
6
|
<i class="fa fa-cog" @click="i18nSet"></i>
|
|
7
7
|
</template>
|
|
@@ -79,6 +79,11 @@ export default {
|
|
|
79
79
|
this.$emit('setI18n', i18nSet)
|
|
80
80
|
}
|
|
81
81
|
this.isShowI18n = false
|
|
82
|
+
},
|
|
83
|
+
onEnter(e) {
|
|
84
|
+
// 阻塞 Enter 键在输入框中的默认行为,防止冒泡到表单提交等外部逻辑
|
|
85
|
+
e.preventDefault()
|
|
86
|
+
e.stopPropagation()
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
<span ref="tagContainer" class="tag-container">
|
|
4
|
+
<el-tag
|
|
5
|
+
v-for="(tag, index) in dynamicTags"
|
|
6
|
+
:key="tag"
|
|
7
|
+
:data-index="index"
|
|
8
|
+
:data-tag-key="tag"
|
|
9
|
+
:type="getType(tag)"
|
|
10
|
+
closable
|
|
11
|
+
:disable-transitions="false"
|
|
12
|
+
@close="handleClose(tag)"
|
|
13
|
+
>
|
|
14
|
+
<el-tooltip :content="showText(tag)" placement="top">
|
|
15
|
+
<span class="tag-text">{{ showText(tag) }}</span>
|
|
16
|
+
</el-tooltip>
|
|
17
|
+
</el-tag>
|
|
18
|
+
</span>
|
|
15
19
|
<el-input
|
|
16
20
|
v-if="inputVisible || isShowAdditionalParam"
|
|
17
21
|
ref="saveTagInput"
|
|
@@ -38,6 +42,7 @@
|
|
|
38
42
|
<script>
|
|
39
43
|
import FormFields from './form-fields'
|
|
40
44
|
import { getFormFieldLabel } from './form-fields-utils.js'
|
|
45
|
+
import Sortable from 'sortablejs'
|
|
41
46
|
export default {
|
|
42
47
|
name: 'TaskTitle',
|
|
43
48
|
components: {
|
|
@@ -73,7 +78,34 @@ export default {
|
|
|
73
78
|
// this.$emit('update:modelValue', this.dynamicTags.join(''))
|
|
74
79
|
// }
|
|
75
80
|
// },
|
|
76
|
-
mounted() {
|
|
81
|
+
mounted() {
|
|
82
|
+
this._sortable = Sortable.create(this.$refs.tagContainer, {
|
|
83
|
+
animation: 150,
|
|
84
|
+
draggable: '.el-tag',
|
|
85
|
+
dragClass: 'wf-tag-drag',
|
|
86
|
+
onEnd: () => {
|
|
87
|
+
const container = this.$refs.tagContainer
|
|
88
|
+
if (!container) return
|
|
89
|
+
// 从 DOM 当前真实顺序读取 tag 值,彻底避免索引偏移问题
|
|
90
|
+
const newOrder = Array.from(container.querySelectorAll('.el-tag[data-tag-key]')).map((el) =>
|
|
91
|
+
el.getAttribute('data-tag-key')
|
|
92
|
+
)
|
|
93
|
+
// 还原 Sortable 对 DOM 的移动,交由 Vue 重新渲染
|
|
94
|
+
container.querySelectorAll('.el-tag[data-tag-key]').forEach((el, i) => {
|
|
95
|
+
const original = this.dynamicTags[i]
|
|
96
|
+
const originalEl = container.querySelector(`.el-tag[data-tag-key="${original}"]`)
|
|
97
|
+
if (originalEl) container.appendChild(originalEl)
|
|
98
|
+
})
|
|
99
|
+
this.dynamicTags = newOrder
|
|
100
|
+
this.$emit('update:modelValue', newOrder.join(''))
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
},
|
|
104
|
+
beforeUnmount() {
|
|
105
|
+
if (this._sortable) {
|
|
106
|
+
this._sortable.destroy()
|
|
107
|
+
}
|
|
108
|
+
},
|
|
77
109
|
methods: {
|
|
78
110
|
showText(value) {
|
|
79
111
|
let result = value
|
|
@@ -140,8 +172,14 @@ export default {
|
|
|
140
172
|
}
|
|
141
173
|
</script>
|
|
142
174
|
<style scoped>
|
|
175
|
+
.tag-container {
|
|
176
|
+
display: inline-flex;
|
|
177
|
+
flex-wrap: wrap;
|
|
178
|
+
gap: 6px;
|
|
179
|
+
cursor: grab;
|
|
180
|
+
}
|
|
143
181
|
.el-tag + .el-tag {
|
|
144
|
-
margin-left:
|
|
182
|
+
margin-left: 0;
|
|
145
183
|
}
|
|
146
184
|
.tag-text {
|
|
147
185
|
display: inline-block;
|
|
@@ -170,3 +208,14 @@ select {
|
|
|
170
208
|
line-height: 32px;
|
|
171
209
|
}
|
|
172
210
|
</style>
|
|
211
|
+
|
|
212
|
+
<!-- 非 scoped:覆盖 Sortable 追加到 body 的拖拽克隆元素样式 -->
|
|
213
|
+
<style>
|
|
214
|
+
.wf-tag-drag {
|
|
215
|
+
display: inline-flex !important;
|
|
216
|
+
pointer-events: auto !important;
|
|
217
|
+
opacity: 0.85;
|
|
218
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
219
|
+
background: #fff;
|
|
220
|
+
}
|
|
221
|
+
</style>
|