@mixd-id/web-scaffold 0.1.230406153 → 0.1.230406154
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
|
@@ -126,7 +126,15 @@ export default{
|
|
|
126
126
|
|
|
127
127
|
computedState(to, from){
|
|
128
128
|
this.setState(to)
|
|
129
|
-
}
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
$route(to, from){
|
|
132
|
+
if(from.path !== to.path && !to.hash){
|
|
133
|
+
let overlay = document.querySelector('.bW9k')
|
|
134
|
+
if(overlay && overlay.classList.contains('bW9l'))
|
|
135
|
+
overlay.classList.remove('bW9l')
|
|
136
|
+
}
|
|
137
|
+
},
|
|
130
138
|
|
|
131
139
|
},
|
|
132
140
|
|
|
@@ -41,8 +41,6 @@
|
|
|
41
41
|
|
|
42
42
|
<script>
|
|
43
43
|
|
|
44
|
-
import {copyToClipboard} from "../utils/helpers.mjs";
|
|
45
|
-
|
|
46
44
|
let dragged = null
|
|
47
45
|
let guide1 = null
|
|
48
46
|
|
|
@@ -145,14 +143,6 @@ export default{
|
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
145
|
|
|
148
|
-
/*console.log('#1', {
|
|
149
|
-
startIdx,
|
|
150
|
-
targetIdx,
|
|
151
|
-
destIdx,
|
|
152
|
-
moveDirection,
|
|
153
|
-
dragArea: dragged.dragArea
|
|
154
|
-
})*/
|
|
155
|
-
|
|
156
146
|
dragged.targetParent.splice(destIdx, 0, dragged.parent.splice(startIdx, 1)[0])
|
|
157
147
|
|
|
158
148
|
this.$emit('change')
|
|
@@ -181,7 +171,6 @@ export default{
|
|
|
181
171
|
if(dragged.target !== this.item){
|
|
182
172
|
const rect = this.$refs.item.getBoundingClientRect()
|
|
183
173
|
dragged.centerY = rect.y + (rect.height / 2)
|
|
184
|
-
//console.log('#BS', dragged.centerY, this.item.name)
|
|
185
174
|
}
|
|
186
175
|
dragged.target = this.item
|
|
187
176
|
dragged.targetParent = this.parent
|
|
@@ -194,8 +183,6 @@ export default{
|
|
|
194
183
|
this.$el.insertBefore(guide1, null)
|
|
195
184
|
dragged.dragArea = 1
|
|
196
185
|
}
|
|
197
|
-
|
|
198
|
-
//console.log('centerY', dragged.dragArea, e.clientY, dragged.centerY)
|
|
199
186
|
},
|
|
200
187
|
|
|
201
188
|
hoverMouseOut(e){
|
|
@@ -215,10 +202,14 @@ export default{
|
|
|
215
202
|
|
|
216
203
|
computed: {
|
|
217
204
|
|
|
205
|
+
isSelected(){
|
|
206
|
+
return this.selectedItem === this.item
|
|
207
|
+
},
|
|
208
|
+
|
|
218
209
|
itemClass(){
|
|
219
210
|
return [
|
|
220
211
|
this.$style.item,
|
|
221
|
-
this.
|
|
212
|
+
this.isSelected ? this.$style.active : '',
|
|
222
213
|
this.state === 3 ? this.$style.active : '',
|
|
223
214
|
]
|
|
224
215
|
.filter(_=>_)
|
|
@@ -232,7 +223,26 @@ export default{
|
|
|
232
223
|
childCollapsed: false,
|
|
233
224
|
hvm: null
|
|
234
225
|
}
|
|
235
|
-
}
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
watch: {
|
|
229
|
+
|
|
230
|
+
item: {
|
|
231
|
+
handler(){
|
|
232
|
+
this.childCollapsed = false
|
|
233
|
+
},
|
|
234
|
+
deep: true
|
|
235
|
+
},
|
|
236
|
+
|
|
237
|
+
isSelected(to){
|
|
238
|
+
if(to){
|
|
239
|
+
this.$el.scrollIntoView({
|
|
240
|
+
behavior: 'smooth',
|
|
241
|
+
})
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
},
|
|
236
246
|
|
|
237
247
|
}
|
|
238
248
|
|