first commit
This commit is contained in:
251
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-textarea/types.js
vendored
Normal file
251
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-textarea/types.js
vendored
Normal file
@@ -0,0 +1,251 @@
|
||||
"use strict";
|
||||
const uni_modules_wotDesignUni_components_common_props = require("../common/props.js");
|
||||
const textareaProps = {
|
||||
...uni_modules_wotDesignUni_components_common_props.baseProps,
|
||||
/**
|
||||
* * 自定义文本域容器class名称。
|
||||
* 类型:string
|
||||
*/
|
||||
customTextareaContainerClass: uni_modules_wotDesignUni_components_common_props.makeStringProp(""),
|
||||
/**
|
||||
* * 自定义文本域class名称。
|
||||
* 类型:string
|
||||
*/
|
||||
customTextareaClass: uni_modules_wotDesignUni_components_common_props.makeStringProp(""),
|
||||
/**
|
||||
* * 自定义标签class名称。
|
||||
* 类型:string
|
||||
*/
|
||||
customLabelClass: uni_modules_wotDesignUni_components_common_props.makeStringProp(""),
|
||||
// 原生属性
|
||||
/**
|
||||
* * 绑定值。
|
||||
* 类型:string | number
|
||||
*/
|
||||
modelValue: uni_modules_wotDesignUni_components_common_props.makeNumericProp(""),
|
||||
/**
|
||||
* * 占位文本。
|
||||
* 类型:string
|
||||
* 默认值:'请输入...'
|
||||
*/
|
||||
placeholder: String,
|
||||
/**
|
||||
* 指定placeholder的样式。
|
||||
* 类型:string
|
||||
*/
|
||||
placeholderStyle: String,
|
||||
/**
|
||||
* * 指定placeholder的样式类。
|
||||
* 类型:string
|
||||
* 默认值:空字符串
|
||||
*/
|
||||
placeholderClass: uni_modules_wotDesignUni_components_common_props.makeStringProp(""),
|
||||
/**
|
||||
* * 禁用输入框。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
disabled: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 最大输入长度,设置为-1表示不限制最大长度。
|
||||
* 类型:number
|
||||
* 默认值:-1
|
||||
*/
|
||||
maxlength: uni_modules_wotDesignUni_components_common_props.makeNumberProp(-1),
|
||||
/**
|
||||
* * 自动聚焦并拉起键盘。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
autoFocus: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 获取焦点。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
focus: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 是否自动增高输入框高度,style.height属性在auto-height生效时不生效。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
autoHeight: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 如果textarea处于position:fixed区域,需要设置此属性为true。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
fixed: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 指定光标与键盘的距离,取textarea距离底部的距离和cursor-spacing指定的距离的最小值作为实际距离。
|
||||
* 类型:number
|
||||
* 默认值:0
|
||||
*/
|
||||
cursorSpacing: uni_modules_wotDesignUni_components_common_props.makeNumberProp(0),
|
||||
/**
|
||||
* * 指定focus时的光标位置。
|
||||
* 类型:number
|
||||
* 默认值:-1
|
||||
*/
|
||||
cursor: uni_modules_wotDesignUni_components_common_props.makeNumberProp(-1),
|
||||
/**
|
||||
* * 设置键盘右下角按钮的文字。
|
||||
* 类型:string
|
||||
* 默认值:'done'
|
||||
* 可选值有'done', 'go', 'next', 'search', 'send'
|
||||
*/
|
||||
confirmType: String,
|
||||
/**
|
||||
* * 点击键盘右下角按钮时是否保持键盘不收起。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
confirmHold: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 是否显示键盘上方带有“完成”按钮那一栏。
|
||||
* 类型:boolean
|
||||
* 默认值:true
|
||||
*/
|
||||
showConfirmBar: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(true),
|
||||
/**
|
||||
* * 光标起始位置,自动聚集时有效,需与selection-end搭配使用。
|
||||
* 类型:number
|
||||
* 默认值:-1
|
||||
*/
|
||||
selectionStart: uni_modules_wotDesignUni_components_common_props.makeNumberProp(-1),
|
||||
/**
|
||||
* * 光标结束位置,自动聚集时有效,需与selection-start搭配使用。
|
||||
* 类型:number
|
||||
* 默认值:-1
|
||||
*/
|
||||
selectionEnd: uni_modules_wotDesignUni_components_common_props.makeNumberProp(-1),
|
||||
/**
|
||||
* * 键盘弹起时是否自动上推页面。
|
||||
* 类型:boolean
|
||||
* 默认值:true
|
||||
*/
|
||||
adjustPosition: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(true),
|
||||
/**
|
||||
* * 是否去掉iOS下的默认内边距。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
disableDefaultPadding: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * focus状态下点击页面时是否不收起键盘。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
holdKeyboard: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
// 非原生属性
|
||||
/**
|
||||
* * 显示为密码框。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
showPassword: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 是否显示清空按钮。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
clearable: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 输入框只读状态。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
readonly: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 前置图标,icon组件中的图标类名。
|
||||
* 类型:string
|
||||
*/
|
||||
prefixIcon: String,
|
||||
/**
|
||||
* * 是否显示字数限制,需要同时设置maxlength。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
showWordLimit: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* 设置左侧标题。
|
||||
* 类型:string
|
||||
*/
|
||||
label: String,
|
||||
/**
|
||||
* 设置左侧标题宽度。
|
||||
* 类型:string
|
||||
*/
|
||||
labelWidth: uni_modules_wotDesignUni_components_common_props.makeStringProp(""),
|
||||
/**
|
||||
* * 设置输入框大小。
|
||||
* 类型:string
|
||||
*/
|
||||
size: String,
|
||||
/**
|
||||
* * 设置输入框错误状态(红色)。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
error: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 当存在label属性时,设置标题和输入框垂直居中,默认为顶部居中。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
center: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 非cell类型下是否隐藏下划线。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
noBorder: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * cell类型下必填样式。
|
||||
* 类型:boolean
|
||||
* 默认值:false
|
||||
*/
|
||||
required: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(false),
|
||||
/**
|
||||
* * 表单域model字段名,在使用表单校验功能的情况下,该属性是必填的。
|
||||
* 类型:string
|
||||
*/
|
||||
prop: uni_modules_wotDesignUni_components_common_props.makeStringProp(""),
|
||||
/**
|
||||
* * 表单验证规则。
|
||||
* 类型:FormItemRule[]
|
||||
* 默认值:[]
|
||||
*/
|
||||
rules: uni_modules_wotDesignUni_components_common_props.makeArrayProp(),
|
||||
/**
|
||||
* 显示清除图标的时机,always 表示输入框不为空时展示,focus 表示输入框聚焦且不为空时展示
|
||||
* 类型: "focus" | "always"
|
||||
* 默认值: "always"
|
||||
*/
|
||||
clearTrigger: uni_modules_wotDesignUni_components_common_props.makeStringProp("always"),
|
||||
/**
|
||||
* 是否在点击清除按钮时聚焦输入框
|
||||
* 类型: boolean
|
||||
* 默认值: true
|
||||
*/
|
||||
focusWhenClear: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(true),
|
||||
/**
|
||||
* 是否忽略组件内对文本合成系统事件的处理。为 false 时将触发 compositionstart、compositionend、compositionupdate 事件,且在文本合成期间会触发 input 事件
|
||||
* 类型: boolean
|
||||
* 默认值: true
|
||||
*/
|
||||
ignoreCompositionEvent: uni_modules_wotDesignUni_components_common_props.makeBooleanProp(true),
|
||||
/**
|
||||
* 它提供了用户在编辑元素或其内容时可能输入的数据类型的提示。在符合条件的高版本webview里,uni-app的web和app-vue平台中可使用本属性。
|
||||
* 类型: InputMode
|
||||
* 可选值: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | "password"
|
||||
* 默认值: "text"
|
||||
*/
|
||||
inputmode: uni_modules_wotDesignUni_components_common_props.makeStringProp("text"),
|
||||
/**
|
||||
* 必填标记位置,可选值:before(标签前)、after(标签后)
|
||||
*/
|
||||
markerSide: uni_modules_wotDesignUni_components_common_props.makeStringProp("before")
|
||||
};
|
||||
exports.textareaProps = textareaProps;
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/wot-design-uni/components/wd-textarea/types.js.map
|
||||
263
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.js
vendored
Normal file
263
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.js
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_wotDesignUni_components_common_util = require("../common/util.js");
|
||||
const uni_modules_wotDesignUni_components_composables_useCell = require("../composables/useCell.js");
|
||||
const uni_modules_wotDesignUni_components_wdForm_types = require("../wd-form/types.js");
|
||||
const uni_modules_wotDesignUni_components_composables_useParent = require("../composables/useParent.js");
|
||||
const uni_modules_wotDesignUni_components_composables_useTranslate = require("../composables/useTranslate.js");
|
||||
const uni_modules_wotDesignUni_components_wdTextarea_types = require("./types.js");
|
||||
if (!Math) {
|
||||
wdIcon();
|
||||
}
|
||||
const wdIcon = () => "../wd-icon/wd-icon.js";
|
||||
const __default__ = {
|
||||
name: "wd-textarea",
|
||||
options: {
|
||||
virtualHost: true,
|
||||
addGlobalClass: true,
|
||||
styleIsolation: "shared"
|
||||
}
|
||||
};
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
...__default__,
|
||||
props: uni_modules_wotDesignUni_components_wdTextarea_types.textareaProps,
|
||||
emits: [
|
||||
"update:modelValue",
|
||||
"clear",
|
||||
"blur",
|
||||
"focus",
|
||||
"input",
|
||||
"keyboardheightchange",
|
||||
"confirm",
|
||||
"linechange",
|
||||
"clickprefixicon",
|
||||
"click"
|
||||
],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const { translate } = uni_modules_wotDesignUni_components_composables_useTranslate.useTranslate("textarea");
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const slots = common_vendor.useSlots();
|
||||
const placeholderValue = common_vendor.computed(() => {
|
||||
return uni_modules_wotDesignUni_components_common_util.isDef(props.placeholder) ? props.placeholder : translate("placeholder");
|
||||
});
|
||||
const clearing = common_vendor.ref(false);
|
||||
const focused = common_vendor.ref(false);
|
||||
const focusing = common_vendor.ref(false);
|
||||
const inputValue = common_vendor.ref("");
|
||||
const cell = uni_modules_wotDesignUni_components_composables_useCell.useCell();
|
||||
common_vendor.watch(
|
||||
() => props.focus,
|
||||
(newValue) => {
|
||||
focused.value = newValue;
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
common_vendor.watch(
|
||||
() => props.modelValue,
|
||||
(newValue) => {
|
||||
inputValue.value = uni_modules_wotDesignUni_components_common_util.isDef(newValue) ? String(newValue) : "";
|
||||
},
|
||||
{ immediate: true, deep: true }
|
||||
);
|
||||
const { parent: form } = uni_modules_wotDesignUni_components_composables_useParent.useParent(uni_modules_wotDesignUni_components_wdForm_types.FORM_KEY);
|
||||
const showClear = common_vendor.computed(() => {
|
||||
const { disabled, readonly, clearable, clearTrigger } = props;
|
||||
if (clearable && !readonly && !disabled && inputValue.value && (clearTrigger === "always" || props.clearTrigger === "focus" && focusing.value)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
const showWordCount = common_vendor.computed(() => {
|
||||
const { disabled, readonly, maxlength, showWordLimit } = props;
|
||||
return Boolean(!disabled && !readonly && uni_modules_wotDesignUni_components_common_util.isDef(maxlength) && maxlength > -1 && showWordLimit);
|
||||
});
|
||||
const errorMessage = common_vendor.computed(() => {
|
||||
if (form && props.prop && form.errorMessages && form.errorMessages[props.prop]) {
|
||||
return form.errorMessages[props.prop];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
});
|
||||
const isRequired = common_vendor.computed(() => {
|
||||
let formRequired = false;
|
||||
if (form && form.props.rules) {
|
||||
const rules = form.props.rules;
|
||||
for (const key in rules) {
|
||||
if (Object.prototype.hasOwnProperty.call(rules, key) && key === props.prop && Array.isArray(rules[key])) {
|
||||
formRequired = rules[key].some((rule) => rule.required);
|
||||
}
|
||||
}
|
||||
}
|
||||
return props.required || props.rules.some((rule) => rule.required) || formRequired;
|
||||
});
|
||||
const currentLength = common_vendor.computed(() => {
|
||||
return Array.from(String(formatValue(props.modelValue))).length;
|
||||
});
|
||||
const rootClass = common_vendor.computed(() => {
|
||||
return `wd-textarea ${props.label || slots.label ? "is-cell" : ""} ${props.center ? "is-center" : ""} ${cell.border.value ? "is-border" : ""} ${props.size ? "is-" + props.size : ""} ${props.error ? "is-error" : ""} ${props.disabled ? "is-disabled" : ""} ${props.autoHeight ? "is-auto-height" : ""} ${currentLength.value > 0 ? "is-not-empty" : ""} ${props.noBorder ? "is-no-border" : ""} ${props.customClass}`;
|
||||
});
|
||||
common_vendor.computed(() => {
|
||||
return `wd-textarea__label ${props.customLabelClass}`;
|
||||
});
|
||||
const inputPlaceholderClass = common_vendor.computed(() => {
|
||||
return `wd-textarea__placeholder ${props.placeholderClass}`;
|
||||
});
|
||||
const countClass = common_vendor.computed(() => {
|
||||
return `${currentLength.value > 0 ? "wd-textarea__count-current" : ""} ${currentLength.value > props.maxlength ? "is-error" : ""}`;
|
||||
});
|
||||
const labelStyle = common_vendor.computed(() => {
|
||||
return props.labelWidth ? uni_modules_wotDesignUni_components_common_util.objToStyle({
|
||||
"min-width": props.labelWidth,
|
||||
"max-width": props.labelWidth
|
||||
}) : "";
|
||||
});
|
||||
common_vendor.onBeforeMount(() => {
|
||||
initState();
|
||||
});
|
||||
function initState() {
|
||||
inputValue.value = formatValue(inputValue.value);
|
||||
emit("update:modelValue", inputValue.value);
|
||||
}
|
||||
function formatValue(value) {
|
||||
if (value === null || value === void 0)
|
||||
return "";
|
||||
const { maxlength, showWordLimit } = props;
|
||||
if (showWordLimit && maxlength !== -1 && String(value).length > maxlength) {
|
||||
return value.toString().substring(0, maxlength);
|
||||
}
|
||||
return `${value}`;
|
||||
}
|
||||
async function handleClear() {
|
||||
focusing.value = false;
|
||||
inputValue.value = "";
|
||||
if (props.focusWhenClear) {
|
||||
clearing.value = true;
|
||||
focused.value = false;
|
||||
}
|
||||
await uni_modules_wotDesignUni_components_common_util.pause();
|
||||
if (props.focusWhenClear) {
|
||||
focused.value = true;
|
||||
focusing.value = true;
|
||||
}
|
||||
emit("update:modelValue", inputValue.value);
|
||||
emit("clear");
|
||||
}
|
||||
async function handleBlur({ detail }) {
|
||||
await uni_modules_wotDesignUni_components_common_util.pause(150);
|
||||
if (clearing.value) {
|
||||
clearing.value = false;
|
||||
return;
|
||||
}
|
||||
focusing.value = false;
|
||||
emit("blur", {
|
||||
value: inputValue.value,
|
||||
cursor: detail.cursor ? detail.cursor : null
|
||||
});
|
||||
}
|
||||
function handleFocus({ detail }) {
|
||||
focusing.value = true;
|
||||
emit("focus", detail);
|
||||
}
|
||||
function handleInput({ detail }) {
|
||||
inputValue.value = formatValue(inputValue.value);
|
||||
emit("update:modelValue", inputValue.value);
|
||||
emit("input", detail);
|
||||
}
|
||||
function handleKeyboardheightchange({ detail }) {
|
||||
emit("keyboardheightchange", detail);
|
||||
}
|
||||
function handleConfirm({ detail }) {
|
||||
emit("confirm", detail);
|
||||
}
|
||||
function handleLineChange({ detail }) {
|
||||
emit("linechange", detail);
|
||||
}
|
||||
function onClickPrefixIcon() {
|
||||
emit("clickprefixicon");
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: _ctx.label || _ctx.$slots.label
|
||||
}, _ctx.label || _ctx.$slots.label ? common_vendor.e({
|
||||
b: isRequired.value && _ctx.markerSide === "before"
|
||||
}, isRequired.value && _ctx.markerSide === "before" ? {} : {}, {
|
||||
c: _ctx.prefixIcon || _ctx.$slots.prefix
|
||||
}, _ctx.prefixIcon || _ctx.$slots.prefix ? common_vendor.e({
|
||||
d: _ctx.prefixIcon && !_ctx.$slots.prefix
|
||||
}, _ctx.prefixIcon && !_ctx.$slots.prefix ? {
|
||||
e: common_vendor.o(onClickPrefixIcon),
|
||||
f: common_vendor.p({
|
||||
["custom-class"]: "wd-textarea__icon",
|
||||
name: _ctx.prefixIcon
|
||||
})
|
||||
} : {}) : {}, {
|
||||
g: _ctx.label && !_ctx.$slots.label
|
||||
}, _ctx.label && !_ctx.$slots.label ? {
|
||||
h: common_vendor.t(_ctx.label)
|
||||
} : _ctx.$slots.label ? {} : {}, {
|
||||
i: _ctx.$slots.label,
|
||||
j: isRequired.value && _ctx.markerSide === "after"
|
||||
}, isRequired.value && _ctx.markerSide === "after" ? {} : {}, {
|
||||
k: common_vendor.s(labelStyle.value)
|
||||
}) : {}, {
|
||||
l: common_vendor.n(`wd-textarea__inner ${_ctx.customTextareaClass}`),
|
||||
m: placeholderValue.value,
|
||||
n: _ctx.disabled || _ctx.readonly,
|
||||
o: _ctx.maxlength,
|
||||
p: focused.value,
|
||||
q: _ctx.autoFocus,
|
||||
r: _ctx.placeholderStyle,
|
||||
s: inputPlaceholderClass.value,
|
||||
t: _ctx.autoHeight,
|
||||
v: _ctx.cursorSpacing,
|
||||
w: _ctx.fixed,
|
||||
x: _ctx.cursor,
|
||||
y: _ctx.showConfirmBar,
|
||||
z: _ctx.selectionStart,
|
||||
A: _ctx.selectionEnd,
|
||||
B: _ctx.adjustPosition,
|
||||
C: _ctx.holdKeyboard,
|
||||
D: _ctx.confirmType,
|
||||
E: _ctx.confirmHold,
|
||||
F: _ctx.disableDefaultPadding,
|
||||
G: _ctx.ignoreCompositionEvent,
|
||||
H: _ctx.inputmode,
|
||||
I: common_vendor.o([($event) => inputValue.value = $event.detail.value, handleInput]),
|
||||
J: common_vendor.o(handleFocus),
|
||||
K: common_vendor.o(handleBlur),
|
||||
L: common_vendor.o(handleConfirm),
|
||||
M: common_vendor.o(handleLineChange),
|
||||
N: common_vendor.o(handleKeyboardheightchange),
|
||||
O: inputValue.value,
|
||||
P: errorMessage.value
|
||||
}, errorMessage.value ? {
|
||||
Q: common_vendor.t(errorMessage.value)
|
||||
} : {}, {
|
||||
R: props.readonly
|
||||
}, props.readonly ? {} : {}, {
|
||||
S: showClear.value
|
||||
}, showClear.value ? {
|
||||
T: common_vendor.o(handleClear),
|
||||
U: common_vendor.p({
|
||||
["custom-class"]: "wd-textarea__clear",
|
||||
name: "error-fill"
|
||||
})
|
||||
} : {}, {
|
||||
V: showWordCount.value
|
||||
}, showWordCount.value ? {
|
||||
W: common_vendor.t(currentLength.value),
|
||||
X: common_vendor.n(countClass.value),
|
||||
Y: common_vendor.t(_ctx.maxlength)
|
||||
} : {}, {
|
||||
Z: common_vendor.n(`wd-textarea__value ${showClear.value ? "is-suffix" : ""} ${_ctx.customTextareaContainerClass} ${showWordCount.value ? "is-show-limit" : ""}`),
|
||||
aa: common_vendor.n(rootClass.value),
|
||||
ab: common_vendor.s(_ctx.customStyle)
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7d71e04e"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['data-v-7d71e04e', aa]}}" style="{{ab}}"><view wx:if="{{a}}" class="wd-textarea__label data-v-7d71e04e" style="{{k}}"><text wx:if="{{b}}" class="wd-textarea__required wd-textarea__required--left data-v-7d71e04e">*</text><view wx:if="{{c}}" class="wd-textarea__prefix data-v-7d71e04e"><wd-icon wx:if="{{d}}" class="data-v-7d71e04e" bindclick="{{e}}" u-i="7d71e04e-0" bind:__l="__l" u-p="{{f}}"/><slot wx:else name="prefix"></slot></view><view class="wd-textarea__label-inner data-v-7d71e04e"><text wx:if="{{g}}" class="data-v-7d71e04e">{{h}}</text><slot wx:elif="{{i}}" name="label"></slot></view><text wx:if="{{j}}" class="wd-textarea__required data-v-7d71e04e">*</text></view><view class="{{['data-v-7d71e04e', Z]}}"><block wx:if="{{r0}}"><textarea class="{{['data-v-7d71e04e', l]}}" show-count="{{false}}" placeholder="{{m}}" disabled="{{n}}" maxlength="{{o}}" focus="{{p}}" auto-focus="{{q}}" placeholder-style="{{r}}" placeholder-class="{{s}}" auto-height="{{t}}" cursor-spacing="{{v}}" fixed="{{w}}" cursor="{{x}}" show-confirm-bar="{{y}}" selection-start="{{z}}" selection-end="{{A}}" adjust-position="{{B}}" hold-keyboard="{{C}}" confirm-type="{{D}}" confirm-hold="{{E}}" disable-default-padding="{{F}}" ignoreCompositionEvent="{{G}}" inputmode="{{H}}" bindinput="{{I}}" bindfocus="{{J}}" bindblur="{{K}}" bindconfirm="{{L}}" bindlinechange="{{M}}" bindkeyboardheightchange="{{N}}" value="{{O}}"/></block><view wx:if="{{P}}" class="wd-textarea__error-message data-v-7d71e04e">{{Q}}</view><view wx:if="{{R}}" class="wd-textarea__readonly-mask data-v-7d71e04e"/><view class="wd-textarea__suffix data-v-7d71e04e"><wd-icon wx:if="{{S}}" class="data-v-7d71e04e" bindclick="{{T}}" u-i="7d71e04e-1" bind:__l="__l" u-p="{{U}}"/><view wx:if="{{V}}" class="wd-textarea__count data-v-7d71e04e"><text class="{{['data-v-7d71e04e', X]}}">{{W}}</text> /{{Y}}</view></view></view></view>
|
||||
613
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.wxss
vendored
Normal file
613
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.wxss
vendored
Normal file
@@ -0,0 +1,613 @@
|
||||
/* 水平间距 */
|
||||
/* 水平间距 */
|
||||
/**
|
||||
* 辅助函数
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/* 转换成字符串 */
|
||||
/* 判断是否存在 Modifier */
|
||||
/* 判断是否存在伪类 */
|
||||
/**
|
||||
* 主题色切换
|
||||
* @params $theme-color 主题色
|
||||
* @params $type 变暗’dark‘ 变亮 'light'
|
||||
* @params $mix-color 自己设置的混色
|
||||
*/
|
||||
/**
|
||||
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
|
||||
* @params $open-linear 是否开启线性渐变色
|
||||
* @params $deg 渐变色角度
|
||||
* @params $theme-color 当前配色
|
||||
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
|
||||
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
|
||||
* @params [Array] $per-list 渐变色比例
|
||||
*/
|
||||
/**
|
||||
* UI规范基础变量
|
||||
*/
|
||||
/*----------------------------------------- Theme color. start ----------------------------------------*/
|
||||
/* 主题颜色 */
|
||||
/* 辅助色 */
|
||||
/* 文字颜色(默认浅色背景下 */
|
||||
/* 暗黑模式 */
|
||||
/* 图形颜色 */
|
||||
/*----------------------------------------- Theme color. end -------------------------------------------*/
|
||||
/*-------------------------------- Theme color application size. start --------------------------------*/
|
||||
/* 文字字号 */
|
||||
/* 文字字重 */
|
||||
/* 尺寸 */
|
||||
/*-------------------------------- Theme color application size. end --------------------------------*/
|
||||
/* component var */
|
||||
/* action-sheet */
|
||||
/* badge */
|
||||
/* button */
|
||||
/* cell */
|
||||
/* calendar */
|
||||
/* checkbox */
|
||||
/* collapse */
|
||||
/* divider */
|
||||
/* drop-menu */
|
||||
/* input-number */
|
||||
/* input */
|
||||
/* textarea */
|
||||
/* loadmore */
|
||||
/* message-box */
|
||||
/* notice-bar */
|
||||
/* pagination */
|
||||
/* picker */
|
||||
/* col-picker */
|
||||
/* overlay */
|
||||
/* popup */
|
||||
/* progress */
|
||||
/* radio */
|
||||
/* search */
|
||||
/* slider */
|
||||
/* sort-button */
|
||||
/* steps */
|
||||
/* switch */
|
||||
/* tabs */
|
||||
/* tag */
|
||||
/* toast */
|
||||
/* loading */
|
||||
/* tooltip */
|
||||
/* popover */
|
||||
/* grid-item */
|
||||
/* statustip */
|
||||
/* card */
|
||||
/* upload */
|
||||
/* curtain */
|
||||
/* notify */
|
||||
/* skeleton */
|
||||
/* circle */
|
||||
/* swiper */
|
||||
/* swiper-nav */
|
||||
/* segmented */
|
||||
/* tabbar */
|
||||
/* tabbar-item */
|
||||
/* navbar */
|
||||
/* navbar-capsule */
|
||||
/* table */
|
||||
/* sidebar */
|
||||
/* sidebar-item */
|
||||
/* fab */
|
||||
/* count-down */
|
||||
/* keyboard */
|
||||
/* number-keyboard */
|
||||
/* passwod-input */
|
||||
/* form-item */
|
||||
/* backtop */
|
||||
/* index-bar */
|
||||
/* text */
|
||||
/* video-preview */
|
||||
/* img-cropper */
|
||||
/* floating-panel */
|
||||
/* signature */
|
||||
/**
|
||||
* 混合宏
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/**
|
||||
* 辅助函数
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/* 转换成字符串 */
|
||||
/* 判断是否存在 Modifier */
|
||||
/* 判断是否存在伪类 */
|
||||
/**
|
||||
* 主题色切换
|
||||
* @params $theme-color 主题色
|
||||
* @params $type 变暗’dark‘ 变亮 'light'
|
||||
* @params $mix-color 自己设置的混色
|
||||
*/
|
||||
/**
|
||||
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
|
||||
* @params $open-linear 是否开启线性渐变色
|
||||
* @params $deg 渐变色角度
|
||||
* @params $theme-color 当前配色
|
||||
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
|
||||
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
|
||||
* @params [Array] $per-list 渐变色比例
|
||||
*/
|
||||
/**
|
||||
* BEM,定义块(b)
|
||||
*/
|
||||
/* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */
|
||||
/* 此方法用于生成穿透样式 */
|
||||
/* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */
|
||||
/* 定义状态(m) */
|
||||
/* 定义状态(m) */
|
||||
/* 对于需要需要嵌套在 m 底下的 e,调用这个混合宏,一般在切换整个组件的状态,如切换颜色的时候 */
|
||||
/* 状态,生成 is-$state 类名 */
|
||||
/**
|
||||
* 常用混合宏
|
||||
*/
|
||||
/* 单行超出隐藏 */
|
||||
/* 多行超出隐藏 */
|
||||
/* 清除浮动 */
|
||||
/* 0.5px 边框 指定方向*/
|
||||
/* 0.5px 边框 环绕 */
|
||||
/**
|
||||
* 三角形实现尖角样式,适用于背景透明情况
|
||||
* @param $size 三角形高,底边为 $size * 2
|
||||
* @param $bg 三角形背景颜色
|
||||
*/
|
||||
/**
|
||||
* 正方形实现尖角样式,适用于背景不透明情况
|
||||
* @param $size 正方形边长
|
||||
* @param $bg 正方形背景颜色
|
||||
* @param $z-index z-index属性值,不得大于外部包裹器
|
||||
* @param $box-shadow 阴影
|
||||
*/
|
||||
.wot-theme-dark .wd-textarea.data-v-7d71e04e {
|
||||
background: var(--wot-dark-background2, #1b1b1b);
|
||||
}
|
||||
.wot-theme-dark .wd-textarea.data-v-7d71e04e::after {
|
||||
background: var(--wot-dark-color-gray, var(--wot-color-secondary, #595959));
|
||||
}
|
||||
.wot-theme-dark .wd-textarea.is-not-empty.data-v-7d71e04e:not(.is-disabled)::after {
|
||||
background-color: var(--wot-dark-color, var(--wot-color-white, white));
|
||||
}
|
||||
.wot-theme-dark .wd-textarea__value.data-v-7d71e04e {
|
||||
background: var(--wot-dark-background2, #1b1b1b);
|
||||
}
|
||||
.wot-theme-dark .wd-textarea__inner.data-v-7d71e04e {
|
||||
color: var(--wot-dark-color, var(--wot-color-white, white));
|
||||
}
|
||||
.wot-theme-dark .wd-textarea__inner.data-v-7d71e04e::-webkit-input-placeholder {
|
||||
color: var(--wot-dark-color3, rgba(232, 230, 227, 0.8));
|
||||
}
|
||||
.wot-theme-dark .wd-textarea__count.data-v-7d71e04e {
|
||||
color: var(--wot-dark-color3, rgba(232, 230, 227, 0.8));
|
||||
background: transparent;
|
||||
}
|
||||
.wot-theme-dark .wd-textarea__count-current.data-v-7d71e04e {
|
||||
color: var(--wot-dark-color, var(--wot-color-white, white));
|
||||
}
|
||||
.wot-theme-dark .wd-textarea.data-v-7d71e04e .wd-textarea__icon,
|
||||
.wot-theme-dark .wd-textarea.data-v-7d71e04e .wd-textarea__clear {
|
||||
color: var(--wot-dark-color, var(--wot-color-white, white));
|
||||
background: transparent;
|
||||
}
|
||||
.wot-theme-dark .wd-textarea.is-cell.data-v-7d71e04e {
|
||||
background-color: var(--wot-dark-background2, #1b1b1b);
|
||||
}
|
||||
.wot-theme-dark .wd-textarea.is-cell.is-border.data-v-7d71e04e {
|
||||
position: relative;
|
||||
}
|
||||
.wot-theme-dark .wd-textarea.is-cell.is-border.data-v-7d71e04e::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: "";
|
||||
width: calc(100% - var(--wot-textarea-cell-padding, 10px));
|
||||
height: 1px;
|
||||
left: var(--wot-textarea-cell-padding, 10px);
|
||||
top: 0;
|
||||
transform: scaleY(0.5);
|
||||
background: var(--wot-dark-border-color, #3a3a3c);
|
||||
}
|
||||
.wot-theme-dark .wd-textarea.is-disabled .wd-textarea__inner.data-v-7d71e04e {
|
||||
color: var(--wot-dark-color-gray, var(--wot-color-secondary, #595959));
|
||||
background: transparent;
|
||||
}
|
||||
.wot-theme-dark .wd-textarea__label.data-v-7d71e04e {
|
||||
color: var(--wot-dark-color, var(--wot-color-white, white));
|
||||
}
|
||||
.wd-textarea.data-v-7d71e04e {
|
||||
position: relative;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
text-align: left;
|
||||
background: var(--wot-textarea-bg, var(--wot-color-white, white));
|
||||
padding: var(--wot-textarea-cell-padding, 10px) var(--wot-textarea-padding, var(--wot-size-side-padding, 15px));
|
||||
}
|
||||
.wd-textarea.data-v-7d71e04e::after {
|
||||
position: absolute;
|
||||
display: none;
|
||||
content: "";
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
background: var(--wot-textarea-border-color, #dadada);
|
||||
transform: scaleY(0.5);
|
||||
transition: background-color 0.2s ease-in-out;
|
||||
}
|
||||
.wd-textarea__label.data-v-7d71e04e {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: var(--wot-input-cell-label-width, 33%);
|
||||
color: var(--wot-cell-title-color, rgba(0, 0, 0, 0.85));
|
||||
margin-right: var(--wot-cell-padding, var(--wot-size-side-padding, 15px));
|
||||
box-sizing: border-box;
|
||||
font-size: var(--wot-textarea-fs, var(--wot-cell-title-fs, 14px));
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.wd-textarea__label-inner.data-v-7d71e04e {
|
||||
display: inline-block;
|
||||
line-height: var(--wot-cell-line-height, 24px);
|
||||
font-size: var(--wot-textarea-fs, var(--wot-cell-title-fs, 14px));
|
||||
}
|
||||
.wd-textarea__required.data-v-7d71e04e {
|
||||
font-size: var(--wot-cell-required-size, 18px);
|
||||
color: var(--wot-cell-required-color, var(--wot-color-danger, #fa4350));
|
||||
margin-left: var(--wot-cell-required-margin, 4px);
|
||||
}
|
||||
.wd-textarea__required--left.data-v-7d71e04e {
|
||||
margin-left: 0;
|
||||
margin-right: var(--wot-cell-required-margin, 4px);
|
||||
}
|
||||
.wd-textarea__prefix.data-v-7d71e04e {
|
||||
margin-right: var(--wot-textarea-icon-margin, 8px);
|
||||
font-size: var(--wot-textarea-fs, var(--wot-cell-title-fs, 14px));
|
||||
line-height: initial;
|
||||
}
|
||||
.wd-textarea__prefix.data-v-7d71e04e .wd-textarea__icon {
|
||||
margin-left: 0;
|
||||
}
|
||||
.wd-textarea__suffix.data-v-7d71e04e {
|
||||
flex-shrink: 0;
|
||||
line-height: initial;
|
||||
}
|
||||
.wd-textarea__value.data-v-7d71e04e {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
font-size: 0;
|
||||
background: var(--wot-textarea-bg, var(--wot-color-white, white));
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.wd-textarea__value.is-show-limit.data-v-7d71e04e {
|
||||
padding-bottom: 36px;
|
||||
}
|
||||
.wd-textarea__value.is-suffix.data-v-7d71e04e {
|
||||
padding-right: calc(var(--wot-textarea-icon-size, 16px) + 8px);
|
||||
}
|
||||
.wd-textarea__inner.data-v-7d71e04e {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
font-size: var(--wot-textarea-fs, var(--wot-cell-title-fs, 14px));
|
||||
line-height: var(--wot-cell-line-height, 24px);
|
||||
color: var(--wot-textarea-color, #262626);
|
||||
outline: none;
|
||||
background: none;
|
||||
border: none;
|
||||
box-sizing: border-box;
|
||||
word-break: break-word;
|
||||
min-height: 24px;
|
||||
}
|
||||
.wd-textarea__inner.data-v-7d71e04e::-webkit-input-placeholder {
|
||||
color: var(--wot-input-placeholder-color, #bfbfbf);
|
||||
}
|
||||
.wd-textarea__suffix.data-v-7d71e04e {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
.data-v-7d71e04e .wd-textarea__icon {
|
||||
margin-left: var(--wot-textarea-icon-margin, 8px);
|
||||
font-size: var(--wot-textarea-icon-size, 16px);
|
||||
color: var(--wot-textarea-icon-color, #bfbfbf);
|
||||
background: var(--wot-textarea-bg, var(--wot-color-white, white));
|
||||
}
|
||||
.data-v-7d71e04e .wd-textarea__clear {
|
||||
margin-left: var(--wot-textarea-icon-margin, 8px);
|
||||
font-size: var(--wot-textarea-icon-size, 16px);
|
||||
color: var(--wot-textarea-clear-color, #585858);
|
||||
vertical-align: middle;
|
||||
background: var(--wot-textarea-bg, var(--wot-color-white, white));
|
||||
line-height: var(--wot-cell-line-height, 24px);
|
||||
}
|
||||
.wd-textarea__count.data-v-7d71e04e {
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 0;
|
||||
font-size: var(--wot-textarea-count-fs, 14px);
|
||||
color: var(--wot-textarea-count-color, #bfbfbf);
|
||||
background: var(--wot-textarea-bg, var(--wot-color-white, white));
|
||||
line-height: 20px;
|
||||
display: inline-flex;
|
||||
}
|
||||
.wd-textarea__count-current.data-v-7d71e04e {
|
||||
color: var(--wot-textarea-count-current-color, #262626);
|
||||
}
|
||||
.wd-textarea__count-current.is-error.data-v-7d71e04e {
|
||||
color: var(--wot-input-error-color, var(--wot-color-danger, #fa4350));
|
||||
}
|
||||
.wd-textarea__readonly-mask.data-v-7d71e04e {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.wd-textarea__error-message.data-v-7d71e04e {
|
||||
color: var(--wot-form-item-error-message-color, var(--wot-color-danger, #fa4350));
|
||||
font-size: var(--wot-form-item-error-message-font-size, var(--wot-fs-secondary, 12px));
|
||||
line-height: var(--wot-form-item-error-message-line-height, 24px);
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.wd-textarea.is-not-empty.data-v-7d71e04e:not(.is-disabled)::after {
|
||||
background-color: var(--wot-textarea-not-empty-border-color, #262626);
|
||||
}
|
||||
.wd-textarea.is-disabled .wd-textarea__inner.data-v-7d71e04e {
|
||||
color: var(--wot-input-disabled-color, #d9d9d9);
|
||||
background: transparent;
|
||||
}
|
||||
.wd-textarea.is-error .wd-textarea__inner.data-v-7d71e04e {
|
||||
color: var(--wot-input-error-color, var(--wot-color-danger, #fa4350));
|
||||
background: transparent;
|
||||
}
|
||||
.wd-textarea.is-auto-height.data-v-7d71e04e:not(.is-cell) {
|
||||
padding: 5px 0;
|
||||
}
|
||||
.wd-textarea.is-auto-height.data-v-7d71e04e::after {
|
||||
display: block;
|
||||
}
|
||||
.wd-textarea.is-no-border.data-v-7d71e04e::after {
|
||||
display: none;
|
||||
}
|
||||
.wd-textarea.is-cell.data-v-7d71e04e {
|
||||
display: flex;
|
||||
line-height: var(--wot-cell-line-height, 24px);
|
||||
}
|
||||
.wd-textarea.is-cell.is-error.data-v-7d71e04e::after {
|
||||
background: var(--wot-textarea-cell-border-color, var(--wot-color-border-light, #e8e8e8));
|
||||
}
|
||||
.wd-textarea.is-cell .wd-textarea__value.data-v-7d71e04e {
|
||||
flex: 1;
|
||||
}
|
||||
.wd-textarea.is-cell.data-v-7d71e04e .wd-textarea__icon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: var(--wot-textarea-cell-height, 24px);
|
||||
line-height: var(--wot-textarea-cell-height, 24px);
|
||||
}
|
||||
.wd-textarea.is-cell .wd-textarea__prefix.data-v-7d71e04e {
|
||||
display: inline-block;
|
||||
margin-right: var(--wot-cell-icon-right, 4px);
|
||||
}
|
||||
.wd-textarea.is-cell.wd-textarea.data-v-7d71e04e::after {
|
||||
display: none;
|
||||
}
|
||||
.wd-textarea.is-cell .wd-textarea__suffix.data-v-7d71e04e {
|
||||
right: 0;
|
||||
}
|
||||
.wd-textarea.is-cell.is-center.data-v-7d71e04e {
|
||||
align-items: center;
|
||||
}
|
||||
.wd-textarea.is-cell.is-border.data-v-7d71e04e {
|
||||
position: relative;
|
||||
}
|
||||
.wd-textarea.is-cell.is-border.data-v-7d71e04e::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
content: "";
|
||||
width: calc(100% - var(--wot-textarea-cell-padding, 10px));
|
||||
height: 1px;
|
||||
left: var(--wot-textarea-cell-padding, 10px);
|
||||
top: 0;
|
||||
transform: scaleY(0.5);
|
||||
background: var(--wot-color-border-light, #e8e8e8);
|
||||
}
|
||||
.wd-textarea.is-large.data-v-7d71e04e {
|
||||
padding: var(--wot-textarea-cell-padding-large, 12px);
|
||||
}
|
||||
.wd-textarea.is-large .wd-textarea__prefix.data-v-7d71e04e {
|
||||
font-size: var(--wot-textarea-fs-large, var(--wot-cell-title-fs-large, 16px));
|
||||
}
|
||||
.wd-textarea.is-large .wd-textarea__label-inner.data-v-7d71e04e {
|
||||
font-size: var(--wot-textarea-fs-large, var(--wot-cell-title-fs-large, 16px));
|
||||
}
|
||||
.wd-textarea.is-large .wd-textarea__inner.data-v-7d71e04e {
|
||||
font-size: var(--wot-textarea-fs-large, var(--wot-cell-title-fs-large, 16px));
|
||||
}
|
||||
.wd-textarea.is-large .wd-textarea__count.data-v-7d71e04e {
|
||||
font-size: var(--wot-textarea-count-fs-large, 14px);
|
||||
}
|
||||
.wd-textarea.is-large.data-v-7d71e04e .wd-textarea__icon,
|
||||
.wd-textarea.is-large.data-v-7d71e04e .wd-textarea__clear {
|
||||
font-size: var(--wot-textarea-icon-size-large, 18px);
|
||||
}
|
||||
/* 水平间距 */
|
||||
/* 水平间距 */
|
||||
/**
|
||||
* 辅助函数
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/* 转换成字符串 */
|
||||
/* 判断是否存在 Modifier */
|
||||
/* 判断是否存在伪类 */
|
||||
/**
|
||||
* 主题色切换
|
||||
* @params $theme-color 主题色
|
||||
* @params $type 变暗’dark‘ 变亮 'light'
|
||||
* @params $mix-color 自己设置的混色
|
||||
*/
|
||||
/**
|
||||
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
|
||||
* @params $open-linear 是否开启线性渐变色
|
||||
* @params $deg 渐变色角度
|
||||
* @params $theme-color 当前配色
|
||||
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
|
||||
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
|
||||
* @params [Array] $per-list 渐变色比例
|
||||
*/
|
||||
/**
|
||||
* UI规范基础变量
|
||||
*/
|
||||
/*----------------------------------------- Theme color. start ----------------------------------------*/
|
||||
/* 主题颜色 */
|
||||
/* 辅助色 */
|
||||
/* 文字颜色(默认浅色背景下 */
|
||||
/* 暗黑模式 */
|
||||
/* 图形颜色 */
|
||||
/*----------------------------------------- Theme color. end -------------------------------------------*/
|
||||
/*-------------------------------- Theme color application size. start --------------------------------*/
|
||||
/* 文字字号 */
|
||||
/* 文字字重 */
|
||||
/* 尺寸 */
|
||||
/*-------------------------------- Theme color application size. end --------------------------------*/
|
||||
/* component var */
|
||||
/* action-sheet */
|
||||
/* badge */
|
||||
/* button */
|
||||
/* cell */
|
||||
/* calendar */
|
||||
/* checkbox */
|
||||
/* collapse */
|
||||
/* divider */
|
||||
/* drop-menu */
|
||||
/* input-number */
|
||||
/* input */
|
||||
/* textarea */
|
||||
/* loadmore */
|
||||
/* message-box */
|
||||
/* notice-bar */
|
||||
/* pagination */
|
||||
/* picker */
|
||||
/* col-picker */
|
||||
/* overlay */
|
||||
/* popup */
|
||||
/* progress */
|
||||
/* radio */
|
||||
/* search */
|
||||
/* slider */
|
||||
/* sort-button */
|
||||
/* steps */
|
||||
/* switch */
|
||||
/* tabs */
|
||||
/* tag */
|
||||
/* toast */
|
||||
/* loading */
|
||||
/* tooltip */
|
||||
/* popover */
|
||||
/* grid-item */
|
||||
/* statustip */
|
||||
/* card */
|
||||
/* upload */
|
||||
/* curtain */
|
||||
/* notify */
|
||||
/* skeleton */
|
||||
/* circle */
|
||||
/* swiper */
|
||||
/* swiper-nav */
|
||||
/* segmented */
|
||||
/* tabbar */
|
||||
/* tabbar-item */
|
||||
/* navbar */
|
||||
/* navbar-capsule */
|
||||
/* table */
|
||||
/* sidebar */
|
||||
/* sidebar-item */
|
||||
/* fab */
|
||||
/* count-down */
|
||||
/* keyboard */
|
||||
/* number-keyboard */
|
||||
/* passwod-input */
|
||||
/* form-item */
|
||||
/* backtop */
|
||||
/* index-bar */
|
||||
/* text */
|
||||
/* video-preview */
|
||||
/* img-cropper */
|
||||
/* floating-panel */
|
||||
/* signature */
|
||||
/**
|
||||
* 混合宏
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/**
|
||||
* 辅助函数
|
||||
*/
|
||||
/**
|
||||
* SCSS 配置项:命名空间以及BEM
|
||||
*/
|
||||
/* 转换成字符串 */
|
||||
/* 判断是否存在 Modifier */
|
||||
/* 判断是否存在伪类 */
|
||||
/**
|
||||
* 主题色切换
|
||||
* @params $theme-color 主题色
|
||||
* @params $type 变暗’dark‘ 变亮 'light'
|
||||
* @params $mix-color 自己设置的混色
|
||||
*/
|
||||
/**
|
||||
* 颜色结果切换, 如果开启线性渐变色 使用渐变色,如果没有开启,那么使用主题色
|
||||
* @params $open-linear 是否开启线性渐变色
|
||||
* @params $deg 渐变色角度
|
||||
* @params $theme-color 当前配色
|
||||
* @params [Array] $set 主题色明暗设置,与 $color-list 数量对应
|
||||
* @params [Array] $color-list 渐变色顺序, $color-list 和 $per-list 数量相同
|
||||
* @params [Array] $per-list 渐变色比例
|
||||
*/
|
||||
/**
|
||||
* BEM,定义块(b)
|
||||
*/
|
||||
/* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */
|
||||
/* 此方法用于生成穿透样式 */
|
||||
/* 定义元素(e),对于伪类,会自动将 e 嵌套在 伪类 底下 */
|
||||
/* 定义状态(m) */
|
||||
/* 定义状态(m) */
|
||||
/* 对于需要需要嵌套在 m 底下的 e,调用这个混合宏,一般在切换整个组件的状态,如切换颜色的时候 */
|
||||
/* 状态,生成 is-$state 类名 */
|
||||
/**
|
||||
* 常用混合宏
|
||||
*/
|
||||
/* 单行超出隐藏 */
|
||||
/* 多行超出隐藏 */
|
||||
/* 清除浮动 */
|
||||
/* 0.5px 边框 指定方向*/
|
||||
/* 0.5px 边框 环绕 */
|
||||
/**
|
||||
* 三角形实现尖角样式,适用于背景透明情况
|
||||
* @param $size 三角形高,底边为 $size * 2
|
||||
* @param $bg 三角形背景颜色
|
||||
*/
|
||||
/**
|
||||
* 正方形实现尖角样式,适用于背景不透明情况
|
||||
* @param $size 正方形边长
|
||||
* @param $bg 正方形背景颜色
|
||||
* @param $z-index z-index属性值,不得大于外部包裹器
|
||||
* @param $box-shadow 阴影
|
||||
*/
|
||||
.wot-theme-dark .wd-textarea__placeholder {
|
||||
color: var(--wot-dark-color3, rgba(232, 230, 227, 0.8));
|
||||
}
|
||||
.wd-textarea__placeholder {
|
||||
color: var(--wot-input-placeholder-color, #bfbfbf);
|
||||
}
|
||||
.wd-textarea__placeholder.is-error {
|
||||
color: var(--wot-input-error-color, var(--wot-color-danger, #fa4350));
|
||||
}
|
||||
Reference in New Issue
Block a user