@weitutech/by-components 1.1.105 → 1.1.107
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/by-components.common.js +422 -368
- package/lib/by-components.umd.js +78 -24
- package/lib/by-components.umd.min.js +8 -8
- package/lib/index.css +1 -1
- package/package.json +1 -1
package/lib/by-components.umd.js
CHANGED
|
@@ -2330,7 +2330,7 @@ module.exports = !fails(function () {
|
|
|
2330
2330
|
|
|
2331
2331
|
"use strict";
|
|
2332
2332
|
|
|
2333
|
-
var isPrototypeOf = __webpack_require__(
|
|
2333
|
+
var isPrototypeOf = __webpack_require__(4006);
|
|
2334
2334
|
|
|
2335
2335
|
var $TypeError = TypeError;
|
|
2336
2336
|
|
|
@@ -2532,7 +2532,7 @@ module.exports = Math.trunc || function trunc(x) {
|
|
|
2532
2532
|
|
|
2533
2533
|
var getBuiltIn = __webpack_require__(7751);
|
|
2534
2534
|
var isCallable = __webpack_require__(4901);
|
|
2535
|
-
var isPrototypeOf = __webpack_require__(
|
|
2535
|
+
var isPrototypeOf = __webpack_require__(4006);
|
|
2536
2536
|
var USE_SYMBOL_AS_UID = __webpack_require__(7040);
|
|
2537
2537
|
|
|
2538
2538
|
var $Object = Object;
|
|
@@ -9021,18 +9021,6 @@ module.exports = /******/function (modules) {
|
|
|
9021
9021
|
/******/
|
|
9022
9022
|
});
|
|
9023
9023
|
|
|
9024
|
-
/***/ }),
|
|
9025
|
-
|
|
9026
|
-
/***/ 1625:
|
|
9027
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
9028
|
-
|
|
9029
|
-
"use strict";
|
|
9030
|
-
|
|
9031
|
-
var uncurryThis = __webpack_require__(9504);
|
|
9032
|
-
|
|
9033
|
-
module.exports = uncurryThis({}.isPrototypeOf);
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
9024
|
/***/ }),
|
|
9037
9025
|
|
|
9038
9026
|
/***/ 1631:
|
|
@@ -13004,7 +12992,7 @@ var anObject = __webpack_require__(8551);
|
|
|
13004
12992
|
var tryToString = __webpack_require__(6823);
|
|
13005
12993
|
var isArrayIteratorMethod = __webpack_require__(4209);
|
|
13006
12994
|
var lengthOfArrayLike = __webpack_require__(6198);
|
|
13007
|
-
var isPrototypeOf = __webpack_require__(
|
|
12995
|
+
var isPrototypeOf = __webpack_require__(4006);
|
|
13008
12996
|
var getIterator = __webpack_require__(81);
|
|
13009
12997
|
var getIteratorMethod = __webpack_require__(851);
|
|
13010
12998
|
var iteratorClose = __webpack_require__(9539);
|
|
@@ -27341,6 +27329,18 @@ module.exports = deepmerge_1;
|
|
|
27341
27329
|
return ky;
|
|
27342
27330
|
});
|
|
27343
27331
|
|
|
27332
|
+
/***/ }),
|
|
27333
|
+
|
|
27334
|
+
/***/ 4006:
|
|
27335
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
27336
|
+
|
|
27337
|
+
"use strict";
|
|
27338
|
+
|
|
27339
|
+
var uncurryThis = __webpack_require__(9504);
|
|
27340
|
+
|
|
27341
|
+
module.exports = uncurryThis({}.isPrototypeOf);
|
|
27342
|
+
|
|
27343
|
+
|
|
27344
27344
|
/***/ }),
|
|
27345
27345
|
|
|
27346
27346
|
/***/ 4054:
|
|
@@ -76944,12 +76944,14 @@ var ByTreeSearch_component = normalizeComponent(
|
|
|
76944
76944
|
)
|
|
76945
76945
|
|
|
76946
76946
|
/* harmony default export */ var ByTreeSearch = (ByTreeSearch_component.exports);
|
|
76947
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-dialog/ByDialog.vue?vue&type=template&id=
|
|
76948
|
-
var
|
|
76947
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"ffbc40de-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-dialog/ByDialog.vue?vue&type=template&id=bc06eb78
|
|
76948
|
+
var ByDialogvue_type_template_id_bc06eb78_render = function render() {
|
|
76949
76949
|
var _vm = this,
|
|
76950
76950
|
_c = _vm._self._c;
|
|
76951
76951
|
return _c('el-dialog', _vm._g(_vm._b({
|
|
76952
|
-
class: ['by-dialog',
|
|
76952
|
+
class: ['by-dialog', {
|
|
76953
|
+
'by-dialog--with-header': !!_vm.$slots.header
|
|
76954
|
+
}, _vm.customClass],
|
|
76953
76955
|
attrs: {
|
|
76954
76956
|
"visible": _vm.dialogVisible,
|
|
76955
76957
|
"title": _vm.title
|
|
@@ -76960,8 +76962,13 @@ var ByDialogvue_type_template_id_3da494cf_render = function render() {
|
|
|
76960
76962
|
},
|
|
76961
76963
|
"close": _vm.handleClose
|
|
76962
76964
|
}
|
|
76963
|
-
}, 'el-dialog', _vm.dialogAttrs, false), _vm.$listeners), [_c('div', {
|
|
76964
|
-
staticClass: "by-
|
|
76965
|
+
}, 'el-dialog', _vm.dialogAttrs, false), _vm.$listeners), [_vm.$slots.header ? _c('div', {
|
|
76966
|
+
staticClass: "by-dialog__header"
|
|
76967
|
+
}, [_vm._t("header")], 2) : _vm._e(), _c('div', {
|
|
76968
|
+
class: ['by-dialog__body', {
|
|
76969
|
+
'by-dialog__body--with-header': !!_vm.$slots.header
|
|
76970
|
+
}],
|
|
76971
|
+
style: _vm.bodyStyle
|
|
76965
76972
|
}, [_vm.content ? _c('div', {
|
|
76966
76973
|
staticClass: "by-dialog__content"
|
|
76967
76974
|
}, [_vm._v(_vm._s(_vm.content))]) : _vm._e(), _vm._t("default")], 2), _vm.showFooter ? _c('div', {
|
|
@@ -77010,7 +77017,7 @@ var ByDialogvue_type_template_id_3da494cf_render = function render() {
|
|
|
77010
77017
|
}, [_vm._v(" " + _vm._s(button.text) + " ")])];
|
|
77011
77018
|
})], 2) : _vm._e()]), _vm._t("footer")], 2) : _vm._e()]);
|
|
77012
77019
|
};
|
|
77013
|
-
var
|
|
77020
|
+
var ByDialogvue_type_template_id_bc06eb78_staticRenderFns = [];
|
|
77014
77021
|
|
|
77015
77022
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-dialog/ByDialog.vue?vue&type=script&lang=js
|
|
77016
77023
|
|
|
@@ -77028,6 +77035,21 @@ var ByDialogvue_type_template_id_3da494cf_staticRenderFns = [];
|
|
|
77028
77035
|
type: String,
|
|
77029
77036
|
default: '600px'
|
|
77030
77037
|
},
|
|
77038
|
+
// 大高度时自动收紧与顶部的距离(不影响默认行为)
|
|
77039
|
+
autoAdjustTop: {
|
|
77040
|
+
type: Boolean,
|
|
77041
|
+
default: false
|
|
77042
|
+
},
|
|
77043
|
+
// 内容区固定高度(可选,优先级高于 maxHeight),支持 px/vh/%
|
|
77044
|
+
bodyHeight: {
|
|
77045
|
+
type: [String, Number],
|
|
77046
|
+
default: undefined
|
|
77047
|
+
},
|
|
77048
|
+
// 内容区最大高度(可选),支持 px/vh/%
|
|
77049
|
+
bodyMaxHeight: {
|
|
77050
|
+
type: [String, Number],
|
|
77051
|
+
default: undefined
|
|
77052
|
+
},
|
|
77031
77053
|
// 标题
|
|
77032
77054
|
title: {
|
|
77033
77055
|
type: String,
|
|
@@ -77097,11 +77119,43 @@ var ByDialogvue_type_template_id_3da494cf_staticRenderFns = [];
|
|
|
77097
77119
|
} = this.$attrs;
|
|
77098
77120
|
return {
|
|
77099
77121
|
width: this.width,
|
|
77100
|
-
top:
|
|
77122
|
+
top: this.computedTop,
|
|
77101
77123
|
closeOnClickModal: this.closeOnClickModal,
|
|
77102
77124
|
...attrs
|
|
77103
77125
|
};
|
|
77104
77126
|
},
|
|
77127
|
+
computedTop() {
|
|
77128
|
+
if (!this.autoAdjustTop) return '15vh';
|
|
77129
|
+
const toNumber = val => {
|
|
77130
|
+
if (typeof val === 'number') return val;
|
|
77131
|
+
if (typeof val === 'string') {
|
|
77132
|
+
if (val.endsWith('px')) return parseFloat(val);
|
|
77133
|
+
// 对于百分比和其他单位不做换算,返回 NaN 以忽略
|
|
77134
|
+
return parseFloat(val);
|
|
77135
|
+
}
|
|
77136
|
+
return NaN;
|
|
77137
|
+
};
|
|
77138
|
+
const isLargeByPx = px => !isNaN(px) && px >= 600;
|
|
77139
|
+
const isLargeByVh = val => typeof val === 'string' && val.includes('vh') && parseFloat(val) >= 70;
|
|
77140
|
+
const heightPx = toNumber(this.bodyHeight);
|
|
77141
|
+
const maxHeightVal = this.bodyMaxHeight;
|
|
77142
|
+
const largeHeight = isLargeByPx(heightPx) || isLargeByVh(this.bodyHeight);
|
|
77143
|
+
const largeMaxHeight = isLargeByVh(maxHeightVal) || isLargeByPx(toNumber(maxHeightVal));
|
|
77144
|
+
if (largeHeight || largeMaxHeight) {
|
|
77145
|
+
return '8vh';
|
|
77146
|
+
}
|
|
77147
|
+
return '15vh';
|
|
77148
|
+
},
|
|
77149
|
+
bodyStyle() {
|
|
77150
|
+
const style = {};
|
|
77151
|
+
if (this.bodyHeight !== undefined && this.bodyHeight !== '') {
|
|
77152
|
+
style.height = typeof this.bodyHeight === 'number' ? `${this.bodyHeight}px` : this.bodyHeight;
|
|
77153
|
+
}
|
|
77154
|
+
if (this.bodyMaxHeight !== undefined && this.bodyMaxHeight !== '') {
|
|
77155
|
+
style.maxHeight = typeof this.bodyMaxHeight === 'number' ? `${this.bodyMaxHeight}px` : this.bodyMaxHeight;
|
|
77156
|
+
}
|
|
77157
|
+
return style;
|
|
77158
|
+
},
|
|
77105
77159
|
// 左侧按钮
|
|
77106
77160
|
leftButtons() {
|
|
77107
77161
|
return this.buttons.filter(button => button.position === 'left');
|
|
@@ -77159,8 +77213,8 @@ var ByDialogvue_type_template_id_3da494cf_staticRenderFns = [];
|
|
|
77159
77213
|
;
|
|
77160
77214
|
var ByDialog_component = normalizeComponent(
|
|
77161
77215
|
by_dialog_ByDialogvue_type_script_lang_js,
|
|
77162
|
-
|
|
77163
|
-
|
|
77216
|
+
ByDialogvue_type_template_id_bc06eb78_render,
|
|
77217
|
+
ByDialogvue_type_template_id_bc06eb78_staticRenderFns,
|
|
77164
77218
|
false,
|
|
77165
77219
|
null,
|
|
77166
77220
|
null,
|