增加新模块
This commit is contained in:
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
const ActionSheet = {
|
||||
// action-sheet组件
|
||||
actionSheet: {
|
||||
show: false,
|
||||
title: "",
|
||||
description: "",
|
||||
actions: [],
|
||||
index: "",
|
||||
cancelText: "",
|
||||
closeOnClickAction: true,
|
||||
safeAreaInsetBottom: true,
|
||||
openType: "",
|
||||
closeOnClickOverlay: true,
|
||||
round: 0,
|
||||
wrapMaxHeight: "600px"
|
||||
}
|
||||
};
|
||||
exports.ActionSheet = ActionSheet;
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-plus/components/u-action-sheet/actionSheet.js.map
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_vue = require("../../libs/vue.js");
|
||||
const uni_modules_uviewPlus_libs_config_props = require("../../libs/config/props.js");
|
||||
const props = uni_modules_uviewPlus_libs_vue.defineMixin({
|
||||
props: {
|
||||
// 操作菜单是否展示 (默认false)
|
||||
show: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.show
|
||||
},
|
||||
// 标题
|
||||
title: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.title
|
||||
},
|
||||
// 选项上方的描述信息
|
||||
description: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.description
|
||||
},
|
||||
// 数据
|
||||
actions: {
|
||||
type: Array,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.actions
|
||||
},
|
||||
// 取消按钮的文字,不为空时显示按钮
|
||||
cancelText: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.cancelText
|
||||
},
|
||||
// 点击某个菜单项时是否关闭弹窗
|
||||
closeOnClickAction: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.closeOnClickAction
|
||||
},
|
||||
// 处理底部安全区(默认true)
|
||||
safeAreaInsetBottom: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.safeAreaInsetBottom
|
||||
},
|
||||
// 小程序的打开方式
|
||||
openType: {
|
||||
type: String,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.openType
|
||||
},
|
||||
// 点击遮罩是否允许关闭 (默认true)
|
||||
closeOnClickOverlay: {
|
||||
type: Boolean,
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.closeOnClickOverlay
|
||||
},
|
||||
// 圆角值
|
||||
round: {
|
||||
type: [Boolean, String, Number],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.round
|
||||
},
|
||||
// 选项区域最大高度
|
||||
wrapMaxHeight: {
|
||||
type: [String],
|
||||
default: () => uni_modules_uviewPlus_libs_config_props.defProps.actionSheet.wrapMaxHeight
|
||||
}
|
||||
}
|
||||
});
|
||||
exports.props = props;
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-plus/components/u-action-sheet/props.js.map
|
||||
Vendored
+161
@@ -0,0 +1,161 @@
|
||||
"use strict";
|
||||
const uni_modules_uviewPlus_libs_mixin_openType = require("../../libs/mixin/openType.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_button = require("../../libs/mixin/button.js");
|
||||
const uni_modules_uviewPlus_components_uActionSheet_props = require("./props.js");
|
||||
const uni_modules_uviewPlus_libs_mixin_mixin = require("../../libs/mixin/mixin.js");
|
||||
const uni_modules_uviewPlus_libs_function_index = require("../../libs/function/index.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "u-action-sheet",
|
||||
// 一些props参数和methods方法,通过mixin混入,因为其他文件也会用到
|
||||
mixins: [uni_modules_uviewPlus_libs_mixin_openType.openType, uni_modules_uviewPlus_libs_mixin_button.buttonMixin, uni_modules_uviewPlus_libs_mixin_mixin.mixin, uni_modules_uviewPlus_components_uActionSheet_props.props],
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
// 操作项目的样式
|
||||
itemStyle() {
|
||||
return (index) => {
|
||||
let style = {};
|
||||
if (this.actions[index].color)
|
||||
style.color = this.actions[index].color;
|
||||
if (this.actions[index].fontSize)
|
||||
style.fontSize = uni_modules_uviewPlus_libs_function_index.addUnit(this.actions[index].fontSize);
|
||||
if (this.actions[index].disabled)
|
||||
style.color = "#c0c4cc";
|
||||
return style;
|
||||
};
|
||||
}
|
||||
},
|
||||
emits: ["close", "select", "update:show"],
|
||||
methods: {
|
||||
closeHandler() {
|
||||
if (this.closeOnClickOverlay) {
|
||||
this.$emit("update:show", false);
|
||||
this.$emit("close");
|
||||
}
|
||||
},
|
||||
// 点击取消按钮
|
||||
cancel() {
|
||||
this.$emit("update:show", false);
|
||||
this.$emit("close");
|
||||
},
|
||||
selectHandler(index) {
|
||||
const item = this.actions[index];
|
||||
if (item && !item.disabled && !item.loading) {
|
||||
this.$emit("select", item);
|
||||
if (this.closeOnClickAction) {
|
||||
this.$emit("update:show", false);
|
||||
this.$emit("close");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
|
||||
const _easycom_u_line2 = common_vendor.resolveComponent("u-line");
|
||||
const _easycom_u_loading_icon2 = common_vendor.resolveComponent("u-loading-icon");
|
||||
const _easycom_u_gap2 = common_vendor.resolveComponent("u-gap");
|
||||
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
|
||||
(_easycom_u_icon2 + _easycom_u_line2 + _easycom_u_loading_icon2 + _easycom_u_gap2 + _easycom_u_popup2)();
|
||||
}
|
||||
const _easycom_u_icon = () => "../u-icon/u-icon.js";
|
||||
const _easycom_u_line = () => "../u-line/u-line.js";
|
||||
const _easycom_u_loading_icon = () => "../u-loading-icon/u-loading-icon.js";
|
||||
const _easycom_u_gap = () => "../u-gap/u-gap.js";
|
||||
const _easycom_u_popup = () => "../u-popup/u-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_u_icon + _easycom_u_line + _easycom_u_loading_icon + _easycom_u_gap + _easycom_u_popup)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: _ctx.title
|
||||
}, _ctx.title ? {
|
||||
b: common_vendor.t(_ctx.title),
|
||||
c: common_vendor.p({
|
||||
name: "close",
|
||||
size: "17",
|
||||
color: "#c8c9cc",
|
||||
bold: true
|
||||
}),
|
||||
d: common_vendor.o((...args) => $options.cancel && $options.cancel(...args))
|
||||
} : {}, {
|
||||
e: _ctx.description
|
||||
}, _ctx.description ? {
|
||||
f: common_vendor.t(_ctx.description),
|
||||
g: common_vendor.s({
|
||||
marginTop: `${_ctx.title && _ctx.description ? 0 : "18px"}`
|
||||
})
|
||||
} : {}, {
|
||||
h: _ctx.description
|
||||
}, _ctx.description ? {} : {}, {
|
||||
i: common_vendor.f(_ctx.actions, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: !item.loading
|
||||
}, !item.loading ? common_vendor.e({
|
||||
b: common_vendor.t(item.name),
|
||||
c: common_vendor.s($options.itemStyle(index)),
|
||||
d: item.subname
|
||||
}, item.subname ? {
|
||||
e: common_vendor.t(item.subname)
|
||||
} : {}) : {
|
||||
f: "69669810-3-" + i0 + ",69669810-0",
|
||||
g: common_vendor.p({
|
||||
["custom-class"]: "van-action-sheet__loading",
|
||||
size: "18",
|
||||
mode: "circle"
|
||||
})
|
||||
}, {
|
||||
h: common_vendor.o(($event) => $options.selectHandler(index), index),
|
||||
i: !item.disabled && !item.loading ? "u-action-sheet--hover" : "",
|
||||
j: item.openType,
|
||||
k: common_vendor.o((...args) => _ctx.onGetUserInfo && _ctx.onGetUserInfo(...args), index),
|
||||
l: common_vendor.o((...args) => _ctx.onContact && _ctx.onContact(...args), index),
|
||||
m: common_vendor.o((...args) => _ctx.onGetPhoneNumber && _ctx.onGetPhoneNumber(...args), index),
|
||||
n: common_vendor.o((...args) => _ctx.onError && _ctx.onError(...args), index),
|
||||
o: common_vendor.o((...args) => _ctx.onLaunchApp && _ctx.onLaunchApp(...args), index),
|
||||
p: common_vendor.o((...args) => _ctx.onOpenSetting && _ctx.onOpenSetting(...args), index),
|
||||
q: common_vendor.o(($event) => $options.selectHandler(index), index),
|
||||
r: !item.disabled && !item.loading ? "u-action-sheet--hover" : "",
|
||||
s: index !== _ctx.actions.length - 1
|
||||
}, index !== _ctx.actions.length - 1 ? {
|
||||
t: "69669810-4-" + i0 + ",69669810-0"
|
||||
} : {}, {
|
||||
v: index
|
||||
});
|
||||
}),
|
||||
j: _ctx.lang,
|
||||
k: _ctx.sessionFrom,
|
||||
l: _ctx.sendMessageTitle,
|
||||
m: _ctx.sendMessagePath,
|
||||
n: _ctx.sendMessageImg,
|
||||
o: _ctx.showMessageCard,
|
||||
p: _ctx.appParameter,
|
||||
q: _ctx.wrapMaxHeight,
|
||||
r: _ctx.cancelText
|
||||
}, _ctx.cancelText ? {
|
||||
s: common_vendor.p({
|
||||
bgColor: "#eaeaec",
|
||||
height: "6"
|
||||
})
|
||||
} : {}, {
|
||||
t: _ctx.cancelText
|
||||
}, _ctx.cancelText ? {
|
||||
v: common_vendor.t(_ctx.cancelText),
|
||||
w: common_vendor.o(() => {
|
||||
}),
|
||||
x: common_vendor.o((...args) => $options.cancel && $options.cancel(...args))
|
||||
} : {}, {
|
||||
y: common_vendor.o($options.closeHandler),
|
||||
z: common_vendor.p({
|
||||
show: _ctx.show,
|
||||
mode: "bottom",
|
||||
safeAreaInsetBottom: _ctx.safeAreaInsetBottom,
|
||||
round: _ctx.round
|
||||
})
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-69669810"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.js.map
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"u-icon": "../u-icon/u-icon",
|
||||
"u-line": "../u-line/u-line",
|
||||
"u-loading-icon": "../u-loading-icon/u-loading-icon",
|
||||
"u-gap": "../u-gap/u-gap",
|
||||
"u-popup": "../u-popup/u-popup"
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
<u-popup wx:if="{{z}}" class="data-v-69669810" u-s="{{['d']}}" bindclose="{{y}}" u-i="69669810-0" bind:__l="__l" u-p="{{z}}"><view class="u-action-sheet data-v-69669810"><view wx:if="{{a}}" class="u-action-sheet__header data-v-69669810"><text class="u-action-sheet__header__title u-line-1 data-v-69669810">{{b}}</text><view class="u-action-sheet__header__icon-wrap data-v-69669810" catchtap="{{d}}"><u-icon wx:if="{{c}}" class="data-v-69669810" u-i="69669810-1,69669810-0" bind:__l="__l" u-p="{{c}}"></u-icon></view></view><text wx:if="{{e}}" class="u-action-sheet__description data-v-69669810" style="{{g}}">{{f}}</text><block wx:if="{{$slots.d}}"><slot></slot></block><block wx:else><u-line wx:if="{{h}}" class="data-v-69669810" u-i="69669810-2,69669810-0" bind:__l="__l"></u-line><scroll-view scroll-y class="u-action-sheet__item-wrap data-v-69669810" style="{{'max-height:' + q}}"><view wx:for="{{i}}" wx:for-item="item" wx:key="v" class="data-v-69669810"><button class="u-reset-button data-v-69669810" openType="{{item.j}}" bindgetuserinfo="{{item.k}}" bindcontact="{{item.l}}" bindgetphonenumber="{{item.m}}" binderror="{{item.n}}" bindlaunchapp="{{item.o}}" bindopensetting="{{item.p}}" lang="{{j}}" session-from="{{k}}" send-message-title="{{l}}" send-message-path="{{m}}" send-message-img="{{n}}" show-message-card="{{o}}" app-parameter="{{p}}" bindtap="{{item.q}}" hover-class="{{item.r}}"><view class="u-action-sheet__item-wrap__item data-v-69669810" catchtap="{{item.h}}" hover-class="{{item.i}}" hover-stay-time="{{150}}"><block wx:if="{{item.a}}"><text class="u-action-sheet__item-wrap__item__name data-v-69669810" style="{{item.c}}">{{item.b}}</text><text wx:if="{{item.d}}" class="u-action-sheet__item-wrap__item__subname data-v-69669810">{{item.e}}</text></block><u-loading-icon wx:else class="data-v-69669810" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g||''}}"/></view></button><u-line wx:if="{{item.s}}" class="data-v-69669810" u-i="{{item.t}}" bind:__l="__l"></u-line></view></scroll-view></block><u-gap wx:if="{{r}}" class="data-v-69669810" u-i="69669810-5,69669810-0" bind:__l="__l" u-p="{{s}}"></u-gap><view wx:if="{{t}}" class="u-action-sheet__item-wrap__item u-action-sheet__cancel data-v-69669810" hover-class="u-action-sheet--hover" bindtap="{{x}}"><text catchtouchmove="{{w}}" hover-stay-time="{{150}}" class="u-action-sheet__cancel-text data-v-69669810">{{v}}</text></view></view></u-popup>
|
||||
Vendored
+102
@@ -0,0 +1,102 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/* uni.scss */
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
.u-empty.data-v-69669810,
|
||||
.u-empty__wrap.data-v-69669810,
|
||||
.u-tabs.data-v-69669810,
|
||||
.u-tabs__wrapper.data-v-69669810,
|
||||
.u-tabs__wrapper__scroll-view-wrapper.data-v-69669810,
|
||||
.u-tabs__wrapper__scroll-view.data-v-69669810,
|
||||
.u-tabs__wrapper__nav.data-v-69669810,
|
||||
.u-tabs__wrapper__nav__line.data-v-69669810,
|
||||
.up-empty.data-v-69669810,
|
||||
.up-empty__wrap.data-v-69669810,
|
||||
.up-tabs.data-v-69669810,
|
||||
.up-tabs__wrapper.data-v-69669810,
|
||||
.up-tabs__wrapper__scroll-view-wrapper.data-v-69669810,
|
||||
.up-tabs__wrapper__scroll-view.data-v-69669810,
|
||||
.up-tabs__wrapper__nav.data-v-69669810,
|
||||
.up-tabs__wrapper__nav__line.data-v-69669810 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: auto;
|
||||
align-items: stretch;
|
||||
align-content: flex-start;
|
||||
}
|
||||
.u-reset-button.data-v-69669810 {
|
||||
width: 100%;
|
||||
}
|
||||
.u-action-sheet.data-v-69669810 {
|
||||
text-align: center;
|
||||
}
|
||||
.u-action-sheet__header.data-v-69669810 {
|
||||
position: relative;
|
||||
padding: 12px 30px;
|
||||
}
|
||||
.u-action-sheet__header__title.data-v-69669810 {
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
.u-action-sheet__header__icon-wrap.data-v-69669810 {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 15px;
|
||||
}
|
||||
.u-action-sheet__description.data-v-69669810 {
|
||||
font-size: 13px;
|
||||
color: #909193;
|
||||
margin: 18px 15px;
|
||||
text-align: center;
|
||||
}
|
||||
.u-action-sheet__item-wrap__item.data-v-69669810 {
|
||||
padding: 17px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.u-action-sheet__item-wrap__item__name.data-v-69669810 {
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
text-align: center;
|
||||
}
|
||||
.u-action-sheet__item-wrap__item__subname.data-v-69669810 {
|
||||
font-size: 13px;
|
||||
color: #c0c4cc;
|
||||
margin-top: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.u-action-sheet__cancel-text.data-v-69669810 {
|
||||
font-size: 16px;
|
||||
color: #606266;
|
||||
text-align: center;
|
||||
}
|
||||
.u-action-sheet--hover.data-v-69669810 {
|
||||
background-color: #f2f3f5;
|
||||
}
|
||||
Reference in New Issue
Block a user