@vtj/uni-app 0.10.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/LICENSE +21 -0
- package/package.json +41 -0
- package/src/index.scss +1 -0
- package/src/index.ts +4 -0
- package/src/modules.ts +13 -0
- package/src/uni.scss +76 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 陈华春
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/package.json
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
{
|
2
|
+
"name": "@vtj/uni-app",
|
3
|
+
"private": false,
|
4
|
+
"version": "0.10.0",
|
5
|
+
"type": "module",
|
6
|
+
"sideEffects": false,
|
7
|
+
"dependencies": {
|
8
|
+
"@vtj/uni": "~0.10.0",
|
9
|
+
"@vtj/core": "~0.10.0",
|
10
|
+
"@vtj/renderer": "~0.10.0",
|
11
|
+
"@vtj/utils": "~0.10.0"
|
12
|
+
},
|
13
|
+
"devDependencies": {
|
14
|
+
"@vtj/cli": "~0.10.0"
|
15
|
+
},
|
16
|
+
"exports": {
|
17
|
+
"./src/index.scss": "./src/index.scss",
|
18
|
+
".": {
|
19
|
+
"types": "./src/index.ts",
|
20
|
+
"import": "./src/index.ts",
|
21
|
+
"require": "./src/index.ts"
|
22
|
+
},
|
23
|
+
"./*": [
|
24
|
+
"./*"
|
25
|
+
]
|
26
|
+
},
|
27
|
+
"main": "./src/index.ts",
|
28
|
+
"module": "./src/index.ts",
|
29
|
+
"types": "./src/index.ts",
|
30
|
+
"files": [
|
31
|
+
"src"
|
32
|
+
],
|
33
|
+
"gitHead": "d03843144f07c2d98c1e0c72c8c6eb1117c01722",
|
34
|
+
"publishConfig": {
|
35
|
+
"access": "public"
|
36
|
+
},
|
37
|
+
"scripts": {
|
38
|
+
"check": "vue-tsc --noEmit",
|
39
|
+
"build": "npm run check"
|
40
|
+
}
|
41
|
+
}
|
package/src/index.scss
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
@use 'uni';
|
package/src/index.ts
ADDED
package/src/modules.ts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
import { ContextMode } from '@vtj/renderer';
|
2
|
+
|
3
|
+
export function createModules(mode: ContextMode = ContextMode.Runtime) {
|
4
|
+
if (mode === ContextMode.Runtime || process.env.NODE_ENV === 'development') {
|
5
|
+
return import.meta.glob([
|
6
|
+
'/src/vtj/projects/*.json',
|
7
|
+
'/src/vtj/files/*.json',
|
8
|
+
'/src/pages/*.vue'
|
9
|
+
]);
|
10
|
+
} else {
|
11
|
+
return import.meta.glob(['/src/vtj/projects/*.json', '/src/pages/*.vue']);
|
12
|
+
}
|
13
|
+
}
|
package/src/uni.scss
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
/**
|
2
|
+
* 这里是uni-app内置的常用样式变量
|
3
|
+
*
|
4
|
+
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
5
|
+
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
6
|
+
*
|
7
|
+
*/
|
8
|
+
|
9
|
+
/**
|
10
|
+
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
11
|
+
*
|
12
|
+
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
13
|
+
*/
|
14
|
+
|
15
|
+
/* 颜色变量 */
|
16
|
+
|
17
|
+
/* 行为相关颜色 */
|
18
|
+
$uni-color-primary: #007aff;
|
19
|
+
$uni-color-success: #4cd964;
|
20
|
+
$uni-color-warning: #f0ad4e;
|
21
|
+
$uni-color-error: #dd524d;
|
22
|
+
|
23
|
+
/* 文字基本颜色 */
|
24
|
+
$uni-text-color: #333; // 基本色
|
25
|
+
$uni-text-color-inverse: #fff; // 反色
|
26
|
+
$uni-text-color-grey: #999; // 辅助灰色,如加载更多的提示信息
|
27
|
+
$uni-text-color-placeholder: #808080;
|
28
|
+
$uni-text-color-disable: #c0c0c0;
|
29
|
+
|
30
|
+
/* 背景颜色 */
|
31
|
+
$uni-bg-color: #fff;
|
32
|
+
$uni-bg-color-grey: #f8f8f8;
|
33
|
+
$uni-bg-color-hover: #f1f1f1; // 点击状态颜色
|
34
|
+
$uni-bg-color-mask: rgba(0, 0, 0, 0.4); // 遮罩颜色
|
35
|
+
|
36
|
+
/* 边框颜色 */
|
37
|
+
$uni-border-color: #c8c7cc;
|
38
|
+
|
39
|
+
/* 尺寸变量 */
|
40
|
+
|
41
|
+
/* 文字尺寸 */
|
42
|
+
$uni-font-size-sm: 12px;
|
43
|
+
$uni-font-size-base: 14px;
|
44
|
+
$uni-font-size-lg: 16;
|
45
|
+
|
46
|
+
/* 图片尺寸 */
|
47
|
+
$uni-img-size-sm: 20px;
|
48
|
+
$uni-img-size-base: 26px;
|
49
|
+
$uni-img-size-lg: 40px;
|
50
|
+
|
51
|
+
/* Border Radius */
|
52
|
+
$uni-border-radius-sm: 2px;
|
53
|
+
$uni-border-radius-base: 3px;
|
54
|
+
$uni-border-radius-lg: 6px;
|
55
|
+
$uni-border-radius-circle: 50%;
|
56
|
+
|
57
|
+
/* 水平间距 */
|
58
|
+
$uni-spacing-row-sm: 5px;
|
59
|
+
$uni-spacing-row-base: 10px;
|
60
|
+
$uni-spacing-row-lg: 15px;
|
61
|
+
|
62
|
+
/* 垂直间距 */
|
63
|
+
$uni-spacing-col-sm: 4px;
|
64
|
+
$uni-spacing-col-base: 8px;
|
65
|
+
$uni-spacing-col-lg: 12px;
|
66
|
+
|
67
|
+
/* 透明度 */
|
68
|
+
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
|
69
|
+
|
70
|
+
/* 文章场景相关 */
|
71
|
+
$uni-color-title: #2c405a; // 文章标题颜色
|
72
|
+
$uni-font-size-title: 20px;
|
73
|
+
$uni-color-subtitle: #555; // 二级标题颜色
|
74
|
+
$uni-font-size-subtitle: 18px;
|
75
|
+
$uni-color-paragraph: #3f536e; // 文章段落颜色
|
76
|
+
$uni-font-size-paragraph: 15px;
|