@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,89 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
var __export = (target, all) => {
|
|
35
|
+
for (var name in all)
|
|
36
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
37
|
+
};
|
|
38
|
+
var __copyProps = (to, from, except, desc) => {
|
|
39
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
40
|
+
for (let key of __getOwnPropNames(from))
|
|
41
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
42
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
43
|
+
}
|
|
44
|
+
return to;
|
|
45
|
+
};
|
|
46
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
47
|
+
var __async = (__this, __arguments, generator) => {
|
|
48
|
+
return new Promise((resolve, reject) => {
|
|
49
|
+
var fulfilled = (value) => {
|
|
50
|
+
try {
|
|
51
|
+
step(generator.next(value));
|
|
52
|
+
} catch (e) {
|
|
53
|
+
reject(e);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var rejected = (value) => {
|
|
57
|
+
try {
|
|
58
|
+
step(generator.throw(value));
|
|
59
|
+
} catch (e) {
|
|
60
|
+
reject(e);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
64
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
var stdin_exports = {};
|
|
68
|
+
__export(stdin_exports, {
|
|
69
|
+
useFetch: () => useFetch
|
|
70
|
+
});
|
|
71
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
72
|
+
const useFetch = (_0, ..._1) => __async(void 0, [_0, ..._1], function* (url, config = {}) {
|
|
73
|
+
const _a = config, { params } = _a, restConfig = __objRest(_a, ["params"]);
|
|
74
|
+
const queryString = params ? "?" + Object.entries(params).map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`).join("&") : "";
|
|
75
|
+
const finalUrl = url + queryString;
|
|
76
|
+
const userInfo = localStorage.getItem("userInfo");
|
|
77
|
+
const token = userInfo ? JSON.parse(userInfo).token : "";
|
|
78
|
+
const response = yield fetch(finalUrl, __spreadProps(__spreadValues({}, restConfig), {
|
|
79
|
+
headers: __spreadValues({
|
|
80
|
+
"Content-Type": "application/json",
|
|
81
|
+
token: token || ""
|
|
82
|
+
}, restConfig.headers)
|
|
83
|
+
}));
|
|
84
|
+
if (!response.ok) {
|
|
85
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
86
|
+
}
|
|
87
|
+
const data = yield response.json();
|
|
88
|
+
return data;
|
|
89
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import 'vue';
|
|
2
|
+
|
|
3
|
+
type EventHandler = (...args: any[]) => void;
|
|
4
|
+
|
|
5
|
+
declare module 'vue' {
|
|
6
|
+
interface ComponentCustomProps {
|
|
7
|
+
id?: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
tabindex?: number;
|
|
10
|
+
onClick?: EventHandler;
|
|
11
|
+
onTouchend?: EventHandler;
|
|
12
|
+
onTouchmove?: EventHandler;
|
|
13
|
+
onTouchstart?: EventHandler;
|
|
14
|
+
onTouchcancel?: EventHandler;
|
|
15
|
+
onTouchmovePassive?: EventHandler;
|
|
16
|
+
onTouchstartPassive?: EventHandler;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface HTMLAttributes {
|
|
20
|
+
onTouchmovePassive?: EventHandler;
|
|
21
|
+
onTouchstartPassive?: EventHandler;
|
|
22
|
+
onClickCapture?: EventHandler;
|
|
23
|
+
}
|
|
24
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cgboiler/biz-mobile",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"module": "es/index.js",
|
|
7
|
+
"style": "lib/index.css",
|
|
8
|
+
"typings": "lib/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"lib",
|
|
11
|
+
"es"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "cg-cli dev",
|
|
15
|
+
"test": "cg-cli test",
|
|
16
|
+
"lint": "cg-cli lint",
|
|
17
|
+
"build": "cg-cli build",
|
|
18
|
+
"build-npm": "cg-cli build",
|
|
19
|
+
"release": "cg-cli release",
|
|
20
|
+
"test:coverage": "open test/coverage/index.html",
|
|
21
|
+
"build-site": "cg-cli build-site",
|
|
22
|
+
"changelog": "cg-cli changelog",
|
|
23
|
+
"duero-config": "echo 'Do not need duero config'"
|
|
24
|
+
},
|
|
25
|
+
"author": "dongcg",
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public",
|
|
28
|
+
"registry": "https://registry.npmjs.org/"
|
|
29
|
+
},
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": "https://gitlab.cgboiler.com/front/cg-biz",
|
|
32
|
+
"homepage": "https://gitlab.cgboiler.com/front/cg-biz",
|
|
33
|
+
"bugs": "https://gitlab.cgboiler.com/front/cg-biz/-/issues",
|
|
34
|
+
"lint-staged": {
|
|
35
|
+
"*.md": "prettier --write",
|
|
36
|
+
"*.{ts,tsx,js,vue,less,scss}": "prettier --write",
|
|
37
|
+
"*.{ts,tsx,js,vue}": "eslint --fix",
|
|
38
|
+
"*.{vue,css,less,scss}": "stylelint --fix"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"vue": "^3.2.26"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@cgboiler/cli": "workspace:*",
|
|
45
|
+
"@types/node": "^22.9.3",
|
|
46
|
+
"@vue/test-utils": "^2.4.6",
|
|
47
|
+
"prettier": "^2.4.1",
|
|
48
|
+
"typescript": "^5.6.3",
|
|
49
|
+
"vue": "^3.5.13"
|
|
50
|
+
},
|
|
51
|
+
"browserslist": [
|
|
52
|
+
"Chrome >= 51",
|
|
53
|
+
"iOS >= 10"
|
|
54
|
+
],
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"vant": "^4.9.19"
|
|
57
|
+
}
|
|
58
|
+
}
|