giime 0.6.26 → 0.6.28
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.css +212 -8
- package/es/components/index.mjs +5 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/src/composite/index.d.ts +1 -0
- package/es/components/src/composite/index.mjs +5 -0
- package/es/components/src/composite/index.mjs.map +1 -1
- package/es/components/src/composite/tableCustom/TableCustom.vue.d.ts +556 -0
- package/es/components/src/composite/tableCustom/TableCustom.vue.mjs +8 -0
- package/es/components/src/composite/tableCustom/TableCustom.vue.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/TableCustom.vue2.mjs +331 -0
- package/es/components/src/composite/tableCustom/TableCustom.vue2.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/TableCustom.vue3.mjs +4 -0
- package/es/components/src/composite/tableCustom/TableCustom.vue3.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/customOperate/CustomOperate.vue.d.ts +64 -0
- package/es/components/src/composite/tableCustom/customOperate/CustomOperate.vue.mjs +7 -0
- package/es/components/src/composite/tableCustom/customOperate/CustomOperate.vue.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/customOperate/CustomOperate.vue2.mjs +469 -0
- package/es/components/src/composite/tableCustom/customOperate/CustomOperate.vue2.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/customOperate/CustomOperate.vue3.mjs +4 -0
- package/es/components/src/composite/tableCustom/customOperate/CustomOperate.vue3.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/customOperate/customOperate.d.ts +42 -0
- package/es/components/src/composite/tableCustom/customOperate/customOperate.mjs +13 -0
- package/es/components/src/composite/tableCustom/customOperate/customOperate.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/customOperate/index.d.ts +66 -0
- package/es/components/src/composite/tableCustom/customOperate/index.mjs +10 -0
- package/es/components/src/composite/tableCustom/customOperate/index.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/index.d.ts +1347 -0
- package/es/components/src/composite/tableCustom/index.mjs +12 -0
- package/es/components/src/composite/tableCustom/index.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/tableCustom.d.ts +170 -0
- package/es/components/src/composite/tableCustom/tableCustom.mjs +16 -0
- package/es/components/src/composite/tableCustom/tableCustom.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue.d.ts +79 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue.mjs +7 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue2.mjs +553 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue2.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue3.mjs +4 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue3.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/index.d.ts +81 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/index.mjs +10 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/index.mjs.map +1 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/tableCustomHeader.d.ts +30 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/tableCustomHeader.mjs +32 -0
- package/es/components/src/composite/tableCustom/tableCustomHeader/tableCustomHeader.mjs.map +1 -0
- package/es/giime/component.mjs +2 -0
- package/es/giime/component.mjs.map +1 -1
- package/es/giime/index.mjs +6 -0
- package/es/giime/index.mjs.map +1 -1
- package/es/giime/version.d.ts +1 -1
- package/es/giime/version.mjs +1 -1
- package/es/giime/version.mjs.map +1 -1
- package/es/hooks/base/index.d.ts +1 -0
- package/es/hooks/base/index.mjs +1 -0
- package/es/hooks/base/index.mjs.map +1 -1
- package/es/hooks/base/useComputedFields/index.d.ts +4 -1
- package/es/hooks/base/useComputedFields/index.mjs.map +1 -1
- package/es/hooks/base/useElementRemainingHeight/index.d.ts +22 -0
- package/es/hooks/base/useElementRemainingHeight/index.mjs +16 -0
- package/es/hooks/base/useElementRemainingHeight/index.mjs.map +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/index.mjs.map +1 -1
- package/es/index.css +212 -8
- package/es/utils/src/vue/resolver.mjs +4 -2
- package/es/utils/src/vue/resolver.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/components/index.js +25 -14
- package/lib/components/index.js.map +1 -1
- package/lib/components/src/composite/index.d.ts +1 -0
- package/lib/components/src/composite/index.js +11 -0
- package/lib/components/src/composite/index.js.map +1 -1
- package/lib/components/src/composite/tableCustom/TableCustom.vue.d.ts +556 -0
- package/lib/components/src/composite/tableCustom/TableCustom.vue.js +12 -0
- package/lib/components/src/composite/tableCustom/TableCustom.vue.js.map +1 -0
- package/lib/components/src/composite/tableCustom/TableCustom.vue2.js +335 -0
- package/lib/components/src/composite/tableCustom/TableCustom.vue2.js.map +1 -0
- package/lib/components/src/composite/tableCustom/TableCustom.vue3.js +8 -0
- package/lib/components/src/composite/tableCustom/TableCustom.vue3.js.map +1 -0
- package/lib/components/src/composite/tableCustom/customOperate/CustomOperate.vue.d.ts +64 -0
- package/lib/components/src/composite/tableCustom/customOperate/CustomOperate.vue.js +11 -0
- package/lib/components/src/composite/tableCustom/customOperate/CustomOperate.vue.js.map +1 -0
- package/lib/components/src/composite/tableCustom/customOperate/CustomOperate.vue2.js +473 -0
- package/lib/components/src/composite/tableCustom/customOperate/CustomOperate.vue2.js.map +1 -0
- package/lib/components/src/composite/tableCustom/customOperate/CustomOperate.vue3.js +8 -0
- package/lib/components/src/composite/tableCustom/customOperate/CustomOperate.vue3.js.map +1 -0
- package/lib/components/src/composite/tableCustom/customOperate/customOperate.d.ts +42 -0
- package/lib/components/src/composite/tableCustom/customOperate/customOperate.js +16 -0
- package/lib/components/src/composite/tableCustom/customOperate/customOperate.js.map +1 -0
- package/lib/components/src/composite/tableCustom/customOperate/index.d.ts +66 -0
- package/lib/components/src/composite/tableCustom/customOperate/index.js +17 -0
- package/lib/components/src/composite/tableCustom/customOperate/index.js.map +1 -0
- package/lib/components/src/composite/tableCustom/index.d.ts +1347 -0
- package/lib/components/src/composite/tableCustom/index.js +22 -0
- package/lib/components/src/composite/tableCustom/index.js.map +1 -0
- package/lib/components/src/composite/tableCustom/tableCustom.d.ts +170 -0
- package/lib/components/src/composite/tableCustom/tableCustom.js +19 -0
- package/lib/components/src/composite/tableCustom/tableCustom.js.map +1 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue.d.ts +79 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue.js +11 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue.js.map +1 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue2.js +557 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue2.js.map +1 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue3.js +8 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/TableCustomHeader.vue3.js.map +1 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/index.d.ts +81 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/index.js +16 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/index.js.map +1 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/tableCustomHeader.d.ts +30 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/tableCustomHeader.js +34 -0
- package/lib/components/src/composite/tableCustom/tableCustomHeader/tableCustomHeader.js.map +1 -0
- package/lib/giime/component.js +10 -8
- package/lib/giime/component.js.map +1 -1
- package/lib/giime/index.js +81 -68
- package/lib/giime/index.js.map +1 -1
- package/lib/giime/version.d.ts +1 -1
- package/lib/giime/version.js +1 -1
- package/lib/giime/version.js.map +1 -1
- package/lib/hooks/base/index.d.ts +1 -0
- package/lib/hooks/base/index.js +2 -0
- package/lib/hooks/base/index.js.map +1 -1
- package/lib/hooks/base/useComputedFields/index.d.ts +4 -1
- package/lib/hooks/base/useComputedFields/index.js.map +1 -1
- package/lib/hooks/base/useElementRemainingHeight/index.d.ts +22 -0
- package/lib/hooks/base/useElementRemainingHeight/index.js +18 -0
- package/lib/hooks/base/useElementRemainingHeight/index.js.map +1 -0
- package/lib/hooks/index.js +38 -36
- package/lib/hooks/index.js.map +1 -1
- package/lib/index.css +212 -8
- package/lib/utils/src/vue/resolver.js +4 -2
- package/lib/utils/src/vue/resolver.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
import { createElementVNode, defineComponent, mergeModels, useModel, ref, computed, watch, onMounted, resolveComponent, openBlock, createBlock, withCtx, createVNode, createTextVNode, unref, toDisplayString, normalizeStyle, TransitionGroup, createElementBlock, Fragment, renderList } from 'vue';
|
|
2
|
+
import '../../../../../hooks/index.mjs';
|
|
3
|
+
import { cloneDeep } from 'lodash-es';
|
|
4
|
+
import { useCloned } from '@vueuse/core';
|
|
5
|
+
import { InfoFilled, Rank } from '@element-plus/icons-vue';
|
|
6
|
+
import { customOperateProps } from './customOperate.mjs';
|
|
7
|
+
import { useCustomSettingsStore } from '../../../../../hooks/store/useCustomSettings/index.mjs';
|
|
8
|
+
|
|
9
|
+
const _hoisted_1 = { class: "gm-mb-4 gm-flex gm-items-center gm-gap-2 gm-rounded gm-border gm-border-cyan-300 gm-bg-cyan-50 gm-p-2 gm-text-sm gm-text-[#777]" };
|
|
10
|
+
const _hoisted_2 = { class: "gm-text-cyan-500" };
|
|
11
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode(
|
|
12
|
+
"div",
|
|
13
|
+
{ class: "gm-font-bold gm-text-amber-400" },
|
|
14
|
+
"\u70B9\u51FB\u6309\u94AE\u53EF\u4FEE\u6539\u5F53\u524D\u6309\u94AE\u989C\u8272\uFF01",
|
|
15
|
+
-1
|
|
16
|
+
/* HOISTED */
|
|
17
|
+
);
|
|
18
|
+
const _hoisted_4 = { class: "custom-content gm-text-sm" };
|
|
19
|
+
const _hoisted_5 = { class: "gm-flex gm-w-14 gm-justify-center" };
|
|
20
|
+
const _hoisted_6 = /* @__PURE__ */ createElementVNode(
|
|
21
|
+
"li",
|
|
22
|
+
{ class: "gm-flex-1 gm-border-l gm-border-white" },
|
|
23
|
+
"\u5217\u540D",
|
|
24
|
+
-1
|
|
25
|
+
/* HOISTED */
|
|
26
|
+
);
|
|
27
|
+
const _hoisted_7 = /* @__PURE__ */ createElementVNode(
|
|
28
|
+
"li",
|
|
29
|
+
{ class: "gm-w-32 gm-border-l gm-border-white" },
|
|
30
|
+
"\u62D6\u5730\u8C03\u6574\u987A\u5E8F",
|
|
31
|
+
-1
|
|
32
|
+
/* HOISTED */
|
|
33
|
+
);
|
|
34
|
+
const _hoisted_8 = ["onDragstart", "onDragenter"];
|
|
35
|
+
const _hoisted_9 = { class: "gm-flex gm-w-14 gm-justify-center" };
|
|
36
|
+
const _hoisted_10 = { class: "gm-flex-1 gm-border-l gm-border-gray-200" };
|
|
37
|
+
const _hoisted_11 = { class: "p-1" };
|
|
38
|
+
const _hoisted_12 = /* @__PURE__ */ createElementVNode(
|
|
39
|
+
"div",
|
|
40
|
+
{ class: "text-[14px] gm-mb-2" },
|
|
41
|
+
"\u70B9\u51FB\u4E0B\u5217\u8272\u5757\u53EF\u4FEE\u6539\u6309\u94AE\u989C\u8272",
|
|
42
|
+
-1
|
|
43
|
+
/* HOISTED */
|
|
44
|
+
);
|
|
45
|
+
const _hoisted_13 = { class: "gm-w-32 gm-cursor-grabbing gm-border-l gm-border-gray-200" };
|
|
46
|
+
const _hoisted_14 = { class: "gm-flex gm-justify-between" };
|
|
47
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
48
|
+
...{
|
|
49
|
+
name: "GmCustomOperate"
|
|
50
|
+
},
|
|
51
|
+
__name: "CustomOperate",
|
|
52
|
+
props: /* @__PURE__ */ mergeModels(customOperateProps, {
|
|
53
|
+
"isShowDrawer": { type: Boolean, ...{
|
|
54
|
+
required: true
|
|
55
|
+
} },
|
|
56
|
+
"isShowDrawerModifiers": {},
|
|
57
|
+
"customBtnPropsList": {
|
|
58
|
+
required: true
|
|
59
|
+
},
|
|
60
|
+
"customBtnPropsListModifiers": {}
|
|
61
|
+
}),
|
|
62
|
+
emits: ["update:isShowDrawer", "update:customBtnPropsList"],
|
|
63
|
+
setup(__props, { expose: __expose }) {
|
|
64
|
+
const isShowDrawer = useModel(__props, "isShowDrawer");
|
|
65
|
+
const customBtnPropsList = useModel(__props, "customBtnPropsList");
|
|
66
|
+
const props = __props;
|
|
67
|
+
const customSettingsStore = useCustomSettingsStore();
|
|
68
|
+
const isInited = ref(false);
|
|
69
|
+
const { cloned: clonedCustomBtnList } = useCloned(customBtnPropsList);
|
|
70
|
+
const defaultPropsList = computed(() => cloneDeep(props.customDefaultPropsList));
|
|
71
|
+
const popoverVisibles = ref(defaultPropsList.value.map(() => false));
|
|
72
|
+
watch(defaultPropsList, () => {
|
|
73
|
+
popoverVisibles.value = defaultPropsList.value.map(() => false);
|
|
74
|
+
});
|
|
75
|
+
watch(isShowDrawer, (newValue) => {
|
|
76
|
+
if (newValue) {
|
|
77
|
+
clonedCustomBtnList.value = cloneDeep(customBtnPropsList.value);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
const customSettingsValue = computed(() => customSettingsStore.customSettings[props.keyWord]?.[props.type] || []);
|
|
81
|
+
const { cloned: clonedStore } = useCloned(customSettingsValue);
|
|
82
|
+
const updateOperate = () => {
|
|
83
|
+
customBtnPropsList.value = clonedCustomBtnList.value;
|
|
84
|
+
};
|
|
85
|
+
const initOperate = async () => {
|
|
86
|
+
try {
|
|
87
|
+
await customSettingsStore.getCustomSettings({ key_word: props.keyWord, type: props.type }, { defaultValue: [] });
|
|
88
|
+
} catch {
|
|
89
|
+
}
|
|
90
|
+
const clonedDefaultOperate = cloneDeep(props.customDefaultPropsList);
|
|
91
|
+
let operate = clonedDefaultOperate;
|
|
92
|
+
if (clonedStore.value.length) {
|
|
93
|
+
operate = [];
|
|
94
|
+
clonedStore.value.forEach((it) => {
|
|
95
|
+
const index = clonedDefaultOperate.findIndex((v) => v.prop === it.prop);
|
|
96
|
+
if (index > -1) {
|
|
97
|
+
const item = clonedDefaultOperate.splice(index, 1)[0];
|
|
98
|
+
operate.push({
|
|
99
|
+
...item,
|
|
100
|
+
...it,
|
|
101
|
+
label: item.label
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
clonedCustomBtnList.value = [...operate, ...clonedDefaultOperate];
|
|
106
|
+
}
|
|
107
|
+
updateOperate();
|
|
108
|
+
isInited.value = true;
|
|
109
|
+
};
|
|
110
|
+
const titleStyle = computed(() => {
|
|
111
|
+
const h = props.customDefaultPropsList.length * 44;
|
|
112
|
+
const H = document.documentElement.clientHeight || document.body.clientHeight;
|
|
113
|
+
return h > H - 240 ? { paddingRight: "4px" } : { paddingRight: 0 };
|
|
114
|
+
});
|
|
115
|
+
const checkedNumber = computed(() => {
|
|
116
|
+
return clonedCustomBtnList.value.filter((v) => v.isShow).length;
|
|
117
|
+
});
|
|
118
|
+
const checkedAll = computed({
|
|
119
|
+
get() {
|
|
120
|
+
return clonedCustomBtnList.value.every((v) => v.isShow);
|
|
121
|
+
},
|
|
122
|
+
set(value) {
|
|
123
|
+
clonedCustomBtnList.value.forEach((v) => {
|
|
124
|
+
v.isShow = Boolean(value);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const isIndeterminate = computed(() => !checkedAll.value && clonedCustomBtnList.value.some((v) => v.isShow));
|
|
129
|
+
const handleCheckAllChange = (val) => {
|
|
130
|
+
clonedCustomBtnList.value.forEach((v) => {
|
|
131
|
+
v.isShow = Boolean(val);
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
const setBtnType = (item, index, type) => {
|
|
135
|
+
item.type = type;
|
|
136
|
+
popoverVisibles.value[index] = false;
|
|
137
|
+
};
|
|
138
|
+
const start = ref();
|
|
139
|
+
const end = ref();
|
|
140
|
+
const dragstart = (item) => {
|
|
141
|
+
document.body.style.userSelect = "none";
|
|
142
|
+
start.value = item;
|
|
143
|
+
};
|
|
144
|
+
const dragenter = (item, e) => {
|
|
145
|
+
end.value = item;
|
|
146
|
+
e.preventDefault();
|
|
147
|
+
};
|
|
148
|
+
const dragend = () => {
|
|
149
|
+
document.body.style.userSelect = "text";
|
|
150
|
+
if (start.value === end.value)
|
|
151
|
+
return;
|
|
152
|
+
if (start.value && end.value) {
|
|
153
|
+
const oldIndex = clonedCustomBtnList.value.findIndex((v) => v.prop === start.value?.prop);
|
|
154
|
+
const newIndex = clonedCustomBtnList.value.findIndex((v) => v.prop === end.value?.prop);
|
|
155
|
+
const newItems = [...clonedCustomBtnList.value];
|
|
156
|
+
newItems.splice(oldIndex, 1);
|
|
157
|
+
newItems.splice(newIndex, 0, start.value);
|
|
158
|
+
clonedCustomBtnList.value = [...newItems];
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const dragover = (e) => {
|
|
162
|
+
e.preventDefault();
|
|
163
|
+
};
|
|
164
|
+
const submitLoading = ref(false);
|
|
165
|
+
const onSubmit = async () => {
|
|
166
|
+
try {
|
|
167
|
+
submitLoading.value = true;
|
|
168
|
+
const { data } = await customSettingsStore.addCustomSettings({
|
|
169
|
+
key_word: props.keyWord,
|
|
170
|
+
value: JSON.stringify(clonedCustomBtnList.value),
|
|
171
|
+
type: props.type
|
|
172
|
+
});
|
|
173
|
+
submitLoading.value = false;
|
|
174
|
+
if (data.code !== 200) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
isShowDrawer.value = false;
|
|
178
|
+
updateOperate();
|
|
179
|
+
} catch (e) {
|
|
180
|
+
console.error(e);
|
|
181
|
+
submitLoading.value = false;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
const onReset = () => {
|
|
185
|
+
clonedCustomBtnList.value = cloneDeep(props.customDefaultPropsList);
|
|
186
|
+
};
|
|
187
|
+
const onSyncRemote = async () => {
|
|
188
|
+
try {
|
|
189
|
+
submitLoading.value = true;
|
|
190
|
+
await customSettingsStore.syncRemoteSetting({
|
|
191
|
+
key_word: props.keyWord,
|
|
192
|
+
type: props.type
|
|
193
|
+
});
|
|
194
|
+
submitLoading.value = false;
|
|
195
|
+
initOperate();
|
|
196
|
+
} catch (e) {
|
|
197
|
+
console.error(e);
|
|
198
|
+
submitLoading.value = false;
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
onMounted(() => {
|
|
202
|
+
if (props.disabledRemoteBtn) {
|
|
203
|
+
isInited.value = true;
|
|
204
|
+
} else {
|
|
205
|
+
initOperate();
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
__expose({
|
|
209
|
+
isInited
|
|
210
|
+
});
|
|
211
|
+
return (_ctx, _cache) => {
|
|
212
|
+
const _component_gm_icon = resolveComponent("gm-icon");
|
|
213
|
+
const _component_gm_checkbox = resolveComponent("gm-checkbox");
|
|
214
|
+
const _component_gm_button = resolveComponent("gm-button");
|
|
215
|
+
const _component_gm_popover = resolveComponent("gm-popover");
|
|
216
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
217
|
+
const _component_gm_drawer = resolveComponent("gm-drawer");
|
|
218
|
+
return openBlock(), createBlock(_component_gm_drawer, {
|
|
219
|
+
modelValue: isShowDrawer.value,
|
|
220
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isShowDrawer.value = $event),
|
|
221
|
+
title: "\u81EA\u5B9A\u4E49\u6309\u94AE",
|
|
222
|
+
direction: "rtl",
|
|
223
|
+
size: "500px",
|
|
224
|
+
"append-to-body": "",
|
|
225
|
+
"destroy-on-close": "",
|
|
226
|
+
class: "custom-operate-drawer"
|
|
227
|
+
}, {
|
|
228
|
+
footer: withCtx(() => [
|
|
229
|
+
createElementVNode("div", _hoisted_14, [
|
|
230
|
+
createElementVNode("div", null, [
|
|
231
|
+
createVNode(_component_gm_button, {
|
|
232
|
+
loading: submitLoading.value,
|
|
233
|
+
type: "primary",
|
|
234
|
+
size: "default",
|
|
235
|
+
onClick: onReset
|
|
236
|
+
}, {
|
|
237
|
+
default: withCtx(() => [
|
|
238
|
+
createTextVNode("\u91CD\u7F6E")
|
|
239
|
+
]),
|
|
240
|
+
_: 1
|
|
241
|
+
/* STABLE */
|
|
242
|
+
}, 8, ["loading"]),
|
|
243
|
+
createVNode(_component_gm_button, {
|
|
244
|
+
loading: submitLoading.value,
|
|
245
|
+
type: "success",
|
|
246
|
+
size: "default",
|
|
247
|
+
onClick: onSyncRemote
|
|
248
|
+
}, {
|
|
249
|
+
default: withCtx(() => [
|
|
250
|
+
createTextVNode("\u540C\u6B65")
|
|
251
|
+
]),
|
|
252
|
+
_: 1
|
|
253
|
+
/* STABLE */
|
|
254
|
+
}, 8, ["loading"])
|
|
255
|
+
]),
|
|
256
|
+
createElementVNode("div", null, [
|
|
257
|
+
createVNode(_component_gm_button, {
|
|
258
|
+
loading: submitLoading.value,
|
|
259
|
+
size: "default",
|
|
260
|
+
onClick: _cache[2] || (_cache[2] = ($event) => isShowDrawer.value = false)
|
|
261
|
+
}, {
|
|
262
|
+
default: withCtx(() => [
|
|
263
|
+
createTextVNode("\u53D6\u6D88")
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
/* STABLE */
|
|
267
|
+
}, 8, ["loading"]),
|
|
268
|
+
createVNode(_component_gm_button, {
|
|
269
|
+
loading: submitLoading.value,
|
|
270
|
+
type: "primary",
|
|
271
|
+
size: "default",
|
|
272
|
+
onClick: onSubmit
|
|
273
|
+
}, {
|
|
274
|
+
default: withCtx(() => [
|
|
275
|
+
createTextVNode("\u4FDD\u5B58")
|
|
276
|
+
]),
|
|
277
|
+
_: 1
|
|
278
|
+
/* STABLE */
|
|
279
|
+
}, 8, ["loading"])
|
|
280
|
+
])
|
|
281
|
+
])
|
|
282
|
+
]),
|
|
283
|
+
default: withCtx(() => [
|
|
284
|
+
createElementVNode("div", _hoisted_1, [
|
|
285
|
+
createVNode(_component_gm_icon, null, {
|
|
286
|
+
default: withCtx(() => [
|
|
287
|
+
createVNode(unref(InfoFilled))
|
|
288
|
+
]),
|
|
289
|
+
_: 1
|
|
290
|
+
/* STABLE */
|
|
291
|
+
}),
|
|
292
|
+
createElementVNode("p", null, [
|
|
293
|
+
createTextVNode(" \u5DF2\u9009\u4E2D "),
|
|
294
|
+
createElementVNode(
|
|
295
|
+
"span",
|
|
296
|
+
_hoisted_2,
|
|
297
|
+
toDisplayString(checkedNumber.value),
|
|
298
|
+
1
|
|
299
|
+
/* TEXT */
|
|
300
|
+
),
|
|
301
|
+
createTextVNode(" \u9879 ")
|
|
302
|
+
]),
|
|
303
|
+
_hoisted_3
|
|
304
|
+
]),
|
|
305
|
+
createElementVNode("div", _hoisted_4, [
|
|
306
|
+
createElementVNode(
|
|
307
|
+
"ul",
|
|
308
|
+
{
|
|
309
|
+
class: "gm-flex gm-items-center gm-border gm-border-y-0 gm-border-gray-200 gm-bg-gray-200 gm-font-semibold gm-text-[#333]",
|
|
310
|
+
style: normalizeStyle(titleStyle.value)
|
|
311
|
+
},
|
|
312
|
+
[
|
|
313
|
+
createElementVNode("li", _hoisted_5, [
|
|
314
|
+
createVNode(_component_gm_checkbox, {
|
|
315
|
+
modelValue: checkedAll.value,
|
|
316
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => checkedAll.value = $event),
|
|
317
|
+
indeterminate: isIndeterminate.value,
|
|
318
|
+
onChange: handleCheckAllChange
|
|
319
|
+
}, null, 8, ["modelValue", "indeterminate"])
|
|
320
|
+
]),
|
|
321
|
+
_hoisted_6,
|
|
322
|
+
_hoisted_7
|
|
323
|
+
],
|
|
324
|
+
4
|
|
325
|
+
/* STYLE */
|
|
326
|
+
),
|
|
327
|
+
createVNode(TransitionGroup, {
|
|
328
|
+
class: "custom-group gm-border-b gm-border-gray-200 gm-text-gray-600",
|
|
329
|
+
name: "sort",
|
|
330
|
+
tag: "div"
|
|
331
|
+
}, {
|
|
332
|
+
default: withCtx(() => [
|
|
333
|
+
(openBlock(true), createElementBlock(
|
|
334
|
+
Fragment,
|
|
335
|
+
null,
|
|
336
|
+
renderList(unref(clonedCustomBtnList), (item, index) => {
|
|
337
|
+
return openBlock(), createElementBlock("ul", {
|
|
338
|
+
key: item.prop,
|
|
339
|
+
class: "gm-flex gm-items-center gm-border gm-border-b-0 gm-border-gray-200",
|
|
340
|
+
draggable: true,
|
|
341
|
+
onDragstart: ($event) => dragstart(item),
|
|
342
|
+
onDragenter: ($event) => dragenter(item, $event),
|
|
343
|
+
onDragend: dragend,
|
|
344
|
+
onDragover: _cache[1] || (_cache[1] = ($event) => dragover($event))
|
|
345
|
+
}, [
|
|
346
|
+
createElementVNode("li", _hoisted_9, [
|
|
347
|
+
createVNode(_component_gm_checkbox, {
|
|
348
|
+
modelValue: item.isShow,
|
|
349
|
+
"onUpdate:modelValue": ($event) => item.isShow = $event
|
|
350
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
351
|
+
]),
|
|
352
|
+
createElementVNode("li", _hoisted_10, [
|
|
353
|
+
createVNode(_component_gm_popover, {
|
|
354
|
+
visible: popoverVisibles.value[index],
|
|
355
|
+
"onUpdate:visible": ($event) => popoverVisibles.value[index] = $event,
|
|
356
|
+
placement: "bottom",
|
|
357
|
+
width: 330,
|
|
358
|
+
trigger: "click"
|
|
359
|
+
}, {
|
|
360
|
+
reference: withCtx(() => [
|
|
361
|
+
createVNode(_component_gm_button, {
|
|
362
|
+
type: item.type || "primary",
|
|
363
|
+
link: "",
|
|
364
|
+
size: "small"
|
|
365
|
+
}, {
|
|
366
|
+
default: withCtx(() => [
|
|
367
|
+
createTextVNode(
|
|
368
|
+
toDisplayString(item.label),
|
|
369
|
+
1
|
|
370
|
+
/* TEXT */
|
|
371
|
+
)
|
|
372
|
+
]),
|
|
373
|
+
_: 2
|
|
374
|
+
/* DYNAMIC */
|
|
375
|
+
}, 1032, ["type"])
|
|
376
|
+
]),
|
|
377
|
+
default: withCtx(() => [
|
|
378
|
+
createElementVNode("div", _hoisted_11, [
|
|
379
|
+
_hoisted_12,
|
|
380
|
+
createVNode(_component_gm_button, {
|
|
381
|
+
type: "primary",
|
|
382
|
+
size: "small",
|
|
383
|
+
onClick: ($event) => setBtnType(item, index, "primary")
|
|
384
|
+
}, {
|
|
385
|
+
default: withCtx(() => [
|
|
386
|
+
createTextVNode(" \u84DD\u8272 ")
|
|
387
|
+
]),
|
|
388
|
+
_: 2
|
|
389
|
+
/* DYNAMIC */
|
|
390
|
+
}, 1032, ["onClick"]),
|
|
391
|
+
createVNode(_component_gm_button, {
|
|
392
|
+
type: "success",
|
|
393
|
+
size: "small",
|
|
394
|
+
onClick: ($event) => setBtnType(item, index, "success")
|
|
395
|
+
}, {
|
|
396
|
+
default: withCtx(() => [
|
|
397
|
+
createTextVNode(" \u7EFF\u8272 ")
|
|
398
|
+
]),
|
|
399
|
+
_: 2
|
|
400
|
+
/* DYNAMIC */
|
|
401
|
+
}, 1032, ["onClick"]),
|
|
402
|
+
createVNode(_component_gm_button, {
|
|
403
|
+
type: "info",
|
|
404
|
+
size: "small",
|
|
405
|
+
onClick: ($event) => setBtnType(item, index, "info")
|
|
406
|
+
}, {
|
|
407
|
+
default: withCtx(() => [
|
|
408
|
+
createTextVNode(" \u7070\u8272 ")
|
|
409
|
+
]),
|
|
410
|
+
_: 2
|
|
411
|
+
/* DYNAMIC */
|
|
412
|
+
}, 1032, ["onClick"]),
|
|
413
|
+
createVNode(_component_gm_button, {
|
|
414
|
+
type: "warning",
|
|
415
|
+
size: "small",
|
|
416
|
+
onClick: ($event) => setBtnType(item, index, "warning")
|
|
417
|
+
}, {
|
|
418
|
+
default: withCtx(() => [
|
|
419
|
+
createTextVNode(" \u6A59\u8272 ")
|
|
420
|
+
]),
|
|
421
|
+
_: 2
|
|
422
|
+
/* DYNAMIC */
|
|
423
|
+
}, 1032, ["onClick"]),
|
|
424
|
+
createVNode(_component_gm_button, {
|
|
425
|
+
type: "danger",
|
|
426
|
+
size: "small",
|
|
427
|
+
onClick: ($event) => setBtnType(item, index, "danger")
|
|
428
|
+
}, {
|
|
429
|
+
default: withCtx(() => [
|
|
430
|
+
createTextVNode(" \u7EA2\u8272 ")
|
|
431
|
+
]),
|
|
432
|
+
_: 2
|
|
433
|
+
/* DYNAMIC */
|
|
434
|
+
}, 1032, ["onClick"])
|
|
435
|
+
])
|
|
436
|
+
]),
|
|
437
|
+
_: 2
|
|
438
|
+
/* DYNAMIC */
|
|
439
|
+
}, 1032, ["visible", "onUpdate:visible"])
|
|
440
|
+
]),
|
|
441
|
+
createElementVNode("li", _hoisted_13, [
|
|
442
|
+
createVNode(_component_el_icon, { color: "#0000FF" }, {
|
|
443
|
+
default: withCtx(() => [
|
|
444
|
+
createVNode(unref(Rank))
|
|
445
|
+
]),
|
|
446
|
+
_: 1
|
|
447
|
+
/* STABLE */
|
|
448
|
+
})
|
|
449
|
+
])
|
|
450
|
+
], 40, _hoisted_8);
|
|
451
|
+
}),
|
|
452
|
+
128
|
|
453
|
+
/* KEYED_FRAGMENT */
|
|
454
|
+
))
|
|
455
|
+
]),
|
|
456
|
+
_: 1
|
|
457
|
+
/* STABLE */
|
|
458
|
+
})
|
|
459
|
+
])
|
|
460
|
+
]),
|
|
461
|
+
_: 1
|
|
462
|
+
/* STABLE */
|
|
463
|
+
}, 8, ["modelValue"]);
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
export { _sfc_main as default };
|
|
469
|
+
//# sourceMappingURL=CustomOperate.vue2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomOperate.vue2.mjs","sources":["../../../../../../../../packages/components/src/composite/tableCustom/customOperate/CustomOperate.vue"],"sourcesContent":["<template>\n <gm-drawer v-model=\"isShowDrawer\" title=\"自定义按钮\" direction=\"rtl\" size=\"500px\" append-to-body destroy-on-close class=\"custom-operate-drawer\">\n <div class=\"gm-mb-4 gm-flex gm-items-center gm-gap-2 gm-rounded gm-border gm-border-cyan-300 gm-bg-cyan-50 gm-p-2 gm-text-sm gm-text-[#777]\">\n <gm-icon><InfoFilled /></gm-icon>\n <p>\n 已选中 <span class=\"gm-text-cyan-500\">{{ checkedNumber }}</span> 项\n </p>\n <div class=\"gm-font-bold gm-text-amber-400\">点击按钮可修改当前按钮颜色!</div>\n </div>\n\n <div class=\"custom-content gm-text-sm\">\n <ul\n class=\"gm-flex gm-items-center gm-border gm-border-y-0 gm-border-gray-200 gm-bg-gray-200 gm-font-semibold gm-text-[#333]\"\n :style=\"titleStyle\"\n >\n <li class=\"gm-flex gm-w-14 gm-justify-center\">\n <gm-checkbox v-model=\"checkedAll\" :indeterminate=\"isIndeterminate\" @change=\"handleCheckAllChange\" />\n </li>\n <li class=\"gm-flex-1 gm-border-l gm-border-white\">列名</li>\n <li class=\"gm-w-32 gm-border-l gm-border-white\">拖地调整顺序</li>\n </ul>\n <transition-group class=\"custom-group gm-border-b gm-border-gray-200 gm-text-gray-600\" name=\"sort\" tag=\"div\">\n <ul\n v-for=\"(item, index) in clonedCustomBtnList\"\n :key=\"item.prop\"\n class=\"gm-flex gm-items-center gm-border gm-border-b-0 gm-border-gray-200\"\n :draggable=\"true\"\n @dragstart=\"dragstart(item)\"\n @dragenter=\"dragenter(item, $event)\"\n @dragend=\"dragend\"\n @dragover=\"dragover($event)\"\n >\n <li class=\"gm-flex gm-w-14 gm-justify-center\">\n <gm-checkbox v-model=\"item.isShow\" />\n </li>\n <li class=\"gm-flex-1 gm-border-l gm-border-gray-200\">\n <gm-popover v-model:visible=\"popoverVisibles[index]\" placement=\"bottom\" :width=\"330\" trigger=\"click\">\n <template #reference>\n <gm-button :type=\"item.type || 'primary'\" link size=\"small\">\n {{ item.label }}\n </gm-button>\n </template>\n <div class=\"p-1\">\n <div class=\"text-[14px] gm-mb-2\">点击下列色块可修改按钮颜色</div>\n <gm-button type=\"primary\" size=\"small\" @click=\"setBtnType(item, index, 'primary')\"> 蓝色 </gm-button>\n <gm-button type=\"success\" size=\"small\" @click=\"setBtnType(item, index, 'success')\"> 绿色 </gm-button>\n <gm-button type=\"info\" size=\"small\" @click=\"setBtnType(item, index, 'info')\"> 灰色 </gm-button>\n <gm-button type=\"warning\" size=\"small\" @click=\"setBtnType(item, index, 'warning')\"> 橙色 </gm-button>\n <gm-button type=\"danger\" size=\"small\" @click=\"setBtnType(item, index, 'danger')\"> 红色 </gm-button>\n </div>\n </gm-popover>\n </li>\n <li class=\"gm-w-32 gm-cursor-grabbing gm-border-l gm-border-gray-200\">\n <el-icon color=\"#0000FF\"><Rank /></el-icon>\n </li>\n </ul>\n </transition-group>\n </div>\n <template #footer>\n <div class=\"gm-flex gm-justify-between\">\n <div>\n <gm-button :loading=\"submitLoading\" type=\"primary\" size=\"default\" @click=\"onReset\">重置</gm-button>\n <gm-button :loading=\"submitLoading\" type=\"success\" size=\"default\" @click=\"onSyncRemote\">同步</gm-button>\n </div>\n <div>\n <gm-button :loading=\"submitLoading\" size=\"default\" @click=\"isShowDrawer = false\">取消</gm-button>\n <gm-button :loading=\"submitLoading\" type=\"primary\" size=\"default\" @click=\"onSubmit\">保存</gm-button>\n </div>\n </div>\n </template>\n </gm-drawer>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, onMounted, ref, watch } from 'vue';\nimport { useCustomSettingsStore } from '@giime/hooks';\nimport { cloneDeep } from 'lodash-es';\nimport { useCloned } from '@vueuse/core';\nimport { type CheckboxValueType } from 'element-plus';\nimport { InfoFilled, Rank } from '@element-plus/icons-vue';\nimport { customOperateProps } from './customOperate';\nimport type { CustomOperateButtonProps } from './customOperate';\n\ndefineOptions({\n name: 'GmCustomOperate',\n});\n/**\n * 抽屉显示\n */\nconst isShowDrawer = defineModel<boolean>('isShowDrawer', {\n required: true,\n});\n/**\n * 自定义按钮 props列表\n */\nconst customBtnPropsList = defineModel<CustomOperateButtonProps[]>('customBtnPropsList', {\n required: true,\n});\n\nconst props = defineProps(customOperateProps);\nconst customSettingsStore = useCustomSettingsStore();\n\n/**\n * 数据是否初始化完成\n */\nconst isInited = ref(false);\n/**内部克隆一份,当点击保存时 应用修改的内容 */\nconst { cloned: clonedCustomBtnList } = useCloned(customBtnPropsList);\n\nconst defaultPropsList = computed(() => cloneDeep(props.customDefaultPropsList));\n// 按钮弹出框显示隐藏\nconst popoverVisibles = ref<boolean[]>(defaultPropsList.value.map(() => false));\n// 根据props列表 初始化popo显示隐藏\nwatch(defaultPropsList, () => {\n popoverVisibles.value = defaultPropsList.value.map(() => false);\n});\n\n// 重新打开弹窗时, 克隆一份新数据\nwatch(isShowDrawer, newValue => {\n if (newValue) {\n clonedCustomBtnList.value = cloneDeep(customBtnPropsList.value);\n }\n});\n\nconst customSettingsValue = computed<CustomOperateButtonProps[]>(() => customSettingsStore.customSettings[props.keyWord]?.[props.type] || []);\nconst { cloned: clonedStore } = useCloned(customSettingsValue);\n\nconst updateOperate = () => {\n customBtnPropsList.value = clonedCustomBtnList.value;\n};\n\nconst initOperate = async () => {\n try {\n await customSettingsStore.getCustomSettings({ key_word: props.keyWord, type: props.type }, { defaultValue: [] });\n } catch {}\n\n const clonedDefaultOperate = cloneDeep(props.customDefaultPropsList);\n\n let operate = clonedDefaultOperate;\n\n if (clonedStore.value.length) {\n operate = [];\n clonedStore.value.forEach(it => {\n const index = clonedDefaultOperate.findIndex(v => v.prop === it.prop);\n if (index > -1) {\n const item = clonedDefaultOperate.splice(index, 1)[0];\n\n operate.push({\n ...item,\n ...it,\n label: item.label,\n });\n }\n });\n clonedCustomBtnList.value = [...operate, ...clonedDefaultOperate];\n }\n\n updateOperate();\n isInited.value = true;\n};\n\n/** 设置表头位置样式,调整表格对齐 */\nconst titleStyle = computed(() => {\n const h = props.customDefaultPropsList.length * 44;\n const H = document.documentElement.clientHeight || document.body.clientHeight;\n return h > H - 240 ? { paddingRight: '4px' } : { paddingRight: 0 };\n});\n\n// 已选中条数\nconst checkedNumber = computed(() => {\n return clonedCustomBtnList.value.filter(v => v.isShow).length;\n});\n// 全选\nconst checkedAll = computed({\n get() {\n return clonedCustomBtnList.value.every(v => v.isShow);\n },\n set(value: CheckboxValueType) {\n clonedCustomBtnList.value.forEach(v => {\n v.isShow = Boolean(value);\n });\n },\n});\n// 半选\nconst isIndeterminate = computed(() => !checkedAll.value && clonedCustomBtnList.value.some(v => v.isShow));\n// 切换全选\nconst handleCheckAllChange = (val: CheckboxValueType) => {\n clonedCustomBtnList.value.forEach(v => {\n v.isShow = Boolean(val);\n });\n};\n\n// 设置按钮颜色\nconst setBtnType = (item: CustomOperateButtonProps, index: number, type: CustomOperateButtonProps['type']) => {\n item.type = type;\n popoverVisibles.value[index] = false;\n};\n\n/** 拖拽开始 */\nconst start = ref<CustomOperateButtonProps>();\nconst end = ref<CustomOperateButtonProps>();\nconst dragstart = (item: CustomOperateButtonProps) => {\n document.body.style.userSelect = 'none';\n start.value = item;\n};\n/** 拖拽过程 */\nconst dragenter = (item: CustomOperateButtonProps, e: DragEvent) => {\n end.value = item;\n e.preventDefault();\n};\n/** 拖拽结束 */\nconst dragend = () => {\n document.body.style.userSelect = 'text';\n if (start.value === end.value) return;\n if (start.value && end.value) {\n const oldIndex: number = clonedCustomBtnList.value.findIndex(v => v.prop === start.value?.prop);\n const newIndex: number = clonedCustomBtnList.value.findIndex(v => v.prop === end.value?.prop);\n const newItems = [...clonedCustomBtnList.value];\n // 删除老节点\n newItems.splice(oldIndex, 1);\n\n // 目标位置新增节点\n newItems.splice(newIndex, 0, start.value);\n clonedCustomBtnList.value = [...newItems];\n }\n};\n/** 拖拽事件 */\nconst dragover = (e: DragEvent) => {\n e.preventDefault();\n};\n\nconst submitLoading = ref(false);\n// 保存\nconst onSubmit = async () => {\n try {\n submitLoading.value = true;\n const { data } = await customSettingsStore.addCustomSettings({\n key_word: props.keyWord,\n value: JSON.stringify(clonedCustomBtnList.value),\n type: props.type,\n });\n submitLoading.value = false;\n if (data.code !== 200) {\n return;\n }\n isShowDrawer.value = false;\n updateOperate();\n } catch (e) {\n console.error(e);\n submitLoading.value = false;\n }\n};\n\n// 重置\nconst onReset = () => {\n clonedCustomBtnList.value = cloneDeep(props.customDefaultPropsList);\n};\n\n/**同步远程设置 */\nconst onSyncRemote = async () => {\n try {\n submitLoading.value = true;\n await customSettingsStore.syncRemoteSetting({\n key_word: props.keyWord,\n type: props.type,\n });\n submitLoading.value = false;\n initOperate();\n } catch (e) {\n console.error(e);\n submitLoading.value = false;\n }\n};\n\nonMounted(() => {\n if (props.disabledRemoteBtn) {\n isInited.value = true;\n } else {\n initOperate();\n }\n});\ndefineExpose({\n isInited,\n});\n</script>\n\n<style lang=\"scss\">\n.custom-operate-drawer {\n .el-drawer__header {\n padding: 10px 15px;\n margin: 0;\n border-bottom: 1px solid #ebeef5;\n }\n .el-drawer__title {\n font-size: 14px;\n color: #333;\n }\n .el-drawer__body {\n padding: 15px;\n }\n .el-drawer__footer {\n padding: 10px 15px;\n border-top: 1px solid #ebeef5;\n }\n .el-checkbox {\n display: flex;\n align-items: center;\n }\n .el-input__inner {\n text-align: center;\n }\n .el-input__suffix {\n position: absolute;\n right: 10px;\n }\n .custom-content {\n li {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 44px;\n }\n }\n .custom-group {\n max-height: calc(100vh - 226px);\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n /*滚动条整体样式*/\n width: 4px;\n /*高宽分别对应横竖滚动条的尺寸*/\n height: 1px;\n }\n\n &::-webkit-scrollbar-thumb {\n /*滚动条里面小方块*/\n border-radius: 10px;\n box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);\n background: #999;\n }\n\n &::-webkit-scrollbar-track {\n /*滚动条里面轨道*/\n box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.1);\n border-radius: 10px;\n background: #eee;\n }\n }\n}\n</style>\n"],"names":["_use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mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { OperateButtonProps } from '../../operateButton';
|
|
2
|
+
export declare const customOperateButtonProps: {
|
|
3
|
+
label: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
prop: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger", unknown, "", boolean>;
|
|
12
|
+
isShow: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: true;
|
|
15
|
+
};
|
|
16
|
+
disabled: BooleanConstructor;
|
|
17
|
+
loading: BooleanConstructor;
|
|
18
|
+
size: {
|
|
19
|
+
type: import("vue").PropType<"" | "default" | "small" | "large">;
|
|
20
|
+
default: "small";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const customOperateProps: {
|
|
24
|
+
keyWord: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
required: true;
|
|
27
|
+
};
|
|
28
|
+
type: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
customDefaultPropsList: {
|
|
33
|
+
type: import("vue").PropType<OperateButtonProps[]>;
|
|
34
|
+
default: () => never[];
|
|
35
|
+
};
|
|
36
|
+
disabledRemoteBtn: {
|
|
37
|
+
type: BooleanConstructor;
|
|
38
|
+
default: boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export interface CustomOperateButtonProps extends OperateButtonProps {
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import '../../operateButton/index.mjs';
|
|
2
|
+
import { operateButtonProps } from '../../operateButton/operateButton.mjs';
|
|
3
|
+
import { operateButtonFormProps } from '../../operateButton/operateButtonForm/operateButtonForm.mjs';
|
|
4
|
+
|
|
5
|
+
const customOperateButtonProps = {
|
|
6
|
+
...operateButtonProps
|
|
7
|
+
};
|
|
8
|
+
const customOperateProps = {
|
|
9
|
+
...operateButtonFormProps
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { customOperateButtonProps, customOperateProps };
|
|
13
|
+
//# sourceMappingURL=customOperate.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customOperate.mjs","sources":["../../../../../../../../packages/components/src/composite/tableCustom/customOperate/customOperate.ts"],"sourcesContent":["import { operateButtonFormProps, operateButtonProps } from '../../operateButton';\nimport type { OperateButtonProps } from '../../operateButton';\n\nexport const customOperateButtonProps = {\n ...operateButtonProps,\n};\n\nexport const customOperateProps = {\n ...operateButtonFormProps,\n};\n\nexport interface CustomOperateButtonProps extends OperateButtonProps {}\n"],"names":[],"mappings":";;;;AAGO,MAAM,wBAA2B,GAAA;AAAA,EACtC,GAAG,kBAAA;AACL,EAAA;AAEO,MAAM,kBAAqB,GAAA;AAAA,EAChC,GAAG,sBAAA;AACL;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import CustomOperate from './CustomOperate.vue';
|
|
2
|
+
export declare const GmCustomOperate: import("../../../../../utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
3
|
+
isShowDrawer: {
|
|
4
|
+
required: true;
|
|
5
|
+
type: import("vue").PropType<boolean>;
|
|
6
|
+
};
|
|
7
|
+
customBtnPropsList: {
|
|
8
|
+
required: true;
|
|
9
|
+
type: import("vue").PropType<import("./customOperate").CustomOperateButtonProps[]>;
|
|
10
|
+
};
|
|
11
|
+
keyWord: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
type: {
|
|
16
|
+
type: StringConstructor;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
customDefaultPropsList: {
|
|
20
|
+
type: import("vue").PropType<import("../../index.js").OperateButtonProps[]>;
|
|
21
|
+
default: () => never[];
|
|
22
|
+
};
|
|
23
|
+
disabledRemoteBtn: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
isInited: import("vue").Ref<boolean>;
|
|
29
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
"update:isShowDrawer": (isShowDrawer: boolean) => void;
|
|
31
|
+
"update:customBtnPropsList": (customBtnPropsList: import("./customOperate").CustomOperateButtonProps[]) => void;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
isShowDrawer: {
|
|
34
|
+
required: true;
|
|
35
|
+
type: import("vue").PropType<boolean>;
|
|
36
|
+
};
|
|
37
|
+
customBtnPropsList: {
|
|
38
|
+
required: true;
|
|
39
|
+
type: import("vue").PropType<import("./customOperate").CustomOperateButtonProps[]>;
|
|
40
|
+
};
|
|
41
|
+
keyWord: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
type: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
customDefaultPropsList: {
|
|
50
|
+
type: import("vue").PropType<import("../../index.js").OperateButtonProps[]>;
|
|
51
|
+
default: () => never[];
|
|
52
|
+
};
|
|
53
|
+
disabledRemoteBtn: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
}>> & {
|
|
58
|
+
"onUpdate:isShowDrawer"?: ((isShowDrawer: boolean) => any) | undefined;
|
|
59
|
+
"onUpdate:customBtnPropsList"?: ((customBtnPropsList: import("./customOperate").CustomOperateButtonProps[]) => any) | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
disabledRemoteBtn: boolean;
|
|
62
|
+
customDefaultPropsList: import("../../index.js").OperateButtonProps[];
|
|
63
|
+
}, {}>> & Record<string, any>;
|
|
64
|
+
export type CustomOperateInstance = InstanceType<typeof CustomOperate>;
|
|
65
|
+
export * from './customOperate';
|
|
66
|
+
export default GmCustomOperate;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '../../../../../utils/index.mjs';
|
|
2
|
+
import './CustomOperate.vue.mjs';
|
|
3
|
+
export { customOperateButtonProps, customOperateProps } from './customOperate.mjs';
|
|
4
|
+
import { withInstall } from '../../../../../utils/src/vue/install.mjs';
|
|
5
|
+
import _sfc_main from './CustomOperate.vue2.mjs';
|
|
6
|
+
|
|
7
|
+
const GmCustomOperate = withInstall(_sfc_main);
|
|
8
|
+
|
|
9
|
+
export { GmCustomOperate, GmCustomOperate as default };
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../../packages/components/src/composite/tableCustom/customOperate/index.ts"],"sourcesContent":["import { withInstall } from '@giime/utils';\nimport CustomOperate from './CustomOperate.vue';\n\nexport const GmCustomOperate = withInstall(CustomOperate);\nexport type CustomOperateInstance = InstanceType<typeof CustomOperate>;\nexport * from './customOperate';\nexport default GmCustomOperate;\n"],"names":["CustomOperate"],"mappings":";;;;;;AAGa,MAAA,eAAA,GAAkB,YAAYA,SAAa;;;;"}
|