基于vue3.0和element-plus的组件库
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { delate } from '../http/axios';
|
|
|
|
import { queryPage, save, update } from './base';
|
|
|
|
const root = 'dict';
|
|
|
|
|
|
|
|
export const list = (example) => {
|
|
|
|
return queryPage(root, example);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const add = (dictionary) => {
|
|
|
|
return save(root, dictionary);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const set = (dictionary) => {
|
|
|
|
return update(root, dictionary);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const del = (dictionary) => {
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
delate(root, dictionary).then(
|
|
|
|
(rsp: any) => {
|
|
|
|
if (rsp) {
|
|
|
|
resolve(rsp);
|
|
|
|
} else {
|
|
|
|
resolve(false);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
(err) => {
|
|
|
|
resolve(false);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
});
|
|
|
|
};
|