处理数据看板
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
"use strict";
|
||||
require("../../../../common/vendor.js");
|
||||
require("../_utils/env.js");
|
||||
const uni_modules_nutuiUni_components__utils_props = require("../_utils/props.js");
|
||||
const radioProps = {
|
||||
...uni_modules_nutuiUni_components__utils_props.commonProps,
|
||||
/**
|
||||
* @description 是否禁用选择
|
||||
*/
|
||||
disabled: uni_modules_nutuiUni_components__utils_props.nullableBooleanProp,
|
||||
/**
|
||||
* @description 图标尺寸
|
||||
*/
|
||||
iconSize: uni_modules_nutuiUni_components__utils_props.makeNumericProp(""),
|
||||
/**
|
||||
* @description 单选框标识
|
||||
*/
|
||||
label: {
|
||||
type: [String, Number, Boolean],
|
||||
default: ""
|
||||
},
|
||||
/**
|
||||
* @description 形状,可选值为 button、round
|
||||
*/
|
||||
shape: uni_modules_nutuiUni_components__utils_props.makeStringProp("round"),
|
||||
/**
|
||||
* @description 尺寸,可选值为 `large` `small` `mini` `normal`,仅在 shape 为 `button` 时生效
|
||||
*/
|
||||
size: uni_modules_nutuiUni_components__utils_props.makeStringProp("normal")
|
||||
};
|
||||
const RADIO_KEY = Symbol("nut-radio");
|
||||
exports.RADIO_KEY = RADIO_KEY;
|
||||
exports.radioProps = radioProps;
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/nutui-uni/components/radio/index.js.map
|
||||
@@ -1,108 +0,0 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_nutuiUni_components__constants_prefix = require("../_constants/prefix.js");
|
||||
const uni_modules_nutuiUni_components__hooks_useInject = require("../_hooks/useInject.js");
|
||||
require("../_utils/env.js");
|
||||
const uni_modules_nutuiUni_components__utils_pxCheck = require("../_utils/pxCheck.js");
|
||||
const uni_modules_nutuiUni_components__utils_style = require("../_utils/style.js");
|
||||
const form = require("../../../../form.js");
|
||||
const uni_modules_nutuiUni_components_radio_index = require("./index.js");
|
||||
if (!Math) {
|
||||
NutIcon();
|
||||
}
|
||||
const NutIcon = () => "../icon/icon.js";
|
||||
const componentName = `${uni_modules_nutuiUni_components__constants_prefix.PREFIX}-radio`;
|
||||
const __default__ = common_vendor.defineComponent({
|
||||
name: componentName,
|
||||
options: {
|
||||
virtualHost: true,
|
||||
addGlobalClass: true,
|
||||
styleIsolation: "shared"
|
||||
}
|
||||
});
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
...__default__,
|
||||
props: uni_modules_nutuiUni_components_radio_index.radioProps,
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const { parent } = uni_modules_nutuiUni_components__hooks_useInject.useInject(uni_modules_nutuiUni_components_radio_index.RADIO_KEY);
|
||||
const disabled = form.useFormDisabled(common_vendor.toRef(props, "disabled"));
|
||||
const reverseState = common_vendor.computed(() => parent.position.value === "left");
|
||||
const classes = common_vendor.computed(() => {
|
||||
return uni_modules_nutuiUni_components__utils_style.getMainClass(props, componentName, {
|
||||
[`${componentName}--reverse`]: reverseState.value,
|
||||
[`${componentName}--${props.shape}`]: true
|
||||
});
|
||||
});
|
||||
function handleClick() {
|
||||
if (isCurValue.value || disabled.value)
|
||||
return;
|
||||
parent.updateValue(props.label);
|
||||
}
|
||||
const isCurValue = common_vendor.computed(() => {
|
||||
return parent.label.value === props.label;
|
||||
});
|
||||
const color = common_vendor.computed(() => {
|
||||
return !disabled.value ? isCurValue.value ? "nut-radio__icon" : "nut-radio__icon--unchecked" : "nut-radio__icon--disable";
|
||||
});
|
||||
const getButtonClass = common_vendor.computed(() => {
|
||||
return `${componentName}__button ${componentName}__button--${props.size} ${isCurValue.value && `${componentName}__button--active`} ${disabled.value ? `${componentName}__button--disabled` : ""}`;
|
||||
});
|
||||
const getLabelClass = common_vendor.computed(() => {
|
||||
return `${componentName}__label ${disabled.value ? `${componentName}__label--disabled` : ""}`;
|
||||
});
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: _ctx.shape === "button"
|
||||
}, _ctx.shape === "button" ? {
|
||||
b: common_vendor.n(getButtonClass.value)
|
||||
} : reverseState.value ? common_vendor.e({
|
||||
d: common_vendor.n(getLabelClass.value),
|
||||
e: !isCurValue.value
|
||||
}, !isCurValue.value ? {
|
||||
f: common_vendor.p({
|
||||
name: "check-normal",
|
||||
size: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
width: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
height: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
["pop-class"]: color.value
|
||||
})
|
||||
} : {
|
||||
g: common_vendor.p({
|
||||
name: "check-checked",
|
||||
size: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
width: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
height: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
["pop-class"]: color.value
|
||||
})
|
||||
}) : common_vendor.e({
|
||||
h: !isCurValue.value
|
||||
}, !isCurValue.value ? {
|
||||
i: common_vendor.p({
|
||||
name: "check-normal",
|
||||
size: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
width: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
height: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
["pop-class"]: color.value
|
||||
})
|
||||
} : {
|
||||
j: common_vendor.p({
|
||||
name: "check-checked",
|
||||
size: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
width: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
height: common_vendor.unref(uni_modules_nutuiUni_components__utils_pxCheck.pxCheck)(_ctx.iconSize),
|
||||
["pop-class"]: color.value
|
||||
})
|
||||
}, {
|
||||
k: common_vendor.n(getLabelClass.value)
|
||||
}), {
|
||||
c: reverseState.value,
|
||||
l: common_vendor.n(classes.value),
|
||||
m: common_vendor.s(_ctx.customStyle),
|
||||
n: common_vendor.o(handleClick)
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
wx.createComponent(_sfc_main);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/nutui-uni/components/radio/radio.js.map
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"nut-icon": "../icon/icon"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<view class="{{l}}" style="{{m}}" bindtap="{{n}}"><view wx:if="{{a}}" class="{{b}}"><slot/></view><block wx:elif="{{c}}"><view class="{{d}}"><slot/></view><block wx:if="{{e}}"><block wx:if="{{$slots.icon}}"><slot name="icon"></slot></block><block wx:else><nut-icon wx:if="{{f}}" u-i="ad85ac80-0" bind:__l="__l" u-p="{{f}}"/></block></block><block wx:else><block wx:if="{{$slots.checkedIcon}}"><slot name="checkedIcon"></slot></block><block wx:else><nut-icon wx:if="{{g}}" u-i="ad85ac80-1" bind:__l="__l" u-p="{{g}}"/></block></block></block><block wx:else><block wx:if="{{h}}"><block wx:if="{{$slots.icon}}"><slot name="icon"></slot></block><block wx:else><nut-icon wx:if="{{i}}" u-i="ad85ac80-2" bind:__l="__l" u-p="{{i}}"/></block></block><block wx:else><block wx:if="{{$slots.checkedIcon}}"><slot name="checkedIcon"></slot></block><block wx:else><nut-icon wx:if="{{j}}" u-i="ad85ac80-3" bind:__l="__l" u-p="{{j}}"/></block></block><view class="{{k}}"><slot/></view></block></view>
|
||||
@@ -1,159 +0,0 @@
|
||||
/**
|
||||
* 这里是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-radio-group {
|
||||
display: inline-block;
|
||||
}
|
||||
.nut-radio-group .nut-radio {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.nut-radio-group--horizontal .nut-radio {
|
||||
display: inline-flex !important;
|
||||
margin-right: 10px !important;
|
||||
}
|
||||
.nut-radio-group--horizontal .nut-radio--round .nut-radio__label {
|
||||
margin: 0 6px !important;
|
||||
}
|
||||
.nut-theme-dark .nut-radio__label {
|
||||
color: var(--nut-dark-color, var(--nut-white, #fff));
|
||||
}
|
||||
.nut-theme-dark .nut-radio__label--disabled {
|
||||
color: var(--nut-radio-label-disable-color, #999);
|
||||
}
|
||||
.nut-theme-dark .nut-radio__button {
|
||||
color: var(--nut-dark-color, var(--nut-white, #fff));
|
||||
background: var(--nut-dark-background, #131313);
|
||||
}
|
||||
.nut-theme-dark .nut-radio__button--disabled {
|
||||
color: var(--nut-radio-label-disable-color, #999);
|
||||
border: 1px solid var(--nut-radio-label-disable-color, #999);
|
||||
}
|
||||
.nut-radio {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
align-items: center;
|
||||
}
|
||||
.nut-radio:last-child {
|
||||
margin-right: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.nut-radio--reverse .nut-radio__label {
|
||||
margin-right: var(--nut-radio-label-margin-left, 15px);
|
||||
margin-left: 0;
|
||||
}
|
||||
.nut-radio__button {
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: var(--nut-radio-button-padding, 5px 18px);
|
||||
font-size: var(--nut-radio-button-font-size, 12px);
|
||||
color: var(--nut-radio-label-font-color, #1d1e1e);
|
||||
background: #f6f7f9;
|
||||
border: 1px solid #f6f7f9;
|
||||
border-radius: var(--nut-radio-button-border-radius, 15px);
|
||||
}
|
||||
.nut-radio__button--active {
|
||||
position: relative;
|
||||
color: var(--nut-radio-label-font-active-color, var(--nut-primary-color, #fa2c19));
|
||||
background: transparent;
|
||||
border: 1px solid var(--nut-radio-label-button-border-color, var(--nut-primary-color, #fa2c19));
|
||||
}
|
||||
.nut-radio__button--active::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
content: "";
|
||||
background-color: var(--nut-radio-label-button-background, var(--nut-primary-color, #fa2c19));
|
||||
border-radius: var(--nut-radio-button-border-radius, 15px);
|
||||
opacity: 0.05;
|
||||
}
|
||||
.nut-radio__button--disabled {
|
||||
color: var(--nut-radio-label-disable-color, #999);
|
||||
border: none;
|
||||
}
|
||||
.nut-radio__button--large {
|
||||
height: var(--nut-button-large-height, 48px);
|
||||
font-size: var(--nut-button-large-font-size, var(--nut-button-default-font-size, var(--nut-font-size-2, 14px)));
|
||||
line-height: var(--nut-button-large-line-height, 46px);
|
||||
}
|
||||
.nut-radio__button--small {
|
||||
height: var(--nut-button-small-height, 28px);
|
||||
padding: var(--nut-button-small-padding, 0 12px);
|
||||
font-size: var(--nut-button-small-font-size, var(--nut-font-size-1, 12px));
|
||||
line-height: var(--nut-button-small-line-height, 26px);
|
||||
}
|
||||
.nut-radio__button--mini {
|
||||
height: var(--nut-button-mini-height, 24px);
|
||||
padding: var(--nut-button-mini-padding, 0 12px);
|
||||
font-size: var(--nut-button-mini-font-size, var(--nut-font-size-1, 12px));
|
||||
line-height: var(--nut-button-mini-line-height, 1.2);
|
||||
}
|
||||
.nut-radio__label {
|
||||
flex: 1;
|
||||
margin-left: var(--nut-radio-label-margin-left, 15px);
|
||||
font-size: var(--nut-radio-label-font-size, 14px);
|
||||
color: var(--nut-radio-label-font-color, #1d1e1e);
|
||||
}
|
||||
.nut-radio__label--disabled {
|
||||
color: var(--nut-radio-label-disable-color, #999);
|
||||
}
|
||||
.nut-radio__icon {
|
||||
color: var(--nut-radio-label-font-active-color, var(--nut-primary-color, #fa2c19));
|
||||
transition-duration: 0.3s;
|
||||
transition-property: color, border-color, background-color;
|
||||
}
|
||||
.nut-radio__icon--unchecked {
|
||||
color: var(--nut-radio-icon-disable-color, #d6d6d6);
|
||||
}
|
||||
.nut-radio__icon--disable {
|
||||
color: var(--nut-radio-icon-disable-color2, var(--nut-help-color, #f5f5f5));
|
||||
}
|
||||
Reference in New Issue
Block a user