This commit is contained in:
zoujiandong
2025-07-30 13:58:39 +08:00
parent afc79a0f26
commit 43abd1f3d6
360 changed files with 27253 additions and 0 deletions
@@ -0,0 +1,118 @@
"use strict";
const common_vendor = require("../../../../common/vendor.js");
const _sfc_main = {
name: "u-dropdown-item",
mixins: [common_vendor.mpMixin, common_vendor.mixin, common_vendor.props$11],
options: {
styleIsolation: "shared"
},
data() {
return {
active: false,
// 当前项是否处于展开状态
activeColor: "#2979ff",
// 激活时左边文字和右边对勾图标的颜色
inactiveColor: "#606266"
// 未激活时左边文字和右边对勾图标的颜色
};
},
computed: {
// 监听props是否发生了变化,有些值需要传递给父组件u-dropdown,无法双向绑定
propsChange() {
return `${this.title}-${this.disabled}`;
}
},
watch: {
propsChange(n) {
if (this.parent)
this.parent.init();
}
},
created() {
this.parent = false;
},
emits: ["update:modelValue", "change"],
methods: {
addUnit: common_vendor.addUnit,
init() {
let parent = common_vendor.$parent.call(this, "u-dropdown");
if (parent) {
this.parent = parent;
this.activeColor = parent.activeColor;
this.inactiveColor = parent.inactiveColor;
let exist = parent.children.find((val) => {
return this === val;
});
if (!exist)
parent.children.push(this);
if (parent.children.length == 1)
this.active = true;
parent.menuList.push({
title: this.title,
disabled: this.disabled
});
}
},
// cell被点击
cellClick(value) {
this.$emit("update:modelValue", value);
this.parent.close();
this.$emit("change", value);
}
},
mounted() {
this.init();
}
};
if (!Array) {
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
const _easycom_up_cell2 = common_vendor.resolveComponent("up-cell");
const _easycom_up_cell_group2 = common_vendor.resolveComponent("up-cell-group");
(_easycom_up_icon2 + _easycom_up_cell2 + _easycom_up_cell_group2)();
}
const _easycom_up_icon = () => "../u-icon/u-icon.js";
const _easycom_up_cell = () => "../u-cell/u-cell.js";
const _easycom_up_cell_group = () => "../u-cell-group/u-cell-group.js";
if (!Math) {
(_easycom_up_icon + _easycom_up_cell + _easycom_up_cell_group)();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return common_vendor.e({
a: $data.active
}, $data.active ? common_vendor.e({
b: !_ctx.$slots.default && !_ctx.$slots.$default
}, !_ctx.$slots.default && !_ctx.$slots.$default ? {
c: common_vendor.f(_ctx.options, (item, index, i0) => {
return common_vendor.e({
a: _ctx.modelValue == item.value
}, _ctx.modelValue == item.value ? {
b: "243060d4-2-" + i0 + "," + ("243060d4-1-" + i0),
c: common_vendor.p({
name: "checkbox-mark",
color: $data.activeColor,
size: "32"
})
} : {}, {
d: common_vendor.o(($event) => $options.cellClick(item.value), index),
e: index,
f: "243060d4-1-" + i0 + ",243060d4-0",
g: common_vendor.p({
arrow: false,
title: item.label,
["title-style"]: {
color: _ctx.modelValue == item.value ? $data.activeColor : $data.inactiveColor
}
})
});
}),
d: $options.addUnit(_ctx.height)
} : {}, {
e: common_vendor.o(() => {
}),
f: common_vendor.o(() => {
})
}) : {});
}
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-243060d4"]]);
wx.createComponent(Component);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/node-modules/uview-plus/components/u-dropdown-item/u-dropdown-item.js.map
@@ -0,0 +1,8 @@
{
"component": true,
"usingComponents": {
"up-icon": "../u-icon/u-icon",
"up-cell": "../u-cell/u-cell",
"up-cell-group": "../u-cell-group/u-cell-group"
}
}
@@ -0,0 +1 @@
<view wx:if="{{a}}" class="u-dropdown-item data-v-243060d4" catchtouchmove="{{e}}" catchtap="{{f}}"><block wx:if="{{b}}"><scroll-view class="u-dropdown-item__scroll data-v-243060d4" scroll-y="true" style="{{'height:' + d}}"><view class="u-dropdown-item__options data-v-243060d4"><up-cell-group class="data-v-243060d4" u-s="{{['d']}}" u-i="243060d4-0" bind:__l="__l"><up-cell wx:for="{{c}}" wx:for-item="item" wx:key="e" class="data-v-243060d4" u-s="{{['d']}}" bindclick="{{item.d}}" u-i="{{item.f}}" bind:__l="__l" u-p="{{item.g}}"><up-icon wx:if="{{item.a}}" class="data-v-243060d4" u-i="{{item.b}}" bind:__l="__l" u-p="{{item.c}}"></up-icon></up-cell></up-cell-group></view></scroll-view></block><slot wx:else/></view>
@@ -0,0 +1,52 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.u-empty.data-v-243060d4,
.u-empty__wrap.data-v-243060d4,
.u-tabs.data-v-243060d4,
.u-tabs__wrapper.data-v-243060d4,
.u-tabs__wrapper__scroll-view-wrapper.data-v-243060d4,
.u-tabs__wrapper__scroll-view.data-v-243060d4,
.u-tabs__wrapper__nav.data-v-243060d4,
.u-tabs__wrapper__nav__line.data-v-243060d4,
.up-empty.data-v-243060d4,
.up-empty__wrap.data-v-243060d4,
.up-tabs.data-v-243060d4,
.up-tabs__wrapper.data-v-243060d4,
.up-tabs__wrapper__scroll-view-wrapper.data-v-243060d4,
.up-tabs__wrapper__scroll-view.data-v-243060d4,
.up-tabs__wrapper__nav.data-v-243060d4,
.up-tabs__wrapper__nav__line.data-v-243060d4 {
display: flex;
flex-direction: column;
flex-shrink: 0;
flex-grow: 0;
flex-basis: auto;
align-items: stretch;
align-content: flex-start;
}
.u-dropdown-item__scroll.data-v-243060d4 {
background: #ffffff;
}