vxe-pc-ui 4.11.41 → 4.11.43
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/es/backtop/src/backtop.js +67 -26
- package/es/backtop/style.css +31 -49
- package/es/backtop/style.min.css +1 -1
- package/es/button/src/button.js +7 -2
- package/es/button/style.css +3 -0
- package/es/button/style.min.css +1 -1
- package/es/icon/{iconfont.1768022847278.ttf → iconfont.1768192734102.ttf} +0 -0
- package/es/icon/iconfont.1768192734102.woff +0 -0
- package/es/icon/iconfont.1768192734102.woff2 +0 -0
- package/es/icon/style.css +5 -1
- package/es/icon/style.min.css +1 -1
- package/{lib/icon/style/iconfont.1768022847278.ttf → es/iconfont.1768192734102.ttf} +0 -0
- package/es/iconfont.1768192734102.woff +0 -0
- package/es/iconfont.1768192734102.woff2 +0 -0
- package/es/layout-body/src/layout-body.js +13 -5
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/ui/index.js +9 -2
- package/es/ui/src/log.js +1 -1
- package/es/vxe-backtop/style.css +31 -49
- package/es/vxe-backtop/style.min.css +1 -1
- package/es/vxe-button/style.css +3 -0
- package/es/vxe-button/style.min.css +1 -1
- package/es/vxe-icon/style.css +5 -1
- package/es/vxe-icon/style.min.css +1 -1
- package/lib/backtop/src/backtop.js +68 -19
- package/lib/backtop/src/backtop.min.js +1 -1
- package/lib/backtop/style/style.css +31 -49
- package/lib/backtop/style/style.min.css +1 -1
- package/lib/button/src/button.js +7 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/button/style/style.css +3 -0
- package/lib/button/style/style.min.css +1 -1
- package/lib/{iconfont.1768022847278.ttf → icon/style/iconfont.1768192734102.ttf} +0 -0
- package/lib/icon/style/iconfont.1768192734102.woff +0 -0
- package/lib/icon/style/iconfont.1768192734102.woff2 +0 -0
- package/lib/icon/style/style.css +5 -1
- package/lib/icon/style/style.min.css +5 -1
- package/{es/iconfont.1768022847278.ttf → lib/iconfont.1768192734102.ttf} +0 -0
- package/lib/iconfont.1768192734102.woff +0 -0
- package/lib/iconfont.1768192734102.woff2 +0 -0
- package/lib/index.umd.js +1814 -1742
- package/lib/index.umd.min.js +1 -1
- package/lib/layout-body/src/layout-body.js +13 -3
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/ui/index.js +9 -2
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-backtop/style/style.css +31 -49
- package/lib/vxe-backtop/style/style.min.css +1 -1
- package/lib/vxe-button/style/style.css +3 -0
- package/lib/vxe-button/style/style.min.css +1 -1
- package/lib/vxe-icon/style/style.css +5 -1
- package/lib/vxe-icon/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/backtop/src/backtop.ts +67 -26
- package/packages/button/src/button.ts +7 -2
- package/packages/layout-body/src/layout-body.ts +17 -5
- package/packages/ui/index.ts +8 -1
- package/styles/components/backtop.scss +41 -69
- package/styles/components/button.scss +3 -0
- package/styles/components/icon.scss +5 -1
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/base.scss +4 -0
- package/types/components/backtop.d.ts +11 -0
- package/types/components/button.d.ts +5 -3
- package/types/components/icon.d.ts +1 -1
- package/types/components/layout-body.d.ts +9 -2
- package/es/icon/iconfont.1768022847278.woff +0 -0
- package/es/icon/iconfont.1768022847278.woff2 +0 -0
- package/es/iconfont.1768022847278.woff +0 -0
- package/es/iconfont.1768022847278.woff2 +0 -0
- package/lib/icon/style/iconfont.1768022847278.woff +0 -0
- package/lib/icon/style/iconfont.1768022847278.woff2 +0 -0
- package/lib/iconfont.1768022847278.woff +0 -0
- package/lib/iconfont.1768022847278.woff2 +0 -0
package/lib/index.umd.js
CHANGED
|
@@ -3661,14 +3661,14 @@ function checkDynamic() {
|
|
|
3661
3661
|
}
|
|
3662
3662
|
;// CONCATENATED MODULE: ./packages/ui/src/log.ts
|
|
3663
3663
|
|
|
3664
|
-
const log_version = `ui v${"4.11.
|
|
3664
|
+
const log_version = `ui v${"4.11.43"}`;
|
|
3665
3665
|
const warnLog = log.create('warn', log_version);
|
|
3666
3666
|
const errLog = log.create('error', log_version);
|
|
3667
3667
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
3668
3668
|
|
|
3669
3669
|
|
|
3670
3670
|
|
|
3671
|
-
const ui_version = "4.11.
|
|
3671
|
+
const ui_version = "4.11.43";
|
|
3672
3672
|
index_esm_VxeUI.uiVersion = ui_version;
|
|
3673
3673
|
index_esm_VxeUI.dynamicApp = dynamicApp;
|
|
3674
3674
|
function config(options) {
|
|
@@ -3689,6 +3689,9 @@ setConfig({
|
|
|
3689
3689
|
backtop: {
|
|
3690
3690
|
showIcon: true,
|
|
3691
3691
|
showContent: true,
|
|
3692
|
+
showTop: true,
|
|
3693
|
+
showBottom: true,
|
|
3694
|
+
shadow: true,
|
|
3692
3695
|
threshold: 20
|
|
3693
3696
|
},
|
|
3694
3697
|
badge: {},
|
|
@@ -3859,7 +3862,11 @@ setConfig({
|
|
|
3859
3862
|
controls: true
|
|
3860
3863
|
},
|
|
3861
3864
|
layoutAside: {},
|
|
3862
|
-
layoutBody: {
|
|
3865
|
+
layoutBody: {
|
|
3866
|
+
backtopConfig: {
|
|
3867
|
+
position: 'fixed'
|
|
3868
|
+
}
|
|
3869
|
+
},
|
|
3863
3870
|
layoutContainer: {},
|
|
3864
3871
|
layoutFooter: {},
|
|
3865
3872
|
layoutHeader: {},
|
|
@@ -6057,594 +6064,646 @@ dynamicApp.use(VxeAvatar);
|
|
|
6057
6064
|
index_esm_VxeUI.component(avatar);
|
|
6058
6065
|
const Avatar = VxeAvatar;
|
|
6059
6066
|
/* harmony default export */ var packages_avatar = (VxeAvatar);
|
|
6060
|
-
;// CONCATENATED MODULE: ./packages/
|
|
6067
|
+
;// CONCATENATED MODULE: ./packages/ui/src/utils.ts
|
|
6068
|
+
|
|
6069
|
+
|
|
6070
|
+
|
|
6071
|
+
function isEnableConf(conf) {
|
|
6072
|
+
return conf && conf.enabled !== false;
|
|
6073
|
+
}
|
|
6074
|
+
function nextZIndex() {
|
|
6075
|
+
return index_esm.getNext();
|
|
6076
|
+
}
|
|
6077
|
+
function getLastZIndex() {
|
|
6078
|
+
return index_esm.getCurrent();
|
|
6079
|
+
}
|
|
6080
|
+
function nextSubZIndex() {
|
|
6081
|
+
return index_esm.getSubNext();
|
|
6082
|
+
}
|
|
6083
|
+
function getSubLastZIndex() {
|
|
6084
|
+
return index_esm.getSubCurrent();
|
|
6085
|
+
}
|
|
6086
|
+
function getGlobalDefaultConfig(value, globalValue) {
|
|
6087
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(value)) {
|
|
6088
|
+
return globalValue;
|
|
6089
|
+
}
|
|
6090
|
+
return value;
|
|
6091
|
+
}
|
|
6092
|
+
function getFuncText(content, args) {
|
|
6093
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(content)) {
|
|
6094
|
+
return '';
|
|
6095
|
+
}
|
|
6096
|
+
const translate = getConfig().translate;
|
|
6097
|
+
return `${translate ? translate('' + content, args) : content}`;
|
|
6098
|
+
}
|
|
6099
|
+
/**
|
|
6100
|
+
* 判断值为:'' | null | undefined 时都属于空值
|
|
6101
|
+
*/
|
|
6102
|
+
function eqEmptyValue(cellValue) {
|
|
6103
|
+
return cellValue === null || cellValue === undefined || cellValue === '';
|
|
6104
|
+
}
|
|
6105
|
+
function handleBooleanDefaultValue(value) {
|
|
6106
|
+
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(value) ? value : null;
|
|
6107
|
+
}
|
|
6108
|
+
;// CONCATENATED MODULE: ./packages/tooltip/src/tooltip.ts
|
|
6061
6109
|
|
|
6062
6110
|
|
|
6063
6111
|
|
|
6064
6112
|
|
|
6065
6113
|
|
|
6066
6114
|
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
}
|
|
6072
|
-
function createReactData() {
|
|
6073
|
-
return {
|
|
6074
|
-
showBtn: false
|
|
6075
|
-
};
|
|
6076
|
-
}
|
|
6077
|
-
/* harmony default export */ var backtop = (defineVxeComponent({
|
|
6078
|
-
name: 'VxeBacktop',
|
|
6115
|
+
|
|
6116
|
+
|
|
6117
|
+
/* harmony default export */ var tooltip = (defineVxeComponent({
|
|
6118
|
+
name: 'VxeTooltip',
|
|
6079
6119
|
props: {
|
|
6080
|
-
|
|
6120
|
+
modelValue: Boolean,
|
|
6081
6121
|
size: {
|
|
6082
6122
|
type: String,
|
|
6083
|
-
default: () => getConfig().
|
|
6123
|
+
default: () => getConfig().tooltip.size || getConfig().size
|
|
6084
6124
|
},
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6125
|
+
selector: String,
|
|
6126
|
+
trigger: {
|
|
6127
|
+
type: String,
|
|
6128
|
+
default: () => getConfig().tooltip.trigger || 'hover'
|
|
6088
6129
|
},
|
|
6089
|
-
|
|
6130
|
+
theme: {
|
|
6131
|
+
type: String,
|
|
6132
|
+
default: () => getConfig().tooltip.theme || 'dark'
|
|
6133
|
+
},
|
|
6134
|
+
content: {
|
|
6090
6135
|
type: [String, Number],
|
|
6091
|
-
default:
|
|
6136
|
+
default: null
|
|
6092
6137
|
},
|
|
6093
|
-
|
|
6138
|
+
useHTML: Boolean,
|
|
6139
|
+
zIndex: [String, Number],
|
|
6140
|
+
popupClassName: [String, Function],
|
|
6141
|
+
width: {
|
|
6094
6142
|
type: [String, Number],
|
|
6095
|
-
default: () => getConfig().
|
|
6143
|
+
default: () => getConfig().tooltip.Width
|
|
6096
6144
|
},
|
|
6097
|
-
|
|
6145
|
+
height: {
|
|
6098
6146
|
type: [String, Number],
|
|
6099
|
-
default: () => getConfig().
|
|
6147
|
+
default: () => getConfig().tooltip.height
|
|
6100
6148
|
},
|
|
6101
|
-
|
|
6102
|
-
type: String,
|
|
6103
|
-
default: () => getConfig().
|
|
6149
|
+
minWidth: {
|
|
6150
|
+
type: [String, Number],
|
|
6151
|
+
default: () => getConfig().tooltip.minWidth
|
|
6104
6152
|
},
|
|
6105
|
-
|
|
6106
|
-
type:
|
|
6107
|
-
default: () => getConfig().
|
|
6153
|
+
minHeight: {
|
|
6154
|
+
type: [String, Number],
|
|
6155
|
+
default: () => getConfig().tooltip.minHeight
|
|
6108
6156
|
},
|
|
6109
|
-
|
|
6157
|
+
maxWidth: {
|
|
6110
6158
|
type: [String, Number],
|
|
6111
|
-
default: () => getConfig().
|
|
6159
|
+
default: () => getConfig().tooltip.maxWidth
|
|
6112
6160
|
},
|
|
6113
|
-
|
|
6161
|
+
maxHeight: {
|
|
6162
|
+
type: [String, Number],
|
|
6163
|
+
default: () => getConfig().tooltip.maxHeight
|
|
6164
|
+
},
|
|
6165
|
+
isArrow: {
|
|
6114
6166
|
type: Boolean,
|
|
6115
|
-
default: () => getConfig().
|
|
6167
|
+
default: () => getConfig().tooltip.isArrow
|
|
6116
6168
|
},
|
|
6117
|
-
|
|
6118
|
-
type:
|
|
6119
|
-
default: () => getConfig().
|
|
6169
|
+
enterable: {
|
|
6170
|
+
type: Boolean,
|
|
6171
|
+
default: () => getConfig().tooltip.enterable
|
|
6120
6172
|
},
|
|
6121
|
-
|
|
6122
|
-
type:
|
|
6123
|
-
default: () => getConfig().
|
|
6173
|
+
enterDelay: {
|
|
6174
|
+
type: Number,
|
|
6175
|
+
default: () => getConfig().tooltip.enterDelay
|
|
6124
6176
|
},
|
|
6125
|
-
|
|
6126
|
-
type:
|
|
6127
|
-
default: () => getConfig().
|
|
6177
|
+
leaveDelay: {
|
|
6178
|
+
type: Number,
|
|
6179
|
+
default: () => getConfig().tooltip.leaveDelay
|
|
6128
6180
|
}
|
|
6129
6181
|
},
|
|
6130
|
-
emits: ['
|
|
6182
|
+
emits: ['update:modelValue'],
|
|
6131
6183
|
setup(props, context) {
|
|
6132
6184
|
const {
|
|
6133
6185
|
slots,
|
|
6134
6186
|
emit
|
|
6135
6187
|
} = context;
|
|
6136
6188
|
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
6137
|
-
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6138
6189
|
const {
|
|
6139
6190
|
computeSize
|
|
6140
6191
|
} = useSize(props);
|
|
6141
|
-
const
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6192
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
6193
|
+
target: null,
|
|
6194
|
+
isUpdate: false,
|
|
6195
|
+
visible: false,
|
|
6196
|
+
tipPos: null,
|
|
6197
|
+
tipContent: '',
|
|
6198
|
+
tipActive: false,
|
|
6199
|
+
tipTarget: null,
|
|
6200
|
+
tipZindex: 0,
|
|
6201
|
+
tipStore: {
|
|
6202
|
+
style: {},
|
|
6203
|
+
placement: '',
|
|
6204
|
+
arrowStyle: {}
|
|
6205
|
+
}
|
|
6206
|
+
});
|
|
6207
|
+
const internalData = {};
|
|
6208
|
+
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6209
|
+
const contentWrapperfElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6146
6210
|
const computeWrapperStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6147
6211
|
const {
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6212
|
+
width,
|
|
6213
|
+
height,
|
|
6214
|
+
minHeight,
|
|
6215
|
+
minWidth,
|
|
6216
|
+
maxHeight,
|
|
6217
|
+
maxWidth
|
|
6151
6218
|
} = props;
|
|
6152
6219
|
const stys = {};
|
|
6153
|
-
if (
|
|
6154
|
-
stys.
|
|
6220
|
+
if (width) {
|
|
6221
|
+
stys.width = toCssUnit(width);
|
|
6155
6222
|
}
|
|
6156
|
-
if (
|
|
6157
|
-
stys.
|
|
6223
|
+
if (height) {
|
|
6224
|
+
stys.height = toCssUnit(height);
|
|
6158
6225
|
}
|
|
6159
|
-
if (
|
|
6160
|
-
stys.
|
|
6226
|
+
if (minWidth) {
|
|
6227
|
+
stys.minWidth = toCssUnit(minWidth);
|
|
6228
|
+
}
|
|
6229
|
+
if (minHeight) {
|
|
6230
|
+
stys.minHeight = toCssUnit(minHeight);
|
|
6231
|
+
}
|
|
6232
|
+
if (maxWidth) {
|
|
6233
|
+
stys.maxWidth = toCssUnit(maxWidth);
|
|
6234
|
+
}
|
|
6235
|
+
if (maxHeight) {
|
|
6236
|
+
stys.maxHeight = toCssUnit(maxHeight);
|
|
6161
6237
|
}
|
|
6162
6238
|
return stys;
|
|
6163
6239
|
});
|
|
6164
|
-
const
|
|
6165
|
-
|
|
6240
|
+
const refMaps = {
|
|
6241
|
+
refElem
|
|
6242
|
+
};
|
|
6243
|
+
const $xeTooltip = {
|
|
6166
6244
|
xID,
|
|
6167
6245
|
props,
|
|
6168
6246
|
context,
|
|
6169
|
-
internalData,
|
|
6170
6247
|
reactData,
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
};
|
|
6174
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
6175
|
-
emit(type, createEvent(evnt, {
|
|
6176
|
-
$backtop: $xeBacktop
|
|
6177
|
-
}, params));
|
|
6248
|
+
internalData,
|
|
6249
|
+
getRefMaps: () => refMaps
|
|
6178
6250
|
};
|
|
6179
|
-
|
|
6251
|
+
let tooltipMethods = {};
|
|
6252
|
+
const updateTipStyle = () => {
|
|
6180
6253
|
const {
|
|
6181
|
-
|
|
6254
|
+
isArrow
|
|
6182
6255
|
} = props;
|
|
6183
|
-
const currentEl = evnt.currentTarget;
|
|
6184
|
-
const scrollTop = currentEl.scrollTop;
|
|
6185
|
-
reactData.showBtn = scrollTop > Math.max(1, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(threshold));
|
|
6186
|
-
};
|
|
6187
|
-
const handleToTop = () => {
|
|
6188
|
-
const {
|
|
6189
|
-
targetEl
|
|
6190
|
-
} = internalData;
|
|
6191
|
-
if (!targetEl) {
|
|
6192
|
-
return;
|
|
6193
|
-
}
|
|
6194
|
-
const scrollTop = targetEl.scrollTop;
|
|
6195
|
-
if (scrollTop > 0) {
|
|
6196
|
-
requestAnimationFrame(handleToTop);
|
|
6197
|
-
const currScrollTop = scrollTop - Math.max(12, scrollTop / 6);
|
|
6198
|
-
targetEl.scrollTop = currScrollTop > 10 ? currScrollTop : 0;
|
|
6199
|
-
}
|
|
6200
|
-
};
|
|
6201
|
-
const removeScrollEvent = () => {
|
|
6202
|
-
const {
|
|
6203
|
-
targetEl
|
|
6204
|
-
} = internalData;
|
|
6205
|
-
if (targetEl) {
|
|
6206
|
-
targetEl.removeEventListener('scroll', handleScrollEvent);
|
|
6207
|
-
}
|
|
6208
|
-
};
|
|
6209
|
-
const addScrollEvent = () => {
|
|
6210
6256
|
const {
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
(
|
|
6221
|
-
const
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6257
|
+
tipTarget: targetElem,
|
|
6258
|
+
tipStore,
|
|
6259
|
+
tipPos
|
|
6260
|
+
} = reactData;
|
|
6261
|
+
let top = '';
|
|
6262
|
+
let left = '';
|
|
6263
|
+
let panelPlacement = 'bottom';
|
|
6264
|
+
let arrowLeft = '';
|
|
6265
|
+
const panelElem = refElem.value;
|
|
6266
|
+
if (panelElem && targetElem) {
|
|
6267
|
+
const documentElement = document.documentElement;
|
|
6268
|
+
const bodyElem = document.body;
|
|
6269
|
+
const targetWidth = targetElem.offsetWidth;
|
|
6270
|
+
const targetHeight = targetElem.offsetHeight;
|
|
6271
|
+
const panelHeight = panelElem.offsetHeight;
|
|
6272
|
+
const panelWidth = panelElem.offsetWidth;
|
|
6273
|
+
const targetRect = targetElem.getBoundingClientRect();
|
|
6274
|
+
const visibleHeight = documentElement.clientHeight || bodyElem.clientHeight;
|
|
6275
|
+
const visibleWidth = documentElement.clientWidth || bodyElem.clientWidth;
|
|
6276
|
+
const marginSize = 6;
|
|
6277
|
+
top = targetRect.top + targetHeight;
|
|
6278
|
+
left = targetRect.left;
|
|
6279
|
+
if (tipPos && tipPos.x && tipPos.y) {
|
|
6280
|
+
if (isArrow) {
|
|
6281
|
+
left = left + Math.max(8, Math.min(targetWidth - 8, tipPos.oLeft)) - panelWidth / 2;
|
|
6282
|
+
} else {
|
|
6283
|
+
left = tipPos.x + 1;
|
|
6284
|
+
top = tipPos.y + 1;
|
|
6233
6285
|
}
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6286
|
+
} else {
|
|
6287
|
+
left = targetRect.left + (targetWidth - panelWidth) / 2;
|
|
6288
|
+
}
|
|
6289
|
+
// 如果下面不够放,则向上
|
|
6290
|
+
if (top + panelHeight + marginSize > visibleHeight) {
|
|
6291
|
+
panelPlacement = 'top';
|
|
6292
|
+
top = targetRect.top - panelHeight;
|
|
6293
|
+
}
|
|
6294
|
+
// 如果上面不够放,则向下(优先)
|
|
6295
|
+
if (top < marginSize) {
|
|
6296
|
+
panelPlacement = 'bottom';
|
|
6297
|
+
top = targetRect.top + targetHeight;
|
|
6298
|
+
}
|
|
6299
|
+
// 如果溢出右边
|
|
6300
|
+
if (left + panelWidth + marginSize > visibleWidth) {
|
|
6301
|
+
left -= left + panelWidth + marginSize - visibleWidth;
|
|
6302
|
+
}
|
|
6303
|
+
// 如果溢出左边
|
|
6304
|
+
if (left < marginSize) {
|
|
6305
|
+
left = marginSize;
|
|
6306
|
+
}
|
|
6307
|
+
// 箭头
|
|
6308
|
+
if (left === targetRect.left) {
|
|
6309
|
+
if (targetWidth <= panelWidth) {
|
|
6310
|
+
arrowLeft = targetWidth / 2;
|
|
6311
|
+
}
|
|
6312
|
+
} else if (left < targetRect.left) {
|
|
6313
|
+
if (left + panelWidth > targetRect.left + targetWidth) {
|
|
6314
|
+
arrowLeft = targetRect.left - left + targetWidth / 2;
|
|
6315
|
+
} else {
|
|
6316
|
+
arrowLeft = targetRect.left - left + (panelWidth - (targetRect.left - left)) / 2;
|
|
6241
6317
|
}
|
|
6242
6318
|
}
|
|
6243
|
-
|
|
6319
|
+
tipStore.placement = panelPlacement;
|
|
6320
|
+
tipStore.style.top = `${top}px`;
|
|
6321
|
+
tipStore.style.left = `${left}px`;
|
|
6322
|
+
tipStore.arrowStyle.left = `${arrowLeft}px`;
|
|
6323
|
+
}
|
|
6244
6324
|
};
|
|
6245
|
-
const
|
|
6246
|
-
|
|
6247
|
-
|
|
6325
|
+
const updateValue = value => {
|
|
6326
|
+
if (value !== reactData.visible) {
|
|
6327
|
+
reactData.visible = value;
|
|
6328
|
+
reactData.isUpdate = true;
|
|
6329
|
+
emit('update:modelValue', value);
|
|
6330
|
+
}
|
|
6248
6331
|
};
|
|
6249
|
-
const
|
|
6250
|
-
|
|
6332
|
+
const updateZindex = () => {
|
|
6333
|
+
if (reactData.tipZindex < getLastZIndex()) {
|
|
6334
|
+
reactData.tipZindex = nextZIndex();
|
|
6335
|
+
}
|
|
6251
6336
|
};
|
|
6252
|
-
const
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
status,
|
|
6259
|
-
icon,
|
|
6260
|
-
showIcon,
|
|
6261
|
-
content,
|
|
6262
|
-
showContent
|
|
6263
|
-
} = props;
|
|
6264
|
-
const {
|
|
6265
|
-
showBtn
|
|
6266
|
-
} = reactData;
|
|
6267
|
-
const wrapperStyle = computeWrapperStyle.value;
|
|
6268
|
-
const vSize = computeSize.value;
|
|
6269
|
-
const defaultSlot = slots.default;
|
|
6270
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6271
|
-
ref: refElem,
|
|
6272
|
-
class: ['vxe-backtop', position === 'fixed' ? 'is--' + position : 'is--absolute', {
|
|
6273
|
-
[`size--${vSize}`]: vSize,
|
|
6274
|
-
[`theme--${status}`]: status,
|
|
6275
|
-
'is--circle': circle,
|
|
6276
|
-
'is--visible': showBtn
|
|
6277
|
-
}],
|
|
6278
|
-
style: wrapperStyle,
|
|
6279
|
-
onClick: clickEvent
|
|
6280
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6281
|
-
class: 'vxe-backtop--inner'
|
|
6282
|
-
}, [defaultSlot ? defaultSlot({}) : [showIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6283
|
-
class: 'vxe-backtop--icon'
|
|
6284
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
6285
|
-
class: icon || getIcon().BACKTOP_TOP
|
|
6286
|
-
})]) : renderEmptyElement($xeBacktop), showContent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6287
|
-
class: 'vxe-backtop--content'
|
|
6288
|
-
}, `${content || ''}`) : renderEmptyElement($xeBacktop)]])]);
|
|
6337
|
+
const clickEvent = () => {
|
|
6338
|
+
if (reactData.visible) {
|
|
6339
|
+
tooltipMethods.close();
|
|
6340
|
+
} else {
|
|
6341
|
+
handleVisible(reactData.target || getSelectorEl(), props.content);
|
|
6342
|
+
}
|
|
6289
6343
|
};
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
});
|
|
6293
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
6294
|
-
handleTargetElement();
|
|
6295
|
-
});
|
|
6296
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
6297
|
-
removeScrollEvent();
|
|
6298
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, createReactData());
|
|
6299
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, createInternalData());
|
|
6300
|
-
});
|
|
6301
|
-
$xeBacktop.renderVN = renderVN;
|
|
6302
|
-
return $xeBacktop;
|
|
6303
|
-
},
|
|
6304
|
-
render() {
|
|
6305
|
-
return this.renderVN();
|
|
6306
|
-
}
|
|
6307
|
-
}));
|
|
6308
|
-
;// CONCATENATED MODULE: ./packages/backtop/index.ts
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
const VxeBacktop = Object.assign({}, backtop, {
|
|
6313
|
-
install(app) {
|
|
6314
|
-
app.component(backtop.name, backtop);
|
|
6315
|
-
}
|
|
6316
|
-
});
|
|
6317
|
-
dynamicApp.use(VxeBacktop);
|
|
6318
|
-
index_esm_VxeUI.component(backtop);
|
|
6319
|
-
const Backtop = VxeBacktop;
|
|
6320
|
-
/* harmony default export */ var packages_backtop = (VxeBacktop);
|
|
6321
|
-
;// CONCATENATED MODULE: ./packages/badge/src/badge.ts
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
/* harmony default export */ var badge = (defineVxeComponent({
|
|
6327
|
-
name: 'VxeBadge',
|
|
6328
|
-
props: {
|
|
6329
|
-
count: [String, Number],
|
|
6330
|
-
dot: Boolean,
|
|
6331
|
-
content: [String, Number],
|
|
6332
|
-
size: {
|
|
6333
|
-
type: String,
|
|
6334
|
-
default: () => getConfig().badge.size || getConfig().size
|
|
6335
|
-
}
|
|
6336
|
-
},
|
|
6337
|
-
emits: [],
|
|
6338
|
-
setup(props, context) {
|
|
6339
|
-
const {
|
|
6340
|
-
emit,
|
|
6341
|
-
slots
|
|
6342
|
-
} = context;
|
|
6343
|
-
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
6344
|
-
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6345
|
-
const {
|
|
6346
|
-
computeSize
|
|
6347
|
-
} = useSize(props);
|
|
6348
|
-
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
|
|
6349
|
-
const refMaps = {
|
|
6350
|
-
refElem
|
|
6344
|
+
const targetMouseenterEvent = () => {
|
|
6345
|
+
handleVisible(reactData.target || getSelectorEl(), props.content);
|
|
6351
6346
|
};
|
|
6352
|
-
const
|
|
6347
|
+
const targetMouseleaveEvent = () => {
|
|
6353
6348
|
const {
|
|
6354
|
-
|
|
6349
|
+
trigger,
|
|
6350
|
+
enterable,
|
|
6351
|
+
leaveDelay
|
|
6355
6352
|
} = props;
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
};
|
|
6367
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
6368
|
-
emit(type, createEvent(evnt, {
|
|
6369
|
-
$badge: $xeBadge
|
|
6370
|
-
}, params));
|
|
6353
|
+
reactData.tipActive = false;
|
|
6354
|
+
if (enterable && trigger === 'hover') {
|
|
6355
|
+
setTimeout(() => {
|
|
6356
|
+
if (!reactData.tipActive) {
|
|
6357
|
+
tooltipMethods.close();
|
|
6358
|
+
}
|
|
6359
|
+
}, leaveDelay);
|
|
6360
|
+
} else {
|
|
6361
|
+
tooltipMethods.close();
|
|
6362
|
+
}
|
|
6371
6363
|
};
|
|
6372
|
-
const
|
|
6373
|
-
|
|
6364
|
+
const wrapperMouseenterEvent = () => {
|
|
6365
|
+
reactData.tipActive = true;
|
|
6374
6366
|
};
|
|
6375
|
-
const
|
|
6376
|
-
Object.assign($xeBadge, collapsePaneMethods, collapsePanePrivateMethods);
|
|
6377
|
-
const renderVN = () => {
|
|
6367
|
+
const wrapperMouseleaveEvent = () => {
|
|
6378
6368
|
const {
|
|
6379
|
-
|
|
6380
|
-
|
|
6369
|
+
trigger,
|
|
6370
|
+
enterable,
|
|
6371
|
+
leaveDelay
|
|
6381
6372
|
} = props;
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
}]
|
|
6391
|
-
}, [defaultSlot || content ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6392
|
-
class: 'vxe-badge--content'
|
|
6393
|
-
}, defaultSlot ? defaultSlot({}) : `${content || ''}`) : [], countNum ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
6394
|
-
class: 'vxe-badge--count'
|
|
6395
|
-
}, countNum > 99 ? '99+' : `${countNum}`) : renderEmptyElement($xeBadge)]);
|
|
6373
|
+
reactData.tipActive = false;
|
|
6374
|
+
if (enterable && trigger === 'hover') {
|
|
6375
|
+
setTimeout(() => {
|
|
6376
|
+
if (!reactData.tipActive) {
|
|
6377
|
+
tooltipMethods.close();
|
|
6378
|
+
}
|
|
6379
|
+
}, leaveDelay);
|
|
6380
|
+
}
|
|
6396
6381
|
};
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
/* harmony default export */ var breadcrumb_item = (defineVxeComponent({
|
|
6423
|
-
name: 'VxeBreadcrumbItem',
|
|
6424
|
-
props: {
|
|
6425
|
-
title: String,
|
|
6426
|
-
routerLink: Object
|
|
6427
|
-
},
|
|
6428
|
-
emits: [],
|
|
6429
|
-
setup(props, context) {
|
|
6430
|
-
const {
|
|
6431
|
-
slots
|
|
6432
|
-
} = context;
|
|
6433
|
-
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
6434
|
-
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6435
|
-
const $xeBreadcrumb = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeBreadcrumb', null);
|
|
6436
|
-
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
|
|
6437
|
-
const refMaps = {
|
|
6438
|
-
refElem
|
|
6382
|
+
const showTip = () => {
|
|
6383
|
+
const {
|
|
6384
|
+
tipStore
|
|
6385
|
+
} = reactData;
|
|
6386
|
+
const el = refElem.value;
|
|
6387
|
+
if (el) {
|
|
6388
|
+
const parentNode = el.parentNode;
|
|
6389
|
+
if (!parentNode) {
|
|
6390
|
+
document.body.appendChild(el);
|
|
6391
|
+
}
|
|
6392
|
+
}
|
|
6393
|
+
updateValue(true);
|
|
6394
|
+
updateZindex();
|
|
6395
|
+
tipStore.placement = 'top';
|
|
6396
|
+
tipStore.style = {
|
|
6397
|
+
width: 'auto',
|
|
6398
|
+
left: 0,
|
|
6399
|
+
top: 0,
|
|
6400
|
+
zIndex: props.zIndex || reactData.tipZindex
|
|
6401
|
+
};
|
|
6402
|
+
tipStore.arrowStyle = {
|
|
6403
|
+
left: '50%'
|
|
6404
|
+
};
|
|
6405
|
+
return tooltipMethods.updatePlacement();
|
|
6439
6406
|
};
|
|
6440
|
-
const
|
|
6441
|
-
|
|
6442
|
-
|
|
6407
|
+
const handleDelayFn = () => {
|
|
6408
|
+
internalData.showDelayTip = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(() => {
|
|
6409
|
+
if (reactData.tipActive) {
|
|
6410
|
+
showTip();
|
|
6411
|
+
}
|
|
6412
|
+
}, props.enterDelay, {
|
|
6413
|
+
leading: false,
|
|
6414
|
+
trailing: true
|
|
6415
|
+
});
|
|
6416
|
+
};
|
|
6417
|
+
const handleVisible = (target, content, evnt) => {
|
|
6418
|
+
const contentSlot = slots.content;
|
|
6419
|
+
if (!contentSlot && (content === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(content))) {
|
|
6420
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
6443
6421
|
}
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
const
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
};
|
|
6452
|
-
|
|
6422
|
+
if (target) {
|
|
6423
|
+
const {
|
|
6424
|
+
showDelayTip
|
|
6425
|
+
} = internalData;
|
|
6426
|
+
const {
|
|
6427
|
+
trigger,
|
|
6428
|
+
enterDelay
|
|
6429
|
+
} = props;
|
|
6430
|
+
if (evnt) {
|
|
6431
|
+
reactData.tipPos = {
|
|
6432
|
+
x: evnt.clientX,
|
|
6433
|
+
y: evnt.clientY,
|
|
6434
|
+
oLeft: evnt.offsetX,
|
|
6435
|
+
oTop: evnt.offsetY
|
|
6436
|
+
};
|
|
6437
|
+
} else {
|
|
6438
|
+
reactData.tipPos = null;
|
|
6439
|
+
}
|
|
6440
|
+
reactData.tipActive = true;
|
|
6441
|
+
reactData.tipTarget = target;
|
|
6442
|
+
reactData.tipContent = content;
|
|
6443
|
+
if (reactData.visible) {
|
|
6444
|
+
return $xeTooltip.updatePlacement();
|
|
6445
|
+
}
|
|
6446
|
+
if (enterDelay && trigger === 'hover') {
|
|
6447
|
+
if (showDelayTip) {
|
|
6448
|
+
showDelayTip();
|
|
6449
|
+
}
|
|
6450
|
+
} else {
|
|
6451
|
+
return showTip();
|
|
6452
|
+
}
|
|
6453
6453
|
}
|
|
6454
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
6454
6455
|
};
|
|
6455
|
-
const
|
|
6456
|
-
const $xeBreadcrumbItem = {
|
|
6457
|
-
xID,
|
|
6458
|
-
props,
|
|
6459
|
-
context,
|
|
6460
|
-
reactData,
|
|
6461
|
-
getRefMaps: () => refMaps,
|
|
6462
|
-
getComputeMaps: () => computeMaps
|
|
6463
|
-
};
|
|
6464
|
-
const renderVN = () => {
|
|
6456
|
+
const getSelectorEl = () => {
|
|
6465
6457
|
const {
|
|
6466
|
-
|
|
6467
|
-
routerLink
|
|
6458
|
+
selector
|
|
6468
6459
|
} = props;
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
ref: refElem,
|
|
6473
|
-
class: 'vxe-breadcrumb-item',
|
|
6474
|
-
onClick: clickEvent
|
|
6475
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
6476
|
-
class: 'vxe-breadcrumb-item--content'
|
|
6477
|
-
}, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
|
|
6478
|
-
class: 'vxe-breadcrumb-item--content-link',
|
|
6479
|
-
title,
|
|
6480
|
-
to: routerLink
|
|
6481
|
-
}, {
|
|
6482
|
-
default() {
|
|
6483
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
6484
|
-
class: 'vxe-breadcrumb-item--content-text'
|
|
6485
|
-
}, defaultSlot ? defaultSlot({}) : `${title || ''}`);
|
|
6460
|
+
if (selector) {
|
|
6461
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isElement(selector)) {
|
|
6462
|
+
return selector;
|
|
6486
6463
|
}
|
|
6487
|
-
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
};
|
|
6493
|
-
$xeBreadcrumbItem.renderVN = renderVN;
|
|
6494
|
-
return $xeBreadcrumbItem;
|
|
6495
|
-
},
|
|
6496
|
-
render() {
|
|
6497
|
-
return this.renderVN();
|
|
6498
|
-
}
|
|
6499
|
-
}));
|
|
6500
|
-
;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.ts
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
/* harmony default export */ var breadcrumb = (defineVxeComponent({
|
|
6507
|
-
name: 'VxeBreadcrumb',
|
|
6508
|
-
props: {
|
|
6509
|
-
separator: {
|
|
6510
|
-
type: String,
|
|
6511
|
-
default: () => getConfig().breadcrumb.separator
|
|
6512
|
-
},
|
|
6513
|
-
options: Array
|
|
6514
|
-
},
|
|
6515
|
-
emits: ['click'],
|
|
6516
|
-
setup(props, context) {
|
|
6517
|
-
const {
|
|
6518
|
-
emit,
|
|
6519
|
-
slots
|
|
6520
|
-
} = context;
|
|
6521
|
-
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
6522
|
-
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6523
|
-
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
|
|
6524
|
-
const refMaps = {
|
|
6525
|
-
refElem
|
|
6526
|
-
};
|
|
6527
|
-
const computeMaps = {};
|
|
6528
|
-
const $xeBreadcrumb = {
|
|
6529
|
-
xID,
|
|
6530
|
-
props,
|
|
6531
|
-
context,
|
|
6532
|
-
reactData,
|
|
6533
|
-
getRefMaps: () => refMaps,
|
|
6534
|
-
getComputeMaps: () => computeMaps
|
|
6464
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(selector)) {
|
|
6465
|
+
return document.querySelector(selector);
|
|
6466
|
+
}
|
|
6467
|
+
}
|
|
6468
|
+
return null;
|
|
6535
6469
|
};
|
|
6536
|
-
|
|
6470
|
+
tooltipMethods = {
|
|
6537
6471
|
dispatchEvent(type, params, evnt) {
|
|
6538
6472
|
emit(type, createEvent(evnt, {
|
|
6539
|
-
$
|
|
6473
|
+
$tooltip: $xeTooltip
|
|
6540
6474
|
}, params));
|
|
6475
|
+
},
|
|
6476
|
+
openByEvent(evnt, target, content) {
|
|
6477
|
+
return handleVisible(target || reactData.target || getSelectorEl(), content, evnt);
|
|
6478
|
+
},
|
|
6479
|
+
open(target, content) {
|
|
6480
|
+
return handleVisible(target || reactData.target || getSelectorEl(), content);
|
|
6481
|
+
},
|
|
6482
|
+
close() {
|
|
6483
|
+
reactData.tipPos = null;
|
|
6484
|
+
reactData.tipTarget = null;
|
|
6485
|
+
reactData.tipActive = false;
|
|
6486
|
+
Object.assign(reactData.tipStore, {
|
|
6487
|
+
style: {},
|
|
6488
|
+
placement: '',
|
|
6489
|
+
arrowStyle: null
|
|
6490
|
+
});
|
|
6491
|
+
updateValue(false);
|
|
6492
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
6493
|
+
},
|
|
6494
|
+
toVisible(target, content) {
|
|
6495
|
+
return handleVisible(target, content);
|
|
6496
|
+
},
|
|
6497
|
+
updatePlacement() {
|
|
6498
|
+
const {
|
|
6499
|
+
visible,
|
|
6500
|
+
tipTarget
|
|
6501
|
+
} = reactData;
|
|
6502
|
+
let el = refElem.value;
|
|
6503
|
+
if (visible && tipTarget && el) {
|
|
6504
|
+
updateTipStyle();
|
|
6505
|
+
}
|
|
6506
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
6507
|
+
el = refElem.value;
|
|
6508
|
+
if (tipTarget && el) {
|
|
6509
|
+
updateTipStyle();
|
|
6510
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
6511
|
+
updateTipStyle();
|
|
6512
|
+
});
|
|
6513
|
+
}
|
|
6514
|
+
});
|
|
6515
|
+
},
|
|
6516
|
+
isActived() {
|
|
6517
|
+
return reactData.tipActive;
|
|
6518
|
+
},
|
|
6519
|
+
setActived(active) {
|
|
6520
|
+
reactData.tipActive = !!active;
|
|
6541
6521
|
}
|
|
6542
6522
|
};
|
|
6543
|
-
const
|
|
6544
|
-
|
|
6545
|
-
breadcrumbMethods.dispatchEvent('click', {
|
|
6546
|
-
option
|
|
6547
|
-
}, evnt);
|
|
6548
|
-
}
|
|
6523
|
+
const wheelEvent = evnt => {
|
|
6524
|
+
evnt.stopPropagation();
|
|
6549
6525
|
};
|
|
6550
|
-
Object.assign($
|
|
6551
|
-
const
|
|
6526
|
+
Object.assign($xeTooltip, tooltipMethods);
|
|
6527
|
+
const renderContent = () => {
|
|
6552
6528
|
const {
|
|
6553
|
-
|
|
6529
|
+
useHTML
|
|
6554
6530
|
} = props;
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6531
|
+
const {
|
|
6532
|
+
tipContent
|
|
6533
|
+
} = reactData;
|
|
6534
|
+
const wrapperStyle = computeWrapperStyle.value;
|
|
6535
|
+
const contentSlot = slots.content;
|
|
6536
|
+
const contVNs = [];
|
|
6537
|
+
if (contentSlot) {
|
|
6538
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6539
|
+
key: 1
|
|
6540
|
+
}, vn_getSlotVNs(contentSlot({}))));
|
|
6541
|
+
} else if (useHTML) {
|
|
6542
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6543
|
+
key: 2,
|
|
6544
|
+
innerHTML: tipContent
|
|
6545
|
+
}));
|
|
6546
|
+
} else {
|
|
6547
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
6548
|
+
key: 3
|
|
6549
|
+
}, `${tipContent}`));
|
|
6562
6550
|
}
|
|
6563
|
-
return
|
|
6551
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6552
|
+
key: 3,
|
|
6553
|
+
ref: contentWrapperfElem,
|
|
6554
|
+
class: 'vxe-tooltip--content',
|
|
6555
|
+
style: wrapperStyle
|
|
6556
|
+
}, contVNs);
|
|
6564
6557
|
};
|
|
6565
6558
|
const renderVN = () => {
|
|
6559
|
+
const {
|
|
6560
|
+
popupClassName,
|
|
6561
|
+
theme,
|
|
6562
|
+
isArrow,
|
|
6563
|
+
enterable
|
|
6564
|
+
} = props;
|
|
6565
|
+
const {
|
|
6566
|
+
tipActive,
|
|
6567
|
+
visible,
|
|
6568
|
+
tipStore
|
|
6569
|
+
} = reactData;
|
|
6566
6570
|
const defaultSlot = slots.default;
|
|
6571
|
+
const vSize = computeSize.value;
|
|
6572
|
+
let ons;
|
|
6573
|
+
if (enterable) {
|
|
6574
|
+
ons = {
|
|
6575
|
+
onMouseenter: wrapperMouseenterEvent,
|
|
6576
|
+
onMouseleave: wrapperMouseleaveEvent
|
|
6577
|
+
};
|
|
6578
|
+
}
|
|
6567
6579
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6568
6580
|
ref: refElem,
|
|
6569
|
-
class: 'vxe-
|
|
6570
|
-
|
|
6581
|
+
class: ['vxe-tooltip--wrapper', `theme--${theme}`, popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
|
|
6582
|
+
$tooltip: $xeTooltip
|
|
6583
|
+
}) : popupClassName : '', {
|
|
6584
|
+
[`size--${vSize}`]: vSize,
|
|
6585
|
+
[`placement--${tipStore.placement}`]: tipStore.placement,
|
|
6586
|
+
'is--enterable': enterable,
|
|
6587
|
+
'is--visible': visible,
|
|
6588
|
+
'is--arrow': isArrow,
|
|
6589
|
+
'is--active': tipActive
|
|
6590
|
+
}],
|
|
6591
|
+
style: tipStore.style,
|
|
6592
|
+
...ons
|
|
6593
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6594
|
+
key: 'tby',
|
|
6595
|
+
class: 'vxe-tooltip--body'
|
|
6596
|
+
}, [renderContent(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
6597
|
+
class: 'vxe-tooltip--arrow',
|
|
6598
|
+
style: tipStore.arrowStyle
|
|
6599
|
+
})]), ...(defaultSlot ? vn_getSlotVNs(defaultSlot({})) : [])]);
|
|
6571
6600
|
};
|
|
6572
|
-
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.
|
|
6573
|
-
|
|
6574
|
-
|
|
6601
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.enterDelay, () => {
|
|
6602
|
+
handleDelayFn();
|
|
6603
|
+
});
|
|
6604
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.content, val => {
|
|
6605
|
+
reactData.tipContent = val;
|
|
6606
|
+
});
|
|
6607
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, val => {
|
|
6608
|
+
if (!reactData.isUpdate) {
|
|
6609
|
+
if (val) {
|
|
6610
|
+
handleVisible(reactData.target || getSelectorEl(), props.content);
|
|
6611
|
+
} else {
|
|
6612
|
+
tooltipMethods.close();
|
|
6613
|
+
}
|
|
6614
|
+
}
|
|
6615
|
+
reactData.isUpdate = false;
|
|
6616
|
+
});
|
|
6617
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
6618
|
+
const contentWrapperfEl = contentWrapperfElem.value;
|
|
6619
|
+
if (contentWrapperfEl) {
|
|
6620
|
+
contentWrapperfEl.addEventListener('wheel', wheelEvent, {
|
|
6621
|
+
passive: false
|
|
6622
|
+
});
|
|
6623
|
+
}
|
|
6624
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
6625
|
+
const {
|
|
6626
|
+
trigger,
|
|
6627
|
+
content
|
|
6628
|
+
} = props;
|
|
6629
|
+
const wrapperElem = refElem.value;
|
|
6630
|
+
if (wrapperElem) {
|
|
6631
|
+
const parentNode = wrapperElem.parentNode;
|
|
6632
|
+
if (parentNode) {
|
|
6633
|
+
reactData.tipContent = content;
|
|
6634
|
+
reactData.tipZindex = nextZIndex();
|
|
6635
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(wrapperElem.children, (elem, index) => {
|
|
6636
|
+
if (index) {
|
|
6637
|
+
parentNode.insertBefore(elem, wrapperElem);
|
|
6638
|
+
if (!reactData.target) {
|
|
6639
|
+
reactData.target = elem;
|
|
6640
|
+
}
|
|
6641
|
+
}
|
|
6642
|
+
});
|
|
6643
|
+
parentNode.removeChild(wrapperElem);
|
|
6644
|
+
const {
|
|
6645
|
+
target
|
|
6646
|
+
} = reactData;
|
|
6647
|
+
if (target) {
|
|
6648
|
+
if (trigger === 'hover') {
|
|
6649
|
+
target.onmouseenter = targetMouseenterEvent;
|
|
6650
|
+
target.onmouseleave = targetMouseleaveEvent;
|
|
6651
|
+
} else if (trigger === 'click') {
|
|
6652
|
+
target.onclick = clickEvent;
|
|
6653
|
+
}
|
|
6654
|
+
}
|
|
6655
|
+
if (props.modelValue) {
|
|
6656
|
+
handleVisible(target || getSelectorEl(), content);
|
|
6657
|
+
}
|
|
6658
|
+
}
|
|
6659
|
+
}
|
|
6660
|
+
});
|
|
6661
|
+
});
|
|
6662
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
6663
|
+
const {
|
|
6664
|
+
target
|
|
6665
|
+
} = reactData;
|
|
6666
|
+
const wrapperElem = refElem.value;
|
|
6667
|
+
if (target) {
|
|
6668
|
+
target.onmouseenter = null;
|
|
6669
|
+
target.onmouseleave = null;
|
|
6670
|
+
target.onclick = null;
|
|
6671
|
+
}
|
|
6672
|
+
const contentWrapperfEl = contentWrapperfElem.value;
|
|
6673
|
+
if (contentWrapperfEl) {
|
|
6674
|
+
contentWrapperfEl.removeEventListener('wheel', wheelEvent);
|
|
6675
|
+
}
|
|
6676
|
+
if (wrapperElem) {
|
|
6677
|
+
const parentNode = wrapperElem.parentNode;
|
|
6678
|
+
if (parentNode) {
|
|
6679
|
+
parentNode.removeChild(wrapperElem);
|
|
6680
|
+
}
|
|
6681
|
+
}
|
|
6682
|
+
});
|
|
6683
|
+
handleDelayFn();
|
|
6684
|
+
$xeTooltip.renderVN = renderVN;
|
|
6685
|
+
return $xeTooltip;
|
|
6575
6686
|
},
|
|
6576
6687
|
render() {
|
|
6577
6688
|
return this.renderVN();
|
|
6578
6689
|
}
|
|
6579
6690
|
}));
|
|
6580
|
-
;// CONCATENATED MODULE: ./packages/
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
const VxeBreadcrumb = Object.assign({}, breadcrumb, {
|
|
6585
|
-
install(app) {
|
|
6586
|
-
app.component(breadcrumb.name, breadcrumb);
|
|
6587
|
-
}
|
|
6588
|
-
});
|
|
6589
|
-
dynamicApp.use(VxeBreadcrumb);
|
|
6590
|
-
index_esm_VxeUI.component(breadcrumb);
|
|
6591
|
-
const Breadcrumb = VxeBreadcrumb;
|
|
6592
|
-
/* harmony default export */ var packages_breadcrumb = (VxeBreadcrumb);
|
|
6593
|
-
;// CONCATENATED MODULE: ./packages/breadcrumb-item/index.ts
|
|
6691
|
+
;// CONCATENATED MODULE: ./packages/tooltip/index.ts
|
|
6594
6692
|
|
|
6595
6693
|
|
|
6596
6694
|
|
|
6597
|
-
const
|
|
6695
|
+
const VxeTooltip = Object.assign({}, tooltip, {
|
|
6598
6696
|
install(app) {
|
|
6599
|
-
app.component(
|
|
6697
|
+
app.component(tooltip.name, tooltip);
|
|
6600
6698
|
}
|
|
6601
6699
|
});
|
|
6602
|
-
dynamicApp.use(
|
|
6603
|
-
index_esm_VxeUI.component(
|
|
6604
|
-
const
|
|
6605
|
-
/* harmony default export */ var
|
|
6606
|
-
;// CONCATENATED MODULE: ./packages/
|
|
6607
|
-
|
|
6700
|
+
dynamicApp.use(VxeTooltip);
|
|
6701
|
+
index_esm_VxeUI.component(tooltip);
|
|
6702
|
+
const Tooltip = VxeTooltip;
|
|
6703
|
+
/* harmony default export */ var packages_tooltip = (VxeTooltip);
|
|
6704
|
+
;// CONCATENATED MODULE: ./packages/button/src/button.ts
|
|
6608
6705
|
|
|
6609
6706
|
|
|
6610
|
-
function isEnableConf(conf) {
|
|
6611
|
-
return conf && conf.enabled !== false;
|
|
6612
|
-
}
|
|
6613
|
-
function nextZIndex() {
|
|
6614
|
-
return index_esm.getNext();
|
|
6615
|
-
}
|
|
6616
|
-
function getLastZIndex() {
|
|
6617
|
-
return index_esm.getCurrent();
|
|
6618
|
-
}
|
|
6619
|
-
function nextSubZIndex() {
|
|
6620
|
-
return index_esm.getSubNext();
|
|
6621
|
-
}
|
|
6622
|
-
function getSubLastZIndex() {
|
|
6623
|
-
return index_esm.getSubCurrent();
|
|
6624
|
-
}
|
|
6625
|
-
function getGlobalDefaultConfig(value, globalValue) {
|
|
6626
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(value)) {
|
|
6627
|
-
return globalValue;
|
|
6628
|
-
}
|
|
6629
|
-
return value;
|
|
6630
|
-
}
|
|
6631
|
-
function getFuncText(content, args) {
|
|
6632
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(content)) {
|
|
6633
|
-
return '';
|
|
6634
|
-
}
|
|
6635
|
-
const translate = getConfig().translate;
|
|
6636
|
-
return `${translate ? translate('' + content, args) : content}`;
|
|
6637
|
-
}
|
|
6638
|
-
/**
|
|
6639
|
-
* 判断值为:'' | null | undefined 时都属于空值
|
|
6640
|
-
*/
|
|
6641
|
-
function eqEmptyValue(cellValue) {
|
|
6642
|
-
return cellValue === null || cellValue === undefined || cellValue === '';
|
|
6643
|
-
}
|
|
6644
|
-
function handleBooleanDefaultValue(value) {
|
|
6645
|
-
return external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(value) ? value : null;
|
|
6646
|
-
}
|
|
6647
|
-
;// CONCATENATED MODULE: ./packages/tooltip/src/tooltip.ts
|
|
6648
6707
|
|
|
6649
6708
|
|
|
6650
6709
|
|
|
@@ -6653,133 +6712,147 @@ function handleBooleanDefaultValue(value) {
|
|
|
6653
6712
|
|
|
6654
6713
|
|
|
6655
6714
|
|
|
6656
|
-
|
|
6657
|
-
name: '
|
|
6715
|
+
const VxeButtonComponent = defineVxeComponent({
|
|
6716
|
+
name: 'VxeButton',
|
|
6658
6717
|
props: {
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
trigger: {
|
|
6666
|
-
type: String,
|
|
6667
|
-
default: () => getConfig().tooltip.trigger || 'hover'
|
|
6668
|
-
},
|
|
6669
|
-
theme: {
|
|
6670
|
-
type: String,
|
|
6671
|
-
default: () => getConfig().tooltip.theme || 'dark'
|
|
6672
|
-
},
|
|
6673
|
-
content: {
|
|
6674
|
-
type: [String, Number],
|
|
6675
|
-
default: null
|
|
6676
|
-
},
|
|
6677
|
-
useHTML: Boolean,
|
|
6678
|
-
zIndex: [String, Number],
|
|
6718
|
+
/**
|
|
6719
|
+
* 按钮类型
|
|
6720
|
+
*/
|
|
6721
|
+
type: String,
|
|
6722
|
+
mode: String,
|
|
6723
|
+
className: [String, Function],
|
|
6679
6724
|
popupClassName: [String, Function],
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
default: () => getConfig().tooltip.height
|
|
6687
|
-
},
|
|
6688
|
-
minWidth: {
|
|
6689
|
-
type: [String, Number],
|
|
6690
|
-
default: () => getConfig().tooltip.minWidth
|
|
6691
|
-
},
|
|
6692
|
-
minHeight: {
|
|
6693
|
-
type: [String, Number],
|
|
6694
|
-
default: () => getConfig().tooltip.minHeight
|
|
6695
|
-
},
|
|
6696
|
-
maxWidth: {
|
|
6697
|
-
type: [String, Number],
|
|
6698
|
-
default: () => getConfig().tooltip.maxWidth
|
|
6725
|
+
/**
|
|
6726
|
+
* 按钮尺寸
|
|
6727
|
+
*/
|
|
6728
|
+
size: {
|
|
6729
|
+
type: String,
|
|
6730
|
+
default: () => getConfig().button.size || getConfig().size
|
|
6699
6731
|
},
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6732
|
+
zIndex: Number,
|
|
6733
|
+
/**
|
|
6734
|
+
* 用来标识这一项
|
|
6735
|
+
*/
|
|
6736
|
+
name: [String, Number],
|
|
6737
|
+
routerLink: Object,
|
|
6738
|
+
/**
|
|
6739
|
+
* 权限码
|
|
6740
|
+
*/
|
|
6741
|
+
permissionCode: [String, Number],
|
|
6742
|
+
/**
|
|
6743
|
+
* 按钮内容
|
|
6744
|
+
*/
|
|
6745
|
+
content: String,
|
|
6746
|
+
/**
|
|
6747
|
+
* 固定显示下拉面板的方向
|
|
6748
|
+
*/
|
|
6749
|
+
placement: String,
|
|
6750
|
+
/**
|
|
6751
|
+
* 按钮状态
|
|
6752
|
+
*/
|
|
6753
|
+
status: String,
|
|
6754
|
+
/**
|
|
6755
|
+
* 标题
|
|
6756
|
+
*/
|
|
6757
|
+
title: String,
|
|
6758
|
+
shadow: Boolean,
|
|
6759
|
+
/**
|
|
6760
|
+
* 按钮的前缀图标,属于 prefix-icon 的简写
|
|
6761
|
+
*/
|
|
6762
|
+
icon: String,
|
|
6763
|
+
iconRender: Object,
|
|
6764
|
+
/**
|
|
6765
|
+
* 按钮的前缀图标
|
|
6766
|
+
*/
|
|
6767
|
+
prefixIcon: String,
|
|
6768
|
+
prefixRender: Object,
|
|
6769
|
+
/**
|
|
6770
|
+
* 按钮的后缀图标
|
|
6771
|
+
*/
|
|
6772
|
+
suffixIcon: String,
|
|
6773
|
+
suffixRender: Object,
|
|
6774
|
+
/**
|
|
6775
|
+
* 圆角边框
|
|
6776
|
+
*/
|
|
6777
|
+
round: Boolean,
|
|
6778
|
+
/**
|
|
6779
|
+
* 圆角按钮
|
|
6780
|
+
*/
|
|
6781
|
+
circle: Boolean,
|
|
6782
|
+
/**
|
|
6783
|
+
* 是否禁用
|
|
6784
|
+
*/
|
|
6785
|
+
disabled: Boolean,
|
|
6786
|
+
/**
|
|
6787
|
+
* 是否加载中
|
|
6788
|
+
*/
|
|
6789
|
+
loading: Boolean,
|
|
6790
|
+
trigger: {
|
|
6791
|
+
type: String,
|
|
6792
|
+
default: () => getConfig().button.trigger
|
|
6703
6793
|
},
|
|
6704
|
-
|
|
6794
|
+
align: String,
|
|
6795
|
+
prefixTooltip: Object,
|
|
6796
|
+
suffixTooltip: Object,
|
|
6797
|
+
options: Array,
|
|
6798
|
+
showDropdownIcon: {
|
|
6705
6799
|
type: Boolean,
|
|
6706
|
-
default: () => getConfig().
|
|
6800
|
+
default: () => getConfig().button.showDropdownIcon
|
|
6707
6801
|
},
|
|
6708
|
-
|
|
6802
|
+
/**
|
|
6803
|
+
* 在下拉面板关闭时销毁内容
|
|
6804
|
+
*/
|
|
6805
|
+
destroyOnClose: {
|
|
6709
6806
|
type: Boolean,
|
|
6710
|
-
default: () => getConfig().
|
|
6711
|
-
},
|
|
6712
|
-
enterDelay: {
|
|
6713
|
-
type: Number,
|
|
6714
|
-
default: () => getConfig().tooltip.enterDelay
|
|
6807
|
+
default: () => getConfig().button.destroyOnClose
|
|
6715
6808
|
},
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6809
|
+
/**
|
|
6810
|
+
* 是否将弹框容器插入于 body 内
|
|
6811
|
+
*/
|
|
6812
|
+
transfer: {
|
|
6813
|
+
type: Boolean,
|
|
6814
|
+
default: null
|
|
6719
6815
|
}
|
|
6720
6816
|
},
|
|
6721
|
-
emits: ['
|
|
6817
|
+
emits: ['click', 'mouseenter', 'mouseleave', 'dropdown-click', 'dropdownClick', 'contextmenu'],
|
|
6722
6818
|
setup(props, context) {
|
|
6723
6819
|
const {
|
|
6724
6820
|
slots,
|
|
6725
6821
|
emit
|
|
6726
6822
|
} = context;
|
|
6823
|
+
const $xeModal = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeModal', null);
|
|
6824
|
+
const $xeDrawer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeDrawer', null);
|
|
6825
|
+
const $xeTable = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeTable', null);
|
|
6826
|
+
const $xeTree = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeTree', null);
|
|
6827
|
+
const $xeForm = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeForm', null);
|
|
6828
|
+
const $xeButtonGroup = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeButtonGroup', null);
|
|
6727
6829
|
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
6728
6830
|
const {
|
|
6729
6831
|
computeSize
|
|
6730
6832
|
} = useSize(props);
|
|
6833
|
+
const {
|
|
6834
|
+
computePermissionInfo
|
|
6835
|
+
} = usePermission(props);
|
|
6731
6836
|
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
tipZindex: 0,
|
|
6740
|
-
tipStore: {
|
|
6741
|
-
style: {},
|
|
6742
|
-
placement: '',
|
|
6743
|
-
arrowStyle: {}
|
|
6744
|
-
}
|
|
6837
|
+
initialized: false,
|
|
6838
|
+
visiblePanel: false,
|
|
6839
|
+
isAniVisible: false,
|
|
6840
|
+
isActivated: false,
|
|
6841
|
+
panelIndex: 0,
|
|
6842
|
+
panelStyle: {},
|
|
6843
|
+
panelPlacement: ''
|
|
6745
6844
|
});
|
|
6746
|
-
const internalData = {
|
|
6845
|
+
const internalData = {
|
|
6846
|
+
showTime: undefined,
|
|
6847
|
+
tooltipTimeout: undefined
|
|
6848
|
+
};
|
|
6747
6849
|
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6748
|
-
const
|
|
6749
|
-
const
|
|
6750
|
-
const {
|
|
6751
|
-
width,
|
|
6752
|
-
height,
|
|
6753
|
-
minHeight,
|
|
6754
|
-
minWidth,
|
|
6755
|
-
maxHeight,
|
|
6756
|
-
maxWidth
|
|
6757
|
-
} = props;
|
|
6758
|
-
const stys = {};
|
|
6759
|
-
if (width) {
|
|
6760
|
-
stys.width = toCssUnit(width);
|
|
6761
|
-
}
|
|
6762
|
-
if (height) {
|
|
6763
|
-
stys.height = toCssUnit(height);
|
|
6764
|
-
}
|
|
6765
|
-
if (minWidth) {
|
|
6766
|
-
stys.minWidth = toCssUnit(minWidth);
|
|
6767
|
-
}
|
|
6768
|
-
if (minHeight) {
|
|
6769
|
-
stys.minHeight = toCssUnit(minHeight);
|
|
6770
|
-
}
|
|
6771
|
-
if (maxWidth) {
|
|
6772
|
-
stys.maxWidth = toCssUnit(maxWidth);
|
|
6773
|
-
}
|
|
6774
|
-
if (maxHeight) {
|
|
6775
|
-
stys.maxHeight = toCssUnit(maxHeight);
|
|
6776
|
-
}
|
|
6777
|
-
return stys;
|
|
6778
|
-
});
|
|
6850
|
+
const refButton = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6851
|
+
const refBtnPanel = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
6779
6852
|
const refMaps = {
|
|
6780
6853
|
refElem
|
|
6781
6854
|
};
|
|
6782
|
-
const $
|
|
6855
|
+
const $xeButton = {
|
|
6783
6856
|
xID,
|
|
6784
6857
|
props,
|
|
6785
6858
|
context,
|
|
@@ -6787,450 +6860,677 @@ function handleBooleanDefaultValue(value) {
|
|
|
6787
6860
|
internalData,
|
|
6788
6861
|
getRefMaps: () => refMaps
|
|
6789
6862
|
};
|
|
6790
|
-
let
|
|
6791
|
-
const
|
|
6863
|
+
let buttonMethods = {};
|
|
6864
|
+
const computeBtnTransfer = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6792
6865
|
const {
|
|
6793
|
-
|
|
6866
|
+
transfer
|
|
6794
6867
|
} = props;
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
} = reactData;
|
|
6800
|
-
let top = '';
|
|
6801
|
-
let left = '';
|
|
6802
|
-
let panelPlacement = 'bottom';
|
|
6803
|
-
let arrowLeft = '';
|
|
6804
|
-
const panelElem = refElem.value;
|
|
6805
|
-
if (panelElem && targetElem) {
|
|
6806
|
-
const documentElement = document.documentElement;
|
|
6807
|
-
const bodyElem = document.body;
|
|
6808
|
-
const targetWidth = targetElem.offsetWidth;
|
|
6809
|
-
const targetHeight = targetElem.offsetHeight;
|
|
6810
|
-
const panelHeight = panelElem.offsetHeight;
|
|
6811
|
-
const panelWidth = panelElem.offsetWidth;
|
|
6812
|
-
const targetRect = targetElem.getBoundingClientRect();
|
|
6813
|
-
const visibleHeight = documentElement.clientHeight || bodyElem.clientHeight;
|
|
6814
|
-
const visibleWidth = documentElement.clientWidth || bodyElem.clientWidth;
|
|
6815
|
-
const marginSize = 6;
|
|
6816
|
-
top = targetRect.top + targetHeight;
|
|
6817
|
-
left = targetRect.left;
|
|
6818
|
-
if (tipPos && tipPos.x && tipPos.y) {
|
|
6819
|
-
if (isArrow) {
|
|
6820
|
-
left = left + Math.max(8, Math.min(targetWidth - 8, tipPos.oLeft)) - panelWidth / 2;
|
|
6821
|
-
} else {
|
|
6822
|
-
left = tipPos.x + 1;
|
|
6823
|
-
top = tipPos.y + 1;
|
|
6824
|
-
}
|
|
6825
|
-
} else {
|
|
6826
|
-
left = targetRect.left + (targetWidth - panelWidth) / 2;
|
|
6868
|
+
if (transfer === null) {
|
|
6869
|
+
const globalTransfer = getConfig().button.transfer;
|
|
6870
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(globalTransfer)) {
|
|
6871
|
+
return globalTransfer;
|
|
6827
6872
|
}
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
panelPlacement = 'top';
|
|
6831
|
-
top = targetRect.top - panelHeight;
|
|
6873
|
+
if ($xeTable || $xeTree || $xeModal || $xeDrawer || $xeForm) {
|
|
6874
|
+
return true;
|
|
6832
6875
|
}
|
|
6833
|
-
// 如果上面不够放,则向下(优先)
|
|
6834
|
-
if (top < marginSize) {
|
|
6835
|
-
panelPlacement = 'bottom';
|
|
6836
|
-
top = targetRect.top + targetHeight;
|
|
6837
|
-
}
|
|
6838
|
-
// 如果溢出右边
|
|
6839
|
-
if (left + panelWidth + marginSize > visibleWidth) {
|
|
6840
|
-
left -= left + panelWidth + marginSize - visibleWidth;
|
|
6841
|
-
}
|
|
6842
|
-
// 如果溢出左边
|
|
6843
|
-
if (left < marginSize) {
|
|
6844
|
-
left = marginSize;
|
|
6845
|
-
}
|
|
6846
|
-
// 箭头
|
|
6847
|
-
if (left === targetRect.left) {
|
|
6848
|
-
if (targetWidth <= panelWidth) {
|
|
6849
|
-
arrowLeft = targetWidth / 2;
|
|
6850
|
-
}
|
|
6851
|
-
} else if (left < targetRect.left) {
|
|
6852
|
-
if (left + panelWidth > targetRect.left + targetWidth) {
|
|
6853
|
-
arrowLeft = targetRect.left - left + targetWidth / 2;
|
|
6854
|
-
} else {
|
|
6855
|
-
arrowLeft = targetRect.left - left + (panelWidth - (targetRect.left - left)) / 2;
|
|
6856
|
-
}
|
|
6857
|
-
}
|
|
6858
|
-
tipStore.placement = panelPlacement;
|
|
6859
|
-
tipStore.style.top = `${top}px`;
|
|
6860
|
-
tipStore.style.left = `${left}px`;
|
|
6861
|
-
tipStore.arrowStyle.left = `${arrowLeft}px`;
|
|
6862
6876
|
}
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6877
|
+
return transfer;
|
|
6878
|
+
});
|
|
6879
|
+
const computeBtnDisabled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6880
|
+
const {
|
|
6881
|
+
disabled
|
|
6882
|
+
} = props;
|
|
6883
|
+
const permissionInfo = computePermissionInfo.value;
|
|
6884
|
+
return disabled || permissionInfo.disabled;
|
|
6885
|
+
});
|
|
6886
|
+
const computeIsFormBtn = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6887
|
+
const {
|
|
6888
|
+
type
|
|
6889
|
+
} = props;
|
|
6890
|
+
if (type) {
|
|
6891
|
+
return ['submit', 'reset', 'button'].indexOf(type) > -1;
|
|
6869
6892
|
}
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6893
|
+
return false;
|
|
6894
|
+
});
|
|
6895
|
+
const computeBtnMode = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6896
|
+
const {
|
|
6897
|
+
type,
|
|
6898
|
+
mode
|
|
6899
|
+
} = props;
|
|
6900
|
+
if (mode === 'text' || type === 'text' || $xeButtonGroup && $xeButtonGroup.props.mode === 'text') {
|
|
6901
|
+
return 'text';
|
|
6874
6902
|
}
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6903
|
+
return 'button';
|
|
6904
|
+
});
|
|
6905
|
+
const computeBtnStatus = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6906
|
+
const {
|
|
6907
|
+
status
|
|
6908
|
+
} = props;
|
|
6909
|
+
if (status) {
|
|
6910
|
+
return status;
|
|
6881
6911
|
}
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6912
|
+
if ($xeButtonGroup) {
|
|
6913
|
+
return $xeButtonGroup.props.status;
|
|
6914
|
+
}
|
|
6915
|
+
return '';
|
|
6916
|
+
});
|
|
6917
|
+
const computeBtnAlign = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6887
6918
|
const {
|
|
6888
|
-
|
|
6889
|
-
enterable,
|
|
6890
|
-
leaveDelay
|
|
6919
|
+
align
|
|
6891
6920
|
} = props;
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
setTimeout(() => {
|
|
6895
|
-
if (!reactData.tipActive) {
|
|
6896
|
-
tooltipMethods.close();
|
|
6897
|
-
}
|
|
6898
|
-
}, leaveDelay);
|
|
6899
|
-
} else {
|
|
6900
|
-
tooltipMethods.close();
|
|
6921
|
+
if (align) {
|
|
6922
|
+
return align;
|
|
6901
6923
|
}
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6924
|
+
if ($xeButtonGroup) {
|
|
6925
|
+
return $xeButtonGroup.props.align;
|
|
6926
|
+
}
|
|
6927
|
+
return false;
|
|
6928
|
+
});
|
|
6929
|
+
const computeBtnRound = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6907
6930
|
const {
|
|
6908
|
-
|
|
6909
|
-
enterable,
|
|
6910
|
-
leaveDelay
|
|
6931
|
+
round
|
|
6911
6932
|
} = props;
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
setTimeout(() => {
|
|
6915
|
-
if (!reactData.tipActive) {
|
|
6916
|
-
tooltipMethods.close();
|
|
6917
|
-
}
|
|
6918
|
-
}, leaveDelay);
|
|
6933
|
+
if (round) {
|
|
6934
|
+
return round;
|
|
6919
6935
|
}
|
|
6920
|
-
|
|
6921
|
-
|
|
6936
|
+
if ($xeButtonGroup) {
|
|
6937
|
+
return $xeButtonGroup.props.round;
|
|
6938
|
+
}
|
|
6939
|
+
return false;
|
|
6940
|
+
});
|
|
6941
|
+
const computeBtnCircle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6922
6942
|
const {
|
|
6923
|
-
|
|
6924
|
-
} =
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
const parentNode = el.parentNode;
|
|
6928
|
-
if (!parentNode) {
|
|
6929
|
-
document.body.appendChild(el);
|
|
6930
|
-
}
|
|
6943
|
+
circle
|
|
6944
|
+
} = props;
|
|
6945
|
+
if (circle) {
|
|
6946
|
+
return circle;
|
|
6931
6947
|
}
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
tipStore.placement = 'top';
|
|
6935
|
-
tipStore.style = {
|
|
6936
|
-
width: 'auto',
|
|
6937
|
-
left: 0,
|
|
6938
|
-
top: 0,
|
|
6939
|
-
zIndex: props.zIndex || reactData.tipZindex
|
|
6940
|
-
};
|
|
6941
|
-
tipStore.arrowStyle = {
|
|
6942
|
-
left: '50%'
|
|
6943
|
-
};
|
|
6944
|
-
return tooltipMethods.updatePlacement();
|
|
6945
|
-
};
|
|
6946
|
-
const handleDelayFn = () => {
|
|
6947
|
-
internalData.showDelayTip = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().debounce(() => {
|
|
6948
|
-
if (reactData.tipActive) {
|
|
6949
|
-
showTip();
|
|
6950
|
-
}
|
|
6951
|
-
}, props.enterDelay, {
|
|
6952
|
-
leading: false,
|
|
6953
|
-
trailing: true
|
|
6954
|
-
});
|
|
6955
|
-
};
|
|
6956
|
-
const handleVisible = (target, content, evnt) => {
|
|
6957
|
-
const contentSlot = slots.content;
|
|
6958
|
-
if (!contentSlot && (content === '' || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(content))) {
|
|
6959
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
6948
|
+
if ($xeButtonGroup) {
|
|
6949
|
+
return $xeButtonGroup.props.circle;
|
|
6960
6950
|
}
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
oTop: evnt.offsetY
|
|
6975
|
-
};
|
|
6976
|
-
} else {
|
|
6977
|
-
reactData.tipPos = null;
|
|
6978
|
-
}
|
|
6979
|
-
reactData.tipActive = true;
|
|
6980
|
-
reactData.tipTarget = target;
|
|
6981
|
-
reactData.tipContent = content;
|
|
6982
|
-
if (reactData.visible) {
|
|
6983
|
-
return $xeTooltip.updatePlacement();
|
|
6984
|
-
}
|
|
6985
|
-
if (enterDelay && trigger === 'hover') {
|
|
6986
|
-
if (showDelayTip) {
|
|
6987
|
-
showDelayTip();
|
|
6988
|
-
}
|
|
6989
|
-
} else {
|
|
6990
|
-
return showTip();
|
|
6991
|
-
}
|
|
6951
|
+
return false;
|
|
6952
|
+
});
|
|
6953
|
+
const computeDownBtnList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6954
|
+
const {
|
|
6955
|
+
options
|
|
6956
|
+
} = props;
|
|
6957
|
+
if (options) {
|
|
6958
|
+
return options.filter(item => {
|
|
6959
|
+
const {
|
|
6960
|
+
permissionCode
|
|
6961
|
+
} = item;
|
|
6962
|
+
return !permissionCode || permission.checkVisible(permissionCode);
|
|
6963
|
+
});
|
|
6992
6964
|
}
|
|
6993
|
-
return
|
|
6994
|
-
};
|
|
6995
|
-
const
|
|
6965
|
+
return [];
|
|
6966
|
+
});
|
|
6967
|
+
const computePrefixTipOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6968
|
+
return Object.assign({}, getConfig().button.prefixTooltip, props.prefixTooltip);
|
|
6969
|
+
});
|
|
6970
|
+
const computeSuffixTipOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
6971
|
+
return Object.assign({}, getConfig().button.suffixTooltip, props.suffixTooltip);
|
|
6972
|
+
});
|
|
6973
|
+
const updateZindex = () => {
|
|
6996
6974
|
const {
|
|
6997
|
-
|
|
6975
|
+
zIndex
|
|
6998
6976
|
} = props;
|
|
6999
|
-
if (
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(selector)) {
|
|
7004
|
-
return document.querySelector(selector);
|
|
7005
|
-
}
|
|
6977
|
+
if (zIndex) {
|
|
6978
|
+
reactData.panelIndex = zIndex;
|
|
6979
|
+
} else if (reactData.panelIndex < getLastZIndex()) {
|
|
6980
|
+
reactData.panelIndex = nextZIndex();
|
|
7006
6981
|
}
|
|
7007
|
-
return null;
|
|
7008
6982
|
};
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
reactData.tipTarget = null;
|
|
7024
|
-
reactData.tipActive = false;
|
|
7025
|
-
Object.assign(reactData.tipStore, {
|
|
7026
|
-
style: {},
|
|
7027
|
-
placement: '',
|
|
7028
|
-
arrowStyle: null
|
|
6983
|
+
const updatePlacement = () => {
|
|
6984
|
+
const {
|
|
6985
|
+
placement
|
|
6986
|
+
} = props;
|
|
6987
|
+
const {
|
|
6988
|
+
panelIndex
|
|
6989
|
+
} = reactData;
|
|
6990
|
+
const targetElem = refButton.value;
|
|
6991
|
+
const panelElem = refBtnPanel.value;
|
|
6992
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
6993
|
+
const handleStyle = () => {
|
|
6994
|
+
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
|
6995
|
+
placement,
|
|
6996
|
+
teleportTo: btnTransfer
|
|
7029
6997
|
});
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
}
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
6998
|
+
const panelStyle = Object.assign(ppObj.style, {
|
|
6999
|
+
zIndex: panelIndex
|
|
7000
|
+
});
|
|
7001
|
+
reactData.panelStyle = panelStyle;
|
|
7002
|
+
reactData.panelPlacement = ppObj.placement;
|
|
7003
|
+
};
|
|
7004
|
+
handleStyle();
|
|
7005
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(handleStyle);
|
|
7006
|
+
};
|
|
7007
|
+
const clickEvent = evnt => {
|
|
7008
|
+
if ($xeButtonGroup) {
|
|
7009
|
+
$xeButtonGroup.handleClick({
|
|
7010
|
+
name: props.name
|
|
7011
|
+
}, evnt);
|
|
7012
|
+
}
|
|
7013
|
+
dispatchEvent('click', {
|
|
7014
|
+
$event: evnt
|
|
7015
|
+
}, evnt);
|
|
7016
|
+
};
|
|
7017
|
+
const downBtnClickEvent = (params, option) => {
|
|
7018
|
+
const {
|
|
7019
|
+
$event
|
|
7020
|
+
} = params;
|
|
7021
|
+
hidePanel();
|
|
7022
|
+
dispatchEvent('dropdown-click', {
|
|
7023
|
+
name: option.name,
|
|
7024
|
+
option
|
|
7025
|
+
}, $event);
|
|
7026
|
+
};
|
|
7027
|
+
const mousedownDropdownEvent = evnt => {
|
|
7028
|
+
const isLeftBtn = evnt.button === 0;
|
|
7029
|
+
if (isLeftBtn) {
|
|
7030
|
+
evnt.stopPropagation();
|
|
7031
|
+
}
|
|
7032
|
+
};
|
|
7033
|
+
const clickDropdownEvent = evnt => {
|
|
7034
|
+
const dropdownElem = evnt.currentTarget;
|
|
7035
|
+
const panelElem = refBtnPanel.value;
|
|
7036
|
+
const {
|
|
7037
|
+
flag,
|
|
7038
|
+
targetElem
|
|
7039
|
+
} = getEventTargetNode(evnt, dropdownElem, 'vxe-button');
|
|
7040
|
+
if (flag) {
|
|
7041
|
+
if (panelElem) {
|
|
7042
|
+
panelElem.dataset.active = 'N';
|
|
7044
7043
|
}
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
if (
|
|
7048
|
-
|
|
7049
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
|
|
7050
|
-
updateTipStyle();
|
|
7051
|
-
});
|
|
7044
|
+
reactData.visiblePanel = false;
|
|
7045
|
+
setTimeout(() => {
|
|
7046
|
+
if (!panelElem || panelElem.dataset.active !== 'Y') {
|
|
7047
|
+
reactData.isAniVisible = false;
|
|
7052
7048
|
}
|
|
7053
|
-
});
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
setActived(active) {
|
|
7059
|
-
reactData.tipActive = !!active;
|
|
7049
|
+
}, 350);
|
|
7050
|
+
dispatchEvent('dropdown-click', {
|
|
7051
|
+
name: targetElem.getAttribute('name'),
|
|
7052
|
+
option: null
|
|
7053
|
+
}, evnt);
|
|
7060
7054
|
}
|
|
7061
7055
|
};
|
|
7062
|
-
const
|
|
7063
|
-
|
|
7056
|
+
const mouseenterDropdownEvent = () => {
|
|
7057
|
+
const panelElem = refBtnPanel.value;
|
|
7058
|
+
if (panelElem) {
|
|
7059
|
+
panelElem.dataset.active = 'Y';
|
|
7060
|
+
reactData.isAniVisible = true;
|
|
7061
|
+
setTimeout(() => {
|
|
7062
|
+
if (panelElem.dataset.active === 'Y') {
|
|
7063
|
+
reactData.visiblePanel = true;
|
|
7064
|
+
updateZindex();
|
|
7065
|
+
updatePlacement();
|
|
7066
|
+
setTimeout(() => {
|
|
7067
|
+
if (reactData.visiblePanel) {
|
|
7068
|
+
updatePlacement();
|
|
7069
|
+
}
|
|
7070
|
+
}, 50);
|
|
7071
|
+
}
|
|
7072
|
+
}, 20);
|
|
7073
|
+
}
|
|
7064
7074
|
};
|
|
7065
|
-
|
|
7066
|
-
const renderContent = () => {
|
|
7075
|
+
const mouseenterTargetEvent = evnt => {
|
|
7067
7076
|
const {
|
|
7068
|
-
|
|
7077
|
+
loading
|
|
7069
7078
|
} = props;
|
|
7070
|
-
const
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
const contentSlot = slots.content;
|
|
7075
|
-
const contVNs = [];
|
|
7076
|
-
if (contentSlot) {
|
|
7077
|
-
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7078
|
-
key: 1
|
|
7079
|
-
}, vn_getSlotVNs(contentSlot({}))));
|
|
7080
|
-
} else if (useHTML) {
|
|
7081
|
-
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7082
|
-
key: 2,
|
|
7083
|
-
innerHTML: tipContent
|
|
7084
|
-
}));
|
|
7085
|
-
} else {
|
|
7086
|
-
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7087
|
-
key: 3
|
|
7088
|
-
}, `${tipContent}`));
|
|
7079
|
+
const btnDisabled = computeBtnDisabled.value;
|
|
7080
|
+
if (!(btnDisabled || loading)) {
|
|
7081
|
+
openPanel();
|
|
7082
|
+
mouseenterEvent(evnt);
|
|
7089
7083
|
}
|
|
7090
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7091
|
-
key: 3,
|
|
7092
|
-
ref: contentWrapperfElem,
|
|
7093
|
-
class: 'vxe-tooltip--content',
|
|
7094
|
-
style: wrapperStyle
|
|
7095
|
-
}, contVNs);
|
|
7096
7084
|
};
|
|
7097
|
-
const
|
|
7085
|
+
const mouseleaveTargetEvent = evnt => {
|
|
7086
|
+
hidePanel();
|
|
7087
|
+
mouseleaveEvent(evnt);
|
|
7088
|
+
};
|
|
7089
|
+
const mouseenterEvent = evnt => {
|
|
7090
|
+
dispatchEvent('mouseenter', {}, evnt);
|
|
7091
|
+
};
|
|
7092
|
+
const mouseleaveEvent = evnt => {
|
|
7093
|
+
dispatchEvent('mouseleave', {}, evnt);
|
|
7094
|
+
};
|
|
7095
|
+
const contextmenuEvent = evnt => {
|
|
7096
|
+
dispatchEvent('contextmenu', {}, evnt);
|
|
7097
|
+
};
|
|
7098
|
+
const clickTargetEvent = evnt => {
|
|
7098
7099
|
const {
|
|
7099
|
-
|
|
7100
|
-
|
|
7101
|
-
isArrow,
|
|
7102
|
-
enterable
|
|
7100
|
+
loading,
|
|
7101
|
+
trigger
|
|
7103
7102
|
} = props;
|
|
7104
|
-
const
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
onMouseenter: wrapperMouseenterEvent,
|
|
7115
|
-
onMouseleave: wrapperMouseleaveEvent
|
|
7116
|
-
};
|
|
7103
|
+
const btnDisabled = computeBtnDisabled.value;
|
|
7104
|
+
if (!(btnDisabled || loading)) {
|
|
7105
|
+
if (trigger === 'click') {
|
|
7106
|
+
if (reactData.visiblePanel) {
|
|
7107
|
+
hidePanel();
|
|
7108
|
+
} else {
|
|
7109
|
+
openPanel();
|
|
7110
|
+
}
|
|
7111
|
+
}
|
|
7112
|
+
clickEvent(evnt);
|
|
7117
7113
|
}
|
|
7118
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7119
|
-
ref: refElem,
|
|
7120
|
-
class: ['vxe-tooltip--wrapper', `theme--${theme}`, popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
|
|
7121
|
-
$tooltip: $xeTooltip
|
|
7122
|
-
}) : popupClassName : '', {
|
|
7123
|
-
[`size--${vSize}`]: vSize,
|
|
7124
|
-
[`placement--${tipStore.placement}`]: tipStore.placement,
|
|
7125
|
-
'is--enterable': enterable,
|
|
7126
|
-
'is--visible': visible,
|
|
7127
|
-
'is--arrow': isArrow,
|
|
7128
|
-
'is--active': tipActive
|
|
7129
|
-
}],
|
|
7130
|
-
style: tipStore.style,
|
|
7131
|
-
...ons
|
|
7132
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7133
|
-
key: 'tby',
|
|
7134
|
-
class: 'vxe-tooltip--body'
|
|
7135
|
-
}, [renderContent(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7136
|
-
class: 'vxe-tooltip--arrow',
|
|
7137
|
-
style: tipStore.arrowStyle
|
|
7138
|
-
})]), ...(defaultSlot ? vn_getSlotVNs(defaultSlot({})) : [])]);
|
|
7139
7114
|
};
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
handleVisible(reactData.target || getSelectorEl(), props.content);
|
|
7150
|
-
} else {
|
|
7151
|
-
tooltipMethods.close();
|
|
7115
|
+
const openPanel = () => {
|
|
7116
|
+
const {
|
|
7117
|
+
trigger
|
|
7118
|
+
} = props;
|
|
7119
|
+
const panelElem = refBtnPanel.value;
|
|
7120
|
+
if (panelElem) {
|
|
7121
|
+
panelElem.dataset.active = 'Y';
|
|
7122
|
+
if (!reactData.initialized) {
|
|
7123
|
+
reactData.initialized = true;
|
|
7152
7124
|
}
|
|
7125
|
+
internalData.showTime = setTimeout(() => {
|
|
7126
|
+
if (panelElem.dataset.active === 'Y') {
|
|
7127
|
+
mouseenterDropdownEvent();
|
|
7128
|
+
} else {
|
|
7129
|
+
reactData.isAniVisible = false;
|
|
7130
|
+
}
|
|
7131
|
+
}, trigger === 'click' ? 50 : 250);
|
|
7153
7132
|
}
|
|
7154
|
-
|
|
7155
|
-
}
|
|
7156
|
-
(
|
|
7157
|
-
const
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
} = props;
|
|
7168
|
-
const wrapperElem = refElem.value;
|
|
7169
|
-
if (wrapperElem) {
|
|
7170
|
-
const parentNode = wrapperElem.parentNode;
|
|
7171
|
-
if (parentNode) {
|
|
7172
|
-
reactData.tipContent = content;
|
|
7173
|
-
reactData.tipZindex = nextZIndex();
|
|
7174
|
-
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().arrayEach(wrapperElem.children, (elem, index) => {
|
|
7175
|
-
if (index) {
|
|
7176
|
-
parentNode.insertBefore(elem, wrapperElem);
|
|
7177
|
-
if (!reactData.target) {
|
|
7178
|
-
reactData.target = elem;
|
|
7179
|
-
}
|
|
7180
|
-
}
|
|
7181
|
-
});
|
|
7182
|
-
parentNode.removeChild(wrapperElem);
|
|
7183
|
-
const {
|
|
7184
|
-
target
|
|
7185
|
-
} = reactData;
|
|
7186
|
-
if (target) {
|
|
7187
|
-
if (trigger === 'hover') {
|
|
7188
|
-
target.onmouseenter = targetMouseenterEvent;
|
|
7189
|
-
target.onmouseleave = targetMouseleaveEvent;
|
|
7190
|
-
} else if (trigger === 'click') {
|
|
7191
|
-
target.onclick = clickEvent;
|
|
7133
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7134
|
+
};
|
|
7135
|
+
const hidePanel = () => {
|
|
7136
|
+
const panelElem = refBtnPanel.value;
|
|
7137
|
+
clearTimeout(internalData.showTime);
|
|
7138
|
+
if (panelElem) {
|
|
7139
|
+
panelElem.dataset.active = 'N';
|
|
7140
|
+
setTimeout(() => {
|
|
7141
|
+
if (panelElem.dataset.active !== 'Y') {
|
|
7142
|
+
reactData.visiblePanel = false;
|
|
7143
|
+
setTimeout(() => {
|
|
7144
|
+
if (panelElem.dataset.active !== 'Y') {
|
|
7145
|
+
reactData.isAniVisible = false;
|
|
7192
7146
|
}
|
|
7193
|
-
}
|
|
7194
|
-
if (props.modelValue) {
|
|
7195
|
-
handleVisible(target || getSelectorEl(), content);
|
|
7196
|
-
}
|
|
7147
|
+
}, 350);
|
|
7197
7148
|
}
|
|
7149
|
+
}, 100);
|
|
7150
|
+
} else {
|
|
7151
|
+
reactData.isAniVisible = false;
|
|
7152
|
+
reactData.visiblePanel = false;
|
|
7153
|
+
}
|
|
7154
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7155
|
+
};
|
|
7156
|
+
const mouseleaveDropdownEvent = () => {
|
|
7157
|
+
hidePanel();
|
|
7158
|
+
};
|
|
7159
|
+
const renderTooltipIcon = (tipOpts, type) => {
|
|
7160
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_tooltip, {
|
|
7161
|
+
useHTML: tipOpts.useHTML,
|
|
7162
|
+
content: tipOpts.content,
|
|
7163
|
+
enterable: tipOpts.enterable,
|
|
7164
|
+
theme: tipOpts.theme
|
|
7165
|
+
}, {
|
|
7166
|
+
default() {
|
|
7167
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7168
|
+
class: `vxe-button--item vxe-button--tooltip-${type}-icon`
|
|
7169
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
7170
|
+
class: tipOpts.icon || getIcon().BUTTON_TOOLTIP_ICON
|
|
7171
|
+
})]);
|
|
7198
7172
|
}
|
|
7199
7173
|
});
|
|
7200
|
-
}
|
|
7201
|
-
(
|
|
7174
|
+
};
|
|
7175
|
+
const renderContent = () => {
|
|
7202
7176
|
const {
|
|
7203
|
-
|
|
7177
|
+
content,
|
|
7178
|
+
suffixIcon,
|
|
7179
|
+
loading,
|
|
7180
|
+
prefixTooltip,
|
|
7181
|
+
suffixTooltip,
|
|
7182
|
+
suffixRender
|
|
7183
|
+
} = props;
|
|
7184
|
+
const prefixIcon = props.prefixIcon || props.icon;
|
|
7185
|
+
const prefixRender = props.prefixRender || props.iconRender;
|
|
7186
|
+
const prefixTipOpts = computePrefixTipOpts.value;
|
|
7187
|
+
const suffixTipOpts = computeSuffixTipOpts.value;
|
|
7188
|
+
const prefixIconSlot = slots.prefix || slots.icon;
|
|
7189
|
+
const suffixIconSlot = slots.suffix;
|
|
7190
|
+
const defaultSlot = slots.default;
|
|
7191
|
+
const contVNs = [];
|
|
7192
|
+
if (prefixTooltip) {
|
|
7193
|
+
contVNs.push(renderTooltipIcon(prefixTipOpts, 'prefix'));
|
|
7194
|
+
}
|
|
7195
|
+
if (loading) {
|
|
7196
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
7197
|
+
class: ['vxe-button--item vxe-button--loading-icon', getIcon().BUTTON_LOADING]
|
|
7198
|
+
}));
|
|
7199
|
+
} else if (prefixIconSlot) {
|
|
7200
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7201
|
+
class: 'vxe-button--item vxe-button--custom-prefix-icon'
|
|
7202
|
+
}, prefixIconSlot({})));
|
|
7203
|
+
} else if (prefixRender) {
|
|
7204
|
+
const compConf = renderer.get(prefixRender.name);
|
|
7205
|
+
const pIconMethod = compConf ? compConf.renderButtonPrefix : null;
|
|
7206
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7207
|
+
class: ['vxe-button--item vxe-button--custom-prefix-icon']
|
|
7208
|
+
}, pIconMethod ? vn_getSlotVNs(pIconMethod(prefixRender, {
|
|
7209
|
+
$button: $xeButton
|
|
7210
|
+
})) : []));
|
|
7211
|
+
} else if (prefixIcon) {
|
|
7212
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
7213
|
+
class: ['vxe-button--item vxe-button--prefix-icon', prefixIcon]
|
|
7214
|
+
}));
|
|
7215
|
+
}
|
|
7216
|
+
if (defaultSlot) {
|
|
7217
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7218
|
+
class: 'vxe-button--item vxe-button--content'
|
|
7219
|
+
}, defaultSlot({})));
|
|
7220
|
+
} else if (content) {
|
|
7221
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7222
|
+
class: 'vxe-button--item vxe-button--content'
|
|
7223
|
+
}, getFuncText(content)));
|
|
7224
|
+
}
|
|
7225
|
+
if (suffixIconSlot) {
|
|
7226
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7227
|
+
class: 'vxe-button--item vxe-button--custom-suffix-icon'
|
|
7228
|
+
}, suffixIconSlot({})));
|
|
7229
|
+
} else if (suffixRender) {
|
|
7230
|
+
const compConf = renderer.get(suffixRender.name);
|
|
7231
|
+
const sIconMethod = compConf ? compConf.renderButtonSuffix : null;
|
|
7232
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7233
|
+
class: ['vxe-button--item vxe-button--custom-suffix-icon']
|
|
7234
|
+
}, sIconMethod ? vn_getSlotVNs(sIconMethod(suffixRender, {
|
|
7235
|
+
$button: $xeButton
|
|
7236
|
+
})) : []));
|
|
7237
|
+
} else if (suffixIcon) {
|
|
7238
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
7239
|
+
class: ['vxe-button--item vxe-button--suffix-icon', suffixIcon]
|
|
7240
|
+
}));
|
|
7241
|
+
}
|
|
7242
|
+
if (suffixTooltip) {
|
|
7243
|
+
contVNs.push(renderTooltipIcon(suffixTipOpts, 'suffix'));
|
|
7244
|
+
}
|
|
7245
|
+
return contVNs;
|
|
7246
|
+
};
|
|
7247
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
7248
|
+
emit(type, createEvent(evnt, {
|
|
7249
|
+
$button: $xeButton
|
|
7250
|
+
}, params));
|
|
7251
|
+
};
|
|
7252
|
+
buttonMethods = {
|
|
7253
|
+
dispatchEvent,
|
|
7254
|
+
openPanel,
|
|
7255
|
+
closePanel: hidePanel,
|
|
7256
|
+
focus() {
|
|
7257
|
+
const btnElem = refButton.value;
|
|
7258
|
+
if (btnElem) {
|
|
7259
|
+
btnElem.focus();
|
|
7260
|
+
}
|
|
7261
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7262
|
+
},
|
|
7263
|
+
blur() {
|
|
7264
|
+
const btnElem = refButton.value;
|
|
7265
|
+
if (btnElem) {
|
|
7266
|
+
btnElem.blur();
|
|
7267
|
+
}
|
|
7268
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7269
|
+
}
|
|
7270
|
+
};
|
|
7271
|
+
const handleGlobalMousewheelEvent = evnt => {
|
|
7272
|
+
const panelElem = refBtnPanel.value;
|
|
7273
|
+
if (reactData.visiblePanel && !getEventTargetNode(evnt, panelElem).flag) {
|
|
7274
|
+
hidePanel();
|
|
7275
|
+
}
|
|
7276
|
+
};
|
|
7277
|
+
const handleGlobalMousedownEvent = evnt => {
|
|
7278
|
+
const btnDisabled = computeBtnDisabled.value;
|
|
7279
|
+
const {
|
|
7280
|
+
visiblePanel
|
|
7204
7281
|
} = reactData;
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7282
|
+
if (!btnDisabled) {
|
|
7283
|
+
const el = refElem.value;
|
|
7284
|
+
const panelElem = refBtnPanel.value;
|
|
7285
|
+
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
|
|
7286
|
+
if (visiblePanel && !reactData.isActivated) {
|
|
7287
|
+
hidePanel();
|
|
7288
|
+
}
|
|
7210
7289
|
}
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7290
|
+
};
|
|
7291
|
+
const handleGlobalResizeEvent = () => {
|
|
7292
|
+
const {
|
|
7293
|
+
visiblePanel
|
|
7294
|
+
} = reactData;
|
|
7295
|
+
if (visiblePanel) {
|
|
7296
|
+
updatePlacement();
|
|
7214
7297
|
}
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7298
|
+
};
|
|
7299
|
+
Object.assign($xeButton, buttonMethods);
|
|
7300
|
+
const renderVN = () => {
|
|
7301
|
+
const {
|
|
7302
|
+
className,
|
|
7303
|
+
popupClassName,
|
|
7304
|
+
trigger,
|
|
7305
|
+
title,
|
|
7306
|
+
routerLink,
|
|
7307
|
+
type,
|
|
7308
|
+
destroyOnClose,
|
|
7309
|
+
name,
|
|
7310
|
+
loading,
|
|
7311
|
+
shadow,
|
|
7312
|
+
showDropdownIcon
|
|
7313
|
+
} = props;
|
|
7314
|
+
const {
|
|
7315
|
+
initialized,
|
|
7316
|
+
isAniVisible,
|
|
7317
|
+
visiblePanel
|
|
7318
|
+
} = reactData;
|
|
7319
|
+
const isFormBtn = computeIsFormBtn.value;
|
|
7320
|
+
const btnMode = computeBtnMode.value;
|
|
7321
|
+
const btnStatus = computeBtnStatus.value;
|
|
7322
|
+
const btnRound = computeBtnRound.value;
|
|
7323
|
+
const btnAlign = computeBtnAlign.value;
|
|
7324
|
+
const btnCircle = computeBtnCircle.value;
|
|
7325
|
+
const btnTransfer = computeBtnTransfer.value;
|
|
7326
|
+
const btnDisabled = computeBtnDisabled.value;
|
|
7327
|
+
const permissionInfo = computePermissionInfo.value;
|
|
7328
|
+
const downBtnList = computeDownBtnList.value;
|
|
7329
|
+
const vSize = computeSize.value;
|
|
7330
|
+
const dropdownsSlot = slots.dropdowns;
|
|
7331
|
+
if (!permissionInfo.visible) {
|
|
7332
|
+
return renderEmptyElement($xeButton);
|
|
7333
|
+
}
|
|
7334
|
+
if (dropdownsSlot || downBtnList.length) {
|
|
7335
|
+
const btnOns = {
|
|
7336
|
+
onContextmenu: contextmenuEvent
|
|
7337
|
+
};
|
|
7338
|
+
const panelOns = {};
|
|
7339
|
+
if (trigger === 'hover') {
|
|
7340
|
+
// hover 触发
|
|
7341
|
+
btnOns.onMouseenter = mouseenterTargetEvent;
|
|
7342
|
+
btnOns.onMouseleave = mouseleaveTargetEvent;
|
|
7343
|
+
panelOns.onMouseenter = mouseenterDropdownEvent;
|
|
7344
|
+
panelOns.onMouseleave = mouseleaveDropdownEvent;
|
|
7219
7345
|
}
|
|
7346
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7347
|
+
ref: refElem,
|
|
7348
|
+
class: ['vxe-button--dropdown', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
|
|
7349
|
+
$button: $xeButton
|
|
7350
|
+
}) : className : '', {
|
|
7351
|
+
[`size--${vSize}`]: vSize,
|
|
7352
|
+
'is--active': visiblePanel
|
|
7353
|
+
}]
|
|
7354
|
+
}, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
|
|
7355
|
+
ref: refButton,
|
|
7356
|
+
class: ['vxe-button', 'vxe-button--link', `type--${btnMode}`, btnAlign ? `align--${btnAlign}` : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
|
|
7357
|
+
$button: $xeButton
|
|
7358
|
+
}) : className : '', {
|
|
7359
|
+
[`size--${vSize}`]: vSize,
|
|
7360
|
+
[`theme--${btnStatus}`]: btnStatus,
|
|
7361
|
+
'is--round': btnRound,
|
|
7362
|
+
'is--circle': btnCircle,
|
|
7363
|
+
'is--shadow': shadow,
|
|
7364
|
+
'is--disabled': btnDisabled || loading,
|
|
7365
|
+
'is--loading': loading
|
|
7366
|
+
}],
|
|
7367
|
+
title,
|
|
7368
|
+
name,
|
|
7369
|
+
type: isFormBtn ? type : 'button',
|
|
7370
|
+
disabled: btnDisabled || loading,
|
|
7371
|
+
to: routerLink,
|
|
7372
|
+
onClick: clickTargetEvent,
|
|
7373
|
+
...btnOns
|
|
7374
|
+
}, {
|
|
7375
|
+
default() {
|
|
7376
|
+
return renderContent().concat(showDropdownIcon ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
7377
|
+
class: `vxe-button--dropdown-arrow ${getIcon().BUTTON_DROPDOWN}`
|
|
7378
|
+
})] : []);
|
|
7379
|
+
}
|
|
7380
|
+
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('button', {
|
|
7381
|
+
ref: refButton,
|
|
7382
|
+
class: ['vxe-button', `type--${btnMode}`, btnAlign ? `align--${btnAlign}` : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
|
|
7383
|
+
$button: $xeButton
|
|
7384
|
+
}) : className : '', {
|
|
7385
|
+
[`size--${vSize}`]: vSize,
|
|
7386
|
+
[`theme--${btnStatus}`]: btnStatus,
|
|
7387
|
+
'is--round': btnRound,
|
|
7388
|
+
'is--circle': btnCircle,
|
|
7389
|
+
'is--shadow': shadow,
|
|
7390
|
+
'is--disabled': btnDisabled || loading,
|
|
7391
|
+
'is--loading': loading
|
|
7392
|
+
}],
|
|
7393
|
+
title,
|
|
7394
|
+
name,
|
|
7395
|
+
type: isFormBtn ? type : 'button',
|
|
7396
|
+
disabled: btnDisabled || loading,
|
|
7397
|
+
onClick: clickTargetEvent,
|
|
7398
|
+
...btnOns
|
|
7399
|
+
}, renderContent().concat(showDropdownIcon ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
7400
|
+
class: `vxe-button--dropdown-arrow ${getIcon().BUTTON_DROPDOWN}`
|
|
7401
|
+
})] : [])), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.Teleport, {
|
|
7402
|
+
to: 'body',
|
|
7403
|
+
disabled: btnTransfer ? !initialized : true
|
|
7404
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7405
|
+
ref: refBtnPanel,
|
|
7406
|
+
class: ['vxe-button--dropdown-panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
|
|
7407
|
+
$button: $xeButton
|
|
7408
|
+
}) : popupClassName : '', {
|
|
7409
|
+
[`size--${vSize}`]: vSize,
|
|
7410
|
+
'is--transfer': btnTransfer,
|
|
7411
|
+
'ani--leave': isAniVisible,
|
|
7412
|
+
'ani--enter': visiblePanel
|
|
7413
|
+
}],
|
|
7414
|
+
placement: reactData.panelPlacement,
|
|
7415
|
+
style: reactData.panelStyle,
|
|
7416
|
+
...panelOns
|
|
7417
|
+
}, initialized && (visiblePanel || isAniVisible) ? [dropdownsSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7418
|
+
class: 'vxe-button--dropdown-wrapper',
|
|
7419
|
+
onMousedown: mousedownDropdownEvent,
|
|
7420
|
+
onClick: clickDropdownEvent
|
|
7421
|
+
}, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? dropdownsSlot({}) : []) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7422
|
+
class: 'vxe-button--dropdown-wrapper'
|
|
7423
|
+
}, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? downBtnList.map((option, i) => {
|
|
7424
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeButtonComponent, {
|
|
7425
|
+
key: i,
|
|
7426
|
+
type: option.type,
|
|
7427
|
+
mode: option.mode || btnMode,
|
|
7428
|
+
className: option.className,
|
|
7429
|
+
name: option.name,
|
|
7430
|
+
routerLink: option.routerLink,
|
|
7431
|
+
permissionCode: option.permissionCode,
|
|
7432
|
+
title: option.title,
|
|
7433
|
+
content: option.content,
|
|
7434
|
+
status: option.status,
|
|
7435
|
+
icon: option.icon,
|
|
7436
|
+
round: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(option.round) ? option.round : btnMode === 'text' ? false : btnRound,
|
|
7437
|
+
circle: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(option.circle) ? option.circle : btnMode === 'text' ? false : btnCircle,
|
|
7438
|
+
disabled: option.disabled,
|
|
7439
|
+
loading: option.loading,
|
|
7440
|
+
align: option.align,
|
|
7441
|
+
onClick(params) {
|
|
7442
|
+
downBtnClickEvent(params, option);
|
|
7443
|
+
}
|
|
7444
|
+
});
|
|
7445
|
+
}) : [])] : [])])]);
|
|
7446
|
+
}
|
|
7447
|
+
if (routerLink) {
|
|
7448
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
|
|
7449
|
+
ref: refButton,
|
|
7450
|
+
class: ['vxe-button', 'vxe-button--link', `type--${btnMode}`, btnAlign ? `align--${btnAlign}` : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
|
|
7451
|
+
$button: $xeButton
|
|
7452
|
+
}) : className : '', {
|
|
7453
|
+
[`size--${vSize}`]: vSize,
|
|
7454
|
+
[`theme--${btnStatus}`]: btnStatus,
|
|
7455
|
+
'is--round': btnRound,
|
|
7456
|
+
'is--circle': btnCircle,
|
|
7457
|
+
'is--shadow': shadow,
|
|
7458
|
+
'is--disabled': btnDisabled || loading,
|
|
7459
|
+
'is--loading': loading
|
|
7460
|
+
}],
|
|
7461
|
+
title,
|
|
7462
|
+
name,
|
|
7463
|
+
type: isFormBtn ? type : 'button',
|
|
7464
|
+
disabled: btnDisabled || loading,
|
|
7465
|
+
to: routerLink,
|
|
7466
|
+
onClick: clickEvent,
|
|
7467
|
+
onMouseenter: mouseenterEvent,
|
|
7468
|
+
onMouseleave: mouseleaveEvent,
|
|
7469
|
+
onContextmenu: contextmenuEvent
|
|
7470
|
+
}, {
|
|
7471
|
+
default() {
|
|
7472
|
+
return renderContent();
|
|
7473
|
+
}
|
|
7474
|
+
});
|
|
7475
|
+
}
|
|
7476
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('button', {
|
|
7477
|
+
ref: refButton,
|
|
7478
|
+
class: ['vxe-button', `type--${btnMode}`, btnAlign ? `align--${btnAlign}` : '', className ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(className) ? className({
|
|
7479
|
+
$button: $xeButton
|
|
7480
|
+
}) : className : '', {
|
|
7481
|
+
[`size--${vSize}`]: vSize,
|
|
7482
|
+
[`theme--${btnStatus}`]: btnStatus,
|
|
7483
|
+
'is--round': btnRound,
|
|
7484
|
+
'is--circle': btnCircle,
|
|
7485
|
+
'is--shadow': shadow,
|
|
7486
|
+
'is--disabled': btnDisabled || loading,
|
|
7487
|
+
'is--loading': loading
|
|
7488
|
+
}],
|
|
7489
|
+
title,
|
|
7490
|
+
name,
|
|
7491
|
+
type: isFormBtn ? type : 'button',
|
|
7492
|
+
disabled: btnDisabled || loading,
|
|
7493
|
+
onClick: clickEvent,
|
|
7494
|
+
onMouseenter: mouseenterEvent,
|
|
7495
|
+
onMouseleave: mouseleaveEvent,
|
|
7496
|
+
onContextmenu: contextmenuEvent
|
|
7497
|
+
}, renderContent());
|
|
7498
|
+
};
|
|
7499
|
+
$xeButton.renderVN = renderVN;
|
|
7500
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
7501
|
+
if (props.type === 'text') {
|
|
7502
|
+
warnLog('vxe.error.delProp', ['[button] type=text', 'mode=text']);
|
|
7220
7503
|
}
|
|
7504
|
+
globalEvents.on($xeButton, 'mousewheel', handleGlobalMousewheelEvent);
|
|
7505
|
+
globalEvents.on($xeButton, 'mousedown', handleGlobalMousedownEvent);
|
|
7506
|
+
globalEvents.on($xeButton, 'resize', handleGlobalResizeEvent);
|
|
7221
7507
|
});
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7508
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onUnmounted)(() => {
|
|
7509
|
+
globalEvents.off($xeButton, 'mousewheel');
|
|
7510
|
+
globalEvents.off($xeButton, 'mousedown');
|
|
7511
|
+
globalEvents.off($xeButton, 'resize');
|
|
7512
|
+
});
|
|
7513
|
+
return $xeButton;
|
|
7225
7514
|
},
|
|
7226
7515
|
render() {
|
|
7227
7516
|
return this.renderVN();
|
|
7228
7517
|
}
|
|
7229
|
-
})
|
|
7230
|
-
|
|
7518
|
+
});
|
|
7519
|
+
/* harmony default export */ var src_button = (VxeButtonComponent);
|
|
7520
|
+
;// CONCATENATED MODULE: ./packages/button/index.ts
|
|
7231
7521
|
|
|
7232
7522
|
|
|
7233
7523
|
|
|
7524
|
+
const VxeButton = Object.assign({}, src_button, {
|
|
7525
|
+
install(app) {
|
|
7526
|
+
app.component(src_button.name, src_button);
|
|
7527
|
+
}
|
|
7528
|
+
});
|
|
7529
|
+
dynamicApp.use(VxeButton);
|
|
7530
|
+
index_esm_VxeUI.component(src_button);
|
|
7531
|
+
const Button = VxeButton;
|
|
7532
|
+
/* harmony default export */ var packages_button = (VxeButton);
|
|
7533
|
+
;// CONCATENATED MODULE: ./packages/backtop/src/backtop.ts
|
|
7234
7534
|
|
|
7235
7535
|
|
|
7236
7536
|
|
|
@@ -7238,818 +7538,593 @@ function handleBooleanDefaultValue(value) {
|
|
|
7238
7538
|
|
|
7239
7539
|
|
|
7240
7540
|
|
|
7241
|
-
|
|
7242
|
-
|
|
7541
|
+
|
|
7542
|
+
function createInternalData() {
|
|
7543
|
+
return {
|
|
7544
|
+
targetEl: null
|
|
7545
|
+
};
|
|
7546
|
+
}
|
|
7547
|
+
function createReactData() {
|
|
7548
|
+
return {
|
|
7549
|
+
showBtn: false,
|
|
7550
|
+
backtopZindex: 0
|
|
7551
|
+
};
|
|
7552
|
+
}
|
|
7553
|
+
/* harmony default export */ var backtop = (defineVxeComponent({
|
|
7554
|
+
name: 'VxeBacktop',
|
|
7243
7555
|
props: {
|
|
7244
|
-
|
|
7245
|
-
* 按钮类型
|
|
7246
|
-
*/
|
|
7247
|
-
type: String,
|
|
7248
|
-
mode: String,
|
|
7249
|
-
className: [String, Function],
|
|
7250
|
-
popupClassName: [String, Function],
|
|
7251
|
-
/**
|
|
7252
|
-
* 按钮尺寸
|
|
7253
|
-
*/
|
|
7556
|
+
target: String,
|
|
7254
7557
|
size: {
|
|
7255
7558
|
type: String,
|
|
7256
|
-
default: () => getConfig().
|
|
7257
|
-
},
|
|
7258
|
-
zIndex: Number,
|
|
7259
|
-
/**
|
|
7260
|
-
* 用来标识这一项
|
|
7261
|
-
*/
|
|
7262
|
-
name: [String, Number],
|
|
7263
|
-
routerLink: Object,
|
|
7264
|
-
/**
|
|
7265
|
-
* 权限码
|
|
7266
|
-
*/
|
|
7267
|
-
permissionCode: [String, Number],
|
|
7268
|
-
/**
|
|
7269
|
-
* 按钮内容
|
|
7270
|
-
*/
|
|
7271
|
-
content: String,
|
|
7272
|
-
/**
|
|
7273
|
-
* 固定显示下拉面板的方向
|
|
7274
|
-
*/
|
|
7275
|
-
placement: String,
|
|
7276
|
-
/**
|
|
7277
|
-
* 按钮状态
|
|
7278
|
-
*/
|
|
7279
|
-
status: String,
|
|
7280
|
-
/**
|
|
7281
|
-
* 标题
|
|
7282
|
-
*/
|
|
7283
|
-
title: String,
|
|
7284
|
-
/**
|
|
7285
|
-
* 按钮的前缀图标,属于 prefix-icon 的简写
|
|
7286
|
-
*/
|
|
7287
|
-
icon: String,
|
|
7288
|
-
iconRender: Object,
|
|
7289
|
-
/**
|
|
7290
|
-
* 按钮的前缀图标
|
|
7291
|
-
*/
|
|
7292
|
-
prefixIcon: String,
|
|
7293
|
-
prefixRender: Object,
|
|
7294
|
-
/**
|
|
7295
|
-
* 按钮的后缀图标
|
|
7296
|
-
*/
|
|
7297
|
-
suffixIcon: String,
|
|
7298
|
-
suffixRender: Object,
|
|
7299
|
-
/**
|
|
7300
|
-
* 圆角边框
|
|
7301
|
-
*/
|
|
7302
|
-
round: Boolean,
|
|
7303
|
-
/**
|
|
7304
|
-
* 圆角按钮
|
|
7305
|
-
*/
|
|
7306
|
-
circle: Boolean,
|
|
7307
|
-
/**
|
|
7308
|
-
* 是否禁用
|
|
7309
|
-
*/
|
|
7310
|
-
disabled: Boolean,
|
|
7311
|
-
/**
|
|
7312
|
-
* 是否加载中
|
|
7313
|
-
*/
|
|
7314
|
-
loading: Boolean,
|
|
7315
|
-
trigger: {
|
|
7316
|
-
type: String,
|
|
7317
|
-
default: () => getConfig().button.trigger
|
|
7318
|
-
},
|
|
7319
|
-
align: String,
|
|
7320
|
-
prefixTooltip: Object,
|
|
7321
|
-
suffixTooltip: Object,
|
|
7322
|
-
options: Array,
|
|
7323
|
-
showDropdownIcon: {
|
|
7324
|
-
type: Boolean,
|
|
7325
|
-
default: () => getConfig().button.showDropdownIcon
|
|
7559
|
+
default: () => getConfig().backtop.size || getConfig().size
|
|
7326
7560
|
},
|
|
7327
|
-
|
|
7328
|
-
* 在下拉面板关闭时销毁内容
|
|
7329
|
-
*/
|
|
7330
|
-
destroyOnClose: {
|
|
7561
|
+
circle: {
|
|
7331
7562
|
type: Boolean,
|
|
7332
|
-
default: () => getConfig().
|
|
7563
|
+
default: () => getConfig().backtop.circle
|
|
7333
7564
|
},
|
|
7334
|
-
|
|
7335
|
-
|
|
7336
|
-
|
|
7337
|
-
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
|
|
7352
|
-
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
}
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
}
|
|
7370
|
-
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
}
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
const
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7396
|
-
|
|
7397
|
-
|
|
7398
|
-
|
|
7399
|
-
|
|
7400
|
-
|
|
7401
|
-
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
const computeBtnDisabled = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7405
|
-
const {
|
|
7406
|
-
disabled
|
|
7407
|
-
} = props;
|
|
7408
|
-
const permissionInfo = computePermissionInfo.value;
|
|
7409
|
-
return disabled || permissionInfo.disabled;
|
|
7410
|
-
});
|
|
7411
|
-
const computeIsFormBtn = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7412
|
-
const {
|
|
7413
|
-
type
|
|
7414
|
-
} = props;
|
|
7415
|
-
if (type) {
|
|
7416
|
-
return ['submit', 'reset', 'button'].indexOf(type) > -1;
|
|
7417
|
-
}
|
|
7418
|
-
return false;
|
|
7419
|
-
});
|
|
7420
|
-
const computeBtnMode = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7421
|
-
const {
|
|
7422
|
-
type,
|
|
7423
|
-
mode
|
|
7424
|
-
} = props;
|
|
7425
|
-
if (mode === 'text' || type === 'text' || $xeButtonGroup && $xeButtonGroup.props.mode === 'text') {
|
|
7426
|
-
return 'text';
|
|
7427
|
-
}
|
|
7428
|
-
return 'button';
|
|
7429
|
-
});
|
|
7430
|
-
const computeBtnStatus = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7431
|
-
const {
|
|
7432
|
-
status
|
|
7433
|
-
} = props;
|
|
7434
|
-
if (status) {
|
|
7435
|
-
return status;
|
|
7436
|
-
}
|
|
7437
|
-
if ($xeButtonGroup) {
|
|
7438
|
-
return $xeButtonGroup.props.status;
|
|
7439
|
-
}
|
|
7440
|
-
return '';
|
|
7441
|
-
});
|
|
7442
|
-
const computeBtnAlign = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7443
|
-
const {
|
|
7444
|
-
align
|
|
7445
|
-
} = props;
|
|
7446
|
-
if (align) {
|
|
7447
|
-
return align;
|
|
7448
|
-
}
|
|
7449
|
-
if ($xeButtonGroup) {
|
|
7450
|
-
return $xeButtonGroup.props.align;
|
|
7451
|
-
}
|
|
7452
|
-
return false;
|
|
7453
|
-
});
|
|
7454
|
-
const computeBtnRound = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7565
|
+
right: {
|
|
7566
|
+
type: [String, Number],
|
|
7567
|
+
default: () => getConfig().backtop.right
|
|
7568
|
+
},
|
|
7569
|
+
bottom: {
|
|
7570
|
+
type: [String, Number],
|
|
7571
|
+
default: () => getConfig().backtop.bottom
|
|
7572
|
+
},
|
|
7573
|
+
status: {
|
|
7574
|
+
type: [String, Number],
|
|
7575
|
+
default: () => getConfig().backtop.status
|
|
7576
|
+
},
|
|
7577
|
+
icon: {
|
|
7578
|
+
type: String,
|
|
7579
|
+
default: () => getConfig().backtop.icon
|
|
7580
|
+
},
|
|
7581
|
+
showIcon: {
|
|
7582
|
+
type: Boolean,
|
|
7583
|
+
default: () => getConfig().backtop.showIcon
|
|
7584
|
+
},
|
|
7585
|
+
content: {
|
|
7586
|
+
type: [String, Number],
|
|
7587
|
+
default: () => getConfig().backtop.content
|
|
7588
|
+
},
|
|
7589
|
+
showContent: {
|
|
7590
|
+
type: Boolean,
|
|
7591
|
+
default: () => getConfig().backtop.showContent
|
|
7592
|
+
},
|
|
7593
|
+
showTop: {
|
|
7594
|
+
type: Boolean,
|
|
7595
|
+
default: () => getConfig().backtop.showTop
|
|
7596
|
+
},
|
|
7597
|
+
showBottom: {
|
|
7598
|
+
type: Boolean,
|
|
7599
|
+
default: () => getConfig().backtop.showBottom
|
|
7600
|
+
},
|
|
7601
|
+
shadow: {
|
|
7602
|
+
type: Boolean,
|
|
7603
|
+
default: () => getConfig().backtop.shadow
|
|
7604
|
+
},
|
|
7605
|
+
zIndex: {
|
|
7606
|
+
type: [String, Number],
|
|
7607
|
+
default: () => getConfig().backtop.zIndex
|
|
7608
|
+
},
|
|
7609
|
+
threshold: {
|
|
7610
|
+
type: [String, Number],
|
|
7611
|
+
default: () => getConfig().backtop.threshold
|
|
7612
|
+
},
|
|
7613
|
+
position: {
|
|
7614
|
+
type: String,
|
|
7615
|
+
default: () => getConfig().backtop.position
|
|
7616
|
+
}
|
|
7617
|
+
},
|
|
7618
|
+
emits: ['click'],
|
|
7619
|
+
setup(props, context) {
|
|
7620
|
+
const {
|
|
7621
|
+
slots,
|
|
7622
|
+
emit
|
|
7623
|
+
} = context;
|
|
7624
|
+
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
7625
|
+
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7626
|
+
const {
|
|
7627
|
+
computeSize
|
|
7628
|
+
} = useSize(props);
|
|
7629
|
+
const internalData = createInternalData();
|
|
7630
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)(createReactData());
|
|
7631
|
+
const refMaps = {
|
|
7632
|
+
refElem
|
|
7633
|
+
};
|
|
7634
|
+
const computeWrapperStyle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7455
7635
|
const {
|
|
7456
|
-
|
|
7636
|
+
right,
|
|
7637
|
+
bottom
|
|
7457
7638
|
} = props;
|
|
7458
|
-
if (round) {
|
|
7459
|
-
return round;
|
|
7460
|
-
}
|
|
7461
|
-
if ($xeButtonGroup) {
|
|
7462
|
-
return $xeButtonGroup.props.round;
|
|
7463
|
-
}
|
|
7464
|
-
return false;
|
|
7465
|
-
});
|
|
7466
|
-
const computeBtnCircle = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7467
7639
|
const {
|
|
7468
|
-
|
|
7469
|
-
} =
|
|
7470
|
-
|
|
7471
|
-
|
|
7640
|
+
backtopZindex
|
|
7641
|
+
} = reactData;
|
|
7642
|
+
const stys = {};
|
|
7643
|
+
if (right) {
|
|
7644
|
+
stys.right = toCssUnit(right);
|
|
7472
7645
|
}
|
|
7473
|
-
if (
|
|
7474
|
-
|
|
7646
|
+
if (bottom) {
|
|
7647
|
+
stys.bottom = toCssUnit(bottom);
|
|
7475
7648
|
}
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
const computeDownBtnList = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7479
|
-
const {
|
|
7480
|
-
options
|
|
7481
|
-
} = props;
|
|
7482
|
-
if (options) {
|
|
7483
|
-
return options.filter(item => {
|
|
7484
|
-
const {
|
|
7485
|
-
permissionCode
|
|
7486
|
-
} = item;
|
|
7487
|
-
return !permissionCode || permission.checkVisible(permissionCode);
|
|
7488
|
-
});
|
|
7649
|
+
if (backtopZindex) {
|
|
7650
|
+
stys.zIndex = backtopZindex;
|
|
7489
7651
|
}
|
|
7490
|
-
return
|
|
7491
|
-
});
|
|
7492
|
-
const computePrefixTipOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7493
|
-
return Object.assign({}, getConfig().button.prefixTooltip, props.prefixTooltip);
|
|
7494
|
-
});
|
|
7495
|
-
const computeSuffixTipOpts = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7496
|
-
return Object.assign({}, getConfig().button.suffixTooltip, props.suffixTooltip);
|
|
7652
|
+
return stys;
|
|
7497
7653
|
});
|
|
7498
|
-
const
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7654
|
+
const computeMaps = {};
|
|
7655
|
+
const $xeBacktop = {
|
|
7656
|
+
xID,
|
|
7657
|
+
props,
|
|
7658
|
+
context,
|
|
7659
|
+
internalData,
|
|
7660
|
+
reactData,
|
|
7661
|
+
getRefMaps: () => refMaps,
|
|
7662
|
+
getComputeMaps: () => computeMaps
|
|
7507
7663
|
};
|
|
7508
|
-
const
|
|
7664
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
7665
|
+
emit(type, createEvent(evnt, {
|
|
7666
|
+
$backtop: $xeBacktop
|
|
7667
|
+
}, params));
|
|
7668
|
+
};
|
|
7669
|
+
const showBacktop = () => {
|
|
7509
7670
|
const {
|
|
7510
|
-
|
|
7671
|
+
position,
|
|
7672
|
+
zIndex
|
|
7511
7673
|
} = props;
|
|
7512
7674
|
const {
|
|
7513
|
-
|
|
7675
|
+
backtopZindex
|
|
7514
7676
|
} = reactData;
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
placement,
|
|
7521
|
-
teleportTo: btnTransfer
|
|
7522
|
-
});
|
|
7523
|
-
const panelStyle = Object.assign(ppObj.style, {
|
|
7524
|
-
zIndex: panelIndex
|
|
7525
|
-
});
|
|
7526
|
-
reactData.panelStyle = panelStyle;
|
|
7527
|
-
reactData.panelPlacement = ppObj.placement;
|
|
7528
|
-
};
|
|
7529
|
-
handleStyle();
|
|
7530
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(handleStyle);
|
|
7531
|
-
};
|
|
7532
|
-
const clickEvent = evnt => {
|
|
7533
|
-
if ($xeButtonGroup) {
|
|
7534
|
-
$xeButtonGroup.handleClick({
|
|
7535
|
-
name: props.name
|
|
7536
|
-
}, evnt);
|
|
7537
|
-
}
|
|
7538
|
-
dispatchEvent('click', {
|
|
7539
|
-
$event: evnt
|
|
7540
|
-
}, evnt);
|
|
7541
|
-
};
|
|
7542
|
-
const downBtnClickEvent = (params, option) => {
|
|
7543
|
-
const {
|
|
7544
|
-
$event
|
|
7545
|
-
} = params;
|
|
7546
|
-
hidePanel();
|
|
7547
|
-
dispatchEvent('dropdown-click', {
|
|
7548
|
-
name: option.name,
|
|
7549
|
-
option
|
|
7550
|
-
}, $event);
|
|
7551
|
-
};
|
|
7552
|
-
const mousedownDropdownEvent = evnt => {
|
|
7553
|
-
const isLeftBtn = evnt.button === 0;
|
|
7554
|
-
if (isLeftBtn) {
|
|
7555
|
-
evnt.stopPropagation();
|
|
7556
|
-
}
|
|
7557
|
-
};
|
|
7558
|
-
const clickDropdownEvent = evnt => {
|
|
7559
|
-
const dropdownElem = evnt.currentTarget;
|
|
7560
|
-
const panelElem = refBtnPanel.value;
|
|
7561
|
-
const {
|
|
7562
|
-
flag,
|
|
7563
|
-
targetElem
|
|
7564
|
-
} = getEventTargetNode(evnt, dropdownElem, 'vxe-button');
|
|
7565
|
-
if (flag) {
|
|
7566
|
-
if (panelElem) {
|
|
7567
|
-
panelElem.dataset.active = 'N';
|
|
7677
|
+
if (zIndex) {
|
|
7678
|
+
reactData.backtopZindex = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(zIndex);
|
|
7679
|
+
} else if (position === 'fixed') {
|
|
7680
|
+
if (backtopZindex < getLastZIndex()) {
|
|
7681
|
+
reactData.backtopZindex = nextZIndex();
|
|
7568
7682
|
}
|
|
7569
|
-
reactData.visiblePanel = false;
|
|
7570
|
-
setTimeout(() => {
|
|
7571
|
-
if (!panelElem || panelElem.dataset.active !== 'Y') {
|
|
7572
|
-
reactData.isAniVisible = false;
|
|
7573
|
-
}
|
|
7574
|
-
}, 350);
|
|
7575
|
-
dispatchEvent('dropdown-click', {
|
|
7576
|
-
name: targetElem.getAttribute('name'),
|
|
7577
|
-
option: null
|
|
7578
|
-
}, evnt);
|
|
7579
|
-
}
|
|
7580
|
-
};
|
|
7581
|
-
const mouseenterDropdownEvent = () => {
|
|
7582
|
-
const panelElem = refBtnPanel.value;
|
|
7583
|
-
if (panelElem) {
|
|
7584
|
-
panelElem.dataset.active = 'Y';
|
|
7585
|
-
reactData.isAniVisible = true;
|
|
7586
|
-
setTimeout(() => {
|
|
7587
|
-
if (panelElem.dataset.active === 'Y') {
|
|
7588
|
-
reactData.visiblePanel = true;
|
|
7589
|
-
updateZindex();
|
|
7590
|
-
updatePlacement();
|
|
7591
|
-
setTimeout(() => {
|
|
7592
|
-
if (reactData.visiblePanel) {
|
|
7593
|
-
updatePlacement();
|
|
7594
|
-
}
|
|
7595
|
-
}, 50);
|
|
7596
|
-
}
|
|
7597
|
-
}, 20);
|
|
7598
|
-
}
|
|
7599
|
-
};
|
|
7600
|
-
const mouseenterTargetEvent = evnt => {
|
|
7601
|
-
const {
|
|
7602
|
-
loading
|
|
7603
|
-
} = props;
|
|
7604
|
-
const btnDisabled = computeBtnDisabled.value;
|
|
7605
|
-
if (!(btnDisabled || loading)) {
|
|
7606
|
-
openPanel();
|
|
7607
|
-
mouseenterEvent(evnt);
|
|
7608
7683
|
}
|
|
7684
|
+
reactData.showBtn = true;
|
|
7609
7685
|
};
|
|
7610
|
-
const
|
|
7611
|
-
|
|
7612
|
-
mouseleaveEvent(evnt);
|
|
7613
|
-
};
|
|
7614
|
-
const mouseenterEvent = evnt => {
|
|
7615
|
-
dispatchEvent('mouseenter', {}, evnt);
|
|
7616
|
-
};
|
|
7617
|
-
const mouseleaveEvent = evnt => {
|
|
7618
|
-
dispatchEvent('mouseleave', {}, evnt);
|
|
7619
|
-
};
|
|
7620
|
-
const contextmenuEvent = evnt => {
|
|
7621
|
-
dispatchEvent('contextmenu', {}, evnt);
|
|
7686
|
+
const hideBacktop = () => {
|
|
7687
|
+
reactData.showBtn = false;
|
|
7622
7688
|
};
|
|
7623
|
-
const
|
|
7624
|
-
const {
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
const
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
openPanel();
|
|
7635
|
-
}
|
|
7636
|
-
}
|
|
7637
|
-
clickEvent(evnt);
|
|
7689
|
+
const handleScrollEvent = evnt => {
|
|
7690
|
+
const {
|
|
7691
|
+
threshold
|
|
7692
|
+
} = props;
|
|
7693
|
+
const currentEl = evnt.currentTarget;
|
|
7694
|
+
const scrollTop = currentEl.scrollTop;
|
|
7695
|
+
const showBtn = scrollTop > Math.max(1, external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(threshold));
|
|
7696
|
+
if (showBtn) {
|
|
7697
|
+
showBacktop();
|
|
7698
|
+
} else {
|
|
7699
|
+
hideBacktop();
|
|
7638
7700
|
}
|
|
7639
7701
|
};
|
|
7640
|
-
const
|
|
7702
|
+
const handleToTop = () => {
|
|
7641
7703
|
const {
|
|
7642
|
-
|
|
7643
|
-
} =
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
mouseenterDropdownEvent();
|
|
7653
|
-
} else {
|
|
7654
|
-
reactData.isAniVisible = false;
|
|
7655
|
-
}
|
|
7656
|
-
}, trigger === 'click' ? 50 : 250);
|
|
7704
|
+
targetEl
|
|
7705
|
+
} = internalData;
|
|
7706
|
+
if (!targetEl) {
|
|
7707
|
+
return;
|
|
7708
|
+
}
|
|
7709
|
+
const scrollTop = targetEl.scrollTop;
|
|
7710
|
+
if (scrollTop > 0) {
|
|
7711
|
+
requestAnimationFrame(handleToTop);
|
|
7712
|
+
const currScrollTop = scrollTop - Math.max(12, scrollTop / 6);
|
|
7713
|
+
targetEl.scrollTop = currScrollTop > 10 ? currScrollTop : 0;
|
|
7657
7714
|
}
|
|
7658
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7659
7715
|
};
|
|
7660
|
-
const
|
|
7661
|
-
const
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
if (panelElem.dataset.active !== 'Y') {
|
|
7667
|
-
reactData.visiblePanel = false;
|
|
7668
|
-
setTimeout(() => {
|
|
7669
|
-
if (panelElem.dataset.active !== 'Y') {
|
|
7670
|
-
reactData.isAniVisible = false;
|
|
7671
|
-
}
|
|
7672
|
-
}, 350);
|
|
7673
|
-
}
|
|
7674
|
-
}, 100);
|
|
7675
|
-
} else {
|
|
7676
|
-
reactData.isAniVisible = false;
|
|
7677
|
-
reactData.visiblePanel = false;
|
|
7716
|
+
const removeScrollEvent = () => {
|
|
7717
|
+
const {
|
|
7718
|
+
targetEl
|
|
7719
|
+
} = internalData;
|
|
7720
|
+
if (targetEl) {
|
|
7721
|
+
targetEl.removeEventListener('scroll', handleScrollEvent);
|
|
7678
7722
|
}
|
|
7679
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7680
7723
|
};
|
|
7681
|
-
const
|
|
7682
|
-
|
|
7724
|
+
const addScrollEvent = () => {
|
|
7725
|
+
const {
|
|
7726
|
+
targetEl
|
|
7727
|
+
} = internalData;
|
|
7728
|
+
if (targetEl) {
|
|
7729
|
+
targetEl.addEventListener('scroll', handleScrollEvent, {
|
|
7730
|
+
passive: true
|
|
7731
|
+
});
|
|
7732
|
+
}
|
|
7683
7733
|
};
|
|
7684
|
-
const
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
return
|
|
7693
|
-
|
|
7694
|
-
|
|
7695
|
-
|
|
7696
|
-
|
|
7734
|
+
const handleTargetElement = () => {
|
|
7735
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
|
|
7736
|
+
const {
|
|
7737
|
+
target
|
|
7738
|
+
} = props;
|
|
7739
|
+
if (!target) {
|
|
7740
|
+
removeScrollEvent();
|
|
7741
|
+
errLog('vxe.error.reqProp', ['target']);
|
|
7742
|
+
return;
|
|
7743
|
+
}
|
|
7744
|
+
if (external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(target)) {
|
|
7745
|
+
const tEl = document.querySelector(target);
|
|
7746
|
+
if (!tEl) {
|
|
7747
|
+
errLog('vxe.error.errProp', [`target=${target}`, 'body']);
|
|
7748
|
+
}
|
|
7749
|
+
const {
|
|
7750
|
+
targetEl
|
|
7751
|
+
} = internalData;
|
|
7752
|
+
if (targetEl !== tEl) {
|
|
7753
|
+
removeScrollEvent();
|
|
7754
|
+
internalData.targetEl = tEl;
|
|
7755
|
+
addScrollEvent();
|
|
7756
|
+
}
|
|
7697
7757
|
}
|
|
7698
7758
|
});
|
|
7699
7759
|
};
|
|
7700
|
-
const
|
|
7760
|
+
const clickEvent = evnt => {
|
|
7761
|
+
handleToTop();
|
|
7762
|
+
dispatchEvent('click', {}, evnt);
|
|
7763
|
+
};
|
|
7764
|
+
const tagMethods = {
|
|
7765
|
+
dispatchEvent
|
|
7766
|
+
};
|
|
7767
|
+
const tagPrivateMethods = {};
|
|
7768
|
+
Object.assign($xeBacktop, tagMethods, tagPrivateMethods);
|
|
7769
|
+
const renderVN = () => {
|
|
7701
7770
|
const {
|
|
7771
|
+
circle,
|
|
7772
|
+
position,
|
|
7773
|
+
status,
|
|
7774
|
+
icon,
|
|
7775
|
+
showIcon,
|
|
7702
7776
|
content,
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
suffixRender
|
|
7777
|
+
showContent,
|
|
7778
|
+
showTop,
|
|
7779
|
+
showBottom,
|
|
7780
|
+
shadow
|
|
7708
7781
|
} = props;
|
|
7709
|
-
const
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
const
|
|
7713
|
-
const
|
|
7714
|
-
const suffixIconSlot = slots.suffix;
|
|
7782
|
+
const {
|
|
7783
|
+
showBtn
|
|
7784
|
+
} = reactData;
|
|
7785
|
+
const wrapperStyle = computeWrapperStyle.value;
|
|
7786
|
+
const vSize = computeSize.value;
|
|
7715
7787
|
const defaultSlot = slots.default;
|
|
7716
|
-
const
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
}
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
}
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7788
|
+
const topSlot = slots.top;
|
|
7789
|
+
const bottomSlot = slots.bottom;
|
|
7790
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7791
|
+
ref: refElem,
|
|
7792
|
+
class: ['vxe-backtop', position === 'fixed' ? 'is--' + position : 'is--absolute', {
|
|
7793
|
+
[`size--${vSize}`]: vSize,
|
|
7794
|
+
'is--visible': showBtn
|
|
7795
|
+
}],
|
|
7796
|
+
style: wrapperStyle
|
|
7797
|
+
}, [showTop && topSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7798
|
+
class: 'vxe-backtop--top-wrapper'
|
|
7799
|
+
}, topSlot({})) : renderEmptyElement($xeBacktop), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7800
|
+
class: 'vxe-backtop--content-wrapper',
|
|
7801
|
+
onClick: clickEvent
|
|
7802
|
+
}, [defaultSlot ? defaultSlot({}) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_button, {
|
|
7803
|
+
circle,
|
|
7804
|
+
status,
|
|
7805
|
+
shadow,
|
|
7806
|
+
icon: showIcon ? icon || getIcon().BACKTOP_TOP : '',
|
|
7807
|
+
content: showContent ? content : ''
|
|
7808
|
+
})]]), showBottom && bottomSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7809
|
+
class: 'vxe-backtop--bottom-wrapper'
|
|
7810
|
+
}, bottomSlot({})) : renderEmptyElement($xeBacktop)]);
|
|
7811
|
+
};
|
|
7812
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.target, () => {
|
|
7813
|
+
handleTargetElement();
|
|
7814
|
+
});
|
|
7815
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
7816
|
+
handleTargetElement();
|
|
7817
|
+
});
|
|
7818
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
7819
|
+
removeScrollEvent();
|
|
7820
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(reactData, createReactData());
|
|
7821
|
+
external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().assign(internalData, createInternalData());
|
|
7822
|
+
});
|
|
7823
|
+
$xeBacktop.renderVN = renderVN;
|
|
7824
|
+
return $xeBacktop;
|
|
7825
|
+
},
|
|
7826
|
+
render() {
|
|
7827
|
+
return this.renderVN();
|
|
7828
|
+
}
|
|
7829
|
+
}));
|
|
7830
|
+
;// CONCATENATED MODULE: ./packages/backtop/index.ts
|
|
7831
|
+
|
|
7832
|
+
|
|
7833
|
+
|
|
7834
|
+
const VxeBacktop = Object.assign({}, backtop, {
|
|
7835
|
+
install(app) {
|
|
7836
|
+
app.component(backtop.name, backtop);
|
|
7837
|
+
}
|
|
7838
|
+
});
|
|
7839
|
+
dynamicApp.use(VxeBacktop);
|
|
7840
|
+
index_esm_VxeUI.component(backtop);
|
|
7841
|
+
const Backtop = VxeBacktop;
|
|
7842
|
+
/* harmony default export */ var packages_backtop = (VxeBacktop);
|
|
7843
|
+
;// CONCATENATED MODULE: ./packages/badge/src/badge.ts
|
|
7844
|
+
|
|
7845
|
+
|
|
7846
|
+
|
|
7847
|
+
|
|
7848
|
+
/* harmony default export */ var badge = (defineVxeComponent({
|
|
7849
|
+
name: 'VxeBadge',
|
|
7850
|
+
props: {
|
|
7851
|
+
count: [String, Number],
|
|
7852
|
+
dot: Boolean,
|
|
7853
|
+
content: [String, Number],
|
|
7854
|
+
size: {
|
|
7855
|
+
type: String,
|
|
7856
|
+
default: () => getConfig().badge.size || getConfig().size
|
|
7857
|
+
}
|
|
7858
|
+
},
|
|
7859
|
+
emits: [],
|
|
7860
|
+
setup(props, context) {
|
|
7861
|
+
const {
|
|
7862
|
+
emit,
|
|
7863
|
+
slots
|
|
7864
|
+
} = context;
|
|
7865
|
+
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
7866
|
+
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7867
|
+
const {
|
|
7868
|
+
computeSize
|
|
7869
|
+
} = useSize(props);
|
|
7870
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
|
|
7871
|
+
const refMaps = {
|
|
7872
|
+
refElem
|
|
7873
|
+
};
|
|
7874
|
+
const computeCountNum = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7875
|
+
const {
|
|
7876
|
+
count
|
|
7877
|
+
} = props;
|
|
7878
|
+
return count ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(count) : 0;
|
|
7879
|
+
});
|
|
7880
|
+
const computeMaps = {};
|
|
7881
|
+
const $xeBadge = {
|
|
7882
|
+
xID,
|
|
7883
|
+
props,
|
|
7884
|
+
context,
|
|
7885
|
+
reactData,
|
|
7886
|
+
getRefMaps: () => refMaps,
|
|
7887
|
+
getComputeMaps: () => computeMaps
|
|
7771
7888
|
};
|
|
7772
7889
|
const dispatchEvent = (type, params, evnt) => {
|
|
7773
7890
|
emit(type, createEvent(evnt, {
|
|
7774
|
-
$
|
|
7891
|
+
$badge: $xeBadge
|
|
7775
7892
|
}, params));
|
|
7776
7893
|
};
|
|
7777
|
-
|
|
7778
|
-
dispatchEvent
|
|
7779
|
-
openPanel,
|
|
7780
|
-
closePanel: hidePanel,
|
|
7781
|
-
focus() {
|
|
7782
|
-
const btnElem = refButton.value;
|
|
7783
|
-
if (btnElem) {
|
|
7784
|
-
btnElem.focus();
|
|
7785
|
-
}
|
|
7786
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7787
|
-
},
|
|
7788
|
-
blur() {
|
|
7789
|
-
const btnElem = refButton.value;
|
|
7790
|
-
if (btnElem) {
|
|
7791
|
-
btnElem.blur();
|
|
7792
|
-
}
|
|
7793
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
|
|
7794
|
-
}
|
|
7795
|
-
};
|
|
7796
|
-
const handleGlobalMousewheelEvent = evnt => {
|
|
7797
|
-
const panelElem = refBtnPanel.value;
|
|
7798
|
-
if (reactData.visiblePanel && !getEventTargetNode(evnt, panelElem).flag) {
|
|
7799
|
-
hidePanel();
|
|
7800
|
-
}
|
|
7801
|
-
};
|
|
7802
|
-
const handleGlobalMousedownEvent = evnt => {
|
|
7803
|
-
const btnDisabled = computeBtnDisabled.value;
|
|
7804
|
-
const {
|
|
7805
|
-
visiblePanel
|
|
7806
|
-
} = reactData;
|
|
7807
|
-
if (!btnDisabled) {
|
|
7808
|
-
const el = refElem.value;
|
|
7809
|
-
const panelElem = refBtnPanel.value;
|
|
7810
|
-
reactData.isActivated = getEventTargetNode(evnt, el).flag || getEventTargetNode(evnt, panelElem).flag;
|
|
7811
|
-
if (visiblePanel && !reactData.isActivated) {
|
|
7812
|
-
hidePanel();
|
|
7813
|
-
}
|
|
7814
|
-
}
|
|
7815
|
-
};
|
|
7816
|
-
const handleGlobalResizeEvent = () => {
|
|
7817
|
-
const {
|
|
7818
|
-
visiblePanel
|
|
7819
|
-
} = reactData;
|
|
7820
|
-
if (visiblePanel) {
|
|
7821
|
-
updatePlacement();
|
|
7822
|
-
}
|
|
7894
|
+
const collapsePaneMethods = {
|
|
7895
|
+
dispatchEvent
|
|
7823
7896
|
};
|
|
7824
|
-
|
|
7897
|
+
const collapsePanePrivateMethods = {};
|
|
7898
|
+
Object.assign($xeBadge, collapsePaneMethods, collapsePanePrivateMethods);
|
|
7825
7899
|
const renderVN = () => {
|
|
7826
7900
|
const {
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
trigger,
|
|
7830
|
-
title,
|
|
7831
|
-
routerLink,
|
|
7832
|
-
type,
|
|
7833
|
-
destroyOnClose,
|
|
7834
|
-
name,
|
|
7835
|
-
loading,
|
|
7836
|
-
showDropdownIcon
|
|
7901
|
+
dot,
|
|
7902
|
+
content
|
|
7837
7903
|
} = props;
|
|
7838
|
-
const {
|
|
7839
|
-
initialized,
|
|
7840
|
-
isAniVisible,
|
|
7841
|
-
visiblePanel
|
|
7842
|
-
} = reactData;
|
|
7843
|
-
const isFormBtn = computeIsFormBtn.value;
|
|
7844
|
-
const btnMode = computeBtnMode.value;
|
|
7845
|
-
const btnStatus = computeBtnStatus.value;
|
|
7846
|
-
const btnRound = computeBtnRound.value;
|
|
7847
|
-
const btnAlign = computeBtnAlign.value;
|
|
7848
|
-
const btnCircle = computeBtnCircle.value;
|
|
7849
|
-
const btnTransfer = computeBtnTransfer.value;
|
|
7850
|
-
const btnDisabled = computeBtnDisabled.value;
|
|
7851
|
-
const permissionInfo = computePermissionInfo.value;
|
|
7852
|
-
const downBtnList = computeDownBtnList.value;
|
|
7853
7904
|
const vSize = computeSize.value;
|
|
7854
|
-
const
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
}
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
}],
|
|
7915
|
-
title,
|
|
7916
|
-
name,
|
|
7917
|
-
type: isFormBtn ? type : 'button',
|
|
7918
|
-
disabled: btnDisabled || loading,
|
|
7919
|
-
onClick: clickTargetEvent,
|
|
7920
|
-
...btnOns
|
|
7921
|
-
}, renderContent().concat(showDropdownIcon ? [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
7922
|
-
class: `vxe-button--dropdown-arrow ${getIcon().BUTTON_DROPDOWN}`
|
|
7923
|
-
})] : [])), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(external_commonjs_vue_commonjs2_vue_root_Vue_.Teleport, {
|
|
7924
|
-
to: 'body',
|
|
7925
|
-
disabled: btnTransfer ? !initialized : true
|
|
7926
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7927
|
-
ref: refBtnPanel,
|
|
7928
|
-
class: ['vxe-button--dropdown-panel', popupClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(popupClassName) ? popupClassName({
|
|
7929
|
-
$button: $xeButton
|
|
7930
|
-
}) : popupClassName : '', {
|
|
7931
|
-
[`size--${vSize}`]: vSize,
|
|
7932
|
-
'is--transfer': btnTransfer,
|
|
7933
|
-
'ani--leave': isAniVisible,
|
|
7934
|
-
'ani--enter': visiblePanel
|
|
7935
|
-
}],
|
|
7936
|
-
placement: reactData.panelPlacement,
|
|
7937
|
-
style: reactData.panelStyle,
|
|
7938
|
-
...panelOns
|
|
7939
|
-
}, initialized && (visiblePanel || isAniVisible) ? [dropdownsSlot ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7940
|
-
class: 'vxe-button--dropdown-wrapper',
|
|
7941
|
-
onMousedown: mousedownDropdownEvent,
|
|
7942
|
-
onClick: clickDropdownEvent
|
|
7943
|
-
}, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? dropdownsSlot({}) : []) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7944
|
-
class: 'vxe-button--dropdown-wrapper'
|
|
7945
|
-
}, initialized && (destroyOnClose ? visiblePanel || isAniVisible : true) ? downBtnList.map((option, i) => {
|
|
7946
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeButtonComponent, {
|
|
7947
|
-
key: i,
|
|
7948
|
-
type: option.type,
|
|
7949
|
-
mode: option.mode || btnMode,
|
|
7950
|
-
className: option.className,
|
|
7951
|
-
name: option.name,
|
|
7952
|
-
routerLink: option.routerLink,
|
|
7953
|
-
permissionCode: option.permissionCode,
|
|
7954
|
-
title: option.title,
|
|
7955
|
-
content: option.content,
|
|
7956
|
-
status: option.status,
|
|
7957
|
-
icon: option.icon,
|
|
7958
|
-
round: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(option.round) ? option.round : btnMode === 'text' ? false : btnRound,
|
|
7959
|
-
circle: external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(option.circle) ? option.circle : btnMode === 'text' ? false : btnCircle,
|
|
7960
|
-
disabled: option.disabled,
|
|
7961
|
-
loading: option.loading,
|
|
7962
|
-
align: option.align,
|
|
7963
|
-
onClick(params) {
|
|
7964
|
-
downBtnClickEvent(params, option);
|
|
7965
|
-
}
|
|
7966
|
-
});
|
|
7967
|
-
}) : [])] : [])])]);
|
|
7905
|
+
const countNum = computeCountNum.value;
|
|
7906
|
+
const defaultSlot = slots.default;
|
|
7907
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7908
|
+
ref: refElem,
|
|
7909
|
+
class: ['vxe-badge', {
|
|
7910
|
+
[`size--${vSize}`]: vSize,
|
|
7911
|
+
'is--dot': dot
|
|
7912
|
+
}]
|
|
7913
|
+
}, [defaultSlot || content ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
7914
|
+
class: 'vxe-badge--content'
|
|
7915
|
+
}, defaultSlot ? defaultSlot({}) : `${content || ''}`) : [], countNum ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7916
|
+
class: 'vxe-badge--count'
|
|
7917
|
+
}, countNum > 99 ? '99+' : `${countNum}`) : renderEmptyElement($xeBadge)]);
|
|
7918
|
+
};
|
|
7919
|
+
$xeBadge.renderVN = renderVN;
|
|
7920
|
+
return $xeBadge;
|
|
7921
|
+
},
|
|
7922
|
+
render() {
|
|
7923
|
+
return this.renderVN();
|
|
7924
|
+
}
|
|
7925
|
+
}));
|
|
7926
|
+
;// CONCATENATED MODULE: ./packages/badge/index.ts
|
|
7927
|
+
|
|
7928
|
+
|
|
7929
|
+
|
|
7930
|
+
const VxeBadge = Object.assign({}, badge, {
|
|
7931
|
+
install(app) {
|
|
7932
|
+
app.component(badge.name, badge);
|
|
7933
|
+
}
|
|
7934
|
+
});
|
|
7935
|
+
dynamicApp.use(VxeBadge);
|
|
7936
|
+
index_esm_VxeUI.component(badge);
|
|
7937
|
+
const Badge = VxeBadge;
|
|
7938
|
+
/* harmony default export */ var packages_badge = (VxeBadge);
|
|
7939
|
+
;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb-item.ts
|
|
7940
|
+
|
|
7941
|
+
|
|
7942
|
+
|
|
7943
|
+
|
|
7944
|
+
/* harmony default export */ var breadcrumb_item = (defineVxeComponent({
|
|
7945
|
+
name: 'VxeBreadcrumbItem',
|
|
7946
|
+
props: {
|
|
7947
|
+
title: String,
|
|
7948
|
+
routerLink: Object
|
|
7949
|
+
},
|
|
7950
|
+
emits: [],
|
|
7951
|
+
setup(props, context) {
|
|
7952
|
+
const {
|
|
7953
|
+
slots
|
|
7954
|
+
} = context;
|
|
7955
|
+
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
7956
|
+
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
7957
|
+
const $xeBreadcrumb = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.inject)('$xeBreadcrumb', null);
|
|
7958
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
|
|
7959
|
+
const refMaps = {
|
|
7960
|
+
refElem
|
|
7961
|
+
};
|
|
7962
|
+
const computeSeparator = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.computed)(() => {
|
|
7963
|
+
if ($xeBreadcrumb) {
|
|
7964
|
+
return $xeBreadcrumb.props.separator;
|
|
7968
7965
|
}
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
'is--circle': btnCircle,
|
|
7979
|
-
'is--disabled': btnDisabled || loading,
|
|
7980
|
-
'is--loading': loading
|
|
7981
|
-
}],
|
|
7982
|
-
title,
|
|
7983
|
-
name,
|
|
7984
|
-
type: isFormBtn ? type : 'button',
|
|
7985
|
-
disabled: btnDisabled || loading,
|
|
7986
|
-
to: routerLink,
|
|
7987
|
-
onClick: clickEvent,
|
|
7988
|
-
onMouseenter: mouseenterEvent,
|
|
7989
|
-
onMouseleave: mouseleaveEvent,
|
|
7990
|
-
onContextmenu: contextmenuEvent
|
|
7991
|
-
}, {
|
|
7992
|
-
default() {
|
|
7993
|
-
return renderContent();
|
|
7994
|
-
}
|
|
7995
|
-
});
|
|
7966
|
+
return '';
|
|
7967
|
+
});
|
|
7968
|
+
const clickEvent = evnt => {
|
|
7969
|
+
if ($xeBreadcrumb) {
|
|
7970
|
+
const item = {
|
|
7971
|
+
title: props.title,
|
|
7972
|
+
routerLink: props.routerLink
|
|
7973
|
+
};
|
|
7974
|
+
$xeBreadcrumb.handleClickLink(evnt, item);
|
|
7996
7975
|
}
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
7976
|
+
};
|
|
7977
|
+
const computeMaps = {};
|
|
7978
|
+
const $xeBreadcrumbItem = {
|
|
7979
|
+
xID,
|
|
7980
|
+
props,
|
|
7981
|
+
context,
|
|
7982
|
+
reactData,
|
|
7983
|
+
getRefMaps: () => refMaps,
|
|
7984
|
+
getComputeMaps: () => computeMaps
|
|
7985
|
+
};
|
|
7986
|
+
const renderVN = () => {
|
|
7987
|
+
const {
|
|
8009
7988
|
title,
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
7989
|
+
routerLink
|
|
7990
|
+
} = props;
|
|
7991
|
+
const separator = computeSeparator.value;
|
|
7992
|
+
const defaultSlot = slots.default;
|
|
7993
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7994
|
+
ref: refElem,
|
|
7995
|
+
class: 'vxe-breadcrumb-item',
|
|
7996
|
+
onClick: clickEvent
|
|
7997
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
7998
|
+
class: 'vxe-breadcrumb-item--content'
|
|
7999
|
+
}, [routerLink ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)((0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)('router-link'), {
|
|
8000
|
+
class: 'vxe-breadcrumb-item--content-link',
|
|
8001
|
+
title,
|
|
8002
|
+
to: routerLink
|
|
8003
|
+
}, {
|
|
8004
|
+
default() {
|
|
8005
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
8006
|
+
class: 'vxe-breadcrumb-item--content-text'
|
|
8007
|
+
}, defaultSlot ? defaultSlot({}) : `${title || ''}`);
|
|
8008
|
+
}
|
|
8009
|
+
}) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
8010
|
+
class: 'vxe-breadcrumb-item--content-text'
|
|
8011
|
+
}, defaultSlot ? defaultSlot({}) : `${title || ''}`)]), separator ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
8012
|
+
class: 'vxe-breadcrumb-item--separator'
|
|
8013
|
+
}, `${separator}`) : renderEmptyElement($xeBreadcrumbItem)]);
|
|
8018
8014
|
};
|
|
8019
|
-
$
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8015
|
+
$xeBreadcrumbItem.renderVN = renderVN;
|
|
8016
|
+
return $xeBreadcrumbItem;
|
|
8017
|
+
},
|
|
8018
|
+
render() {
|
|
8019
|
+
return this.renderVN();
|
|
8020
|
+
}
|
|
8021
|
+
}));
|
|
8022
|
+
;// CONCATENATED MODULE: ./packages/breadcrumb/src/breadcrumb.ts
|
|
8023
|
+
|
|
8024
|
+
|
|
8025
|
+
|
|
8026
|
+
|
|
8027
|
+
|
|
8028
|
+
/* harmony default export */ var breadcrumb = (defineVxeComponent({
|
|
8029
|
+
name: 'VxeBreadcrumb',
|
|
8030
|
+
props: {
|
|
8031
|
+
separator: {
|
|
8032
|
+
type: String,
|
|
8033
|
+
default: () => getConfig().breadcrumb.separator
|
|
8034
|
+
},
|
|
8035
|
+
options: Array
|
|
8036
|
+
},
|
|
8037
|
+
emits: ['click'],
|
|
8038
|
+
setup(props, context) {
|
|
8039
|
+
const {
|
|
8040
|
+
emit,
|
|
8041
|
+
slots
|
|
8042
|
+
} = context;
|
|
8043
|
+
const xID = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().uniqueId();
|
|
8044
|
+
const refElem = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.ref)();
|
|
8045
|
+
const reactData = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.reactive)({});
|
|
8046
|
+
const refMaps = {
|
|
8047
|
+
refElem
|
|
8048
|
+
};
|
|
8049
|
+
const computeMaps = {};
|
|
8050
|
+
const $xeBreadcrumb = {
|
|
8051
|
+
xID,
|
|
8052
|
+
props,
|
|
8053
|
+
context,
|
|
8054
|
+
reactData,
|
|
8055
|
+
getRefMaps: () => refMaps,
|
|
8056
|
+
getComputeMaps: () => computeMaps
|
|
8057
|
+
};
|
|
8058
|
+
const breadcrumbMethods = {
|
|
8059
|
+
dispatchEvent(type, params, evnt) {
|
|
8060
|
+
emit(type, createEvent(evnt, {
|
|
8061
|
+
$breadcrumb: $xeBreadcrumb
|
|
8062
|
+
}, params));
|
|
8023
8063
|
}
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8064
|
+
};
|
|
8065
|
+
const breadcrumbPrivateMethods = {
|
|
8066
|
+
handleClickLink(evnt, option) {
|
|
8067
|
+
breadcrumbMethods.dispatchEvent('click', {
|
|
8068
|
+
option
|
|
8069
|
+
}, evnt);
|
|
8070
|
+
}
|
|
8071
|
+
};
|
|
8072
|
+
Object.assign($xeBreadcrumb, breadcrumbMethods, breadcrumbPrivateMethods);
|
|
8073
|
+
const renderItems = () => {
|
|
8074
|
+
const {
|
|
8075
|
+
options
|
|
8076
|
+
} = props;
|
|
8077
|
+
if (options && options.length) {
|
|
8078
|
+
return options.map(item => {
|
|
8079
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(breadcrumb_item, {
|
|
8080
|
+
title: item.title,
|
|
8081
|
+
routerLink: item.routerLink
|
|
8082
|
+
});
|
|
8083
|
+
});
|
|
8084
|
+
}
|
|
8085
|
+
return [];
|
|
8086
|
+
};
|
|
8087
|
+
const renderVN = () => {
|
|
8088
|
+
const defaultSlot = slots.default;
|
|
8089
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
8090
|
+
ref: refElem,
|
|
8091
|
+
class: 'vxe-breadcrumb'
|
|
8092
|
+
}, defaultSlot ? defaultSlot({}) : renderItems());
|
|
8093
|
+
};
|
|
8094
|
+
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.provide)('$xeBreadcrumb', $xeBreadcrumb);
|
|
8095
|
+
$xeBreadcrumb.renderVN = renderVN;
|
|
8096
|
+
return $xeBreadcrumb;
|
|
8034
8097
|
},
|
|
8035
8098
|
render() {
|
|
8036
8099
|
return this.renderVN();
|
|
8037
8100
|
}
|
|
8101
|
+
}));
|
|
8102
|
+
;// CONCATENATED MODULE: ./packages/breadcrumb/index.ts
|
|
8103
|
+
|
|
8104
|
+
|
|
8105
|
+
|
|
8106
|
+
const VxeBreadcrumb = Object.assign({}, breadcrumb, {
|
|
8107
|
+
install(app) {
|
|
8108
|
+
app.component(breadcrumb.name, breadcrumb);
|
|
8109
|
+
}
|
|
8038
8110
|
});
|
|
8039
|
-
|
|
8040
|
-
|
|
8111
|
+
dynamicApp.use(VxeBreadcrumb);
|
|
8112
|
+
index_esm_VxeUI.component(breadcrumb);
|
|
8113
|
+
const Breadcrumb = VxeBreadcrumb;
|
|
8114
|
+
/* harmony default export */ var packages_breadcrumb = (VxeBreadcrumb);
|
|
8115
|
+
;// CONCATENATED MODULE: ./packages/breadcrumb-item/index.ts
|
|
8041
8116
|
|
|
8042
8117
|
|
|
8043
8118
|
|
|
8044
|
-
const
|
|
8119
|
+
const VxeBreadcrumbItem = Object.assign({}, breadcrumb_item, {
|
|
8045
8120
|
install(app) {
|
|
8046
|
-
app.component(
|
|
8121
|
+
app.component(breadcrumb_item.name, breadcrumb_item);
|
|
8047
8122
|
}
|
|
8048
8123
|
});
|
|
8049
|
-
dynamicApp.use(
|
|
8050
|
-
index_esm_VxeUI.component(
|
|
8051
|
-
const
|
|
8052
|
-
/* harmony default export */ var
|
|
8124
|
+
dynamicApp.use(VxeBreadcrumbItem);
|
|
8125
|
+
index_esm_VxeUI.component(breadcrumb_item);
|
|
8126
|
+
const BreadcrumbItem = VxeBreadcrumbItem;
|
|
8127
|
+
/* harmony default export */ var packages_breadcrumb_item = (VxeBreadcrumbItem);
|
|
8053
8128
|
;// CONCATENATED MODULE: ./packages/button/src/button-group.ts
|
|
8054
8129
|
|
|
8055
8130
|
|
|
@@ -23689,19 +23764,6 @@ function destroyItem($xeForm, formItem) {
|
|
|
23689
23764
|
}
|
|
23690
23765
|
reactData.staticItems = staticItems.slice(0);
|
|
23691
23766
|
}
|
|
23692
|
-
;// CONCATENATED MODULE: ./packages/tooltip/index.ts
|
|
23693
|
-
|
|
23694
|
-
|
|
23695
|
-
|
|
23696
|
-
const VxeTooltip = Object.assign({}, tooltip, {
|
|
23697
|
-
install(app) {
|
|
23698
|
-
app.component(tooltip.name, tooltip);
|
|
23699
|
-
}
|
|
23700
|
-
});
|
|
23701
|
-
dynamicApp.use(VxeTooltip);
|
|
23702
|
-
index_esm_VxeUI.component(tooltip);
|
|
23703
|
-
const Tooltip = VxeTooltip;
|
|
23704
|
-
/* harmony default export */ var packages_tooltip = (VxeTooltip);
|
|
23705
23767
|
;// CONCATENATED MODULE: ./packages/icon/src/icon.ts
|
|
23706
23768
|
|
|
23707
23769
|
|
|
@@ -28264,6 +28326,18 @@ function layout_body_createReactData() {
|
|
|
28264
28326
|
const vSize = computeSize.value;
|
|
28265
28327
|
const defaultSlot = slots.default;
|
|
28266
28328
|
const backtopSlot = slots.backtop;
|
|
28329
|
+
const backtopTopSlot = slots.backtopTop || slots['backtop-top'];
|
|
28330
|
+
const backtopBottomSlot = slots.backtopBottom || slots['backtop-bottom'];
|
|
28331
|
+
const backtopScopeSlots = {};
|
|
28332
|
+
if (backtopSlot) {
|
|
28333
|
+
backtopScopeSlots.default = backtopSlot;
|
|
28334
|
+
}
|
|
28335
|
+
if (backtopTopSlot) {
|
|
28336
|
+
backtopScopeSlots.top = backtopTopSlot;
|
|
28337
|
+
}
|
|
28338
|
+
if (backtopBottomSlot) {
|
|
28339
|
+
backtopScopeSlots.bottom = backtopBottomSlot;
|
|
28340
|
+
}
|
|
28267
28341
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('div', {
|
|
28268
28342
|
ref: refElem,
|
|
28269
28343
|
class: ['vxe-layout-body', {
|
|
@@ -28285,9 +28359,7 @@ function layout_body_createReactData() {
|
|
|
28285
28359
|
/**
|
|
28286
28360
|
* 回到顶部
|
|
28287
28361
|
*/
|
|
28288
|
-
showBacktop ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_backtop, backtopOpts,
|
|
28289
|
-
default: backtopSlot
|
|
28290
|
-
} : undefined) : renderEmptyElement($xeLayoutBody)]);
|
|
28362
|
+
showBacktop ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(packages_backtop, backtopOpts, backtopScopeSlots) : renderEmptyElement($xeLayoutBody)]);
|
|
28291
28363
|
};
|
|
28292
28364
|
$xeLayoutBody.renderVN = renderVN;
|
|
28293
28365
|
return $xeLayoutBody;
|