workflow-editor 0.0.87-up-sit1 → 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-851c5a26.js → 401-6d407e37.js} +1 -1
- package/lib/{404-fdf93934.js → 404-44e0676c.js} +1 -1
- package/lib/{iframe-page-fdc074c2.js → iframe-page-adb4ea50.js} +1 -1
- package/lib/{index-eb004642.js → index-1963da8a.js} +194 -169
- package/lib/{tab-content-iframe-index-3ad4b8ca.js → tab-content-iframe-index-1468478a.js} +1 -1
- package/lib/{tab-content-index-98a645c5.js → tab-content-index-3bd25899.js} +1 -1
- package/lib/{tache-subprocess-history-b6f19852.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 +20 -20
- package/package.json +3 -2
- package/packages/workflow-editor/src/properties-editors/common/task-title.vue +28 -15
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "workflow-editor",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.87-up
|
|
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.92
|
|
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",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
v-for="(tag, index) in dynamicTags"
|
|
6
6
|
:key="tag"
|
|
7
7
|
:data-index="index"
|
|
8
|
+
:data-tag-key="tag"
|
|
8
9
|
:type="getType(tag)"
|
|
9
10
|
closable
|
|
10
11
|
:disable-transitions="false"
|
|
@@ -80,22 +81,23 @@ export default {
|
|
|
80
81
|
mounted() {
|
|
81
82
|
this._sortable = Sortable.create(this.$refs.tagContainer, {
|
|
82
83
|
animation: 150,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
draggable: '.el-tag',
|
|
85
|
+
dragClass: 'wf-tag-drag',
|
|
86
|
+
onEnd: () => {
|
|
86
87
|
const container = this.$refs.tagContainer
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
this
|
|
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(''))
|
|
99
101
|
}
|
|
100
102
|
})
|
|
101
103
|
},
|
|
@@ -206,3 +208,14 @@ select {
|
|
|
206
208
|
line-height: 32px;
|
|
207
209
|
}
|
|
208
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>
|