@gct-paas/render-mobile 0.1.5-dev.1 → 0.1.5-dev.3
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.min.css +2 -0
- package/dist/loader.esm.min.js +1 -1
- package/es/_virtual/_plugin-vue_export-helper.mjs +8 -0
- package/es/components/form-component/FieldCheckbox.d.ts +36 -0
- package/es/components/form-component/FieldCheckbox.mjs +74 -0
- package/es/components/form-component/FieldRadio.d.ts +37 -0
- package/es/components/form-component/FieldRadio.mjs +73 -0
- package/es/components/form-component/FieldSelect.d.ts +110 -0
- package/es/components/form-component/FieldSelect.mjs +170 -0
- package/es/components/form-component/index.css +32 -0
- package/es/components/form-component/index.d.ts +5 -0
- package/es/components/form-component/index.mjs +4 -0
- package/es/components/form-component/tag-label.vue.d.ts +26 -0
- package/es/components/form-component/tag-label.vue.mjs +7 -0
- package/es/components/form-component/tag-label.vue_vue_type_script_setup_true_lang.mjs +135 -0
- package/es/components/form-component/tag-label.vue_vue_type_style_index_0_scoped_42ed8aa7_lang.css +18 -0
- package/es/components/form-component/tag-span.vue.d.ts +21 -0
- package/es/components/form-component/tag-span.vue.mjs +7 -0
- package/es/components/form-component/tag-span.vue_vue_type_script_setup_true_lang.mjs +25 -0
- package/es/components/form-component/tag-span.vue_vue_type_style_index_0_scoped_1f0f2305_lang.css +31 -0
- package/es/components/index.d.ts +3 -0
- package/es/components/index.mjs +8 -0
- package/es/components/timePicker/index.d.ts +4 -0
- package/es/components/timePicker/index.mjs +34 -0
- package/es/components/timePicker/src/timePicker.vue.d.ts +4 -0
- package/es/components/timePicker/src/timePicker.vue.mjs +5 -0
- package/es/components/timePicker/src/timePicker.vue_vue_type_script_setup_true_name_timePicker_lang.mjs +82 -0
- package/es/components/timePicker/src/typing.d.ts +13 -0
- package/es/components/timePicker/src/typing.mjs +1 -0
- package/es/components/treePopup/index.d.ts +5 -0
- package/es/components/treePopup/index.mjs +35 -0
- package/es/components/treePopup/src/components/selectList.vue.d.ts +11 -0
- package/es/components/treePopup/src/components/selectList.vue.mjs +7 -0
- package/es/components/treePopup/src/components/selectList.vue_vue_type_script_setup_true_name_selectList_lang.mjs +62 -0
- package/es/components/treePopup/src/components/selectList.vue_vue_type_style_index_0_scoped_04a58132_lang.css +10 -0
- package/es/components/treePopup/src/components/treeItem.vue.d.ts +12 -0
- package/es/components/treePopup/src/components/treeItem.vue.mjs +7 -0
- package/es/components/treePopup/src/components/treeItem.vue_vue_type_script_setup_true_name_treeItem_lang.mjs +70 -0
- package/es/components/treePopup/src/components/treeItem.vue_vue_type_style_index_0_scoped_950c3131_lang.css +17 -0
- package/es/components/treePopup/src/components/treeList.vue.d.ts +19 -0
- package/es/components/treePopup/src/components/treeList.vue.mjs +7 -0
- package/es/components/treePopup/src/components/treeList.vue_vue_type_script_setup_true_name_treelist_lang.mjs +61 -0
- package/es/components/treePopup/src/components/treeList.vue_vue_type_style_index_0_scoped_469e28be_lang.css +20 -0
- package/es/components/treePopup/src/treeCheck.vue.d.ts +71 -0
- package/es/components/treePopup/src/treeCheck.vue.mjs +7 -0
- package/es/components/treePopup/src/treeCheck.vue_vue_type_script_setup_true_lang.mjs +276 -0
- package/es/components/treePopup/src/treeCheck.vue_vue_type_style_index_0_scoped_00b864e8_lang.css +29 -0
- package/es/components/treePopup/src/treePopup.vue.d.ts +103 -0
- package/es/components/treePopup/src/treePopup.vue.mjs +6 -0
- package/es/components/treePopup/src/treePopup.vue_vue_type_script_setup_true_name_treePopup_lang.mjs +129 -0
- package/es/components/treePopup/src/treePopup.vue_vue_type_style_index_0_lang.css +7 -0
- package/es/components/treePopup/src/typing.d.ts +53 -0
- package/es/components/treePopup/src/typing.mjs +13 -0
- package/es/index.mjs +8 -1
- package/package.json +20 -18
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SelectType } from "./src/typing.mjs";
|
|
2
|
+
import treePopup_default from "./src/treePopup.vue.mjs";
|
|
3
|
+
import { createVNode, render } from "vue";
|
|
4
|
+
import { isClient } from "@gct-paas/core-mobile";
|
|
5
|
+
//#region src/components/treePopup/index.ts
|
|
6
|
+
var instance = null;
|
|
7
|
+
function createTreePopup(options) {
|
|
8
|
+
if (!isClient) return;
|
|
9
|
+
const propsData = {};
|
|
10
|
+
let popupRef;
|
|
11
|
+
const container = document.createElement("div");
|
|
12
|
+
Object.assign(propsData, options);
|
|
13
|
+
function readyModal() {
|
|
14
|
+
instance = createVNode(treePopup_default, propsData);
|
|
15
|
+
render(instance, container);
|
|
16
|
+
document.body.appendChild(container);
|
|
17
|
+
popupRef = instance.component?.exposed;
|
|
18
|
+
}
|
|
19
|
+
function openTreePopup({ ids, type, callback }) {
|
|
20
|
+
readyModal();
|
|
21
|
+
if (type === SelectType.SINGLE) popupRef?.singleTreeOpen({
|
|
22
|
+
ids,
|
|
23
|
+
type,
|
|
24
|
+
callback
|
|
25
|
+
});
|
|
26
|
+
else if (type === SelectType.MULTIPLE) popupRef?.multipleTreeOpen({
|
|
27
|
+
ids,
|
|
28
|
+
type,
|
|
29
|
+
callback
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return { openTreePopup };
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { createTreePopup };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { optionType } from '../typing';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
selectData: optionType[];
|
|
4
|
+
type: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
setSelectData: (...args: any[]) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onSetSelectData?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import selectList_vue_vue_type_script_setup_true_name_selectList_lang_default from "./selectList.vue_vue_type_script_setup_true_name_selectList_lang.mjs";
|
|
3
|
+
import './selectList.vue_vue_type_style_index_0_scoped_04a58132_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/treePopup/src/components/selectList.vue
|
|
5
|
+
var selectList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(selectList_vue_vue_type_script_setup_true_name_selectList_lang_default, [["__scopeId", "data-v-04a58132"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { selectList_default as default };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { SelectType } from "../typing.mjs";
|
|
2
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderList, resolveComponent, toDisplayString, unref, vShow, withCtx, withDirectives } from "vue";
|
|
3
|
+
//#region src/components/treePopup/src/components/selectList.vue?vue&type=script&setup=true&name=selectList&lang.ts
|
|
4
|
+
var _hoisted_1 = { class: "slect-list flex flex-col h-full" };
|
|
5
|
+
var _hoisted_2 = { class: "flex-1 overflow-y-auto" };
|
|
6
|
+
var _hoisted_3 = { class: "flex" };
|
|
7
|
+
var _hoisted_4 = { class: "flex-1" };
|
|
8
|
+
var _hoisted_5 = ["innerHTML"];
|
|
9
|
+
var _hoisted_6 = { class: "text-sm text-[#666666]" };
|
|
10
|
+
var _hoisted_7 = { class: "w-full p-12px shadow-top" };
|
|
11
|
+
var selectList_vue_vue_type_script_setup_true_name_selectList_lang_default = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "selectList",
|
|
13
|
+
props: {
|
|
14
|
+
selectData: {},
|
|
15
|
+
type: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["setSelectData"],
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const emit = __emit;
|
|
21
|
+
const setVal = (val) => {
|
|
22
|
+
if (props.type === SelectType.SINGLE) emit("setSelectData", val);
|
|
23
|
+
else return;
|
|
24
|
+
};
|
|
25
|
+
const setMulVal = () => {
|
|
26
|
+
if (props.type === SelectType.MULTIPLE) emit("setSelectData", props.selectData);
|
|
27
|
+
};
|
|
28
|
+
return (_ctx, _cache) => {
|
|
29
|
+
const _component_van_checkbox = resolveComponent("van-checkbox");
|
|
30
|
+
const _component_van_cell = resolveComponent("van-cell");
|
|
31
|
+
const _component_van_button = resolveComponent("van-button");
|
|
32
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.selectData, (i, index) => {
|
|
33
|
+
return openBlock(), createBlock(_component_van_cell, {
|
|
34
|
+
key: index,
|
|
35
|
+
onClick: ($event) => setVal(i)
|
|
36
|
+
}, {
|
|
37
|
+
title: withCtx(() => [createElementVNode("div", _hoisted_3, [__props.type === unref(SelectType).MULTIPLE ? (openBlock(), createBlock(_component_van_checkbox, {
|
|
38
|
+
key: 0,
|
|
39
|
+
modelValue: i.checked,
|
|
40
|
+
"onUpdate:modelValue": ($event) => i.checked = $event,
|
|
41
|
+
class: "mr-12px mb-auto mt-5px",
|
|
42
|
+
shape: "square",
|
|
43
|
+
"icon-size": "16"
|
|
44
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true), createElementVNode("div", _hoisted_4, [createElementVNode("div", {
|
|
45
|
+
class: "text-base",
|
|
46
|
+
innerHTML: i.label
|
|
47
|
+
}, null, 8, _hoisted_5), createElementVNode("div", _hoisted_6, toDisplayString(i.labels), 1)])])]),
|
|
48
|
+
_: 2
|
|
49
|
+
}, 1032, ["onClick"]);
|
|
50
|
+
}), 128))]), withDirectives(createElementVNode("div", _hoisted_7, [createVNode(_component_van_button, {
|
|
51
|
+
class: "w-full px-4px",
|
|
52
|
+
type: "primary",
|
|
53
|
+
onClick: setMulVal
|
|
54
|
+
}, {
|
|
55
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("完成", -1)])]),
|
|
56
|
+
_: 1
|
|
57
|
+
})], 512), [[vShow, __props.type === unref(SelectType).MULTIPLE && __props.selectData.length]])]);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
//#endregion
|
|
62
|
+
export { selectList_vue_vue_type_script_setup_true_name_selectList_lang_default as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TreeOptions } from '../typing';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
treeData: TreeOptions[];
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
setMulTreeData: (...args: any[]) => void;
|
|
7
|
+
mulToggle: (...args: any[]) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onSetMulTreeData?: ((...args: any[]) => any) | undefined;
|
|
10
|
+
onMulToggle?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import treeItem_vue_vue_type_script_setup_true_name_treeItem_lang_default from "./treeItem.vue_vue_type_script_setup_true_name_treeItem_lang.mjs";
|
|
3
|
+
import './treeItem.vue_vue_type_style_index_0_scoped_950c3131_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/treePopup/src/components/treeItem.vue
|
|
5
|
+
var treeItem_default = /* @__PURE__ */ _plugin_vue_export_helper_default(treeItem_vue_vue_type_script_setup_true_name_treeItem_lang_default, [["__scopeId", "data-v-950c3131"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { treeItem_default as default };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, ref, renderList, resolveComponent, toDisplayString, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
2
|
+
//#region src/components/treePopup/src/components/treeItem.vue?vue&type=script&setup=true&name=treeItem&lang.ts
|
|
3
|
+
var _hoisted_1 = { class: "tree-wrapper" };
|
|
4
|
+
var _hoisted_2 = ["onClick"];
|
|
5
|
+
var treeItem_vue_vue_type_script_setup_true_name_treeItem_lang_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "treeItem",
|
|
7
|
+
props: { treeData: {} },
|
|
8
|
+
emits: ["setMulTreeData", "mulToggle"],
|
|
9
|
+
setup(__props, { emit: __emit }) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
const treeChecked = ref(props.treeData.map((item) => item.checked));
|
|
12
|
+
watch(() => props.treeData, () => {
|
|
13
|
+
treeChecked.value = props.treeData.map((item) => item.checked);
|
|
14
|
+
}, { deep: true });
|
|
15
|
+
const emit = __emit;
|
|
16
|
+
function mulToggles(...arg) {
|
|
17
|
+
emit("mulToggle", ...arg);
|
|
18
|
+
}
|
|
19
|
+
function toggle(value) {
|
|
20
|
+
emit("mulToggle", value);
|
|
21
|
+
}
|
|
22
|
+
function setMulData(...arg) {
|
|
23
|
+
emit("setMulTreeData", ...arg);
|
|
24
|
+
}
|
|
25
|
+
function checked(value, index) {
|
|
26
|
+
const checked = treeChecked.value[index];
|
|
27
|
+
emit("setMulTreeData", value, checked);
|
|
28
|
+
}
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
const _component_van_checkbox = resolveComponent("van-checkbox");
|
|
31
|
+
const _component_van_icon = resolveComponent("van-icon");
|
|
32
|
+
const _component_treeItem = resolveComponent("treeItem", true);
|
|
33
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.treeData, (item, index) => {
|
|
34
|
+
return openBlock(), createElementBlock(Fragment, null, [item ? (openBlock(), createElementBlock("div", {
|
|
35
|
+
ref_for: true,
|
|
36
|
+
ref: "r_" + item.value,
|
|
37
|
+
key: item.value,
|
|
38
|
+
class: "c-t-item"
|
|
39
|
+
}, [createElementVNode("div", {
|
|
40
|
+
class: "c-t-item-detail relative py-16px px-12px",
|
|
41
|
+
onClick: withModifiers(($event) => toggle(item), ["stop"])
|
|
42
|
+
}, [createVNode(_component_van_checkbox, {
|
|
43
|
+
modelValue: treeChecked.value[index],
|
|
44
|
+
"onUpdate:modelValue": ($event) => treeChecked.value[index] = $event,
|
|
45
|
+
"icon-size": "14",
|
|
46
|
+
shape: "square",
|
|
47
|
+
onClick: withModifiers(($event) => checked(item, index), ["stop"])
|
|
48
|
+
}, {
|
|
49
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
50
|
+
_: 2
|
|
51
|
+
}, 1032, [
|
|
52
|
+
"modelValue",
|
|
53
|
+
"onUpdate:modelValue",
|
|
54
|
+
"onClick"
|
|
55
|
+
]), item.children && item.children.length ? (openBlock(), createBlock(_component_van_icon, {
|
|
56
|
+
key: 0,
|
|
57
|
+
class: "absolute right-12px top-16px pl-12px arrow-icon",
|
|
58
|
+
name: item.expand ? "arrow-up" : "arrow-down"
|
|
59
|
+
}, null, 8, ["name"])) : createCommentVNode("", true)], 8, _hoisted_2), withDirectives(createVNode(_component_treeItem, {
|
|
60
|
+
class: "pl-24px",
|
|
61
|
+
"tree-data": item.children,
|
|
62
|
+
onSetMulTreeData: setMulData,
|
|
63
|
+
onMulToggle: mulToggles
|
|
64
|
+
}, null, 8, ["tree-data"]), [[vShow, item.children && item.children.length && item.expand]])])) : createCommentVNode("", true)], 64);
|
|
65
|
+
}), 256))]);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
//#endregion
|
|
70
|
+
export { treeItem_vue_vue_type_script_setup_true_name_treeItem_lang_default as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.tree-wrapper[data-v-950c3131] .arrow-icon.van-icon {
|
|
2
|
+
position: absolute;
|
|
3
|
+
}
|
|
4
|
+
.tree-wrapper .c-t-item-detail[data-v-950c3131] {
|
|
5
|
+
position: relative;
|
|
6
|
+
}
|
|
7
|
+
.tree-wrapper .c-t-item-detail[data-v-950c3131]::after {
|
|
8
|
+
position: absolute;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
content: ' ';
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
right: 0;
|
|
13
|
+
bottom: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
border-bottom: 1px solid var(--van-cell-border-color);
|
|
16
|
+
transform: scaleY(0.5);
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { optionType } from '../typing';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
checkedSingleData: optionType[];
|
|
4
|
+
treeSingleData: optionType[];
|
|
5
|
+
activeKey: string;
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
declare function setVal(value: IObject): void;
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
10
|
+
active: import('vue').Ref<string, string>;
|
|
11
|
+
setVal: typeof setVal;
|
|
12
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
checkTreeData: (...args: any[]) => void;
|
|
14
|
+
getBackData: (...args: any[]) => void;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
16
|
+
onCheckTreeData?: ((...args: any[]) => any) | undefined;
|
|
17
|
+
onGetBackData?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import treeList_vue_vue_type_script_setup_true_name_treelist_lang_default from "./treeList.vue_vue_type_script_setup_true_name_treelist_lang.mjs";
|
|
3
|
+
import './treeList.vue_vue_type_style_index_0_scoped_469e28be_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/treePopup/src/components/treeList.vue
|
|
5
|
+
var treeList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(treeList_vue_vue_type_script_setup_true_name_treelist_lang_default, [["__scopeId", "data-v-469e28be"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { treeList_default as default };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, openBlock, ref, renderList, resolveComponent, toDisplayString, unref, withCtx, withModifiers } from "vue";
|
|
2
|
+
//#region src/components/treePopup/src/components/treeList.vue?vue&type=script&setup=true&name=treelist&lang.ts
|
|
3
|
+
var _hoisted_1 = { class: "tree-list" };
|
|
4
|
+
var _hoisted_2 = { class: "overflow-y-auto px-14px border-b" };
|
|
5
|
+
var _hoisted_3 = { class: "tree-tab flex pb-10px" };
|
|
6
|
+
var _hoisted_4 = ["onClick"];
|
|
7
|
+
var _hoisted_5 = { class: "tree-list-container" };
|
|
8
|
+
var _hoisted_6 = ["innerHTML"];
|
|
9
|
+
var _hoisted_7 = { class: "ks-row-middle" };
|
|
10
|
+
var treeList_vue_vue_type_script_setup_true_name_treelist_lang_default = /* @__PURE__ */ defineComponent({
|
|
11
|
+
__name: "treeList",
|
|
12
|
+
props: {
|
|
13
|
+
checkedSingleData: {},
|
|
14
|
+
treeSingleData: {},
|
|
15
|
+
activeKey: {},
|
|
16
|
+
type: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["checkTreeData", "getBackData"],
|
|
19
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
20
|
+
const active = ref(__props.activeKey) || "";
|
|
21
|
+
const emit = __emit;
|
|
22
|
+
function setVal(value) {
|
|
23
|
+
active.value = value.value;
|
|
24
|
+
value.children?.length && emit("checkTreeData", value.children, value.value);
|
|
25
|
+
}
|
|
26
|
+
function backTo(value) {
|
|
27
|
+
value.value && emit("getBackData", value, value.parentId);
|
|
28
|
+
}
|
|
29
|
+
__expose({
|
|
30
|
+
active,
|
|
31
|
+
setVal
|
|
32
|
+
});
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
const _component_van_icon = resolveComponent("van-icon");
|
|
35
|
+
const _component_van_cell = resolveComponent("van-cell");
|
|
36
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.checkedSingleData, (val, index) => {
|
|
37
|
+
return openBlock(), createElementBlock("span", {
|
|
38
|
+
key: val.value + index,
|
|
39
|
+
class: "ml-3px mr-10px",
|
|
40
|
+
onClick: withModifiers(($event) => backTo(val), ["stop"])
|
|
41
|
+
}, toDisplayString(val.label), 9, _hoisted_4);
|
|
42
|
+
}), 128)), _cache[0] || (_cache[0] = createElementVNode("span", { class: "mx-3px tree-text" }, "请选择", -1))])]), createElementVNode("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.treeSingleData, (i, index) => {
|
|
43
|
+
return openBlock(), createBlock(_component_van_cell, {
|
|
44
|
+
key: index,
|
|
45
|
+
class: normalizeClass({ "is-active": unref(active) === i.value }),
|
|
46
|
+
onClick: withModifiers(($event) => setVal(i), ["stop"])
|
|
47
|
+
}, {
|
|
48
|
+
title: withCtx(() => [createElementVNode("span", { innerHTML: i.label }, null, 8, _hoisted_6)]),
|
|
49
|
+
"right-icon": withCtx(() => [createElementVNode("div", _hoisted_7, [unref(active) === i.value ? (openBlock(), createBlock(_component_van_icon, {
|
|
50
|
+
key: 0,
|
|
51
|
+
name: "success",
|
|
52
|
+
class: "text-18px primary-color"
|
|
53
|
+
})) : createCommentVNode("", true)])]),
|
|
54
|
+
_: 2
|
|
55
|
+
}, 1032, ["class", "onClick"]);
|
|
56
|
+
}), 128))])]);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
//#endregion
|
|
61
|
+
export { treeList_vue_vue_type_script_setup_true_name_treelist_lang_default as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.is-active[data-v-469e28be] {
|
|
2
|
+
color: var(--van-primary-color);
|
|
3
|
+
}
|
|
4
|
+
.tree-tab span[data-v-469e28be] {
|
|
5
|
+
white-space: nowrap;
|
|
6
|
+
}
|
|
7
|
+
.tree-text[data-v-469e28be] {
|
|
8
|
+
color: var(--van-primary-color);
|
|
9
|
+
}
|
|
10
|
+
.border-b[data-v-469e28be] {
|
|
11
|
+
border-bottom: 1px solid var(--van-cell-border-color);
|
|
12
|
+
}
|
|
13
|
+
.border-b[data-v-469e28be]::-webkit-scrollbar {
|
|
14
|
+
height: 0;
|
|
15
|
+
}
|
|
16
|
+
[data-v-469e28be] .van-cell::after {
|
|
17
|
+
border-bottom: transparent;
|
|
18
|
+
right: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { optionType } from './typing';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
options: optionType[];
|
|
4
|
+
activeKey: string;
|
|
5
|
+
activeKeys: string[];
|
|
6
|
+
title: string;
|
|
7
|
+
type: string;
|
|
8
|
+
hasNoLabels?: boolean;
|
|
9
|
+
ignoreCase?: number;
|
|
10
|
+
maxTagTextLength?: number;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
checked: (...args: any[]) => void;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
15
|
+
onChecked?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
|
+
treeListRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
18
|
+
checkedSingleData: optionType[];
|
|
19
|
+
treeSingleData: optionType[];
|
|
20
|
+
activeKey: string;
|
|
21
|
+
type: string;
|
|
22
|
+
}> & Readonly<{
|
|
23
|
+
onCheckTreeData?: ((...args: any[]) => any) | undefined;
|
|
24
|
+
onGetBackData?: ((...args: any[]) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
active: import('vue').Ref<string, string>;
|
|
27
|
+
setVal: (value: IObject) => void;
|
|
28
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
|
+
checkTreeData: (...args: any[]) => void;
|
|
30
|
+
getBackData: (...args: any[]) => void;
|
|
31
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
32
|
+
P: {};
|
|
33
|
+
B: {};
|
|
34
|
+
D: {};
|
|
35
|
+
C: {};
|
|
36
|
+
M: {};
|
|
37
|
+
Defaults: {};
|
|
38
|
+
}, Readonly<{
|
|
39
|
+
checkedSingleData: optionType[];
|
|
40
|
+
treeSingleData: optionType[];
|
|
41
|
+
activeKey: string;
|
|
42
|
+
type: string;
|
|
43
|
+
}> & Readonly<{
|
|
44
|
+
onCheckTreeData?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
onGetBackData?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
active: import('vue').Ref<string, string>;
|
|
48
|
+
setVal: (value: IObject) => void;
|
|
49
|
+
}, {}, {}, {}, {}> | null;
|
|
50
|
+
selectListRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
51
|
+
selectData: optionType[];
|
|
52
|
+
type: string;
|
|
53
|
+
}> & Readonly<{
|
|
54
|
+
onSetSelectData?: ((...args: any[]) => any) | undefined;
|
|
55
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
56
|
+
setSelectData: (...args: any[]) => void;
|
|
57
|
+
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
58
|
+
P: {};
|
|
59
|
+
B: {};
|
|
60
|
+
D: {};
|
|
61
|
+
C: {};
|
|
62
|
+
M: {};
|
|
63
|
+
Defaults: {};
|
|
64
|
+
}, Readonly<{
|
|
65
|
+
selectData: optionType[];
|
|
66
|
+
type: string;
|
|
67
|
+
}> & Readonly<{
|
|
68
|
+
onSetSelectData?: ((...args: any[]) => any) | undefined;
|
|
69
|
+
}>, {}, {}, {}, {}, {}> | null;
|
|
70
|
+
}, HTMLDivElement>;
|
|
71
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
2
|
+
import treeCheck_vue_vue_type_script_setup_true_lang_default from "./treeCheck.vue_vue_type_script_setup_true_lang.mjs";
|
|
3
|
+
import './treeCheck.vue_vue_type_style_index_0_scoped_00b864e8_lang.css';/* empty css */
|
|
4
|
+
//#region src/components/treePopup/src/treeCheck.vue
|
|
5
|
+
var treeCheck_default = /* @__PURE__ */ _plugin_vue_export_helper_default(treeCheck_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-00b864e8"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { treeCheck_default as default };
|