create-weapp-vite 1.3.6 → 1.3.7

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.
@@ -5,10 +5,10 @@ import fs2 from "fs-extra";
5
5
  import path2 from "pathe";
6
6
 
7
7
  // ../weapp-vite/package.json
8
- var version = "6.1.9";
8
+ var version = "6.1.10";
9
9
 
10
10
  // ../wevu/package.json
11
- var version2 = "1.0.5";
11
+ var version2 = "1.0.6";
12
12
 
13
13
  // src/enums.ts
14
14
  var TemplateName = /* @__PURE__ */ ((TemplateName2) => {
package/dist/cli.cjs CHANGED
@@ -51,10 +51,10 @@ var import_fs_extra2 = __toESM(require("fs-extra"), 1);
51
51
  var import_pathe2 = __toESM(require("pathe"), 1);
52
52
 
53
53
  // ../weapp-vite/package.json
54
- var version = "6.1.9";
54
+ var version = "6.1.10";
55
55
 
56
56
  // ../wevu/package.json
57
- var version2 = "1.0.5";
57
+ var version2 = "1.0.6";
58
58
 
59
59
  // src/npm.ts
60
60
  var import_node_https = __toESM(require("https"), 1);
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createProject
3
- } from "./chunk-4YYMSJFM.js";
3
+ } from "./chunk-YEUXCQ7V.js";
4
4
 
5
5
  // src/cli.ts
6
6
  import path from "path";
package/dist/index.cjs CHANGED
@@ -46,10 +46,10 @@ var import_fs_extra2 = __toESM(require("fs-extra"), 1);
46
46
  var import_pathe2 = __toESM(require("pathe"), 1);
47
47
 
48
48
  // ../weapp-vite/package.json
49
- var version = "6.1.9";
49
+ var version = "6.1.10";
50
50
 
51
51
  // ../wevu/package.json
52
- var version2 = "1.0.5";
52
+ var version2 = "1.0.6";
53
53
 
54
54
  // src/enums.ts
55
55
  var TemplateName = /* @__PURE__ */ ((TemplateName2) => {
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TemplateName,
3
3
  createProject
4
- } from "./chunk-4YYMSJFM.js";
4
+ } from "./chunk-YEUXCQ7V.js";
5
5
  export {
6
6
  TemplateName,
7
7
  createProject
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-weapp-vite",
3
3
  "type": "module",
4
- "version": "1.3.6",
4
+ "version": "1.3.7",
5
5
  "description": "create-weapp-vite",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -8,7 +8,7 @@ definePageJson({
8
8
  backgroundColor: '#f6f7fb',
9
9
  })
10
10
 
11
- const systemInfo = ref<WechatMiniprogram.GetSystemInfoSuccessCallbackResult | null>(null)
11
+ const systemInfo = ref<WechatMiniprogram.SystemInfo | null>(null)
12
12
 
13
13
  const infoRows = computed(() => {
14
14
  const info = systemInfo.value
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { computed, reactive, ref, watch } from 'wevu'
2
+ import { computed, reactive, ref, useBindModel, watch } from 'wevu'
3
3
 
4
4
  import SectionTitle from '@/components/SectionTitle/index.vue'
5
5
 
@@ -12,6 +12,11 @@ const isActive = ref(true)
12
12
  const hasError = ref(false)
13
13
  const isRound = ref(false)
14
14
  const isGhost = ref(false)
15
+ const bindModel = useBindModel({ event: 'change', valueProp: 'value' })
16
+ const onActiveChange = bindModel.model<boolean>('isActive').onChange
17
+ const onErrorChange = bindModel.model<boolean>('hasError').onChange
18
+ const onRoundChange = bindModel.model<boolean>('isRound').onChange
19
+ const onGhostChange = bindModel.model<boolean>('isGhost').onChange
15
20
 
16
21
  const classObject = reactive({
17
22
  'demo-active': true,
@@ -53,7 +58,7 @@ const dynamicKeyClass = computed(() => ({ [activeClass.value]: isActive.value })
53
58
  <text class="text-[22rpx] text-[#5c5b7a]">
54
59
  Active
55
60
  </text>
56
- <t-switch :value="isActive" @change="(e) => (isActive = e.detail.value)" />
61
+ <t-switch :value="isActive" @change="onActiveChange" />
57
62
  </view>
58
63
  </view>
59
64
  <view class="rounded-[16rpx] bg-[#f8fafc] p-[12rpx]">
@@ -61,7 +66,7 @@ const dynamicKeyClass = computed(() => ({ [activeClass.value]: isActive.value })
61
66
  <text class="text-[22rpx] text-[#5c5b7a]">
62
67
  Error
63
68
  </text>
64
- <t-switch :value="hasError" @change="(e) => (hasError = e.detail.value)" />
69
+ <t-switch :value="hasError" @change="onErrorChange" />
65
70
  </view>
66
71
  </view>
67
72
  <view class="rounded-[16rpx] bg-[#f8fafc] p-[12rpx]">
@@ -69,7 +74,7 @@ const dynamicKeyClass = computed(() => ({ [activeClass.value]: isActive.value })
69
74
  <text class="text-[22rpx] text-[#5c5b7a]">
70
75
  Round
71
76
  </text>
72
- <t-switch :value="isRound" @change="(e) => (isRound = e.detail.value)" />
77
+ <t-switch :value="isRound" @change="onRoundChange" />
73
78
  </view>
74
79
  </view>
75
80
  <view class="rounded-[16rpx] bg-[#f8fafc] p-[12rpx]">
@@ -77,7 +82,7 @@ const dynamicKeyClass = computed(() => ({ [activeClass.value]: isActive.value })
77
82
  <text class="text-[22rpx] text-[#5c5b7a]">
78
83
  Ghost
79
84
  </text>
80
- <t-switch :value="isGhost" @change="(e) => (isGhost = e.detail.value)" />
85
+ <t-switch :value="isGhost" @change="onGhostChange" />
81
86
  </view>
82
87
  </view>
83
88
  </view>