create-weapp-vite 2.0.72 → 2.0.73

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/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as TemplateName, t as createProject } from "./src-BmNUVB65.js";
1
+ import { n as TemplateName, t as createProject } from "./src-Qpb1-zil.js";
2
2
  import logger from "@weapp-core/logger";
3
3
  import fs from "fs-extra";
4
4
  import path from "node:path";
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as TemplateName, t as createProject } from "./src-BmNUVB65.js";
1
+ import { n as TemplateName, t as createProject } from "./src-Qpb1-zil.js";
2
2
  export { TemplateName, createProject };
@@ -3,14 +3,14 @@ import logger from "@weapp-core/logger";
3
3
  import fs from "fs-extra";
4
4
  import path from "pathe";
5
5
  import https from "node:https";
6
- //#region ../weapi/package.json
6
+ //#region ../../packages-runtime/weapi/package.json
7
7
  var version$2 = "0.2.2";
8
8
  //#endregion
9
- //#region ../weapp-vite/package.json
10
- var version$1 = "6.12.4";
9
+ //#region ../../packages-runtime/wevu/package.json
10
+ var version$1 = "6.13.0";
11
11
  //#endregion
12
- //#region ../wevu/package.json
13
- var version = "6.12.4";
12
+ //#region ../weapp-vite/package.json
13
+ var version = "6.13.0";
14
14
  //#endregion
15
15
  //#region src/enums.ts
