vue-spear-tip 0.1.3 → 0.1.5-alpha.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/dist/.vite/manifest.json +33 -0
- package/dist/Button-CIlBP6tS.cjs +1 -0
- package/dist/Button-CJGpSsNS.js +315 -0
- package/dist/Interfaces/IBaseVueComponent.d.ts +6 -0
- package/dist/Interfaces/IGlobalComponent.d.ts +6 -0
- package/dist/Interfaces/IVueClass.d.ts +207 -0
- package/dist/builder.d.ts +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/LazyComponents.d.ts +5 -0
- package/dist/core/Computed.d.ts +6 -0
- package/dist/core/Props.d.ts +24 -0
- package/dist/core/VueClass.d.ts +81 -0
- package/dist/core/VueClassComponent.d.ts +23 -0
- package/dist/core/Watch.d.ts +8 -0
- package/dist/core/index.d.ts +11 -0
- package/dist/index-CTjZqel9.cjs +1 -0
- package/dist/index-Ds2kdgYB.js +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/vue-spear-tip.cjs.js +1 -0
- package/dist/vue-spear-tip.css +1 -0
- package/dist/vue-spear-tip.es.js +251 -0
- package/package.json +36 -10
- package/.github/workflows/publish.yml +0 -23
- package/index.cjs +0 -5
- package/index.d.cts +0 -0
- package/index.d.ts +0 -0
- package/index.js +0 -5
- package/src/Interfaces/IBaseVueComponent.ts +0 -7
- package/src/Interfaces/IVueClass.ts +0 -226
- package/src/components/BaseComponent.vue +0 -22
- package/src/core/Computed.ts +0 -38
- package/src/core/Props.ts +0 -70
- package/src/core/VueClass.ts +0 -79
- package/src/core/VueClassComponent.ts +0 -347
- package/src/core/Watch.ts +0 -45
- package/src/core/index.ts +0 -9
- package/tsconfig.json +0 -14
- package/vite.config.ts +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"src/components/Button/Button.vue": {
|
|
3
|
+
"file": "Button-CIlBP6tS.cjs",
|
|
4
|
+
"name": "Button",
|
|
5
|
+
"src": "src/components/Button/Button.vue",
|
|
6
|
+
"isDynamicEntry": true,
|
|
7
|
+
"imports": [
|
|
8
|
+
"src/index.ts"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"src/components/Button/index.ts": {
|
|
12
|
+
"file": "index-CTjZqel9.cjs",
|
|
13
|
+
"name": "index",
|
|
14
|
+
"src": "src/components/Button/index.ts",
|
|
15
|
+
"isDynamicEntry": true,
|
|
16
|
+
"dynamicImports": [
|
|
17
|
+
"src/components/Button/Button.vue"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"src/index.ts": {
|
|
21
|
+
"file": "vue-spear-tip.cjs.js",
|
|
22
|
+
"name": "index.js",
|
|
23
|
+
"src": "src/index.ts",
|
|
24
|
+
"isEntry": true,
|
|
25
|
+
"dynamicImports": [
|
|
26
|
+
"src/components/Button/index.ts"
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"style.css": {
|
|
30
|
+
"file": "vue-spear-tip.css",
|
|
31
|
+
"src": "style.css"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./vue-spear-tip.cjs.js"),e=require("vue");var u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,n=(t,r,a,h)=>{for(var l=h>1?void 0:h?d(r,a):r,c=t.length-1,s;c>=0;c--)(s=t[c])&&(l=(h?s(r,a,l):s(l))||l);return h&&l&&u(r,a,l),l};let o=class extends i.BaseComponent{emits=["click","touchstart","touchend","mousedown","mouseup","clickTap","clickTouch","clickOrTouchstart","clickOrTouchend","mousedownOrTouchstart","mouseupOrTouchend","keydownEnter"];icon="";iconRight="";badge="";badgeBg=null;badgeColor=null;style={};bg=null;color=null;borderColor=null;bgActive=null;colorActive=null;colorHover=null;borderColorActive=null;boxShadowColor=null;fontSize=null;fontFamily=null;bgGradientTop=null;bgGradientBottom=null;disabled=!1;shine=!1;type="button";title=null;disabledTitle=null;dataTheme="black";dataDisabledTheme="gray";dataPlacement="top";dataOffset="top";width="calc(100% - 8px)";borderRadius="3px";link=null;linkRevert=null;theme="primary";backgroundCss="";boxShadowCss="";isOnHover=!1;isButtonActive=!1;randomClass="";dataThemeInner="";currentBg=null;currentColor=null;currentColorHover=null;currentBorderColor=null;currentBgActive=null;currentBorderColorActive=null;currentBoxShadowColor=null;currentColorActive=null;innerTitle=null;hasTouchpad=!1;mounted(){this.randomClass="button-c",this.updateTheme(),this.$refs?.button}updateTheme(){const r="#ccc",a="#000",h="#cacaca",l="#ccc",c="#b6b6b6",s="#5b5a5a";this.currentBgActive,this.currentBorderColor=this.currentColor=this.currentBg=this.currentColorActive=null,this.theme=="primary"&&(this.currentBg="#005bbf",this.currentColor="#fff",this.currentBorderColor="#0367d5",this.currentBgActive="#005fc8",this.currentBorderColorActive="#0871e3",this.currentBoxShadowColor="#065e8d",this.currentColorActive="#fff",this.currentColorHover="#fff"),this.theme=="success"?(this.currentBg="#0aa86d",this.currentColor="#fff",this.currentBorderColor="#24a876",this.currentBgActive="#0b9762",this.currentBorderColorActive="#0b9762",this.currentBoxShadowColor="#31735b",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="danger"?(this.currentBg="#FF3B30",this.currentColor="#fff",this.currentBorderColor="#FF3B30",this.currentBgActive="#FF3B30",this.currentBorderColorActive="#FF3B30",this.currentBoxShadowColor="#ff8179",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="pink"?(this.currentBg="#ff6161",this.currentColor="#fff",this.currentBorderColor="#ff4741c9",this.currentBgActive="#ff6a60",this.currentBorderColorActive="#ff4141",this.currentBoxShadowColor="#ff6a60",this.currentColorActive="#fff",this.currentColorHover="#fff"):this.theme=="warning"?(this.currentBg="#FF9500",this.currentColor="#fff",this.currentBorderColor="#FF9500",this.currentBgActive="#ffb546",this.currentBorderColorActive="#ffb546",this.currentBoxShadowColor="#ffbe64",this.currentColorActive="#fdff98",this.currentColorHover="#fff8e8"):this.theme=="info"?(this.currentBg="#78d9ff",this.currentColor="#203464",this.currentColorHover="#34aff1",this.currentBorderColor="#3db0ee",this.currentBgActive="#78d9ff",this.currentBorderColorActive="#78d9ff",this.currentBoxShadowColor="#78d9ff",this.currentColorActive="#fff",this.currentColorHover="#304460"):this.theme=="yellow"?(this.currentBg="#ffd900",this.currentColor="#444",this.currentBorderColor="#ffd900",this.currentBgActive="#ffc400",this.currentBorderColorActive="#f3c922",this.currentBoxShadowColor="#cac838",this.currentColorActive="#fff"):this.theme=="white"?(this.currentBg="#ffffff",this.currentColor="#444",this.currentColorHover="#164205",this.currentBorderColor="#cacaca",this.currentBgActive="#efede7",this.currentBorderColorActive="##cacaca",this.currentBoxShadowColor="#b3b3ab",this.currentColorActive="#164205"):this.theme=="purple"?(this.currentBg="#942cdd",this.currentColor="#fff",this.currentColorHover="#e7c0ff",this.currentBorderColor="#a539f3",this.currentBgActive="#b755ff",this.currentBorderColorActive="#b755ff",this.currentBoxShadowColor="#7f18c5",this.currentColorActive="#ffffff"):this.theme=="black"&&(this.currentBg="#32383e",this.currentColor="#fff",this.currentColorHover="#fcb7ab",this.currentBorderColor="#32383e",this.currentBgActive="#3b4249",this.currentBorderColorActive="#3b4249",this.currentBoxShadowColor="#32383e",this.currentColorActive="#ffffff"),this.currentBg=this.bg??this.currentBg??r,this.currentColor=this.color??this.currentColor??a,this.currentBorderColor=this.borderColor??this.currentBorderColor??h,this.currentBgActive=this.bgActive??this.currentBgActive??l,this.currentBorderColorActive=this.borderColorActive??this.currentBorderColorActive??c,this.currentBoxShadowColor=this.boxShadowColor??this.currentBoxShadowColor??s,this.currentColorActive=this.colorActive??this.currentColorActive??null,this.boxShadowCss=this.disabled?"box-shadow: none":`box-shadow: 0px 1px 2px 0px ${this.currentBoxShadowColor}`,this.dataThemeInner=this.disabled?this.dataDisabledTheme:this.dataTheme,this.backgroundCss="background: "+(this.bgGradientTop&&this.bgGradientBottom?`linear-gradient(to bottom, ${this.bgGradientTop}, ${this.bgGradientBottom})`:this.bg)}click(r){this.disabled||(this.$emit("click",r,this),this.hasTouchpad||(this.$emit("clickTouch",r,this),this.$emit("clickOrTouchstart",r,this),this.$emit("clickTap",r,this),this.link&&(this.link?.startsWith("http")||this.link?.startsWith("//"))||this.link&&this.linkRevert&&!this.linkRevert?.startsWith("http")&&!this.linkRevert?.startsWith("//")?this.$refs.link?.click():(this.link||this.linkRevert)&&window.pjax(this.link||this.linkRevert)))}touchstart(r){this.disabled||(this.$emit("touchstart",r,this),this.hasTouchpad&&(this.$emit("clickTouch",r,this),this.$emit("clickOrTouchstart",r,this)))}touchend(r){this.disabled||(this.$emit("touchend",r,this),this.hasTouchpad||this.$emit("clickOrTouchend",r,this))}mouseup(r){this.disabled||(this.$emit("mouseup",r,this),this.$emit("mouseupOrTouchend",r,this),this.$emit("clickOrTouchend",r,this))}mousedown(r){this.disabled||(this.$emit("mousedown",r,this),this.$emit("mousedownOrTouchstart",r,this))}keydownEnter(r){this.disabled||this.$emit("keydownEnter",r,this)}focus(){this.$refs?.button?.focus()}_onThemeChanged(){this.updateTheme()}_onTitleChanged(r){this.innerTitle=null,r&&this.nextTick(()=>this.innerTitle=r)}showButton=!0;_onDisabledChanged(r){this.dataThemeInner=r?this.dataDisabledTheme:this.dataTheme,this.showButton=!1,this.nextTick(()=>this.showButton=!0)}};n([i.Prop(String)],o.prototype,"icon",2);n([i.Prop(String)],o.prototype,"iconRight",2);n([i.Prop(String)],o.prototype,"badge",2);n([i.Prop(String)],o.prototype,"badgeBg",2);n([i.Prop(String)],o.prototype,"badgeColor",2);n([i.Prop(Object)],o.prototype,"style",2);n([i.Prop(String,null)],o.prototype,"bg",2);n([i.Prop(String,null)],o.prototype,"color",2);n([i.Prop(String,null)],o.prototype,"borderColor",2);n([i.Prop(String,null)],o.prototype,"bgActive",2);n([i.Prop(String,null)],o.prototype,"colorActive",2);n([i.Prop(String,null)],o.prototype,"colorHover",2);n([i.Prop(String,null)],o.prototype,"borderColorActive",2);n([i.Prop(String,null)],o.prototype,"boxShadowColor",2);n([i.Prop(String)],o.prototype,"fontSize",2);n([i.Prop(String)],o.prototype,"fontFamily",2);n([i.Prop(String)],o.prototype,"bgGradientTop",2);n([i.Prop(String)],o.prototype,"bgGradientBottom",2);n([i.Prop(Boolean)],o.prototype,"disabled",2);n([i.Prop(Boolean)],o.prototype,"shine",2);n([i.Prop(String)],o.prototype,"type",2);n([i.Prop(String)],o.prototype,"title",2);n([i.Prop(String)],o.prototype,"disabledTitle",2);n([i.Prop(String)],o.prototype,"dataTheme",2);n([i.Prop(String)],o.prototype,"dataDisabledTheme",2);n([i.Prop(String)],o.prototype,"dataPlacement",2);n([i.Prop(String)],o.prototype,"dataOffset",2);n([i.Prop(String)],o.prototype,"width",2);n([i.Prop(String)],o.prototype,"borderRadius",2);n([i.Prop(String)],o.prototype,"link",2);n([i.Prop(String)],o.prototype,"linkRevert",2);n([i.Prop(String,null)],o.prototype,"theme",2);n([i.Watch("theme")],o.prototype,"_onThemeChanged",1);n([i.Watch("title",!1,!0)],o.prototype,"_onTitleChanged",1);n([i.Watch("disabled")],o.prototype,"_onDisabledChanged",1);o=n([i.VueClassComponent],o);const f=["title","data-theme","data-offset","data-placement"],p=["title","data-theme","data-offset","data-placement","disabled","type"],m=["href"],C=["href"];function g(t,r,a,h,l,c){return t.showButton?(e.openBlock(),e.createElementBlock("span",{key:0,class:"d-inline-block relative",title:t.disabled?t.disabledTitle:"","data-theme":t.dataThemeInner,"data-offset":t.dataOffset,"data-placement":t.dataPlacement},[e.createElementVNode("button",{class:e.normalizeClass(["relative",{shine:t.shine,[t.randomClass+(t.isOnHover?" hover":"")]:!0}]),title:t.disabled?"":t.innerTitle,"data-theme":t.dataThemeInner,"data-offset":t.dataOffset,"data-placement":t.dataPlacement,onMouseover:r[0]||(r[0]=s=>t.isOnHover=!0),onMouseout:r[1]||(r[1]=s=>t.isOnHover=!1),onClick:r[2]||(r[2]=(...s)=>t.click&&t.click(...s)),onTouchstart:r[3]||(r[3]=(...s)=>t.touchstart&&t.touchstart(...s)),onTouchend:r[4]||(r[4]=(...s)=>t.touchend&&t.touchend(...s)),onMouseup:r[5]||(r[5]=(...s)=>t.mouseup&&t.mouseup(...s)),onMousedown:r[6]||(r[6]=(...s)=>t.mousedown&&t.mousedown(...s)),onKeydown:r[7]||(r[7]=e.withKeys((...s)=>t.keydownEnter&&t.keydownEnter(...s),["enter"])),onMouseleave:r[8]||(r[8]=s=>t.isButtonActive=!1),disabled:t.disabled,type:t.type,style:e.normalizeStyle({fontSize:t.fontSize,fontFamily:t.fontFamily,borderRadius:t.borderRadius,width:t.width,...t.style}),ref:"button"},[t.badge?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute right--9px top--9px bg-lightblue-400 fw-bold rounded-full z-3 px7px",style:e.normalizeStyle({background:t.badgeBg??void 0,color:t.badgeColor??"#ffffff"})},e.toDisplayString(t.badge),5)):e.createCommentVNode("",!0),t.icon?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["left-icon-animate",t.$slots.default?"left-icon":""])},[e.createElementVNode("i",{class:e.normalizeClass(["fa",t.icon])},null,2)],2)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},void 0,!0),t.iconRight?(e.openBlock(),e.createElementBlock("span",{key:2,class:e.normalizeClass(["right-icon-animate",t.$slots.default?"right-icon":""])},[e.createElementVNode("i",{class:e.normalizeClass(["fa",t.iconRight])},null,2)],2)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent("style"),null,{default:e.withCtx(()=>[e.createTextVNode("."+e.toDisplayString(t.randomClass)+" { background: "+e.toDisplayString(t.style?.bacground??t.currentBg+"!important")+"; box-shadow: none !important; color: "+e.toDisplayString(t.currentColor)+" !important; border-color: "+e.toDisplayString(t.currentBorderColor)+" !important; }",1),t.currentColorHover?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode("."+e.toDisplayString(t.randomClass)+":hover { color: "+e.toDisplayString(t.style?.color??t.currentColorHover+"!important")+"; }",1)],64)):e.createCommentVNode("",!0),t.disabled?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("."+e.toDisplayString(t.randomClass)+":active { background: "+e.toDisplayString(t.currentBgActive)+" !important; border-color: "+e.toDisplayString(t.currentBorderColorActive)+" !important; color: "+e.toDisplayString(t.currentColorActive)+" !important; opacity: 1 !important; "+e.toDisplayString(t.boxShadowCss)+" !important; }",1)],64))]),_:1})),t.link&&t.link?.startsWith("http")||t.link?.startsWith("//")?(e.openBlock(),e.createElementBlock("a",{key:3,class:"d-none",ref:"link",href:t.link,target:"_blank"}," ",8,m)):!t.link&&t.linkRevert&&!t.linkRevert?.startsWith("http")&&!t.linkRevert?.startsWith("//")?(e.openBlock(),e.createElementBlock("a",{key:4,class:"d-none",ref:"link",href:t.linkRevert,target:"_blank"}," ",8,C)):e.createCommentVNode("",!0)],46,p)],8,f)):e.createCommentVNode("",!0)}const b=(t,r)=>{const a=t.__vccOpts||t;for(const[h,l]of r)a[h]=l;return a},B=b(o,[["render",g],["__scopeId","data-v-62b3eb97"]]);exports.default=B;
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
import { BaseComponent as B, Prop as i, Watch as g, VueClassComponent as y } from "./vue-spear-tip.es.js";
|
|
2
|
+
import { createElementBlock as d, createCommentVNode as c, openBlock as u, createElementVNode as C, normalizeStyle as m, withKeys as k, normalizeClass as p, renderSlot as A, createBlock as S, toDisplayString as l, resolveDynamicComponent as w, withCtx as T, createTextVNode as b, Fragment as v } from "vue";
|
|
3
|
+
var $ = Object.defineProperty, O = Object.getOwnPropertyDescriptor, o = (t, e, h, a) => {
|
|
4
|
+
for (var s = a > 1 ? void 0 : a ? O(e, h) : e, f = t.length - 1, n; f >= 0; f--)
|
|
5
|
+
(n = t[f]) && (s = (a ? n(e, h, s) : n(s)) || s);
|
|
6
|
+
return a && s && $(e, h, s), s;
|
|
7
|
+
};
|
|
8
|
+
let r = class extends B {
|
|
9
|
+
emits = [
|
|
10
|
+
"click",
|
|
11
|
+
"touchstart",
|
|
12
|
+
"touchend",
|
|
13
|
+
"mousedown",
|
|
14
|
+
"mouseup",
|
|
15
|
+
"clickTap",
|
|
16
|
+
"clickTouch",
|
|
17
|
+
"clickOrTouchstart",
|
|
18
|
+
"clickOrTouchend",
|
|
19
|
+
"mousedownOrTouchstart",
|
|
20
|
+
"mouseupOrTouchend",
|
|
21
|
+
"keydownEnter"
|
|
22
|
+
];
|
|
23
|
+
icon = "";
|
|
24
|
+
iconRight = "";
|
|
25
|
+
badge = "";
|
|
26
|
+
badgeBg = null;
|
|
27
|
+
badgeColor = null;
|
|
28
|
+
style = {};
|
|
29
|
+
bg = null;
|
|
30
|
+
color = null;
|
|
31
|
+
borderColor = null;
|
|
32
|
+
bgActive = null;
|
|
33
|
+
colorActive = null;
|
|
34
|
+
colorHover = null;
|
|
35
|
+
borderColorActive = null;
|
|
36
|
+
boxShadowColor = null;
|
|
37
|
+
fontSize = null;
|
|
38
|
+
fontFamily = null;
|
|
39
|
+
bgGradientTop = null;
|
|
40
|
+
bgGradientBottom = null;
|
|
41
|
+
disabled = !1;
|
|
42
|
+
shine = !1;
|
|
43
|
+
type = "button";
|
|
44
|
+
title = null;
|
|
45
|
+
disabledTitle = null;
|
|
46
|
+
dataTheme = "black";
|
|
47
|
+
dataDisabledTheme = "gray";
|
|
48
|
+
dataPlacement = "top";
|
|
49
|
+
dataOffset = "top";
|
|
50
|
+
width = "calc(100% - 8px)";
|
|
51
|
+
borderRadius = "3px";
|
|
52
|
+
link = null;
|
|
53
|
+
linkRevert = null;
|
|
54
|
+
theme = "primary";
|
|
55
|
+
backgroundCss = "";
|
|
56
|
+
boxShadowCss = "";
|
|
57
|
+
isOnHover = !1;
|
|
58
|
+
isButtonActive = !1;
|
|
59
|
+
randomClass = "";
|
|
60
|
+
dataThemeInner = "";
|
|
61
|
+
currentBg = null;
|
|
62
|
+
currentColor = null;
|
|
63
|
+
currentColorHover = null;
|
|
64
|
+
currentBorderColor = null;
|
|
65
|
+
currentBgActive = null;
|
|
66
|
+
currentBorderColorActive = null;
|
|
67
|
+
currentBoxShadowColor = null;
|
|
68
|
+
currentColorActive = null;
|
|
69
|
+
innerTitle = null;
|
|
70
|
+
hasTouchpad = !1;
|
|
71
|
+
// TODO добавить проверку и Hammer
|
|
72
|
+
mounted() {
|
|
73
|
+
this.randomClass = "button-c", this.updateTheme(), this.$refs?.button;
|
|
74
|
+
}
|
|
75
|
+
updateTheme() {
|
|
76
|
+
const e = "#ccc", h = "#000", a = "#cacaca", s = "#ccc", f = "#b6b6b6", n = "#5b5a5a";
|
|
77
|
+
this.currentBgActive, this.currentBorderColor = this.currentColor = this.currentBg = this.currentColorActive = null, this.theme == "primary" && (this.currentBg = "#005bbf", this.currentColor = "#fff", this.currentBorderColor = "#0367d5", this.currentBgActive = "#005fc8", this.currentBorderColorActive = "#0871e3", this.currentBoxShadowColor = "#065e8d", this.currentColorActive = "#fff", this.currentColorHover = "#fff"), this.theme == "success" ? (this.currentBg = "#0aa86d", this.currentColor = "#fff", this.currentBorderColor = "#24a876", this.currentBgActive = "#0b9762", this.currentBorderColorActive = "#0b9762", this.currentBoxShadowColor = "#31735b", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "danger" ? (this.currentBg = "#FF3B30", this.currentColor = "#fff", this.currentBorderColor = "#FF3B30", this.currentBgActive = "#FF3B30", this.currentBorderColorActive = "#FF3B30", this.currentBoxShadowColor = "#ff8179", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "pink" ? (this.currentBg = "#ff6161", this.currentColor = "#fff", this.currentBorderColor = "#ff4741c9", this.currentBgActive = "#ff6a60", this.currentBorderColorActive = "#ff4141", this.currentBoxShadowColor = "#ff6a60", this.currentColorActive = "#fff", this.currentColorHover = "#fff") : this.theme == "warning" ? (this.currentBg = "#FF9500", this.currentColor = "#fff", this.currentBorderColor = "#FF9500", this.currentBgActive = "#ffb546", this.currentBorderColorActive = "#ffb546", this.currentBoxShadowColor = "#ffbe64", this.currentColorActive = "#fdff98", this.currentColorHover = "#fff8e8") : this.theme == "info" ? (this.currentBg = "#78d9ff", this.currentColor = "#203464", this.currentColorHover = "#34aff1", this.currentBorderColor = "#3db0ee", this.currentBgActive = "#78d9ff", this.currentBorderColorActive = "#78d9ff", this.currentBoxShadowColor = "#78d9ff", this.currentColorActive = "#fff", this.currentColorHover = "#304460") : this.theme == "yellow" ? (this.currentBg = "#ffd900", this.currentColor = "#444", this.currentBorderColor = "#ffd900", this.currentBgActive = "#ffc400", this.currentBorderColorActive = "#f3c922", this.currentBoxShadowColor = "#cac838", this.currentColorActive = "#fff") : this.theme == "white" ? (this.currentBg = "#ffffff", this.currentColor = "#444", this.currentColorHover = "#164205", this.currentBorderColor = "#cacaca", this.currentBgActive = "#efede7", this.currentBorderColorActive = "##cacaca", this.currentBoxShadowColor = "#b3b3ab", this.currentColorActive = "#164205") : this.theme == "purple" ? (this.currentBg = "#942cdd", this.currentColor = "#fff", this.currentColorHover = "#e7c0ff", this.currentBorderColor = "#a539f3", this.currentBgActive = "#b755ff", this.currentBorderColorActive = "#b755ff", this.currentBoxShadowColor = "#7f18c5", this.currentColorActive = "#ffffff") : this.theme == "black" && (this.currentBg = "#32383e", this.currentColor = "#fff", this.currentColorHover = "#fcb7ab", this.currentBorderColor = "#32383e", this.currentBgActive = "#3b4249", this.currentBorderColorActive = "#3b4249", this.currentBoxShadowColor = "#32383e", this.currentColorActive = "#ffffff"), this.currentBg = this.bg ?? this.currentBg ?? e, this.currentColor = this.color ?? this.currentColor ?? h, this.currentBorderColor = this.borderColor ?? this.currentBorderColor ?? a, this.currentBgActive = this.bgActive ?? this.currentBgActive ?? s, this.currentBorderColorActive = this.borderColorActive ?? this.currentBorderColorActive ?? f, this.currentBoxShadowColor = this.boxShadowColor ?? this.currentBoxShadowColor ?? n, this.currentColorActive = this.colorActive ?? this.currentColorActive ?? null, this.boxShadowCss = this.disabled ? "box-shadow: none" : `box-shadow: 0px 1px 2px 0px ${this.currentBoxShadowColor}`, this.dataThemeInner = this.disabled ? this.dataDisabledTheme : this.dataTheme, this.backgroundCss = "background: " + (this.bgGradientTop && this.bgGradientBottom ? `linear-gradient(to bottom, ${this.bgGradientTop}, ${this.bgGradientBottom})` : this.bg);
|
|
78
|
+
}
|
|
79
|
+
click(e) {
|
|
80
|
+
this.disabled || (this.$emit("click", e, this), this.hasTouchpad || (this.$emit("clickTouch", e, this), this.$emit("clickOrTouchstart", e, this), this.$emit("clickTap", e, this), this.link && (this.link?.startsWith("http") || this.link?.startsWith("//")) || this.link && this.linkRevert && !this.linkRevert?.startsWith("http") && !this.linkRevert?.startsWith("//") ? this.$refs.link?.click() : (this.link || this.linkRevert) && window.pjax(this.link || this.linkRevert)));
|
|
81
|
+
}
|
|
82
|
+
touchstart(e) {
|
|
83
|
+
this.disabled || (this.$emit("touchstart", e, this), this.hasTouchpad && (this.$emit("clickTouch", e, this), this.$emit("clickOrTouchstart", e, this)));
|
|
84
|
+
}
|
|
85
|
+
touchend(e) {
|
|
86
|
+
this.disabled || (this.$emit("touchend", e, this), this.hasTouchpad || this.$emit("clickOrTouchend", e, this));
|
|
87
|
+
}
|
|
88
|
+
mouseup(e) {
|
|
89
|
+
this.disabled || (this.$emit("mouseup", e, this), this.$emit("mouseupOrTouchend", e, this), this.$emit("clickOrTouchend", e, this));
|
|
90
|
+
}
|
|
91
|
+
mousedown(e) {
|
|
92
|
+
this.disabled || (this.$emit("mousedown", e, this), this.$emit("mousedownOrTouchstart", e, this));
|
|
93
|
+
}
|
|
94
|
+
keydownEnter(e) {
|
|
95
|
+
this.disabled || this.$emit("keydownEnter", e, this);
|
|
96
|
+
}
|
|
97
|
+
focus() {
|
|
98
|
+
this.$refs?.button?.focus();
|
|
99
|
+
}
|
|
100
|
+
_onThemeChanged() {
|
|
101
|
+
this.updateTheme();
|
|
102
|
+
}
|
|
103
|
+
_onTitleChanged(e) {
|
|
104
|
+
this.innerTitle = null, e && this.nextTick(() => this.innerTitle = e);
|
|
105
|
+
}
|
|
106
|
+
showButton = !0;
|
|
107
|
+
_onDisabledChanged(e) {
|
|
108
|
+
this.dataThemeInner = e ? this.dataDisabledTheme : this.dataTheme, this.showButton = !1, this.nextTick(() => this.showButton = !0);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
o([
|
|
112
|
+
i(String)
|
|
113
|
+
], r.prototype, "icon", 2);
|
|
114
|
+
o([
|
|
115
|
+
i(String)
|
|
116
|
+
], r.prototype, "iconRight", 2);
|
|
117
|
+
o([
|
|
118
|
+
i(String)
|
|
119
|
+
], r.prototype, "badge", 2);
|
|
120
|
+
o([
|
|
121
|
+
i(String)
|
|
122
|
+
], r.prototype, "badgeBg", 2);
|
|
123
|
+
o([
|
|
124
|
+
i(String)
|
|
125
|
+
], r.prototype, "badgeColor", 2);
|
|
126
|
+
o([
|
|
127
|
+
i(Object)
|
|
128
|
+
], r.prototype, "style", 2);
|
|
129
|
+
o([
|
|
130
|
+
i(String, null)
|
|
131
|
+
], r.prototype, "bg", 2);
|
|
132
|
+
o([
|
|
133
|
+
i(String, null)
|
|
134
|
+
], r.prototype, "color", 2);
|
|
135
|
+
o([
|
|
136
|
+
i(String, null)
|
|
137
|
+
], r.prototype, "borderColor", 2);
|
|
138
|
+
o([
|
|
139
|
+
i(String, null)
|
|
140
|
+
], r.prototype, "bgActive", 2);
|
|
141
|
+
o([
|
|
142
|
+
i(String, null)
|
|
143
|
+
], r.prototype, "colorActive", 2);
|
|
144
|
+
o([
|
|
145
|
+
i(String, null)
|
|
146
|
+
], r.prototype, "colorHover", 2);
|
|
147
|
+
o([
|
|
148
|
+
i(String, null)
|
|
149
|
+
], r.prototype, "borderColorActive", 2);
|
|
150
|
+
o([
|
|
151
|
+
i(String, null)
|
|
152
|
+
], r.prototype, "boxShadowColor", 2);
|
|
153
|
+
o([
|
|
154
|
+
i(String)
|
|
155
|
+
], r.prototype, "fontSize", 2);
|
|
156
|
+
o([
|
|
157
|
+
i(String)
|
|
158
|
+
], r.prototype, "fontFamily", 2);
|
|
159
|
+
o([
|
|
160
|
+
i(String)
|
|
161
|
+
], r.prototype, "bgGradientTop", 2);
|
|
162
|
+
o([
|
|
163
|
+
i(String)
|
|
164
|
+
], r.prototype, "bgGradientBottom", 2);
|
|
165
|
+
o([
|
|
166
|
+
i(Boolean)
|
|
167
|
+
], r.prototype, "disabled", 2);
|
|
168
|
+
o([
|
|
169
|
+
i(Boolean)
|
|
170
|
+
], r.prototype, "shine", 2);
|
|
171
|
+
o([
|
|
172
|
+
i(String)
|
|
173
|
+
], r.prototype, "type", 2);
|
|
174
|
+
o([
|
|
175
|
+
i(String)
|
|
176
|
+
], r.prototype, "title", 2);
|
|
177
|
+
o([
|
|
178
|
+
i(String)
|
|
179
|
+
], r.prototype, "disabledTitle", 2);
|
|
180
|
+
o([
|
|
181
|
+
i(String)
|
|
182
|
+
], r.prototype, "dataTheme", 2);
|
|
183
|
+
o([
|
|
184
|
+
i(String)
|
|
185
|
+
], r.prototype, "dataDisabledTheme", 2);
|
|
186
|
+
o([
|
|
187
|
+
i(String)
|
|
188
|
+
], r.prototype, "dataPlacement", 2);
|
|
189
|
+
o([
|
|
190
|
+
i(String)
|
|
191
|
+
], r.prototype, "dataOffset", 2);
|
|
192
|
+
o([
|
|
193
|
+
i(String)
|
|
194
|
+
], r.prototype, "width", 2);
|
|
195
|
+
o([
|
|
196
|
+
i(String)
|
|
197
|
+
], r.prototype, "borderRadius", 2);
|
|
198
|
+
o([
|
|
199
|
+
i(String)
|
|
200
|
+
], r.prototype, "link", 2);
|
|
201
|
+
o([
|
|
202
|
+
i(String)
|
|
203
|
+
], r.prototype, "linkRevert", 2);
|
|
204
|
+
o([
|
|
205
|
+
i(String, null)
|
|
206
|
+
], r.prototype, "theme", 2);
|
|
207
|
+
o([
|
|
208
|
+
g("theme")
|
|
209
|
+
], r.prototype, "_onThemeChanged", 1);
|
|
210
|
+
o([
|
|
211
|
+
g("title", !1, !0)
|
|
212
|
+
], r.prototype, "_onTitleChanged", 1);
|
|
213
|
+
o([
|
|
214
|
+
g("disabled")
|
|
215
|
+
], r.prototype, "_onDisabledChanged", 1);
|
|
216
|
+
r = o([
|
|
217
|
+
y
|
|
218
|
+
], r);
|
|
219
|
+
const H = ["title", "data-theme", "data-offset", "data-placement"], R = ["title", "data-theme", "data-offset", "data-placement", "disabled", "type"], F = ["href"], D = ["href"];
|
|
220
|
+
function P(t, e, h, a, s, f) {
|
|
221
|
+
return t.showButton ? (u(), d("span", {
|
|
222
|
+
key: 0,
|
|
223
|
+
class: "d-inline-block relative",
|
|
224
|
+
title: t.disabled ? t.disabledTitle : "",
|
|
225
|
+
"data-theme": t.dataThemeInner,
|
|
226
|
+
"data-offset": t.dataOffset,
|
|
227
|
+
"data-placement": t.dataPlacement
|
|
228
|
+
}, [
|
|
229
|
+
C("button", {
|
|
230
|
+
class: p(["relative", {
|
|
231
|
+
shine: t.shine,
|
|
232
|
+
[t.randomClass + (t.isOnHover ? " hover" : "")]: !0
|
|
233
|
+
// mobile: viewPortType == 'mobile',
|
|
234
|
+
// tablet: viewPortType == 'tablet',
|
|
235
|
+
}]),
|
|
236
|
+
title: t.disabled ? "" : t.innerTitle,
|
|
237
|
+
"data-theme": t.dataThemeInner,
|
|
238
|
+
"data-offset": t.dataOffset,
|
|
239
|
+
"data-placement": t.dataPlacement,
|
|
240
|
+
onMouseover: e[0] || (e[0] = (n) => t.isOnHover = !0),
|
|
241
|
+
onMouseout: e[1] || (e[1] = (n) => t.isOnHover = !1),
|
|
242
|
+
onClick: e[2] || (e[2] = (...n) => t.click && t.click(...n)),
|
|
243
|
+
onTouchstart: e[3] || (e[3] = (...n) => t.touchstart && t.touchstart(...n)),
|
|
244
|
+
onTouchend: e[4] || (e[4] = (...n) => t.touchend && t.touchend(...n)),
|
|
245
|
+
onMouseup: e[5] || (e[5] = (...n) => t.mouseup && t.mouseup(...n)),
|
|
246
|
+
onMousedown: e[6] || (e[6] = (...n) => t.mousedown && t.mousedown(...n)),
|
|
247
|
+
onKeydown: e[7] || (e[7] = k((...n) => t.keydownEnter && t.keydownEnter(...n), ["enter"])),
|
|
248
|
+
onMouseleave: e[8] || (e[8] = (n) => t.isButtonActive = !1),
|
|
249
|
+
disabled: t.disabled,
|
|
250
|
+
type: t.type,
|
|
251
|
+
style: m({ fontSize: t.fontSize, fontFamily: t.fontFamily, borderRadius: t.borderRadius, width: t.width, ...t.style }),
|
|
252
|
+
ref: "button"
|
|
253
|
+
}, [
|
|
254
|
+
t.badge ? (u(), d("div", {
|
|
255
|
+
key: 0,
|
|
256
|
+
class: "absolute right--9px top--9px bg-lightblue-400 fw-bold rounded-full z-3 px7px",
|
|
257
|
+
style: m({
|
|
258
|
+
background: t.badgeBg ?? void 0,
|
|
259
|
+
color: t.badgeColor ?? "#ffffff"
|
|
260
|
+
})
|
|
261
|
+
}, l(t.badge), 5)) : c("", !0),
|
|
262
|
+
t.icon ? (u(), d("span", {
|
|
263
|
+
key: 1,
|
|
264
|
+
class: p(["left-icon-animate", t.$slots.default ? "left-icon" : ""])
|
|
265
|
+
}, [
|
|
266
|
+
C("i", {
|
|
267
|
+
class: p(["fa", t.icon])
|
|
268
|
+
}, null, 2)
|
|
269
|
+
], 2)) : c("", !0),
|
|
270
|
+
A(t.$slots, "default", {}, void 0, !0),
|
|
271
|
+
t.iconRight ? (u(), d("span", {
|
|
272
|
+
key: 2,
|
|
273
|
+
class: p(["right-icon-animate", t.$slots.default ? "right-icon" : ""])
|
|
274
|
+
}, [
|
|
275
|
+
C("i", {
|
|
276
|
+
class: p(["fa", t.iconRight])
|
|
277
|
+
}, null, 2)
|
|
278
|
+
], 2)) : c("", !0),
|
|
279
|
+
(u(), S(w("style"), null, {
|
|
280
|
+
default: T(() => [
|
|
281
|
+
b("." + l(t.randomClass) + " { background: " + l(t.style?.bacground ?? t.currentBg + "!important") + "; box-shadow: none !important; color: " + l(t.currentColor) + " !important; border-color: " + l(t.currentBorderColor) + " !important; }", 1),
|
|
282
|
+
t.currentColorHover ? (u(), d(v, { key: 0 }, [
|
|
283
|
+
b("." + l(t.randomClass) + ":hover { color: " + l(t.style?.color ?? t.currentColorHover + "!important") + "; }", 1)
|
|
284
|
+
], 64)) : c("", !0),
|
|
285
|
+
t.disabled ? c("", !0) : (u(), d(v, { key: 1 }, [
|
|
286
|
+
b("." + l(t.randomClass) + ":active { background: " + l(t.currentBgActive) + " !important; border-color: " + l(t.currentBorderColorActive) + " !important; color: " + l(t.currentColorActive) + " !important; opacity: 1 !important; " + l(t.boxShadowCss) + " !important; }", 1)
|
|
287
|
+
], 64))
|
|
288
|
+
]),
|
|
289
|
+
_: 1
|
|
290
|
+
})),
|
|
291
|
+
t.link && t.link?.startsWith("http") || t.link?.startsWith("//") ? (u(), d("a", {
|
|
292
|
+
key: 3,
|
|
293
|
+
class: "d-none",
|
|
294
|
+
ref: "link",
|
|
295
|
+
href: t.link,
|
|
296
|
+
target: "_blank"
|
|
297
|
+
}, " ", 8, F)) : !t.link && t.linkRevert && !t.linkRevert?.startsWith("http") && !t.linkRevert?.startsWith("//") ? (u(), d("a", {
|
|
298
|
+
key: 4,
|
|
299
|
+
class: "d-none",
|
|
300
|
+
ref: "link",
|
|
301
|
+
href: t.linkRevert,
|
|
302
|
+
target: "_blank"
|
|
303
|
+
}, " ", 8, D)) : c("", !0)
|
|
304
|
+
], 46, R)
|
|
305
|
+
], 8, H)) : c("", !0);
|
|
306
|
+
}
|
|
307
|
+
const W = (t, e) => {
|
|
308
|
+
const h = t.__vccOpts || t;
|
|
309
|
+
for (const [a, s] of e)
|
|
310
|
+
h[a] = s;
|
|
311
|
+
return h;
|
|
312
|
+
}, M = /* @__PURE__ */ W(r, [["render", P], ["__scopeId", "data-v-62b3eb97"]]);
|
|
313
|
+
export {
|
|
314
|
+
M as default
|
|
315
|
+
};
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { VNode } from '@vue/runtime-core';
|
|
2
|
+
/**
|
|
3
|
+
* Наследуемый интерфейс компонента vue
|
|
4
|
+
* @interface IVueClass
|
|
5
|
+
* @typedef {Function} mounted Mount
|
|
6
|
+
*/
|
|
7
|
+
export default interface IVueClass {
|
|
8
|
+
readonly mixins: Array<any>;
|
|
9
|
+
readonly components: {
|
|
10
|
+
[key: string | symbol | number]: any;
|
|
11
|
+
};
|
|
12
|
+
readonly emits: Array<string>;
|
|
13
|
+
readonly emitsParent: Array<string>;
|
|
14
|
+
readonly inject: Array<string>;
|
|
15
|
+
readonly injectParent: Array<string>;
|
|
16
|
+
readonly provide: {
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
};
|
|
19
|
+
readonly provideParent: {
|
|
20
|
+
[key: string]: (...args: any) => any;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Название компонента. Определяется автоматически по названию класса если наследовать от View.
|
|
24
|
+
*/
|
|
25
|
+
readonly name: string;
|
|
26
|
+
/**
|
|
27
|
+
* Экземпляр класса. Учтите, что контекст this не будет содержать vue элементов.
|
|
28
|
+
*/
|
|
29
|
+
readonly instance?: this;
|
|
30
|
+
/**
|
|
31
|
+
* Содержит привязки атрибутов и события в родительском компоненте,
|
|
32
|
+
* которые не были распознаны (и исключены) как
|
|
33
|
+
* [входные параметры](https://v3.ru.vuejs.org/ru/api/options-data.html#props)
|
|
34
|
+
* компонента или пользовательские события.
|
|
35
|
+
* Если компонент не объявляет входные параметры или
|
|
36
|
+
* [пользовательские события](https://v3.ru.vuejs.org/ru/api/options-data.html#emits),
|
|
37
|
+
* тут будут все привязки из родительского компонента,
|
|
38
|
+
* которые можно передать через v-bind="$attrs" внутреннему компоненту —
|
|
39
|
+
* удобно при создании компонентов высшего порядка (HOC, High Order Components).
|
|
40
|
+
*
|
|
41
|
+
* **См. также**
|
|
42
|
+
*
|
|
43
|
+
* [$attrs](https://v3.ru.vuejs.org/ru/api/instance-properties.html#attrs)
|
|
44
|
+
*
|
|
45
|
+
* [Передача обычных атрибутов](https://v3.ru.vuejs.org/ru/guide/component-attrs.html)
|
|
46
|
+
*
|
|
47
|
+
* [Options API / Разное — inheritAttrs](https://v3.ru.vuejs.org/ru/api/options-misc.html#inheritattrs)
|
|
48
|
+
*/
|
|
49
|
+
readonly $attrs: Object;
|
|
50
|
+
/**
|
|
51
|
+
* Объект с данными, за которыми осуществляет наблюдение экземпляр компонента.
|
|
52
|
+
* Экземпляр компонента проксирует доступ к свойствам объекта данных.
|
|
53
|
+
*
|
|
54
|
+
* **См. также**
|
|
55
|
+
*
|
|
56
|
+
* [$data](https://v3.ru.vuejs.org/ru/api/instance-properties.html#data)
|
|
57
|
+
*
|
|
58
|
+
* [Options API / Локальное состояние — data](https://v3.ru.vuejs.org/ru/api/options-data.html#data)
|
|
59
|
+
*/
|
|
60
|
+
readonly $data: Object;
|
|
61
|
+
/**
|
|
62
|
+
* Корневой элемент DOM, которым управляет экземпляр компонента.
|
|
63
|
+
*
|
|
64
|
+
* Для компонентов использующих [фрагменты](https://v3.ru.vuejs.org/ru/guide/migration/fragments.html),
|
|
65
|
+
* `$el` будет узлом DOM, с помощью которого Vue будет отслеживать место компонента в DOM.
|
|
66
|
+
* Рекомендуется использовать ссылки на элементы шаблона для доступа к элементам DOM напрямую,
|
|
67
|
+
* а не полагаться на `$el`
|
|
68
|
+
*
|
|
69
|
+
* **См. также**
|
|
70
|
+
*
|
|
71
|
+
* [$el](https://v3.ru.vuejs.org/ru/api/instance-properties.html#el)
|
|
72
|
+
*/
|
|
73
|
+
readonly $el: HTMLElement;
|
|
74
|
+
/**
|
|
75
|
+
* Опции инициализации, используемые для текущего экземпляра компонента.
|
|
76
|
+
* Полезно, если потребуется добавить пользовательские свойства в опции:
|
|
77
|
+
*
|
|
78
|
+
* **См. также**
|
|
79
|
+
*
|
|
80
|
+
* [$options](https://v3.ru.vuejs.org/ru/api/instance-properties.html#options)
|
|
81
|
+
*/
|
|
82
|
+
readonly $options: {
|
|
83
|
+
__scopeId: string;
|
|
84
|
+
__file: string;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Родительский экземпляр, если таковой имеется
|
|
88
|
+
*
|
|
89
|
+
* **См. также**
|
|
90
|
+
*
|
|
91
|
+
* [$parent](https://v3.ru.vuejs.org/ru/api/instance-properties.html#parent)
|
|
92
|
+
*/
|
|
93
|
+
readonly $parent: IVueClass | null;
|
|
94
|
+
/**
|
|
95
|
+
* Объект, содержащий текущие входные параметры, которые получил компонент.
|
|
96
|
+
* Экземпляр компонента проксирует доступ к свойствам объекта входных параметров.
|
|
97
|
+
*
|
|
98
|
+
* **См. также**
|
|
99
|
+
*
|
|
100
|
+
* [$props](https://v3.ru.vuejs.org/ru/api/instance-properties.html#props)
|
|
101
|
+
*/
|
|
102
|
+
readonly $props: {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Объект из DOM-элементов и экземпляров компонентов, зарегистрированных с помощью
|
|
107
|
+
* [атрибутов ref](https://v3.ru.vuejs.org/ru/guide/component-template-refs.html).
|
|
108
|
+
*
|
|
109
|
+
* **См. также**
|
|
110
|
+
*
|
|
111
|
+
* [Ссылки на элементы шаблона](https://v3.ru.vuejs.org/ru/guide/component-template-refs.html)
|
|
112
|
+
* [Специальные атрибуты — ref](https://v3.ru.vuejs.org/ru/api/special-attributes.html#ref)
|
|
113
|
+
*/
|
|
114
|
+
readonly $refs: {
|
|
115
|
+
[key: string]: HTMLElement | HTMLInputElement | undefined | HTMLElement[] | HTMLInputElement[];
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Экземпляр корневого компонента текущего дерева компонентов.
|
|
119
|
+
* Если у текущего экземпляра нет родителя, то значением будет он сам.
|
|
120
|
+
*/
|
|
121
|
+
readonly $root: {
|
|
122
|
+
readonly APP?: any;
|
|
123
|
+
} | this | any;
|
|
124
|
+
/**
|
|
125
|
+
* Используется для программного доступа к содержимому, распределяемому с помощью слотов.
|
|
126
|
+
* Каждый именованный слот имеет соответствующее свойство
|
|
127
|
+
* (например, содержимое v-slot:foo будет доступно через this.$slots.foo()).
|
|
128
|
+
*/
|
|
129
|
+
readonly $slots: {
|
|
130
|
+
default: () => VNode[];
|
|
131
|
+
} & {
|
|
132
|
+
[key: string]: (() => VNode[]) | undefined;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Генерирует событие на текущем экземпляре.
|
|
136
|
+
* Любые дополнительные аргументы будут переданы в callback функции прослушивания события.
|
|
137
|
+
* @param {String} eventName Название события
|
|
138
|
+
* @param {*} args Аргументы передаваемые в него
|
|
139
|
+
*/
|
|
140
|
+
$emit(eventName: string, ...args: any[]): void;
|
|
141
|
+
/**
|
|
142
|
+
* Откладывает вызов коллбэка до следующего цикла обновления DOM.
|
|
143
|
+
* @param {Function} callback
|
|
144
|
+
*/
|
|
145
|
+
$forceUpdate(callback?: Function): void;
|
|
146
|
+
/**
|
|
147
|
+
* Отслеживание изменений реактивного свойства или функции вычисляемого свойства.
|
|
148
|
+
* @param {String} source
|
|
149
|
+
* @param {Function} callback
|
|
150
|
+
* @param {VueWatchOptions} options
|
|
151
|
+
*/
|
|
152
|
+
$watch(source?: string | Function, callback?: Function | object, options?: VueWatchOptions): void;
|
|
153
|
+
/**
|
|
154
|
+
* Откладывает вызов коллбэка до следующего цикла обновления DOM.
|
|
155
|
+
* @param {Function} callback
|
|
156
|
+
*/
|
|
157
|
+
$nextTick(callback?: Function): void;
|
|
158
|
+
/** Параметры vue компонента */
|
|
159
|
+
readonly $: {
|
|
160
|
+
[key: string]: any;
|
|
161
|
+
uid: number;
|
|
162
|
+
app: {
|
|
163
|
+
[key: string]: any;
|
|
164
|
+
appContext: {
|
|
165
|
+
[key: string]: any;
|
|
166
|
+
version: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
vnode: {
|
|
170
|
+
[key: string]: any;
|
|
171
|
+
scopeId: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
beforeCreate(): void;
|
|
175
|
+
created(): void;
|
|
176
|
+
beforeMount(): void;
|
|
177
|
+
mounted(): void;
|
|
178
|
+
beforeUpdate(): void;
|
|
179
|
+
updated(): void;
|
|
180
|
+
beforeUnmount(): void;
|
|
181
|
+
unmounted(): void;
|
|
182
|
+
beforeCreateParent(): void;
|
|
183
|
+
createdParent(): void;
|
|
184
|
+
beforeMountParent(): void;
|
|
185
|
+
mountedParent(): void;
|
|
186
|
+
beforeUpdateParent(): void;
|
|
187
|
+
updatedParent(): void;
|
|
188
|
+
beforeUnmountParent(): void;
|
|
189
|
+
unmountedParent(): void;
|
|
190
|
+
/**
|
|
191
|
+
* Рекурсивный пропуск шагов
|
|
192
|
+
* @param {Function} callback
|
|
193
|
+
* @param {Number} steps Количество шагов (тиков, смен сцен), которые нужно пропустить
|
|
194
|
+
*/
|
|
195
|
+
nextTick(callback: () => void, steps?: number): void;
|
|
196
|
+
/**
|
|
197
|
+
* Проверка наличия внешнего обработчика события
|
|
198
|
+
* @param name
|
|
199
|
+
*/
|
|
200
|
+
hasExternalHandlerEvent(name: string): boolean;
|
|
201
|
+
}
|
|
202
|
+
export interface VueWatchOptions {
|
|
203
|
+
deep?: boolean;
|
|
204
|
+
immediate?: boolean;
|
|
205
|
+
once?: boolean;
|
|
206
|
+
flush?: string;
|
|
207
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DebuggerEvent } from 'vue/dist/vue.esm-bundler';
|
|
2
|
+
type VuePropsTypes = typeof String | typeof Number | typeof Array | typeof Boolean | typeof Object | typeof Date | typeof Function | typeof Symbol | null;
|
|
3
|
+
type WatchCallback<T> = (value: T, oldValue: T, onCleanup: (cleanupFn: () => void) => void) => void;
|
|
4
|
+
interface VuePropObj {
|
|
5
|
+
type: VuePropsTypes | VuePropsTypes[];
|
|
6
|
+
validator?: Function;
|
|
7
|
+
default?: any;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
event?: string;
|
|
10
|
+
deep?: boolean;
|
|
11
|
+
handler?: WatchCallback<any> | string;
|
|
12
|
+
immediate?: boolean;
|
|
13
|
+
flush?: 'pre' | 'post' | 'sync';
|
|
14
|
+
onTrack?: (event: DebuggerEvent) => void;
|
|
15
|
+
onTrigger?: (event: DebuggerEvent) => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Трансформация свойства во vue property
|
|
19
|
+
* @param propDataOrType
|
|
20
|
+
* @param types
|
|
21
|
+
* @constructor
|
|
22
|
+
*/
|
|
23
|
+
export declare const Prop: (propDataOrType: VuePropsTypes | VuePropObj, ...types: (VuePropsTypes)[]) => any;
|
|
24
|
+
export {};
|