@hlw-uni/mp-cli 1.0.36 → 1.0.38
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/package.json +1 -1
- package/templates/mp-toutiao/base/package.json +2 -2
- package/templates/mp-toutiao/base/src/App.vue +2 -1
- package/templates/mp-toutiao/base/src/main.ts +1 -0
- package/templates/mp-toutiao/base/src/pages.json +1 -1
- package/templates/mp-toutiao/base/src/static/css/iconfont.css +1 -0
- package/templates/mp-toutiao/base/src/static/css/style.scss +45 -0
- package/templates/mp-weixin/base/package.json +3 -3
- package/templates/mp-weixin/base/src/App.vue +2 -1
- package/templates/mp-weixin/base/src/main.ts +1 -0
- package/templates/mp-weixin/base/src/pages.json +1 -1
- package/templates/mp-weixin/base/src/static/css/iconfont.css +1 -0
- package/templates/mp-weixin/base/src/static/css/style.scss +45 -0
- package/templates/mp-weixin/base/unocss.config.ts +33 -26
- package/templates/mp-toutiao/base/src/static/style/style.scss +0 -4
- package/templates/mp-weixin/base/src/static/style/style.scss +0 -4
package/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@dcloudio/uni-app-plus": "3.0.0-4080420251103001",
|
|
12
12
|
"@dcloudio/uni-components": "3.0.0-4080420251103001",
|
|
13
13
|
"@dcloudio/uni-mp-toutiao": "3.0.0-4080420251103001",
|
|
14
|
-
"@hlw-uni/mp-core": "^1.0.
|
|
15
|
-
"@hlw-uni/mp-vue": "^1.0.
|
|
14
|
+
"@hlw-uni/mp-core": "^1.0.13",
|
|
15
|
+
"@hlw-uni/mp-vue": "^1.0.4",
|
|
16
16
|
"@vueuse/core": "^10.9.0",
|
|
17
17
|
"pinia": "^2.1.7",
|
|
18
18
|
"pinia-plugin-unistorage": "^0.1.2",
|
|
@@ -4,6 +4,7 @@ import { createUnistorage } from "pinia-plugin-unistorage";
|
|
|
4
4
|
import App from "./App.vue";
|
|
5
5
|
import { setupDefaultInterceptors, hlw } from "@hlw-uni/mp-core";
|
|
6
6
|
import { useUserStore } from "./store";
|
|
7
|
+
import "virtual:uno.css";
|
|
7
8
|
|
|
8
9
|
export function createApp() {
|
|
9
10
|
const app = createSSRApp(App);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* 预留,请在 https://www.iconfont.cn/ 获取 */
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
view,
|
|
2
|
+
text,
|
|
3
|
+
button,
|
|
4
|
+
scroll-view,
|
|
5
|
+
image {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
padding: 0;
|
|
8
|
+
margin: 0;
|
|
9
|
+
line-height: 1.5;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// 屏蔽 button 默认边框
|
|
13
|
+
button::after {
|
|
14
|
+
border: none;
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 屏蔽所有元素的点击高亮效果
|
|
19
|
+
view,
|
|
20
|
+
text,
|
|
21
|
+
button,
|
|
22
|
+
image,
|
|
23
|
+
scroll-view,
|
|
24
|
+
navigator {
|
|
25
|
+
-webkit-tap-highlight-color: transparent;
|
|
26
|
+
-webkit-touch-callout: none;
|
|
27
|
+
user-select: none;
|
|
28
|
+
-webkit-user-select: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// 移除点击时的背景阴影/高亮
|
|
32
|
+
view:active,
|
|
33
|
+
text:active,
|
|
34
|
+
button:active,
|
|
35
|
+
image:active,
|
|
36
|
+
navigator:active {
|
|
37
|
+
background-color: transparent !important;
|
|
38
|
+
opacity: 1 !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
page {
|
|
42
|
+
background-color: #f8f8f8;
|
|
43
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
44
|
+
font-size: 28rpx;
|
|
45
|
+
}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"@dcloudio/uni-app-plus": "3.0.0-4080420251103001",
|
|
13
13
|
"@dcloudio/uni-components": "3.0.0-4080420251103001",
|
|
14
14
|
"@dcloudio/uni-mp-weixin": "3.0.0-4080420251103001",
|
|
15
|
-
"@hlw-uni/mp-core": "^1.0.
|
|
16
|
-
"@hlw-uni/mp-vue": "^1.0.
|
|
15
|
+
"@hlw-uni/mp-core": "^1.0.13",
|
|
16
|
+
"@hlw-uni/mp-vue": "^1.0.4",
|
|
17
17
|
"@vueuse/core": "^10.9.0",
|
|
18
18
|
"pinia": "^2.1.7",
|
|
19
19
|
"pinia-plugin-unistorage": "^0.1.2",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@dcloudio/types": "^3.4.8",
|
|
24
24
|
"@dcloudio/uni-cli-shared": "3.0.0-4080420251103001",
|
|
25
25
|
"@dcloudio/vite-plugin-uni": "3.0.0-4080420251103001",
|
|
26
|
-
"@hlw-uni/mp-vite-plugin": "^1.0.
|
|
26
|
+
"@hlw-uni/mp-vite-plugin": "^1.0.11",
|
|
27
27
|
"@unocss/transformer-directives": "^65.4.3",
|
|
28
28
|
"sass": "^1.70.0",
|
|
29
29
|
"typescript": "^4.9.4",
|
|
@@ -4,6 +4,7 @@ import { createUnistorage } from "pinia-plugin-unistorage";
|
|
|
4
4
|
import App from "./App.vue";
|
|
5
5
|
import { setupDefaultInterceptors, hlw } from "@hlw-uni/mp-core";
|
|
6
6
|
import { useUserStore } from "./store";
|
|
7
|
+
import "virtual:uno.css";
|
|
7
8
|
|
|
8
9
|
export function createApp() {
|
|
9
10
|
const app = createSSRApp(App);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* 预留,请在 https://www.iconfont.cn/ 获取 */
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
view,
|
|
2
|
+
text,
|
|
3
|
+
button,
|
|
4
|
+
scroll-view,
|
|
5
|
+
image {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
padding: 0;
|
|
8
|
+
margin: 0;
|
|
9
|
+
line-height: 1.5;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// 屏蔽 button 默认边框
|
|
13
|
+
button::after {
|
|
14
|
+
border: none;
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// 屏蔽所有元素的点击高亮效果
|
|
19
|
+
view,
|
|
20
|
+
text,
|
|
21
|
+
button,
|
|
22
|
+
image,
|
|
23
|
+
scroll-view,
|
|
24
|
+
navigator {
|
|
25
|
+
-webkit-tap-highlight-color: transparent;
|
|
26
|
+
-webkit-touch-callout: none;
|
|
27
|
+
user-select: none;
|
|
28
|
+
-webkit-user-select: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// 移除点击时的背景阴影/高亮
|
|
32
|
+
view:active,
|
|
33
|
+
text:active,
|
|
34
|
+
button:active,
|
|
35
|
+
image:active,
|
|
36
|
+
navigator:active {
|
|
37
|
+
background-color: transparent !important;
|
|
38
|
+
opacity: 1 !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
page {
|
|
42
|
+
background-color: #f8f8f8;
|
|
43
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
44
|
+
font-size: 28rpx;
|
|
45
|
+
}
|
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
import presetWeapp from
|
|
2
|
-
import { extractorAttributify, transformerClass } from
|
|
3
|
-
import transformerDirectives from
|
|
1
|
+
import presetWeapp from "unocss-preset-weapp";
|
|
2
|
+
import { extractorAttributify, transformerClass } from "unocss-preset-weapp/transformer";
|
|
3
|
+
import transformerDirectives from "@unocss/transformer-directives";
|
|
4
|
+
import { presetIcons } from "@unocss/preset-icons";
|
|
4
5
|
|
|
5
|
-
const { presetWeappAttributify, transformerAttributify } = extractorAttributify()
|
|
6
|
+
const { presetWeappAttributify, transformerAttributify } = extractorAttributify();
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
9
|
+
presets: [
|
|
10
|
+
// https://github.com/MellowCo/unocss-preset-weapp
|
|
11
|
+
presetWeapp(),
|
|
12
|
+
// attributify autocomplete
|
|
13
|
+
presetWeappAttributify(),
|
|
14
|
+
// 图标库(小程序必须用 inline 模式,避免字体加载问题)
|
|
15
|
+
presetIcons({
|
|
16
|
+
scale: 1.2,
|
|
17
|
+
mode: "auto",
|
|
18
|
+
}),
|
|
19
|
+
],
|
|
20
|
+
shortcuts: [
|
|
21
|
+
{
|
|
22
|
+
"border-base": "border border-gray-500_10",
|
|
23
|
+
center: "flex justify-center items-center",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
rules: [],
|
|
27
|
+
transformers: [
|
|
28
|
+
transformerDirectives({
|
|
29
|
+
enforce: "pre",
|
|
30
|
+
}),
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
// https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerAttributify
|
|
33
|
+
transformerAttributify(),
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
35
|
+
// https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
|
|
36
|
+
transformerClass(),
|
|
37
|
+
],
|
|
38
|
+
};
|