@thestarweb/ui 1.7.0 → 2.0.0-beta.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 (256) hide show
  1. package/dist/_virtual/_plugin-vue_export-helper.mjs +7 -0
  2. package/dist/components/base/button/button.vue.mjs +5 -0
  3. package/dist/components/base/button/button.vue_vue_type_script_setup_true_lang.mjs +27 -0
  4. package/dist/components/base/button/index.mjs +1 -0
  5. package/dist/components/base/index.mjs +2 -0
  6. package/dist/components/data/card/card.vue.mjs +5 -0
  7. package/dist/components/data/card/card.vue_vue_type_script_setup_true_lang.mjs +50 -0
  8. package/dist/components/data/card/index.mjs +1 -0
  9. package/dist/components/data/index.mjs +11 -0
  10. package/dist/components/data/popover/index.mjs +1 -0
  11. package/dist/components/data/popover/popover.vue.mjs +5 -0
  12. package/dist/components/data/popover/popover.vue_vue_type_script_setup_true_lang.mjs +123 -0
  13. package/dist/components/data/popover/utils.mjs +68 -0
  14. package/dist/components/data/table/index.mjs +1 -0
  15. package/dist/components/data/table/table.vue.mjs +5 -0
  16. package/dist/components/data/table/table.vue_vue_type_script_setup_true_lang.mjs +45 -0
  17. package/dist/components/data/tag/index.mjs +1 -0
  18. package/dist/components/data/tag/tag.vue.mjs +5 -0
  19. package/dist/components/data/tag/tag.vue_vue_type_script_setup_true_lang.mjs +21 -0
  20. package/dist/components/data/tree/index.mjs +1 -0
  21. package/dist/components/data/tree/tree-item.vue.mjs +5 -0
  22. package/dist/components/data/tree/tree-item.vue_vue_type_script_setup_true_lang.mjs +77 -0
  23. package/dist/components/data/tree/tree-raw.vue.mjs +5 -0
  24. package/dist/components/data/tree/tree-raw.vue_vue_type_script_setup_true_lang.mjs +104 -0
  25. package/dist/components/data/tree/tree.vue.mjs +4 -0
  26. package/dist/components/data/tree/tree.vue_vue_type_script_setup_true_lang.mjs +60 -0
  27. package/dist/components/data/tree/utils.mjs +66 -0
  28. package/dist/components/form/checkbox/checkbox.vue.mjs +5 -0
  29. package/dist/components/form/checkbox/checkbox.vue_vue_type_script_setup_true_lang.mjs +50 -0
  30. package/dist/components/form/checkbox/index.mjs +1 -0
  31. package/dist/components/form/index.mjs +11 -0
  32. package/dist/components/form/input/index.mjs +1 -0
  33. package/dist/components/form/input/input.vue.mjs +5 -0
  34. package/dist/components/form/input/input.vue_vue_type_script_setup_true_lang.mjs +34 -0
  35. package/dist/components/form/select/index.mjs +1 -0
  36. package/dist/components/form/select/select.vue.mjs +5 -0
  37. package/dist/components/form/select/select.vue_vue_type_script_setup_true_lang.mjs +148 -0
  38. package/dist/components/form/slider/index.mjs +1 -0
  39. package/dist/components/form/slider/slider.vue.mjs +5 -0
  40. package/dist/components/form/slider/slider.vue_vue_type_script_setup_true_lang.mjs +67 -0
  41. package/dist/components/form/switch/index.mjs +1 -0
  42. package/dist/components/form/switch/switch.vue.mjs +5 -0
  43. package/dist/components/form/switch/switch.vue_vue_type_script_setup_true_lang.mjs +38 -0
  44. package/dist/components/index.mjs +21 -0
  45. package/dist/components/layout/index.mjs +4 -0
  46. package/dist/components/layout/layout/index.mjs +9 -0
  47. package/dist/components/layout/layout/layout-dividing.vue.mjs +10 -0
  48. package/dist/components/layout/layout/layout-main.vue.mjs +10 -0
  49. package/dist/components/layout/layout/layout.vue.mjs +5 -0
  50. package/dist/components/layout/layout/layout.vue_vue_type_script_setup_true_lang.mjs +14 -0
  51. package/dist/components/layout/page/Page.vue.mjs +5 -0
  52. package/dist/components/layout/page/Page.vue_vue_type_script_setup_true_lang.mjs +63 -0
  53. package/dist/components/layout/page/index.mjs +1 -0
  54. package/dist/components/other/calendar/calendar.vue.mjs +5 -0
  55. package/dist/components/other/calendar/calendar.vue_vue_type_script_setup_true_lang.mjs +103 -0
  56. package/dist/components/other/calendar/index.mjs +1 -0
  57. package/dist/components/other/index.mjs +5 -0
  58. package/dist/components/other/menu/index.mjs +1 -0
  59. package/dist/components/other/menu/index.vue.mjs +5 -0
  60. package/dist/components/other/menu/index.vue_vue_type_script_setup_true_lang.mjs +22 -0
  61. package/dist/components/other/menu/menu-h/index.vue.mjs +5 -0
  62. package/dist/components/other/menu/menu-h/index.vue_vue_type_script_setup_true_lang.mjs +22 -0
  63. package/dist/components/other/menu/menu-h/menu-h-item.vue.mjs +5 -0
  64. package/dist/components/other/menu/menu-h/menu-h-item.vue_vue_type_script_setup_true_lang.mjs +30 -0
  65. package/dist/components/other/menu/menu-v/index.vue.mjs +4 -0
  66. package/dist/components/other/menu/menu-v/index.vue_vue_type_script_setup_true_lang.mjs +33 -0
  67. package/dist/context/index.mjs +1 -0
  68. package/dist/context/is-mobile.mjs +10 -0
  69. package/dist/icons/arrow-down.svg_component.mjs +12 -0
  70. package/dist/icons/arrow-right.svg_component.mjs +12 -0
  71. package/dist/icons/home.svg_component.mjs +12 -0
  72. package/dist/icons/index.mjs +5 -0
  73. package/dist/icons/menu.svg_component.mjs +12 -0
  74. package/dist/index.mjs +20 -0
  75. package/dist/style.css +2 -0
  76. package/dist/utils/index.mjs +9 -0
  77. package/dist/utils/z-index.mjs +6 -0
  78. package/package.json +33 -81
  79. package/types/src/components/base/button/button.vue.d.ts +21 -0
  80. package/types/src/components/base/button/example/base.vue.d.ts +3 -0
  81. package/types/src/components/base/button/index.d.ts +1 -0
  82. package/types/src/components/base/index.d.ts +1 -0
  83. package/types/src/components/data/card/card.vue.d.ts +32 -0
  84. package/types/src/components/data/card/index.d.ts +1 -0
  85. package/types/src/components/data/index.d.ts +5 -0
  86. package/types/src/components/data/pagination/example/base.vue.d.ts +3 -0
  87. package/types/src/components/data/pagination/index.d.ts +1 -0
  88. package/types/src/components/data/pagination/pagination.vue.d.ts +20 -0
  89. package/types/src/components/data/popover/example/base.vue.d.ts +3 -0
  90. package/types/src/components/data/popover/index.d.ts +1 -0
  91. package/types/src/components/data/popover/popover.vue.d.ts +39 -0
  92. package/types/src/components/data/popover/type.d.ts +1 -0
  93. package/types/src/components/data/popover/utils.d.ts +12 -0
  94. package/types/src/components/data/table/example/base.vue.d.ts +3 -0
  95. package/types/src/components/data/table/example/render.vue.d.ts +3 -0
  96. package/types/src/components/data/table/index.d.ts +2 -0
  97. package/types/src/components/data/table/table.vue.d.ts +36 -0
  98. package/types/src/components/data/table/types.d.ts +12 -0
  99. package/types/src/components/data/tag/example/base.vue.d.ts +3 -0
  100. package/types/src/components/data/tag/index.d.ts +1 -0
  101. package/types/src/components/data/tag/tag.vue.d.ts +20 -0
  102. package/types/src/components/data/tree/example/base.vue.d.ts +3 -0
  103. package/types/src/components/data/tree/index.d.ts +2 -0
  104. package/types/src/components/data/tree/tree-item.vue.d.ts +36 -0
  105. package/types/src/components/data/tree/tree-raw.vue.d.ts +47 -0
  106. package/types/src/components/data/tree/tree.vue.d.ts +34 -0
  107. package/types/src/components/data/tree/type.d.ts +40 -0
  108. package/types/src/components/data/tree/utils.d.ts +10 -0
  109. package/types/src/components/form/checkbox/checkbox.vue.d.ts +32 -0
  110. package/types/src/components/form/checkbox/example/base.vue.d.ts +3 -0
  111. package/types/src/components/form/checkbox/example/group.vue.d.ts +3 -0
  112. package/types/src/components/form/checkbox/index.d.ts +1 -0
  113. package/types/src/components/form/index.d.ts +5 -0
  114. package/types/src/components/form/input/example/base.vue.d.ts +3 -0
  115. package/types/src/components/form/input/index.d.ts +1 -0
  116. package/types/src/components/form/input/input.vue.d.ts +17 -0
  117. package/types/src/components/form/select/example/base.vue.d.ts +3 -0
  118. package/types/src/components/form/select/example/tree-select.vue.d.ts +3 -0
  119. package/types/src/components/form/select/index.d.ts +2 -0
  120. package/types/src/components/form/select/select.vue.d.ts +25 -0
  121. package/types/src/components/form/select/types.d.ts +25 -0
  122. package/types/src/components/form/slider/example/base.vue.d.ts +3 -0
  123. package/types/src/components/form/slider/index.d.ts +1 -0
  124. package/types/src/components/form/slider/slider.vue.d.ts +19 -0
  125. package/types/src/components/form/switch/example/base.vue.d.ts +3 -0
  126. package/types/src/components/form/switch/index.d.ts +1 -0
  127. package/types/src/components/form/switch/switch.vue.d.ts +17 -0
  128. package/types/src/components/index.d.ts +5 -0
  129. package/types/src/components/layout/index.d.ts +2 -0
  130. package/types/src/components/layout/layout/index.d.ts +42 -0
  131. package/types/src/components/layout/layout/layout-dividing.vue.d.ts +3 -0
  132. package/types/src/components/layout/layout/layout-main.vue.d.ts +15 -0
  133. package/types/src/components/layout/layout/layout.vue.d.ts +18 -0
  134. package/types/src/components/layout/page/Page.vue.d.ts +39 -0
  135. package/types/src/components/layout/page/index.d.ts +1 -0
  136. package/types/src/components/other/calendar/calendar.vue.d.ts +41 -0
  137. package/types/src/components/other/calendar/index.d.ts +1 -0
  138. package/types/src/components/other/index.d.ts +2 -0
  139. package/types/src/components/other/menu/index.d.ts +2 -0
  140. package/types/src/components/other/menu/index.vue.d.ts +46 -0
  141. package/types/src/components/other/menu/menu-h/index.vue.d.ts +19 -0
  142. package/types/src/components/other/menu/menu-h/menu-h-item.vue.d.ts +27 -0
  143. package/types/src/components/other/menu/menu-v/index.vue.d.ts +24 -0
  144. package/types/src/components/other/menu/types.d.ts +6 -0
  145. package/types/src/components/other/view-control/index.d.ts +1 -0
  146. package/types/src/components/other/view-control/view-control.vue.d.ts +20 -0
  147. package/types/src/context/index.d.ts +1 -0
  148. package/types/src/context/is-mobile.d.ts +4 -0
  149. package/types/src/icons/index.d.ts +4 -0
  150. package/types/src/index.d.ts +3 -0
  151. package/types/src/types.d.ts +2 -0
  152. package/types/src/utils/index.d.ts +6 -0
  153. package/types/src/utils/z-index.d.ts +1 -0
  154. package/types/vite.config.d.ts +2 -0
  155. package/build-ts/main.js +0 -63
  156. package/dist/demo.html +0 -8
  157. package/dist/star-ui.common.js +0 -33764
  158. package/dist/star-ui.common.js.map +0 -1
  159. package/dist/star-ui.umd.js +0 -33774
  160. package/dist/star-ui.umd.js.map +0 -1
  161. package/dist/star-ui.umd.min.js +0 -299
  162. package/dist/star-ui.umd.min.js.map +0 -1
  163. package/readme.md +0 -16
  164. package/src/components/button.vue +0 -34
  165. package/src/components/calendar.vue +0 -244
  166. package/src/components/call-render.tsx +0 -22
  167. package/src/components/card.vue +0 -126
  168. package/src/components/common/base-popper.vue +0 -132
  169. package/src/components/content/context-menu-box/index.vue +0 -117
  170. package/src/components/content/index.ts +0 -5
  171. package/src/components/content/menu/index.vue +0 -86
  172. package/src/components/content/menu/menu-h/index.vue +0 -68
  173. package/src/components/content/menu/menu-h/menu-h-child.vue +0 -74
  174. package/src/components/content/menu/menu-h/menu-h-item.vue +0 -66
  175. package/src/components/content/menu/menu-v/index.vue +0 -56
  176. package/src/components/content/modals/confirm.vue +0 -45
  177. package/src/components/content/modals/modal.vue +0 -110
  178. package/src/components/content/page.vue +0 -134
  179. package/src/components/form/form/form-item.vue +0 -116
  180. package/src/components/form/form/form.vue +0 -109
  181. package/src/components/form/form/index.ts +0 -2
  182. package/src/components/form/index.ts +0 -1
  183. package/src/components/input.vue +0 -81
  184. package/src/components/layout/auto-direction/index.vue +0 -28
  185. package/src/components/layout/index.ts +0 -1
  186. package/src/components/layout-h.vue +0 -34
  187. package/src/components/layout-main.vue +0 -25
  188. package/src/components/layout-v.vue +0 -36
  189. package/src/components/line-h.vue +0 -29
  190. package/src/components/line-v.vue +0 -29
  191. package/src/components/select.vue +0 -265
  192. package/src/components/slider.vue +0 -171
  193. package/src/components/switch.vue +0 -95
  194. package/src/components/table.vue +0 -59
  195. package/src/components/tree/index.vue +0 -116
  196. package/src/components/tree/tree-item.vue +0 -157
  197. package/src/components/view-control.vue +0 -83
  198. package/src/directives/is-focus.ts +0 -10
  199. package/src/func/download.ts +0 -15
  200. package/src/func/index.ts +0 -2
  201. package/src/func/modal/index.ts +0 -72
  202. package/src/global-style.css +0 -127
  203. package/src/icon-font/iconfont.css +0 -75
  204. package/src/icon-font/iconfont.eot +0 -0
  205. package/src/icon-font/iconfont.json +0 -114
  206. package/src/icon-font/iconfont.svg +0 -62
  207. package/src/icon-font/iconfont.ttf +0 -0
  208. package/src/icon-font/iconfont.woff +0 -0
  209. package/src/icon-font/iconfont.woff2 +0 -0
  210. package/src/main.ts +0 -57
  211. package/src/outher/index.ts +0 -8
  212. package/src/reg.ts +0 -129
  213. package/src/shims-vue.d.ts +0 -8
  214. package/src/types.d.ts +0 -15
  215. package/src/utils.ts +0 -24
  216. package/types/components/button.vue.d.ts +0 -5
  217. package/types/components/calendar.vue.d.ts +0 -26
  218. package/types/components/call-render.d.ts +0 -6
  219. package/types/components/card.vue.d.ts +0 -13
  220. package/types/components/common/base-popper.vue.d.ts +0 -21
  221. package/types/components/content/context-menu-box/index.vue.d.ts +0 -20
  222. package/types/components/content/index.d.ts +0 -5
  223. package/types/components/content/menu/index.vue.d.ts +0 -12
  224. package/types/components/content/menu/menu-h/index.vue.d.ts +0 -8
  225. package/types/components/content/menu/menu-h/menu-h-child.vue.d.ts +0 -7
  226. package/types/components/content/menu/menu-h/menu-h-item.vue.d.ts +0 -8
  227. package/types/components/content/menu/menu-v/index.vue.d.ts +0 -9
  228. package/types/components/content/modals/confirm.vue.d.ts +0 -7
  229. package/types/components/content/modals/modal.vue.d.ts +0 -12
  230. package/types/components/content/page.vue.d.ts +0 -9
  231. package/types/components/form/form/form-item.vue.d.ts +0 -22
  232. package/types/components/form/form/form.vue.d.ts +0 -24
  233. package/types/components/form/form/index.d.ts +0 -2
  234. package/types/components/form/index.d.ts +0 -1
  235. package/types/components/input.vue.d.ts +0 -15
  236. package/types/components/layout/auto-direction/index.vue.d.ts +0 -4
  237. package/types/components/layout/index.d.ts +0 -1
  238. package/types/components/layout-h.vue.d.ts +0 -4
  239. package/types/components/layout-main.vue.d.ts +0 -4
  240. package/types/components/layout-v.vue.d.ts +0 -4
  241. package/types/components/line-h.vue.d.ts +0 -4
  242. package/types/components/line-v.vue.d.ts +0 -4
  243. package/types/components/select.vue.d.ts +0 -26
  244. package/types/components/slider.vue.d.ts +0 -29
  245. package/types/components/switch.vue.d.ts +0 -12
  246. package/types/components/table.vue.d.ts +0 -5
  247. package/types/components/tree/index.vue.d.ts +0 -15
  248. package/types/components/tree/tree-item.vue.d.ts +0 -18
  249. package/types/components/view-control.vue.d.ts +0 -16
  250. package/types/directives/is-focus.d.ts +0 -4
  251. package/types/func/download.d.ts +0 -1
  252. package/types/func/index.d.ts +0 -2
  253. package/types/func/modal/index.d.ts +0 -13
  254. package/types/main.d.ts +0 -75
  255. package/types/outher/index.d.ts +0 -5
  256. package/types/reg.d.ts +0 -45
