This commit is contained in:
2026-01-05 12:47:14 +08:00
commit 1fc846fae3
1614 changed files with 162035 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
"use strict";
const common_vendor = require("../../../../common/vendor.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 uni_modules_nutuiUni_components__utils_is = require("../_utils/is.js");
const uni_modules_nutuiUni_components__utils_props = require("../_utils/props.js");
const stepProps = {
...uni_modules_nutuiUni_components__utils_props.commonProps,
/**
* @description 流程步骤的标题
*/
title: String,
/**
* @description 流程步骤的描述性文字(支持 html 结构)
*/
content: String
};
const stepEmits = {
clickStep: (val) => uni_modules_nutuiUni_components__utils_is.isNumber(val)
};
const componentName = `${uni_modules_nutuiUni_components__constants_prefix.PREFIX}-step`;
const __default__ = common_vendor.defineComponent({
name: componentName,
options: {
virtualHost: true,
addGlobalClass: true,
styleIsolation: "shared"
}
});
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
...__default__,
props: stepProps,
emits: stepEmits,
setup(__props) {
const props = __props;
const instance = common_vendor.getCurrentInstance();
const parent = common_vendor.inject("parent");
parent.relation(instance);
const state = common_vendor.reactive({
dot: parent.props.progressDot
});
const index = common_vendor.computed(() => parent.state.children.indexOf(instance) + 1);
function getCurrentStatus() {
const activeIndex = index.value;
if (activeIndex < +parent.props.current)
return "finish";
return activeIndex === +parent.props.current ? "process" : "wait";
}
const status = common_vendor.computed(() => {
return getCurrentStatus();
});
const classes = common_vendor.computed(() => {
return uni_modules_nutuiUni_components__utils_style.getMainClass(props, componentName, {
[`${componentName}-${status.value}`]: true
});
});
function handleClickStep() {
parent.onEmit(index.value);
}
return (_ctx, _cache) => {
return common_vendor.e({
a: state.dot
}, state.dot ? {} : {
b: common_vendor.t(index.value)
}, {
c: common_vendor.n(!state.dot ? "is-icon" : ""),
d: !_ctx.$slots.title
}, !_ctx.$slots.title ? {
e: common_vendor.t(_ctx.title)
} : {}, {
f: _ctx.content || _ctx.$slots.content
}, _ctx.content || _ctx.$slots.content ? common_vendor.e({
g: !_ctx.$slots.content
}, !_ctx.$slots.content ? {
h: _ctx.content
} : {}) : {}, {
i: common_vendor.n(classes.value),
j: common_vendor.s(_ctx.customStyle),
k: common_vendor.o(handleClickStep)
});
};
}
});
wx.createComponent(_sfc_main);
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/nutui-uni/components/step/step.js.map

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="{{i}}" style="{{j}}" bindtap="{{k}}"><view class="nut-step-head"><view class="nut-step-line"/><view class="{{['nut-step-icon', c]}}"><view class="nut-step-icon-inner"><block wx:if="{{$slots.icon}}"><slot name="icon"></slot></block><block wx:else><block wx:if="{{a}}"/><block wx:else><view class="nut-step-inner">{{b}}</view></block></block></view></view></view><view class="nut-step-main"><view class="nut-step-title"><view wx:if="{{d}}">{{e}}</view><slot name="title"/></view><view wx:if="{{f}}" class="nut-step-content"><rich-text wx:if="{{g}}" nodes="{{h}}"/><slot name="content"/></view></view></view>

View File

