sone-ui-component-3.2.4 2.1.25 → 2.1.26
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/sone-ui.common.js +18 -22
- package/lib/sone-ui.common.js.map +1 -1
- package/lib/sone-ui.umd.js +18 -22
- package/lib/sone-ui.umd.js.map +1 -1
- package/lib/sone-ui.umd.min.js +2 -2
- package/lib/sone-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/packages/tree/src/main.vue +11 -15
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -122,7 +122,12 @@
|
|
|
122
122
|
@node-drop="handleDrop"
|
|
123
123
|
>
|
|
124
124
|
<span class="custom-tree-node" style="display:flex;" :ref="`treeNode-${scope.node[nodeKey]}`" slot-scope="scope">
|
|
125
|
-
<span style="font-size:12px;"
|
|
125
|
+
<span style="font-size:12px;">
|
|
126
|
+
<i :class="`iconfont iconfont-single ${scope.node.data.iconClass}`"></i>
|
|
127
|
+
|
|
128
|
+
<span v-show="showLabel">{{ scope.node.label }}</span>
|
|
129
|
+
<slot name="labelSlot" :node="scope.node" ></slot>
|
|
130
|
+
</span>
|
|
126
131
|
<div >
|
|
127
132
|
<span class="sone-components-tree-more-btn-color" v-if="!scope.node.data.noMoreBtn">
|
|
128
133
|
<el-button
|
|
@@ -256,6 +261,11 @@ export default {
|
|
|
256
261
|
type:Number,
|
|
257
262
|
default:0,
|
|
258
263
|
remark:"菜单高度"
|
|
264
|
+
},
|
|
265
|
+
showLabel:{
|
|
266
|
+
type:Boolean,
|
|
267
|
+
default:true,
|
|
268
|
+
remark:"handle模式下是否展示label"
|
|
259
269
|
}
|
|
260
270
|
},
|
|
261
271
|
data() {
|
|
@@ -297,20 +307,12 @@ export default {
|
|
|
297
307
|
},
|
|
298
308
|
},
|
|
299
309
|
mounted() {
|
|
300
|
-
console.log('更新到没');
|
|
301
310
|
this.$nextTick(() => {
|
|
302
311
|
if(this.dragWidth) this.dropSize();
|
|
303
312
|
})
|
|
304
313
|
this.resetHandleData()
|
|
305
314
|
},
|
|
306
315
|
methods: {
|
|
307
|
-
/**
|
|
308
|
-
* @description 双击事件
|
|
309
|
-
*/
|
|
310
|
-
handleDoubleClick(val){
|
|
311
|
-
console.log('双击');
|
|
312
|
-
this.$emit('handleDoubleClick',val)
|
|
313
|
-
},
|
|
314
316
|
changeFilterText(val){
|
|
315
317
|
this.$refs.tree.filter(val)
|
|
316
318
|
this.$emit('searchInput', val)
|
|
@@ -361,14 +363,8 @@ export default {
|
|
|
361
363
|
document.removeEventListener('click',() => {})
|
|
362
364
|
},
|
|
363
365
|
handleContextmenu(event, data, node, self) {
|
|
364
|
-
console.log('self.$el.offsetTop---',self.$el.offsetTop );
|
|
365
|
-
console.log('this.menuHeight---',this.menuHeight );
|
|
366
|
-
console.log('self.$el.offsetTop + this.menuHeight---',self.$el.offsetTop + this.menuHeight);
|
|
367
366
|
if ( this.type != 'handle' ) return
|
|
368
|
-
|
|
369
367
|
let soneTreeWrapHeight = this.$refs.soneTreeWrap.clientHeight
|
|
370
|
-
console.log('soneTreeWrapHeight---',soneTreeWrapHeight);
|
|
371
|
-
|
|
372
368
|
//self.offsetTop + menuHeight >父元素高度 用向上展开的样式
|
|
373
369
|
if(this.menuHeight > 0 && self.$el.offsetTop + this.menuHeight > soneTreeWrapHeight){
|
|
374
370
|
this.$refs.handleMenu.style.top = self.$el.offsetTop - 0 - this.menuHeight/2 + 'px'
|