@@ -1,157 +0,0 @@
1
- <template>
2
- <div :class="['star-ui', 'star-ui-tree-item']">
3
- <div :class="[
4
- 'star-ui-tree-item-label',
5
- 'star-ui-size-'+size,
6
- {
7
- 'star-ui-tree-current':(currentValue!=undefined&&currentValue==valueData) || item == current
8
- }
9
- ]" @click="handleClick">
10
- <div v-for="n in deep" :key="n" class="star-ui-tree-deep-nbsp"></div>
11
- <span :class="[
12
- 'star-ui-tree-expand-button',
13
- 'star-ui-icon-font',
14
- childrenData.length>0?(isExpand?'star-ui-icon-arrow-down':'star-ui-icon-arrow-right'):''
15
- ]" @click="isExpand=!isExpand"></span>
16
- {{labelData}}
17
- </div>
18
- <div v-if="isExpand">
19
- <tree-item v-for="(item, index) in childrenData" :key="index" :size="size" :deep="deep+1" :item="item" :label="label" :value="value" :children="children" :current="current" current-value="currentValue" @node-click="haandleChildNodeClick"></tree-item>
20
- </div>
21
- </div>
22
- </template>
23
-
24
- <script lang="ts">
25
- import { Vue } from 'vue-class-component';
26
- import { Register, Prop } from "@ui-root/reg";
27
- import treeItem from "./tree-item.vue"
28
-
29
-
30
- import "../../global-style.css";
31
-
32
- @Register({
33
- name:"su-tree-item",
34
- components:{
35
- treeItem
36
- },
37
- internalOnly: true,
38
- })
39
- export default class SuTreeItem extends Vue {
40
- readonly isExpand=false;
41
- @Prop({
42
- type:Number,
43
- default:()=>{
44
- return 0;
45
- }
46
- })
47
- readonly deep!:number;
48
- @Prop({
49
- type:String,
50
- default:()=>{
51
- return "medium"
52
- }
53
- })
54
- readonly size!:string;
55
- @Prop({
56
- type:Object,
57
- default:()=>{
58
- return {}
59
- }
60
- })
61
- readonly item!:Record<string, unknown>;
62
- @Prop({
63
- type:[String,Function],
64
- default:()=>{
65
- return "label"
66
- }
67
- })
68
- readonly label!:string|((item:Record<string, unknown>)=>string);
69
- @Prop({
70
- type:[String,Function],
71
- default:()=>{
72
- return "value"
73
- }
74
- })
75
- readonly value!:string|((item:Record<string, unknown>)=>string|number);
76
- @Prop({
77
- type:[String,Function],
78
- default:()=>{
79
- return "children"
80
- }
81
- })
82
- readonly children!:string|((item:Record<string, unknown>)=>Record<string, unknown>[]);
83
- @Prop({
84
- type:Object,
85
- default:()=>{
86
- return {}
87
- }
88
- })
89
- readonly current!:Record<string, unknown>;
90
- @Prop({
91
- type:[String,Number],
92
- default:()=>{
93
- return undefined
94
- }
95
- })
96
- readonly currentValue!:string|number|undefined;
97
-
98
- get labelData():string{
99
- if(typeof this.label == "string"){
100
- return (this.item[this.label]||"") as string;
101
- }
102
- return this.label(this.item);
103
- }
104
- get valueData():string|number|undefined{
105
- if(typeof this.value == "string"){
106
- return (this.item[this.value]||"") as string|number|undefined;
107
- }
108
- return this.value(this.item);
109
- }
110
- get childrenData():Record<string, unknown>[]{
111
- if(typeof this.children == "string"){
112
- return (this.item[this.children]||[]) as Record<string, unknown>[];
113
- }
114
- return this.children(this.item);
115
- }
116
- private handleClick(ev:MouseEvent):void{
117
- var classList = (ev.target as HTMLElement).className.split(" ");
118
- if(classList.indexOf("star-ui-icon-arrow-down")!=-1 || classList.indexOf("star-ui-icon-arrow-right")!=-1){
119
- return;
120
- }
121
- this.$emit("node-click",this.item,this.valueData,this);
122
- }
123
- haandleChildNodeClick(item:Record<string, unknown>,value:string|number|undefined,node:Record<string, unknown>):void{
124
- this.$emit("node-click",item,value,node);
125
- }
126
- }
127
- </script>
128
-
129
- <style>
130
- .star-ui-tree-item-label{
131
- cursor: pointer;
132
- }
133
- .star-ui-tree-highlight-current .star-ui-tree-current{
134
- background: var(--star-ui-base-color);
135
- color: var(--star-ui-backgorund-color);
136
- }
137
- .star-ui-tree-deep-nbsp{
138
- display: inline-block;
139
- height: 100%;
140
- width: var(--star-ui-input-medium-font-size);
141
- }
142
- .star-ui-size-mini .star-ui-tree-deep-nbsp{
143
- width: var(--star-ui-input-mini-font-size);
144
- }
145
- .star-ui-tree-expand-button{
146
- font-size: inherit;
147
- }
148
- .star-ui-tree-expand-button{
149
- width: var(--star-ui-input-medium-font-size);
150
- height: 100%;
151
- display: inline-block;
152
- cursor: pointer;
153
- }
154
- .star-ui-size-mini .star-ui-tree-expand-button{
155
- width: var(--star-ui-input-mini-font-size);
156
- }
157
- </style>
@@ -1,83 +0,0 @@
1
- <template>
2
- <div :class="['star-ui', className]">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script lang="ts">
8
- import { Vue } from 'vue-class-component';
9
-
10
- import { Register, Prop } from "@ui-root/reg";
11
- import { SuViewCtrlInjectKeyClassName, SuViewCtrlInjectKeyIsMobile } from "@ui-root/outher";
12
- import { Provide } from "vue-property-decorator";
13
- import "../global-style.css";
14
-
15
- type DeviceType='auto'|'mobile'|'pc';
16
-
17
-
18
- @Register({
19
- name:"su-view-control",
20
- })
21
- export default class SuViewControl extends Vue {
22
- mounted():void{
23
- this.$el._vue = this;
24
- }
25
- @Prop({
26
- type: String,
27
- default: "auto",
28
- validator: function(value:string) {
29
- return ['mobile', 'pc', 'auto'].indexOf(value) !== -1
30
- }
31
- })
32
- deviceType!:DeviceType;
33
- @Prop({
34
- type: String,
35
- default: "ua",
36
- validator: function(value:string) {
37
- return ['ua','screen-width'].indexOf(value) !== -1
38
- }
39
- })
40
- checkFunction!:'ua'|'screen-width';
41
- private windowWidth = 0;
42
- private windowHeight = 0;
43
- public checkWindowSize():void{
44
- this.windowWidth = window.innerWidth;
45
- this.windowHeight = window.innerHeight;
46
- }
47
- @Provide({to:SuViewCtrlInjectKeyIsMobile,reactive:true})
48
- public get $isMobile():boolean{
49
- switch (this.deviceType) {
50
- case "mobile":
51
- return true;
52
- case "pc":
53
- return false;
54
- }
55
- switch (this.checkFunction) {
56
- case "ua":
57
- return navigator.userAgent.toLowerCase().indexOf("mobile")!=-1;
58
- case "screen-width":
59
- return this.windowWidth < 1000;
60
- }
61
- return false;
62
- }
63
- @Provide({to:SuViewCtrlInjectKeyClassName,reactive:true})
64
- public get className():string[]{
65
- return [
66
- 'su-view-control',
67
- 'star-ui-view-control',
68
- `star-ui-view-control-${this.$isMobile?'mobile':'pc'}`,
69
- `su-view-control-${this.$isMobile?'mobile':'pc'}`
70
- ];
71
- }
72
- beforeMount(){
73
- this.checkWindowSize();
74
- window.addEventListener("resize", this.checkWindowSize);
75
- }
76
- beforeUnmount(){
77
- window.removeEventListener("resize", this.checkWindowSize);
78
- }
79
- }
80
- </script>
81
-
82
- <style>
83
- </style>
@@ -1,10 +0,0 @@
1
- export default {
2
- mounted(el:HTMLElement, cb:any){
3
- el.addEventListener("mousemove", () => {
4
- cb.value(true);
5
- });
6
- el.addEventListener("mouseout", () => {
7
- cb.value(false);
8
- });
9
- }
10
- }
@@ -1,15 +0,0 @@
1
- export default function(data:Blob|Uint8Array, name:string): void{
2
- let out:Blob;
3
- if (data instanceof Uint8Array) {
4
- out = new Blob([data]);
5
- } else {
6
- out = data;
7
- }
8
- const link = document.createElement('a');
9
- link.href = URL.createObjectURL(out);
10
- link.download = name;
11
- document.body.appendChild(link);
12
- link.click();
13
- document.body.removeChild(link);
14
- URL.revokeObjectURL(link.href);
15
- }
package/src/func/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export {default as download} from "./download";
2
- export * from "./modal";
@@ -1,72 +0,0 @@
1
- import { createVNode, render, VNode } from 'vue';
2
- import { SuModal,SuModalConfirm,SuViewControl } from '@ui-root/main';
3
-
4
- type PWidthClose = Promise<boolean>&{close: () => void};
5
- export function confirm(title: string):PWidthClose{
6
- let vnode:VNode;
7
- const p:Promise<boolean>&{
8
- close?: () => void;
9
- } = new Promise<boolean>((resolve) => {
10
- const dom = document.createElement("div");
11
- vnode = createVNode(SuModalConfirm, {
12
- visible: true,
13
- title,
14
- onClose: () => {
15
- if(vnode.props) vnode.props.visible = false;
16
- render(null, dom);
17
- resolve(false);
18
- },
19
- onConfirm: () => {
20
- render(null, dom);
21
- resolve(true);
22
- }
23
- });
24
-
25
- render(createVNode(SuViewControl, {}, () => vnode), dom);
26
- });
27
- p.close = () => (vnode.component as any).proxy.close();
28
- return p as PWidthClose;
29
- }
30
- export function modal(slots:{
31
- title?: string|VNode|(() => VNode|string);
32
- body?: string|VNode|(() => VNode|string);
33
- footer?: string|VNode|(() => VNode|string);
34
- }|VNode|string|(() => VNode|string), controlProp = {}, defalueShow = true){
35
- const sendSlots:Record<string, () => VNode|string> = {};
36
- if(typeof slots === 'function'){
37
- sendSlots.default = slots;
38
- } else if(typeof slots === 'string' || 'type' in slots) {
39
- sendSlots.default = () => slots;
40
- } else {
41
- const map = {
42
- body: 'defalut',
43
- }
44
- Object.keys(slots).forEach((key) => {
45
- const fn = typeof slots[key as keyof typeof slots];
46
- sendSlots[key in map ? map[key as keyof typeof map] : key] = typeof fn === "function" ? fn : () => fn;
47
- })
48
- }
49
- const dom = document.createElement("div");
50
- const vnode = createVNode(
51
- SuModal,
52
- {
53
- 'onUpdate:visable': (value: boolean) => {
54
- if (value) {
55
- //
56
- } else {
57
- render(null, dom);
58
- }
59
- }
60
- },
61
- sendSlots,
62
- );
63
- render(createVNode(SuViewControl, controlProp, () => vnode), dom);
64
-
65
- if (defalueShow) {
66
- (vnode.component as any).proxy.show();
67
- }
68
-
69
- return {
70
- close: () => (vnode.component as any).proxy.close()
71
- };
72
- }
@@ -1,127 +0,0 @@
1
- :root{
2
- /*背景颜色*/
3
- --star-ui-backgorund-color:#FFF;
4
- /*背景颜色*/
5
- --star-ui-mask-color:rgba(0, 0, 0, 0.5);
6
- /*字体颜色*/
7
- --star-ui-font-color:#222;
8
- /*表格头*/
9
- --star-ui-table-head-color:#f8f8f9;
10
- /*基础颜色*/
11
- --star-ui-base-color:#8AF;
12
- /*线条颜色*/
13
- --star-ui-line-color:#8AF;
14
- --star-ui-regular-text-color: #606266;
15
- /*线路宽度*/
16
- --star-ui-line-width:1px;
17
- /*圆角*/
18
- --star-ui-border-radius:5px;
19
- /*输入框边框默认颜色*/
20
- --star-ui-input-border-color:#666;
21
- /*中等大小输入框字体大小*/
22
- --star-ui-input-medium-font-size:16px;
23
- /*小输入框字体大小*/
24
- --star-ui-input-mini-font-size:12px;
25
- /*输入框默认宽度*/
26
- --star-ui-input-default-width:280px;
27
- --star-ui-default-padding:5px;
28
- }
29
- .dark-mode{
30
- --star-ui-backgorund-color:#555;
31
- }
32
- @import url("./icon-font/iconfont.css");
33
- .star-ui{
34
- margin:0;
35
- padding: 0;
36
- position: relative;
37
- box-sizing: border-box;
38
- }
39
- /*内容容器大大小*/
40
- .star-ui-container{
41
- padding: var(--star-ui-default-padding);
42
- }
43
- .star-ui-size-medium{
44
- font-size: var(--star-ui-input-medium-font-size);
45
- line-height: var(--star-ui-input-medium-font-size);
46
- padding: var(--star-ui-default-padding);
47
- border-radius: var(--star-ui-border-radius);
48
- }
49
- /*小尺寸空间参数*/
50
- .star-ui-size-mini{
51
- font-size: var(--star-ui-input-mini-font-size);
52
- line-height: var(--star-ui-input-mini-font-size);
53
- padding: calc(var(--star-ui-default-padding) / 2);
54
- border-radius: calc(var(--star-ui-border-radius) / 2);
55
- }
56
- .star-ui-col-1{
57
- width: calc(100% / 24 * 1);
58
- }
59
- .star-ui-col-2{
60
- width: calc(100% / 24 * 2);
61
- }
62
- .star-ui-col-3{
63
- width: calc(100% / 24 * 3);
64
- }
65
- .star-ui-col-4{
66
- width: calc(100% / 24 * 4);
67
- }
68
- .star-ui-col-5{
69
- width: calc(100% / 24 * 5);
70
- }
71
- .star-ui-col-6{
72
- width: calc(100% / 24 * 6);
73
- }
74
- .star-ui-col-7{
75
- width: calc(100% / 24 * 7);
76
- }
77
- .star-ui-col-8{
78
- width: calc(100% / 24 * 8);
79
- }
80
- .star-ui-col-9{
81
- width: calc(100% / 24 * 9);
82
- }
83
- .star-ui-col-10{
84
- width: calc(100% / 24 * 10);
85
- }
86
- .star-ui-col-11{
87
- width: calc(100% / 24 * 11);
88
- }
89
- .star-ui-col-12{
90
- width: calc(100% / 24 * 12);
91
- }
92
- .star-ui-col-13{
93
- width: calc(100% / 24 * 13);
94
- }
95
- .star-ui-col-14{
96
- width: calc(100% / 24 * 14);
97
- }
98
- .star-ui-col-15{
99
- width: calc(100% / 24 * 15);
100
- }
101
- .star-ui-col-16{
102
- width: calc(100% / 24 * 16);
103
- }
104
- .star-ui-col-17{
105
- width: calc(100% / 24 * 17);
106
- }
107
- .star-ui-col-18{
108
- width: calc(100% / 24 * 18);
109
- }
110
- .star-ui-col-19{
111
- width: calc(100% / 24 * 19);
112
- }
113
- .star-ui-col-20{
114
- width: calc(100% / 24 * 20);
115
- }
116
- .star-ui-col-21{
117
- width: calc(100% / 24 * 22);
118
- }
119
- .star-ui-col-22{
120
- width: calc(100% / 24 * 22);
121
- }
122
- .star-ui-col-23{
123
- width: calc(100% / 24 * 23);
124
- }
125
- .star-ui-col-24{
126
- width: calc(100% / 24 * 24);
127
- }
@@ -1,75 +0,0 @@
1
- @font-face {
2
- font-family: "star-ui-iconfont"; /* Project id 2493685 */
3
- src: url('iconfont.woff2?t=1636814190896') format('woff2'),
4
- url('iconfont.woff?t=1636814190896') format('woff'),
5
- url('iconfont.ttf?t=1636814190896') format('truetype');
6
- }
7
-
8
- .star-ui-icon-font {
9
- font-family: "star-ui-iconfont" !important;
10
- font-size: 16px;
11
- font-style: normal;
12
- -webkit-font-smoothing: antialiased;
13
- -moz-osx-font-smoothing: grayscale;
14
- }
15
-
16
- .star-ui-icon-menu:before {
17
- content: "\e65f";
18
- }
19
-
20
- .star-ui-icon-add:before {
21
- content: "\e6da";
22
- }
23
-
24
- .star-ui-icon-home:before {
25
- content: "\e6b8";
26
- }
27
-
28
- .star-ui-icon-code:before {
29
- content: "\e667";
30
- }
31
-
32
- .star-ui-icon-close:before {
33
- content: "\e668";
34
- }
35
-
36
- .star-ui-icon-clean:before {
37
- content: "\e600";
38
- }
39
-
40
- .star-ui-icon-select:before {
41
- content: "\e67e";
42
- }
43
-
44
- .star-ui-icon-arrow-left:before {
45
- content: "\e604";
46
- }
47
-
48
- .star-ui-icon-arrow-up:before {
49
- content: "\e601";
50
- }
51
-
52
- .star-ui-icon-arrow-down:before {
53
- content: "\e603";
54
- }
55
-
56
- .star-ui-icon-arrow-right:before {
57
- content: "\e602";
58
- }
59
-
60
- .star-ui-icon-arrow-up-filling:before {
61
- content: "\e689";
62
- }
63
-
64
- .star-ui-icon-arrow-down-filling:before {
65
- content: "\e68a";
66
- }
67
-
68
- .star-ui-icon-arrow-left-filling:before {
69
- content: "\e68b";
70
- }
71
-
72
- .star-ui-icon-arrow-right-filling:before {
73
- content: "\e68c";
74
- }
75
-
Binary file
@@ -1,114 +0,0 @@
1
- {
2
- "id": "2493685",
3
- "name": "star-ui",
4
- "font_family": "star-ui-iconfont",
5
- "css_prefix_text": "star-ui-icon-",
6
- "description": "",
7
- "glyphs": [
8
- {
9
- "icon_id": "1251228",
10
- "name": "menu",
11
- "font_class": "menu",
12
- "unicode": "e65f",
13
- "unicode_decimal": 58975
14
- },
15
- {
16
- "icon_id": "38747",
17
- "name": "add",
18
- "font_class": "add",
19
- "unicode": "e6da",
20
- "unicode_decimal": 59098
21
- },
22
- {
23
- "icon_id": "33516",
24
- "name": "home",
25
- "font_class": "home",
26
- "unicode": "e6b8",
27
- "unicode_decimal": 59064
28
- },
29
- {
30
- "icon_id": "15838443",
31
- "name": "code",
32
- "font_class": "code",
33
- "unicode": "e667",
34
- "unicode_decimal": 58983
35
- },
36
- {
37
- "icon_id": "15838444",
38
- "name": "close",
39
- "font_class": "close",
40
- "unicode": "e668",
41
- "unicode_decimal": 58984
42
- },
43
- {
44
- "icon_id": "15838473",
45
- "name": "error",
46
- "font_class": "clean",
47
- "unicode": "e600",
48
- "unicode_decimal": 58880
49
- },
50
- {
51
- "icon_id": "15838530",
52
- "name": "select",
53
- "font_class": "select",
54
- "unicode": "e67e",
55
- "unicode_decimal": 59006
56
- },
57
- {
58
- "icon_id": "15838561",
59
- "name": "arrow-left-bold",
60
- "font_class": "arrow-left",
61
- "unicode": "e604",
62
- "unicode_decimal": 58884
63
- },
64
- {
65
- "icon_id": "15838562",
66
- "name": "arrow-up-bold",
67
- "font_class": "arrow-up",
68
- "unicode": "e601",
69
- "unicode_decimal": 58881
70
- },
71
- {
72
- "icon_id": "15838564",
73
- "name": "arrow-down-bold",
74
- "font_class": "arrow-down",
75
- "unicode": "e603",
76
- "unicode_decimal": 58883
77
- },
78
- {
79
- "icon_id": "15838566",
80
- "name": "arrow-right-bold",
81
- "font_class": "arrow-right",
82
- "unicode": "e602",
83
- "unicode_decimal": 58882
84
- },
85
- {
86
- "icon_id": "15838581",
87
- "name": "arrow-up-filling",
88
- "font_class": "arrow-up-filling",
89
- "unicode": "e689",
90
- "unicode_decimal": 59017
91
- },
92
- {
93
- "icon_id": "15838582",
94
- "name": "arrow-down-filling",
95
- "font_class": "arrow-down-filling",
96
- "unicode": "e68a",
97
- "unicode_decimal": 59018
98
- },
99
- {
100
- "icon_id": "15838583",
101
- "name": "arrow-left-filling",
102
- "font_class": "arrow-left-filling",
103
- "unicode": "e68b",
104
- "unicode_decimal": 59019
105
- },
106
- {
107
- "icon_id": "15838584",
108
- "name": "arrow-right-filling",
109
- "font_class": "arrow-right-filling",
110
- "unicode": "e68c",
111
- "unicode_decimal": 59020
112
- }
113
- ]
114
- }