cc1-ui 0.0.9 → 0.0.11

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.
@@ -176,7 +176,7 @@ export function UIAuto(config) {
176
176
  res[i] = '';
177
177
  }
178
178
  }
179
- else if (res[i].includes('const DR') || res[i].includes('.install(app)')) {
179
+ else if (res[i].includes('const DR') || res[i].includes('installDR(')) {
180
180
  if (!conf.useDR.some((tag) => res[i].includes('DR' + tag))) {
181
181
  res[i] = '';
182
182
  }
package/dist/cc1-ui.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineAsyncComponent } from 'vue';
2
2
 
3
- const DRdominfo = await import('./dominfo-FpTvKs8K.js');
3
+ const DRdominfo = () => import('./dominfo-FpTvKs8K.js');
4
4
  const VButton = () => defineAsyncComponent(() => import('./index-lDlR9NjA.js'));
5
5
  const VSwitch = () => defineAsyncComponent(() => import('./index-BvvdDtUd.js'));
6
6
  const VScale = () => defineAsyncComponent(() => import('./index-l4J1-e0K.js'));
@@ -9,6 +9,9 @@ const VCircle = () => defineAsyncComponent(() => import('./index-ti4E-Nv5.js'));
9
9
  const VIcon = () => defineAsyncComponent(() => import('./index-BGzY32VF.js'));
10
10
  const VSelect = () => defineAsyncComponent(() => import('./index-CpyM3z5X.js'));
11
11
  const VSIcon = () => defineAsyncComponent(() => import('./index-mrAwG3J3.js'));
12
+ const installDR = (fun, app) => {
13
+ fun().then((module) => module.install(app));
14
+ };
12
15
  const install = async (app) => {
13
16
  app.component("VButton", VButton());
14
17
  app.component("VSwitch", VSwitch());
@@ -18,7 +21,7 @@ const install = async (app) => {
18
21
  app.component("VIcon", VIcon());
19
22
  app.component("VSelect", VSelect());
20
23
  app.component("VSIcon", VSIcon());
21
- DRdominfo.install(app);
24
+ installDR(DRdominfo, app);
22
25
  };
23
26
  if (!window.VConf) {
24
27
  const getLoad = (obj) => {
package/dist/index.d.ts CHANGED
@@ -12,14 +12,14 @@ export {}
12
12
  /* prettier-ignore */
13
13
  declare module 'vue' {
14
14
  export interface GlobalComponents {
15
- VCircle:typeof import('./components/Circle/index.vue')['default']
16
- VMask:typeof import('./components/Mask/index.vue')['default']
17
15
  VButton:typeof import('./components/Button/index.vue')['default']
16
+ VCircle:typeof import('./components/Circle/index.vue')['default']
18
17
  VIcon:typeof import('./components/Icon/index.vue')['default']
18
+ VMask:typeof import('./components/Mask/index.vue')['default']
19
+ VSIcon:typeof import('./components/SIcon/index.vue')['default']
19
20
  VScale:typeof import('./components/Scale/index.vue')['default']
20
21
  VSelect:typeof import('./components/Select/index.vue')['default']
21
22
  VSwitch:typeof import('./components/Switch/index.vue')['default']
22
- VSIcon:typeof import('./components/SIcon/index.vue')['default']
23
23
  }
24
24
  export interface ComponentCustomProperties {
25
25
  }
package/dist/vconf.d.ts CHANGED
@@ -1,153 +1,224 @@
1
+ interface VConfType {
2
+ /**
3
+ * vsicon图标组件默认配置
4
+ */
5
+ vsicon: {
6
+ /**
7
+ * 加载静态资源地址,默认为'https://cdn.c44.cc/vsicon'
8
+ */
9
+ url: string
10
+ /**
11
+ * 使用的图标库名称,默认为'ant'
12
+ */
13
+ lib: string
14
+ /**
15
+ * 使用的图标名称,默认为'up'
16
+ */
17
+ name: string
18
+ /**
19
+ * 使用的图标大小,默认为'20'
20
+ */
21
+ size: any
22
+ /**
23
+ * 使用的图标宽度,默认为空,取size字段
24
+ */
25
+ width: any
26
+ /**
27
+ * 使用的图标高度,默认为空,取size字段
28
+ */
29
+ height: any
30
+ /**
31
+ * 使用的图标颜色,默认为[]
32
+ */
33
+ color: string[]
34
+ /**
35
+ * 使用的图标单位,默认为px
36
+ */
37
+ unit: string
38
+ /**
39
+ * 其他辅助方法
40
+ */
41
+ fun: {
42
+ /**
43
+ * 加载控制对象-外部无作用
44
+ */
45
+ load: any
1
46
 
2
- interface VConfType {
3
- /**
4
- * vsicon图标组件默认配置
5
- */
6
- vsicon: {
7
- /**
8
- * 加载静态资源地址,默认为'https://cdn.c44.cc/vsicon'
9
- */
10
- url: string;
11
- /**
12
- * 使用的图标库名称,默认为'ant'
13
- */
14
- lib: string;
15
- /**
16
- * 使用的图标名称,默认为'up'
17
- */
18
- name: string;
19
- /**
20
- * 使用的图标大小,默认为'20'
21
- */
22
- size: any;
23
- /**
24
- * 使用的图标宽度,默认为空,取size字段
25
- */
26
- width: any;
27
- /**
28
- * 使用的图标高度,默认为空,取size字段
29
- */
30
- height: any;
31
- /**
32
- * 使用的图标颜色,默认为[]
33
- */
34
- color: string[];
35
- /**
36
- * 使用的图标单位,默认为px
37
- */
38
- unit: string;
39
- /**
40
- * 其他辅助方法
41
- */
42
- fun: {
43
- /**
44
- * 加载控制对象-外部无作用
45
- */
46
- load: any
47
-
48
- /**
49
- * 默认的内容缓存对象
50
- */
51
- resource: any
52
- /**
53
- * 保存资源-默认用的对象缓存
54
- * @param url
55
- * @param content
56
- * @returns
57
- */
58
- setRes: (url: string, content: any) => void
47
+ /**
48
+ * 默认的内容缓存对象
49
+ */
50
+ resource: any
51
+ /**
52
+ * 保存资源-默认用的对象缓存
53
+ * @param url
54
+ * @param content
55
+ * @returns
56
+ */
57
+ setRes: (url: string, content: any) => void
59
58
 
60
- /**
61
- * 获取缓存资源
62
- * @param url
63
- * @returns
64
- */
65
- getRes: (url: string) => any
59
+ /**
60
+ * 获取缓存资源
61
+ * @param url
62
+ * @returns
63
+ */
64
+ getRes: (url: string) => any
65
+
66
+ /**
67
+ * 获取图标资源
68
+ * @param _url 如https://cdn.c44.cc/vsicon/ant/up.svg
69
+ * @param save 是否对获取到的资源进行缓存,默认为false
70
+ * @returns
71
+ */
72
+ getResorce: (_url: string, save?: boolean) => Promise<any>
73
+ }
74
+ }
75
+ /**
76
+ * vicon图标组件默认配置
77
+ */
78
+ vicon: {
79
+ /**
80
+ * 加载静态资源地址,默认为'https://cdn.c44.cc/vicon'
81
+ */
82
+ url: string
83
+ /**
84
+ * 使用的图标库名称,默认为'ant'
85
+ */
86
+ lib: string
87
+ /**
88
+ * 使用的图标名称,默认为'up'
89
+ */
90
+ name: string
91
+ /**
92
+ * 使用的图标大小,默认为'20'
93
+ */
94
+ size: any
95
+ /**
96
+ * 使用的图标颜色,默认为'currentColor'
97
+ */
98
+ color: any
99
+ /**
100
+ * 如果为true,使用设计的图标颜色使得color属性无效。默认为false,一般用于多色或固定色图标
101
+ */
102
+ nofill: boolean
103
+ /**
104
+ * 使用的图标单位,默认为px
105
+ */
106
+ unit: string
107
+ /**
108
+ * 其他辅助方法
109
+ */
110
+ fun: {
111
+ /**
112
+ * 加载控制对象-外部无作用
113
+ */
114
+ load: any
66
115
 
67
- /**
68
- * 获取图标资源
69
- * @param _url 如https://cdn.c44.cc/vsicon/ant/up.svg
70
- * @param save 是否对获取到的资源进行缓存,默认为false
71
- * @returns
72
- */
73
- getResorce: (_url: string,save?:boolean) => Promise<any>
74
- }
75
- };
76
- /**
77
- * vicon图标组件默认配置
78
- */
79
- vicon: {
80
- /**
81
- * 加载静态资源地址,默认为'https://cdn.c44.cc/vicon'
82
- */
83
- url: string;
84
- /**
85
- * 使用的图标库名称,默认为'ant'
86
- */
87
- lib: string;
88
- /**
89
- * 使用的图标名称,默认为'up'
90
- */
91
- name: string;
92
- /**
93
- * 使用的图标大小,默认为'20'
94
- */
95
- size: any;
96
- /**
97
- * 使用的图标颜色,默认为'currentColor'
98
- */
99
- color: any;
100
- /**
101
- * 如果为true,使用设计的图标颜色使得color属性无效。默认为false,一般用于多色或固定色图标
102
- */
103
- nofill: boolean;
104
- /**
105
- * 使用的图标单位,默认为px
106
- */
107
- unit: string;
108
- /**
109
- * 其他辅助方法
110
- */
111
- fun: {
112
- /**
113
- * 加载控制对象-外部无作用
114
- */
115
- load: any
116
-
117
- /**
118
- * 默认的内容缓存对象
119
- */
120
- resource: any
121
- /**
122
- * 保存资源-默认用的对象缓存
123
- * @param url
124
- * @param content
125
- * @returns
126
- */
127
- setRes: (url: string, content: any) => void
116
+ /**
117
+ * 默认的内容缓存对象
118
+ */
119
+ resource: any
120
+ /**
121
+ * 保存资源-默认用的对象缓存
122
+ * @param url
123
+ * @param content
124
+ * @returns
125
+ */
126
+ setRes: (url: string, content: any) => void
128
127
 
129
- /**
130
- * 获取缓存资源
131
- * @param url
132
- * @returns
133
- */
134
- getRes: (url: string) => any
128
+ /**
129
+ * 获取缓存资源
130
+ * @param url
131
+ * @returns
132
+ */
133
+ getRes: (url: string) => any
135
134
 
136
- /**
137
- * 获取图标资源
138
- * @param _url 如https://cdn.c44.cc/vicon/ant/up.json
139
- * @param save 是否对获取到的资源进行缓存,默认为false
140
- * @returns
141
- */
142
- getResorce: (_url: string,save?:boolean) => Promise<any>
143
- }
144
- };
145
- /**
146
- * 层级管理
147
- */
148
- zindex: {
149
- mask: number;
135
+ /**
136
+ * 获取图标资源
137
+ * @param _url 如https://cdn.c44.cc/vicon/ant/up.json
138
+ * @param save 是否对获取到的资源进行缓存,默认为false
139
+ * @returns
140
+ */
141
+ getResorce: (_url: string, save?: boolean) => Promise<any>
150
142
  }
143
+ }
144
+ /**
145
+ * 层级管理
146
+ */
147
+ zindex: {
148
+ mask: number
149
+ }
151
150
  }
152
151
 
153
- declare var VConf: VConfType;
152
+ declare var VConf: VConfType
153
+
154
+ /**
155
+ * 自定义指令v-dominfo对象
156
+ * @p 使用方式
157
+ * @example
158
+ * --- template
159
+ * <div v-dominfo="conf.dominfo"></div>
160
+ *
161
+ * --- script ts setup
162
+ * const conf = reactive({
163
+ * dom:{} as Dominfo
164
+ * })
165
+ */
166
+ interface Dominfo {
167
+ /**
168
+ * 元素高度
169
+ */
170
+ height: number
171
+ /**
172
+ * 元素宽度
173
+ */
174
+ width: number
175
+ /**
176
+ * 元素滚动顶部距离
177
+ */
178
+ scrollTop: number
179
+ /**
180
+ * 元素滚动左侧距离
181
+ */
182
+ scrollLeft: number
183
+ /**
184
+ * 元素客户端高度
185
+ */
186
+ clientHeight: number
187
+ /**
188
+ * 元素客户端宽度
189
+ */
190
+ clientWidth: number
191
+ /**
192
+ * 元素滚动高度
193
+ */
194
+ scrollHeight: number
195
+ /**
196
+ * 元素滚动宽度
197
+ */
198
+ scrollWidth: number
199
+ /**
200
+ * 元素是否滚动到顶部
201
+ */
202
+ isScrollTop: boolean
203
+ /**
204
+ * 元素是否滚动到底部
205
+ */
206
+ isScrollBottom: boolean
207
+ /**
208
+ * 元素是否滚动到左侧
209
+ */
210
+ isScrollLeft: boolean
211
+ /**
212
+ * 元素是否滚动到右侧
213
+ */
214
+ isScrollRight: boolean
215
+ /**
216
+ * 元素
217
+ */
218
+ el: HTMLElement
219
+ }
220
+
221
+ declare var Dominfo: {
222
+ prototype: Dominfo
223
+ new (): Dominfo
224
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc1-ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "我来助你-Vue3UI库",
5
5
  "repository": {
6
6
  "type": "git",