sone-ui-component-3.2.4 2.1.11 → 2.1.14
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 +28 -14
- package/lib/sone-ui.common.js.map +1 -1
- package/lib/sone-ui.umd.js +28 -14
- 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 +22 -8
- package/src/index.js +1 -1
package/lib/sone-ui.umd.js
CHANGED
|
@@ -25993,12 +25993,12 @@ src_main.install = function(Vue) {
|
|
|
25993
25993
|
|
|
25994
25994
|
|
|
25995
25995
|
/* harmony default export */ var messageBox = (src_main);
|
|
25996
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b8cbef8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=template&id=
|
|
25997
|
-
var
|
|
25998
|
-
var
|
|
25996
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b8cbef8c-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=template&id=6b64030e&scoped=true&
|
|
25997
|
+
var mainvue_type_template_id_6b64030e_scoped_true_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticStyle:{"height":"100%"}},[(_vm.type === 'normal')?_c('div',{staticClass:"sone-tree"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.show),expression:"show"}],ref:"menu",staticClass:"tree-wrap",style:('width:' + _vm.defaultWidth + 'px')},[_c('div',{staticClass:"sone-tree-title"},[(_vm.treeData.length>1)?_c('el-select',{staticClass:"sone-tree-components-class",on:{"change":_vm.changeTreeData},model:{value:(_vm.checkedTreeData),callback:function ($$v) {_vm.checkedTreeData=$$v},expression:"checkedTreeData"}},_vm._l((_vm.treeData),function(item,index){return _c('el-option',{key:index,attrs:{"label":item.title,"value":item.title}})}),1):_c('span',[_vm._v(_vm._s(_vm.treeData && _vm.treeData[0] && _vm.treeData[0].title))])],1),_c('el-input',{attrs:{"placeholder":_vm.placeholder,"clearable":_vm.clearable},on:{"clear":function($event){return _vm.$emit('clear', '')}},model:{value:(_vm.filterText),callback:function ($$v) {_vm.filterText=$$v},expression:"filterText"}}),_c('div',{staticClass:"sone-tree-wrap"},[_c('el-tree',{ref:"tree",staticClass:"filter-tree",attrs:{"data":_vm.data,"props":_vm.treeProps,"node-key":_vm.nodeKey,"filter-node-method":_vm.filterNode,"empty-text":_vm.emptyText,"highlight-current":_vm.highlightCurrent,"default-expand-all":_vm.defaultExpandAll,"expand-on-click-node":_vm.expandOnClickNode,"default-expanded-keys":_vm.defaultExpandedKeys,"show-checkbox":_vm.showCheckbox,"check-strictly":_vm.checkStrictly,"default-checked-keys":_vm.defaultCheckedKeys,"current-node-key":_vm.currentNodeKey,"indent":_vm.indent,"icon-class":_vm.iconClass,"draggable":_vm.draggable,"allow-drop":_vm.allowDrop,"allow-drag":_vm.allowDrag},on:{"node-click":_vm.handleNodeClick,"node-contextmenu":_vm.handleContextmenu,"check-change":_vm.handleCheckChange,"check":_vm.handleCheck,"current-change":_vm.handleCurrentChange,"node-expand":_vm.handleNodeExpand,"node-collapse":_vm.handleNodeCollapse,"node-drag-start":_vm.handleDragStart,"node-drag-enter":_vm.handleDragEnter,"node-drag-leave":_vm.handleDragLeave,"node-drag-over":_vm.handleDragOver,"node-drag-end":_vm.handleDragEnd,"node-drop":_vm.handleDrop}})],1)],1),_c('div',{ref:"line",staticClass:"show-line",style:(_vm.dragWidth?'cursor:col-resize;':'')},[_c('div',{staticClass:"show-line-box",style:(_vm.showStyle),on:{"click":_vm.onShow}})])]):_c('div',{staticClass:"sone-tree"},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.show),expression:"show"}],ref:"menu",staticClass:"tree-wrap",style:('width:' + _vm.defaultWidth + 'px')},[_c('div',{staticClass:"sone-tree-title"},[_c('span',[_vm._v(_vm._s(_vm.handleTypeTitle))]),(_vm.showTitleButton)?_c('el-popover',{attrs:{"placement":"bottom","width":"100","trigger":"click","popper-class":"sone-components-tree-popover"}},[_c('div',{staticClass:"tree-box"},[_vm._t("handleTitleMenu")],2),_c('el-button',{attrs:{"slot":"reference","type":"text","icon":("iconfont iconfont-single " + (_vm.titleIcon || _vm.handleTypeTitleIcon))},on:{"click":function($event){return _vm.$emit('handleTypeTitle')}},slot:"reference"})],1):_vm._e()],1),_c('el-input',{attrs:{"placeholder":_vm.placeholder,"clearable":_vm.clearable},on:{"clear":function($event){return _vm.$emit('clear', '')}},model:{value:(_vm.filterText),callback:function ($$v) {_vm.filterText=$$v},expression:"filterText"}}),_c('div',{ref:"soneTreeWrap",staticClass:"sone-tree-wrap"},[_c('el-tree',{ref:"tree",staticClass:"filter-tree",attrs:{"data":_vm.handleTypeData,"props":_vm.treeProps,"node-key":_vm.nodeKey,"filter-node-method":_vm.filterNode,"empty-text":_vm.emptyText,"highlight-current":_vm.highlightCurrent,"default-expand-all":_vm.defaultExpandAll,"expand-on-click-node":_vm.expandOnClickNode,"default-expanded-keys":_vm.defaultExpandedKeys,"show-checkbox":_vm.showCheckbox,"check-strictly":_vm.checkStrictly,"default-checked-keys":_vm.defaultCheckedKeys,"current-node-key":_vm.currentNodeKey,"indent":_vm.indent,"icon-class":_vm.iconClass,"draggable":_vm.draggable,"allow-drop":_vm.allowDrop,"allow-drag":_vm.allowDrag},on:{"node-click":_vm.handleNodeClick,"node-contextmenu":_vm.handleContextmenu,"check-change":_vm.handleCheckChange,"check":_vm.handleCheck,"current-change":_vm.handleCurrentChange,"node-expand":_vm.handleNodeExpand,"node-collapse":_vm.handleNodeCollapse,"node-drag-start":_vm.handleDragStart,"node-drag-enter":_vm.handleDragEnter,"node-drag-leave":_vm.handleDragLeave,"node-drag-over":_vm.handleDragOver,"node-drag-end":_vm.handleDragEnd,"node-drop":_vm.handleDrop},scopedSlots:_vm._u([{key:"default",fn:function(scope){return _c('span',{ref:("treeNode-" + (scope.node[_vm.nodeKey])),staticClass:"custom-tree-node",staticStyle:{"display":"flex"}},[_c('span',{staticStyle:{"font-size":"12px"}},[_c('i',{class:("iconfont iconfont-single " + (scope.node.data.iconClass))}),_vm._v(" "+_vm._s(scope.node.label))]),_c('div',[(!scope.node.data.noMoreBtn)?_c('span',{staticClass:"sone-components-tree-more-btn-color"},[_c('el-button',{directives:[{name:"show",rawName:"v-show",value:(_vm.showMoreBtn),expression:"showMoreBtn"}],attrs:{"type":"text","size":"mini","icon":"iconfont iconfont-single icon-more"},on:{"click":function($event){$event.stopPropagation();return _vm.showTreeMenu(scope,$event)}}})],1):_vm._e()])])}}])}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.handleMenuFlag),expression:"handleMenuFlag"}],ref:"handleMenu",staticClass:"sone-tree-components-handleMenu"},[_vm._t("handleMenu",null,{"node":_vm.node})],2)],1)],1),_c('div',{ref:"line",staticClass:"show-line",style:(_vm.dragWidth?'cursor:col-resize;':'')},[_c('div',{staticClass:"show-line-box",style:(_vm.showStyle),on:{"click":_vm.onShow}})])])])}
|
|
25998
|
+
var mainvue_type_template_id_6b64030e_scoped_true_staticRenderFns = []
|
|
25999
25999
|
|
|
26000
26000
|
|
|
26001
|
-
// CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=
|
|
26001
|
+
// CONCATENATED MODULE: ./packages/tree/src/main.vue?vue&type=template&id=6b64030e&scoped=true&
|
|
26002
26002
|
|
|
26003
26003
|
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/main.vue?vue&type=script&lang=js&
|
|
26004
26004
|
//
|
|
@@ -26155,8 +26155,6 @@ var mainvue_type_template_id_54089598_scoped_true_staticRenderFns = []
|
|
|
26155
26155
|
//
|
|
26156
26156
|
//
|
|
26157
26157
|
//
|
|
26158
|
-
//
|
|
26159
|
-
//
|
|
26160
26158
|
|
|
26161
26159
|
// import { deepClone } from '../../../../src/utils/util';
|
|
26162
26160
|
const mainvue_type_script_lang_js_getObjType = obj => {
|
|
@@ -26256,6 +26254,11 @@ const mainvue_type_script_lang_js_deepClone = data => {
|
|
|
26256
26254
|
showMoreBtn:{
|
|
26257
26255
|
type:Boolean,
|
|
26258
26256
|
default:true
|
|
26257
|
+
},
|
|
26258
|
+
menuHeight:{
|
|
26259
|
+
type:Number,
|
|
26260
|
+
default:0,
|
|
26261
|
+
remark:"菜单高度"
|
|
26259
26262
|
}
|
|
26260
26263
|
},
|
|
26261
26264
|
data() {
|
|
@@ -26276,7 +26279,6 @@ const mainvue_type_script_lang_js_deepClone = data => {
|
|
|
26276
26279
|
checkedData:{},
|
|
26277
26280
|
|
|
26278
26281
|
node:{},
|
|
26279
|
-
|
|
26280
26282
|
};
|
|
26281
26283
|
},
|
|
26282
26284
|
watch: {
|
|
@@ -26354,9 +26356,21 @@ const mainvue_type_script_lang_js_deepClone = data => {
|
|
|
26354
26356
|
document.removeEventListener('click',() => {})
|
|
26355
26357
|
},
|
|
26356
26358
|
handleContextmenu(event, data, node, self) {
|
|
26359
|
+
console.log('self.$el.offsetTop---',self.$el.offsetTop );
|
|
26360
|
+
console.log('this.menuHeight---',this.menuHeight );
|
|
26361
|
+
console.log('self.$el.offsetTop + this.menuHeight---',self.$el.offsetTop + this.menuHeight);
|
|
26357
26362
|
if ( this.type != 'handle' ) return
|
|
26358
|
-
this.$refs.
|
|
26359
|
-
|
|
26363
|
+
let soneTreeWrapHeight = this.$refs.soneTreeWrap.clientHeight
|
|
26364
|
+
console.log('soneTreeWrapHeight---',soneTreeWrapHeight);
|
|
26365
|
+
|
|
26366
|
+
//self.offsetTop + menuHeight >父元素高度 用向上展开的样式
|
|
26367
|
+
if(this.menuHeight > 0 && self.$el.offsetTop + this.menuHeight > soneTreeWrapHeight){
|
|
26368
|
+
this.$refs.handleMenu.style.top = self.$el.offsetTop - 0 - this.menuHeight + 'px'
|
|
26369
|
+
this.$refs.handleMenu.style.right = '5px'
|
|
26370
|
+
}else{
|
|
26371
|
+
this.$refs.handleMenu.style.top = self.$el.offsetTop - 0 + 25 + 'px'
|
|
26372
|
+
this.$refs.handleMenu.style.right = '5px'
|
|
26373
|
+
}
|
|
26360
26374
|
node.data.noMoreBtn ? this.handleMenuFlag = false : this.handleMenuFlag = true
|
|
26361
26375
|
|
|
26362
26376
|
this.checkedData = node
|
|
@@ -26390,7 +26404,7 @@ const mainvue_type_script_lang_js_deepClone = data => {
|
|
|
26390
26404
|
if (!value) return true;
|
|
26391
26405
|
return data[this.treeProps.label].indexOf(value) !== -1||data[this.treeProps.label]===this.allowShowLabel;
|
|
26392
26406
|
},
|
|
26393
|
-
handleNodeClick(data) {
|
|
26407
|
+
handleNodeClick(data,node,self) {
|
|
26394
26408
|
this.handleMenuFlag = false
|
|
26395
26409
|
this.$emit("node-click", data);
|
|
26396
26410
|
},
|
|
@@ -26451,11 +26465,11 @@ const mainvue_type_script_lang_js_deepClone = data => {
|
|
|
26451
26465
|
|
|
26452
26466
|
var src_main_component = normalizeComponent(
|
|
26453
26467
|
packages_tree_src_mainvue_type_script_lang_js_,
|
|
26454
|
-
|
|
26455
|
-
|
|
26468
|
+
mainvue_type_template_id_6b64030e_scoped_true_render,
|
|
26469
|
+
mainvue_type_template_id_6b64030e_scoped_true_staticRenderFns,
|
|
26456
26470
|
false,
|
|
26457
26471
|
null,
|
|
26458
|
-
"
|
|
26472
|
+
"6b64030e",
|
|
26459
26473
|
null
|
|
26460
26474
|
|
|
26461
26475
|
)
|
|
@@ -37031,7 +37045,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
37031
37045
|
}
|
|
37032
37046
|
|
|
37033
37047
|
/* harmony default export */ var src_0 = ({
|
|
37034
|
-
version: '2.1.
|
|
37048
|
+
version: '2.1.14',
|
|
37035
37049
|
locale: locale.use,
|
|
37036
37050
|
i18n: locale.i18n,
|
|
37037
37051
|
install,
|