@fangzhongya/icons 0.0.36 → 0.0.37
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.
- package/dist/{chunk-A6OAKI5J.js → chunk-QAGFWECA.js} +1 -1
- package/dist/{chunk-3Z7ZNWFS.cjs → chunk-XJKQMTVU.cjs} +1 -1
- package/dist/index.json +1 -1
- package/dist/json.cjs +2 -2
- package/dist/json.d.cts +1 -1
- package/dist/json.d.ts +1 -1
- package/dist/json.js +1 -1
- package/dist/picker/index.cjs +7 -28
- package/dist/picker/index.d.cts +36 -25
- package/dist/picker/index.d.ts +36 -25
- package/dist/picker/index.js +7 -28
- package/dist/vite/index.cjs +3 -3
- package/dist/vite/index.js +1 -1
- package/package.json +1 -1
package/dist/index.json
CHANGED
package/dist/json.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXJKQMTVUcjs = require('./chunk-XJKQMTVU.cjs');
|
|
4
4
|
require('./chunk-75ZPJI57.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
exports.default =
|
|
7
|
+
exports.default = _chunkXJKQMTVUcjs.json_default;
|
package/dist/json.d.cts
CHANGED
package/dist/json.d.ts
CHANGED
package/dist/json.js
CHANGED
package/dist/picker/index.cjs
CHANGED
|
@@ -44,9 +44,9 @@ var picker_default = _vue.defineComponent.call(void 0, {
|
|
|
44
44
|
* 图标名称
|
|
45
45
|
*/
|
|
46
46
|
icons: {
|
|
47
|
-
type:
|
|
47
|
+
type: Array,
|
|
48
48
|
default() {
|
|
49
|
-
return
|
|
49
|
+
return [];
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
/**
|
|
@@ -62,16 +62,9 @@ var picker_default = _vue.defineComponent.call(void 0, {
|
|
|
62
62
|
const name = _vue.ref.call(void 0, props.modelValue);
|
|
63
63
|
const search = _vue.ref.call(void 0, "");
|
|
64
64
|
const icons = _vue.computed.call(void 0, () => {
|
|
65
|
-
const obj = props.icons
|
|
65
|
+
const obj = props.icons || [];
|
|
66
66
|
if (search.value) {
|
|
67
|
-
|
|
68
|
-
(k) => k.includes(search.value)
|
|
69
|
-
);
|
|
70
|
-
const r = {};
|
|
71
|
-
for (const k of ks) {
|
|
72
|
-
r[k] = obj[k];
|
|
73
|
-
}
|
|
74
|
-
return r;
|
|
67
|
+
return obj.filter((k) => k.includes(search.value));
|
|
75
68
|
} else {
|
|
76
69
|
return obj;
|
|
77
70
|
}
|
|
@@ -269,20 +262,7 @@ var picker_default = _vue.defineComponent.call(void 0, {
|
|
|
269
262
|
overflow: "auto"
|
|
270
263
|
}
|
|
271
264
|
},
|
|
272
|
-
|
|
273
|
-
const o = icons.value[key];
|
|
274
|
-
let v;
|
|
275
|
-
if (typeof o === "string") {
|
|
276
|
-
v = { body: o };
|
|
277
|
-
} else {
|
|
278
|
-
v = o;
|
|
279
|
-
}
|
|
280
|
-
if (!(v == null ? void 0 : v.width)) {
|
|
281
|
-
v.width = props.icons.width;
|
|
282
|
-
}
|
|
283
|
-
if (!(v == null ? void 0 : v.height)) {
|
|
284
|
-
v.height = props.icons.height;
|
|
285
|
-
}
|
|
265
|
+
icons.value.map((key) => {
|
|
286
266
|
return _vue.h.call(void 0,
|
|
287
267
|
"div",
|
|
288
268
|
{
|
|
@@ -299,15 +279,14 @@ var picker_default = _vue.defineComponent.call(void 0, {
|
|
|
299
279
|
}
|
|
300
280
|
},
|
|
301
281
|
[
|
|
302
|
-
_vue.h.call(void 0,
|
|
282
|
+
_vue.h.call(void 0, iconVue.value, {
|
|
303
283
|
style: {
|
|
304
284
|
margin: "5px",
|
|
305
285
|
marginBottom: 0,
|
|
306
286
|
backgroundColor: key === name.value ? "#e0edff" : ""
|
|
307
287
|
},
|
|
308
|
-
type: "svg",
|
|
309
288
|
size: props.size,
|
|
310
|
-
name:
|
|
289
|
+
name: key
|
|
311
290
|
}),
|
|
312
291
|
_vue.h.call(void 0,
|
|
313
292
|
"div",
|
package/dist/picker/index.d.cts
CHANGED
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { IconType } from '../icon/index.cjs';
|
|
3
3
|
|
|
4
|
-
type IconsValueObj = {
|
|
5
|
-
body?: string;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
height?: string | number;
|
|
8
|
-
};
|
|
9
|
-
type IconsValue = {
|
|
10
|
-
[key: string | number]: IconsValueObj | string;
|
|
11
|
-
};
|
|
12
|
-
type IconsInfo = {
|
|
13
|
-
name?: string;
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
type Icons = {
|
|
17
|
-
prefix?: string;
|
|
18
|
-
info?: string | IconsInfo;
|
|
19
|
-
width?: string | number;
|
|
20
|
-
height?: string | number;
|
|
21
|
-
icons: IconsValue;
|
|
22
|
-
};
|
|
23
4
|
declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
24
5
|
icon: {
|
|
25
6
|
type: (ObjectConstructor | StringConstructor)[];
|
|
@@ -50,8 +31,23 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
50
31
|
* 图标名称
|
|
51
32
|
*/
|
|
52
33
|
icons: {
|
|
53
|
-
type:
|
|
54
|
-
|
|
34
|
+
type: {
|
|
35
|
+
(arrayLength: number): string[];
|
|
36
|
+
(...items: string[]): string[];
|
|
37
|
+
new (arrayLength: number): string[];
|
|
38
|
+
new (...items: string[]): string[];
|
|
39
|
+
isArray(arg: any): arg is any[];
|
|
40
|
+
readonly prototype: any[];
|
|
41
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
42
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
43
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
44
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
45
|
+
of<T>(...items: T[]): T[];
|
|
46
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
47
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
48
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
49
|
+
};
|
|
50
|
+
default(): any[];
|
|
55
51
|
};
|
|
56
52
|
/**
|
|
57
53
|
* 图标类型
|
|
@@ -91,8 +87,23 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
91
87
|
* 图标名称
|
|
92
88
|
*/
|
|
93
89
|
icons: {
|
|
94
|
-
type:
|
|
95
|
-
|
|
90
|
+
type: {
|
|
91
|
+
(arrayLength: number): string[];
|
|
92
|
+
(...items: string[]): string[];
|
|
93
|
+
new (arrayLength: number): string[];
|
|
94
|
+
new (...items: string[]): string[];
|
|
95
|
+
isArray(arg: any): arg is any[];
|
|
96
|
+
readonly prototype: any[];
|
|
97
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
98
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
99
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
100
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
101
|
+
of<T>(...items: T[]): T[];
|
|
102
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
103
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
104
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
105
|
+
};
|
|
106
|
+
default(): any[];
|
|
96
107
|
};
|
|
97
108
|
/**
|
|
98
109
|
* 图标类型
|
|
@@ -105,7 +116,7 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
105
116
|
}>, {
|
|
106
117
|
clearable: boolean;
|
|
107
118
|
size: string | number;
|
|
108
|
-
icons:
|
|
119
|
+
icons: string[];
|
|
109
120
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
110
121
|
|
|
111
|
-
export {
|
|
122
|
+
export { _default as default };
|
package/dist/picker/index.d.ts
CHANGED
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { IconType } from '../icon/index.js';
|
|
3
3
|
|
|
4
|
-
type IconsValueObj = {
|
|
5
|
-
body?: string;
|
|
6
|
-
width?: string | number;
|
|
7
|
-
height?: string | number;
|
|
8
|
-
};
|
|
9
|
-
type IconsValue = {
|
|
10
|
-
[key: string | number]: IconsValueObj | string;
|
|
11
|
-
};
|
|
12
|
-
type IconsInfo = {
|
|
13
|
-
name?: string;
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
};
|
|
16
|
-
type Icons = {
|
|
17
|
-
prefix?: string;
|
|
18
|
-
info?: string | IconsInfo;
|
|
19
|
-
width?: string | number;
|
|
20
|
-
height?: string | number;
|
|
21
|
-
icons: IconsValue;
|
|
22
|
-
};
|
|
23
4
|
declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
24
5
|
icon: {
|
|
25
6
|
type: (ObjectConstructor | StringConstructor)[];
|
|
@@ -50,8 +31,23 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
50
31
|
* 图标名称
|
|
51
32
|
*/
|
|
52
33
|
icons: {
|
|
53
|
-
type:
|
|
54
|
-
|
|
34
|
+
type: {
|
|
35
|
+
(arrayLength: number): string[];
|
|
36
|
+
(...items: string[]): string[];
|
|
37
|
+
new (arrayLength: number): string[];
|
|
38
|
+
new (...items: string[]): string[];
|
|
39
|
+
isArray(arg: any): arg is any[];
|
|
40
|
+
readonly prototype: any[];
|
|
41
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
42
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
43
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
44
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
45
|
+
of<T>(...items: T[]): T[];
|
|
46
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
47
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
48
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
49
|
+
};
|
|
50
|
+
default(): any[];
|
|
55
51
|
};
|
|
56
52
|
/**
|
|
57
53
|
* 图标类型
|
|
@@ -91,8 +87,23 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
91
87
|
* 图标名称
|
|
92
88
|
*/
|
|
93
89
|
icons: {
|
|
94
|
-
type:
|
|
95
|
-
|
|
90
|
+
type: {
|
|
91
|
+
(arrayLength: number): string[];
|
|
92
|
+
(...items: string[]): string[];
|
|
93
|
+
new (arrayLength: number): string[];
|
|
94
|
+
new (...items: string[]): string[];
|
|
95
|
+
isArray(arg: any): arg is any[];
|
|
96
|
+
readonly prototype: any[];
|
|
97
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
98
|
+
from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
99
|
+
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
|
|
100
|
+
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
101
|
+
of<T>(...items: T[]): T[];
|
|
102
|
+
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
103
|
+
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
104
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
105
|
+
};
|
|
106
|
+
default(): any[];
|
|
96
107
|
};
|
|
97
108
|
/**
|
|
98
109
|
* 图标类型
|
|
@@ -105,7 +116,7 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
105
116
|
}>, {
|
|
106
117
|
clearable: boolean;
|
|
107
118
|
size: string | number;
|
|
108
|
-
icons:
|
|
119
|
+
icons: string[];
|
|
109
120
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
110
121
|
|
|
111
|
-
export {
|
|
122
|
+
export { _default as default };
|
package/dist/picker/index.js
CHANGED
|
@@ -44,9 +44,9 @@ var picker_default = defineComponent({
|
|
|
44
44
|
* 图标名称
|
|
45
45
|
*/
|
|
46
46
|
icons: {
|
|
47
|
-
type:
|
|
47
|
+
type: Array,
|
|
48
48
|
default() {
|
|
49
|
-
return
|
|
49
|
+
return [];
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
/**
|
|
@@ -62,16 +62,9 @@ var picker_default = defineComponent({
|
|
|
62
62
|
const name = ref(props.modelValue);
|
|
63
63
|
const search = ref("");
|
|
64
64
|
const icons = computed(() => {
|
|
65
|
-
const obj = props.icons
|
|
65
|
+
const obj = props.icons || [];
|
|
66
66
|
if (search.value) {
|
|
67
|
-
|
|
68
|
-
(k) => k.includes(search.value)
|
|
69
|
-
);
|
|
70
|
-
const r = {};
|
|
71
|
-
for (const k of ks) {
|
|
72
|
-
r[k] = obj[k];
|
|
73
|
-
}
|
|
74
|
-
return r;
|
|
67
|
+
return obj.filter((k) => k.includes(search.value));
|
|
75
68
|
} else {
|
|
76
69
|
return obj;
|
|
77
70
|
}
|
|
@@ -269,20 +262,7 @@ var picker_default = defineComponent({
|
|
|
269
262
|
overflow: "auto"
|
|
270
263
|
}
|
|
271
264
|
},
|
|
272
|
-
|
|
273
|
-
const o = icons.value[key];
|
|
274
|
-
let v;
|
|
275
|
-
if (typeof o === "string") {
|
|
276
|
-
v = { body: o };
|
|
277
|
-
} else {
|
|
278
|
-
v = o;
|
|
279
|
-
}
|
|
280
|
-
if (!(v == null ? void 0 : v.width)) {
|
|
281
|
-
v.width = props.icons.width;
|
|
282
|
-
}
|
|
283
|
-
if (!(v == null ? void 0 : v.height)) {
|
|
284
|
-
v.height = props.icons.height;
|
|
285
|
-
}
|
|
265
|
+
icons.value.map((key) => {
|
|
286
266
|
return h(
|
|
287
267
|
"div",
|
|
288
268
|
{
|
|
@@ -299,15 +279,14 @@ var picker_default = defineComponent({
|
|
|
299
279
|
}
|
|
300
280
|
},
|
|
301
281
|
[
|
|
302
|
-
h(
|
|
282
|
+
h(iconVue.value, {
|
|
303
283
|
style: {
|
|
304
284
|
margin: "5px",
|
|
305
285
|
marginBottom: 0,
|
|
306
286
|
backgroundColor: key === name.value ? "#e0edff" : ""
|
|
307
287
|
},
|
|
308
|
-
type: "svg",
|
|
309
288
|
size: props.size,
|
|
310
|
-
name:
|
|
289
|
+
name: key
|
|
311
290
|
}),
|
|
312
291
|
h(
|
|
313
292
|
"div",
|
package/dist/vite/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkYJVFENGGcjs = require('../chunk-YJVFENGG.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkXJKQMTVUcjs = require('../chunk-XJKQMTVU.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkBXEIRESQcjs = require('../chunk-BXEIRESQ.cjs');
|
|
@@ -1222,7 +1222,7 @@ function findComponents(code, name) {
|
|
|
1222
1222
|
return components;
|
|
1223
1223
|
}
|
|
1224
1224
|
function getText(iconName, match) {
|
|
1225
|
-
const svg = _chunkYJVFENGGcjs.getIconifySVG.call(void 0,
|
|
1225
|
+
const svg = _chunkYJVFENGGcjs.getIconifySVG.call(void 0, _chunkXJKQMTVUcjs.json_default, iconName);
|
|
1226
1226
|
const s = match.fullMatch.replace(`name="${iconName}"`, "").replace(`</${match.componentName}>`, "");
|
|
1227
1227
|
const text = `${s}${svg}</${match.componentName}>`;
|
|
1228
1228
|
return { text, imptext: "" };
|
|
@@ -1248,7 +1248,7 @@ function replaceComponent(match, type, dynamic, customReplacement) {
|
|
|
1248
1248
|
if (customReplacement) {
|
|
1249
1249
|
return customReplacement(iconName, attributes);
|
|
1250
1250
|
}
|
|
1251
|
-
let svgContent =
|
|
1251
|
+
let svgContent = _chunkXJKQMTVUcjs.json_default.icons[iconName];
|
|
1252
1252
|
if (!svgContent) {
|
|
1253
1253
|
return { text: match.fullMatch, imptext: "" };
|
|
1254
1254
|
}
|
package/dist/vite/index.js
CHANGED