vue-devui 1.4.1 → 1.5.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/README.md +10 -7
- package/collapse/style.css +1 -1
- package/editable-select/index.es.js +5412 -184
- package/editable-select/index.umd.js +27 -1
- package/image-preview/index.es.js +2 -0
- package/image-preview/index.umd.js +1 -1
- package/menu/index.es.js +7 -7
- package/menu/index.umd.js +1 -1
- package/package.json +2 -1
- package/pagination/index.es.js +8 -8
- package/pagination/index.umd.js +11 -11
- package/select/index.es.js +8 -8
- package/select/index.umd.js +12 -12
- package/style.css +1 -1
- package/tag/index.es.js +8 -8
- package/tag/index.umd.js +1 -1
- package/time-select/index.es.js +8 -8
- package/time-select/index.umd.js +5 -5
- package/vue-devui.es.js +144 -326
- package/vue-devui.umd.js +11 -11
package/tag/index.es.js
CHANGED
|
@@ -110,18 +110,18 @@ var Tag = defineComponent({
|
|
|
110
110
|
e.stopPropagation();
|
|
111
111
|
emit("tagDelete", e);
|
|
112
112
|
};
|
|
113
|
+
const contentColor = computed(() => {
|
|
114
|
+
return isDefaultTag() ? "" : checked.value ? "#fff" : themeColor.value;
|
|
115
|
+
});
|
|
113
116
|
const closeIconEl = () => {
|
|
117
|
+
const iconName = isDefaultTag() ? "error-o" : "close";
|
|
114
118
|
return deletable.value ? createVNode("a", {
|
|
115
119
|
"class": "remove-button",
|
|
116
120
|
"onClick": handleDelete
|
|
117
|
-
}, [
|
|
118
|
-
"size": "12px",
|
|
119
|
-
"name": "error-o",
|
|
120
|
-
"color": "#adb0b8"
|
|
121
|
-
}, null) : createVNode(resolveComponent("d-icon"), {
|
|
121
|
+
}, [createVNode(resolveComponent("d-icon"), {
|
|
122
122
|
"size": "12px",
|
|
123
|
-
"name":
|
|
124
|
-
"color":
|
|
123
|
+
"name": iconName,
|
|
124
|
+
"color": contentColor.value
|
|
125
125
|
}, null)]) : null;
|
|
126
126
|
};
|
|
127
127
|
const unWatch = watch(checked, (newVal) => {
|
|
@@ -137,7 +137,7 @@ var Tag = defineComponent({
|
|
|
137
137
|
"class": tagClass.value,
|
|
138
138
|
"style": {
|
|
139
139
|
display: "block",
|
|
140
|
-
color:
|
|
140
|
+
color: contentColor.value,
|
|
141
141
|
backgroundColor: checked.value ? themeColor.value : !color.value ? "" : "var(--devui-base-bg, #ffffff)"
|
|
142
142
|
},
|
|
143
143
|
"title": tagTitle
|
package/tag/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(c,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(c=typeof globalThis!="undefined"?globalThis:c||self,t(c.index={},c.Vue))})(this,function(c,t){"use strict";const g={type:{type:String,default:""},color:{type:String,default:""},titleContent:{type:String,default:""},checked:{type:Boolean,default:!1},deletable:{type:Boolean,default:!1},size:{type:String,default:"md"}};function s(a,e,n){let l=a;return e&&(l+=`__${e}`),n&&(l+=`--${n}`),l}function m(a,e=!1){const n=e?`.devui-${a}`:`devui-${a}`;return{b:()=>s(n),e:u=>u?s(n,u):"",m:u=>u?s(n,"",u):"",em:(u,f)=>u&&f?s(n,u,f):""}}function b(a){const e=m("tag");return t.computed(()=>{const{type:n,color:l,deletable:r}=a;return`${e.e("item")} ${e.m(n||(l?"colorful":"")||"default")} ${r?e.m("deletable"):""} ${e.m(a.size)}`})}function h(a){return t.computed(()=>{const{color:e,type:n}=a,l={primary:"var(--devui-primary, #5e7ce0)",success:"var(--devui-success, #50d4ab)",warning:"var(--devui-warning, #fac20a)",danger:"var(--devui-danger, #f66f6a)"},r={"blue-w98":"#3383ff","aqua-w98":"#39afcc","olivine-w98":"#2fa898","green-w98":"#4eb15e","yellow-w98":"#b08d1a","orange-w98":"#d47f35","red-w98":"#f66f6a","pink-w98":"#f3689a","purple-w98":"#a97af8"};return!e&&n?l[n]:r[e]||e})}var V="",p=t.defineComponent({name:"DTag",props:g,emits:["click","tagDelete","checkedChange"],setup(a,{slots:e,emit:n}){const l=m("tag"),{type:r,color:d,checked:i,titleContent:u,deletable:f}=t.toRefs(a),k=b(a),v=h(a),T=u.value||"",y=()=>!r.value&&!d.value,$=o=>{n("click",o)},N=o=>{o.stopPropagation(),n("tagDelete",o)},C=t.computed(()=>y()?"":i.value?"#fff":v.value),S=()=>{const o=y()?"error-o":"close";return f.value?t.createVNode("a",{class:"remove-button",onClick:N},[t.createVNode(t.resolveComponent("d-icon"),{size:"12px",name:o,color:C.value},null)]):null},D=t.watch(i,o=>{n("checkedChange",o)});return t.onUnmounted(()=>D()),()=>{var o;return t.createVNode("div",{class:l.b(),onClick:$},[t.createVNode("span",{class:k.value,style:{display:"block",color:C.value,backgroundColor:i.value?v.value:d.value?"var(--devui-base-bg, #ffffff)":""},title:T},[(o=e.default)==null?void 0:o.call(e),S()])])}}}),w={title:"Tag \u6807\u7B7E",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(a){a.component(p.name,p)}};c.Tag=p,c.default=w,c.tagProps=g,Object.defineProperty(c,"__esModule",{value:!0}),c[Symbol.toStringTag]="Module"});
|
package/time-select/index.es.js
CHANGED
|
@@ -8991,18 +8991,18 @@ var Tag = defineComponent({
|
|
|
8991
8991
|
e.stopPropagation();
|
|
8992
8992
|
emit("tagDelete", e);
|
|
8993
8993
|
};
|
|
8994
|
+
const contentColor = computed(() => {
|
|
8995
|
+
return isDefaultTag() ? "" : checked.value ? "#fff" : themeColor.value;
|
|
8996
|
+
});
|
|
8994
8997
|
const closeIconEl = () => {
|
|
8998
|
+
const iconName = isDefaultTag() ? "error-o" : "close";
|
|
8995
8999
|
return deletable.value ? createVNode("a", {
|
|
8996
9000
|
"class": "remove-button",
|
|
8997
9001
|
"onClick": handleDelete
|
|
8998
|
-
}, [
|
|
8999
|
-
"size": "12px",
|
|
9000
|
-
"name": "error-o",
|
|
9001
|
-
"color": "#adb0b8"
|
|
9002
|
-
}, null) : createVNode(resolveComponent("d-icon"), {
|
|
9002
|
+
}, [createVNode(resolveComponent("d-icon"), {
|
|
9003
9003
|
"size": "12px",
|
|
9004
|
-
"name":
|
|
9005
|
-
"color":
|
|
9004
|
+
"name": iconName,
|
|
9005
|
+
"color": contentColor.value
|
|
9006
9006
|
}, null)]) : null;
|
|
9007
9007
|
};
|
|
9008
9008
|
const unWatch = watch(checked, (newVal) => {
|
|
@@ -9018,7 +9018,7 @@ var Tag = defineComponent({
|
|
|
9018
9018
|
"class": tagClass.value,
|
|
9019
9019
|
"style": {
|
|
9020
9020
|
display: "block",
|
|
9021
|
-
color:
|
|
9021
|
+
color: contentColor.value,
|
|
9022
9022
|
backgroundColor: checked.value ? themeColor.value : !color.value ? "" : "var(--devui-base-bg, #ffffff)"
|
|
9023
9023
|
},
|
|
9024
9024
|
"title": tagTitle
|