sone-ui-component-3.2.4 2.1.7 → 2.1.9
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 +34 -34
- package/lib/sone-ui.common.js.map +1 -1
- package/lib/sone-ui.umd.js +34 -34
- package/lib/sone-ui.umd.js.map +1 -1
- package/lib/sone-ui.umd.min.js +3 -3
- package/lib/sone-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/packages/tree/src/main.vue +9 -9
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -128,8 +128,9 @@
|
|
|
128
128
|
<el-button
|
|
129
129
|
type="text"
|
|
130
130
|
size="mini"
|
|
131
|
+
v-show="showMoreBtn"
|
|
131
132
|
@click.stop="showTreeMenu(scope,$event)"
|
|
132
|
-
icon="iconfont iconfont-single icon-more"
|
|
133
|
+
icon="iconfont iconfont-single icon-more">
|
|
133
134
|
</el-button>
|
|
134
135
|
</span>
|
|
135
136
|
</div>
|
|
@@ -247,6 +248,11 @@ export default {
|
|
|
247
248
|
dragWidth:{
|
|
248
249
|
type:Boolean,
|
|
249
250
|
default:false
|
|
251
|
+
},
|
|
252
|
+
allowShowLabel:{type: String, default: '有些需要一直展示有些字段,用这个字来控制'},
|
|
253
|
+
showMoreBtn:{
|
|
254
|
+
type:Boolean,
|
|
255
|
+
default:true
|
|
250
256
|
}
|
|
251
257
|
},
|
|
252
258
|
data() {
|
|
@@ -299,9 +305,6 @@ export default {
|
|
|
299
305
|
this.$refs.tree.filter(val)
|
|
300
306
|
this.$emit('searchInput', val)
|
|
301
307
|
},
|
|
302
|
-
handldMore(node){
|
|
303
|
-
this.$emit('click-more',node.data)
|
|
304
|
-
},
|
|
305
308
|
dropSize(){
|
|
306
309
|
let that = this;
|
|
307
310
|
|
|
@@ -341,7 +344,6 @@ export default {
|
|
|
341
344
|
this.$refs.handleMenu.style.right = '5px'
|
|
342
345
|
this.checkedData = scope.node
|
|
343
346
|
this.handleMenuFlag = true
|
|
344
|
-
// console.log(top - 0 + 95 + 'px')
|
|
345
347
|
document.addEventListener('click', this.closeDocClickFn)
|
|
346
348
|
},
|
|
347
349
|
closeDocClickFn() {
|
|
@@ -351,14 +353,12 @@ export default {
|
|
|
351
353
|
handleContextmenu(event, data, node, self) {
|
|
352
354
|
if ( this.type != 'handle' ) return
|
|
353
355
|
this.$refs.handleMenu.style.top = self.$el.offsetTop - 0 + 25 + 'px'
|
|
354
|
-
// this.$refs.handleMenu.style.left = event.offsetX - 0 + 65 + 'px'
|
|
355
356
|
this.$refs.handleMenu.style.right = '5px'
|
|
356
357
|
node.data.noMoreBtn ? this.handleMenuFlag = false : this.handleMenuFlag = true
|
|
357
358
|
|
|
358
359
|
this.checkedData = node
|
|
359
360
|
this.node = node
|
|
360
|
-
|
|
361
|
-
// console.log(node)
|
|
361
|
+
this.$emit('handleContextmenu',data)
|
|
362
362
|
document.addEventListener('click', this.closeDocClickFn)
|
|
363
363
|
},
|
|
364
364
|
|
|
@@ -385,7 +385,7 @@ export default {
|
|
|
385
385
|
filterNode(value, data) {
|
|
386
386
|
if (this.searchType !== 'normal') return
|
|
387
387
|
if (!value) return true;
|
|
388
|
-
return data[this.treeProps.label].indexOf(value) !== -1;
|
|
388
|
+
return data[this.treeProps.label].indexOf(value) !== -1||data[this.treeProps.label]===this.allowShowLabel;
|
|
389
389
|
},
|
|
390
390
|
handleNodeClick(data) {
|
|
391
391
|
this.handleMenuFlag = false
|