init
This commit is contained in:
66
unpackage/dist/dev/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.js
vendored
Normal file
66
unpackage/dist/dev/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.js
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_nutuiUni_components__constants_event = require("../_constants/event.js");
|
||||
const uni_modules_nutuiUni_components__constants_prefix = require("../_constants/prefix.js");
|
||||
require("../_utils/env.js");
|
||||
const uni_modules_nutuiUni_components__utils_style = require("../_utils/style.js");
|
||||
const popup = require("../../../../popup.js");
|
||||
if (!Math) {
|
||||
NutTransition();
|
||||
}
|
||||
const NutTransition = () => "../transition/transition.js";
|
||||
const componentName = `${uni_modules_nutuiUni_components__constants_prefix.PREFIX}-overlay`;
|
||||
const __default__ = common_vendor.defineComponent({
|
||||
name: componentName,
|
||||
options: {
|
||||
virtualHost: true,
|
||||
addGlobalClass: true,
|
||||
styleIsolation: "shared"
|
||||
}
|
||||
});
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
...__default__,
|
||||
props: popup.overlayProps,
|
||||
emits: popup.overlayEmits,
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const classes = common_vendor.computed(() => {
|
||||
return uni_modules_nutuiUni_components__utils_style.getMainClass(props, componentName, {
|
||||
[props.overlayClass]: true
|
||||
});
|
||||
});
|
||||
const innerDuration = common_vendor.computed(() => {
|
||||
if (typeof props.duration === "number")
|
||||
return props.duration;
|
||||
return Number(props.duration);
|
||||
});
|
||||
const styles = common_vendor.computed(() => {
|
||||
return uni_modules_nutuiUni_components__utils_style.getMainStyle(props, {
|
||||
transitionDuration: `${innerDuration.value}ms`,
|
||||
zIndex: props.zIndex,
|
||||
...props.overlayStyle
|
||||
});
|
||||
});
|
||||
function onClick(event) {
|
||||
emit(uni_modules_nutuiUni_components__constants_event.CLICK_EVENT, event);
|
||||
if (props.closeOnClickOverlay)
|
||||
emit(uni_modules_nutuiUni_components__constants_event.UPDATE_VISIBLE_EVENT, false);
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(onClick),
|
||||
b: common_vendor.p({
|
||||
["custom-class"]: classes.value,
|
||||
["custom-style"]: styles.value,
|
||||
show: props.visible,
|
||||
name: "fade",
|
||||
duration: innerDuration.value,
|
||||
["destroy-on-close"]: props.destroyOnClose
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
wx.createComponent(_sfc_main);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"nut-transition": "../transition/transition"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<nut-transition wx:if="{{b}}" u-s="{{['d']}}" bindclick="{{a}}" u-i="8a38d208-0" bind:__l="__l" u-p="{{b}}"><slot/></nut-transition>
|
||||
61
unpackage/dist/dev/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.wxss
vendored
Normal file
61
unpackage/dist/dev/mp-weixin/uni_modules/nutui-uni/components/overlay/overlay.wxss
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.nut-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: var(--nut-overlay-bg-color, rgba(0, 0, 0, 0.7));
|
||||
}
|
||||
.nut-overflow-hidden {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
Reference in New Issue
Block a user