弹窗
This commit is contained in:
161
unpackage/dist/dev/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.js
vendored
Normal file
161
unpackage/dist/dev/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.js
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "uniCombox",
|
||||
emits: ["input", "update:modelValue"],
|
||||
props: {
|
||||
clearAble: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
border: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
labelWidth: {
|
||||
type: String,
|
||||
default: "auto"
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
candidates: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
emptyTips: {
|
||||
type: String,
|
||||
default: "无匹配项"
|
||||
},
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showSelector: false,
|
||||
inputVal: ""
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
labelStyle() {
|
||||
if (this.labelWidth === "auto") {
|
||||
return "";
|
||||
}
|
||||
return `width: ${this.labelWidth}`;
|
||||
},
|
||||
filterCandidates() {
|
||||
return this.candidates.filter((item) => {
|
||||
return item.toString().indexOf(this.inputVal) > -1;
|
||||
});
|
||||
},
|
||||
filterCandidatesLength() {
|
||||
return this.filterCandidates.length;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
modelValue: {
|
||||
handler(newVal) {
|
||||
this.inputVal = newVal;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleSelector() {
|
||||
this.showSelector = !this.showSelector;
|
||||
},
|
||||
onFocus() {
|
||||
this.showSelector = true;
|
||||
},
|
||||
onBlur() {
|
||||
setTimeout(() => {
|
||||
this.showSelector = false;
|
||||
}, 153);
|
||||
},
|
||||
onSelectorClick(index) {
|
||||
this.inputVal = this.filterCandidates[index];
|
||||
this.showSelector = false;
|
||||
this.$emit("input", this.inputVal);
|
||||
this.$emit("update:modelValue", this.inputVal);
|
||||
},
|
||||
onInput() {
|
||||
setTimeout(() => {
|
||||
this.$emit("input", this.inputVal);
|
||||
this.$emit("update:modelValue", this.inputVal);
|
||||
});
|
||||
},
|
||||
clean() {
|
||||
this.inputVal = "";
|
||||
this.onInput();
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../../uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $props.label
|
||||
}, $props.label ? {
|
||||
b: common_vendor.t($props.label),
|
||||
c: common_vendor.s($options.labelStyle)
|
||||
} : {}, {
|
||||
d: $props.placeholder,
|
||||
e: common_vendor.o$1([($event) => $data.inputVal = $event.detail.value, (...args) => $options.onInput && $options.onInput(...args)]),
|
||||
f: common_vendor.o$1((...args) => $options.onFocus && $options.onFocus(...args)),
|
||||
g: common_vendor.o$1((...args) => $options.onBlur && $options.onBlur(...args)),
|
||||
h: $data.inputVal,
|
||||
i: !$data.inputVal || !$props.clearAble
|
||||
}, !$data.inputVal || !$props.clearAble ? {
|
||||
j: common_vendor.o$1($options.toggleSelector),
|
||||
k: common_vendor.p({
|
||||
type: $data.showSelector ? "top" : "bottom",
|
||||
size: "30",
|
||||
color: "#999"
|
||||
})
|
||||
} : {}, {
|
||||
l: $data.inputVal && $props.clearAble
|
||||
}, $data.inputVal && $props.clearAble ? {
|
||||
m: common_vendor.o$1($options.clean),
|
||||
n: common_vendor.p({
|
||||
type: "clear",
|
||||
size: "24",
|
||||
color: "#999",
|
||||
width: "60rpx",
|
||||
height: "60rpx"
|
||||
})
|
||||
} : {}, {
|
||||
o: $data.showSelector
|
||||
}, $data.showSelector ? common_vendor.e({
|
||||
p: $options.filterCandidatesLength === 0
|
||||
}, $options.filterCandidatesLength === 0 ? {
|
||||
q: common_vendor.t($props.emptyTips)
|
||||
} : {}, {
|
||||
r: common_vendor.f($options.filterCandidates, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item),
|
||||
b: index,
|
||||
c: common_vendor.o$1(($event) => $options.onSelectorClick(index), index)
|
||||
};
|
||||
})
|
||||
}) : {}, {
|
||||
s: common_vendor.n($props.border ? "" : "uni-combox__no-border")
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-e602780e"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.js.map
|
||||
6
unpackage/dist/dev/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.json
vendored
Normal file
6
unpackage/dist/dev/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../../uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['uni-combox', 'data-v-e602780e', s]}}"><view wx:if="{{a}}" class="uni-combox__label data-v-e602780e" style="{{c}}"><text class="data-v-e602780e">{{b}}</text></view><view class="uni-combox__input-box data-v-e602780e"><input class="uni-combox__input data-v-e602780e" type="text" placeholder="{{d}}" placeholder-class="uni-combox__input-plac" bindinput="{{e}}" bindfocus="{{f}}" bindblur="{{g}}" value="{{h}}"/><uni-icons wx:if="{{i}}" class="data-v-e602780e" bindclick="{{j}}" u-i="e602780e-0" bind:__l="__l" u-p="{{k}}"></uni-icons><uni-icons wx:if="{{l}}" class="data-v-e602780e" bindclick="{{m}}" u-i="e602780e-1" bind:__l="__l" u-p="{{n}}"></uni-icons></view><view wx:if="{{o}}" class="uni-combox__selector data-v-e602780e"><view class="uni-popper__arrow data-v-e602780e"></view><scroll-view scroll-y="true" class="uni-combox__selector-scroll data-v-e602780e"><view wx:if="{{p}}" class="uni-combox__selector-empty data-v-e602780e"><text class="data-v-e602780e">{{q}}</text></view><view wx:for="{{r}}" wx:for-item="item" wx:key="b" class="uni-combox__selector-item data-v-e602780e" bindtap="{{item.c}}"><text class="data-v-e602780e">{{item.a}}</text></view></scroll-view></view></view>
|
||||
126
unpackage/dist/dev/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.wxss
vendored
Normal file
126
unpackage/dist/dev/mp-weixin/uni_modules/uni-combox/components/uni-combox/uni-combox.wxss
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uni-combox.data-v-e602780e {
|
||||
font-size: 14px;
|
||||
border: 1px solid #DCDFE6;
|
||||
border-radius: 4px;
|
||||
padding: 6px 10px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.uni-combox__icon.data-v-e602780e {
|
||||
border: 1px solid #004cff;
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
.uni-combox__label.data-v-e602780e {
|
||||
font-size: 16px;
|
||||
line-height: 22px;
|
||||
padding-right: 10px;
|
||||
color: #999999;
|
||||
}
|
||||
.uni-combox__input-box.data-v-e602780e {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.uni-combox__input.data-v-e602780e {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.uni-combox__input-plac.data-v-e602780e {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
}
|
||||
.uni-combox__selector.data-v-e602780e {
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
top: calc(100% + 12px);
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #EBEEF5;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 2;
|
||||
padding: 4px 0;
|
||||
}
|
||||
.uni-combox__selector-scroll.data-v-e602780e {
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
max-height: 200px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.uni-combox__selector-empty.data-v-e602780e,
|
||||
.uni-combox__selector-item.data-v-e602780e {
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
line-height: 36px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
.uni-combox__selector-item.data-v-e602780e:hover {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.uni-combox__selector-empty.data-v-e602780e:last-child,
|
||||
.uni-combox__selector-item.data-v-e602780e:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.uni-popper__arrow.data-v-e602780e,
|
||||
.uni-popper__arrow.data-v-e602780e::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
border-width: 6px;
|
||||
}
|
||||
.uni-popper__arrow.data-v-e602780e {
|
||||
filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
|
||||
top: -6px;
|
||||
left: 10%;
|
||||
margin-right: 3px;
|
||||
border-top-width: 0;
|
||||
border-bottom-color: #EBEEF5;
|
||||
}
|
||||
.uni-popper__arrow.data-v-e602780e::after {
|
||||
content: " ";
|
||||
top: 1px;
|
||||
margin-left: -6px;
|
||||
border-top-width: 0;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
.uni-combox__no-border.data-v-e602780e {
|
||||
border: none;
|
||||
}
|
||||
476
unpackage/dist/dev/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js
vendored
Normal file
476
unpackage/dist/dev/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js
vendored
Normal file
@@ -0,0 +1,476 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
function obj2strClass(obj) {
|
||||
let classess = "";
|
||||
for (let key in obj) {
|
||||
const val = obj[key];
|
||||
if (val) {
|
||||
classess += `${key} `;
|
||||
}
|
||||
}
|
||||
return classess;
|
||||
}
|
||||
function obj2strStyle(obj) {
|
||||
let style = "";
|
||||
for (let key in obj) {
|
||||
const val = obj[key];
|
||||
style += `${key}:${val};`;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
const _sfc_main = {
|
||||
name: "uni-easyinput",
|
||||
emits: [
|
||||
"click",
|
||||
"iconClick",
|
||||
"update:modelValue",
|
||||
"input",
|
||||
"focus",
|
||||
"blur",
|
||||
"confirm",
|
||||
"clear",
|
||||
"eyes",
|
||||
"change",
|
||||
"keyboardheightchange"
|
||||
],
|
||||
model: {
|
||||
prop: "modelValue",
|
||||
event: "update:modelValue"
|
||||
},
|
||||
options: {
|
||||
virtualHost: true
|
||||
},
|
||||
inject: {
|
||||
form: {
|
||||
from: "uniForm",
|
||||
default: null
|
||||
},
|
||||
formItem: {
|
||||
from: "uniFormItem",
|
||||
default: null
|
||||
}
|
||||
},
|
||||
props: {
|
||||
name: String,
|
||||
value: [Number, String],
|
||||
modelValue: [Number, String],
|
||||
type: {
|
||||
type: String,
|
||||
default: "text"
|
||||
},
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
autoHeight: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: " "
|
||||
},
|
||||
placeholderStyle: String,
|
||||
focus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
maxlength: {
|
||||
type: [Number, String],
|
||||
default: 140
|
||||
},
|
||||
confirmType: {
|
||||
type: String,
|
||||
default: "done"
|
||||
},
|
||||
clearSize: {
|
||||
type: [Number, String],
|
||||
default: 24
|
||||
},
|
||||
inputBorder: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
prefixIcon: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
suffixIcon: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
trim: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
cursorSpacing: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
passwordIcon: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
adjustPosition: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
primaryColor: {
|
||||
type: String,
|
||||
default: "#2979ff"
|
||||
},
|
||||
styles: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
color: "#333",
|
||||
backgroundColor: "#fff",
|
||||
disableColor: "#F7F6F6",
|
||||
borderColor: "#e5e5e5"
|
||||
};
|
||||
}
|
||||
},
|
||||
errorMessage: {
|
||||
type: [String, Boolean],
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
focused: false,
|
||||
val: "",
|
||||
showMsg: "",
|
||||
border: false,
|
||||
isFirstBorder: false,
|
||||
showClearIcon: false,
|
||||
showPassword: false,
|
||||
focusShow: false,
|
||||
localMsg: "",
|
||||
isEnter: false
|
||||
// 用于判断当前是否是使用回车操作
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// 输入框内是否有值
|
||||
isVal() {
|
||||
const val = this.val;
|
||||
if (val || val === 0) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
msg() {
|
||||
return this.localMsg || this.errorMessage;
|
||||
},
|
||||
// 因为uniapp的input组件的maxlength组件必须要数值,这里转为数值,用户可以传入字符串数值
|
||||
inputMaxlength() {
|
||||
return Number(this.maxlength);
|
||||
},
|
||||
// 处理外层样式的style
|
||||
boxStyle() {
|
||||
return `color:${this.inputBorder && this.msg ? "#e43d33" : this.styles.color};`;
|
||||
},
|
||||
// input 内容的类和样式处理
|
||||
inputContentClass() {
|
||||
return obj2strClass({
|
||||
"is-input-border": this.inputBorder,
|
||||
"is-input-error-border": this.inputBorder && this.msg,
|
||||
"is-textarea": this.type === "textarea",
|
||||
"is-disabled": this.disabled,
|
||||
"is-focused": this.focusShow
|
||||
});
|
||||
},
|
||||
inputContentStyle() {
|
||||
const focusColor = this.focusShow ? this.primaryColor : this.styles.borderColor;
|
||||
const borderColor = this.inputBorder && this.msg ? "#dd524d" : focusColor;
|
||||
return obj2strStyle({
|
||||
"border-color": borderColor || "#e5e5e5",
|
||||
"background-color": this.disabled ? this.styles.disableColor : this.styles.backgroundColor
|
||||
});
|
||||
},
|
||||
// input右侧样式
|
||||
inputStyle() {
|
||||
const paddingRight = this.type === "password" || this.clearable || this.prefixIcon ? "" : "10px";
|
||||
return obj2strStyle({
|
||||
"padding-right": paddingRight,
|
||||
"padding-left": this.prefixIcon ? "" : "10px"
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(newVal) {
|
||||
if (newVal === null) {
|
||||
this.val = "";
|
||||
return;
|
||||
}
|
||||
this.val = newVal;
|
||||
},
|
||||
modelValue(newVal) {
|
||||
if (newVal === null) {
|
||||
this.val = "";
|
||||
return;
|
||||
}
|
||||
this.val = newVal;
|
||||
},
|
||||
focus(newVal) {
|
||||
this.$nextTick(() => {
|
||||
this.focused = this.focus;
|
||||
this.focusShow = this.focus;
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init();
|
||||
if (this.form && this.formItem) {
|
||||
this.$watch("formItem.errMsg", (newVal) => {
|
||||
this.localMsg = newVal;
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.focused = this.focus;
|
||||
this.focusShow = this.focus;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 初始化变量值
|
||||
*/
|
||||
init() {
|
||||
if (this.value || this.value === 0) {
|
||||
this.val = this.value;
|
||||
} else if (this.modelValue || this.modelValue === 0 || this.modelValue === "") {
|
||||
this.val = this.modelValue;
|
||||
} else {
|
||||
this.val = "";
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击图标时触发
|
||||
* @param {Object} type
|
||||
*/
|
||||
onClickIcon(type) {
|
||||
this.$emit("iconClick", type);
|
||||
},
|
||||
/**
|
||||
* 显示隐藏内容,密码框时生效
|
||||
*/
|
||||
onEyes() {
|
||||
this.showPassword = !this.showPassword;
|
||||
this.$emit("eyes", this.showPassword);
|
||||
},
|
||||
/**
|
||||
* 输入时触发
|
||||
* @param {Object} event
|
||||
*/
|
||||
onInput(event) {
|
||||
let value = event.detail.value;
|
||||
if (this.trim) {
|
||||
if (typeof this.trim === "boolean" && this.trim) {
|
||||
value = this.trimStr(value);
|
||||
}
|
||||
if (typeof this.trim === "string") {
|
||||
value = this.trimStr(value, this.trim);
|
||||
}
|
||||
}
|
||||
if (this.errMsg)
|
||||
this.errMsg = "";
|
||||
this.val = value;
|
||||
this.$emit("input", value);
|
||||
this.$emit("update:modelValue", value);
|
||||
},
|
||||
/**
|
||||
* 外部调用方法
|
||||
* 获取焦点时触发
|
||||
* @param {Object} event
|
||||
*/
|
||||
onFocus() {
|
||||
this.$nextTick(() => {
|
||||
this.focused = true;
|
||||
});
|
||||
this.$emit("focus", null);
|
||||
},
|
||||
_Focus(event) {
|
||||
this.focusShow = true;
|
||||
this.$emit("focus", event);
|
||||
},
|
||||
/**
|
||||
* 外部调用方法
|
||||
* 失去焦点时触发
|
||||
* @param {Object} event
|
||||
*/
|
||||
onBlur() {
|
||||
this.focused = false;
|
||||
this.$emit("blur", null);
|
||||
},
|
||||
_Blur(event) {
|
||||
event.detail.value;
|
||||
this.focusShow = false;
|
||||
this.$emit("blur", event);
|
||||
if (this.isEnter === false) {
|
||||
this.$emit("change", this.val);
|
||||
}
|
||||
if (this.form && this.formItem) {
|
||||
const { validateTrigger } = this.form;
|
||||
if (validateTrigger === "blur") {
|
||||
this.formItem.onFieldChange();
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 按下键盘的发送键
|
||||
* @param {Object} e
|
||||
*/
|
||||
onConfirm(e) {
|
||||
this.$emit("confirm", this.val);
|
||||
this.isEnter = true;
|
||||
this.$emit("change", this.val);
|
||||
this.$nextTick(() => {
|
||||
this.isEnter = false;
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 清理内容
|
||||
* @param {Object} event
|
||||
*/
|
||||
onClear(event) {
|
||||
this.val = "";
|
||||
this.$emit("input", "");
|
||||
this.$emit("update:modelValue", "");
|
||||
this.$emit("clear");
|
||||
},
|
||||
/**
|
||||
* 键盘高度发生变化的时候触发此事件
|
||||
* 兼容性:微信小程序2.7.0+、App 3.1.0+
|
||||
* @param {Object} event
|
||||
*/
|
||||
onkeyboardheightchange(event) {
|
||||
this.$emit("keyboardheightchange", event);
|
||||
},
|
||||
/**
|
||||
* 去除空格
|
||||
*/
|
||||
trimStr(str, pos = "both") {
|
||||
if (pos === "both") {
|
||||
return str.trim();
|
||||
} else if (pos === "left") {
|
||||
return str.trimLeft();
|
||||
} else if (pos === "right") {
|
||||
return str.trimRight();
|
||||
} else if (pos === "start") {
|
||||
return str.trimStart();
|
||||
} else if (pos === "end") {
|
||||
return str.trimEnd();
|
||||
} else if (pos === "all") {
|
||||
return str.replace(/\s+/g, "");
|
||||
} else if (pos === "none") {
|
||||
return str;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
|
||||
_easycom_uni_icons2();
|
||||
}
|
||||
const _easycom_uni_icons = () => "../../../uni-icons/components/uni-icons/uni-icons.js";
|
||||
if (!Math) {
|
||||
_easycom_uni_icons();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $props.prefixIcon
|
||||
}, $props.prefixIcon ? {
|
||||
b: common_vendor.o$1(($event) => $options.onClickIcon("prefix")),
|
||||
c: common_vendor.p({
|
||||
type: $props.prefixIcon,
|
||||
color: "#c0c4cc",
|
||||
size: "22"
|
||||
})
|
||||
} : {}, {
|
||||
d: $props.type === "textarea"
|
||||
}, $props.type === "textarea" ? {
|
||||
e: $props.inputBorder ? 1 : "",
|
||||
f: $props.name,
|
||||
g: $data.val,
|
||||
h: $props.placeholder,
|
||||
i: $props.placeholderStyle,
|
||||
j: $props.disabled,
|
||||
k: $options.inputMaxlength,
|
||||
l: $data.focused,
|
||||
m: $props.autoHeight,
|
||||
n: $props.cursorSpacing,
|
||||
o: $props.adjustPosition,
|
||||
p: common_vendor.o$1((...args) => $options.onInput && $options.onInput(...args)),
|
||||
q: common_vendor.o$1((...args) => $options._Blur && $options._Blur(...args)),
|
||||
r: common_vendor.o$1((...args) => $options._Focus && $options._Focus(...args)),
|
||||
s: common_vendor.o$1((...args) => $options.onConfirm && $options.onConfirm(...args)),
|
||||
t: common_vendor.o$1((...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
|
||||
} : {
|
||||
v: $props.type === "password" ? "text" : $props.type,
|
||||
w: common_vendor.s($options.inputStyle),
|
||||
x: $props.name,
|
||||
y: $data.val,
|
||||
z: !$data.showPassword && $props.type === "password",
|
||||
A: $props.placeholder,
|
||||
B: $props.placeholderStyle,
|
||||
C: $props.disabled,
|
||||
D: $options.inputMaxlength,
|
||||
E: $data.focused,
|
||||
F: $props.confirmType,
|
||||
G: $props.cursorSpacing,
|
||||
H: $props.adjustPosition,
|
||||
I: common_vendor.o$1((...args) => $options._Focus && $options._Focus(...args)),
|
||||
J: common_vendor.o$1((...args) => $options._Blur && $options._Blur(...args)),
|
||||
K: common_vendor.o$1((...args) => $options.onInput && $options.onInput(...args)),
|
||||
L: common_vendor.o$1((...args) => $options.onConfirm && $options.onConfirm(...args)),
|
||||
M: common_vendor.o$1((...args) => $options.onkeyboardheightchange && $options.onkeyboardheightchange(...args))
|
||||
}, {
|
||||
N: $props.type === "password" && $props.passwordIcon
|
||||
}, $props.type === "password" && $props.passwordIcon ? common_vendor.e({
|
||||
O: $options.isVal
|
||||
}, $options.isVal ? {
|
||||
P: $props.type === "textarea" ? 1 : "",
|
||||
Q: common_vendor.o$1($options.onEyes),
|
||||
R: common_vendor.p({
|
||||
type: $data.showPassword ? "eye-slash-filled" : "eye-filled",
|
||||
size: 22,
|
||||
color: $data.focusShow ? $props.primaryColor : "#c0c4cc"
|
||||
})
|
||||
} : {}) : {}, {
|
||||
S: $props.suffixIcon
|
||||
}, $props.suffixIcon ? common_vendor.e({
|
||||
T: $props.suffixIcon
|
||||
}, $props.suffixIcon ? {
|
||||
U: common_vendor.o$1(($event) => $options.onClickIcon("suffix")),
|
||||
V: common_vendor.p({
|
||||
type: $props.suffixIcon,
|
||||
color: "#c0c4cc",
|
||||
size: "22"
|
||||
})
|
||||
} : {}) : common_vendor.e({
|
||||
W: $props.clearable && $options.isVal && !$props.disabled && $props.type !== "textarea"
|
||||
}, $props.clearable && $options.isVal && !$props.disabled && $props.type !== "textarea" ? {
|
||||
X: $props.type === "textarea" ? 1 : "",
|
||||
Y: common_vendor.o$1($options.onClear),
|
||||
Z: common_vendor.p({
|
||||
type: "clear",
|
||||
size: $props.clearSize,
|
||||
color: $options.msg ? "#dd524d" : $data.focusShow ? $props.primaryColor : "#c0c4cc"
|
||||
})
|
||||
} : {}), {
|
||||
aa: common_vendor.n($options.inputContentClass),
|
||||
ab: common_vendor.s($options.inputContentStyle),
|
||||
ac: $options.msg ? 1 : "",
|
||||
ad: common_vendor.s($options.boxStyle)
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js.map
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"uni-icons": "../../../uni-icons/components/uni-icons/uni-icons"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="{{['uni-easyinput', ac && 'uni-easyinput-error']}}" style="{{ad}}"><view class="{{['uni-easyinput__content', aa]}}" style="{{ab}}"><uni-icons wx:if="{{a}}" class="content-clear-icon" catchclick="{{b}}" u-i="61595fa3-0" bind:__l="__l" u-p="{{c}}"></uni-icons><slot name="left"></slot><textarea wx:if="{{d}}" class="{{['uni-easyinput__content-textarea', e && 'input-padding']}}" name="{{f}}" value="{{g}}" placeholder="{{h}}" placeholderStyle="{{i}}" disabled="{{j}}" placeholder-class="uni-easyinput__placeholder-class" maxlength="{{k}}" focus="{{l}}" autoHeight="{{m}}" cursor-spacing="{{n}}" adjust-position="{{o}}" bindinput="{{p}}" bindblur="{{q}}" bindfocus="{{r}}" bindconfirm="{{s}}" bindkeyboardheightchange="{{t}}"></textarea><block wx:else><input wx:if="{{r0}}" type="{{v}}" class="uni-easyinput__content-input" style="{{w}}" name="{{x}}" value="{{y}}" password="{{z}}" placeholder="{{A}}" placeholderStyle="{{B}}" placeholder-class="uni-easyinput__placeholder-class" disabled="{{C}}" maxlength="{{D}}" focus="{{E}}" confirmType="{{F}}" cursor-spacing="{{G}}" adjust-position="{{H}}" bindfocus="{{I}}" bindblur="{{J}}" bindinput="{{K}}" bindconfirm="{{L}}" bindkeyboardheightchange="{{M}}"/></block><block wx:if="{{N}}"><uni-icons wx:if="{{O}}" class="{{['content-clear-icon', P && 'is-textarea-icon']}}" bindclick="{{Q}}" u-i="61595fa3-1" bind:__l="__l" u-p="{{R}}"></uni-icons></block><block wx:if="{{S}}"><uni-icons wx:if="{{T}}" class="content-clear-icon" catchclick="{{U}}" u-i="61595fa3-2" bind:__l="__l" u-p="{{V}}"></uni-icons></block><block wx:else><uni-icons wx:if="{{W}}" class="{{['content-clear-icon', X && 'is-textarea-icon']}}" bindclick="{{Y}}" u-i="61595fa3-3" bind:__l="__l" u-p="{{Z}}"></uni-icons></block><slot name="right"></slot></view></view>
|
||||
144
unpackage/dist/dev/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.wxss
vendored
Normal file
144
unpackage/dist/dev/mp-weixin/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.wxss
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uni-easyinput {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
text-align: left;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
}
|
||||
.uni-easyinput__content {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
border-color: #fff;
|
||||
transition-property: border-color;
|
||||
transition-duration: 0.3s;
|
||||
}
|
||||
.uni-easyinput__content-input {
|
||||
width: auto;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
line-height: 1;
|
||||
font-size: 14px;
|
||||
height: 35px;
|
||||
/*ifdef H5*/
|
||||
/*endif*/
|
||||
}
|
||||
.uni-easyinput__content-input ::-ms-reveal {
|
||||
display: none;
|
||||
}
|
||||
.uni-easyinput__content-input ::-ms-clear {
|
||||
display: none;
|
||||
}
|
||||
.uni-easyinput__content-input ::-o-clear {
|
||||
display: none;
|
||||
}
|
||||
.uni-easyinput__placeholder-class {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
.is-textarea {
|
||||
align-items: flex-start;
|
||||
}
|
||||
.is-textarea-icon {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.uni-easyinput__content-textarea {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
flex: 1;
|
||||
line-height: 1.5;
|
||||
font-size: 14px;
|
||||
margin: 6px;
|
||||
margin-left: 0;
|
||||
height: 80px;
|
||||
min-height: 80px;
|
||||
min-height: 80px;
|
||||
width: auto;
|
||||
}
|
||||
.input-padding {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.content-clear-icon {
|
||||
padding: 0 5px;
|
||||
}
|
||||
.label-icon {
|
||||
margin-right: 5px;
|
||||
margin-top: -1px;
|
||||
}
|
||||
.is-input-border {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.uni-error-message {
|
||||
position: absolute;
|
||||
bottom: -17px;
|
||||
left: 0;
|
||||
line-height: 12px;
|
||||
color: #e43d33;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
.uni-error-msg--boeder {
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
line-height: 22px;
|
||||
}
|
||||
.is-input-error-border {
|
||||
border-color: #e43d33;
|
||||
}
|
||||
.is-input-error-border .uni-easyinput__placeholder-class {
|
||||
color: #f29e99;
|
||||
}
|
||||
.uni-easyinput--border {
|
||||
margin-bottom: 0;
|
||||
padding: 10px 15px;
|
||||
border-top: 1px #eee solid;
|
||||
}
|
||||
.uni-easyinput-error {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.is-first-border {
|
||||
border: none;
|
||||
}
|
||||
.is-disabled {
|
||||
background-color: #f7f6f6;
|
||||
color: #d5d5d5;
|
||||
}
|
||||
.is-disabled .uni-easyinput__placeholder-class {
|
||||
color: #d5d5d5;
|
||||
font-size: 12px;
|
||||
}
|
||||
73
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js
vendored
Normal file
73
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
"use strict";
|
||||
const uni_modules_uniIcons_components_uniIcons_uniicons_file_vue = require("./uniicons_file_vue.js");
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const getVal = (val) => {
|
||||
const reg = /^[0-9]*$/g;
|
||||
return typeof val === "number" || reg.test(val) ? val + "px" : val;
|
||||
};
|
||||
const _sfc_main = {
|
||||
name: "UniIcons",
|
||||
emits: ["click"],
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "#333333"
|
||||
},
|
||||
size: {
|
||||
type: [Number, String],
|
||||
default: 16
|
||||
},
|
||||
customPrefix: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
fontFamily: {
|
||||
type: String,
|
||||
default: ""
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
icons: uni_modules_uniIcons_components_uniIcons_uniicons_file_vue.fontData
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
unicode() {
|
||||
let code = this.icons.find((v) => v.font_class === this.type);
|
||||
if (code) {
|
||||
return code.unicode;
|
||||
}
|
||||
return "";
|
||||
},
|
||||
iconSize() {
|
||||
return getVal(this.size);
|
||||
},
|
||||
styleObj() {
|
||||
if (this.fontFamily !== "") {
|
||||
return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`;
|
||||
}
|
||||
return `color: ${this.color}; font-size: ${this.iconSize};`;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
_onClick() {
|
||||
this.$emit("click");
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.s($options.styleObj),
|
||||
b: common_vendor.n("uniui-" + $props.type),
|
||||
c: common_vendor.n($props.customPrefix),
|
||||
d: common_vendor.n($props.customPrefix ? $props.type : ""),
|
||||
e: common_vendor.o$1((...args) => $options._onClick && $options._onClick(...args))
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<text style="{{a}}" class="{{['uni-icons', b, c, d]}}" bindtap="{{e}}"><slot></slot></text>
|
||||
532
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss
vendored
Normal file
532
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uni-icons.wxss
vendored
Normal file
File diff suppressed because one or more lines are too long
649
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
vendored
Normal file
649
unpackage/dist/dev/mp-weixin/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
vendored
Normal file
@@ -0,0 +1,649 @@
|
||||
"use strict";
|
||||
const fontData = [
|
||||
{
|
||||
"font_class": "arrow-down",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-left",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-right",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "arrow-up",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "auth",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "auth-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "back",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "bars",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "calendar",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "calendar-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "camera",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "camera-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cart",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cart-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chat",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chat-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chatboxes",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chatboxes-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chatbubble",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "chatbubble-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "checkbox",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "checkbox-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "checkmarkempty",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "circle",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "circle-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "clear",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "close",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "closeempty",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-download",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-download-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-upload",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "cloud-upload-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "color",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "color-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "compose",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "contact",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "contact-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "down",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "bottom",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "download",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "download-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "email",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "email-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "eye",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "eye-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "eye-slash",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "eye-slash-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "fire",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "fire-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "flag",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "flag-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "folder-add",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "folder-add-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "font",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "forward",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "gear",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "gear-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "gift",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "gift-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "hand-down",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "hand-down-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "hand-up",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "hand-up-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "headphones",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "heart",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "heart-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "help",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "help-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "home",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "home-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "image",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "image-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "images",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "images-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "info",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "info-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "left",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "link",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "list",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "location",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "location-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "locked",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "locked-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "loop",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "mail-open",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "mail-open-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "map",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "map-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "map-pin",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "map-pin-ellipse",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "medal",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "medal-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "mic",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "mic-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "micoff",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "micoff-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "minus",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "minus-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "more",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "more-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "navigate",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "navigate-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "notification",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "notification-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "paperclip",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "paperplane",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "paperplane-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "person",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "person-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "personadd",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "personadd-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "personadd-filled-copy",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "phone",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "phone-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "plus",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "plus-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "plusempty",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "pulldown",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "pyq",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "qq",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "redo",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "redo-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "refresh",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "refresh-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "refreshempty",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "reload",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "right",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "scan",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "search",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "settings",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "settings-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "shop",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "shop-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "smallcircle",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "smallcircle-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "sound",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "sound-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "spinner-cycle",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "staff",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "staff-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "star",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "star-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "starhalf",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "trash",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "trash-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "tune",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "tune-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "undo",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "undo-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "up",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "top",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "upload",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "upload-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "videocam",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "videocam-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "vip",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "vip-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "wallet",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "wallet-filled",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "weibo",
|
||||
"unicode": ""
|
||||
},
|
||||
{
|
||||
"font_class": "weixin",
|
||||
"unicode": ""
|
||||
}
|
||||
];
|
||||
exports.fontData = fontData;
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js.map
|
||||
155
unpackage/dist/dev/mp-weixin/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.js
vendored
Normal file
155
unpackage/dist/dev/mp-weixin/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.js
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "UniNumberBox",
|
||||
emits: ["change", "input", "update:modelValue", "blur", "focus"],
|
||||
props: {
|
||||
value: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
},
|
||||
modelValue: {
|
||||
type: [Number, String],
|
||||
default: 1
|
||||
},
|
||||
min: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
max: {
|
||||
type: Number,
|
||||
default: 100
|
||||
},
|
||||
step: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
background: {
|
||||
type: String,
|
||||
default: "#f5f5f5"
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: "#333"
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
default: 40
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
inputValue: 0
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value(val) {
|
||||
this.inputValue = +val;
|
||||
},
|
||||
modelValue(val) {
|
||||
this.inputValue = +val;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
widthWithPx() {
|
||||
return this.width + "px";
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.value === 1) {
|
||||
this.inputValue = +this.modelValue;
|
||||
}
|
||||
if (this.modelValue === 1) {
|
||||
this.inputValue = +this.value;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
_calcValue(type) {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
}
|
||||
const scale = this._getDecimalScale();
|
||||
let value = this.inputValue * scale;
|
||||
let step = this.step * scale;
|
||||
if (type === "minus") {
|
||||
value -= step;
|
||||
if (value < this.min * scale) {
|
||||
return;
|
||||
}
|
||||
if (value > this.max * scale) {
|
||||
value = this.max * scale;
|
||||
}
|
||||
}
|
||||
if (type === "plus") {
|
||||
value += step;
|
||||
if (value > this.max * scale) {
|
||||
return;
|
||||
}
|
||||
if (value < this.min * scale) {
|
||||
value = this.min * scale;
|
||||
}
|
||||
}
|
||||
this.inputValue = (value / scale).toFixed(String(scale).length - 1);
|
||||
this.$emit("input", +this.inputValue);
|
||||
this.$emit("update:modelValue", +this.inputValue);
|
||||
this.$emit("change", +this.inputValue);
|
||||
},
|
||||
_getDecimalScale() {
|
||||
let scale = 1;
|
||||
if (~~this.step !== this.step) {
|
||||
scale = Math.pow(10, String(this.step).split(".")[1].length);
|
||||
}
|
||||
return scale;
|
||||
},
|
||||
_onBlur(event) {
|
||||
this.$emit("blur", event);
|
||||
let value = event.detail.value;
|
||||
if (isNaN(value)) {
|
||||
this.inputValue = this.value;
|
||||
return;
|
||||
}
|
||||
value = +value;
|
||||
if (value > this.max) {
|
||||
value = this.max;
|
||||
} else if (value < this.min) {
|
||||
value = this.min;
|
||||
}
|
||||
const scale = this._getDecimalScale();
|
||||
this.inputValue = value.toFixed(String(scale).length - 1);
|
||||
this.$emit("input", +this.inputValue);
|
||||
this.$emit("update:modelValue", +this.inputValue);
|
||||
this.$emit("change", +this.inputValue);
|
||||
},
|
||||
_onFocus(event) {
|
||||
this.$emit("focus", event);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: $data.inputValue <= $props.min || $props.disabled ? 1 : "",
|
||||
b: $props.color,
|
||||
c: common_vendor.o$1(($event) => $options._calcValue("minus")),
|
||||
d: $props.background,
|
||||
e: $props.disabled,
|
||||
f: common_vendor.o$1((...args) => $options._onFocus && $options._onFocus(...args)),
|
||||
g: common_vendor.o$1((...args) => $options._onBlur && $options._onBlur(...args)),
|
||||
h: $props.step < 1 ? "digit" : "number",
|
||||
i: $props.background,
|
||||
j: $props.color,
|
||||
k: $options.widthWithPx,
|
||||
l: $data.inputValue,
|
||||
m: common_vendor.o$1(($event) => $data.inputValue = $event.detail.value),
|
||||
n: $data.inputValue >= $props.max || $props.disabled ? 1 : "",
|
||||
o: $props.color,
|
||||
p: common_vendor.o$1(($event) => $options._calcValue("plus")),
|
||||
q: $props.background
|
||||
};
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/uni-number-box/components/uni-number-box/uni-number-box.js.map
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<view class="uni-numbox"><view bindtap="{{c}}" class="uni-numbox__minus uni-numbox-btns" style="{{'background:' + d}}"><text class="{{['uni-numbox--text', a && 'uni-numbox--disabled']}}" style="{{'color:' + b}}">-</text></view><block wx:if="{{r0}}"><input disabled="{{e}}" bindfocus="{{f}}" bindblur="{{g}}" class="uni-numbox__value" type="{{h}}" style="{{'background:' + i + ';' + ('color:' + j) + ';' + ('width:' + k)}}" value="{{l}}" bindinput="{{m}}"/></block><view bindtap="{{p}}" class="uni-numbox__plus uni-numbox-btns" style="{{'background:' + q}}"><text class="{{['uni-numbox--text', n && 'uni-numbox--disabled']}}" style="{{'color:' + o}}">+</text></view></view>
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uni-numbox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.uni-numbox-btns {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 8px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.uni-numbox__value {
|
||||
margin: 0 2px;
|
||||
background-color: #f5f5f5;
|
||||
width: 40px;
|
||||
height: 26px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
border-width: 0;
|
||||
color: #333;
|
||||
}
|
||||
.uni-numbox__minus {
|
||||
border-top-left-radius: 2px;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.uni-numbox__plus {
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
}
|
||||
.uni-numbox--text {
|
||||
line-height: 20px;
|
||||
margin-bottom: 2px;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
color: #333;
|
||||
}
|
||||
.uni-numbox .uni-numbox--disabled {
|
||||
color: #c0c0c0 !important;
|
||||
}
|
||||
191
unpackage/dist/dev/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.js
vendored
Normal file
191
unpackage/dist/dev/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.js
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const _sfc_main = {
|
||||
name: "wht-select",
|
||||
props: {
|
||||
options: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
value: {
|
||||
type: [String, Number],
|
||||
default: ""
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: "请选择"
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
clearable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 样式相关的props
|
||||
height: {
|
||||
type: Number,
|
||||
default: 40
|
||||
},
|
||||
fontSize: {
|
||||
type: Number,
|
||||
default: 14
|
||||
},
|
||||
borderColor: {
|
||||
type: String,
|
||||
default: "#dcdfe6"
|
||||
},
|
||||
borderRadius: {
|
||||
type: Number,
|
||||
default: 4
|
||||
},
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: "#ffffff"
|
||||
},
|
||||
textColor: {
|
||||
type: String,
|
||||
default: "#606266"
|
||||
},
|
||||
placeholderColor: {
|
||||
type: String,
|
||||
default: "#c0c4cc"
|
||||
},
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: "#409eff"
|
||||
},
|
||||
filterable: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
searchPlaceholder: {
|
||||
type: String,
|
||||
default: "请输入搜索内容"
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentValue: "",
|
||||
isOpen: false,
|
||||
searchQuery: ""
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
currentLabel() {
|
||||
const option = this.options.find((item) => item.value === this.currentValue);
|
||||
return option ? option.label : "";
|
||||
},
|
||||
filteredOptions() {
|
||||
if (!this.filterable || !this.searchQuery) {
|
||||
return this.options;
|
||||
}
|
||||
return this.options.filter(
|
||||
(item) => item.label.toLowerCase().includes(this.searchQuery.toLowerCase())
|
||||
);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value: {
|
||||
handler(newVal) {
|
||||
this.currentValue = newVal;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
togglePicker() {
|
||||
if (this.disabled)
|
||||
return;
|
||||
this.isOpen = !this.isOpen;
|
||||
if (!this.isOpen) {
|
||||
this.searchQuery = "";
|
||||
}
|
||||
},
|
||||
selectOption(item, index) {
|
||||
if (item.disabled)
|
||||
return;
|
||||
this.currentValue = item.value;
|
||||
this.searchQuery = "";
|
||||
this.$emit("input", item.value);
|
||||
this.$emit("change", item);
|
||||
this.isOpen = false;
|
||||
},
|
||||
clearValue(e) {
|
||||
this.currentValue = "";
|
||||
this.searchQuery = "";
|
||||
this.$emit("input", "");
|
||||
this.$emit("change", null);
|
||||
this.$emit("clear");
|
||||
},
|
||||
onSearch() {
|
||||
this.$emit("search", this.searchQuery);
|
||||
},
|
||||
handleFocus() {
|
||||
if (!this.disabled) {
|
||||
this.isOpen = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $props.filterable
|
||||
}, $props.filterable ? {
|
||||
b: $data.currentValue ? $options.currentLabel : $props.placeholder,
|
||||
c: $props.fontSize + "px",
|
||||
d: $data.currentValue ? $props.textColor : $props.placeholderColor,
|
||||
e: common_vendor.o$1(() => {
|
||||
}),
|
||||
f: common_vendor.o$1([($event) => $data.searchQuery = $event.detail.value, (...args) => $options.onSearch && $options.onSearch(...args)]),
|
||||
g: common_vendor.o$1((...args) => $options.handleFocus && $options.handleFocus(...args)),
|
||||
h: $data.searchQuery
|
||||
} : {
|
||||
i: common_vendor.t($options.currentLabel || $props.placeholder),
|
||||
j: $props.fontSize + "px",
|
||||
k: $data.currentValue ? $props.textColor : $props.placeholderColor
|
||||
}, {
|
||||
l: $props.clearable && $data.currentValue && !$props.disabled
|
||||
}, $props.clearable && $data.currentValue && !$props.disabled ? {
|
||||
m: common_vendor.o$1((...args) => $options.clearValue && $options.clearValue(...args))
|
||||
} : {
|
||||
n: $props.placeholderColor
|
||||
}, {
|
||||
o: $data.isOpen ? 1 : "",
|
||||
p: !$data.currentValue ? 1 : "",
|
||||
q: $props.height + "px",
|
||||
r: $props.backgroundColor,
|
||||
s: $props.borderColor,
|
||||
t: $props.borderRadius + "px",
|
||||
v: common_vendor.o$1((...args) => $options.togglePicker && $options.togglePicker(...args)),
|
||||
w: $data.isOpen
|
||||
}, $data.isOpen ? common_vendor.e({
|
||||
x: common_vendor.o$1((...args) => $options.togglePicker && $options.togglePicker(...args)),
|
||||
y: $options.filteredOptions.length > 0
|
||||
}, $options.filteredOptions.length > 0 ? {
|
||||
z: common_vendor.f($options.filteredOptions, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.label),
|
||||
b: item.value,
|
||||
c: item.disabled ? 1 : "",
|
||||
d: $data.currentValue === item.value ? 1 : "",
|
||||
e: item.disabled ? $props.placeholderColor : $props.textColor,
|
||||
f: $data.currentValue === item.value ? $props.activeColor + "20" : $props.backgroundColor,
|
||||
g: common_vendor.o$1(($event) => $options.selectOption(item, index), item.value)
|
||||
};
|
||||
}),
|
||||
A: $props.fontSize + "px"
|
||||
} : {
|
||||
B: $props.fontSize + "px",
|
||||
C: $props.placeholderColor
|
||||
}, {
|
||||
D: $props.backgroundColor,
|
||||
E: $props.borderRadius + "px"
|
||||
}) : {}, {
|
||||
F: $props.disabled ? 1 : ""
|
||||
});
|
||||
}
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-57f09195"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="{{['wht-select-wrapper', 'data-v-57f09195', F && 'is-disabled']}}"><view class="{{['wht-select-inner', 'data-v-57f09195', o && 'is-active', p && 'is-placeholder']}}" style="{{'height:' + q + ';' + ('background-color:' + r) + ';' + ('border-color:' + s) + ';' + ('border-radius:' + t)}}" bindtap="{{v}}"><view class="wht-select-value data-v-57f09195"><input wx:if="{{a}}" class="wht-select-input data-v-57f09195" placeholder="{{b}}" style="{{'font-size:' + c + ';' + ('color:' + d)}}" catchtap="{{e}}" bindinput="{{f}}" bindfocus="{{g}}" value="{{h}}"/><text wx:else class="data-v-57f09195" style="{{'font-size:' + j + ';' + ('color:' + k)}}">{{i}}</text></view><view class="wht-select-suffix data-v-57f09195"><view wx:if="{{l}}" class="wht-select-clear data-v-57f09195" catchtap="{{m}}">×</view><view wx:else class="wht-select-arrow data-v-57f09195" style="{{'border-top-color:' + n}}"></view></view></view><view wx:if="{{w}}" class="select-dropdown data-v-57f09195"><view class="select-dropdown-mask data-v-57f09195" catchtap="{{x}}"></view><view class="select-dropdown-content data-v-57f09195" style="{{'background-color:' + D + ';' + ('border-radius:' + E)}}"><block wx:if="{{y}}"><view wx:for="{{z}}" wx:for-item="item" wx:key="b" class="{{['data-v-57f09195', item.c && 'disabled', item.d && 'active']}}" style="{{'font-size:' + A + ';' + ('color:' + item.e) + ';' + ('background-color:' + item.f)}}" catchtap="{{item.g}}">{{item.a}}</view></block><view wx:else class="select-dropdown-empty data-v-57f09195" style="{{'font-size:' + B + ';' + ('color:' + C)}}"> 暂无数据 </view></view></view></view>
|
||||
181
unpackage/dist/dev/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.wxss
vendored
Normal file
181
unpackage/dist/dev/mp-weixin/uni_modules/wht-select/components/wht-select/wht-select.wxss
vendored
Normal file
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.wht-select-wrapper.data-v-57f09195 {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-inner.data-v-57f09195 {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-inner.is-active .wht-select-arrow.data-v-57f09195 {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.wht-select-wrapper .wht-select-value.data-v-57f09195 {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
right: 30px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-suffix.data-v-57f09195 {
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-clear.data-v-57f09195 {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
background-color: #c0c4cc;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-clear.data-v-57f09195:hover {
|
||||
background-color: #909399;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-arrow.data-v-57f09195 {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-left: 5px solid transparent;
|
||||
border-right: 5px solid transparent;
|
||||
border-top: 5px solid;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown.data-v-57f09195 {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
margin-top: 4px;
|
||||
z-index: 999;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-mask.data-v-57f09195 {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 998;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content.data-v-57f09195 {
|
||||
position: relative;
|
||||
max-height: 240px;
|
||||
border: 1px solid #e4e7ed;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 999;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content.data-v-57f09195::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content.data-v-57f09195::-webkit-scrollbar-thumb {
|
||||
background-color: #e4e7ed;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content > view.data-v-57f09195 {
|
||||
padding: 0 12px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content > view.disabled.data-v-57f09195 {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content .select-dropdown-search.data-v-57f09195 {
|
||||
padding: 8px;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content .select-dropdown-search input.data-v-57f09195 {
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
padding: 0 8px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content .select-dropdown-search input.data-v-57f09195:focus {
|
||||
border-color: #409eff;
|
||||
outline: none;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content .select-dropdown-empty.data-v-57f09195 {
|
||||
padding: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-input.data-v-57f09195 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
line-height: normal;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-input.data-v-57f09195::-webkit-input-placeholder {
|
||||
color: inherit;
|
||||
line-height: normal;
|
||||
}
|
||||
.wht-select-wrapper .wht-select-input.data-v-57f09195::placeholder {
|
||||
color: inherit;
|
||||
line-height: normal;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.wht-select-wrapper .select-dropdown-content.data-v-57f09195 {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content.data-v-57f09195::-webkit-scrollbar-thumb {
|
||||
background-color: #48484a;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content .select-dropdown-search.data-v-57f09195 {
|
||||
border-bottom-color: #48484a;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content .select-dropdown-search input.data-v-57f09195 {
|
||||
border-color: #48484a;
|
||||
background-color: #1c1c1e;
|
||||
color: #fff;
|
||||
}
|
||||
.wht-select-wrapper .select-dropdown-content .select-dropdown-search input.data-v-57f09195:focus {
|
||||
border-color: #409eff;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user