@wfrog/vc-ui 1.10.6 → 1.10.7
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.
|
@@ -4,7 +4,6 @@ import { E as ElCheckboxGroup, a as ElCheckbox } from '../../chunk/DBf73TLo.mjs'
|
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { defineComponent, ref, computed, createBlock, openBlock, normalizeClass, withCtx, withDirectives, createElementBlock, createCommentVNode, createElementVNode, createVNode, unref, isRef, Fragment, renderList, renderSlot, createTextVNode, toDisplayString, mergeProps, vShow } from 'vue';
|
|
6
6
|
import { Loading } from '@element-plus/icons-vue';
|
|
7
|
-
import { useFormDisabled } from 'element-plus';
|
|
8
7
|
import { C as Component$3 } from '../button/button.mjs';
|
|
9
8
|
import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
|
|
10
9
|
import { C as Component$2 } from '../iconify-icon/iconify-icon.mjs';
|
|
@@ -38,7 +37,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
38
37
|
const emits = __emit;
|
|
39
38
|
const { filterKeyword } = injectExplorerPanelState();
|
|
40
39
|
const myValue = useVModel(props, "modelValue", emits);
|
|
41
|
-
const formDisabled = useFormDisabled();
|
|
42
40
|
const actived = ref();
|
|
43
41
|
const actionsMapping = {
|
|
44
42
|
create: { title: "新增", type: "primary", icon: "Plus" },
|
|
@@ -79,7 +77,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
77
|
createVNode(_component_el_checkbox_group, {
|
|
80
78
|
modelValue: unref(myValue),
|
|
81
79
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(myValue) ? myValue.value = $event : null),
|
|
82
|
-
disabled:
|
|
80
|
+
disabled: __props.disabled,
|
|
83
81
|
onChange: _cache[1] || (_cache[1] = (val) => emits("valueChange", val))
|
|
84
82
|
}, {
|
|
85
83
|
default: withCtx(() => [
|
|
@@ -146,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
144
|
link: "",
|
|
147
145
|
icon: { type: "el", name: actionsMapping[action].icon },
|
|
148
146
|
stop: "",
|
|
149
|
-
disabled:
|
|
147
|
+
disabled: __props.disabled,
|
|
150
148
|
onClick: ($event) => emits(action, item.value, item)
|
|
151
149
|
}), null, 16, ["confirm", "class", "icon", "disabled", "onClick"]))
|
|
152
150
|
], 64);
|
|
@@ -3,10 +3,9 @@ import '../../chunk/Gk1J52Yw.mjs';
|
|
|
3
3
|
import { E as ElTree } from '../../chunk/eqwEsspo.mjs';
|
|
4
4
|
import '../../chunk/DBf73TLo.mjs';
|
|
5
5
|
import '../../chunk/DbhQlaOz.mjs';
|
|
6
|
-
import { defineComponent, useTemplateRef, computed, watch, onBeforeUnmount, createBlock, openBlock, normalizeClass, withCtx, withDirectives, createElementBlock, createCommentVNode, createVNode, mergeProps, unref, renderSlot, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, vShow } from 'vue';
|
|
6
|
+
import { defineComponent, useTemplateRef, computed, ref, watch, onBeforeUnmount, createBlock, openBlock, normalizeClass, withCtx, withDirectives, createElementBlock, createCommentVNode, createVNode, mergeProps, unref, renderSlot, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, vShow } from 'vue';
|
|
7
7
|
import { Loading } from '@element-plus/icons-vue';
|
|
8
8
|
import '../../chunk/D9iEroQw.mjs';
|
|
9
|
-
import { useFormDisabled } from 'element-plus';
|
|
10
9
|
import { C as Component$3 } from '../button/button.mjs';
|
|
11
10
|
import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
|
|
12
11
|
import { C as Component$2 } from '../iconify-icon/iconify-icon.mjs';
|
|
@@ -138,7 +137,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
138
137
|
const emits = __emit;
|
|
139
138
|
const treeRef = useTemplateRef("treeRef");
|
|
140
139
|
const { filterKeyword } = injectExplorerPanelState();
|
|
141
|
-
const formDisabled = useFormDisabled();
|
|
142
140
|
const actionsMapping = {
|
|
143
141
|
create: { title: "新增", type: "primary", icon: "Plus" },
|
|
144
142
|
modify: { title: "修改", type: "primary", icon: "Edit" },
|
|
@@ -155,19 +153,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
155
153
|
nodeKey: "value",
|
|
156
154
|
...props.treeProps
|
|
157
155
|
}));
|
|
158
|
-
const
|
|
159
|
-
|
|
160
|
-
|
|
156
|
+
const myTreeData = ref();
|
|
157
|
+
watch(() => props.disabled, () => {
|
|
158
|
+
if (props.disabled) {
|
|
159
|
+
index.traverse(myTreeData.value || [], (node) => {
|
|
161
160
|
node.originDisabled = node.disabled;
|
|
162
161
|
node.disabled = true;
|
|
163
162
|
});
|
|
164
163
|
} else {
|
|
165
|
-
index.traverse(
|
|
164
|
+
index.traverse(myTreeData.value || [], (node) => {
|
|
166
165
|
node.disabled = node.originDisabled ?? false;
|
|
167
166
|
});
|
|
168
167
|
}
|
|
169
|
-
return props.data;
|
|
170
168
|
});
|
|
169
|
+
watch(() => props.data, () => {
|
|
170
|
+
myTreeData.value = props.data;
|
|
171
|
+
}, { immediate: true, deep: true });
|
|
171
172
|
function filterNode(value, data) {
|
|
172
173
|
if (!value || !filterKeyword.value) {
|
|
173
174
|
return true;
|
|
@@ -198,7 +199,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
198
199
|
withDirectives(createVNode(_component_ElTree, mergeProps({
|
|
199
200
|
ref_key: "treeRef",
|
|
200
201
|
ref: treeRef,
|
|
201
|
-
data: unref(
|
|
202
|
+
data: unref(myTreeData)
|
|
202
203
|
}, { ..._ctx.$attrs, ...unref(treeProps) }, {
|
|
203
204
|
class: _ctx.$style.tree,
|
|
204
205
|
"filter-node-method": filterNode,
|
|
@@ -245,7 +246,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
245
246
|
link: "",
|
|
246
247
|
icon: { type: "el", name: actionsMapping[action].icon },
|
|
247
248
|
stop: "",
|
|
248
|
-
disabled:
|
|
249
|
+
disabled: __props.disabled,
|
|
249
250
|
onClick: ($event) => emits(action, node.data.value, node)
|
|
250
251
|
}), null, 16, ["confirm", "class", "icon", "disabled", "onClick"]))
|
|
251
252
|
], 64);
|
package/dist/es/index.mjs
CHANGED
|
@@ -156,7 +156,7 @@ const __vite_glob_0_47 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
|
|
|
156
156
|
default: _sfc_main$8
|
|
157
157
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
158
158
|
|
|
159
|
-
const version = "1.10.
|
|
159
|
+
const version = "1.10.7";
|
|
160
160
|
|
|
161
161
|
const modules = /* #__PURE__ */ Object.assign({"./components/awesome-icon/awesome-icon.vue": __vite_glob_0_0,"./components/backbottom/backbottom.vue": __vite_glob_0_1,"./components/button/button.vue": __vite_glob_0_2,"./components/chat-container/chat-container.vue": __vite_glob_0_3,"./components/choice-boolean/choice-boolean.vue": __vite_glob_0_4,"./components/choice/choice.vue": __vite_glob_0_5,"./components/color-switch/color-switch.vue": __vite_glob_0_6,"./components/config-provider/config-provider.vue": __vite_glob_0_7,"./components/cropper/cropper.vue": __vite_glob_0_8,"./components/currency/currency.vue": __vite_glob_0_9,"./components/dark-switch/dark-switch.vue": __vite_glob_0_10,"./components/daterange-picker/daterange-picker.vue": __vite_glob_0_11,"./components/dialog-camera-upload/dialog-camera-upload.vue": __vite_glob_0_12,"./components/dialog-map-point/dialog-map-point.vue": __vite_glob_0_13,"./components/dialog-upload-images/dialog-upload-images.vue": __vite_glob_0_14,"./components/dialog/dialog.vue": __vite_glob_0_15,"./components/drag-verify/drag-verify.vue": __vite_glob_0_16,"./components/drawer/drawer.vue": __vite_glob_0_17,"./components/easy-pagination/easy-pagination.vue": __vite_glob_0_18,"./components/el-icon/el-icon.vue": __vite_glob_0_19,"./components/explorer-column-table/explorer-column-table.vue": __vite_glob_0_20,"./components/explorer-container/explorer-container.vue": __vite_glob_0_21,"./components/explorer-filter/explorer-filter.vue": __vite_glob_0_22,"./components/explorer-footer/explorer-footer.vue": __vite_glob_0_23,"./components/explorer-form/explorer-form.vue": __vite_glob_0_24,"./components/explorer-list/explorer-list.vue": __vite_glob_0_25,"./components/explorer-modal-form/explorer-modal-form.vue": __vite_glob_0_26,"./components/explorer-panel/explorer-panel.vue": __vite_glob_0_27,"./components/explorer-query/explorer-query.vue": __vite_glob_0_28,"./components/explorer-table/explorer-table.vue": __vite_glob_0_29,"./components/explorer-tools/explorer-tools.vue": __vite_glob_0_30,"./components/explorer-tree/explorer-tree.vue": __vite_glob_0_31,"./components/explorer/explorer.vue": __vite_glob_0_32,"./components/flag/flag.vue": __vite_glob_0_33,"./components/icon-picker/icon-picker.vue": __vite_glob_0_34,"./components/icon/icon.vue": __vite_glob_0_35,"./components/iconify-icon/iconify-icon.vue": __vite_glob_0_36,"./components/image/image.vue": __vite_glob_0_37,"./components/input-number/input-number.vue": __vite_glob_0_38,"./components/input/input.vue": __vite_glob_0_39,"./components/pca-picker/pca-picker.vue": __vite_glob_0_40,"./components/qr-code/qr-code.vue": __vite_glob_0_41,"./components/screenfull/screenfull.vue": __vite_glob_0_42,"./components/scrollbar/scrollbar.vue": __vite_glob_0_43,"./components/select/select.vue": __vite_glob_0_44,"./components/single-player/single-player.vue": __vite_glob_0_45,"./components/splitter-panel/splitter-panel.vue": __vite_glob_0_46,"./components/splitter/splitter.vue": __vite_glob_0_47,"./components/svg-icon/svg-icon.vue": __vite_glob_0_48,"./components/switch/switch.vue": __vite_glob_0_49,"./components/sync-scroll-container/sync-scroll-container.vue": __vite_glob_0_50,"./components/tags/tags.vue": __vite_glob_0_51,"./components/text-ellipsis/text-ellipsis.vue": __vite_glob_0_52,"./components/thousand-input/thousand-input.vue": __vite_glob_0_53,"./components/tinymce/tinymce.vue": __vite_glob_0_54,"./components/transfer-panel/transfer-panel.vue": __vite_glob_0_55,"./components/transfer/transfer.vue": __vite_glob_0_56,"./components/tree-picker/tree-picker.vue": __vite_glob_0_57,"./components/upload-file/upload-file.vue": __vite_glob_0_58});
|
|
162
162
|
const upper = (_, letter) => letter.toUpperCase();
|