tmui-cli 2.0.0 → 2.0.1

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.
Files changed (134) hide show
  1. package/README.md +56 -8
  2. package/data/components.json +637 -0
  3. package/data/config.json +169 -0
  4. package/data/doc-index.json +61 -0
  5. package/data/docs/alert.md +79 -0
  6. package/data/docs/avatar-group.md +73 -0
  7. package/data/docs/badge.md +62 -0
  8. package/data/docs/between-time.md +76 -0
  9. package/data/docs/button.md +114 -0
  10. package/data/docs/calendar-multiple.md +90 -0
  11. package/data/docs/cell.md +91 -0
  12. package/data/docs/checkbox-group.md +62 -0
  13. package/data/docs/checkbox.md +74 -0
  14. package/data/docs/circle-progress.md +74 -0
  15. package/data/docs/code-input.md +77 -0
  16. package/data/docs/col.md +57 -0
  17. package/data/docs/collapse-item.md +76 -0
  18. package/data/docs/collapse.md +59 -0
  19. package/data/docs/countdown.md +79 -0
  20. package/data/docs/date-view.md +65 -0
  21. package/data/docs/drawer.md +94 -0
  22. package/data/docs/dropdown-item.md +68 -0
  23. package/data/docs/dropdown-menu.md +70 -0
  24. package/data/docs/echart.md +69 -0
  25. package/data/docs/float-drawer.md +79 -0
  26. package/data/docs/form-item.md +67 -0
  27. package/data/docs/form.md +68 -0
  28. package/data/docs/html.md +70 -0
  29. package/data/docs/icon.md +67 -0
  30. package/data/docs/image.md +73 -0
  31. package/data/docs/input.md +126 -0
  32. package/data/docs/modal.md +92 -0
  33. package/data/docs/money.md +70 -0
  34. package/data/docs/more.md +69 -0
  35. package/data/docs/navbar.md +82 -0
  36. package/data/docs/picker-date.md +75 -0
  37. package/data/docs/picker-selected.md +75 -0
  38. package/data/docs/picker-time.md +77 -0
  39. package/data/docs/picker-view.md +70 -0
  40. package/data/docs/picker.md +76 -0
  41. package/data/docs/popover.md +68 -0
  42. package/data/docs/progress.md +72 -0
  43. package/data/docs/pull-refresh.md +73 -0
  44. package/data/docs/radio-group.md +61 -0
  45. package/data/docs/radio.md +74 -0
  46. package/data/docs/rate.md +72 -0
  47. package/data/docs/row.md +61 -0
  48. package/data/docs/sheet.md +72 -0
  49. package/data/docs/sign-board.md +61 -0
  50. package/data/docs/skeleton.md +60 -0
  51. package/data/docs/sku.md +69 -0
  52. package/data/docs/slider-double.md +71 -0
  53. package/data/docs/slider-menu.md +78 -0
  54. package/data/docs/slider.md +71 -0
  55. package/data/docs/stepper.md +76 -0
  56. package/data/docs/steps-item.md +71 -0
  57. package/data/docs/steps.md +73 -0
  58. package/data/docs/sticky-header.md +57 -0
  59. package/data/docs/sticky.md +55 -0
  60. package/data/docs/switch-slider.md +82 -0
  61. package/data/docs/switch.md +68 -0
  62. package/data/docs/tabbar.md +83 -0
  63. package/data/docs/tabs.md +84 -0
  64. package/data/docs/tag.md +78 -0
  65. package/data/docs/text.md +69 -0
  66. package/data/docs/upload-photo.md +86 -0
  67. package/data/docs/upload-video.md +86 -0
  68. package/data/docs//346/250/241/346/235/277.md +47 -0
  69. package/data/examples/alert.vue +39 -0
  70. package/data/examples/avatar-group.vue +97 -0
  71. package/data/examples/badge.vue +87 -0
  72. package/data/examples/between-time.vue +39 -0
  73. package/data/examples/button.vue +70 -0
  74. package/data/examples/calendar-multiple.vue +57 -0
  75. package/data/examples/cell.vue +39 -0
  76. package/data/examples/checkbox.vue +71 -0
  77. package/data/examples/circle-progress.vue +69 -0
  78. package/data/examples/code-input.vue +36 -0
  79. package/data/examples/collapse.vue +76 -0
  80. package/data/examples/countdown.vue +39 -0
  81. package/data/examples/drawer.vue +138 -0
  82. package/data/examples/dropdown-menu.vue +59 -0
  83. package/data/examples/echart.vue +91 -0
  84. package/data/examples/float-drawer.vue +45 -0
  85. package/data/examples/form.vue +147 -0
  86. package/data/examples/html.vue +53 -0
  87. package/data/examples/icon.vue +65 -0
  88. package/data/examples/image.vue +38 -0
  89. package/data/examples/input.vue +66 -0
  90. package/data/examples/modal.vue +122 -0
  91. package/data/examples/money.vue +60 -0
  92. package/data/examples/more.vue +47 -0
  93. package/data/examples/navbar.vue +68 -0
  94. package/data/examples/picker-date.vue +53 -0
  95. package/data/examples/picker-selected.vue +35 -0
  96. package/data/examples/picker-time.vue +46 -0
  97. package/data/examples/picker-view.vue +35 -0
  98. package/data/examples/picker.vue +101 -0
  99. package/data/examples/popover.vue +130 -0
  100. package/data/examples/progress.vue +57 -0
  101. package/data/examples/pull-refresh.vue +41 -0
  102. package/data/examples/radio.vue +61 -0
  103. package/data/examples/rate.vue +35 -0
  104. package/data/examples/row.vue +52 -0
  105. package/data/examples/sheet.vue +36 -0
  106. package/data/examples/sign-board.vue +43 -0
  107. package/data/examples/skeleton.vue +45 -0
  108. package/data/examples/sku.vue +106 -0
  109. package/data/examples/slider-menu.vue +65 -0
  110. package/data/examples/slider.vue +51 -0
  111. package/data/examples/stepper.vue +44 -0
  112. package/data/examples/steps.vue +77 -0
  113. package/data/examples/sticky.vue +46 -0
  114. package/data/examples/switch-slider.vue +113 -0
  115. package/data/examples/switch.vue +62 -0
  116. package/data/examples/tabbar.vue +41 -0
  117. package/data/examples/tabs.vue +46 -0
  118. package/data/examples/tag.vue +69 -0
  119. package/data/examples/text.vue +38 -0
  120. package/data/examples/upload-photo.vue +39 -0
  121. package/data/examples/upload-video.vue +29 -0
  122. package/data/guides/cli.md +110 -0
  123. package/data/guides//344/273/213/347/273/215.md +34 -0
  124. package/data/guides//345/205/274/345/256/271/346/200/247.md +41 -0
  125. package/data/guides//345/215/225/344/275/215/346/240/207/347/255/276/350/257/264/346/230/216.md +22 -0
  126. package/data/guides//345/233/275/351/231/205/345/214/226.md +454 -0
  127. package/data/guides//345/256/211/350/243/205.md +103 -0
  128. package/data/guides//345/260/217/347/250/213/345/272/217/345/210/206/344/272/253.md +34 -0
  129. package/data/guides//345/270/270/350/247/201/351/227/256/351/242/230.md +102 -0
  130. package/data/guides//345/277/253/351/200/237/344/270/212/346/211/213.md +191 -0
  131. package/data/guides//346/233/264/346/226/260/346/227/245/345/277/227.md +155 -0
  132. package/data/guides//350/264/241/347/214/256/350/200/205.md +97 -0
  133. package/dist/main.mjs +78 -66
  134. package/package.json +12 -6
