vue-devui 1.6.36-alpha.0 → 1.6.36-alpha.2
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/auto-complete/index.es.js +17 -0
- package/auto-complete/index.umd.js +17 -17
- package/breadcrumb/index.es.js +17 -0
- package/breadcrumb/index.umd.js +2 -2
- package/category-search/index.es.js +103 -16
- package/category-search/index.umd.js +23 -23
- package/checkbox/index.es.js +17 -0
- package/checkbox/index.umd.js +13 -13
- package/code-review/index.es.js +17 -0
- package/code-review/index.umd.js +16 -16
- package/data-grid/index.es.js +17 -0
- package/data-grid/index.umd.js +17 -17
- package/date-picker-pro/index.es.js +17 -0
- package/date-picker-pro/index.umd.js +18 -18
- package/dropdown/index.es.js +17 -0
- package/dropdown/index.umd.js +2 -2
- package/editable-select/index.es.js +17 -0
- package/editable-select/index.umd.js +12 -12
- package/editor-md/index.es.js +17 -0
- package/editor-md/index.umd.js +19 -19
- package/form/index.es.js +17 -0
- package/form/index.umd.js +20 -20
- package/input/index.es.js +17 -0
- package/input/index.umd.js +15 -15
- package/input-number/index.es.js +17 -0
- package/input-number/index.umd.js +20 -20
- package/mention/index.es.js +17 -0
- package/mention/index.umd.js +21 -21
- package/modal/index.es.js +17 -0
- package/modal/index.umd.js +2 -2
- package/overlay/index.es.js +17 -0
- package/overlay/index.umd.js +1 -1
- package/package.json +1 -1
- package/pagination/index.es.js +18 -2
- package/pagination/index.umd.js +16 -16
- package/popover/index.es.js +17 -0
- package/popover/index.umd.js +16 -16
- package/radio/index.es.js +17 -0
- package/radio/index.umd.js +20 -20
- package/search/index.es.js +17 -0
- package/search/index.umd.js +14 -14
- package/select/index.es.js +18 -2
- package/select/index.umd.js +15 -15
- package/splitter/index.es.js +17 -0
- package/splitter/index.umd.js +9 -9
- package/switch/index.es.js +17 -0
- package/switch/index.umd.js +20 -20
- package/table/index.es.js +17 -0
- package/table/index.umd.js +9 -9
- package/tag/index.es.js +1 -2
- package/tag/index.umd.js +1 -1
- package/textarea/index.es.js +17 -0
- package/textarea/index.umd.js +21 -21
- package/time-picker/index.es.js +17 -0
- package/time-picker/index.umd.js +18 -18
- package/time-select/index.es.js +18 -2
- package/time-select/index.umd.js +17 -17
- package/tooltip/index.es.js +17 -0
- package/tooltip/index.umd.js +12 -12
- package/tree/index.es.js +17 -0
- package/tree/index.umd.js +13 -13
- package/types/category-search/src/category-search-types.d.ts +11 -0
- package/types/category-search/src/composables/use-category-selected-tags.d.ts +15 -0
- package/types/overlay/src/flexible-overlay/flexible-overlay-types.d.ts +4 -0
- package/types/overlay/src/flexible-overlay/index.d.ts +3 -0
- package/vue-devui.es.js +103 -16
- package/vue-devui.umd.js +71 -71
package/tag/index.es.js
CHANGED
|
@@ -103,7 +103,6 @@ var Tag = defineComponent({
|
|
|
103
103
|
} = toRefs(props);
|
|
104
104
|
const tagClass = useClass(props);
|
|
105
105
|
const themeColor = useColor(props);
|
|
106
|
-
const tagTitle = titleContent.value || "";
|
|
107
106
|
const isDefaultTag = () => !type.value && !color.value;
|
|
108
107
|
const handleClick = (e) => {
|
|
109
108
|
emit("click", e);
|
|
@@ -142,7 +141,7 @@ var Tag = defineComponent({
|
|
|
142
141
|
color: contentColor.value,
|
|
143
142
|
backgroundColor: checked.value ? themeColor.value : !color.value ? "" : "var(--devui-base-bg, #ffffff)"
|
|
144
143
|
},
|
|
145
|
-
"title":
|
|
144
|
+
"title": titleContent.value || ""
|
|
146
145
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots), closeIconEl()])]);
|
|
147
146
|
};
|
|
148
147
|
}
|
package/tag/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(u,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(u=typeof globalThis!="undefined"?globalThis:u||self,t(u.index={},u.Vue))})(this,function(u,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 c=a;return e&&(c+=`__${e}`),n&&(c+=`--${n}`),c}function m(a,e=!1){const n=e?`.devui-${a}`:`devui-${a}`;return{b:()=>s(n),e:l=>l?s(n,l):"",m:l=>l?s(n,"",l):"",em:(l,f)=>l&&f?s(n,l,f):""}}function b(a){const e=m("tag");return t.computed(()=>{const{type:n,color:c,deletable:r}=a;return`${e.e("item")} ${e.m(n||(c?"colorful":"")||"default")} ${r?e.m("deletable"):""} ${e.m(a.size)}`})}function h(a){return t.computed(()=>{const{color:e,type:n}=a,c={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?c[n]:r[e]||e})}var
|
|
1
|
+
(function(u,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(u=typeof globalThis!="undefined"?globalThis:u||self,t(u.index={},u.Vue))})(this,function(u,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 c=a;return e&&(c+=`__${e}`),n&&(c+=`--${n}`),c}function m(a,e=!1){const n=e?`.devui-${a}`:`devui-${a}`;return{b:()=>s(n),e:l=>l?s(n,l):"",m:l=>l?s(n,"",l):"",em:(l,f)=>l&&f?s(n,l,f):""}}function b(a){const e=m("tag");return t.computed(()=>{const{type:n,color:c,deletable:r}=a;return`${e.e("item")} ${e.m(n||(c?"colorful":"")||"default")} ${r?e.m("deletable"):""} ${e.m(a.size)}`})}function h(a){return t.computed(()=>{const{color:e,type:n}=a,c={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?c[n]:r[e]||e})}var D="",p=t.defineComponent({name:"DTag",props:g,emits:["click","tagDelete","checkedChange"],setup(a,{slots:e,emit:n}){const c=m("tag"),{type:r,color:d,checked:i,titleContent:l,deletable:f}=t.toRefs(a),k=b(a),v=h(a),y=()=>!r.value&&!d.value,T=o=>{n("click",o)},$=o=>{o.stopPropagation(),n("tagDelete",o)},C=t.computed(()=>y()?"":i.value?"#fff":v.value),N=()=>{const o=y()?"error-o":"close";return f.value?t.createVNode("a",{class:"remove-button",onClick:$},[t.createVNode(t.resolveComponent("d-icon"),{size:"12px",name:o,color:C.value},null)]):null},S=t.watch(i,o=>{n("checkedChange",o)});return t.onUnmounted(()=>S()),()=>{var o;return t.createVNode("div",{class:c.b(),onClick:T},[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:l.value||""},[(o=e.default)==null?void 0:o.call(e),N()])])}}}),w={title:"Tag \u6807\u7B7E",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(a){a.component(p.name,p)}};u.Tag=p,u.default=w,u.tagProps=g,Object.defineProperties(u,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/textarea/index.es.js
CHANGED
|
@@ -5830,6 +5830,10 @@ const flexibleOverlayProps = {
|
|
|
5830
5830
|
fitOriginWidth: {
|
|
5831
5831
|
type: Boolean,
|
|
5832
5832
|
default: false
|
|
5833
|
+
},
|
|
5834
|
+
autoUpdatePosition: {
|
|
5835
|
+
type: Boolean,
|
|
5836
|
+
default: false
|
|
5833
5837
|
}
|
|
5834
5838
|
};
|
|
5835
5839
|
function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
@@ -5857,6 +5861,7 @@ function useOverlay(props, emit) {
|
|
|
5857
5861
|
const arrowRef = ref();
|
|
5858
5862
|
const overlayWidth = ref(0);
|
|
5859
5863
|
let originObserver;
|
|
5864
|
+
let overlayObserver;
|
|
5860
5865
|
const styles = computed(() => {
|
|
5861
5866
|
if (fitOriginWidth.value) {
|
|
5862
5867
|
return { width: overlayWidth.value + "px" };
|
|
@@ -5927,6 +5932,15 @@ function useOverlay(props, emit) {
|
|
|
5927
5932
|
const originEl = (_b = (_a = props.origin) == null ? void 0 : _a.$el) != null ? _b : props.origin;
|
|
5928
5933
|
originEl && (originObserver == null ? void 0 : originObserver.unobserve(originEl));
|
|
5929
5934
|
};
|
|
5935
|
+
const observeOverlay = () => {
|
|
5936
|
+
if (props.autoUpdatePosition && typeof window !== "undefined" && overlayRef.value) {
|
|
5937
|
+
overlayObserver = new window.ResizeObserver(updatePosition);
|
|
5938
|
+
overlayObserver.observe(overlayRef.value);
|
|
5939
|
+
}
|
|
5940
|
+
};
|
|
5941
|
+
const unobserveOverlay = () => {
|
|
5942
|
+
overlayRef.value && (overlayObserver == null ? void 0 : overlayObserver.unobserve(overlayRef.value));
|
|
5943
|
+
};
|
|
5930
5944
|
watch(
|
|
5931
5945
|
() => props.modelValue,
|
|
5932
5946
|
() => {
|
|
@@ -5935,10 +5949,12 @@ function useOverlay(props, emit) {
|
|
|
5935
5949
|
window.addEventListener("scroll", scrollCallback, true);
|
|
5936
5950
|
window.addEventListener("resize", updatePosition);
|
|
5937
5951
|
observeOrigin();
|
|
5952
|
+
nextTick(observeOverlay);
|
|
5938
5953
|
} else {
|
|
5939
5954
|
window.removeEventListener("scroll", scrollCallback, true);
|
|
5940
5955
|
window.removeEventListener("resize", updatePosition);
|
|
5941
5956
|
unobserveOrigin();
|
|
5957
|
+
unobserveOverlay();
|
|
5942
5958
|
}
|
|
5943
5959
|
}
|
|
5944
5960
|
);
|
|
@@ -5946,6 +5962,7 @@ function useOverlay(props, emit) {
|
|
|
5946
5962
|
window.removeEventListener("scroll", scrollCallback, true);
|
|
5947
5963
|
window.removeEventListener("resize", updatePosition);
|
|
5948
5964
|
unobserveOrigin();
|
|
5965
|
+
unobserveOverlay();
|
|
5949
5966
|
});
|
|
5950
5967
|
return { arrowRef, overlayRef, styles, updatePosition };
|
|
5951
5968
|
}
|