@@ -0,0 +1,253 @@
/**
* 这里是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-step {
flex: 1;
font-size: 0;
text-align: center;
}
.nut-step-head {
position: relative;
display: flex;
justify-content: center;
margin-bottom: 12px;
}
.nut-step-line {
position: absolute;
top: 11px;
right: -50%;
left: 50%;
display: inline-block;
height: 1px;
background: var(--nut-steps-base-line-color, #909ca4);
}
.nut-step-icon {
position: relative;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
width: var(--nut-steps-base-icon-width, 25px);
height: var(--nut-steps-base-icon-height, 25px);
font-size: var(--nut-steps-base-icon-font-size, 13px);
line-height: var(--nut-steps-base-icon-line-height, 25px);
}
.nut-step-icon-inner {
display: flex;
align-items: center;
justify-content: center;
}
.nut-step-icon .nut-icon {
width: var(--nut-steps-base-icon-font-size, 13px);
height: var(--nut-steps-base-icon-font-size, 13px);
}
.nut-step-icon.is-icon {
border-style: solid;
border-width: 1px;
border-radius: 50%;
}
.nut-step-main {
display: inline-block;
padding-right: 10%;
padding-left: 10%;
text-align: center;
}
.nut-step-title {
display: block;
margin-bottom: var(--nut-steps-base-title-margin-bottom, 10px);
font-size: var(--nut-steps-base-title-font-size, 14px);
color: var(--nut-steps-base-title-color, #909ca4);
}
.nut-step-content {
display: block;
font-size: var(--nut-steps-base-content-font-size, 14px);
color: var(--nut-steps-base-content-color, #666);
}
.nut-step:last-child .nut-step-line {
display: none;
}
.nut-step.nut-step-finish .nut-step-head {
color: var(--nut-steps-finish-head-color, var(--nut-primary-color, #fa2c19));
border-color: var(--nut-steps-finish-head-border-color, var(--nut-primary-color, #fa2c19));
}
.nut-step.nut-step-finish .nut-step-icon.is-icon {
background-color: var(--nut-steps-finish-icon-text-color, var(--nut-white, #fff));
}
.nut-step.nut-step-finish .nut-step-line {
background: var(--nut-steps-finish-line-background, var(--nut-primary-color, #fa2c19));
}
.nut-step.nut-step-finish .nut-step-title {
color: var(--nut-steps-finish-title-color, var(--nut-primary-color, #fa2c19));
}
.nut-step.nut-step-process .nut-step-head {
color: var(--nut-steps-process-head-color, var(--nut-white, #fff));
border-color: var(--nut-steps-process-head-border-color, var(--nut-primary-color, #fa2c19));
}
.nut-step.nut-step-process .nut-step-icon.is-icon {
background-color: var(--nut-steps-process-icon-text-color, var(--nut-primary-color, #fa2c19));
}
.nut-step.nut-step-process .nut-step-title {
color: var(--nut-steps-process-title-color, var(--nut-primary-color, #fa2c19));
}
.nut-step.nut-step-wait .nut-step-head {
color: var(--nut-steps-wait-head-color, #909ca4);
border-color: var(--nut-steps-wait-head-border-color, #909ca4);
}
.nut-step.nut-step-wait .nut-step-icon.is-icon {
color: var(--nut-steps-wait-icon-text-color, #fff);
background-color: var(--nut-steps-wait-icon-bg-color, #959fb1);
}
.nut-step.nut-step-wait .nut-step-icon.is-icon .nut-icon {
color: var(--nut-steps-wait-icon-color, var(--nut-white, #fff));
}
.nut-step.nut-step-wait .nut-step-content {
color: var(--nut-steps-wait-content-color, #909ca4);
}
.nut-steps-horizontal.nut-steps-dot .nut-step-head {
margin-top: 7px;
margin-bottom: 0;
}
.nut-steps-horizontal.nut-steps-dot .nut-step-line {
top: 50%;
bottom: -50%;
}
.nut-steps-horizontal.nut-steps-dot .nut-step-icon {
box-sizing: content-box;
width: 8px;
height: 8px;
background: var(--nut-primary-color, #fa2c19);
border-radius: 50%;
}
.nut-steps-horizontal.nut-steps-dot .nut-step-wait .nut-step-icon {
background-color: var(--nut-steps-wait-icon-bg-color, #959fb1);
}
.nut-steps-horizontal.nut-steps-dot .nut-step-wait .nut-step-content {
color: var(--nut-steps-wait-content-color, #909ca4);
}
.nut-steps-horizontal.nut-steps-dot .nut-step-finish .nut-step-icon {
background-color: var(--nut-primary-color, #fa2c19);
}
.nut-steps-horizontal.nut-steps-dot .nut-step-process .nut-step-icon {
position: relative;
background-color: var(--nut-primary-color, #fa2c19);
}
.nut-steps-horizontal.nut-steps-dot .nut-step-process .nut-step-icon::before {
position: absolute;
top: 50%;
left: 50%;
display: inline-block;
width: 14px;
height: 14px;
margin-top: -7px;
margin-left: -7px;
content: "";
background-color: var(--nut-primary-color-end, #fa6419);
border-radius: 50%;
opacity: 0.23;
}
.nut-steps-vertical .nut-step {
display: flex;
height: 33.34%;
}
.nut-steps-vertical .nut-step-line {
position: absolute;
display: inline-block;
width: 1px;
height: 100%;
background: #909ca4;
}
.nut-steps-vertical .nut-step-main {
display: inline-block;
padding-left: 6%;
text-align: left;
}
.nut-steps-vertical.nut-steps-dot .nut-step-head {
margin-top: 7px;
margin-bottom: 0;
}
.nut-steps-vertical.nut-steps-dot .nut-step-line {
top: 7px;
right: -50%;
left: 50%;
}
.nut-steps-vertical.nut-steps-dot .nut-step-icon {
box-sizing: content-box;
width: 8px;
height: 8px;
background: var(--nut-primary-color, #fa2c19);
border-radius: 50%;
}
.nut-steps-vertical.nut-steps-dot .nut-step-wait .nut-step-icon {
background-color: var(--nut-steps-wait-icon-bg-color, #959fb1);
}
.nut-steps-vertical.nut-steps-dot .nut-step-wait .nut-step-content {
color: var(--nut-steps-wait-content-color, #909ca4);
}
.nut-steps-vertical.nut-steps-dot .nut-step-finish .nut-step-icon {
background-color: var(--nut-primary-color, #fa2c19);
}
.nut-steps-vertical.nut-steps-dot .nut-step-process .nut-step-icon {
position: relative;
background-color: var(--nut-primary-color, #fa2c19);
}
.nut-steps-vertical.nut-steps-dot .nut-step-process .nut-step-icon::before {
position: absolute;
top: 50%;
left: 50%;
display: inline-block;
width: 14px;
height: 14px;
margin-top: -7px;
margin-left: -7px;
content: "";
background-color: var(--nut-primary-color-end, #fa6419);
border-radius: 50%;
opacity: 0.23;
}