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,70 @@
1
+ <template>
2
+ <tm-sheet>
3
+ <tm-text font-size="36" class="text-weight-b ">按钮 TmButton</tm-text>
4
+ <view class="mb-n8">
5
+ <tm-text>样式丰富塑造性好。</tm-text>
6
+ </view>
7
+
8
+ <view class="gap-15 flex flex-col">
9
+ <tm-button block>正常</tm-button>
10
+ <tm-button block color="warn">警告</tm-button>
11
+ <tm-button block color="error">错误</tm-button>
12
+ <tm-button block color="success">成功</tm-button>
13
+ <tm-button block color="danger">危险</tm-button>
14
+ <tm-button block color="info">次要</tm-button>
15
+ </view>
16
+ </tm-sheet>
17
+ <tm-sheet>
18
+ <tm-text font-size="36" class="text-weight-b mb-n8">大小</tm-text>
19
+ <view class="flex flex-row flex-row-top-start flex-wrap gap-15 mt-16">
20
+ <tm-button size="xs">极小</tm-button>
21
+ <tm-button size="s">小</tm-button>
22
+ <tm-button size="m">中等</tm-button>
23
+ <tm-button>默认</tm-button>
24
+ <tm-button size="g">大按钮</tm-button>
25
+ </view>
26
+ </tm-sheet>
27
+
28
+ <tm-sheet class="gap-15 flex flex-col">
29
+ <tm-text font-size="36" class="text-weight-b flex mb-n8">状态</tm-text>
30
+ <tm-button block :loading="true">加载中</tm-button>
31
+ <tm-button block :disabled="true">禁用</tm-button>
32
+ </tm-sheet>
33
+
34
+ <tm-sheet>
35
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">图标按钮</tm-text>
36
+ <view class="flex flex-row flex-row-top-start flex-wrap gap-15">
37
+ <tm-button icon="thumb-up-fill" size="n" btnIcon width="80" rounded></tm-button>
38
+ <tm-button icon="reply-line" color="error" size="n" btnIcon width="80" rounded></tm-button>
39
+ <tm-button icon="verified-badge-fill" skin="outlined" iconSize="52" size="n" btnIcon width="80"
40
+ rounded></tm-button>
41
+ <tm-button loading skin="outlined" btnIcon width="80" rounded></tm-button>
42
+ </view>
43
+ </tm-sheet>
44
+
45
+ <tm-sheet>
46
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">按钮样式</tm-text>
47
+ <view class="flex flex-row flex-row-top-start flex-wrap gap-15">
48
+ <tm-button loading skin="outlined">加载中</tm-button>
49
+ <tm-button skin="dashed" :round="[20, 0, 20, 0]">异形</tm-button>
50
+ <tm-button color="#4300B1" :linear="['45deg', '#A531DC', '#4300B1']">渐变</tm-button>
51
+ <tm-button skin="text">文本</tm-button>
52
+ <tm-button skin="thin">浅色</tm-button>
53
+ </view>
54
+ </tm-sheet>
55
+ <tm-sheet>
56
+ <tm-text font-size="36" class="text-weight-b mb-n8 d-block">渐变按钮</tm-text>
57
+ <view class="gap-15 flex flex-col">
58
+ <tm-button block :linear="['to right', '#FFEB3A', '#4DEF8E']">按钮</tm-button>
59
+ <tm-button block :linear="['to right', '#00B960', '#00552C']">按钮</tm-button>
60
+ <tm-button block :linear="['to right', '#DD7BFF', '#FF6C6C']">按钮</tm-button>
61
+ <tm-button block :linear="['to right', '#FFC328', '#E20000']">按钮</tm-button>
62
+ </view>
63
+ </tm-sheet>
64
+ </template>
65
+
66
+ <script setup>
67
+ import { ref } from "vue";
68
+ </script>
69
+
70
+ <style></style>
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="32" class=" text-weight-b mb-16 d-block">日历 tmCalendarMultiple</tm-text>
5
+ <tm-text class="" color="#999999">
6
+ 可以多选,单选,同天不可选(酒店)模式
7
+ </tm-text>
8
+ </tm-sheet>
9
+
10
+
11
+ <tm-sheet :padding="0" class="overflow">
12
+ <tm-calendar-multiple head-bg-color="primary" v-model:currentDate="currentDate"
13
+ :date-style="dateStyle"
14
+ head-font-color="#fff" :seekDay="6" v-model="dates" model="range" ></tm-calendar-multiple>
15
+ <view class="pa-16">
16
+ <tm-button block @click="setdate">赋值</tm-button>
17
+ </view>
18
+ </tm-sheet>
19
+ <tm-sheet>
20
+ <tm-text font-size="32" class=" text-weight-b mb-16 d-block">单选模式</tm-text>
21
+ <tm-text class="mb-n8" color="#999999">
22
+ {{days}}
23
+ </tm-text>
24
+ </tm-sheet>
25
+ <tm-sheet :padding="0" class="overflow">
26
+ <tm-calendar-multiple color="error" head-bg-color="error" head-font-color="#fff" :multipleMax="1" :seekDay="6" v-model="days" model="day" ></tm-calendar-multiple>
27
+ </tm-sheet>
28
+ </view>
29
+ </template>
30
+
31
+ <script lang="ts" setup>
32
+ import { ref,nextTick } from "vue"
33
+ const dateStyle = ref<TM.tmCalendarDateStyle_type[]>([])
34
+ const dates = ref<string[]>([])
35
+ const currentDate = ref<string>('')
36
+ const days = ref<string[]>([])
37
+
38
+ const setdate = ()=> {
39
+ dates.value = ['2024-5-1','2024-5-8']
40
+ currentDate.value = "2024-5-1"
41
+ nextTick(()=>{
42
+ dateStyle.value = [
43
+ { date: '2024-5-3', color: '#00aa7f', label: '推荐', fontColor: 'white' },
44
+ { date: '2024-5-20', label: '完成', fontColor: 'orange' },
45
+ { date: '2024-5-21', label: '爆满', fontColor: 'red' },
46
+ { date: '2024-5-31', label: '禁用' },
47
+ { date: '2024-5-18', dot: true },
48
+ { date: '2024-5-17', dot: true, dotColor: "orange", dotLabel: "36" },
49
+ { date: '2024-5-1', dot: true, dotColor: "#52c428", dotLabel: "假", label: "劳动节", fontColor: "#52c428" },
50
+ { date: '2024-5-4', dot: true, dotColor: "#aa55ff", dotLabel: "休", label: "劳动节", fontColor: "#52c428" },
51
+ ]
52
+ })
53
+ }
54
+
55
+ </script>
56
+
57
+ <style></style>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="32" class=" text-weight-b d-block">列表 tmCell</tm-text>
5
+ <tm-text class="" color="#999999">
6
+ 承载通用列表使用
7
+ </tm-text>
8
+ </tm-sheet>
9
+ <tm-cell url="/pages/index/button" icon="apps-line" title="常见组件库"></tm-cell>
10
+ <tm-cell url="/pages/index/icon" icon="archive-2-line" label="+¥32非卡片模式非卡片模式" label-color="red"
11
+ icon-color="red"></tm-cell>
12
+ <tm-cell title="APP赊购" url="/pages/index/tag" icon="price-tag-3-line" label="tmx测试"
13
+ icon-color="green"></tm-cell>
14
+
15
+ <tm-sheet :margin="['24']">
16
+ <tm-text font-size="32" class=" text-weight-b d-block">非卡片模式 Cell</tm-text>
17
+ <tm-text class="" color="#999999">
18
+ 底边线可以左对齐或者右内对齐。
19
+ </tm-text>
20
+ </tm-sheet>
21
+
22
+ <tm-sheet :padding="['0']" class="overflow">
23
+ <tm-cell :bottomBorderInsert="true" :card="false" url="/pages/index/button" icon="stack-line"
24
+ desc="UTS版本tmui组件库,高质量库" title="常见组件库"></tm-cell>
25
+ <tm-cell title="程序设置" :bottomBorderInsert="true" :card="false" url="/pages/index/icon"
26
+ icon="price-tag-3-line" label="+¥32" label-color="red" icon-color="red"></tm-cell>
27
+ <tm-cell title="美丽的国度" :bottomBorderInsert="true" :card="false" icon="chat-smile-2-line"
28
+ url="/pages/index/tag" label="tmx测试" icon-color="orange"></tm-cell>
29
+ <tm-cell title="标签页面" :bottomBorderInsert="true" :card="false" :show-bottom-border="false"
30
+ icon="calendar-schedule-line" url="/pages/index/tag" label="tmx测试" icon-color="orange"></tm-cell>
31
+ </tm-sheet>
32
+ </view>
33
+ </template>
34
+
35
+ <script lang="ts" setup>
36
+ import { ref } from "vue"
37
+ </script>
38
+
39
+ <style></style>
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="32" class=" text-weight-b mb-16 d-block">单选框</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-checkbox label="苹果"></tm-checkbox>
14
+ <tm-checkbox color="success" label="梨子"></tm-checkbox>
15
+ <tm-checkbox color="error" label="香蕉"></tm-checkbox>
16
+ <tm-checkbox color="warn" label="地瓜"></tm-checkbox>
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-checkbox-group @change="onchange" v-model="checkboxValue">
22
+ <tm-checkbox v-for="(item, index) in ['苹果', '梨子', '香蕉', '地瓜', '花生']" :key="index" :value="item"
23
+ :label="item"></tm-checkbox>
24
+ </tm-checkbox-group>
25
+ <tm-sheet color="info" padding="24" :margin="[0, 24, 0, 0]"><tm-text>{{ checkboxValue }}</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-checkbox-group v-model="checkboxValue2" direction="column">
33
+ <tm-sheet :color="checkboxValue2.includes(item.id) ? 'primary' : 'white'" v-for="(item, index) in listview"
34
+ :key="index" :margin="[24, 0]" padding="0" class="flex-1">
35
+ <tm-checkbox class="pa-20" :color="checkboxValue2.includes(item.id) ? 'warn' : 'primary'"
36
+ :value="item.id">
37
+ <template v-slot:label="checked">
38
+ <tm-text :color="checkboxValue2.includes(item.id) ? '#fff' : '#333'">{{ item.text }}</tm-text>
39
+ </template>
40
+ </tm-checkbox>
41
+ </tm-sheet>
42
+ </tm-checkbox-group>
43
+
44
+ <tm-sheet :margin="['24']">
45
+ <tm-text font-size="32" class=" text-weight-b d-block mb-n8">限制数量为2</tm-text>
46
+ <tm-checkbox-group :max="2">
47
+ <tm-checkbox v-for="(item, index) in ['苹果', '梨子', '香蕉', '地瓜', '花生']" :key="index" :value="item"
48
+ :label="item"></tm-checkbox>
49
+ </tm-checkbox-group>
50
+
51
+ </tm-sheet>
52
+
53
+ <view class="py-20"></view>
54
+ </view>
55
+ </template>
56
+
57
+ <script lang="ts" setup>
58
+ import { ref } from "vue"
59
+ const checkboxValue = ref<string[]>([])
60
+ const checkboxValue2 = ref<Array<string | number | boolean>>([])
61
+ const listview = ref<Array<Record<string, any>>>([
62
+ { text: "科技创新引领制造业高质量发展", id: 1 },
63
+ { text: "明确提出“建立保持制造业合理比重投入机制”。这些都为以科技创新引领制造业高质量发展指明了道路和方向。", id: 2 },
64
+ { text: "改造提升传统产业,培育壮大新兴产业,布局建设未来产业,完善现代化产业体系", id: 3 },
65
+ ])
66
+ const onchange = (val: any) => {
67
+ // console.log(val,'**')
68
+ }
69
+ </script>
70
+
71
+ <style></style>
@@ -0,0 +1,69 @@
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">圆环进度条 TmCircleProgress</tm-text>
15
+ <tm-text class="" color="#999999">
16
+ 配置灵活,自由度高。
17
+ </tm-text>
18
+ </tm-sheet>
19
+
20
+
21
+ <tm-sheet class="flex gap-10 flex-row">
22
+ <tm-circle-progress :model-value="50" line-width="20" color="primary"></tm-circle-progress>
23
+ <tm-circle-progress :model-value="50" line-width="16" color="warn"></tm-circle-progress>
24
+ <tm-circle-progress :model-value="50" line-width="8" color="error"></tm-circle-progress>
25
+ <tm-circle-progress :model-value="50" label-color="#FF6C6C"
26
+ linear-color="linear-gradient(to right, #DD7BFF 0%, #FF6C6C 100%)"></tm-circle-progress>
27
+ </tm-sheet>
28
+
29
+ <tm-sheet>
30
+ <tm-text font-size="32" class=" text-weight-b mb-n8 d-block">改变它的起始角度</tm-text>
31
+
32
+ <view class="flex gap-10">
33
+ <tm-circle-progress :model-value="50" :start-angle="-90"></tm-circle-progress>
34
+ <tm-circle-progress :model-value="50" :start-angle="90"></tm-circle-progress>
35
+ <tm-circle-progress :model-value="50" :start-angle="180"></tm-circle-progress>
36
+ </view>
37
+ </tm-sheet>
38
+
39
+ <tm-sheet>
40
+ <tm-text font-size="32" class=" text-weight-b n8 d-block">受控及动画演示</tm-text>
41
+ <tm-text color="#999999" class=" mb-n8 ">
42
+ 演示标签插槽,状态自定义,渐变,自定颜色等属性。
43
+ </tm-text>
44
+ <view class="flex flex-row gap-10 mt-n8">
45
+ <tm-circle-progress v-model="value"></tm-circle-progress>
46
+ <tm-circle-progress v-model="value" :color="value > 50 ? 'success' : 'primary'"></tm-circle-progress>
47
+ <tm-circle-progress v-model="value" :color="value > 50 ? 'success' : 'warn'">
48
+ <template v-slot:default="{ value, percentage }">
49
+ <tm-icon color="success" v-if="percentage > 80" name="checkbox-circle-line"></tm-icon>
50
+ <tm-icon color="warn" v-else name="close-circle-line"></tm-icon>
51
+ </template>
52
+ </tm-circle-progress>
53
+ <tm-circle-progress v-model="value" label-color="#4DEF8E"
54
+ linear-color="linear-gradient(to right, #FFEB3A 0%, #4DEF8E 100%)"></tm-circle-progress>
55
+
56
+ </view>
57
+ <view class="flex flex-row gap-10 mt-n8">
58
+ <tm-tag @click="value = 10">10</tm-tag>
59
+ <tm-tag @click="value = 50">50</tm-tag>
60
+ <tm-tag @click="value = 100">100</tm-tag>
61
+ </view>
62
+ </tm-sheet>
63
+
64
+
65
+ </view>
66
+
67
+ </template>
68
+
69
+ <style scoped></style>
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="36" class=" text-weight-b mb-8">验证码输入 tmCodeInput</tm-text>
5
+ <tm-text class="" color="#999999">提供了两种方式,自带输入框输入,以及配合我的keyborad键盘。</tm-text>
6
+ </tm-sheet>
7
+
8
+ <tm-sheet>
9
+ <tm-text font-size="36" class=" text-weight-b mb-n8">自动拉起系统键盘</tm-text>
10
+ <tm-code-input v-model="value" @confirm="ok" gutter="4" :maxlength="6" width="88" height="88"
11
+ :autoFocus="true"></tm-code-input>
12
+ </tm-sheet>
13
+
14
+ <!-- <tm-sheet>
15
+ <tm-text font-size="36" class=" text-weight-b mb-n8">关闭系统键盘使用组件键盘</tm-text>
16
+ <tm-code-input place-shape="line" @click="showkey=true" @confirm="showkey = false" v-model="value" :useSysKeyborad="false" skin="fill"></tm-code-input>
17
+ </tm-sheet>
18
+ <tm-keyboard-number :max-len="4" v-model:modelShow="showkey" v-model="value"></tm-keyboard-number> -->
19
+ <view style="height: 400px;"></view>
20
+ </view>
21
+ </template>
22
+
23
+ <script lang="ts" setup>
24
+ import { onReady } from '@dcloudio/uni-app'
25
+ import { ref } from 'vue'
26
+ const value = ref("")
27
+ const ok = () => {
28
+ uni.showToast({
29
+ title: "验证成功",
30
+ mask: true
31
+ })
32
+ }
33
+
34
+ </script>
35
+
36
+ <style></style>
@@ -0,0 +1,76 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="36" class=" text-weight-b mb-8">折叠面板 Collapse</tm-text>
5
+ <tm-text class="" color="#999999">允许单开,和多开。同步的值不管你提供的是什么类型,最终会被同步成数组.</tm-text>
6
+ </tm-sheet>
7
+ <tm-sheet :padding="0" class=" overflow">
8
+ <tm-collapse>
9
+ <tm-collapse-item left-icon="settings-line" name="1" title="系统设置">
10
+ <tm-text class="line-10">
11
+ 在贴牌代工这一业务方面,据阿宽食品官网显示,其公司旗下拥有全资及绝对控股的五大生产基地,分别是:成都龙泉驿工厂、北京顺义工厂、杭州富阳工厂、四川宜宾工厂、四川德阳工厂。
12
+ 根据光大证券研究所数据,2018年-2021年,阿宽销售额复合增长率在行业前十厂商中排名第1,2021年的方便面销售额已位居内资品牌前3。
13
+ </tm-text>
14
+ <view class="fletm-1">
15
+ <tm-image width="100%"
16
+ src="https://picsum.photos/800/400?random=9"></tm-image>
17
+ </view>
18
+ </tm-collapse-item>
19
+ <tm-collapse-item :showBottomLine="false" left-icon="question-line" name="2"
20
+ title="交易帮助信息提示交易帮助信息提示交易交易帮助信息提示帮助信息提示交易帮助信息提示">
21
+ <tm-text class="line-10">
22
+ 在贴牌代工这一业务方面,据阿宽食品官网显示,其公司旗下拥有全资及绝对控股的五大生产基地,分别是:成都龙泉驿工厂、北京顺义工厂、杭州富阳工厂、四川宜宾工厂、四川德阳工厂。
23
+ 根据光大证券研究所数据,2018年-2021年,阿宽销售额复合增长率在行业前十厂商中排名第1,2021年的方便面销售额已位居内资品牌前3。
24
+ </tm-text>
25
+ </tm-collapse-item>
26
+ </tm-collapse>
27
+ </tm-sheet>
28
+
29
+ <tm-sheet>
30
+ <tm-text font-size="36" class="text-weight-b ">只能展开一个</tm-text>
31
+ </tm-sheet>
32
+
33
+ <tm-sheet :padding="0" class=" overflow">
34
+ <tm-collapse :multiple="false">
35
+ <tm-collapse-item left-icon="mail-open-fill" name="3" title="如何提高低成本的效率">
36
+ <tm-text class="">
37
+ 在贴牌代工这一业务方面,据阿宽食品官网显示,其公司旗下拥有全资及绝对控股的五大生产基地,分别是:成都龙泉驿工厂、北京顺义工厂、杭州富阳工厂、四川宜宾工厂、四川德阳工厂。
38
+ 根据光大证券研究所数据,2018年-2021年,阿宽销售额复合增长率在行业前十厂商中排名第1,2021年的方便面销售额已位居内资品牌前3。
39
+ </tm-text>
40
+ </tm-collapse-item>
41
+ <tm-collapse-item left-icon="mail-send-fill" name="1" title="如何使用本UI组件库,会很难吗?">
42
+ <tm-text class="line-10">
43
+ 在贴牌代工这一业务方面,据阿宽食品官网显示,其公司旗下拥有全资及绝对控股的五大生产基地,分别是:成都龙泉驿工厂、北京顺义工厂、杭州富阳工厂、四川宜宾工厂、四川德阳工厂。
44
+ 根据光大证券研究所数据,2018年-2021年,阿宽销售额复合增长率在行业前十厂商中排名第1,2021年的方便面销售额已位居内资品牌前3。
45
+
46
+ </tm-text>
47
+ <view class="">
48
+ <tm-image width="100%"
49
+ src="https://picsum.photos/800/400?random=9"></tm-image>
50
+ </view>
51
+ </tm-collapse-item>
52
+ <tm-collapse-item :disabled="true" left-icon="cloud-fill" name="6" title="如何使用本UI组件库,会很难吗?">
53
+ <tm-text class="line-10">
54
+ 在贴牌代工这一业务方面,据阿宽食品官网显示,其公司旗下拥有全资及绝对控股的五大生产基地,分别是:成都龙泉驿工厂、北京顺义工厂、杭州富阳工厂、四川宜宾工厂、四川德阳工厂。
55
+ 根据光大证券研究所数据,2018年-2021年,阿宽销售额复合增长率在行业前十厂商中排名第1,2021年的方便面销售额已位居内资品牌前3。
56
+ </tm-text>
57
+
58
+ </tm-collapse-item>
59
+ <tm-collapse-item :showBottomLine="false" left-icon="bar-chart-2-fill" name="2" title="如何提高低成本的效率">
60
+ <tm-text class="line-10">
61
+
62
+ 在贴牌代工这一业务方面,据阿宽食品官网显示,其公司旗下拥有全资及绝对控股的五大生产基地,分别是:成都龙泉驿工厂、北京顺义工厂、杭州富阳工厂、四川宜宾工厂、四川德阳工厂。
63
+ 根据光大证券研究所数据,2018年-2021年,阿宽销售额复合增长率在行业前十厂商中排名第1,2021年的方便面销售额已位居内资品牌前3。
64
+ </tm-text>
65
+ </tm-collapse-item>
66
+ </tm-collapse>
67
+ </tm-sheet>
68
+ </view>
69
+ </template>
70
+
71
+ <script setup lang="ts">
72
+ import { ref } from 'vue'
73
+
74
+ </script>
75
+
76
+ <style></style>
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <view>
3
+ <tm-sheet>
4
+ <tm-text font-size="36" class=" text-weight-b mb-8">倒计时 tmCountdown</tm-text>
5
+ <tm-text class="" color="#999999" >倒计时,可以精确到秒,毫秒,尽量通过插槽来布局样式。</tm-text>
6
+ </tm-sheet>
7
+ <tm-sheet >
8
+ <view class="flex flex-row flex-row-center-center" >
9
+ <tm-countdown font-size="40" color="primary" :time="1000*59" v-model:actions="actions"></tm-countdown>
10
+ </view>
11
+ <view class="flex flex-row flex-row-center-center mt-n8">
12
+ <tm-button width="26%" @click="actions = 'play'">开始</tm-button>
13
+ <tm-button width="26%" @click="actions = 'pause'" class="mx-20">暂停</tm-button>
14
+ <tm-button width="26%" @click="actions = 'reset'">重置</tm-button>
15
+ </view>
16
+ </tm-sheet>
17
+
18
+ <tm-sheet >
19
+ <view class="flex flex-row flex-row-center-center" >
20
+ <tm-countdown font-size="40" color="error" unit="ms" format="SS:MS" :time="1000*5" v-model:actions="actions2"></tm-countdown>
21
+ </view>
22
+ <view class="flex flex-row flex-row-center-center mt-n8">
23
+ <tm-button width="26%" @click="actions2 = 'play'">开始</tm-button>
24
+ <tm-button width="26%" @click="actions2 = 'pause'" class="mx-20">暂停</tm-button>
25
+ <tm-button width="26%" @click="actions2 = 'reset'">重置</tm-button>
26
+ </view>
27
+ </tm-sheet>
28
+ </view>
29
+ </template>
30
+
31
+
32
+ <script lang="ts" setup>
33
+ import {ref} from "vue"
34
+ const actions = ref<"pause" | "play" | "reset" | "">("")
35
+ const actions2 = ref<"pause" | "play" | "reset" | "">("")
36
+ </script>
37
+ <style lang="scss">
38
+
39
+ </style>
@@ -0,0 +1,138 @@
1
+ <script setup lang="ts">
2
+ import { ref } from "vue"
3
+ const show = ref(false)
4
+ const beforeClose = () => {
5
+ return new Promise<boolean>((resolve) => {
6
+ setTimeout(() => {
7
+ resolve(true)
8
+ }, 3000)
9
+ })
10
+ }
11
+ </script>
12
+ <template>
13
+ <view>
14
+ <tm-sheet>
15
+ <tm-text font-size="36" class=" text-weight-b mb-16 d-block">抽屉 Drawer</tm-text>
16
+ <tm-text class="mb-n8" color="#999999">
17
+ 提供四个方向的弹出,如果要居中显示,请使用overlay组件。可以设置高为auto,百分比,最大值
18
+ 可以是插槽触发或者变量控制触发
19
+ </tm-text>
20
+ </tm-sheet>
21
+ <tm-sheet class="flex flex-row flex-row-center-between">
22
+ <tm-drawer style="width:24%" size="80%" position="left">
23
+ <template #trigger><tm-button :block="true">左弹出</tm-button></template>
24
+ <tm-picker-date>
25
+ <tm-button :block="true">左弹出</tm-button>
26
+ </tm-picker-date>
27
+ </tm-drawer>
28
+ <tm-drawer style="width:24%" position="right">
29
+ <template #trigger><tm-button :block="true">右弹出</tm-button></template>
30
+ </tm-drawer>
31
+ <tm-drawer :swiper-len-close="100" style="width:24%" :show-title="false" :show-close="true" position="top">
32
+ <tm-text>此弹层有内容开启了事件协商和手势关闭,向上滑一定的距离能关闭弹层。</tm-text>
33
+ <template #trigger><tm-button :block="true">顶弹出</tm-button></template>
34
+ </tm-drawer>
35
+ <tm-drawer style="width:24%" :show-close="true" position="bottom">
36
+ <template #trigger>
37
+ <tm-button :block="true">底弹出</tm-button>
38
+ </template>
39
+ </tm-drawer>
40
+ </tm-sheet>
41
+
42
+
43
+ <tm-sheet>
44
+ <tm-text font-size="36" class=" text-weight-b mb-n8 d-block">嵌套</tm-text>
45
+ <tm-drawer :show-footer="true" size="auto">
46
+ <template v-slot:trigger><tm-button color="success" :block="true">打开嵌套</tm-button></template>
47
+
48
+ <tm-drawer size="auto">
49
+ <template v-slot:trigger><tm-button :block="true">打开嵌套1</tm-button></template>
50
+ <tm-text class="text-size-m text-grey line-8">当前弹层内容为自动高度</tm-text>
51
+ <tm-drawer size="auto">
52
+ <template v-slot:trigger><tm-button color="success" :block="true">打开嵌套2</tm-button></template>
53
+ <tm-text class="text-size-m text-grey line-8">当前弹层内容为自动高度</tm-text>
54
+ </tm-drawer>
55
+ </tm-drawer>
56
+ </tm-drawer>
57
+
58
+ </tm-sheet>
59
+ <tm-sheet>
60
+ <tm-text font-size="36" class=" text-weight-b mb-n8 d-block">确认前异步执行beforeClose</tm-text>
61
+ <tm-drawer :beforeClose="beforeClose" :show-footer="true">
62
+ <template v-slot:trigger><tm-button color="warn" :block="true">打开</tm-button></template>
63
+ <tm-text>点确认 按钮,会等待3秒再关闭。</tm-text>
64
+ </tm-drawer>
65
+ </tm-sheet>
66
+
67
+ <tm-sheet>
68
+ <tm-text font-size="36" class=" text-weight-b mb-10 d-block">默认高度,禁用遮罩关闭</tm-text>
69
+ <tm-text color="#999999" class="mb-n8 d-block">
70
+ 点击遮罩禁用关闭,同时内容出现弹跳提示
71
+ </tm-text>
72
+
73
+ <tm-drawer :overlayClick="false" :show-close="true" :showCancel="false" size="550rpx" title="请阅读协议"
74
+ confirmText="我已阅读" position="right">
75
+ <template #trigger><tm-button :block="true" color="error">禁用遮罩,弹跳提醒</tm-button></template>
76
+ <tm-text color="#999999">
77
+ 精致美观的对话框,可全局配置风格
78
+ 精致美观的对话框,可全局配置风格
79
+ 精致美观的对话框,可全局配置风格
80
+ 精致美观的对话框,可全局配置风格
81
+ 精致美观的对话框,可全局配置风格
82
+ 精致美观的对话框,可全局配置风格
83
+ 精致美观的对话框,可全局配置风格
84
+ 精致美观的对话框,可全局配置风格
85
+ 精致美观的对话框,可全局配置风格
86
+ 精致美观的对话框,可全局配置风格
87
+ 精致美观的对话框,可全局配置风格
88
+ 精致美观的对话框,可全局配置风格
89
+ 精致美观的对话框,可全局配置风格
90
+ 精致美观的对话框,可全局配置风格
91
+ </tm-text>
92
+ </tm-drawer>
93
+ </tm-sheet>
94
+
95
+ <tm-sheet>
96
+ <tm-text font-size="36" class=" text-weight-b mb-n8 d-block">底部插槽及变量控制显示</tm-text>
97
+ <tm-button @click="show = true" :block="true">打开</tm-button>
98
+ <tm-drawer v-model:show="show" title="内容可滚动" size="30%" position="bottom" :show-footer="true">
99
+ <tm-text color="#999999">
100
+ 精致美观的对话框,可全局配置风格
101
+ 精致美观的对话框,可全局配置风格
102
+ 精致美观的对话框,可全局配置风格
103
+ 精致美观的对话框,可全局配置风格
104
+ 精致美观的对话框,可全局配置风格
105
+ 精致美观的对话框,可全局配置风格
106
+ 精致美观的对话框,可全局配置风格
107
+ 精致美观的对话框,可全局配置风格
108
+ 精致美观的对话框,可全局配置风格
109
+ 精致美观的对话框,可全局配置风格
110
+ 精致美观的对话框,可全局配置风格
111
+ 精致美观的对话框,可全局配置风格
112
+ 精致美观的对话框,可全局配置风格
113
+ 精致美观的对话框,可全局配置风格
114
+ 精致美观的对话框,可全局配置风格
115
+ 精致美观的对话框,可全局配置风格
116
+ 精致美观的对话框,可全局配置风格
117
+ 精致美观的对话框,可全局配置风格
118
+ 精致美观的对话框,可全局配置风格
119
+ 精致美观的对话框,可全局配置风格
120
+ 精致美观的对话框,可全局配置风格
121
+ 精致美观的对话框,可全局配置风格
122
+ 精致美观的对话框,可全局配置风格
123
+ 精致美观的对话框,可全局配置风格
124
+ 精致美观的对话框,可全局配置风格
125
+ 精致美观的对话框,可全局配置风格
126
+ 精致美观的对话框,可全局配置风格
127
+ 精致美观的对话框,可全局配置风格
128
+ </tm-text>
129
+ <template #footer>
130
+ <tm-button @click="show = false" :block="true" color="red" class="flex-1">定义底部插槽</tm-button>
131
+ </template>
132
+ </tm-drawer>
133
+ </tm-sheet>
134
+
135
+ <view style="height:50px"></view>
136
+
137
+ </view>
138
+ </template>