@@ -0,0 +1,130 @@
1
+ <!--
2
+ - Copyright (c) 2025. tmzdy by @https://tmui.design
3
+ -->
4
+
5
+ <script setup lang="ts">
6
+ import { ref } from 'vue'
7
+
8
+ const show = ref(false)
9
+ const dates = ref([])
10
+ </script>
11
+
12
+ <template>
13
+ <view>
14
+ <tm-sheet>
15
+ <tm-text font-size="32" class=" text-weight-b mb-16 d-block">汽泡菜单 tmPopover</tm-text>
16
+ <tm-text class="" color="#999999">
17
+ 多达8个位置可选,当显示位置不足时可以自动反转位置。
18
+ </tm-text>
19
+ </tm-sheet>
20
+
21
+ <tm-sheet class="flex flex-row gap-20 flex-row-center-between">
22
+ <tm-popover position="bl">
23
+ <tm-button :round="88" size="s" font-size="46" :btnIcon="true" icon='skip-right-fill'></tm-button>
24
+ <template v-slot:menu="{isShow}">
25
+ <tm-sheet :margin="0" :padding="0" class="overflow" shadow="24">
26
+ <tm-cell :bottomBorderInsert="true" :card="false" url="/pages/index/button" icon="stack-line"
27
+ desc="UTS版本tmui组件库,高质量库" title="常见组件库"></tm-cell>
28
+ <tm-cell title="程序设置" :bottomBorderInsert="true" :card="false" url="/pages/index/icon"
29
+ icon="price-tag-3-line" label="+¥32" label-color="red" icon-color="red"></tm-cell>
30
+ <tm-cell title="美丽的国度" :bottomBorderInsert="true" :card="false" icon="chat-smile-2-line"
31
+ url="/pages/index/tag" label="tmx测试" icon-color="orange"></tm-cell>
32
+ <tm-cell title="标签页面" :bottomBorderInsert="true" :card="false" :show-bottom-border="false"
33
+ icon="calendar-schedule-line" url="/pages/index/tag" label="tmx测试" icon-color="orange"></tm-cell>
34
+ </tm-sheet>
35
+ </template>
36
+ </tm-popover>
37
+ <tm-popover v-model="show" :is-click-close="false" :show-mask="true" position="bc" triangle-color="primary">
38
+ <template v-slot:default="{isShow}">
39
+ <tm-button
40
+ :round="88" size="s" :btnIcon="true"
41
+ font-size="46"
42
+ :skin="isShow?'normal':'outlined'"
43
+ :icon="isShow?'arrow-up-s-fill':'arrow-down-s-fill'"
44
+ ></tm-button>
45
+ </template>
46
+ <template v-slot:menu="{isShow}">
47
+ <tm-sheet :margin="0" :padding="0" class="overflow" shadow="24" style="max-width:450px" width="90vw">
48
+ <tm-calendar-multiple
49
+ v-model="dates"
50
+ :multiple-max="1"
51
+ :show-footer="false" head-bg-color="primary" head-font-color="#fff" @click="show = false"></tm-calendar-multiple>
52
+ </tm-sheet>
53
+ </template>
54
+ </tm-popover>
55
+ <tm-popover position="br">
56
+ <tm-button :round="88" size="s" font-size="46" :btnIcon="true" icon='skip-left-fill'></tm-button>
57
+ <template v-slot:menu="{isShow}">
58
+ <tm-sheet :margin="0" :padding="0" class="overflow" shadow="24">
59
+ <tm-cell :bottomBorderInsert="true" :card="false" url="/pages/index/button" icon="stack-line"
60
+ desc="UTS版本tmui组件库,高质量库" title="常见组件库"></tm-cell>
61
+ <tm-cell title="程序设置" :bottomBorderInsert="true" :card="false" url="/pages/index/icon"
62
+ icon="price-tag-3-line" label="+¥32" label-color="red" icon-color="red"></tm-cell>
63
+ <tm-cell title="美丽的国度" :bottomBorderInsert="true" :card="false" icon="chat-smile-2-line"
64
+ url="/pages/index/tag" label="tmx测试" icon-color="orange"></tm-cell>
65
+ <tm-cell title="标签页面" :bottomBorderInsert="true" :card="false" :show-bottom-border="false"
66
+ icon="calendar-schedule-line" url="/pages/index/tag" label="tmx测试" icon-color="orange"></tm-cell>
67
+ </tm-sheet>
68
+ </template>
69
+ </tm-popover>
70
+ </tm-sheet>
71
+
72
+ <tm-sheet class="flex flex-row gap-20 flex-row-center-between">
73
+ <tm-popover position="tl" triangle-color="#000">
74
+ <tm-button :btnIcon="true" :round="88" font-size="46" icon='skip-left-fill' size="s"></tm-button>
75
+ <template v-slot:menu="{isShow}">
76
+ <tm-sheet margin="0" shadow="24" color="#000">
77
+ <tm-button>自定义内容</tm-button>
78
+ </tm-sheet>
79
+ </template>
80
+ </tm-popover>
81
+ <tm-popover position="tc">
82
+ <tm-button
83
+ :btnIcon="true"
84
+ :round="88" color="error" font-size="46"
85
+ icon="arrow-up-s-fill"
86
+ size="s"
87
+ ></tm-button>
88
+ <template v-slot:menu="{isShow}">
89
+ <tm-sheet margin="0" shadow="24">
90
+ <tm-button>自定义内容</tm-button>
91
+ </tm-sheet>
92
+ </template>
93
+ </tm-popover>
94
+ <tm-popover position="tr">
95
+ <tm-button :btnIcon="true" :round="88" font-size="46" icon='skip-right-fill' size="s"></tm-button>
96
+ <template v-slot:menu="{isShow}">
97
+ <tm-sheet margin="0" shadow="24">
98
+ <tm-button>自定义内容</tm-button>
99
+ </tm-sheet>
100
+ </template>
101
+ </tm-popover>
102
+ </tm-sheet>
103
+
104
+ <tm-sheet class="flex flex-row flex-row-center-center gap-5">
105
+ <tm-popover position="left" triangle-color="#000">
106
+ <tm-button :btnIcon="true" :round="88" font-size="46" icon='skip-left-fill' size="s"></tm-button>
107
+ <template v-slot:menu="{isShow}">
108
+ <tm-sheet margin="0" padding="5" shadow="24" color="#000">
109
+ <tm-button>向左显示</tm-button>
110
+ </tm-sheet>
111
+ </template>
112
+ </tm-popover>
113
+
114
+ <tm-popover position="right" triangle-color="#000">
115
+ <tm-button :btnIcon="true" :round="88" font-size="46" icon='skip-right-fill' size="s"></tm-button>
116
+ <template v-slot:menu="{isShow}">
117
+ <tm-sheet margin="0" padding="5" shadow="24" color="#000">
118
+ <tm-button>向右显示</tm-button>
119
+ </tm-sheet>
120
+ </template>
121
+ </tm-popover>
122
+ </tm-sheet>
123
+
124
+ </view>
125
+
126
+ </template>
127
+
128
+ <style scoped>
129
+
130
+ </style>
@@ -0,0 +1,57 @@
1
+ <!--
2
+ - Copyright (c) 2025. tmzdy by @https://tmui.design
3
+ -->
4
+
5
+ <script setup lang="ts">
6
+ import { ref } from 'vue'
7
+
8
+ const value = ref(10)
9
+ </script>
10
+
11
+ <template>
12
+ <view>
13
+ <tm-sheet>
14
+ <tm-text font-size="32" class=" text-weight-b mb-16 d-block">进度条 tmProgress</tm-text>
15
+ <tm-text class="" color="#999999">
16
+ 配置灵活,自由度高。
17
+ </tm-text>
18
+ </tm-sheet>
19
+
20
+ <tm-sheet>
21
+ <tm-progress :model-value="50"></tm-progress>
22
+ </tm-sheet>
23
+ <tm-sheet>
24
+ <tm-progress :model-value="50" color="error" size="18" show-label label-inside></tm-progress>
25
+ </tm-sheet>
26
+
27
+ <tm-sheet>
28
+ <tm-text font-size="32" class=" text-weight-b d-block">受控及动画演示</tm-text>
29
+ <tm-text color="#999999" class=" mb-n8 ">
30
+ 演示标签插槽,状态自定义,渐变,自定颜色等属性。
31
+ </tm-text>
32
+ <tm-progress v-model="value"></tm-progress>
33
+ <tm-progress v-model="value" :color="value > 50 ? 'success' : 'primary'" class="mt-n8"
34
+ show-label="true"></tm-progress>
35
+ <tm-progress v-model="value" color="warn" size="12" class="mt-n8" show-label>
36
+ <template v-slot:default="{ value, percentage }">
37
+ <tm-icon color="success" v-if="percentage > 80" name="checkbox-circle-line"></tm-icon>
38
+ <tm-icon color="warn" v-else name="close-circle-line"></tm-icon>
39
+ </template>
40
+ </tm-progress>
41
+ <tm-progress v-model="value" linear-color="linear-gradient(to right, #FFEB3A 0%, #4DEF8E 100%)" size="12"
42
+ class="mt-n8">
43
+ </tm-progress>
44
+
45
+ <view class="flex flex-row gap-10 mt-n8">
46
+ <tm-tag @click="value = 10">10</tm-tag>
47
+ <tm-tag @click="value = 50">50</tm-tag>
48
+ <tm-tag @click="value = 100">100</tm-tag>
49
+ </view>
50
+ </tm-sheet>
51
+
52
+
53
+ </view>
54
+
55
+ </template>
56
+
57
+ <style scoped></style>
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <view style="height: calc(100vh - 44px);" class="flex flex-col">
3
+ <tm-pull-refresh :frist-load="false" style="height: 100%;"
4
+ :pull-refresh="handleRefresh"
5
+ :bottom-refresh="bootmHandleRefresh" >
6
+ <tm-sheet>
7
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">下拉刷新</tm-text>
8
+ <view>
9
+ <tm-text>请拖拉下拉刷新</tm-text>
10
+ </view>
11
+ </tm-sheet>
12
+ <tm-sheet height="800px">
13
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">触底刷新</tm-text>
14
+ <view>
15
+ <tm-text>上拖触底刷新</tm-text>
16
+ </view>
17
+ </tm-sheet>
18
+ </tm-pull-refresh>
19
+ </view>
20
+ </template>
21
+ <script setup lang="ts">
22
+ const handleRefresh = ():Promise<boolean> => {
23
+ console.log('刷新');
24
+ return new Promise((resolve, reject) => {
25
+ setTimeout(() => {
26
+ console.log('完成');
27
+ resolve(true);
28
+ }, 3*1000);
29
+ })
30
+ }
31
+ const bootmHandleRefresh = async ():Promise<boolean> => {
32
+ console.log('刷新');
33
+ return new Promise((resolve, reject) => {
34
+ setTimeout(() => {
35
+ console.log('完成');
36
+ resolve(true);
37
+ }, 3000);
38
+ })
39
+ }
40
+ </script>
41
+ <style lang="scss"></style>
@@ -0,0 +1,61 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text class=" text-weight-b mb-16 d-block" font-size="32">单选框组</tm-text>
5
+ <tm-text class="mb-n8" color="#999999">
6
+ 可单单独使用,也可组合使用
7
+ </tm-text>
8
+ </tm-sheet>
9
+
10
+ <tm-sheet :margin="['24']">
11
+ <tm-text font-size="32" class=" text-weight-b d-block mb-n8">单独使用</tm-text>
12
+ <view class="flex flex-row flex-row-center-start gap-10">
13
+ <tm-radio label="苹果"></tm-radio>
14
+ <tm-radio color="success" label="梨子"></tm-radio>
15
+ <tm-radio color="error" label="香蕉"></tm-radio>
16
+ <tm-radio color="warn" label="地瓜"></tm-radio>
17
+ </view>
18
+ </tm-sheet>
19
+ <tm-sheet :margin="['24']">
20
+ <tm-text font-size="32" class=" text-weight-b d-block mb-n8">联合Group使用</tm-text>
21
+ <tm-radio-group @change="onchange" v-model="radioValue">
22
+ <tm-radio v-for="(item, index) in ['苹果', '梨子', '香蕉', '地瓜', '花生']" :key="index" :value="item"
23
+ :label="item"></tm-radio>
24
+ </tm-radio-group>
25
+ <tm-sheet color="info" padding="24" :margin="[0, 24, 0, 0]"><tm-text>{{ radioValue || "未选择" }}</tm-text>
26
+ </tm-sheet>
27
+ </tm-sheet>
28
+
29
+ <tm-sheet :margin="['24']">
30
+ <tm-text font-size="32" class="text-weight-b d-block">竖向排列(并自定义样式)</tm-text>
31
+ </tm-sheet>
32
+ <tm-radio-group v-model="radioValue2" direction="column">
33
+ <tm-sheet :color="radioValue2 === item.id ? 'primary' : 'white'" v-for="(item, index) in listview"
34
+ :key="index" :margin="[24, 0]" padding="0" class="flex-1">
35
+ <tm-radio class="pa-20" :color="radioValue2 === item.id ? 'warn' : 'primary'" :value="item.id">
36
+ <template v-slot:label="{checked}">
37
+ <tm-text :color="radioValue2 === item.id ? '#fff' : '#333'">{{ item.text }}</tm-text>
38
+ </template>
39
+ </tm-radio>
40
+ </tm-sheet>
41
+ </tm-radio-group>
42
+ <view class="py-20"></view>
43
+ </view>
44
+ </template>
45
+
46
+ <script lang="ts" setup>
47
+ import { ref } from 'vue'
48
+
49
+ const radioValue = ref("")
50
+ const radioValue2 = ref("")
51
+ const listview = ref<Array<Record<string, any>>>([
52
+ { text: "科技创新引领制造业高质量发展", id: 1 },
53
+ { text: "明确提出“建立保持制造业合理比重投入机制”。这些都为以科技创新引领制造业高质量发展指明了道路和方向。", id: 2 },
54
+ { text: "改造提升传统产业,培育壮大新兴产业,布局建设未来产业,完善现代化产业体系", id: 3 },
55
+ ])
56
+ const onchange = (val: any) => {
57
+ // console.log(val,'**')
58
+ }
59
+ </script>
60
+
61
+ <style></style>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="32" class=" text-weight-b mb-16 d-block">评分 tmRate</tm-text>
5
+ <tm-text class="" color="#999999">
6
+ 评分组件,只读和禁用等属性
7
+ </tm-text>
8
+ </tm-sheet>
9
+ <tm-sheet>
10
+ <tm-rate></tm-rate>
11
+ </tm-sheet>
12
+ <tm-sheet>
13
+ <tm-text font-size="32" class=" text-weight-b mb-n8 d-block">半星</tm-text>
14
+ <tm-rate :half="true" :model-value="2.5" ></tm-rate>
15
+ </tm-sheet>
16
+ <tm-sheet>
17
+ <tm-text font-size="32" class=" text-weight-b mb-n8 d-block">只读</tm-text>
18
+ <tm-rate color="warn" :half="true" :model-value="4.5" :readonly="true"></tm-rate>
19
+ </tm-sheet>
20
+ <tm-sheet>
21
+ <tm-text font-size="32" class=" text-weight-b mb-n8 d-block">禁用</tm-text>
22
+ <tm-rate color="success" :model-value="3" :disabled="true"></tm-rate>
23
+ </tm-sheet>
24
+ <tm-sheet>
25
+ <tm-text font-size="32" class=" text-weight-b mb-n8 d-block">显示分数</tm-text>
26
+ <tm-rate color="error" :model-value="3" :show-score="true"></tm-rate>
27
+ </tm-sheet>
28
+ </view>
29
+ </template>
30
+
31
+ <script lang="ts" setup>
32
+ import { ref } from "vue"
33
+ </script>
34
+
35
+ <style></style>
@@ -0,0 +1,52 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="36" class="text-weight-b d-block">布局 TmRow TmCol</tm-text>
5
+ <view>
6
+ <tm-text>快速排版布局利器,内只能放置tmCol组件,默认是5列栅格,可以自行更改</tm-text>
7
+ </view>
8
+ </tm-sheet>
9
+ <tm-sheet>
10
+ <tm-row>
11
+ <tm-col v-for="(index, item) in 5" :key="index"
12
+ :style="{ backgroundColor: `rgb(21, ${135 - item * 20}, ${235 - item * 20})` }"
13
+ class=" text-align-center py-24 text-white">{{ item }}</tm-col>
14
+ </tm-row>
15
+ </tm-sheet>
16
+ <tm-sheet>
17
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">上下左右间隙</tm-text>
18
+ <tm-row gutter="2">
19
+ <tm-col v-for="item in 10" :key="item" :style="{ backgroundColor: `rgb(230, ${item * 20}, ${165 - item * 20})` }"
20
+ class=" text-align-center py-24 text-white">{{ item % 5 == 0 ? 5 : item % 5 }}</tm-col>
21
+ </tm-row>
22
+ </tm-sheet>
23
+ <tm-sheet>
24
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">设置各自的栅格</tm-text>
25
+ <tm-row>
26
+ <tm-col v-for="(item, index) in [2, 1, 2, 5]" :key="item" :span="item"
27
+ :style="{ backgroundColor: `rgb(0, ${index * 20}, ${index * 20})` }"
28
+ class=" text-align-center py-24 text-white">{{ item }}</tm-col>
29
+ </tm-row>
30
+ </tm-sheet>
31
+ <tm-sheet>
32
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">改为10栅格</tm-text>
33
+ <tm-row column="10">
34
+ <tm-col v-for="(item, index) in [1, 3, 1, 5]" :key="item" :span="item"
35
+ :style="{ backgroundColor: `rgb(${item * 20}, ${95 - item * 20}, ${165 - item * 10})` }"
36
+ class=" text-align-center py-24 text-white">{{ item }}</tm-col>
37
+ </tm-row>
38
+ </tm-sheet>
39
+ <tm-sheet>
40
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">向右对齐</tm-text>
41
+ <tm-row column="10" justify="flex-end">
42
+ <tm-col v-for="(item, index) in [2, 5, 3, 3, 2]" :key="item" :span="item"
43
+ :style="{ backgroundColor: `rgb(0, ${index * 20}, ${index * 10})` }"
44
+ class=" text-align-center py-24 text-white">{{ item }}</tm-col>
45
+ </tm-row>
46
+ </tm-sheet>
47
+ </view>
48
+ </template>
49
+ <script setup lang="ts">
50
+ import { ref } from 'vue';
51
+ </script>
52
+ <style lang="scss" scoped></style>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <tm-sheet>
3
+ <tm-text font-size="36" class="text-weight-b d-block">容器 TmSheet</tm-text>
4
+ <view>
5
+ <tm-text>非常方便快速布局,可全局配置间隙投影,圆角这些。</tm-text>
6
+ </view>
7
+ </tm-sheet>
8
+ <tm-sheet color="primary" :round="[0, 20,20,8]">
9
+ <tm-text color="white">更改圆角</tm-text>
10
+ </tm-sheet>
11
+ <tm-sheet borderWidth="4" :borderColor="['#8A88FB', '#D079EE']" :round="[0, 20]">
12
+ <tm-text>边线</tm-text>
13
+ </tm-sheet>
14
+ <tm-sheet :linear="['220.55deg', '#8A88FB', '#D079EE']" :round="[0, 20]">
15
+ <tm-text color="white">渐变</tm-text>
16
+ </tm-sheet>
17
+ <tm-sheet shadow="15" :linear="['220.55deg', '#8A88FB', '#D079EE']" round="20">
18
+ <tm-text color="white">渐变+投影</tm-text>
19
+ </tm-sheet>
20
+
21
+ <tm-sheet shadow="15" color="#ff0074" round="20">
22
+ <tm-text color="white">纯色+投影</tm-text>
23
+ </tm-sheet>
24
+ <tm-sheet>
25
+ <tm-text font-size="36" class="text-weight-b ">允许让内容加载中...</tm-text>
26
+ </tm-sheet>
27
+ <tm-sheet :loading="true">
28
+ <tm-sheet color="warn" :round="[0, 20]">
29
+ <tm-text color="white">让内容处理加载中</tm-text>
30
+ </tm-sheet>
31
+ </tm-sheet>
32
+ </template>
33
+ <script lang="ts" setup>
34
+ import {ref} from "vue"
35
+ </script>
36
+ <style lang="scss"></style>
@@ -0,0 +1,43 @@
1
+ <!--
2
+ - Copyright (c) 2025. tmzdy by @https://tmui.design
3
+ -->
4
+ <script setup lang="ts">
5
+ import { ref } from 'vue'
6
+ import TmSignBoard from "@/uni_modules/tm-ui/components/tm-sign-board/tm-sign-board.vue"
7
+ const signBoardRef = ref<InstanceType<typeof TmSignBoard>|null>(null)
8
+ const getimage = async ()=>{
9
+ let org = await signBoardRef.value?.getImage();
10
+ if(!org) return;
11
+ uni.previewImage({
12
+ urls:[org.src],
13
+ current:org.src
14
+ })
15
+ }
16
+ const clear = async ()=>{
17
+ await signBoardRef.value?.clear();
18
+ }
19
+
20
+ </script>
21
+
22
+ <template>
23
+ <view>
24
+ <tm-sheet>
25
+ <tm-text font-size="32" class="text-weight-b d-block ">签名版 TmSignBoard</tm-text>
26
+ </tm-sheet>
27
+
28
+ <tm-sheet >
29
+ <tm-sheet width="660" height="660" padding="0" margin="0" color="info">
30
+ <tm-sign-board ref="signBoardRef" width="660" height="660"></tm-sign-board>
31
+ </tm-sheet>
32
+
33
+ <view class="pa-12 flex flex-row gap-10 mt-n8">
34
+ <tm-button @click="clear" class="flex-1">清空</tm-button>
35
+ <tm-button @click="getimage" class="flex-1">获取图片</tm-button>
36
+ </view>
37
+ </tm-sheet>
38
+
39
+ </view>
40
+
41
+ </template>
42
+
43
+ <style scoped></style>
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="36" class="text-weight-b mb-8">骨架屏 tmSkeleton</tm-text>
5
+ <tm-text class="mb-n8" color="#999999">骨架屏就是一个单view,允许你自由组合骨架效果,建议单独使用本组件自己封装一个想要的骨架效果。</tm-text>
6
+ <tm-text color="#999999">由于每个人的app占位样式不一样,我认为这种非常自由式的组合非常符合扩展。</tm-text>
7
+ </tm-sheet>
8
+ <tm-sheet>
9
+ <tm-skeleton></tm-skeleton>
10
+ </tm-sheet>
11
+ <tm-sheet>
12
+ <tm-text font-size="36" class="text-weight-b ">动手组合一个骨架</tm-text>
13
+ </tm-sheet>
14
+ <tm-sheet>
15
+ <view class="flex flex-row">
16
+ <tm-skeleton width="90" height="90" round="90"></tm-skeleton>
17
+ <view class="flex-1 ml-8">
18
+ <tm-skeleton class="mb-8" v-for="item in 6" :key="item"></tm-skeleton>
19
+ </view>
20
+ </view>
21
+ </tm-sheet>
22
+ <tm-sheet>
23
+ <tm-text font-size="36" class="text-weight-b ">再组合一个吧</tm-text>
24
+ </tm-sheet>
25
+ <tm-sheet>
26
+ <view class="flex flex-row flex-row-center-between">
27
+ <view v-for="item1 in 3" :key="item1" style="width:30%">
28
+ <tm-skeleton height="90"></tm-skeleton>
29
+ <view class="mt-8">
30
+ <tm-skeleton height="20" class="mb-8" v-for="item in 3" :key="item"></tm-skeleton>
31
+ </view>
32
+ </view>
33
+ </view>
34
+ </tm-sheet>
35
+ <view style="height:50px"></view>
36
+ </view>
37
+ </template>
38
+
39
+ <script lang="ts" setup>
40
+ import {ref} from "vue"
41
+ </script>
42
+
43
+ <style>
44
+
45
+ </style>
@@ -0,0 +1,106 @@
1
+ <template>
2
+ <tm-sheet>
3
+ <tm-text class="text-weight-b d-block" font-size="36">规格选择器 TmSku</tm-text>
4
+ <view>
5
+ <tm-text>支持多规格单规格模式,快速的商品规格选择.</tm-text>
6
+ </view>
7
+ </tm-sheet>
8
+ <tm-sheet>
9
+ <tm-button block @click="openSku">打开sku</tm-button>
10
+ </tm-sheet>
11
+ <tm-sku :show-add-store="true" v-model="selectedVal" v-model:model-show="show" :data="product"></tm-sku>
12
+ </template>
13
+ <script lang="ts" setup>
14
+ import { ref } from 'vue'
15
+
16
+ const show = ref(false)
17
+ const selectedVal = ref('b-2')
18
+ const product : TM.SKU_DATA = {
19
+ data: [
20
+ {
21
+ id: 'color',
22
+ title: '颜色外观',
23
+ children: [
24
+ { id: 'a', title: '沙漠色' },
25
+ { id: 'b', title: '原色钛' }
26
+ ]
27
+ },
28
+ {
29
+ id: 'size',
30
+ title: '容量',
31
+ children: [
32
+ { id: '1', title: '256GB' },
33
+ { id: '2', title: '512GB', inventory_quantity: 0 },
34
+ { id: '3', title: '1TB' }
35
+ ]
36
+ }
37
+ ],
38
+ product: [
39
+ {
40
+ title: '沙漠色-256GB',
41
+ id: 'a-1',
42
+ inventory_quantity: 50,
43
+ max_buy_quantity: 1,
44
+ min_buy_quantity: 1,
45
+ original_price: 5999,
46
+ price: 4999,
47
+ img: 'https://img10.360buyimg.com/n1/s800x800_jfs/t1/264648/17/5056/33086/67715a61Ff394bd13/fc6bec790465ee36.png'
48
+ },
49
+ {
50
+ title: '沙漠色-512GB',
51
+ id: 'a-2',
52
+ inventory_quantity: 0,
53
+ max_buy_quantity: 2,
54
+ min_buy_quantity: 1,
55
+ original_price: 6999,
56
+ price: 5999,
57
+ img: 'https://img10.360buyimg.com/n1/s800x800_jfs/t1/264648/17/5056/33086/67715a61Ff394bd13/fc6bec790465ee36.png'
58
+ },
59
+ {
60
+ title: '沙漠色-1TB',
61
+ id: 'a-3',
62
+ inventory_quantity: 20,
63
+ max_buy_quantity: 1,
64
+ min_buy_quantity: 1,
65
+ original_price: 9999,
66
+ price: 8999,
67
+ img: 'https://img10.360buyimg.com/n1/s800x800_jfs/t1/264648/17/5056/33086/67715a61Ff394bd13/fc6bec790465ee36.png'
68
+ },
69
+ {
70
+ title: '原色钛-256GB',
71
+ id: 'b-1',
72
+ inventory_quantity: 50,
73
+ max_buy_quantity: 3,
74
+ min_buy_quantity: 1,
75
+ original_price: 5999,
76
+ price: 4999,
77
+ img: 'https://img10.360buyimg.com/n1/s450x450_jfs/t1/260596/18/5137/32821/67715a71F1daf206d/103e0ea83209d416.png'
78
+ },
79
+ {
80
+ title: '原色钛-512GB',
81
+ id: 'b-2',
82
+ inventory_quantity: 0,
83
+ max_buy_quantity: 1,
84
+ min_buy_quantity: 1,
85
+ original_price: 6999,
86
+ price: 5999,
87
+ img: 'https://img10.360buyimg.com/n1/s450x450_jfs/t1/260596/18/5137/32821/67715a71F1daf206d/103e0ea83209d416.png'
88
+ },
89
+ {
90
+ title: '原色钛-1TB',
91
+ id: 'b-3',
92
+ inventory_quantity: 50,
93
+ max_buy_quantity: 2,
94
+ min_buy_quantity: 1,
95
+ original_price: 9999,
96
+ price: 8999,
97
+ img: 'https://img10.360buyimg.com/n1/s450x450_jfs/t1/260596/18/5137/32821/67715a71F1daf206d/103e0ea83209d416.png'
98
+ }
99
+
100
+ ]
101
+ }
102
+ const openSku = () => {
103
+ show.value = true
104
+ }
105
+ </script>
106
+ <style lang="scss"></style>