sone-ui-component-3.2.4 2.1.24 → 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 -20
- package/lib/sone-ui.common.js.map +1 -1
- package/lib/sone-ui.umd.js +18 -20
- 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 -13
- 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() {
|
|
@@ -303,12 +313,6 @@ export default {
|
|
|
303
313
|
this.resetHandleData()
|
|
304
314
|
},
|
|
305
315
|
methods: {
|
|
306
|
-
/**
|
|
307
|
-
* @description 双击事件
|
|
308
|
-
*/
|
|
309
|
-
handleDoubleClick(val){
|
|
310
|
-
this.$emit('handleDoubleClick',val)
|
|
311
|
-
},
|
|
312
316
|
changeFilterText(val){
|
|
313
317
|
this.$refs.tree.filter(val)
|
|
314
318
|
this.$emit('searchInput', val)
|
|
@@ -359,14 +363,8 @@ export default {
|
|
|
359
363
|
document.removeEventListener('click',() => {})
|
|
360
364
|
},
|
|
361
365
|
handleContextmenu(event, data, node, self) {
|
|
362
|
-
console.log('self.$el.offsetTop---',self.$el.offsetTop );
|
|
363
|
-
console.log('this.menuHeight---',this.menuHeight );
|
|
364
|
-
console.log('self.$el.offsetTop + this.menuHeight---',self.$el.offsetTop + this.menuHeight);
|
|
365
366
|
if ( this.type != 'handle' ) return
|
|
366
|
-
|
|
367
367
|
let soneTreeWrapHeight = this.$refs.soneTreeWrap.clientHeight
|
|
368
|
-
console.log('soneTreeWrapHeight---',soneTreeWrapHeight);
|
|
369
|
-
|
|
370
368
|
//self.offsetTop + menuHeight >父元素高度 用向上展开的样式
|
|
371
369
|
if(this.menuHeight > 0 && self.$el.offsetTop + this.menuHeight > soneTreeWrapHeight){
|
|
372
370
|
this.$refs.handleMenu.style.top = self.$el.offsetTop - 0 - this.menuHeight/2 + 'px'
|