@hlw-uni/mp-cli 1.0.35 → 1.0.37

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni/mp-cli",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "uniapp 小程序脚手架生成器",
5
5
  "main": "bin/cli.js",
6
6
  "bin": {
@@ -13,5 +13,6 @@ onHide(() => {
13
13
  </script>
14
14
 
15
15
  <style lang="scss">
16
- @use './static/style/style.scss';
16
+ @use "./static/css/style.scss";
17
+ @use "./static/css/iconfont.css";
17
18
  </style>
@@ -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);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "easycom": {
3
3
  "autoscan": true,
4
- "regular": {
4
+ "custom": {
5
5
  "^u-(.*)": "@/components/u-$1/u-$1.vue",
6
6
  "^hlw-(.*)": "@hlw-uni/mp-vue/src/components/hlw-$1/index.vue"
7
7
  }
@@ -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
+ }
@@ -13,5 +13,6 @@ onHide(() => {
13
13
  </script>
14
14
 
15
15
  <style lang="scss">
16
- @use './static/style/style.scss';
16
+ @use "./static/css/style.scss";
17
+ @use "./static/css/iconfont.css";
17
18
  </style>
@@ -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);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "easycom": {
3
3
  "autoscan": true,
4
- "regular": {
4
+ "custom": {
5
5
  "^u-(.*)": "@/components/u-$1/u-$1.vue",
6
6
  "^hlw-(.*)": "@hlw-uni/mp-vue/src/components/hlw-$1/index.vue"
7
7
  }
@@ -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 'unocss-preset-weapp'
2
- import { extractorAttributify, transformerClass } from 'unocss-preset-weapp/transformer'
3
- import transformerDirectives from '@unocss/transformer-directives'
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
- presets: [
9
- // https://github.com/MellowCo/unocss-preset-weapp
10
- presetWeapp(),
11
- // attributify autocomplete
12
- presetWeappAttributify(),
13
- ],
14
- shortcuts: [
15
- {
16
- 'border-base': 'border border-gray-500_10',
17
- 'center': 'flex justify-center items-center',
18
- },
19
- ],
20
- transformers: [
21
- transformerDirectives({
22
- enforce: 'pre',
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
- // https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerAttributify
26
- transformerAttributify(),
32
+ // https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerAttributify
33
+ transformerAttributify(),
27
34
 
28
- // https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
29
- transformerClass(),
30
- ],
31
- }
35
+ // https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
36
+ transformerClass(),
37
+ ],
38
+ };
@@ -1,10 +0,0 @@
1
- {
2
- "recommendations": [
3
- "vue.volar",
4
- "dbaeumer.vscode-eslint",
5
- "esbenp.prettier-vscode",
6
- "stylelint.vscode-stylelint",
7
- "lokalise.i18n-ally",
8
- "bradlc.vscode-tailwindcss"
9
- ]
10
- }
@@ -1,34 +0,0 @@
1
- {
2
- "[html]": {
3
- "editor.formatOnSave": false,
4
- "editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
5
- "php.validate.enable": false,
6
- "php.suggest.basic": false,
7
- "php.proposeExtensionWorkarounds": true
8
- },
9
- "workbench.tree.indent": 26,
10
- "workbench.tree.renderIndentGuides": "always",
11
- "window.zoomLevel": 1.4,
12
- "editor.fontFamily": "JetBrains Mono, Consolas, 'Courier New', monospace",
13
- "editor.tabSize": 4,
14
- "editor.insertSpaces": true,
15
- "editor.detectIndentation": false,
16
- "editor.wordWrap": "on",
17
- "editor.renderLineHighlight": "all",
18
- "editor.smoothScrolling": true,
19
- "editor.cursorSurroundingLines": 8,
20
- "editor.lineHeight": 24,
21
- "editor.rulers": [80, 120],
22
- "editor.guides.indentation": true,
23
- "editor.guides.highlightActiveIndentation": true,
24
- "editor.guides.bracketPairs": "active",
25
- "workbench.colorCustomizations": {
26
- "editorIndentGuide.background1": "#2A2A2A",
27
- "editorIndentGuide.activeBackground1": "#dedede"
28
- },
29
- "workbench.editor.enablePreview": false,
30
- "workbench.editor.enablePreviewFromQuickOpen": false,
31
- "vue.server.hybridMode": "auto",
32
- "git.ignoreLimitWarning": true,
33
- "htmlhint.enable": false
34
- }
@@ -1,4 +0,0 @@
1
- page {
2
- background-color: #f8f8f8;
3
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
4
- }
@@ -1,4 +0,0 @@
1
- page {
2
- background-color: #f8f8f8;
3
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
4
- }