yc-design-vue 1.7.0 → 1.7.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.
- package/es/Drawer/index.d.ts +5 -0
- package/es/Drawer/index.js +2 -1
- package/es/Transfer/TransferPanel.vue2.js +2 -2
- package/es/Typography/TypographyBase.vue2.js +2 -2
- package/es/_shared/icons/IconCopy.vue.js +1 -16
- package/es/_shared/icons/IconCopy.vue2.js +16 -1
- package/es/_shared/icons/IconDelete.vue.js +16 -1
- package/es/_shared/icons/IconDelete.vue2.js +1 -16
- package/es/_shared/icons/IconEdit.vue.js +1 -16
- package/es/_shared/icons/IconEdit.vue2.js +16 -1
- package/es/_shared/icons/IconSearch.vue.js +16 -1
- package/es/_shared/icons/IconSearch.vue2.js +1 -16
- package/lib/Drawer/index.d.ts +5 -0
- package/lib/Drawer/index.js +1 -1
- package/lib/Transfer/TransferPanel.vue2.js +1 -1
- package/lib/Typography/TypographyBase.vue2.js +1 -1
- package/lib/_shared/icons/IconCopy.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.js +1 -1
- package/lib/_shared/icons/IconDelete.vue.js +1 -1
- package/lib/_shared/icons/IconDelete.vue2.js +1 -1
- package/lib/_shared/icons/IconEdit.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/_shared/icons/IconSearch.vue.js +1 -1
- package/lib/_shared/icons/IconSearch.vue2.js +1 -1
- package/package.json +1 -1
package/es/Drawer/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { App } from 'vue';
|
2
|
+
import { DrawerConfig, DrawerUpdateConfig } from './type';
|
2
3
|
import { default as _Drawer } from './Drawer.vue';
|
3
4
|
export type DrawerInstance = InstanceType<typeof _Drawer>;
|
4
5
|
export * from './type';
|
@@ -133,6 +134,10 @@ declare const Drawer: {
|
|
133
134
|
$slots: Readonly<import('./type').DrawerSlots> & import('./type').DrawerSlots;
|
134
135
|
}) & {
|
135
136
|
install: (app: App) => void;
|
137
|
+
open: (props: DrawerConfig) => {
|
138
|
+
close: () => void;
|
139
|
+
update: (updateProps: DrawerUpdateConfig) => void;
|
140
|
+
};
|
136
141
|
};
|
137
142
|
declare module 'vue' {
|
138
143
|
interface GlobalComponents {
|
package/es/Drawer/index.js
CHANGED
@@ -5,8 +5,8 @@ import "../_shared/utils/time.js";
|
|
5
5
|
import { getGlobalConfig } from "../_shared/utils/global-config.js";
|
6
6
|
/* empty css */
|
7
7
|
import _sfc_main$3 from "../_shared/icons/IconClose.vue.js";
|
8
|
-
import _sfc_main$1 from "../_shared/icons/IconDelete.
|
9
|
-
import _sfc_main$2 from "../_shared/icons/IconSearch.
|
8
|
+
import _sfc_main$1 from "../_shared/icons/IconDelete.vue.js";
|
9
|
+
import _sfc_main$2 from "../_shared/icons/IconSearch.vue.js";
|
10
10
|
import useContext from "./hooks/useContext.js";
|
11
11
|
import Checkbox from "../Checkbox/index.js";
|
12
12
|
import Scrollbar from "../Scrollbar/index.js";
|
@@ -5,8 +5,8 @@ import { getDomText, sleep } from "../_shared/utils/dom.js";
|
|
5
5
|
import "../_shared/utils/time.js";
|
6
6
|
import "../Empty/index.js";
|
7
7
|
/* empty css */
|
8
|
-
import _sfc_main$3 from "../_shared/icons/IconCopy.
|
9
|
-
import _sfc_main$1 from "../_shared/icons/IconEdit.
|
8
|
+
import _sfc_main$3 from "../_shared/icons/IconCopy.vue2.js";
|
9
|
+
import _sfc_main$1 from "../_shared/icons/IconEdit.vue2.js";
|
10
10
|
import _sfc_main$2 from "../_shared/icons/IconInfo.vue.js";
|
11
11
|
import useControlValue from "../_shared/utils/control.js";
|
12
12
|
import Input from "../Input/index.js";
|
@@ -1,19 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import YcIcon from "../components/Icon.vue2.js";
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
-
__name: "IconCopy",
|
5
|
-
setup(__props) {
|
6
|
-
return (_ctx, _cache) => {
|
7
|
-
return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
8
|
-
default: withCtx(() => _cache[0] || (_cache[0] = [
|
9
|
-
createElementVNode("path", { d: "M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z" }, null, -1)
|
10
|
-
])),
|
11
|
-
_: 1,
|
12
|
-
__: [0]
|
13
|
-
}, 16);
|
14
|
-
};
|
15
|
-
}
|
16
|
-
});
|
1
|
+
import _sfc_main from "./IconCopy.vue2.js";
|
17
2
|
export {
|
18
3
|
_sfc_main as default
|
19
4
|
};
|
@@ -1,4 +1,19 @@
|
|
1
|
-
import
|
1
|
+
import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
|
2
|
+
import YcIcon from "../components/Icon.vue2.js";
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
+
__name: "IconCopy",
|
5
|
+
setup(__props) {
|
6
|
+
return (_ctx, _cache) => {
|
7
|
+
return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
8
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
9
|
+
createElementVNode("path", { d: "M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z" }, null, -1)
|
10
|
+
])),
|
11
|
+
_: 1,
|
12
|
+
__: [0]
|
13
|
+
}, 16);
|
14
|
+
};
|
15
|
+
}
|
16
|
+
});
|
2
17
|
export {
|
3
18
|
_sfc_main as default
|
4
19
|
};
|
@@ -1,4 +1,19 @@
|
|
1
|
-
import
|
1
|
+
import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
|
2
|
+
import YcIcon from "../components/Icon.vue2.js";
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
+
__name: "IconDelete",
|
5
|
+
setup(__props) {
|
6
|
+
return (_ctx, _cache) => {
|
7
|
+
return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
8
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
9
|
+
createElementVNode("path", { d: "M5 11h5.5m0 0v29a1 1 0 0 0 1 1h25a1 1 0 0 0 1-1V11m-27 0H16m21.5 0H43m-5.5 0H32m-16 0V7h16v4m-16 0h16M20 18v15m8-15v15" }, null, -1)
|
10
|
+
])),
|
11
|
+
_: 1,
|
12
|
+
__: [0]
|
13
|
+
}, 16);
|
14
|
+
};
|
15
|
+
}
|
16
|
+
});
|
2
17
|
export {
|
3
18
|
_sfc_main as default
|
4
19
|
};
|
@@ -1,19 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import YcIcon from "../components/Icon.vue2.js";
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
-
__name: "IconDelete",
|
5
|
-
setup(__props) {
|
6
|
-
return (_ctx, _cache) => {
|
7
|
-
return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
8
|
-
default: withCtx(() => _cache[0] || (_cache[0] = [
|
9
|
-
createElementVNode("path", { d: "M5 11h5.5m0 0v29a1 1 0 0 0 1 1h25a1 1 0 0 0 1-1V11m-27 0H16m21.5 0H43m-5.5 0H32m-16 0V7h16v4m-16 0h16M20 18v15m8-15v15" }, null, -1)
|
10
|
-
])),
|
11
|
-
_: 1,
|
12
|
-
__: [0]
|
13
|
-
}, 16);
|
14
|
-
};
|
15
|
-
}
|
16
|
-
});
|
1
|
+
import _sfc_main from "./IconDelete.vue.js";
|
17
2
|
export {
|
18
3
|
_sfc_main as default
|
19
4
|
};
|
@@ -1,19 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import YcIcon from "../components/Icon.vue2.js";
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
-
__name: "IconEdit",
|
5
|
-
setup(__props) {
|
6
|
-
return (_ctx, _cache) => {
|
7
|
-
return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
8
|
-
default: withCtx(() => _cache[0] || (_cache[0] = [
|
9
|
-
createElementVNode("path", { d: "m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36" }, null, -1)
|
10
|
-
])),
|
11
|
-
_: 1,
|
12
|
-
__: [0]
|
13
|
-
}, 16);
|
14
|
-
};
|
15
|
-
}
|
16
|
-
});
|
1
|
+
import _sfc_main from "./IconEdit.vue2.js";
|
17
2
|
export {
|
18
3
|
_sfc_main as default
|
19
4
|
};
|
@@ -1,4 +1,19 @@
|
|
1
|
-
import
|
1
|
+
import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
|
2
|
+
import YcIcon from "../components/Icon.vue2.js";
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
+
__name: "IconEdit",
|
5
|
+
setup(__props) {
|
6
|
+
return (_ctx, _cache) => {
|
7
|
+
return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
8
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
9
|
+
createElementVNode("path", { d: "m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36" }, null, -1)
|
10
|
+
])),
|
11
|
+
_: 1,
|
12
|
+
__: [0]
|
13
|
+
}, 16);
|
14
|
+
};
|
15
|
+
}
|
16
|
+
});
|
2
17
|
export {
|
3
18
|
_sfc_main as default
|
4
19
|
};
|
@@ -1,4 +1,19 @@
|
|
1
|
-
import
|
1
|
+
import { defineComponent, createBlock, openBlock, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
|
2
|
+
import YcIcon from "../components/Icon.vue2.js";
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
+
__name: "IconSearch",
|
5
|
+
setup(__props) {
|
6
|
+
return (_ctx, _cache) => {
|
7
|
+
return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
8
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
9
|
+
createElementVNode("path", { d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485" }, null, -1)
|
10
|
+
])),
|
11
|
+
_: 1,
|
12
|
+
__: [0]
|
13
|
+
}, 16);
|
14
|
+
};
|
15
|
+
}
|
16
|
+
});
|
2
17
|
export {
|
3
18
|
_sfc_main as default
|
4
19
|
};
|
@@ -1,19 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import YcIcon from "../components/Icon.vue2.js";
|
3
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
4
|
-
__name: "IconSearch",
|
5
|
-
setup(__props) {
|
6
|
-
return (_ctx, _cache) => {
|
7
|
-
return openBlock(), createBlock(YcIcon, normalizeProps(guardReactiveProps(_ctx.$attrs)), {
|
8
|
-
default: withCtx(() => _cache[0] || (_cache[0] = [
|
9
|
-
createElementVNode("path", { d: "M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485" }, null, -1)
|
10
|
-
])),
|
11
|
-
_: 1,
|
12
|
-
__: [0]
|
13
|
-
}, 16);
|
14
|
-
};
|
15
|
-
}
|
16
|
-
});
|
1
|
+
import _sfc_main from "./IconSearch.vue.js";
|
17
2
|
export {
|
18
3
|
_sfc_main as default
|
19
4
|
};
|
package/lib/Drawer/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { App } from 'vue';
|
2
|
+
import { DrawerConfig, DrawerUpdateConfig } from './type';
|
2
3
|
import { default as _Drawer } from './Drawer.vue';
|
3
4
|
export type DrawerInstance = InstanceType<typeof _Drawer>;
|
4
5
|
export * from './type';
|
@@ -133,6 +134,10 @@ declare const Drawer: {
|
|
133
134
|
$slots: Readonly<import('./type').DrawerSlots> & import('./type').DrawerSlots;
|
134
135
|
}) & {
|
135
136
|
install: (app: App) => void;
|
137
|
+
open: (props: DrawerConfig) => {
|
138
|
+
close: () => void;
|
139
|
+
update: (updateProps: DrawerUpdateConfig) => void;
|
140
|
+
};
|
136
141
|
};
|
137
142
|
declare module 'vue' {
|
138
143
|
interface GlobalComponents {
|
package/lib/Drawer/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),r=require("./Drawer.vue.js"),n=require("./DrawerService.vue.js");let
|
1
|
+
"use strict";const e=require("vue"),r=require("./Drawer.vue.js"),n=require("./DrawerService.vue.js");let o;const s=r=>{o||(o=document.createElement("div"),o.className="yc-overlay yc-overlay-drawer",document.body.append(o));const s=()=>{e.render(null,o)},c=e.h(n,{...r,serviceClose:s});return e.render(c,o),{close:s,update:e=>{}}},c=Object.assign(r,{install:e=>{e.component("Yc"+r.name,r),e.config.globalProperties.$drawer=Object.assign(r,{open:s})},open:s});module.exports=c;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const l=require("../_shared/utils/global-config.js");;/* empty css */const t=require("../_shared/icons/IconClose.vue.js"),a=require("../_shared/icons/IconDelete.
|
1
|
+
"use strict";const e=require("vue");require("../node_modules/tinycolor2/esm/tinycolor.js"),require("../_shared/utils/dom.js"),require("../_shared/utils/time.js");const l=require("../_shared/utils/global-config.js");;/* empty css */const t=require("../_shared/icons/IconClose.vue.js"),a=require("../_shared/icons/IconDelete.vue.js"),r=require("../_shared/icons/IconSearch.vue.js"),n=require("./hooks/useContext.js"),o=require("../Checkbox/index.js"),u=require("../Scrollbar/index.js"),c=require("../Input/index.js"),s=require("../_shared/components/IconButton.vue.js");;/* empty css */const i={class:"yc-transfer-view"},v={class:"yc-transfer-view-header"},d={class:"yc-transfer-view-header-title"},m={class:"yc-transfer-view-header-count"},f={key:0,class:"yc-transfer-view-search"},p={class:"yc-transfer-view-body"},k={key:1,role:"list",class:"yc-transfer-list"},h=["onClick"],y={class:"yc-transfer-list-item-content text-ellipsis"},g=e.defineComponent({__name:"TransferPanel",props:{type:{}},setup(g){const B=g,{type:C}=e.toRefs(B),{renderEmpty:V}=l.getGlobalConfig(),{computedValue:x,computedSelected:N,targetChecked:b,sourceChecked:_,sourceOptions:w,targetOptions:E,disabled:S,oneWay:j,showSearch:q,showSelectAll:D,simple:I,sourceInputSearchProps:T,targetInputSearchProps:F,slots:P,title:z,emits:L}=n().inject(),O=e.ref(""),A=e.computed(()=>("source"==C.value?w.value:E.value).filter(e=>{var l;return null==(l=e.label)?void 0:l.toLowerCase().includes(O.value.toLowerCase())})),U=e.computed(()=>"source"==C.value?_.value:b.value),G=e.computed(()=>"source"==C.value?T.value:F.value),K=e.computed(()=>"source"==C.value?z.value[0]:z.value[1]),R=e.computed({get:()=>!!U.value.length&&U.value.length==A.value.length,set(e){if(e)N.value=[...new Set([...N.value,...A.value.map(e=>e.value)])];else{const e=Object.fromEntries(A.value.map(e=>[e.value,e]));N.value=N.value.filter(l=>!e[l])}}}),W=e.computed(()=>!!U.value.length&&U.value.length<=A.value.length),$=()=>{!S.value&&x.value.length&&(x.value=[])},H=()=>{var e;return null==(e=P["source"==C.value?"source-title":"target-title"])?void 0:e.call(P,{countTotal:"source"==C.value?w.value.length:E.value.length,countSelected:"source"==C.value?_.value.length:b.value.length,searchValue:O.value,checked:R.value,indeterminate:W.value,onSelectAllChange:e=>{R.value=e},onClear:$})},J=()=>{var e;return null==(e=P[C.value])?void 0:e.call(P,{selectedKeys:U.value,data:A.value,onSelect:e=>{N.value=e}})},M=e=>()=>{var l;return null==(l=P.item)?void 0:l.call(P,e)};return(l,n)=>(e.openBlock(),e.createElementBlock("div",i,[e.createElementVNode("div",v,[e.unref(P)[`${e.unref(C)}-title`]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(H),{key:0})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",d,[!e.unref(D)||e.unref(I)||e.unref(j)&&"target"==e.unref(C)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(K.value),1)],64)):(e.openBlock(),e.createBlock(e.unref(o.default),{key:0,modelValue:R.value,"onUpdate:modelValue":n[0]||(n[0]=e=>R.value=e),indeterminate:W.value,disabled:!A.value.length||e.unref(S)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(K.value),1)]),_:1},8,["modelValue","indeterminate","disabled"]))]),e.createElementVNode("span",m,[e.unref(I)||e.unref(j)&&"target"==e.unref(C)?"target"!=e.unref(C)||e.unref(I)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s),{key:1,size:14,onClick:$},{default:e.withCtx(()=>[e.createVNode(e.unref(a))]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(U.value.length)+" / "+e.toDisplayString(A.value.length),1)],64))])],64))]),e.unref(q)?(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(e.unref(c),e.mergeProps({modelValue:O.value,"onUpdate:modelValue":n[1]||(n[1]=e=>O.value=e)},G.value,{onInput:n[2]||(n[2]=l=>e.unref(L)("search",l,e.unref(C)))}),{suffix:e.withCtx(()=>[e.createVNode(e.unref(r))]),_:1},16,["modelValue"])])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[A.value.length?(e.openBlock(),e.createBlock(e.unref(u),{key:0},{default:e.withCtx(()=>[e.unref(P)[e.unref(C)]?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(J),{key:0})):(e.openBlock(),e.createElementBlock("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,l=>(e.openBlock(),e.createElementBlock("div",{key:l.value,role:"listitem",class:e.normalizeClass(["yc-transfer-list-item",{"yc-transfer-list-item-disabled":l.disabled||e.unref(S)}]),onClick:e=>(e=>{const{value:l}=e;S.value||e.disabled||(j.value&&"source"!=C.value||I.value)&&(x.value="source"==C.value?[...x.value,l]:x.value.filter(e=>e!=l))})(l)},[e.unref(j)&&(!e.unref(j)||"source"!=e.unref(C))||e.unref(I)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("span",y,[e.unref(P).item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(l)),{key:0})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(P).item?"":l.label),1)]),"target"!=e.unref(C)||e.unref(I)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s),{key:0,"hover-size":20},{default:e.withCtx(()=>[e.createVNode(e.unref(t))]),_:1}))],64)):(e.openBlock(),e.createBlock(e.unref(o.default),{key:0,"model-value":U.value.includes(l.value),disabled:l.disabled||e.unref(S),onChange:e=>((e,l)=>{N.value=e?[...N.value,l]:N.value.filter(e=>e!=l),L("select",N.value)})(e,l.value)},{default:e.withCtx(()=>[e.unref(P).item?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(M(l)),{key:0})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(P).item?"":l.label),1)]),_:2},1032,["model-value","disabled","onChange"]))],10,h))),128))]))]),_:1})):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(V)("Transfer"))))])]))}});module.exports=g;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const o=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const l=require("../_shared/icons/IconCopy.
|
1
|
+
"use strict";const e=require("vue"),t=require("../node_modules/@vueuse/core/index.js");require("../node_modules/tinycolor2/esm/tinycolor.js");const o=require("../_shared/utils/dom.js");require("../_shared/utils/time.js"),require("../Empty/index.js");/* empty css */const l=require("../_shared/icons/IconCopy.vue2.js"),a=require("../_shared/icons/IconEdit.vue2.js"),n=require("../_shared/icons/IconInfo.vue.js"),r=require("../_shared/utils/control.js"),u=require("../Input/index.js"),d=require("../Tooltip/index.js"),p=e.defineComponent({name:"TypographyBase",__name:"TypographyBase",props:{tag:{default:"span"},type:{default:void 0},bold:{type:Boolean,default:!1},disabled:{type:Boolean},mark:{type:Boolean,default:!1},underline:{type:Boolean,default:!1},delete:{type:Boolean,default:!1},code:{type:Boolean,default:!1},editable:{type:Boolean,default:!1},editing:{type:Boolean,default:void 0},defaultEditing:{type:Boolean,default:!1},editText:{default:""},copyable:{type:Boolean,default:!1},copyText:{default:""},copyDelay:{default:3e3},ellipsis:{type:[Boolean,Object],default:!0},editTooltiProps:{default:()=>({})},copyTooltiProps:{default:()=>({})}},emits:["update:editing","update:editText","edit-start","change","copy","edit-end","ellipsis","expand"],setup(p,{emit:i}){const s=p,c=i,{editing:y,defaultEditing:f,editText:v,copyText:m,copyable:g,copyDelay:B,code:k,mark:h,delete:x,underline:_,bold:T}=e.toRefs(s),{isSupported:C,copy:b}=t.useClipboard(),j=e.ref(!1),q=e.ref(),V=e.ref(),E=r(y,f.value,e=>{c("update:editing",e)}),N=r(v,"",e=>{c("update:editText",e),c("change",e)});e.ref({});const w=e.computed(()=>{const e=[h.value,k.value,x.value,_.value,T.value];return["mark","code","del","u","b"].filter((t,o)=>e[o])}),D=e.defineComponent({props:{tags:{type:Array,default:()=>[]}},setup:(t,{slots:o})=>()=>{var l;const{tags:a}=e.toRefs(t),n=(t,o)=>o>=a.value.length?t:e.h(a.value[o],null,n(t,o+1));return n(null==(l=o.default)?void 0:l.call(o),0)}}),I=async()=>{var e;E.value=!0,N.value=N.value?N.value:o.getDomText(q),c("edit-start"),await o.sleep(0),null==(e=V.value)||e.focus()},P=()=>{E.value=!1,c("edit-end")},R=async()=>{if(!g.value||!C.value||j.value)return;const e=m.value||o.getDomText(q);b(e),c("copy",e),j.value=!0,await o.sleep(B.value),j.value=!1};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:e.normalizeClass(["yc-typography",{[`yc-typography-${t.type}`]:t.type,"yc-typography-bold":e.unref(T),"yc-typography-disabled":t.disabled,"yc-typography-underline":e.unref(_),"yc-typography-delete":e.unref(x)}]),ref_key:"contentRef",ref:q},{default:e.withCtx(()=>[e.unref(E)?(e.openBlock(),e.createBlock(e.unref(u),{key:0,modelValue:e.unref(N),"onUpdate:modelValue":o[0]||(o[0]=t=>e.isRef(N)?N.value=t:null),ref_key:"inputRef",ref:V,onBlur:P},null,8,["modelValue"])):(e.openBlock(),e.createBlock(e.unref(D),{key:1,tags:w.value},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["tags"])),t.editable&&!e.unref(E)?(e.openBlock(),e.createElementBlock("span",{key:2,class:"yc-typography-operation-edit",onClick:I},[e.createVNode(e.unref(d),e.mergeProps({content:"编辑",position:"top"},t.editTooltiProps),{default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createVNode(e.unref(a))])]),_:1},16)])):e.createCommentVNode("",!0),e.unref(g)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"yc-typography-operation-copy",onClick:R},[e.createVNode(e.unref(d),e.mergeProps({position:"top"},t.copyTooltiProps),{content:e.withCtx(()=>[e.renderSlot(t.$slots,"copy-tooltip",{copied:j.value},()=>[e.createTextVNode(e.toDisplayString(""+(j.value?"已复制":"复制")),1)],!0)]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.renderSlot(t.$slots,"copy-icon",{copied:j.value},()=>[j.value?(e.openBlock(),e.createBlock(e.unref(n),{key:0,color:"rgb(0, 180, 42)"})):(e.openBlock(),e.createBlock(e.unref(l),{key:1}))],!0)])]),_:3},16)])):e.createCommentVNode("",!0)]),_:3},8,["class"]))}});module.exports=p;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("
|
1
|
+
"use strict";const e=require("./IconCopy.vue2.js");module.exports=e;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("
|
1
|
+
"use strict";const e=require("vue"),o=require("../components/Icon.vue2.js"),t=e.defineComponent({__name:"IconCopy",setup:t=>(t,n)=>(e.openBlock(),e.createBlock(o,e.normalizeProps(e.guardReactiveProps(t.$attrs)),{default:e.withCtx(()=>n[0]||(n[0]=[e.createElementVNode("path",{d:"M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z"},null,-1)])),_:1,__:[0]},16))});module.exports=t;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("
|
1
|
+
"use strict";const e=require("vue"),t=require("../components/Icon.vue2.js"),o=e.defineComponent({__name:"IconDelete",setup:o=>(o,m)=>(e.openBlock(),e.createBlock(t,e.normalizeProps(e.guardReactiveProps(o.$attrs)),{default:e.withCtx(()=>m[0]||(m[0]=[e.createElementVNode("path",{d:"M5 11h5.5m0 0v29a1 1 0 0 0 1 1h25a1 1 0 0 0 1-1V11m-27 0H16m21.5 0H43m-5.5 0H32m-16 0V7h16v4m-16 0h16M20 18v15m8-15v15"},null,-1)])),_:1,__:[0]},16))});module.exports=o;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue
|
1
|
+
"use strict";const e=require("./IconDelete.vue.js");module.exports=e;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("
|
1
|
+
"use strict";const e=require("./IconEdit.vue2.js");module.exports=e;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("
|
1
|
+
"use strict";const e=require("vue"),t=require("../components/Icon.vue2.js"),o=e.defineComponent({__name:"IconEdit",setup:o=>(o,a)=>(e.openBlock(),e.createBlock(t,e.normalizeProps(e.guardReactiveProps(o.$attrs)),{default:e.withCtx(()=>a[0]||(a[0]=[e.createElementVNode("path",{d:"m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36"},null,-1)])),_:1,__:[0]},16))});module.exports=o;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("
|
1
|
+
"use strict";const e=require("vue"),t=require("../components/Icon.vue2.js"),o=e.defineComponent({__name:"IconSearch",setup:o=>(o,r)=>(e.openBlock(),e.createBlock(t,e.normalizeProps(e.guardReactiveProps(o.$attrs)),{default:e.withCtx(()=>r[0]||(r[0]=[e.createElementVNode("path",{d:"M33.072 33.071c6.248-6.248 6.248-16.379 0-22.627-6.249-6.249-16.38-6.249-22.628 0-6.248 6.248-6.248 16.379 0 22.627 6.248 6.248 16.38 6.248 22.628 0Zm0 0 8.485 8.485"},null,-1)])),_:1,__:[0]},16))});module.exports=o;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";const e=require("vue
|
1
|
+
"use strict";const e=require("./IconSearch.vue.js");module.exports=e;
|