jb-mobile-ui 1.4.13 → 1.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -4926,7 +4926,7 @@ const _hoisted_1$6 = {
|
|
|
4926
4926
|
const _hoisted_2$5 = { class: "jb-mobile-date-picker__value" };
|
|
4927
4927
|
const _hoisted_3$4 = ["src"];
|
|
4928
4928
|
const _hoisted_4$4 = { class: "jb-mobile-date-picker__date-text" };
|
|
4929
|
-
const _hoisted_5$
|
|
4929
|
+
const _hoisted_5$3 = ["src"];
|
|
4930
4930
|
const _hoisted_6$2 = { class: "jb-mobile-time-picker__calendar__inner" };
|
|
4931
4931
|
const _hoisted_7$2 = { class: "jb-mobile-time-picker__group-wrap" };
|
|
4932
4932
|
const _hoisted_8$2 = {
|
|
@@ -5577,7 +5577,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5577
5577
|
createElementVNode("img", {
|
|
5578
5578
|
src: forwardIcon.value,
|
|
5579
5579
|
alt: "forward"
|
|
5580
|
-
}, null, 8, _hoisted_5$
|
|
5580
|
+
}, null, 8, _hoisted_5$3)
|
|
5581
5581
|
])) : createCommentVNode("", true)
|
|
5582
5582
|
])
|
|
5583
5583
|
])) : createCommentVNode("", true),
|
|
@@ -6004,13 +6004,14 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6004
6004
|
const JbMobileSearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-6caaea20"]]);
|
|
6005
6005
|
const _imports_0$1 = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAOBJREFUWEftlDEOwjAMRfMz5AJInIMJcQYWFma2SkG9AEfgAhWRujGzsHAGxMQ5kLhABxsydKmgcQpSF2eLktjPz1ZgRl4YOb9RADWgBtSAGkgaKMty0jRNALDO+baZ+eSc81VVPfveSQGOAJaZABfn3OZngJjUez9l5jMzz40xNgFCb9gbgFUI4ZGCThpoAxRFMbPWHph50asUuBLRtq7reyp5PBcDCExkVd7CZQHER99MILPywQAfTJicnnfbkm2gMxP7uCeinbTnfwOQDJjkzmADkuCSOwqgBtSAGlADL9JbXiGSAZGLAAAAAElFTkSuQmCC";
|
|
6006
6006
|
const _hoisted_1$2 = { class: "jb-mobile-select__value" };
|
|
6007
|
-
const _hoisted_2$2 = {
|
|
6008
|
-
|
|
6009
|
-
class: "jb-mobile-select__option-list"
|
|
6010
|
-
};
|
|
6011
|
-
const _hoisted_3$2 = ["onClick"];
|
|
6012
|
-
const _hoisted_4$2 = {
|
|
6007
|
+
const _hoisted_2$2 = { class: "jb-mobile-select__content flex-column" };
|
|
6008
|
+
const _hoisted_3$2 = {
|
|
6013
6009
|
key: 1,
|
|
6010
|
+
class: "jb-mobile-select__option-list flex-1"
|
|
6011
|
+
};
|
|
6012
|
+
const _hoisted_4$2 = ["onClick"];
|
|
6013
|
+
const _hoisted_5$2 = {
|
|
6014
|
+
key: 2,
|
|
6014
6015
|
class: "jb-mobile-select__empty-wrap"
|
|
6015
6016
|
};
|
|
6016
6017
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
@@ -6057,6 +6058,27 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6057
6058
|
fieldNames: {
|
|
6058
6059
|
type: Object,
|
|
6059
6060
|
default: () => ({})
|
|
6061
|
+
},
|
|
6062
|
+
/**
|
|
6063
|
+
* 是否显示搜索框
|
|
6064
|
+
*/
|
|
6065
|
+
showSearch: {
|
|
6066
|
+
type: Boolean,
|
|
6067
|
+
default: false
|
|
6068
|
+
},
|
|
6069
|
+
/**
|
|
6070
|
+
* 搜索框的提示文案
|
|
6071
|
+
*/
|
|
6072
|
+
searchPlaceholder: {
|
|
6073
|
+
type: String,
|
|
6074
|
+
default: ""
|
|
6075
|
+
},
|
|
6076
|
+
/**
|
|
6077
|
+
* 选中项的样式类型, 1 - 主题色填充背景和边框, 2 - 主题色填充文案和边框
|
|
6078
|
+
*/
|
|
6079
|
+
selectedType: {
|
|
6080
|
+
type: Number,
|
|
6081
|
+
default: 1
|
|
6060
6082
|
}
|
|
6061
6083
|
},
|
|
6062
6084
|
emits: [
|
|
@@ -6076,6 +6098,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6076
6098
|
const props = __props;
|
|
6077
6099
|
const isShowOptionsPopup = ref(false);
|
|
6078
6100
|
const selectedOptionItem = ref({});
|
|
6101
|
+
const searchValue = ref("");
|
|
6079
6102
|
const computedWidth = computed(() => `${props.width}px`);
|
|
6080
6103
|
const modelValue = computed({
|
|
6081
6104
|
get() {
|
|
@@ -6091,6 +6114,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6091
6114
|
value: "value"
|
|
6092
6115
|
}, props.fieldNames);
|
|
6093
6116
|
});
|
|
6117
|
+
const options = computed(() => searchValue.value ? props.options.filter((item) => item[fieldNames.value.label].indexOf(searchValue.value) > -1) : props.options);
|
|
6094
6118
|
watch(() => modelValue.value, (newVal) => {
|
|
6095
6119
|
if (!newVal) {
|
|
6096
6120
|
selectedOptionItem.value = {};
|
|
@@ -6119,7 +6143,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6119
6143
|
onClick: _cache[1] || (_cache[1] = ($event) => isShowOptionsPopup.value = true)
|
|
6120
6144
|
}, [
|
|
6121
6145
|
createElementVNode("div", _hoisted_1$2, toDisplayString(selectedOptionItem.value[fieldNames.value.label] || __props.placeholder), 1),
|
|
6122
|
-
_cache[
|
|
6146
|
+
_cache[4] || (_cache[4] = createElementVNode("img", {
|
|
6123
6147
|
class: "jb-mobile-select__select-down-icon",
|
|
6124
6148
|
src: _imports_0$1,
|
|
6125
6149
|
alt: ""
|
|
@@ -6127,7 +6151,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6127
6151
|
], 4)),
|
|
6128
6152
|
createVNode(JbMobilePopup, mergeProps({
|
|
6129
6153
|
visible: isShowOptionsPopup.value,
|
|
6130
|
-
"onUpdate:visible": _cache[
|
|
6154
|
+
"onUpdate:visible": _cache[3] || (_cache[3] = ($event) => isShowOptionsPopup.value = $event)
|
|
6131
6155
|
}, unref(attrs), {
|
|
6132
6156
|
title: __props.popupTitle,
|
|
6133
6157
|
"grey-bg": true,
|
|
@@ -6135,17 +6159,27 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6135
6159
|
"confirm-button": false
|
|
6136
6160
|
}), {
|
|
6137
6161
|
default: withCtx(() => [
|
|
6138
|
-
|
|
6139
|
-
(openBlock(
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6162
|
+
createElementVNode("div", _hoisted_2$2, [
|
|
6163
|
+
__props.showSearch ? (openBlock(), createBlock(JbMobileSearchInput, {
|
|
6164
|
+
key: 0,
|
|
6165
|
+
modelValue: searchValue.value,
|
|
6166
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchValue.value = $event),
|
|
6167
|
+
class: "jb-mobile-select__search-input",
|
|
6168
|
+
"grey-bg": false,
|
|
6169
|
+
placeholder: __props.searchPlaceholder
|
|
6170
|
+
}, null, 8, ["modelValue", "placeholder"])) : createCommentVNode("", true),
|
|
6171
|
+
options.value.length ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
6172
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (item) => {
|
|
6173
|
+
return openBlock(), createElementBlock("div", {
|
|
6174
|
+
class: normalizeClass$1(["jb-mobile-select__option-item", [`type-${__props.selectedType}`, { selected: item[fieldNames.value.value] === modelValue.value }]]),
|
|
6175
|
+
key: item[fieldNames.value.value],
|
|
6176
|
+
onClick: ($event) => handleSelectOptionItem(item)
|
|
6177
|
+
}, toDisplayString(item[fieldNames.value.label]), 11, _hoisted_4$2);
|
|
6178
|
+
}), 128))
|
|
6179
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
6180
|
+
createVNode(JbMobileEmpty)
|
|
6181
|
+
]))
|
|
6182
|
+
])
|
|
6149
6183
|
]),
|
|
6150
6184
|
_: 1
|
|
6151
6185
|
}, 16, ["visible", "title"])
|
|
@@ -6153,7 +6187,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6153
6187
|
};
|
|
6154
6188
|
}
|
|
6155
6189
|
});
|
|
6156
|
-
const JbMobileSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
6190
|
+
const JbMobileSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-3f3f15c2"]]);
|
|
6157
6191
|
const _imports_0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e图标(24)/巡检%3c/title%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='我的服务备份-14'%20transform='translate(-339,%20-371)'%20fill='%237B52FE'%20fill-rule='nonzero'%3e%3cg%20id='编组-28'%20transform='translate(0,%20134)'%3e%3cg%20id='编组-28备份'%20transform='translate(0,%2051)'%3e%3cg%20id='编组-32备份-4'%20transform='translate(0,%20176)'%3e%3cg%20id='编组-27'%20transform='translate(132,%200)'%3e%3cg%20id='编组'%20transform='translate(211.3571,%2016)'%3e%3cpath%20d='M0.127476811,5.43301045%20L5.51144105,11.8129903%20C5.70234462,12.0384575%206.03582177,12.0632342%206.25572336,11.8699765%20C6.27022237,11.8575882%206.28472138,11.8427223%206.29680387,11.8278563%20L16.146462,0.901366518%20C16.3325325,0.695720566%2016.3325325,0.37610216%2016.1440455,0.170456209%20C15.9555584,-0.0351897433%2015.6438297,-0.0574886986%2015.4287612,0.118425301%20L6.19289432,7.77687878%20C6.01407325,7.92553851%205.76275714,7.93792683%205.57185357,7.80908838%20L0.813763084,4.63520326%20C0.593861494,4.4890212%200.303881373,4.52866379%200.12989331,4.72935442%20C-0.0416782539,4.93004505%20-0.0440947695,5.22984216%200.127476811,5.43301045%20Z'%20id='路径'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e";
|
|
6158
6192
|
const _hoisted_1$1 = { class: "jb-mobile-tree-select-popup__search" };
|
|
6159
6193
|
const _hoisted_2$1 = { class: "jb-mobile-tree-select-popup__list" };
|