sone-ui-component-3.2.4 2.1.10 → 2.1.13

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.10",
3
+ "version": "2.1.13",
4
4
  "private": false,
5
5
  "main": "lib/sone-ui.common.js",
6
6
  "files": [
@@ -2,8 +2,8 @@
2
2
  * @Description:
3
3
  * @Author: xjl
4
4
  * @Date: 2021-09-08
5
- * @LastEditTime: 2024-07-02 16:57:23
6
- * @LastEditors: zzy
5
+ * @LastEditTime: 2024-07-24 10:25:51
6
+ * @LastEditors: Please set LastEditors
7
7
  -->
8
8
  <template>
9
9
  <div style="position: relative" class="sone-dialog">
@@ -29,12 +29,12 @@
29
29
  <div v-if="showDialogFullScreen" class="dialog-full-screen-btn">
30
30
  <template v-if="dialogFullScreenState">
31
31
  <el-tooltip effect="light" content="退出全屏" placement="top">
32
- <el-button type="text" icon="iconfont icon-fullscreen-exit" @click.stop="dialogFullScreenState = false"></el-button>
32
+ <el-button type="text" icon="iconfont icon-fullscreen-exit" @click.stop="exitFullScreen"></el-button>
33
33
  </el-tooltip>
34
34
  </template>
35
35
  <template v-else>
36
36
  <el-tooltip effect="light" content="全屏" placement="top">
37
- <el-button type="text" icon="iconfont icon-fullscreen" @click.stop="dialogFullScreenState = true"></el-button>
37
+ <el-button type="text" icon="iconfont icon-fullscreen" @click.stop="fullScreen"></el-button>
38
38
  </el-tooltip>
39
39
  </template>
40
40
  </div>
@@ -162,6 +162,14 @@ export default {
162
162
  this.timer = null;
163
163
  }, 800)
164
164
  this.$emit("confirm");
165
+ },
166
+ fullScreen(){
167
+ this.dialogFullScreenState = true
168
+ this.$emit('fullScreen',this.dialogFullScreenState)
169
+ },
170
+ exitFullScreen(){
171
+ this.dialogFullScreenState = false
172
+ this.$emit('exitFullScreen',this.dialogFullScreenState)
165
173
  }
166
174
  }
167
175
  };
@@ -85,7 +85,7 @@
85
85
  </el-popover>
86
86
  </div>
87
87
  <el-input :placeholder="placeholder" v-model="filterText" :clearable="clearable" @clear="$emit('clear', '')"></el-input>
88
- <div class="sone-tree-wrap">
88
+ <div class="sone-tree-wrap" ref="soneTreeWrap">
89
89
  <el-tree
90
90
  class="filter-tree"
91
91
  :data="handleTypeData"
@@ -137,12 +137,10 @@
137
137
  </span>
138
138
  </el-tree>
139
139
 
140
- <!-- 操作菜单 -->
141
- <!-- <div class="sone-tree-components-handleMenu-wrap"> -->
140
+ <!-- 操作菜单 -->
142
141
  <div class="sone-tree-components-handleMenu" ref="handleMenu" v-show="handleMenuFlag" >
143
142
  <slot name="handleMenu" :node="node" ></slot>
144
143
  </div>
145
- <!-- </div> -->
146
144
  </div>
147
145
 
148
146
 
@@ -253,6 +251,11 @@ export default {
253
251
  showMoreBtn:{
254
252
  type:Boolean,
255
253
  default:true
254
+ },
255
+ menuHeight:{
256
+ type:Number,
257
+ default:0,
258
+ remark:"菜单高度"
256
259
  }
257
260
  },
258
261
  data() {
@@ -273,7 +276,6 @@ export default {
273
276
  checkedData:{},
274
277
 
275
278
  node:{},
276
-
277
279
  };
278
280
  },
279
281
  watch: {
@@ -352,8 +354,15 @@ export default {
352
354
  },
353
355
  handleContextmenu(event, data, node, self) {
354
356
  if ( this.type != 'handle' ) return
355
- this.$refs.handleMenu.style.top = self.$el.offsetTop - 0 + 25 + 'px'
356
- this.$refs.handleMenu.style.right = '5px'
357
+ let soneTreeWrapHeight = this.$refs.soneTreeWrap.clientHeight
358
+ //self.offsetTop + menuHeight >父元素高度 用向上展开的样式
359
+ if(this.menuHeight > 0 && self.$el.offsetTop + this.menuHeight > soneTreeWrapHeight){
360
+ this.$refs.handleMenu.style.top = self.$el.offsetTop - 0 - this.menuHeight + 'px'
361
+ this.$refs.handleMenu.style.right = '5px'
362
+ }else{
363
+ this.$refs.handleMenu.style.top = self.$el.offsetTop - 0 + 25 + 'px'
364
+ this.$refs.handleMenu.style.right = '5px'
365
+ }
357
366
  node.data.noMoreBtn ? this.handleMenuFlag = false : this.handleMenuFlag = true
358
367
 
359
368
  this.checkedData = node
@@ -387,7 +396,7 @@ export default {
387
396
  if (!value) return true;
388
397
  return data[this.treeProps.label].indexOf(value) !== -1||data[this.treeProps.label]===this.allowShowLabel;
389
398
  },
390
- handleNodeClick(data) {
399
+ handleNodeClick(data,node,self) {
391
400
  this.handleMenuFlag = false
392
401
  this.$emit("node-click", data);
393
402
  },
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.10',
58
+ version: '2.1.13',
59
59
  locale: locale.use,
60
60
  i18n: locale.i18n,
61
61
  install,