增加admin管理帐号和项目的界面--初步实现
This commit is contained in:
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
export * from './use-check';
|
||||
export * from './use-checked-change';
|
||||
export * from './use-computed-data';
|
||||
export * from './use-move';
|
||||
export * from './use-props-alias';
|
||||
Generated
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var useCheck = require('./use-check.js');
|
||||
var useCheckedChange = require('./use-checked-change.js');
|
||||
var useComputedData = require('./use-computed-data.js');
|
||||
var useMove = require('./use-move.js');
|
||||
var usePropsAlias = require('./use-props-alias.js');
|
||||
|
||||
|
||||
|
||||
exports.useCheck = useCheck.useCheck;
|
||||
exports.useCheckedChange = useCheckedChange.useCheckedChange;
|
||||
exports.useComputedData = useComputedData.useComputedData;
|
||||
exports.useMove = useMove.useMove;
|
||||
exports.usePropsAlias = usePropsAlias.usePropsAlias;
|
||||
//# sourceMappingURL=index.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
||||
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
import type { SetupContext } from 'vue';
|
||||
import type { CheckboxValueType } from 'element-plus/es/components/checkbox';
|
||||
import type { TransferPanelEmits, TransferPanelProps, TransferPanelState } from '../transfer-panel';
|
||||
export declare const useCheck: (props: TransferPanelProps, panelState: TransferPanelState, emit: SetupContext<TransferPanelEmits>["emit"]) => {
|
||||
filteredData: import("vue").ComputedRef<import("../transfer").TransferDataItem[]>;
|
||||
checkableData: import("vue").ComputedRef<import("../transfer").TransferDataItem[]>;
|
||||
checkedSummary: import("vue").ComputedRef<string>;
|
||||
isIndeterminate: import("vue").ComputedRef<boolean>;
|
||||
updateAllChecked: () => void;
|
||||
handleAllCheckedChange: (value: CheckboxValueType) => void;
|
||||
};
|
||||
Generated
Vendored
+94
@@ -0,0 +1,94 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var vue = require('vue');
|
||||
var transferPanel = require('../transfer-panel.js');
|
||||
var usePropsAlias = require('./use-props-alias.js');
|
||||
var shared = require('@vue/shared');
|
||||
|
||||
const useCheck = (props, panelState, emit) => {
|
||||
const propsAlias = usePropsAlias.usePropsAlias(props);
|
||||
const filteredData = vue.computed(() => {
|
||||
return props.data.filter((item) => {
|
||||
if (shared.isFunction(props.filterMethod)) {
|
||||
return props.filterMethod(panelState.query, item);
|
||||
} else {
|
||||
const label = String(item[propsAlias.value.label] || item[propsAlias.value.key]);
|
||||
return label.toLowerCase().includes(panelState.query.toLowerCase());
|
||||
}
|
||||
});
|
||||
});
|
||||
const checkableData = vue.computed(() => filteredData.value.filter((item) => !item[propsAlias.value.disabled]));
|
||||
const checkedSummary = vue.computed(() => {
|
||||
const checkedLength = panelState.checked.length;
|
||||
const dataLength = props.data.length;
|
||||
const { noChecked, hasChecked } = props.format;
|
||||
if (noChecked && hasChecked) {
|
||||
return checkedLength > 0 ? hasChecked.replace(/\${checked}/g, checkedLength.toString()).replace(/\${total}/g, dataLength.toString()) : noChecked.replace(/\${total}/g, dataLength.toString());
|
||||
} else {
|
||||
return `${checkedLength}/${dataLength}`;
|
||||
}
|
||||
});
|
||||
const isIndeterminate = vue.computed(() => {
|
||||
const checkedLength = panelState.checked.length;
|
||||
return checkedLength > 0 && checkedLength < checkableData.value.length;
|
||||
});
|
||||
const updateAllChecked = () => {
|
||||
const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
|
||||
panelState.allChecked = checkableDataKeys.length > 0 && checkableDataKeys.every((item) => panelState.checked.includes(item));
|
||||
};
|
||||
const handleAllCheckedChange = (value) => {
|
||||
panelState.checked = value ? checkableData.value.map((item) => item[propsAlias.value.key]) : [];
|
||||
};
|
||||
vue.watch(() => panelState.checked, (val, oldVal) => {
|
||||
updateAllChecked();
|
||||
if (panelState.checkChangeByUser) {
|
||||
const movedKeys = val.concat(oldVal).filter((v) => !val.includes(v) || !oldVal.includes(v));
|
||||
emit(transferPanel.CHECKED_CHANGE_EVENT, val, movedKeys);
|
||||
} else {
|
||||
emit(transferPanel.CHECKED_CHANGE_EVENT, val);
|
||||
panelState.checkChangeByUser = true;
|
||||
}
|
||||
});
|
||||
vue.watch(checkableData, () => {
|
||||
updateAllChecked();
|
||||
});
|
||||
vue.watch(() => props.data, () => {
|
||||
const checked = [];
|
||||
const filteredDataKeys = filteredData.value.map((item) => item[propsAlias.value.key]);
|
||||
panelState.checked.forEach((item) => {
|
||||
if (filteredDataKeys.includes(item)) {
|
||||
checked.push(item);
|
||||
}
|
||||
});
|
||||
panelState.checkChangeByUser = false;
|
||||
panelState.checked = checked;
|
||||
});
|
||||
vue.watch(() => props.defaultChecked, (val, oldVal) => {
|
||||
if (oldVal && val.length === oldVal.length && val.every((item) => oldVal.includes(item)))
|
||||
return;
|
||||
const checked = [];
|
||||
const checkableDataKeys = checkableData.value.map((item) => item[propsAlias.value.key]);
|
||||
val.forEach((item) => {
|
||||
if (checkableDataKeys.includes(item)) {
|
||||
checked.push(item);
|
||||
}
|
||||
});
|
||||
panelState.checkChangeByUser = false;
|
||||
panelState.checked = checked;
|
||||
}, {
|
||||
immediate: true
|
||||
});
|
||||
return {
|
||||
filteredData,
|
||||
checkableData,
|
||||
checkedSummary,
|
||||
isIndeterminate,
|
||||
updateAllChecked,
|
||||
handleAllCheckedChange
|
||||
};
|
||||
};
|
||||
|
||||
exports.useCheck = useCheck;
|
||||
//# sourceMappingURL=use-check.js.map
|
||||
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { SetupContext } from 'vue';
|
||||
import type { TransferCheckedState, TransferEmits, TransferKey } from '../transfer';
|
||||
export declare const useCheckedChange: (checkedState: TransferCheckedState, emit: SetupContext<TransferEmits>["emit"]) => {
|
||||
onSourceCheckedChange: (val: TransferKey[], movedKeys?: TransferKey[]) => void;
|
||||
onTargetCheckedChange: (val: TransferKey[], movedKeys?: TransferKey[]) => void;
|
||||
};
|
||||
Generated
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var transfer = require('../transfer.js');
|
||||
|
||||
const useCheckedChange = (checkedState, emit) => {
|
||||
const onSourceCheckedChange = (val, movedKeys) => {
|
||||
checkedState.leftChecked = val;
|
||||
if (!movedKeys)
|
||||
return;
|
||||
emit(transfer.LEFT_CHECK_CHANGE_EVENT, val, movedKeys);
|
||||
};
|
||||
const onTargetCheckedChange = (val, movedKeys) => {
|
||||
checkedState.rightChecked = val;
|
||||
if (!movedKeys)
|
||||
return;
|
||||
emit(transfer.RIGHT_CHECK_CHANGE_EVENT, val, movedKeys);
|
||||
};
|
||||
return {
|
||||
onSourceCheckedChange,
|
||||
onTargetCheckedChange
|
||||
};
|
||||
};
|
||||
|
||||
exports.useCheckedChange = useCheckedChange;
|
||||
//# sourceMappingURL=use-checked-change.js.map
|
||||
frontend/node_modules/element-plus/lib/components/transfer/src/composables/use-checked-change.js.map
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"use-checked-change.js","sources":["../../../../../../../packages/components/transfer/src/composables/use-checked-change.ts"],"sourcesContent":["import { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT } from '../transfer'\n\nimport type { SetupContext } from 'vue'\nimport type {\n TransferCheckedState,\n TransferEmits,\n TransferKey,\n} from '../transfer'\n\nexport const useCheckedChange = (\n checkedState: TransferCheckedState,\n emit: SetupContext<TransferEmits>['emit']\n) => {\n const onSourceCheckedChange = (\n val: TransferKey[],\n movedKeys?: TransferKey[]\n ) => {\n checkedState.leftChecked = val\n if (!movedKeys) return\n emit(LEFT_CHECK_CHANGE_EVENT, val, movedKeys)\n }\n\n const onTargetCheckedChange = (\n val: TransferKey[],\n movedKeys?: TransferKey[]\n ) => {\n checkedState.rightChecked = val\n if (!movedKeys) return\n emit(RIGHT_CHECK_CHANGE_EVENT, val, movedKeys)\n }\n\n return {\n onSourceCheckedChange,\n onTargetCheckedChange,\n }\n}\n"],"names":["LEFT_CHECK_CHANGE_EVENT","RIGHT_CHECK_CHANGE_EVENT"],"mappings":";;;;;;AACY,MAAC,gBAAgB,GAAG,CAAC,YAAY,EAAE,IAAI,KAAK;AACxD,EAAE,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,SAAS,KAAK;AACpD,IAAI,YAAY,CAAC,WAAW,GAAG,GAAG,CAAC;AACnC,IAAI,IAAI,CAAC,SAAS;AAClB,MAAM,OAAO;AACb,IAAI,IAAI,CAACA,gCAAuB,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;AAClD,GAAG,CAAC;AACJ,EAAE,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,SAAS,KAAK;AACpD,IAAI,YAAY,CAAC,YAAY,GAAG,GAAG,CAAC;AACpC,IAAI,IAAI,CAAC,SAAS;AAClB,MAAM,OAAO;AACb,IAAI,IAAI,CAACC,iCAAwB,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;AACnD,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,qBAAqB;AACzB,IAAI,qBAAqB;AACzB,GAAG,CAAC;AACJ;;;;"}
|
||||
Generated
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import type { TransferDataItem, TransferProps } from '../transfer';
|
||||
export declare const useComputedData: (props: TransferProps) => {
|
||||
sourceData: import("vue").ComputedRef<TransferDataItem[]>;
|
||||
targetData: import("vue").ComputedRef<TransferDataItem[]>;
|
||||
};
|
||||
Generated
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var vue = require('vue');
|
||||
var usePropsAlias = require('./use-props-alias.js');
|
||||
|
||||
const useComputedData = (props) => {
|
||||
const propsAlias = usePropsAlias.usePropsAlias(props);
|
||||
const dataObj = vue.computed(() => props.data.reduce((o, cur) => (o[cur[propsAlias.value.key]] = cur) && o, {}));
|
||||
const sourceData = vue.computed(() => props.data.filter((item) => !props.modelValue.includes(item[propsAlias.value.key])));
|
||||
const targetData = vue.computed(() => {
|
||||
if (props.targetOrder === "original") {
|
||||
return props.data.filter((item) => props.modelValue.includes(item[propsAlias.value.key]));
|
||||
} else {
|
||||
return props.modelValue.reduce((arr, cur) => {
|
||||
const val = dataObj.value[cur];
|
||||
if (val) {
|
||||
arr.push(val);
|
||||
}
|
||||
return arr;
|
||||
}, []);
|
||||
}
|
||||
});
|
||||
return {
|
||||
sourceData,
|
||||
targetData
|
||||
};
|
||||
};
|
||||
|
||||
exports.useComputedData = useComputedData;
|
||||
//# sourceMappingURL=use-computed-data.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"use-computed-data.js","sources":["../../../../../../../packages/components/transfer/src/composables/use-computed-data.ts"],"sourcesContent":["import { computed } from 'vue'\nimport { usePropsAlias } from './use-props-alias'\n\nimport type { TransferDataItem, TransferKey, TransferProps } from '../transfer'\n\nexport const useComputedData = (props: TransferProps) => {\n const propsAlias = usePropsAlias(props)\n\n const dataObj = computed(() =>\n props.data.reduce((o, cur) => (o[cur[propsAlias.value.key]] = cur) && o, {})\n )\n\n const sourceData = computed(() =>\n props.data.filter(\n (item) => !props.modelValue.includes(item[propsAlias.value.key])\n )\n )\n\n const targetData = computed(() => {\n if (props.targetOrder === 'original') {\n return props.data.filter((item) =>\n props.modelValue.includes(item[propsAlias.value.key])\n )\n } else {\n return props.modelValue.reduce(\n (arr: TransferDataItem[], cur: TransferKey) => {\n const val = dataObj.value[cur]\n if (val) {\n arr.push(val)\n }\n return arr\n },\n []\n )\n }\n })\n\n return {\n sourceData,\n targetData,\n }\n}\n"],"names":["usePropsAlias","computed"],"mappings":";;;;;;;AAEY,MAAC,eAAe,GAAG,CAA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ACd,IAAI,UAAU;AACd,GAAG,CAAC;AACJ;;;;"}
|
||||
Generated
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
import type { SetupContext } from 'vue';
|
||||
import type { TransferCheckedState, TransferEmits, TransferProps } from '../transfer';
|
||||
export declare const useMove: (props: TransferProps, checkedState: TransferCheckedState, emit: SetupContext<TransferEmits>["emit"]) => {
|
||||
addToLeft: () => void;
|
||||
addToRight: () => void;
|
||||
};
|
||||
Generated
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var usePropsAlias = require('./use-props-alias.js');
|
||||
var event = require('../../../../constants/event.js');
|
||||
|
||||
const useMove = (props, checkedState, emit) => {
|
||||
const propsAlias = usePropsAlias.usePropsAlias(props);
|
||||
const _emit = (value, direction, movedKeys) => {
|
||||
emit(event.UPDATE_MODEL_EVENT, value);
|
||||
emit(event.CHANGE_EVENT, value, direction, movedKeys);
|
||||
};
|
||||
const addToLeft = () => {
|
||||
const currentValue = props.modelValue.slice();
|
||||
checkedState.rightChecked.forEach((item) => {
|
||||
const index = currentValue.indexOf(item);
|
||||
if (index > -1) {
|
||||
currentValue.splice(index, 1);
|
||||
}
|
||||
});
|
||||
_emit(currentValue, "left", checkedState.rightChecked);
|
||||
};
|
||||
const addToRight = () => {
|
||||
let currentValue = props.modelValue.slice();
|
||||
const itemsToBeMoved = props.data.filter((item) => {
|
||||
const itemKey = item[propsAlias.value.key];
|
||||
return checkedState.leftChecked.includes(itemKey) && !props.modelValue.includes(itemKey);
|
||||
}).map((item) => item[propsAlias.value.key]);
|
||||
currentValue = props.targetOrder === "unshift" ? itemsToBeMoved.concat(currentValue) : currentValue.concat(itemsToBeMoved);
|
||||
if (props.targetOrder === "original") {
|
||||
currentValue = props.data.filter((item) => currentValue.includes(item[propsAlias.value.key])).map((item) => item[propsAlias.value.key]);
|
||||
}
|
||||
_emit(currentValue, "right", checkedState.leftChecked);
|
||||
};
|
||||
return {
|
||||
addToLeft,
|
||||
addToRight
|
||||
};
|
||||
};
|
||||
|
||||
exports.useMove = useMove;
|
||||
//# sourceMappingURL=use-move.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"use-move.js","sources":["../../../../../../../packages/components/transfer/src/composables/use-move.ts"],"sourcesContent":["import { CHANGE_EVENT, UPDATE_MODEL_EVENT } from '@element-plus/constants'\nimport { usePropsAlias } from './use-props-alias'\n\nimport type { SetupContext } from 'vue'\nimport type {\n TransferCheckedState,\n TransferDataItem,\n TransferDirection,\n TransferEmits,\n TransferKey,\n TransferProps,\n} from '../transfer'\n\nexport const useMove = (\n props: TransferProps,\n checkedState: TransferCheckedState,\n emit: SetupContext<TransferEmits>['emit']\n) => {\n const propsAlias = usePropsAlias(props)\n\n const _emit = (\n value: TransferKey[],\n direction: TransferDirection,\n movedKeys: TransferKey[]\n ) => {\n emit(UPDATE_MODEL_EVENT, value)\n emit(CHANGE_EVENT, value, direction, movedKeys)\n }\n\n const addToLeft = () => {\n const currentValue = props.modelValue.slice()\n\n checkedState.rightChecked.forEach((item) => {\n const index = currentValue.indexOf(item)\n if (index > -1) {\n currentValue.splice(index, 1)\n }\n })\n _emit(currentValue, 'left', checkedState.rightChecked)\n }\n\n const addToRight = () => {\n let currentValue = props.modelValue.slice()\n\n const itemsToBeMoved = props.data\n .filter((item: TransferDataItem) => {\n const itemKey = item[propsAlias.value.key]\n return (\n checkedState.leftChecked.includes(itemKey) &&\n !props.modelValue.includes(itemKey)\n )\n })\n .map((item) => item[propsAlias.value.key])\n\n currentValue =\n props.targetOrder === 'unshift'\n ? itemsToBeMoved.concat(currentValue)\n : currentValue.concat(itemsToBeMoved)\n\n if (props.targetOrder === 'original') {\n currentValue = props.data\n .filter((item) => currentValue.includes(item[propsAlias.value.key]))\n .map((item) => item[propsAlias.value.key])\n }\n\n _emit(currentValue, 'right', checkedState.leftChecked)\n }\n\n return {\n addToLeft,\n addToRight,\n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WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/F,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AACjD,IAAI,YAAY,GAAG,KAAK,CAAC,WAAW,KAAK,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AAC/H,IAAI,IAAI,KAAK,CAAC,WAAW,KAAK,UAAU,EAAE;AAC1C,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAC9I,KAAK;AACL,IAAI,KAAK,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;AAC3D,GAAG,CAAC;AACJ,EAAE,OAAO;AACT,IAAI,SAAS;AACb,IAAI,UAAU;AACd,GAAG,CAAC;AACJ;;;;"}
|
||||
Generated
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import type { TransferPropsAlias } from '../transfer';
|
||||
export declare const usePropsAlias: (props: {
|
||||
props: TransferPropsAlias;
|
||||
}) => import("vue").ComputedRef<{
|
||||
label: string;
|
||||
key: string;
|
||||
disabled: string;
|
||||
}>;
|
||||
Generated
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var vue = require('vue');
|
||||
|
||||
const usePropsAlias = (props) => {
|
||||
const initProps = {
|
||||
label: "label",
|
||||
key: "key",
|
||||
disabled: "disabled"
|
||||
};
|
||||
return vue.computed(() => ({
|
||||
...initProps,
|
||||
...props.props
|
||||
}));
|
||||
};
|
||||
|
||||
exports.usePropsAlias = usePropsAlias;
|
||||
//# sourceMappingURL=use-props-alias.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"use-props-alias.js","sources":["../../../../../../../packages/components/transfer/src/composables/use-props-alias.ts"],"sourcesContent":["import { computed } from 'vue'\n\nimport type { TransferPropsAlias } from '../transfer'\n\nexport const usePropsAlias = (props: { props: TransferPropsAlias }) => {\n const initProps: Required<TransferPropsAlias> = {\n label: 'label',\n key: 'key',\n disabled: 'disabled',\n }\n\n return computed(() => ({\n ...initProps,\n ...props.props,\n }))\n}\n"],"names":["computed"],"mappings":";;;;;;AACY,MAAC,aAAa,GAAG,CAAC,KAAK,KAAK;AACxC,EAAE,MAAM,SAAS,GAAG;AACpB,IAAI,KAAK,EAAE,OAAO;AAClB,IAAI,GAAG,EAAE,KAAK;AACd,IAAI,QAAQ,EAAE,UAAU;AACxB,GAAG,CAAC;AACJ,EAAE,OAAOA,YAAQ,CAAC,OAAO;AACzB,IAAI,GAAG,SAAS;AAChB,IAAI,GAAG,KAAK,CAAC,KAAK;AAClB,GAAG,CAAC,CAAC,CAAC;AACN;;;;"}
|
||||
Reference in New Issue
Block a user