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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sone-ui-component-3.2.4",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "private": false,
5
5
  "main": "lib/sone-ui.common.js",
6
6
  "files": [
@@ -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" @click="handldMore(scope.node)">
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
- // console.log(self.$el.offsetTop - 0 + 95 + 'px')
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
package/src/index.js CHANGED
@@ -55,7 +55,7 @@ if (typeof window !== 'undefined' && window.Vue) {
55
55
  }
56
56
 
57
57
  export default {
58
- version: '2.1.7',
58
+ version: '2.1.9',
59
59
  locale: locale.use,
60
60
  i18n: locale.i18n,
61
61
  install,