vue-devui 1.0.0-rc.1 → 1.0.0-rc.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/README.md +126 -200
- package/auto-complete/index.es.js +55 -77
- package/auto-complete/index.umd.js +3 -1
- package/auto-complete/style.css +1 -1
- package/editable-select/index.es.js +118 -162
- package/editable-select/index.umd.js +1 -1
- package/nuxt/components/tagProps.js +3 -0
- package/package.json +1 -1
- package/popover/index.es.js +2 -2
- package/popover/index.umd.js +4 -4
- package/progress/index.es.js +1 -1
- package/progress/index.umd.js +1 -1
- package/progress/style.css +1 -1
- package/radio/index.es.js +8 -2
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/ripple/index.es.js +43 -42
- package/ripple/index.umd.js +1 -1
- package/slider/index.es.js +58 -58
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +168 -125
- package/splitter/index.umd.js +11 -11
- package/style.css +1 -1
- package/tag/index.es.js +13 -17
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/vue-devui.es.js +765 -605
- package/vue-devui.umd.js +18 -16
- package/accordion/index.d.ts +0 -7
- package/accordion/index.es.js +0 -723
- package/accordion/index.umd.js +0 -1
- package/accordion/package.json +0 -7
- package/accordion/style.css +0 -1
- package/anchor/index.d.ts +0 -7
- package/anchor/index.es.js +0 -263
- package/anchor/index.umd.js +0 -1
- package/anchor/package.json +0 -7
- package/anchor/style.css +0 -1
- package/back-top/index.d.ts +0 -7
- package/back-top/index.es.js +0 -130
- package/back-top/index.umd.js +0 -1
- package/back-top/package.json +0 -7
- package/back-top/style.css +0 -1
- package/breadcrumb/index.d.ts +0 -7
- package/breadcrumb/index.es.js +0 -128
- package/breadcrumb/index.umd.js +0 -1
- package/breadcrumb/package.json +0 -7
- package/breadcrumb/style.css +0 -1
- package/carousel/index.d.ts +0 -7
- package/carousel/index.es.js +0 -314
- package/carousel/index.umd.js +0 -1
- package/carousel/package.json +0 -7
- package/carousel/style.css +0 -1
- package/cascader/index.d.ts +0 -7
- package/cascader/index.es.js +0 -5971
- package/cascader/index.umd.js +0 -27
- package/cascader/package.json +0 -7
- package/cascader/style.css +0 -1
- package/color-picker/index.d.ts +0 -7
- package/color-picker/index.es.js +0 -8196
- package/color-picker/index.umd.js +0 -27
- package/color-picker/package.json +0 -7
- package/color-picker/style.css +0 -1
- package/date-picker/index.d.ts +0 -7
- package/date-picker/index.es.js +0 -1154
- package/date-picker/index.umd.js +0 -1
- package/date-picker/package.json +0 -7
- package/date-picker/style.css +0 -1
- package/dragdrop/index.d.ts +0 -7
- package/dragdrop/index.es.js +0 -157
- package/dragdrop/index.umd.js +0 -1
- package/dragdrop/package.json +0 -7
- package/drawer/index.d.ts +0 -7
- package/drawer/index.es.js +0 -234
- package/drawer/index.umd.js +0 -1
- package/drawer/package.json +0 -7
- package/drawer/style.css +0 -1
- package/dropdown/index.d.ts +0 -7
- package/dropdown/index.es.js +0 -693
- package/dropdown/index.umd.js +0 -1
- package/dropdown/package.json +0 -7
- package/dropdown/style.css +0 -1
- package/form/index.d.ts +0 -7
- package/form/index.es.js +0 -7876
- package/form/index.umd.js +0 -27
- package/form/package.json +0 -7
- package/form/style.css +0 -1
- package/gantt/index.d.ts +0 -7
- package/gantt/index.es.js +0 -523
- package/gantt/index.umd.js +0 -1
- package/gantt/package.json +0 -7
- package/gantt/style.css +0 -1
- package/input-icon/index.d.ts +0 -7
- package/input-icon/index.es.js +0 -332
- package/input-icon/index.umd.js +0 -1
- package/input-icon/package.json +0 -7
- package/input-icon/style.css +0 -1
- package/input-number/index.d.ts +0 -7
- package/input-number/index.es.js +0 -229
- package/input-number/index.umd.js +0 -1
- package/input-number/package.json +0 -7
- package/input-number/style.css +0 -1
- package/list/index.d.ts +0 -7
- package/list/index.es.js +0 -39
- package/list/index.umd.js +0 -1
- package/list/package.json +0 -7
- package/list/style.css +0 -1
- package/nav-sprite/index.d.ts +0 -7
- package/nav-sprite/index.es.js +0 -68
- package/nav-sprite/index.umd.js +0 -1
- package/nav-sprite/package.json +0 -7
- package/nuxt/components/Accordion.js +0 -3
- package/nuxt/components/Anchor.js +0 -3
- package/nuxt/components/BackTop.js +0 -3
- package/nuxt/components/Breadcrumb.js +0 -3
- package/nuxt/components/Carousel.js +0 -3
- package/nuxt/components/CarouselItem.js +0 -3
- package/nuxt/components/Cascader.js +0 -3
- package/nuxt/components/ColorPicker.js +0 -3
- package/nuxt/components/Column.js +0 -3
- package/nuxt/components/DatePicker.js +0 -3
- package/nuxt/components/Drawer.js +0 -3
- package/nuxt/components/DrawerService.js +0 -3
- package/nuxt/components/Dropdown.js +0 -3
- package/nuxt/components/DropdownMenu.js +0 -3
- package/nuxt/components/Form.js +0 -3
- package/nuxt/components/FormControl.js +0 -3
- package/nuxt/components/FormItem.js +0 -3
- package/nuxt/components/FormLabel.js +0 -3
- package/nuxt/components/FormOperation.js +0 -3
- package/nuxt/components/Gantt.js +0 -3
- package/nuxt/components/InputIcon.js +0 -3
- package/nuxt/components/InputNumber.js +0 -3
- package/nuxt/components/List.js +0 -3
- package/nuxt/components/ListItem.js +0 -3
- package/nuxt/components/NavSprite.js +0 -2
- package/nuxt/components/QuadrantDiagram.js +0 -3
- package/nuxt/components/Select.js +0 -3
- package/nuxt/components/StepsGuide.js +0 -3
- package/nuxt/components/StickSlider.js +0 -3
- package/nuxt/components/Sticky.js +0 -2
- package/nuxt/components/Table.js +0 -3
- package/nuxt/components/Tabs.js +0 -3
- package/nuxt/components/TimePicker.js +0 -3
- package/nuxt/components/Tooltip.js +0 -3
- package/nuxt/components/Transfer.js +0 -3
- package/nuxt/components/Tree.js +0 -3
- package/nuxt/components/TreeSelect.js +0 -3
- package/nuxt/components/dropdownMenuProps.js +0 -3
- package/nuxt/components/tooltipProps.js +0 -3
- package/quadrant-diagram/index.d.ts +0 -7
- package/quadrant-diagram/index.es.js +0 -5728
- package/quadrant-diagram/index.umd.js +0 -27
- package/quadrant-diagram/package.json +0 -7
- package/quadrant-diagram/style.css +0 -1
- package/select/index.d.ts +0 -7
- package/select/index.es.js +0 -706
- package/select/index.umd.js +0 -1
- package/select/package.json +0 -7
- package/select/style.css +0 -1
- package/steps-guide/index.d.ts +0 -7
- package/steps-guide/index.es.js +0 -242
- package/steps-guide/index.umd.js +0 -1
- package/steps-guide/package.json +0 -7
- package/steps-guide/style.css +0 -1
- package/sticky/index.d.ts +0 -7
- package/sticky/index.es.js +0 -197
- package/sticky/index.umd.js +0 -1
- package/sticky/package.json +0 -7
- package/table/index.d.ts +0 -7
- package/table/index.es.js +0 -2024
- package/table/index.umd.js +0 -1
- package/table/package.json +0 -7
- package/table/style.css +0 -1
- package/tabs/index.d.ts +0 -7
- package/tabs/index.es.js +0 -194
- package/tabs/index.umd.js +0 -1
- package/tabs/package.json +0 -7
- package/tabs/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1238
- package/time-picker/index.umd.js +0 -1
- package/time-picker/package.json +0 -7
- package/time-picker/style.css +0 -1
- package/tooltip/index.d.ts +0 -7
- package/tooltip/index.es.js +0 -5835
- package/tooltip/index.umd.js +0 -27
- package/tooltip/package.json +0 -7
- package/tooltip/style.css +0 -1
- package/transfer/index.d.ts +0 -7
- package/transfer/index.es.js +0 -7615
- package/transfer/index.umd.js +0 -27
- package/transfer/package.json +0 -7
- package/transfer/style.css +0 -1
- package/tree/index.d.ts +0 -7
- package/tree/index.es.js +0 -6495
- package/tree/index.umd.js +0 -27
- package/tree/package.json +0 -7
- package/tree/style.css +0 -1
- package/tree-select/index.d.ts +0 -7
- package/tree-select/index.es.js +0 -627
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/tag/index.es.js
CHANGED
|
@@ -24,17 +24,17 @@ const tagProps = {
|
|
|
24
24
|
function useClass(props) {
|
|
25
25
|
return computed(() => {
|
|
26
26
|
const { type, color, deletable } = props;
|
|
27
|
-
return `devui-tag devui-tag-${type || (color ? "colorful" : "") || "default"}
|
|
27
|
+
return `devui-tag-item devui-tag-${type || (color ? "colorful" : "") || "default"}${deletable ? " devui-tag-deletable" : ""}`;
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
function useColor(props) {
|
|
31
31
|
return computed(() => {
|
|
32
32
|
const { color, type } = props;
|
|
33
33
|
const typeMap = {
|
|
34
|
-
primary: "#5e7ce0",
|
|
35
|
-
success: "#50d4ab",
|
|
36
|
-
warning: "#fac20a",
|
|
37
|
-
danger: "#f66f6a"
|
|
34
|
+
primary: "var(--devui-primary, #5e7ce0)",
|
|
35
|
+
success: "var(--devui-success, #50d4ab)",
|
|
36
|
+
warning: "var(--devui-warning, #fac20a)",
|
|
37
|
+
danger: "var(--devui-danger, #f66f6a)"
|
|
38
38
|
};
|
|
39
39
|
const colorMap = {
|
|
40
40
|
"blue-w98": "#3383ff",
|
|
@@ -75,12 +75,12 @@ var Tag = defineComponent({
|
|
|
75
75
|
const tagTitle = titleContent.value || "";
|
|
76
76
|
const isDefaultTag = () => !type.value && !color.value;
|
|
77
77
|
const isShow = ref(true);
|
|
78
|
-
const handleClick = () => {
|
|
79
|
-
emit("click");
|
|
78
|
+
const handleClick = (e) => {
|
|
79
|
+
emit("click", e);
|
|
80
80
|
};
|
|
81
|
-
const handleDelete = () => {
|
|
81
|
+
const handleDelete = (e) => {
|
|
82
82
|
isShow.value = false;
|
|
83
|
-
emit("tagDelete");
|
|
83
|
+
emit("tagDelete", e);
|
|
84
84
|
};
|
|
85
85
|
const closeIconEl = () => {
|
|
86
86
|
return deletable.value ? createVNode("a", {
|
|
@@ -97,7 +97,6 @@ var Tag = defineComponent({
|
|
|
97
97
|
}, null)]) : null;
|
|
98
98
|
};
|
|
99
99
|
const unWatch = watch(checked, (newVal) => {
|
|
100
|
-
console.log("checkedChange");
|
|
101
100
|
emit("checkedChange", newVal);
|
|
102
101
|
});
|
|
103
102
|
onUnmounted(() => unWatch());
|
|
@@ -111,22 +110,19 @@ var Tag = defineComponent({
|
|
|
111
110
|
"style": {
|
|
112
111
|
display: "block",
|
|
113
112
|
color: checked.value ? "#fff" : themeColor.value,
|
|
114
|
-
backgroundColor: checked.value ? themeColor.value : !color.value ? "" : "#
|
|
113
|
+
backgroundColor: checked.value ? themeColor.value : !color.value ? "" : "var(--devui-base-bg, #ffffff)"
|
|
115
114
|
},
|
|
116
115
|
"title": tagTitle
|
|
117
116
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots), closeIconEl()])]), [[vShow, isShow.value]]);
|
|
118
117
|
};
|
|
119
118
|
}
|
|
120
119
|
});
|
|
121
|
-
Tag.install = function(app) {
|
|
122
|
-
app.component(Tag.name, Tag);
|
|
123
|
-
};
|
|
124
120
|
var index = {
|
|
125
121
|
title: "Tag \u6807\u7B7E",
|
|
126
122
|
category: "\u6570\u636E\u5C55\u793A",
|
|
127
|
-
status: "
|
|
123
|
+
status: "100%",
|
|
128
124
|
install(app) {
|
|
129
|
-
app.
|
|
125
|
+
app.component(Tag.name, Tag);
|
|
130
126
|
}
|
|
131
127
|
};
|
|
132
|
-
export { Tag, index as default };
|
|
128
|
+
export { Tag, index as default, tagProps };
|
package/tag/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,e(t.index={},t.Vue))})(this,function(t,e){"use strict";const f={type:{type:String,default:""},color:{type:String,default:""},titleContent:{type:String,default:""},checked:{type:Boolean,default:!1},deletable:{type:Boolean,default:!1}};function p(a){return e.computed(()=>{const{type:o,color:n,deletable:c}=a;return`devui-tag-item devui-tag-${o||(n?"colorful":"")||"default"}${c?" devui-tag-deletable":""}`})}function g(a){return e.computed(()=>{const{color:o,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!o&&n?c[n]:r[o]||o})}var D="",d=e.defineComponent({name:"DTag",props:f,emits:["click","tagDelete","checkedChange"],setup(a,{slots:o,emit:n}){const{type:c,color:r,checked:u,titleContent:m,deletable:y}=e.toRefs(a),h=p(a),i=g(a),C=m.value||"",b=()=>!c.value&&!r.value,s=e.ref(!0),w=l=>{n("click",l)},k=l=>{s.value=!1,n("tagDelete",l)},T=()=>y.value?e.createVNode("a",{class:"remove-button",onClick:k},[b()?e.createVNode(e.resolveComponent("d-icon"),{size:"12px",name:"error-o",color:"#adb0b8"},null):e.createVNode(e.resolveComponent("d-icon"),{size:"12px",name:"close",color:i.value},null)]):null,S=e.watch(u,l=>{n("checkedChange",l)});return e.onUnmounted(()=>S()),()=>{var l;return s.value&&e.withDirectives(e.createVNode("div",{class:"devui-tag",onClick:w},[e.createVNode("span",{class:h.value,style:{display:"block",color:u.value?"#fff":i.value,backgroundColor:u.value?i.value:r.value?"var(--devui-base-bg, #ffffff)":""},title:C},[(l=o.default)==null?void 0:l.call(o),T()])]),[[e.vShow,s.value]])}}}),v={title:"Tag \u6807\u7B7E",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(a){a.component(d.name,d)}};t.Tag=d,t.default=v,t.tagProps=f,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"});
|
package/tag/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.devui-tag{display:inline-block;margin:4px}.devui-tag .devui-tag{padding:0 8px;min-height:20px;
|
|
1
|
+
@charset "UTF-8";.devui-tag{display:inline-block;margin:4px}.devui-tag .devui-tag-item{display:block;position:relative;padding:0 8px;min-height:20px;border:1px solid;border-radius:var(--devui-border-radius, 2px);font-size:var(--devui-font-size, 12px);line-height:20px;cursor:default}.devui-tag .devui-tag-item.devui-tag-default{border:0;color:var(--devui-text, #252b3a);background-color:var(--devui-default-bg, #f3f6f8)}.devui-tag .devui-tag-item.devui-tag-primary{color:var(--devui-primary, #5e7ce0);background-color:var(--devui-primary-bg, #f2f5fc)}.devui-tag .devui-tag-item.devui-tag-success{color:var(--devui-success, #50d4ab);background-color:var(--devui-success-bg, #edfff9)}.devui-tag .devui-tag-item.devui-tag-warning{color:var(--devui-warning, #fac20a);background-color:var(--devui-warning-bg, #fff3e8)}.devui-tag .devui-tag-item.devui-tag-danger{color:var(--devui-danger, #f66f6a);background-color:var(--devui-danger-bg, #ffeeed)}.devui-tag .devui-tag-item.devui-tag-colorful{background-color:#fff}.devui-tag .devui-tag-item.devui-tag-deletable{padding-right:32px}.devui-tag .remove-button{display:inline-block;margin-left:12px;font-size:var(--devui-font-size-icon, 16px);cursor:pointer;width:12px;height:12px;line-height:12px;border-radius:50%;text-align:center;position:absolute;top:50%;transform:translateY(-50%)}.devui-tag .remove-button i{vertical-align:0}
|