16
16
  let TemplateName = /* @__PURE__ */ function(TemplateName) {
@@ -98,6 +98,7 @@ const TEMPLATE_CATALOG = {
98
98
  "@vant/weapp": "^1.11.7",
99
99
  "@vitejs/plugin-vue": "^6.0.5",
100
100
  "@vue/compiler-core": "^3.5.31",
101
+ "@vue/compiler-dom": "^3.5.31",
101
102
  "@vue/language-core": "^3.2.6",
102
103
  "antd-mini": "^3.4.3",
103
104
  "bundle-require": "^5.1.0",
@@ -110,7 +111,7 @@ const TEMPLATE_CATALOG = {
110
111
  "magic-string": "^0.30.21",
111
112
  "miniprogram-api-typings": "^5.1.2",
112
113
  "object-hash": "^3.0.0",
113
- "oxc-parser": "^0.121.0",
114
+ "oxc-parser": "^0.123.0",
114
115
  "oxc-walker": "^0.7.0",
115
116
  "pkg-types": "^2.3.0",
116
117
  "sass-embedded": "^1.98.0",
@@ -120,16 +121,16 @@ const TEMPLATE_CATALOG = {
120
121
  "ts-morph": "^27.0.2",
121
122
  "vite-plugin-inspect": "^11.3.3",
122
123
  "vue-tsc": "^3.2.6",
123
- "weapp-tailwindcss": "^4.11.1",
124
+ "weapp-tailwindcss": "^4.11.2",
124
125
  autoprefixer: "^10.4.27",
125
126
  clsx: "^2.1.1",
126
127
  dayjs: "^1.11.20",
127
128
  debug: "^4.4.3",
128
129
  echarts: "^6.0.0",
129
- esbuild: "^0.27.4",
130
+ esbuild: "^0.27.5",
130
131
  fdir: "^6.5.0",
131
132
  htmlparser2: "^12.0.0",
132
- lodash: "^4.17.23",
133
+ lodash: "^4.18.1",
133
134
  merge: "^2.1.1",
134
135
  pathe: "^2.0.3",
135
136
  postcss: "^8.5.8",
@@ -144,7 +145,7 @@ const TEMPLATE_CATALOG = {
144
145
  };
145
146
  const TEMPLATE_NAMED_CATALOG = {
146
147
  "tdesign-miniprogram-fixed": { "tdesign-miniprogram": "1.13.1" },
147
- "weapp-tailwindcss-fixed": { "weapp-tailwindcss": "4.11.1" },
148
+ "weapp-tailwindcss-fixed": { "weapp-tailwindcss": "4.11.2" },
148
149
  latest: {
149
150
  "miniprogram-api-typings": "^5.1.2",
150
151
  typescript: "^6.0.2"
@@ -483,8 +484,8 @@ async function createProject(targetDir = "", templateName = TemplateName.default
483
484
  const pkgJson = await fs.pathExists(templatePackagePath) ? await fs.readJSON(templatePackagePath) : createEmptyPackageJson();
484
485
  normalizeTemplateDependencySpecs(pkgJson);
485
486
  if (!pkgJson.devDependencies) pkgJson.devDependencies = {};
486
- upsertExistingDependencyVersion(pkgJson, "weapp-vite", toCaretVersion(version$1));
487
- upsertExistingDependencyVersion(pkgJson, "wevu", toCaretVersion(version));
487
+ upsertExistingDependencyVersion(pkgJson, "weapp-vite", toCaretVersion(version));
488
+ upsertExistingDependencyVersion(pkgJson, "wevu", toCaretVersion(version$1));
488
489
  upsertExistingDependencyVersion(pkgJson, "@wevu/api", toCaretVersion(version$2));
489
490
  await upsertTailwindcssVersion(pkgJson);
490
491
  await writeJsonFile(packageJsonPath, pkgJson);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-weapp-vite",
3
3
  "type": "module",
4
- "version": "2.0.72",
4
+ "version": "2.0.73",
5
5
  "description": "create-weapp-vite",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "postinstall": "wv prepare"
29
29
  },
30
30
  "devDependencies": {
31
- "@icebreakers/eslint-config": "^2.1.2",
31
+ "@icebreakers/eslint-config": "^3.0.1",
32
32
  "@icebreakers/stylelint-config": "^2.2.1",
33
33
  "eslint": "^10.1.0",
34
34
  "miniprogram-api-typings": "catalog:",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "weapp-vite-lib-template",
3
3
  "type": "module",
4
- "version": "3.0.4",
4
+ "version": "4.0.0",
5
5
  "private": true,
6
6
  "description": "weapp-vite 组件库(lib 模式)模板",
7
7
  "author": "ice breaker <1324318532@qq.com>",
@@ -33,7 +33,7 @@
33
33
  "wevu": "workspace:*"
34
34
  },
35
35
  "devDependencies": {
36
- "@icebreakers/eslint-config": "^2.1.2",
36
+ "@icebreakers/eslint-config": "^3.0.1",
37
37
  "@icebreakers/stylelint-config": "^2.2.1",
38
38
  "@wevu/api": "workspace:*",
39
39
  "eslint": "^10.1.0",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "devDependencies": {
31
31
  "@egoist/tailwindcss-icons": "catalog:",
32
- "@icebreakers/eslint-config": "^2.1.2",
32
+ "@icebreakers/eslint-config": "^3.0.1",
33
33
  "@icebreakers/stylelint-config": "^2.2.1",
34
34
  "@iconify-json/mdi": "catalog:",
35
35
  "autoprefixer": "catalog:",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@egoist/tailwindcss-icons": "catalog:",
35
- "@icebreakers/eslint-config": "^2.1.2",
35
+ "@icebreakers/eslint-config": "^3.0.1",
36
36
  "@icebreakers/stylelint-config": "^2.2.1",
37
37
  "@iconify-json/mdi": "catalog:",
38
38
  "autoprefixer": "catalog:",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@egoist/tailwindcss-icons": "catalog:",
35
- "@icebreakers/eslint-config": "^2.1.2",
35
+ "@icebreakers/eslint-config": "^3.0.1",
36
36
  "@icebreakers/stylelint-config": "^2.2.1",
37
37
  "@iconify-json/mdi": "catalog:",
38
38
  "autoprefixer": "catalog:",
@@ -28,7 +28,7 @@
28
28
  "postinstall": "wv prepare"
29
29
  },
30
30
  "devDependencies": {
31
- "@icebreakers/eslint-config": "^2.1.2",
31
+ "@icebreakers/eslint-config": "^3.0.1",
32
32
  "@icebreakers/stylelint-config": "^2.2.1",
33
33
  "eslint": "^10.1.0",
34
34
  "miniprogram-api-typings": "catalog:",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@egoist/tailwindcss-icons": "catalog:",
35
- "@icebreakers/eslint-config": "^2.1.2",
35
+ "@icebreakers/eslint-config": "^3.0.1",
36
36
  "@icebreakers/stylelint-config": "^2.2.1",
37
37
  "@iconify-json/mdi": "catalog:",
38
38
  "autoprefixer": "catalog:",
@@ -79,6 +79,25 @@ const summaryRows = computed(() => [
79
79
  { label: '风险级别', value: riskLevel.value },
80
80
  ])
81
81
 
82
+ function resolveSwitchValue(event: unknown, fallback: boolean) {
83
+ if (typeof event === 'boolean') {
84
+ return event
85
+ }
86
+ if (event && typeof event === 'object') {
87
+ const payload = event as Record<string, any>
88
+ if (typeof payload.detail === 'boolean') {
89
+ return payload.detail
90
+ }
91
+ if (payload.detail && typeof payload.detail === 'object' && typeof payload.detail.value === 'boolean') {
92
+ return payload.detail.value
93
+ }
94
+ if (typeof payload.value === 'boolean') {
95
+ return payload.value
96
+ }
97
+ }
98
+ return fallback
99
+ }
100
+
82
101
  watch(
83
102
  () => formState.urgent,
84
103
  (value) => {
@@ -91,7 +110,6 @@ watch(
91
110
  const nameModel = changeModel<string>('formState.name')
92
111
  const ownerModel = changeModel<string>('formState.owner')
93
112
  const categoryModel = changeModel<string>('formState.category')
94
- const urgentModel = changeModel<boolean>('formState.urgent')
95
113
  const budgetModel = changeModel<number>('formState.budget')
96
114
  const paceModel = changeModel<string>('formState.pace')
97
115
  const descriptionModel = changeModel<string>('formState.description')
@@ -100,6 +118,21 @@ const attachmentsModel = changeModel<UploadFile[], 'files'>('formState.attachmen
100
118
  parser: event => event?.detail?.files ?? [],
101
119
  })
102
120
 
121
+ function setUrgent(value: boolean) {
122
+ formState.urgent = value
123
+ }
124
+
125
+ function toggleUrgent() {
126
+ setUrgent(!formState.urgent)
127
+ }
128
+
129
+ function handleUrgentChange(event: unknown) {
130
+ setUrgent(resolveSwitchValue(event, !formState.urgent))
131
+ }
132
+
133
+ function stopUrgentTap() {
134
+ }
135
+
103
136
  function goNext() {
104
137
  if (!canGoNext.value) {
105
138
  showToast('请先完善当前步骤信息', 'warning')
@@ -161,9 +194,20 @@ function submit() {
161
194
  <t-radio v-for="item in categories" :key="item.value" :value="item.value" :label="item.label" />
162
195
  </t-radio-group>
163
196
  </FormRow>
164
- <FormRow label="加急">
165
- <t-switch :value="urgentModel.value" @change="urgentModel.onChange" />
166
- </FormRow>
197
+ <view
198
+ class="urgent-row-toggle flex items-center justify-between rounded-[18rpx] bg-[#f8fafc] px-[18rpx] py-[16rpx]"
199
+ @tap="toggleUrgent"
200
+ >
201
+ <view>
202
+ <text class="text-[22rpx] font-semibold text-[#1f1a3f]">
203
+ 加急
204
+ </text>
205
+ <text class="mt-[4rpx] block text-[20rpx] text-[#8a8aa5]">
206
+ 整行可点击切换,开启后默认切到快速推进
207
+ </text>
208
+ </view>
209
+ <t-switch :value="formState.urgent" @tap.stop="stopUrgentTap" @change="handleUrgentChange" />
210
+ </view>
167
211
  </view>
168
212
  </FormStep>
169
213