@cgboiler/biz-mobile 0.1.0
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/README.md +0 -0
- package/es/button/Button.d.ts +9 -0
- package/es/button/Button.js +31 -0
- package/es/button/_atomic.css +35 -0
- package/es/button/index.css +1 -0
- package/es/button/index.d.ts +3 -0
- package/es/button/index.js +5 -0
- package/es/button/index.less +3 -0
- package/es/button/style/index.d.ts +1 -0
- package/es/button/style/index.js +1 -0
- package/es/button/style/less.d.ts +1 -0
- package/es/button/style/less.js +1 -0
- package/es/button/types.d.ts +5 -0
- package/es/button/types.js +6 -0
- package/es/index.d.ts +10 -0
- package/es/index.js +29 -0
- package/es/project-list/ProjectList.d.ts +40 -0
- package/es/project-list/ProjectList.js +69 -0
- package/es/project-list/_atomic.css +32 -0
- package/es/project-list/index.css +1 -0
- package/es/project-list/index.d.ts +3 -0
- package/es/project-list/index.js +5 -0
- package/es/project-list/index.less +35 -0
- package/es/project-list/style/index.d.ts +1 -0
- package/es/project-list/style/index.js +1 -0
- package/es/project-list/style/less.d.ts +1 -0
- package/es/project-list/style/less.js +1 -0
- package/es/project-list/types.d.ts +22 -0
- package/es/project-list/types.js +19 -0
- package/es/project-list/useApi.d.ts +11 -0
- package/es/project-list/useApi.js +48 -0
- package/es/utils/useFetch.d.ts +5 -0
- package/es/utils/useFetch.js +72 -0
- package/es/vue-sfc-shim.d.ts +6 -0
- package/es/vue-tsx-shim.d.ts +24 -0
- package/lib/button/Button.d.ts +9 -0
- package/lib/button/Button.js +50 -0
- package/lib/button/_atomic.css +35 -0
- package/lib/button/index.css +1 -0
- package/lib/button/index.d.ts +3 -0
- package/lib/button/index.js +34 -0
- package/lib/button/index.less +3 -0
- package/lib/button/style/index.d.ts +1 -0
- package/lib/button/style/index.js +1 -0
- package/lib/button/style/less.d.ts +1 -0
- package/lib/button/style/less.js +1 -0
- package/lib/button/types.d.ts +5 -0
- package/lib/button/types.js +25 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.js +49 -0
- package/lib/project-list/ProjectList.d.ts +40 -0
- package/lib/project-list/ProjectList.js +88 -0
- package/lib/project-list/_atomic.css +32 -0
- package/lib/project-list/index.css +1 -0
- package/lib/project-list/index.d.ts +3 -0
- package/lib/project-list/index.js +34 -0
- package/lib/project-list/index.less +35 -0
- package/lib/project-list/style/index.d.ts +1 -0
- package/lib/project-list/style/index.js +1 -0
- package/lib/project-list/style/less.d.ts +1 -0
- package/lib/project-list/style/less.js +1 -0
- package/lib/project-list/types.d.ts +22 -0
- package/lib/project-list/types.js +38 -0
- package/lib/project-list/useApi.d.ts +11 -0
- package/lib/project-list/useApi.js +67 -0
- package/lib/utils/useFetch.d.ts +5 -0
- package/lib/utils/useFetch.js +89 -0
- package/lib/vue-sfc-shim.d.ts +6 -0
- package/lib/vue-tsx-shim.d.ts +24 -0
- package/package.json +58 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
.cgx-atm .flex {
|
|
3
|
+
align-items: initial;
|
|
4
|
+
flex-direction: initial;
|
|
5
|
+
justify-content: initial;
|
|
6
|
+
flex-wrap: initial;
|
|
7
|
+
}
|
|
8
|
+
.cgx-atm .flex-row {
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
}
|
|
11
|
+
.cgx-atm .flex-col {
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
.cgx-atm .justify-center {
|
|
15
|
+
justify-content: center;
|
|
16
|
+
}
|
|
17
|
+
.cgx-atm .justify-between {
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
}
|
|
20
|
+
.cgx-atm .justify-around {
|
|
21
|
+
justify-content: space-around;
|
|
22
|
+
}
|
|
23
|
+
.cgx-atm .justify-end {
|
|
24
|
+
justify-content: flex-end;
|
|
25
|
+
}
|
|
26
|
+
.cgx-atm .items-center {
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
.cgx-atm .flex-wrap {
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* layer: default */
|
|
34
|
+
.cgx-atm .w-\[120px\]{width:120px;}
|
|
35
|
+
.cgx-atm .p-2{padding:0.5rem;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.a-b{color:#abcdef}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
default: () => stdin_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
33
|
+
var import_Button = __toESM(require("./Button"));
|
|
34
|
+
var stdin_default = import_Button.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("../index.css");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("../index.less");
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
buttonProps: () => buttonProps
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
const buttonProps = {
|
|
24
|
+
type: String
|
|
25
|
+
};
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./button";
|
|
2
|
+
export * from "./project-list";
|
|
3
|
+
declare namespace _default {
|
|
4
|
+
export { install };
|
|
5
|
+
export { version };
|
|
6
|
+
}
|
|
7
|
+
export default _default;
|
|
8
|
+
export function install(app: any): void;
|
|
9
|
+
export const version: "0.0.1";
|
|
10
|
+
export { Button, ProjectList };
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var stdin_exports = {};
|
|
20
|
+
__export(stdin_exports, {
|
|
21
|
+
Button: () => import_button.Button,
|
|
22
|
+
ProjectList: () => import_project_list.ProjectList,
|
|
23
|
+
default: () => stdin_default,
|
|
24
|
+
install: () => install,
|
|
25
|
+
version: () => version
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
28
|
+
var import_button = require("./button");
|
|
29
|
+
var import_project_list = require("./project-list");
|
|
30
|
+
__reExport(stdin_exports, require("./button"), module.exports);
|
|
31
|
+
__reExport(stdin_exports, require("./project-list"), module.exports);
|
|
32
|
+
const version = "0.0.1";
|
|
33
|
+
function install(app) {
|
|
34
|
+
const components = [
|
|
35
|
+
import_button.Button,
|
|
36
|
+
import_project_list.ProjectList
|
|
37
|
+
];
|
|
38
|
+
components.forEach((item) => {
|
|
39
|
+
if (item.install) {
|
|
40
|
+
app.use(item);
|
|
41
|
+
} else if (item.name) {
|
|
42
|
+
app.component(item.name, item);
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
var stdin_default = {
|
|
47
|
+
install,
|
|
48
|
+
version
|
|
49
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ProjectItem } from './types';
|
|
2
|
+
import './index.less';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
modelValue: {
|
|
5
|
+
type: () => ProjectItem | null;
|
|
6
|
+
default: () => null;
|
|
7
|
+
};
|
|
8
|
+
show: {
|
|
9
|
+
type: BooleanConstructor;
|
|
10
|
+
default: boolean;
|
|
11
|
+
};
|
|
12
|
+
'onUpdate:modelValue': {
|
|
13
|
+
type: import("vue").PropType<(val: ProjectItem | null) => void>;
|
|
14
|
+
};
|
|
15
|
+
'onUpdate:show': {
|
|
16
|
+
type: import("vue").PropType<(val: boolean) => void>;
|
|
17
|
+
};
|
|
18
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:show" | "update:modelValue")[], "update:show" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
modelValue: {
|
|
20
|
+
type: () => ProjectItem | null;
|
|
21
|
+
default: () => null;
|
|
22
|
+
};
|
|
23
|
+
show: {
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
default: boolean;
|
|
26
|
+
};
|
|
27
|
+
'onUpdate:modelValue': {
|
|
28
|
+
type: import("vue").PropType<(val: ProjectItem | null) => void>;
|
|
29
|
+
};
|
|
30
|
+
'onUpdate:show': {
|
|
31
|
+
type: import("vue").PropType<(val: boolean) => void>;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{
|
|
34
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
35
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
36
|
+
}>, {
|
|
37
|
+
modelValue: ProjectItem | null;
|
|
38
|
+
show: boolean;
|
|
39
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
40
|
+
export default _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
default: () => stdin_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
var import_vue = require("vue");
|
|
24
|
+
var import_atomic = require("./_atomic.css");
|
|
25
|
+
var import_vue2 = require("vue");
|
|
26
|
+
var import_vant = require("vant");
|
|
27
|
+
var import_types = require("./types");
|
|
28
|
+
var import_useApi = require("./useApi");
|
|
29
|
+
var import_index = require("./index.css");
|
|
30
|
+
var stdin_default = (0, import_vue2.defineComponent)({
|
|
31
|
+
name: "ProjectList",
|
|
32
|
+
props: import_types.projectListProps,
|
|
33
|
+
emits: ["update:show", "update:modelValue"],
|
|
34
|
+
setup(props, {
|
|
35
|
+
emit
|
|
36
|
+
}) {
|
|
37
|
+
const {
|
|
38
|
+
projectList,
|
|
39
|
+
getProjectList
|
|
40
|
+
} = (0, import_useApi.useApi)();
|
|
41
|
+
getProjectList();
|
|
42
|
+
const handleSelect = (item) => {
|
|
43
|
+
emit("update:modelValue", item);
|
|
44
|
+
emit("update:show", false);
|
|
45
|
+
};
|
|
46
|
+
const keyword = (0, import_vue2.ref)("");
|
|
47
|
+
const loading = (0, import_vue2.ref)(false);
|
|
48
|
+
const finished = (0, import_vue2.ref)(true);
|
|
49
|
+
const filteredProjectList = (0, import_vue2.computed)(() => {
|
|
50
|
+
return projectList.value.filter((item) => {
|
|
51
|
+
return item.name.toLowerCase().includes(keyword.value.toLowerCase());
|
|
52
|
+
}).slice(0, 150);
|
|
53
|
+
});
|
|
54
|
+
const onLoad = () => {
|
|
55
|
+
finished.value = true;
|
|
56
|
+
};
|
|
57
|
+
return () => (0, import_vue.createVNode)(import_vant.ActionSheet, {
|
|
58
|
+
"show": props.show,
|
|
59
|
+
"onUpdate:show": (val) => emit("update:show", val),
|
|
60
|
+
"title": "\u9009\u62E9\u9879\u76EE"
|
|
61
|
+
}, {
|
|
62
|
+
default: () => [(0, import_vue.createVNode)("div", {
|
|
63
|
+
"class": "project-list"
|
|
64
|
+
}, [(0, import_vue.createVNode)(import_vant.Search, {
|
|
65
|
+
"modelValue": keyword.value,
|
|
66
|
+
"onUpdate:modelValue": ($event) => keyword.value = $event,
|
|
67
|
+
"placeholder": "\u641C\u7D22\u9879\u76EE",
|
|
68
|
+
"class": "search-bar"
|
|
69
|
+
}, null), (0, import_vue.createVNode)(import_vant.List, {
|
|
70
|
+
"loading": loading.value,
|
|
71
|
+
"finished": finished.value,
|
|
72
|
+
"finished-text": "\u6CA1\u6709\u66F4\u591A\u4E86",
|
|
73
|
+
"onLoad": onLoad
|
|
74
|
+
}, {
|
|
75
|
+
default: () => [filteredProjectList.value.map((item, index) => {
|
|
76
|
+
var _a;
|
|
77
|
+
return (0, import_vue.createVNode)("div", {
|
|
78
|
+
"key": index,
|
|
79
|
+
"class": `project-item ${((_a = props.modelValue) == null ? void 0 : _a.id) === item.id ? "selected" : ""}`,
|
|
80
|
+
"onClick": () => handleSelect(item)
|
|
81
|
+
}, [(0, import_vue.createVNode)("div", {
|
|
82
|
+
"class": "project-name"
|
|
83
|
+
}, [item.name])]);
|
|
84
|
+
})]
|
|
85
|
+
})])]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
|
|
2
|
+
.cgx-atm .flex {
|
|
3
|
+
align-items: initial;
|
|
4
|
+
flex-direction: initial;
|
|
5
|
+
justify-content: initial;
|
|
6
|
+
flex-wrap: initial;
|
|
7
|
+
}
|
|
8
|
+
.cgx-atm .flex-row {
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
}
|
|
11
|
+
.cgx-atm .flex-col {
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
.cgx-atm .justify-center {
|
|
15
|
+
justify-content: center;
|
|
16
|
+
}
|
|
17
|
+
.cgx-atm .justify-between {
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
}
|
|
20
|
+
.cgx-atm .justify-around {
|
|
21
|
+
justify-content: space-around;
|
|
22
|
+
}
|
|
23
|
+
.cgx-atm .justify-end {
|
|
24
|
+
justify-content: flex-end;
|
|
25
|
+
}
|
|
26
|
+
.cgx-atm .items-center {
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
.cgx-atm .flex-wrap {
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
}
|
|
32
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.project-list{height:70vh;display:flex;flex-direction:column}.project-list .search-bar{position:-webkit-sticky;position:-webkit-sticky;position:sticky;top:0;z-index:1}.project-list .van-list{flex:1;overflow-y:auto;padding:0 16px}.project-list .project-item{padding:12px 0;border-bottom:1px solid #eee;cursor:pointer}.project-list .project-item.selected{color:var(--van-primary-color)}.project-list .project-item .project-name{font-size:14px}.project-list .project-item:last-child{border-bottom:none}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
default: () => stdin_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
33
|
+
var import_ProjectList = __toESM(require("./ProjectList"));
|
|
34
|
+
var stdin_default = import_ProjectList.default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.project-list {
|
|
2
|
+
height: 70vh;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
|
|
6
|
+
.search-bar {
|
|
7
|
+
position: sticky;
|
|
8
|
+
top: 0;
|
|
9
|
+
z-index: 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.van-list {
|
|
13
|
+
flex: 1;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
padding: 0 16px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.project-item {
|
|
19
|
+
padding: 12px 0;
|
|
20
|
+
border-bottom: 1px solid #eee;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
|
|
23
|
+
&.selected {
|
|
24
|
+
color: var(--van-primary-color);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.project-name {
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:last-child {
|
|
32
|
+
border-bottom: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("../index.css");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("../index.less");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export interface ProjectItem {
|
|
3
|
+
id: string | number;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const projectListProps: {
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: () => ProjectItem | null;
|
|
9
|
+
default: () => null;
|
|
10
|
+
};
|
|
11
|
+
show: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
'onUpdate:modelValue': {
|
|
16
|
+
type: PropType<(val: ProjectItem | null) => void>;
|
|
17
|
+
};
|
|
18
|
+
'onUpdate:show': {
|
|
19
|
+
type: PropType<(val: boolean) => void>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type ProjectListProps = ExtractPropTypes<typeof projectListProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var stdin_exports = {};
|
|
19
|
+
__export(stdin_exports, {
|
|
20
|
+
projectListProps: () => projectListProps
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
+
const projectListProps = {
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: () => null
|
|
27
|
+
},
|
|
28
|
+
show: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
"onUpdate:modelValue": {
|
|
33
|
+
type: Function
|
|
34
|
+
},
|
|
35
|
+
"onUpdate:show": {
|
|
36
|
+
type: Function
|
|
37
|
+
}
|
|
38
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ProjectItem } from './types';
|
|
2
|
+
export declare const useApi: () => {
|
|
3
|
+
projectList: import("vue").Ref<{
|
|
4
|
+
id: string | number;
|
|
5
|
+
name: string;
|
|
6
|
+
}[], ProjectItem[] | {
|
|
7
|
+
id: string | number;
|
|
8
|
+
name: string;
|
|
9
|
+
}[]>;
|
|
10
|
+
getProjectList: () => Promise<void>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var __async = (__this, __arguments, generator) => {
|
|
19
|
+
return new Promise((resolve, reject) => {
|
|
20
|
+
var fulfilled = (value) => {
|
|
21
|
+
try {
|
|
22
|
+
step(generator.next(value));
|
|
23
|
+
} catch (e) {
|
|
24
|
+
reject(e);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var rejected = (value) => {
|
|
28
|
+
try {
|
|
29
|
+
step(generator.throw(value));
|
|
30
|
+
} catch (e) {
|
|
31
|
+
reject(e);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
35
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
var stdin_exports = {};
|
|
39
|
+
__export(stdin_exports, {
|
|
40
|
+
useApi: () => useApi
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
43
|
+
var import_vue = require("vue");
|
|
44
|
+
var import_useFetch = require("../utils/useFetch");
|
|
45
|
+
const useApi = () => {
|
|
46
|
+
const projectList = (0, import_vue.ref)([]);
|
|
47
|
+
const getProjectList = () => __async(void 0, null, function* () {
|
|
48
|
+
const res = yield (0, import_useFetch.useFetch)(
|
|
49
|
+
"https://vx.cgboiler.com/v1/note/projects",
|
|
50
|
+
{
|
|
51
|
+
method: "GET"
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
if (res == null ? void 0 : res.d) {
|
|
55
|
+
projectList.value = res.d.filter((item) => item.projectName).map((item) => {
|
|
56
|
+
return {
|
|
57
|
+
id: item.id,
|
|
58
|
+
name: item.projectName
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
projectList,
|
|
65
|
+
getProjectList
|
|
66
|
+
};
|
|
67
|
+
};
|