@cmstops/pro-compo 0.1.0
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/README.md +107 -0
- package/dist/index.css +4 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/index.less +2 -0
- package/dist/index.min.css +1 -0
- package/dist/index.min.js +11 -0
- package/dist/index.min.js.map +1 -0
- package/es/_virtual/plugin-vue_export-helper.js +7 -0
- package/es/button/component.d.ts +24 -0
- package/es/button/component.js +43 -0
- package/es/button/index.d.ts +103 -0
- package/es/button/index.js +7 -0
- package/es/button/style/css.js +1 -0
- package/es/button/style/index.css +4 -0
- package/es/button/style/index.d.ts +1 -0
- package/es/button/style/index.js +1 -0
- package/es/button/style/index.less +4 -0
- package/es/components.d.ts +5 -0
- package/es/components.js +11 -0
- package/es/index.css +4 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/index.less +2 -0
- package/es/style/index.less +1 -0
- package/lib/_virtual/plugin-vue_export-helper.js +8 -0
- package/lib/button/component.js +44 -0
- package/lib/button/index.js +8 -0
- package/lib/button/style/css.js +2 -0
- package/lib/button/style/index.css +4 -0
- package/lib/button/style/index.js +2 -0
- package/lib/button/style/index.less +4 -0
- package/lib/components.js +12 -0
- package/lib/index.css +4 -0
- package/lib/index.js +6 -0
- package/lib/index.less +2 -0
- package/lib/style/index.less +1 -0
- package/package.json +107 -0
package/README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Arco 物料项目
|
|
2
|
+
|
|
3
|
+
[物料平台文档中心](https://arco.design/docs/material/guide)
|
|
4
|
+
|
|
5
|
+
## 快速开始
|
|
6
|
+
|
|
7
|
+
**在 `npm run dev` 前,请运行 `npm run add:component -- ComponentName` 创建第一个组件,否则 dev 将会因缺少 Story 入口而报错。**
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
# 添加组件
|
|
11
|
+
npm run add:component -- YourComponentName
|
|
12
|
+
|
|
13
|
+
# 开发
|
|
14
|
+
npm run dev
|
|
15
|
+
|
|
16
|
+
# 构建
|
|
17
|
+
npm run build
|
|
18
|
+
|
|
19
|
+
# 发布前预览
|
|
20
|
+
npm run prepublishOnly && arco preview
|
|
21
|
+
|
|
22
|
+
# 发布至物料平台(需先发布 NPM 包)
|
|
23
|
+
arco sync
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## 提供 Demo
|
|
28
|
+
|
|
29
|
+
Demo 目录位于 `src/demo`。你可以在此目录中加入多个 Demo,它们将被展示在物料平台的预览页。在 `src/demo/index.js` 中,通过 JSDoc 的语法提供物料及各个 Demo 的相关信息。
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
// src/demo/index.js
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @file
|
|
36
|
+
* @title 组件名
|
|
37
|
+
* @memberOf 组件类型,例如:数据输入
|
|
38
|
+
* @description 描述你的组件。
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @title 基本用法
|
|
43
|
+
* @description 描述你的例子
|
|
44
|
+
*/
|
|
45
|
+
import Basic from './basic.vue';
|
|
46
|
+
|
|
47
|
+
export const BasicDemo = () => Basic;
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## API 文档
|
|
51
|
+
|
|
52
|
+
**为了帮助他人更好地使用你的组件,请提供详细的 API 文档。**
|
|
53
|
+
|
|
54
|
+
### 书写注释
|
|
55
|
+
|
|
56
|
+
我们使用了 [Vue Styleguidist](https://vue-styleguidist.github.io/) 来提取组件 Props 的注释,然后自动生成组件的 API 文档。为此,如果你想对外暴露一个 Property,请参照Vue Styleguidist 的规则书写注释:
|
|
57
|
+
|
|
58
|
+
```vue
|
|
59
|
+
// ✅ 可以被正确提取的注释
|
|
60
|
+
props: {
|
|
61
|
+
/**
|
|
62
|
+
* 提示文字
|
|
63
|
+
*/
|
|
64
|
+
tip: String,
|
|
65
|
+
/**
|
|
66
|
+
* 按钮组件Props
|
|
67
|
+
*/
|
|
68
|
+
buttonProps: {
|
|
69
|
+
// 如果使用PropType,请使用对象的形式定义
|
|
70
|
+
type: Object as PropType<Record<string, any>>,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
// ❌ 没有书写注释的属性会被忽略
|
|
75
|
+
props: {
|
|
76
|
+
disabled: Boolean,
|
|
77
|
+
},
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 扩展 TEMPLATE.md
|
|
81
|
+
|
|
82
|
+
`TEMPLATE.md` 是用于自动文档生成的模板,你可以修改此文件添加更多组件的使用帮助信息,但请不要删除其原有的内容,否则可能导致内容替换失败。
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
// TEMPLATE.md
|
|
86
|
+
---
|
|
87
|
+
file: index
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
# TooltipButton
|
|
91
|
+
|
|
92
|
+
## 属性/Props
|
|
93
|
+
|
|
94
|
+
%%Props%%
|
|
95
|
+
|
|
96
|
+
### OtherProps
|
|
97
|
+
|
|
98
|
+
在这里你可以书写更多组件帮助文档。
|
|
99
|
+
|
|
100
|
+
## Demos
|
|
101
|
+
|
|
102
|
+
%%Demos%%
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 测试
|
|
106
|
+
|
|
107
|
+
测试目录位于 `src/__test__`。你可以在 `index.test.tsx` 中编写你的测试用例,在 `demo.test.tsx` 中可以进行基于 Demo 的快照测试。
|
package/dist/index.css
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(function(global, factory) {
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.ArcoComponents = factory());
|
|
3
|
+
})(this, function() {
|
|
4
|
+
"use strict";
|
|
5
|
+
const components = {};
|
|
6
|
+
const install = (app) => {
|
|
7
|
+
for (const key of Object.keys(components)) {
|
|
8
|
+
app.use(components[key]);
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const Components = {
|
|
12
|
+
...components,
|
|
13
|
+
install
|
|
14
|
+
};
|
|
15
|
+
return Components;
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../components/components.ts"],"sourcesContent":["import type { App, Plugin } from 'vue';\n// import your Component\n\nconst components: Record<string, Plugin> = {\n // Add your Component\n};\n\nconst install = (app: App) => {\n for (const key of Object.keys(components)) {\n app.use(components[key]);\n }\n};\n\nconst Components = {\n ...components,\n install,\n};\n\nexport default Components;\n"],"names":[],"mappings":";;;;AAGA,QAAM,aAAqC,CAAA;AAI3C,QAAM,UAAU,CAAC,QAAa;AAC5B,eAAW,OAAO,OAAO,KAAK,UAAU,GAAG;AACrC,UAAA,IAAI,WAAW,IAAI;AAAA,IACzB;AAAA,EACF;AAEA,QAAM,aAAa;AAAA,IACjB,GAAG;AAAA,IACH;AAAA,EACF;;;"}
|
package/dist/index.less
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.tooltip-button{height:auto;padding:20px}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
!function(e, o) {
|
|
2
|
+
"object" == typeof exports && "undefined" != typeof module ? module.exports = o() : "function" == typeof define && define.amd ? define(o) : (e = "undefined" != typeof globalThis ? globalThis : e || self).ArcoComponents = o();
|
|
3
|
+
}(this, function() {
|
|
4
|
+
"use strict";
|
|
5
|
+
const e = {};
|
|
6
|
+
return { ...e, install: (o) => {
|
|
7
|
+
for (const n of Object.keys(e))
|
|
8
|
+
o.use(e[n]);
|
|
9
|
+
} };
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=index.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.min.js","sources":["../components/components.ts"],"sourcesContent":["import type { App, Plugin } from 'vue';\n// import your Component\n\nconst components: Record<string, Plugin> = {\n // Add your Component\n};\n\nconst install = (app: App) => {\n for (const key of Object.keys(components)) {\n app.use(components[key]);\n }\n};\n\nconst Components = {\n ...components,\n install,\n};\n\nexport default Components;\n"],"names":["components","install","app","key","Object","keys","use"],"mappings":";;;;AAGA,QAAMA,IAAqC,CAAA;SAUxB,EAAA,GACdA,GACHC,SAReC;AACf,eAAWC,KAAOC,OAAOC,KAAKL;AACxBE,QAAAI,IAAIN,EAAWG,EAAAA;AAAAA,EACrB;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
/**
|
|
3
|
+
* @zh 提示文字
|
|
4
|
+
* @en Prompt text
|
|
5
|
+
*/
|
|
6
|
+
tip: StringConstructor;
|
|
7
|
+
/**
|
|
8
|
+
* @zh 按钮组件的Props
|
|
9
|
+
* @en The props of button component
|
|
10
|
+
*/
|
|
11
|
+
buttonProps: ObjectConstructor;
|
|
12
|
+
}, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
+
/**
|
|
14
|
+
* @zh 提示文字
|
|
15
|
+
* @en Prompt text
|
|
16
|
+
*/
|
|
17
|
+
tip: StringConstructor;
|
|
18
|
+
/**
|
|
19
|
+
* @zh 按钮组件的Props
|
|
20
|
+
* @en The props of button component
|
|
21
|
+
*/
|
|
22
|
+
buttonProps: ObjectConstructor;
|
|
23
|
+
}>>, {}, {}>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createVNode, mergeProps, renderSlot } from "vue";
|
|
2
|
+
import { Button, Tooltip } from "@arco-design/web-vue";
|
|
3
|
+
import _export_sfc from "../_virtual/plugin-vue_export-helper.js";
|
|
4
|
+
const _sfc_main = defineComponent({
|
|
5
|
+
name: "button",
|
|
6
|
+
components: {
|
|
7
|
+
Button,
|
|
8
|
+
Tooltip
|
|
9
|
+
},
|
|
10
|
+
props: {
|
|
11
|
+
tip: String,
|
|
12
|
+
buttonProps: Object
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16
|
+
const _component_Button = resolveComponent("Button");
|
|
17
|
+
const _component_Tooltip = resolveComponent("Tooltip");
|
|
18
|
+
return _ctx.tip ? (openBlock(), createBlock(_component_Tooltip, {
|
|
19
|
+
key: 0,
|
|
20
|
+
content: _ctx.tip,
|
|
21
|
+
position: "bottom"
|
|
22
|
+
}, {
|
|
23
|
+
default: withCtx(() => [
|
|
24
|
+
createVNode(_component_Button, mergeProps({ class: "tooltip-button" }, _ctx.buttonProps), {
|
|
25
|
+
default: withCtx(() => [
|
|
26
|
+
renderSlot(_ctx.$slots, "default")
|
|
27
|
+
]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16)
|
|
30
|
+
]),
|
|
31
|
+
_: 3
|
|
32
|
+
}, 8, ["content"])) : (openBlock(), createBlock(_component_Button, mergeProps({
|
|
33
|
+
key: 1,
|
|
34
|
+
class: "tooltip-button"
|
|
35
|
+
}, _ctx.buttonProps), {
|
|
36
|
+
default: withCtx(() => [
|
|
37
|
+
renderSlot(_ctx.$slots, "default")
|
|
38
|
+
]),
|
|
39
|
+
_: 3
|
|
40
|
+
}, 16));
|
|
41
|
+
}
|
|
42
|
+
var _button = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
43
|
+
export { _button as default };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
declare const button: {
|
|
3
|
+
new (...args: any[]): {
|
|
4
|
+
$: import("vue").ComponentInternalInstance;
|
|
5
|
+
$data: {};
|
|
6
|
+
$props: {
|
|
7
|
+
readonly tip?: string | undefined;
|
|
8
|
+
readonly buttonProps?: Record<string, any> | undefined;
|
|
9
|
+
key?: string | number | symbol | undefined;
|
|
10
|
+
ref?: import("vue").VNodeRef | undefined;
|
|
11
|
+
ref_for?: boolean | undefined;
|
|
12
|
+
ref_key?: string | undefined;
|
|
13
|
+
onVnodeBeforeMount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}>) => void)[] | undefined;
|
|
18
|
+
onVnodeMounted?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}>) => void)[] | undefined;
|
|
23
|
+
onVnodeBeforeUpdate?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}>, oldVNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}>, oldVNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}>) => void)[] | undefined;
|
|
32
|
+
onVnodeUpdated?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
33
|
+
[key: string]: any;
|
|
34
|
+
}>, oldVNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}>, oldVNode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}>) => void)[] | undefined;
|
|
41
|
+
onVnodeBeforeUnmount?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
}>) => void)[] | undefined;
|
|
46
|
+
onVnodeUnmounted?: ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
47
|
+
[key: string]: any;
|
|
48
|
+
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
49
|
+
[key: string]: any;
|
|
50
|
+
}>) => void)[] | undefined;
|
|
51
|
+
class?: unknown;
|
|
52
|
+
style?: unknown;
|
|
53
|
+
};
|
|
54
|
+
$attrs: {
|
|
55
|
+
[x: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
$refs: {
|
|
58
|
+
[x: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
$slots: Readonly<{
|
|
61
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
62
|
+
}>;
|
|
63
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
64
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
65
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
66
|
+
$el: any;
|
|
67
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
68
|
+
tip: StringConstructor;
|
|
69
|
+
buttonProps: ObjectConstructor;
|
|
70
|
+
}>>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}> & {
|
|
71
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
72
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
73
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
74
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
75
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
76
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
77
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
78
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
79
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
80
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
81
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
82
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
83
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
84
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
85
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
86
|
+
};
|
|
87
|
+
$forceUpdate: () => void;
|
|
88
|
+
$nextTick: typeof import("vue").nextTick;
|
|
89
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
90
|
+
} & Readonly<import("vue").ExtractPropTypes<{
|
|
91
|
+
tip: StringConstructor;
|
|
92
|
+
buttonProps: ObjectConstructor;
|
|
93
|
+
}>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
94
|
+
__isFragment?: undefined;
|
|
95
|
+
__isTeleport?: undefined;
|
|
96
|
+
__isSuspense?: undefined;
|
|
97
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
98
|
+
tip: StringConstructor;
|
|
99
|
+
buttonProps: ObjectConstructor;
|
|
100
|
+
}>>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
101
|
+
install: (app: App) => void;
|
|
102
|
+
};
|
|
103
|
+
export default button;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../../index.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../../index.less";
|
package/es/components.js
ADDED
package/es/index.css
ADDED
package/es/index.d.ts
ADDED
package/es/index.js
ADDED
package/es/index.less
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Global Style
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var webVue = require("@arco-design/web-vue");
|
|
4
|
+
var pluginVue_exportHelper = require("../_virtual/plugin-vue_export-helper.js");
|
|
5
|
+
const _sfc_main = vue.defineComponent({
|
|
6
|
+
name: "button",
|
|
7
|
+
components: {
|
|
8
|
+
Button: webVue.Button,
|
|
9
|
+
Tooltip: webVue.Tooltip
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
tip: String,
|
|
13
|
+
buttonProps: Object
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
17
|
+
const _component_Button = vue.resolveComponent("Button");
|
|
18
|
+
const _component_Tooltip = vue.resolveComponent("Tooltip");
|
|
19
|
+
return _ctx.tip ? (vue.openBlock(), vue.createBlock(_component_Tooltip, {
|
|
20
|
+
key: 0,
|
|
21
|
+
content: _ctx.tip,
|
|
22
|
+
position: "bottom"
|
|
23
|
+
}, {
|
|
24
|
+
default: vue.withCtx(() => [
|
|
25
|
+
vue.createVNode(_component_Button, vue.mergeProps({ class: "tooltip-button" }, _ctx.buttonProps), {
|
|
26
|
+
default: vue.withCtx(() => [
|
|
27
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
28
|
+
]),
|
|
29
|
+
_: 3
|
|
30
|
+
}, 16)
|
|
31
|
+
]),
|
|
32
|
+
_: 3
|
|
33
|
+
}, 8, ["content"])) : (vue.openBlock(), vue.createBlock(_component_Button, vue.mergeProps({
|
|
34
|
+
key: 1,
|
|
35
|
+
class: "tooltip-button"
|
|
36
|
+
}, _ctx.buttonProps), {
|
|
37
|
+
default: vue.withCtx(() => [
|
|
38
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
39
|
+
]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 16));
|
|
42
|
+
}
|
|
43
|
+
var _button = /* @__PURE__ */ pluginVue_exportHelper(_sfc_main, [["render", _sfc_render]]);
|
|
44
|
+
module.exports = _button;
|
package/lib/index.css
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
var components = require("./components.js");
|
|
4
|
+
var index = require("./button/index.js");
|
|
5
|
+
exports["default"] = components;
|
|
6
|
+
exports.button = index;
|
package/lib/index.less
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Global Style
|
package/package.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cmstops/pro-compo",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vue",
|
|
7
|
+
"arco-design"
|
|
8
|
+
],
|
|
9
|
+
"author": "",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"main": "dist/index.cjs.js",
|
|
12
|
+
"module": "dist/index.esm.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"umd": {
|
|
15
|
+
"file": "dist/index.min.js",
|
|
16
|
+
"style": "dist/index.min.css",
|
|
17
|
+
"module": "ArcoComponents"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"dev": "start-storybook -p 9528",
|
|
21
|
+
"build": "npm run build:component && npm run build:style && npm run dtsgen",
|
|
22
|
+
"build:component": "arco-vue-scripts build:material-library",
|
|
23
|
+
"build:style": "arco-vue-scripts build:style -M",
|
|
24
|
+
"dtsgen": "arco-vue-scripts dtsgen 'components/**/*.{ts,tsx,vue}'",
|
|
25
|
+
"docgen": "arco-vue-scripts docgen",
|
|
26
|
+
"test": "arco-vue-scripts test",
|
|
27
|
+
"add:component": "node ./scripts/add-component.js",
|
|
28
|
+
"prepublishOnly": "npm run build"
|
|
29
|
+
},
|
|
30
|
+
"husky": {
|
|
31
|
+
"hooks": {
|
|
32
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
|
33
|
+
"pre-commit": "lint-staged"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"lint-staged": {
|
|
37
|
+
"*.{js,ts,jsx,tsx,vue}": [
|
|
38
|
+
"eslint --fix",
|
|
39
|
+
"prettier --write"
|
|
40
|
+
],
|
|
41
|
+
"*.{less,css}": [
|
|
42
|
+
"stylelint --fix",
|
|
43
|
+
"prettier --write"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"vue": "^3.2.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@cmstops/arco-vue-scripts": "^0.2.9",
|
|
51
|
+
"@arco-design/web-vue": "~2",
|
|
52
|
+
"@babel/core": "^7.14.6",
|
|
53
|
+
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
|
54
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
55
|
+
"@babel/preset-env": "^7.14.7",
|
|
56
|
+
"@babel/preset-typescript": "^7.14.5",
|
|
57
|
+
"@commitlint/cli": "^11.0.0",
|
|
58
|
+
"@commitlint/config-conventional": "^12.0.1",
|
|
59
|
+
"@storybook/addon-actions": "^6.3.0",
|
|
60
|
+
"@storybook/addon-essentials": "^6.3.0",
|
|
61
|
+
"@storybook/addon-links": "^6.3.0",
|
|
62
|
+
"@storybook/builder-webpack5": "^6.5.9",
|
|
63
|
+
"@storybook/manager-webpack5": "^6.5.9",
|
|
64
|
+
"@storybook/vue3": "^6.3.0",
|
|
65
|
+
"@types/fs-extra": "^9.0.6",
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^4.18.0",
|
|
67
|
+
"@typescript-eslint/parser": "^4.12.0",
|
|
68
|
+
"@vue/babel-plugin-jsx": "^1.0.6",
|
|
69
|
+
"@vue/test-utils": "^2.0.0-beta.14",
|
|
70
|
+
"babel-loader": "^8.2.2",
|
|
71
|
+
"eslint": "^7.21.0",
|
|
72
|
+
"eslint-config-airbnb-base": "^14.2.1",
|
|
73
|
+
"eslint-config-prettier": "^8.3.0",
|
|
74
|
+
"eslint-import-resolver-typescript": "^2.4.0",
|
|
75
|
+
"eslint-plugin-import": "^2.22.1",
|
|
76
|
+
"eslint-plugin-prettier": "^3.3.1",
|
|
77
|
+
"eslint-plugin-vue": "^7.7.0",
|
|
78
|
+
"fast-glob": "^3.2.7",
|
|
79
|
+
"fs-extra": "^9.1.0",
|
|
80
|
+
"husky": "^4.3.7",
|
|
81
|
+
"less": "^4.1.1",
|
|
82
|
+
"less-loader": "^7.3.0",
|
|
83
|
+
"lint-staged": "^10.5.3",
|
|
84
|
+
"prettier": "^2.2.1",
|
|
85
|
+
"stylelint": "^13.8.0",
|
|
86
|
+
"stylelint-config-prettier": "^8.0.2",
|
|
87
|
+
"stylelint-config-rational-order": "^0.1.2",
|
|
88
|
+
"stylelint-config-standard": "^20.0.0",
|
|
89
|
+
"stylelint-order": "^4.1.0",
|
|
90
|
+
"typescript": "^4.2.4",
|
|
91
|
+
"vue": "^3.2.0",
|
|
92
|
+
"vue-loader": "^16.2.0",
|
|
93
|
+
"webpack": "^5.88.2"
|
|
94
|
+
},
|
|
95
|
+
"arcoMeta": {
|
|
96
|
+
"type": "vue-library",
|
|
97
|
+
"title": "@cmstops/pro-compo",
|
|
98
|
+
"category": [
|
|
99
|
+
"数据展示"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"files": [
|
|
103
|
+
"es",
|
|
104
|
+
"lib",
|
|
105
|
+
"dist"
|
|
106
|
+
]
|
|
107
|
+
}
|