vue-devui 1.0.0-rc.0 → 1.0.0-rc.3
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 +55 -113
- package/alert/index.es.js +28 -30
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +143 -103
- package/auto-complete/index.umd.js +5 -1
- package/auto-complete/style.css +1 -1
- package/avatar/index.es.js +77 -81
- package/avatar/index.umd.js +1 -1
- package/badge/index.es.js +1 -1
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/button/index.es.js +43 -43
- package/button/index.umd.js +1 -1
- package/card/index.es.js +3 -6
- package/card/index.umd.js +1 -1
- package/checkbox/index.es.js +5 -11
- package/checkbox/index.umd.js +1 -1
- package/comment/index.es.js +2 -5
- package/comment/index.umd.js +1 -1
- package/countdown/index.es.js +5 -7
- package/countdown/index.umd.js +1 -1
- package/editable-select/index.es.js +124 -168
- package/editable-select/index.umd.js +1 -1
- package/fullscreen/index.es.js +13 -16
- package/fullscreen/index.umd.js +1 -1
- package/grid/index.es.js +30 -36
- package/grid/index.umd.js +1 -1
- package/icon/index.es.js +39 -57
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +21 -20
- package/image-preview/index.umd.js +1 -1
- package/input/index.es.js +2 -5
- package/input/index.umd.js +1 -1
- package/layout/index.es.js +6 -21
- package/layout/index.umd.js +1 -1
- package/loading/index.es.js +20 -12
- package/loading/index.umd.js +1 -1
- package/modal/index.es.js +135 -122
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +38 -40
- package/notification/index.umd.js +1 -1
- package/nuxt/components/DropdownPropsKey.js +3 -0
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/autoCompleteProps.js +3 -0
- package/nuxt/components/avatarProps.js +3 -0
- package/nuxt/components/cardProps.js +3 -0
- package/nuxt/components/checkboxGroupInjectionKey.js +3 -0
- package/nuxt/components/checkboxGroupProps.js +3 -0
- package/nuxt/components/checkboxProps.js +3 -0
- package/nuxt/components/colProps.js +3 -0
- package/nuxt/components/colPropsBaseClass.js +3 -0
- package/nuxt/components/colPropsBaseStyle.js +3 -0
- package/nuxt/components/commentProps.js +3 -0
- package/nuxt/components/countdownProps.js +3 -0
- package/nuxt/components/editableSelectProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +2 -0
- package/nuxt/components/imagePreviewProps.js +3 -0
- package/nuxt/components/inputProps.js +3 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/progressProps.js +3 -0
- package/nuxt/components/rateProps.js +3 -0
- package/nuxt/components/readTipProps.js +3 -0
- package/nuxt/components/resultProps.js +3 -0
- package/nuxt/components/rowProps.js +3 -0
- package/nuxt/components/screenSizes.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/nuxt/components/skeletonProps.js +3 -0
- package/nuxt/components/splitterProps.js +3 -0
- package/nuxt/components/statisticProps.js +3 -0
- package/nuxt/components/switchProps.js +3 -0
- package/nuxt/components/tagInputProps.js +3 -0
- package/nuxt/components/tagProps.js +3 -0
- package/nuxt/components/textareaProps.js +3 -0
- package/nuxt/components/timeAxisProps.js +3 -0
- package/overlay/index.es.js +49 -42
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +8 -43
- package/pagination/index.es.js +24 -25
- package/pagination/index.umd.js +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +51 -44
- package/popover/index.umd.js +12 -12
- package/popover/style.css +1 -1
- package/progress/index.es.js +34 -36
- package/progress/index.umd.js +3 -3
- package/progress/style.css +1 -1
- package/radio/index.es.js +11 -11
- package/radio/index.umd.js +1 -1
- package/radio/style.css +1 -1
- package/rate/index.es.js +4 -7
- package/rate/index.umd.js +1 -1
- package/read-tip/index.es.js +8 -8
- package/read-tip/index.umd.js +1 -1
- package/result/index.es.js +40 -58
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +47 -42
- package/ripple/index.umd.js +1 -1
- package/search/index.es.js +13 -16
- package/search/index.umd.js +8 -8
- package/skeleton/index.es.js +20 -23
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +60 -59
- package/slider/index.umd.js +1 -1
- package/splitter/index.es.js +223 -171
- package/splitter/index.umd.js +13 -13
- package/splitter/style.css +1 -1
- package/statistic/index.es.js +7 -18
- package/statistic/index.umd.js +1 -1
- package/status/index.es.js +1 -4
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/style.css +1 -1
- package/switch/index.es.js +3 -6
- package/switch/index.umd.js +1 -1
- package/tag/index.es.js +15 -18
- package/tag/index.umd.js +1 -1
- package/tag/style.css +1 -1
- package/tag-input/index.es.js +7 -8
- package/tag-input/index.umd.js +1 -1
- package/textarea/index.es.js +2 -5
- package/textarea/index.umd.js +1 -1
- package/{accordion → timeline}/index.d.ts +0 -0
- package/{time-axis → timeline}/index.es.js +64 -83
- package/timeline/index.umd.js +1 -0
- package/{anchor → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/upload/index.es.js +98 -97
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +12477 -24991
- package/vue-devui.umd.js +24 -20
- package/accordion/index.es.js +0 -720
- 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/style.css +0 -1
- package/back-top/index.d.ts +0 -7
- package/back-top/index.es.js +0 -128
- 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 -127
- 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 -329
- 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 -5963
- 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 -8187
- 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 -1171
- 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 -638
- 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 -7865
- 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 -331
- 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 -240
- 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/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.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 -239
- 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 -1969
- 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-axis/index.d.ts +0 -7
- package/time-axis/index.umd.js +0 -1
- package/time-axis/package.json +0 -7
- package/time-axis/style.css +0 -1
- package/time-picker/index.d.ts +0 -7
- package/time-picker/index.es.js +0 -1237
- 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 -5828
- 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 -7608
- 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 -6490
- 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 -623
- package/tree-select/index.umd.js +0 -1
- package/tree-select/package.json +0 -7
- package/tree-select/style.css +0 -1
package/progress/index.umd.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
a ${o},${o} 0 1 1 0,${-
|
|
3
|
-
a ${o},${o} 0 1 1 0,${
|
|
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 y={height:{type:String,default:"20px"},percentage:{type:Number,default:0},percentageText:{type:String,default:""},barBgColor:{type:String,default:"#5170ff"},isCircle:{type:Boolean,default:!1},strokeWidth:{type:Number,default:6},showContent:{type:Boolean,default:!0}};var C="",f=e.defineComponent({name:"DProgress",props:y,setup(s){const{height:i,percentage:c,percentageText:p,barBgColor:u,isCircle:n,strokeWidth:d,showContent:a}=e.toRefs(s),r=e.reactive({pathString:"",trailPath:null,strokePath:null}),h=()=>{if(!n)return;const o=50-d.value/2,k=-o,l=o*-2;r.pathString=`M 50,50 m 0,${k}
|
|
2
|
+
a ${o},${o} 0 1 1 0,${-l}
|
|
3
|
+
a ${o},${o} 0 1 1 0,${l}`;const g=Math.PI*2*o;r.trailPath={stroke:"var(--devui-dividing-line, #dfe1e6)",strokeDasharray:`${g}px ${g}px`,strokeDashoffset:"0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"},r.strokePath={stroke:u||null,strokeDasharray:`${c.value/100*g}px ${g}px`,strokeDashoffset:"0",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"}};return h(),e.watch([i,c,p,u,n,d,a],()=>{h()}),{data:r}},render(){var l;const{height:s,percentage:i,percentageText:c,barBgColor:p,isCircle:u,strokeWidth:n,showContent:d,data:a,$slots:r}=this,h=e.createVNode("div",{class:"devui-progress--line",style:{height:s,borderRadius:s}},[e.createVNode("div",{class:"devui-progress-bar",style:{height:s,borderRadius:s,width:`${i}%`,backgroundColor:p}},null),e.createVNode("span",{style:{lineHeight:s}},[c])]),o=e.createVNode("span",{class:"devui-progress-circle-text"},[i,e.createTextVNode("%")]),k=e.createVNode("div",{class:"devui-progress-circle"},[e.createVNode("svg",{class:"devui-progress-circle",viewBox:"0 0 100 100"},[e.createVNode("path",{class:"devui-progress-circle-trail","fill-opacity":"0","stroke-width":n,style:a.trailPath,d:a.pathString},null),e.createVNode("path",{class:"devui-progress-circle-path",d:a.pathString,"stroke-linecap":"round","fill-opacity":"0",stroke:p,"stroke-width":i?n:0,style:a.strokePath},null)]),d&&((l=r.default)==null?void 0:l.call(r)),d&&!r.default&&o]);return e.createVNode("div",{class:"devui-progress"},[u?k:h])}}),P={title:"Progress \u8FDB\u5EA6\u6761",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(s){s.component(f.name,f)}};t.Progress=f,t.default=P,t.progressProps=y,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"});
|
package/progress/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-progress--line{position:relative;background
|
|
1
|
+
.devui-progress--line{position:relative;background:var(--devui-dividing-line, #dfe1e6)}.devui-progress--line .devui-progress-bar{width:0;height:100%;transition:width .6s ease;background-color:#5e7ce0}.devui-progress--line>span{display:block;white-space:nowrap;color:var(--devui-light-text, #ffffff);text-align:center;position:absolute;left:0;top:0;height:100%;width:100%;font-size:12px;line-height:1.5}.devui-progress-circle{position:relative}.devui-progress-circle .devui-progress-circle-text{position:absolute;top:50%;left:50%;width:100%;margin:0;padding:0;color:var(--devui-text, #252b3a);line-height:1;white-space:normal;text-align:center;transform:translate(-50%,-50%)}
|
package/radio/index.es.js
CHANGED
|
@@ -71,7 +71,7 @@ var Radio = defineComponent({
|
|
|
71
71
|
return props.value === _value;
|
|
72
72
|
});
|
|
73
73
|
const radioName = computed(() => {
|
|
74
|
-
return radioGroupConf ? radioGroupConf.name.value : props.name;
|
|
74
|
+
return radioGroupConf ? radioGroupConf.name.value : props.name || void 0;
|
|
75
75
|
});
|
|
76
76
|
const judgeCanChange = (_value) => {
|
|
77
77
|
const beforeChange = props.beforeChange || (radioGroupConf ? radioGroupConf.beforeChange : null);
|
|
@@ -138,13 +138,19 @@ var Radio = defineComponent({
|
|
|
138
138
|
"viewBox": "0 0 1024 1024",
|
|
139
139
|
"xmlns": "http://www.w3.org/2000/svg"
|
|
140
140
|
}, [createVNode("circle", {
|
|
141
|
-
"class":
|
|
141
|
+
"class": {
|
|
142
|
+
"devui-radio-material-outer": true,
|
|
143
|
+
disabled
|
|
144
|
+
},
|
|
142
145
|
"cx": "512",
|
|
143
146
|
"cy": "512",
|
|
144
147
|
"r": "486.5",
|
|
145
148
|
"stroke-width": "51"
|
|
146
149
|
}, null), createVNode("circle", {
|
|
147
|
-
"class":
|
|
150
|
+
"class": {
|
|
151
|
+
"devui-radio-material-inner": true,
|
|
152
|
+
disabled
|
|
153
|
+
},
|
|
148
154
|
"cx": "512",
|
|
149
155
|
"fill-rule": "nonzero",
|
|
150
156
|
"cy": "512",
|
|
@@ -207,19 +213,13 @@ var RadioGroup = defineComponent({
|
|
|
207
213
|
}, [getContent()]);
|
|
208
214
|
}
|
|
209
215
|
});
|
|
210
|
-
Radio.install = function(app) {
|
|
211
|
-
app.component(Radio.name, Radio);
|
|
212
|
-
};
|
|
213
|
-
RadioGroup.install = function(app) {
|
|
214
|
-
app.component(RadioGroup.name, RadioGroup);
|
|
215
|
-
};
|
|
216
216
|
var index = {
|
|
217
217
|
title: "Radio \u5355\u9009\u6846",
|
|
218
218
|
category: "\u6570\u636E\u5F55\u5165",
|
|
219
219
|
status: "100%",
|
|
220
220
|
install(app) {
|
|
221
|
-
app.
|
|
222
|
-
app.
|
|
221
|
+
app.component(Radio.name, Radio);
|
|
222
|
+
app.component(RadioGroup.name, RadioGroup);
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
export { Radio, RadioGroup, index as default };
|
package/radio/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var S=Object.defineProperty,j=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var
|
|
1
|
+
var S=Object.defineProperty,j=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var v=(t,e,o)=>e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,p=(t,e)=>{for(var o in e||(e={}))k.call(e,o)&&v(t,o,e[o]);if(C)for(var o of C(e))x.call(e,o)&&v(t,o,e[o]);return t},b=(t,e)=>j(t,P(e));(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 o={modelValue:{type:String,default:null},name:{type:String,default:null},beforeChange:{type:Function,default:null},disabled:{type:Boolean,default:!1}},V=b(p({},o),{value:{type:String,required:!0,default:null}}),N=b(p({},o),{values:{type:Array,default:null},direction:{type:String,default:"column"}}),y=Symbol("DRadioGroup");var D="",c=e.defineComponent({name:"DRadio",props:V,emits:["change","update:modelValue"],setup(a,{emit:d}){const n=e.inject(y,null),r=e.computed(()=>a.disabled||(n==null?void 0:n.disabled.value)),l=e.computed(()=>{const i=n?n.modelValue.value:a.modelValue;return a.value===i}),h=e.computed(()=>n?n.name.value:a.name||void 0),g=i=>{const u=a.beforeChange||(n?n.beforeChange:null);let s=Promise.resolve(!0);if(u){const f=u(i);if(typeof f=="undefined")return s;typeof f=="boolean"?s=Promise.resolve(f):s=f}return s};return{isChecked:l,radioName:h,disabled:r,handleChange:async i=>{const u=a.value;if(!await g(u)){i.preventDefault();return}n==null||n.emitChange(u),d("update:modelValue",u),d("change",u)}}},render(){var i;const{disabled:a,radioName:d,value:n,isChecked:r,$slots:l,handleChange:h}=this,g=["devui-radio",{active:r,disabled:a}];return e.createVNode("label",{class:g},[e.createVNode("input",{type:"radio",name:d,class:"devui-radio-input",disabled:a,onChange:h,value:n,checked:r},null),e.createVNode("span",{class:"devui-radio-material"},[e.createVNode("svg",{height:"100%",width:"100%",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[e.createVNode("circle",{class:{"devui-radio-material-outer":!0,disabled:a},cx:"512",cy:"512",r:"486.5","stroke-width":"51"},null),e.createVNode("circle",{class:{"devui-radio-material-inner":!0,disabled:a},cx:"512","fill-rule":"nonzero",cy:"512",r:"320"},null)])]),e.createVNode("span",{class:"devui-radio-label"},[(i=l.default)==null?void 0:i.call(l)])])}}),_="";function R(a){return typeof a=="function"||Object.prototype.toString.call(a)==="[object Object]"&&!e.isVNode(a)}var m=e.defineComponent({name:"DRadioGroup",props:N,emits:["change","update:modelValue"],setup(a,{emit:d}){const n=r=>{d("update:modelValue",r),d("change",r)};e.provide(y,{modelValue:e.toRef(a,"modelValue"),name:e.toRef(a,"name"),disabled:e.toRef(a,"disabled"),beforeChange:a.beforeChange,emitChange:n})},render(){const{values:a,direction:d}=this,n=()=>{const r=this.$slots.default;return r?r():Array.isArray(a)?a.map(l=>e.createVNode(c,{key:l,value:l},R(l)?l:{default:()=>[l]})):""};return e.createVNode("div",{class:["devui-radio-group",{"is-row":d==="row","is-column":d==="column"}]},[n()])}}),w={title:"Radio \u5355\u9009\u6846",category:"\u6570\u636E\u5F55\u5165",status:"100%",install(a){a.component(c.name,c),a.component(m.name,m)}};t.Radio=c,t.RadioGroup=m,t.default=w,Object.defineProperty(t,"__esModule",{value:!0}),t[Symbol.toStringTag]="Module"});
|
package/radio/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.devui-radio{display:flex;justify-content:flex-start;align-items:center;font-size:var(--devui-font-size, 12px);line-height:1.5;font-weight:400;cursor:pointer;color:var(--devui-text, #252b3a)}.devui-radio:hover .devui-radio-label{color:var(--devui-primary-hover, #7693f5)}.devui-radio:active .devui-radio-material-outer,.devui-radio:focus .devui-radio-material-outer,.devui-radio:hover .devui-radio-material-outer{stroke:var(--devui-form-control-line-active-hover, #344899)}.devui-radio:active .devui-radio-material-inner,.devui-radio:focus .devui-radio-material-inner,.devui-radio:hover .devui-radio-material-inner{fill:var(--devui-icon-fill-active-hover, #526ecc)}.devui-radio.active .devui-radio-material-inner{opacity:1;transform:scale(1);transition:transform .2s cubic-bezier(.
|
|
1
|
+
@charset "UTF-8";.devui-radio{display:flex;justify-content:flex-start;align-items:center;font-size:var(--devui-font-size, 12px);line-height:1.5;font-weight:400;cursor:pointer;color:var(--devui-text, #252b3a)}.devui-radio:hover .devui-radio-label{color:var(--devui-primary-hover, #7693f5)}.devui-radio:active .devui-radio-material-outer,.devui-radio:focus .devui-radio-material-outer,.devui-radio:hover .devui-radio-material-outer{stroke:var(--devui-form-control-line-active-hover, #344899)}.devui-radio:active .devui-radio-material-inner,.devui-radio:focus .devui-radio-material-inner,.devui-radio:hover .devui-radio-material-inner{fill:var(--devui-icon-fill-active-hover, #526ecc)}.devui-radio.active .devui-radio-material-outer{opacity:1;stroke:var(--devui-form-control-line-active-hover, #344899);transition:stroke 50ms var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95))}.devui-radio.active .devui-radio-material-outer.disabled{stroke:var(--devui-icon-fill-active-disabled, #beccfa);fill:transparent}.devui-radio.active .devui-radio-material-inner{opacity:1;transform:scale(1);transition:transform var(--devui-animation-duration-base, .2s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95)),opacity var(--devui-animation-duration-base, .2s) var(--devui-animation-ease-in-out, cubic-bezier(.5, .05, .5, .95))}.devui-radio.active .devui-radio-material-inner.disabled{fill:var(--devui-icon-fill-active-disabled, #beccfa)}.devui-radio.disabled{cursor:not-allowed}.devui-radio.disabled .devui-radio-material-outer{stroke:var(--devui-disabled-line, #dfe1e6);fill:var(--devui-disabled-bg, #f5f5f6)}.devui-radio.disabled .devui-radio-material-inner{fill:var(--devui-icon-fill-active-disabled, #beccfa)}.devui-radio.disabled .devui-radio-label{color:var(--devui-disabled-text, #adb0b8)}.devui-radio-material{vertical-align:middle;position:relative;display:inline-block;overflow:hidden;height:16px;width:16px;line-height:16px;user-select:none}.devui-radio-material-outer{opacity:1;transition:stroke 50ms cubic-bezier(.755,.05,.855,.06);stroke:var(--devui-line, #adb0b8);fill:transparent}.devui-radio-material-inner{opacity:0;transform:scale(0);transform-origin:50% 50%;transition:transform .2s cubic-bezier(.755,.05,.855,.06),opacity .2s cubic-bezier(.755,.05,.855,.06);fill:var(--devui-icon-fill-active, #5e7ce0)}.devui-radio-label{color:var(--devui-text, #252b3a);margin-left:8px;font-size:var(--devui-font-size, 12px);transition:color .3s cubic-bezier(.645,.045,.355,1)}.devui-radio-input{opacity:0;z-index:-1;width:0;height:0;display:none;overflow:hidden;pointer-events:none}.devui-radio-group{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start}.devui-radio-group.is-row{flex-direction:row}.devui-radio-group.is-column{flex-direction:column}.devui-radio-group .devui-radio{line-height:28px}.devui-radio-group .devui-radio:not(:last-child){padding-right:20px}
|
package/rate/index.es.js
CHANGED
|
@@ -166,7 +166,7 @@ var Rate = defineComponent({
|
|
|
166
166
|
"fill": "#E3E5E9",
|
|
167
167
|
"id": "Mask"
|
|
168
168
|
}, [createVNode("polygon", {
|
|
169
|
-
"points": "8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835
|
|
169
|
+
"points": "8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"
|
|
170
170
|
}, null)])])])]), icon && !character && createVNode("span", {
|
|
171
171
|
"class": `devui-star-color-active devui-active-star devui-star-color-${type}`,
|
|
172
172
|
"style": {
|
|
@@ -202,19 +202,16 @@ var Rate = defineComponent({
|
|
|
202
202
|
}, [createVNode("g", {
|
|
203
203
|
"id": "Mask"
|
|
204
204
|
}, [createVNode("polygon", {
|
|
205
|
-
"points": "8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1
|
|
205
|
+
"points": "8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"
|
|
206
206
|
}, null)])])])])]))]);
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
|
-
Rate.install = function(app) {
|
|
210
|
-
app.component(Rate.name, Rate);
|
|
211
|
-
};
|
|
212
209
|
var index = {
|
|
213
210
|
title: "Rate \u8BC4\u5206",
|
|
214
211
|
category: "\u6570\u636E\u5C55\u793A",
|
|
215
212
|
status: "100%",
|
|
216
213
|
install(app) {
|
|
217
|
-
app.
|
|
214
|
+
app.component(Rate.name, Rate);
|
|
218
215
|
}
|
|
219
216
|
};
|
|
220
|
-
export { Rate, index as default };
|
|
217
|
+
export { Rate, index as default, rateProps };
|
package/rate/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(i=typeof globalThis!="undefined"?globalThis:i||self,t(i.index={},i.Vue))})(this,function(i,t){"use strict";const g={modelValue:{type:Number},read:{type:Boolean,default:!1},count:{type:Number,default:5},type:{type:String,default:""},color:{type:String,default:""},icon:{type:String,default:""},character:{type:String,default:""},allowHalf:{type:Boolean,default:!1},onChange:{type:Function,default:void 0},onTouched:{type:Function,default:void 0}};var V="",
|
|
1
|
+
(function(i,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(i=typeof globalThis!="undefined"?globalThis:i||self,t(i.index={},i.Vue))})(this,function(i,t){"use strict";const g={modelValue:{type:Number},read:{type:Boolean,default:!1},count:{type:Number,default:5},type:{type:String,default:""},color:{type:String,default:""},icon:{type:String,default:""},character:{type:String,default:""},allowHalf:{type:Boolean,default:!1},onChange:{type:Function,default:void 0},onTouched:{type:Function,default:void 0}};var V="",f=t.defineComponent({name:"DRate",props:g,emits:["change","update:modelValue"],setup(o,h){const r=t.reactive([]),a=t.ref(0),l=(n,e,c)=>{for(let s=n;s<e;s++)r[s].width=c},d=()=>{if(!o.modelValue)return;a.value=o.modelValue-1;const n=a.value%1,e=Math.floor(a.value);l(0,e+1,"100%"),n>0?(r[e+1].width=n*100+"%",l(e+2,o.count,"0")):l(e+1,o.count,"0")};return t.onMounted(()=>{for(let n=0;n<o.count;n++)r.push({width:"0"});d()}),{totalLevelArray:r,chooseValue:a,hoverToggle:(n,e,c=!1)=>{o.read||(c?a.value>=0?(l(0,a.value+1,"100%"),l(a.value+1,o.count,"0")):l(0,o.count,"0"):(l(0,e+1,"100%"),o.allowHalf&&n.offsetX*2<=n.target.clientWidth?l(e,e+1,"50%"):l(e,e+1,"100%"),l(e+1,o.count,"0")))},selectValue:(n,e)=>{o.read||(l(0,e,"100%"),o.allowHalf&&n.offsetX*2<=n.target.clientWidth?(l(e,e+1,"50%"),a.value=e-.5):(l(e,e+1,"100%"),a.value=e),l(e+1,o.count,"0"),e=a.value,o.onChange&&o.onChange(e+1),o.onTouched&&o.onTouched(),h.emit("update:modelValue",e+1))}}},render(){const{totalLevelArray:o,chooseValue:h,icon:r,character:a,read:l,type:d,color:u,hoverToggle:v,selectValue:n}=this;return t.createVNode("div",{class:"devui-star-container",onMouseleave:e=>v(e,h,!0)},[o.map((e,c)=>t.createVNode("div",{class:`devui-star-align devui-pointer ${l?"devui-only-read":""}`,key:c,onMouseover:s=>v(s,c),onClick:s=>n(s,c)},[r&&!a&&t.createVNode("span",{class:"devui-star-color"},[t.createVNode(t.resolveComponent("d-icon"),{name:r},null)]),a&&!r&&t.createVNode("span",{class:"devui-star-color"},[a]),!r&&!a&&t.createVNode("span",{class:"devui-star-color"},[t.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns-xlink":"http://www.w3.org/1999/xlink"},[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("g",{fill:"#E3E5E9",id:"Mask"},[t.createVNode("polygon",{points:"8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"},null)])])])]),r&&!a&&t.createVNode("span",{class:`devui-star-color-active devui-active-star devui-star-color-${d}`,style:{width:e.width}},[t.createVNode(t.resolveComponent("d-icon"),{name:r,color:u},null)]),a&&!r&&t.createVNode("span",{class:`devui-star-color-active devui-active-star devui-star-color-${d}`,style:{color:u,width:e.width}},[a]),!a&&!r&&t.createVNode("span",{class:`devui-star-color-active devui-active-star devui-star-color-${d}`,style:{color:u,width:e.width}},[t.createVNode("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns-xlink":"http://www.w3.org/1999/xlink"},[t.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createVNode("g",{id:"Mask"},[t.createVNode("polygon",{points:"8 12.7603585 3.67376208 14.3147912 3.81523437 9.71994835 1 6.0857977 5.41367261 4.80046131 8 1 10.5863274 4.80046131 15 6.0857977 12.1847656 9.71994835 12.3262379 14.3147912"},null)])])])])]))])}}),w={title:"Rate \u8BC4\u5206",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(o){o.component(f.name,f)}};i.Rate=f,i.default=w,i.rateProps=g,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
|
package/read-tip/index.es.js
CHANGED
|
@@ -151,12 +151,14 @@ var ReadTip = defineComponent({
|
|
|
151
151
|
rule.overlayClassName = rule.overlayClassName || options.overlayClassName;
|
|
152
152
|
rule.position = rule.position || options.position;
|
|
153
153
|
rule.contentTemplate = !!ctx.slots.contentTemplate;
|
|
154
|
-
if (!("appendToBody" in rule))
|
|
154
|
+
if (!("appendToBody" in rule)) {
|
|
155
155
|
rule.appendToBody = options.appendToBody;
|
|
156
|
+
}
|
|
156
157
|
const doms = defaultSlot.value.querySelectorAll(rule.selector);
|
|
157
158
|
[...doms].map((dom, index2) => {
|
|
158
|
-
if (rule.appendToBody === false)
|
|
159
|
+
if (rule.appendToBody === false) {
|
|
159
160
|
dom.style.position = "relative";
|
|
161
|
+
}
|
|
160
162
|
let newRule = reactive({
|
|
161
163
|
id: null
|
|
162
164
|
});
|
|
@@ -179,8 +181,9 @@ var ReadTip = defineComponent({
|
|
|
179
181
|
rule.status = true;
|
|
180
182
|
}
|
|
181
183
|
const rules = (rules2) => {
|
|
182
|
-
if (rules2 === null)
|
|
184
|
+
if (rules2 === null) {
|
|
183
185
|
return;
|
|
186
|
+
}
|
|
184
187
|
if (typeof rules2 === "object" && !Array.isArray(rules2)) {
|
|
185
188
|
rules2 = [rules2];
|
|
186
189
|
}
|
|
@@ -244,15 +247,12 @@ var ReadTip = defineComponent({
|
|
|
244
247
|
};
|
|
245
248
|
}
|
|
246
249
|
});
|
|
247
|
-
ReadTip.install = function(app) {
|
|
248
|
-
app.component(ReadTip.name, ReadTip);
|
|
249
|
-
};
|
|
250
250
|
var index = {
|
|
251
251
|
title: "ReadTip \u9605\u8BFB\u63D0\u793A",
|
|
252
252
|
category: "\u53CD\u9988",
|
|
253
253
|
status: "100%",
|
|
254
254
|
install(app) {
|
|
255
|
-
app.
|
|
255
|
+
app.component(ReadTip.name, ReadTip);
|
|
256
256
|
}
|
|
257
257
|
};
|
|
258
|
-
export { ReadTip, index as default };
|
|
258
|
+
export { ReadTip, index as default, readTipProps };
|
package/read-tip/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var q=Object.defineProperty;var k=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var w=(
|
|
1
|
+
var q=Object.defineProperty;var k=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable;var w=(i,e,d)=>e in i?q(i,e,{enumerable:!0,configurable:!0,writable:!0,value:d}):i[e]=d,T=(i,e)=>{for(var d in e||(e={}))D.call(e,d)&&w(i,d,e[d]);if(k)for(var d of k(e))O.call(e,d)&&w(i,d,e[d]);return i};(function(i,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis!="undefined"?globalThis:i||self,e(i.index={},i.Vue))})(this,function(i,e){"use strict";const d={readTipOptions:{type:Object},defaultTemplateProps:{type:Object}};var E="",A=e.defineComponent({name:"DReadTipTemplate",props:d,emits:[],setup(h,v){const{defaultTemplateProps:b}=e.toRefs(h);let n=b.value;const l=(n==null?void 0:n.id)?`#${n.id}`:n.selector,c=e.reactive({});if(typeof n.dataFn=="function"){const a=n.dataFn({element:document.querySelector(l),rule:n});n=T(T({},n),a)}const B=e.ref(null),g=a=>{let y=a>24?0:-(a/2)+2;return a<=10&&(y=-10),y};return e.onMounted(()=>{const a=document.querySelector(l).getBoundingClientRect(),{width:y,height:p}=a,f=10;let m=0;const t=g(p),s=g(y);let o=0;const r=document.querySelector(".read-tip-container").getBoundingClientRect();switch(n.appendToBody&&(m=a.y+document.documentElement.scrollTop,o=a.x),n.position){case"top":c.top=m-r.height-f+"px",c.left=o+s+"px";break;case"left":c.top=m+t+"px",c.left=o-r.width-f+"px";break;case"bottom":c.top=m+a.height+f+"px",c.left=o+s+"px";break;case"right":c.top=m+t+"px",c.left=o+a.width+f+"px";break}}),()=>e.createVNode(e.Teleport,{to:n.appendToBody?"body":l},{default:()=>{var a;return[e.createVNode("div",{ref:B,class:["read-tip-container",n.position,n.overlayClassName],style:c},[e.createVNode("span",{class:"after"},null),n.contentTemplate?(a=v.slots)==null?void 0:a.default():e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"title"},[n.title]),e.createVNode("div",{class:"content"},[n.content])])])]}})}}),C=e.defineComponent({name:"DReadTip",props:d,emits:[],setup(h,v){const n=T(T({},{trigger:"hover",showAnimate:!1,mouseenterTime:100,mouseleaveTime:100,position:"top",overlayClassName:"",appendToBody:!0,rules:{selector:null}}),h.readTipOptions),l=e.ref(null),c=t=>()=>{setTimeout(()=>{if(t.id){const s=p.find(o=>o.id===t.id);s.status=!0}t.status=!0},t.mouseenterTime||n.mouseenterTime)},B=t=>()=>{setTimeout(()=>{if(t.id){const s=p.find(o=>o.id===t.id);s.status=!1}t.status=!1},t.mouseleaveTime||n.mouseleaveTime)},g=(t,s="hover")=>(t.map(o=>{o.status=!1,s=o.trigger||s,o.overlayClassName=o.overlayClassName||n.overlayClassName,o.position=o.position||n.position,o.contentTemplate=!!v.slots.contentTemplate,"appendToBody"in o||(o.appendToBody=n.appendToBody),[...l.value.querySelectorAll(o.selector)].map((N,V)=>{o.appendToBody===!1&&(N.style.position="relative");let u=e.reactive({id:null});const R=o.selector.slice(o.selector[0]==="."?1:0)+V;V>0&&(u=T({},o),N.id=R,u.id=R,t.push(u)),s==="hover"&&(N.addEventListener("mouseenter",c(u.id?u:o)),N.addEventListener("mouseleave",B(u.id?u:o)))})}),t);function a(t,s){s.status=!0}const y=t=>{if(t!==null)return typeof t=="object"&&!Array.isArray(t)&&(t=[t]),t=[...t],Array.isArray(t)&&t.map(s=>{s.status=!1}),t},p=e.reactive(y(n.rules)),f=()=>{p.forEach(t=>{t.status=!1})};e.onMounted(()=>{g(p,n.trigger),document.addEventListener("click",f,!0)}),e.onUnmounted(()=>{document.removeEventListener("click",f)});const m=t=>{for(const s of p){const o=l.value.querySelectorAll(s.selector);for(const r of o)if(o.length>1){if(r===t.target&&s.id){a(r,s);return}else if(r===t.target&&!s.id&&!r.id){a(r,s);return}}else if(r===t.target){a(r,s);return}else s.status=!1}};return()=>{var t;return e.createVNode("div",{class:"devui-read-tip"},[e.createVNode("div",{ref:l,onClick:m},[(t=v.slots)==null?void 0:t.default()]),p.map(s=>e.createVNode("div",{"data-test":"todo"},[s.status&&e.createVNode(A,{defaultTemplateProps:T({},s)},{default:()=>{var o;return[s.contentTemplate&&((o=v.slots)==null?void 0:o.contentTemplate())]}})]))])}}}),S={title:"ReadTip \u9605\u8BFB\u63D0\u793A",category:"\u53CD\u9988",status:"100%",install(h){h.component(C.name,C)}};i.ReadTip=C,i.default=S,i.readTipProps=d,Object.defineProperty(i,"__esModule",{value:!0}),i[Symbol.toStringTag]="Module"});
|
package/result/index.es.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
import { defineComponent, createVNode } from "vue";
|
|
1
|
+
import { defineComponent, toRefs, createVNode } from "vue";
|
|
18
2
|
const resultProps = {
|
|
19
3
|
icon: {
|
|
20
4
|
type: String,
|
|
@@ -29,50 +13,51 @@ const resultProps = {
|
|
|
29
13
|
default: ""
|
|
30
14
|
}
|
|
31
15
|
};
|
|
16
|
+
const iconProps = {
|
|
17
|
+
name: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "",
|
|
20
|
+
required: true
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "inherit"
|
|
25
|
+
},
|
|
26
|
+
color: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: "inherit"
|
|
29
|
+
},
|
|
30
|
+
classPrefix: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: "icon"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
32
35
|
var Icon = defineComponent({
|
|
33
36
|
name: "DIcon",
|
|
34
|
-
props:
|
|
35
|
-
name: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: true
|
|
38
|
-
},
|
|
39
|
-
size: {
|
|
40
|
-
type: String,
|
|
41
|
-
default: "inherit"
|
|
42
|
-
},
|
|
43
|
-
color: {
|
|
44
|
-
type: String,
|
|
45
|
-
default: "inherit"
|
|
46
|
-
},
|
|
47
|
-
classPrefix: {
|
|
48
|
-
type: String,
|
|
49
|
-
default: "icon"
|
|
50
|
-
}
|
|
51
|
-
},
|
|
37
|
+
props: iconProps,
|
|
52
38
|
setup(props) {
|
|
53
|
-
return __spreadValues({}, props);
|
|
54
|
-
},
|
|
55
|
-
render() {
|
|
56
39
|
const {
|
|
57
40
|
name,
|
|
58
41
|
size,
|
|
59
42
|
color,
|
|
60
43
|
classPrefix
|
|
61
|
-
} =
|
|
62
|
-
return
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
44
|
+
} = toRefs(props);
|
|
45
|
+
return () => {
|
|
46
|
+
return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
|
|
47
|
+
"src": name.value,
|
|
48
|
+
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
49
|
+
"style": {
|
|
50
|
+
width: size.value,
|
|
51
|
+
verticalAlign: "text-bottom"
|
|
52
|
+
}
|
|
53
|
+
}, null) : createVNode("i", {
|
|
54
|
+
"class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
|
|
55
|
+
"style": {
|
|
56
|
+
fontSize: size.value,
|
|
57
|
+
color: color.value
|
|
58
|
+
}
|
|
59
|
+
}, null);
|
|
60
|
+
};
|
|
76
61
|
}
|
|
77
62
|
});
|
|
78
63
|
var result = "";
|
|
@@ -105,15 +90,12 @@ var Result = defineComponent({
|
|
|
105
90
|
};
|
|
106
91
|
}
|
|
107
92
|
});
|
|
108
|
-
Result.install = function(app) {
|
|
109
|
-
app.component(Result.name, Result);
|
|
110
|
-
};
|
|
111
93
|
var index = {
|
|
112
94
|
title: "Result \u7ED3\u679C",
|
|
113
95
|
category: "\u53CD\u9988",
|
|
114
96
|
status: "100%",
|
|
115
97
|
install(app) {
|
|
116
|
-
app.
|
|
98
|
+
app.component(Result.name, Result);
|
|
117
99
|
}
|
|
118
100
|
};
|
|
119
|
-
export { Result, index as default };
|
|
101
|
+
export { Result, index as default, resultProps };
|
package/result/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(s,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(s=typeof globalThis!="undefined"?globalThis:s||self,e(s.index={},s.Vue))})(this,function(s,e){"use strict";const u={icon:{type:String,default:"info"},title:{type:String,default:""},desc:{type:String,default:""}},c={name:{type:String,default:"",required:!0},size:{type:String,default:"inherit"},color:{type:String,default:"inherit"},classPrefix:{type:String,default:"icon"}};var f=e.defineComponent({name:"DIcon",props:c,setup(i){const{name:t,size:n,color:l,classPrefix:o}=e.toRefs(i);return()=>/^((https?):)?\/\//.test(t.value)?e.createVNode("img",{src:t.value,alt:t.value.split("/")[t.value.split("/").length-1],style:{width:n.value,verticalAlign:"text-bottom"}},null):e.createVNode("i",{class:`${o.value} ${o.value}-${t.value}`,style:{fontSize:n.value,color:l.value}},null)}}),v="",r=e.defineComponent({name:"DResult",props:u,setup(i,t){let n;return function(l){l.success="right-o",l.danger="error-o",l.warning="warning-o",l.info="info-o"}(n||(n={})),()=>{var l,o,a,d;return e.createVNode("div",{class:"devui-result"},[t.slots.icon?e.createVNode("div",null,[(l=t.slots)==null?void 0:l.icon()]):e.createVNode(f,{name:n[i.icon]||"",class:`devui-result__icon-${i.icon}`,size:"64px"},null),e.createVNode("div",{class:"devui-result__title"},[t.slots.title?(o=t.slots)==null?void 0:o.title():i.title]),e.createVNode("div",{class:"devui-result__desc"},[t.slots.desc?(a=t.slots)==null?void 0:a.desc():i.desc]),e.createVNode("div",{class:"devui-result__extra"},[t.slots.extra?(d=t.slots)==null?void 0:d.extra():""])])}}}),p={title:"Result \u7ED3\u679C",category:"\u53CD\u9988",status:"100%",install(i){i.component(r.name,r)}};s.Result=r,s.default=p,s.resultProps=u,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
|
package/ripple/index.es.js
CHANGED
|
@@ -19,9 +19,9 @@ const DEFAULT_PLUGIN_OPTIONS = {
|
|
|
19
19
|
color: "currentColor",
|
|
20
20
|
initialOpacity: 0.2,
|
|
21
21
|
finalOpacity: 0.1,
|
|
22
|
-
duration:
|
|
22
|
+
duration: 400,
|
|
23
23
|
easing: "ease-out",
|
|
24
|
-
|
|
24
|
+
delay: 75,
|
|
25
25
|
disabled: false
|
|
26
26
|
};
|
|
27
27
|
const createContainer = ({
|
|
@@ -53,7 +53,7 @@ const createrippleElement = (x, y, size, options) => {
|
|
|
53
53
|
rippleElement.style.borderRadius = "50%";
|
|
54
54
|
rippleElement.style.opacity = `${options.initialOpacity}`;
|
|
55
55
|
rippleElement.style.transform = `translate(-50%,-50%) scale(0)`;
|
|
56
|
-
rippleElement.style.transition = `transform ${options.duration}s ${options.easing}, opacity ${options.duration}s ${options.easing}`;
|
|
56
|
+
rippleElement.style.transition = `transform ${options.duration / 1e3}s ${options.easing}, opacity ${options.duration / 1e3}s ${options.easing}`;
|
|
57
57
|
return rippleElement;
|
|
58
58
|
};
|
|
59
59
|
function magnitude(x1, y1, x2, y2) {
|
|
@@ -73,6 +73,13 @@ const getRelativePointer = ({ x, y }, { top, left }) => ({
|
|
|
73
73
|
y: y - top
|
|
74
74
|
});
|
|
75
75
|
const RIPPLE_COUNT = "vRippleCountInternal";
|
|
76
|
+
function setRippleCount(el, count) {
|
|
77
|
+
el.dataset[RIPPLE_COUNT] = count.toString();
|
|
78
|
+
}
|
|
79
|
+
function getRippleCount(el) {
|
|
80
|
+
var _a;
|
|
81
|
+
return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
|
|
82
|
+
}
|
|
76
83
|
function incrementRippleCount(el) {
|
|
77
84
|
const count = getRippleCount(el);
|
|
78
85
|
setRippleCount(el, count + 1);
|
|
@@ -81,13 +88,6 @@ function decrementRippleCount(el) {
|
|
|
81
88
|
const count = getRippleCount(el);
|
|
82
89
|
setRippleCount(el, count - 1);
|
|
83
90
|
}
|
|
84
|
-
function setRippleCount(el, count) {
|
|
85
|
-
el.dataset[RIPPLE_COUNT] = count.toString();
|
|
86
|
-
}
|
|
87
|
-
function getRippleCount(el) {
|
|
88
|
-
var _a;
|
|
89
|
-
return parseInt((_a = el.dataset[RIPPLE_COUNT]) != null ? _a : "0", 10);
|
|
90
|
-
}
|
|
91
91
|
function deleteRippleCount(el) {
|
|
92
92
|
delete el.dataset[RIPPLE_COUNT];
|
|
93
93
|
}
|
|
@@ -99,27 +99,10 @@ const ripple = (event, el, options) => {
|
|
|
99
99
|
const size = MULTIPLE_NUMBER * getDistanceToFurthestCorner(x, y, rect);
|
|
100
100
|
const rippleContainer = createContainer(computedStyles);
|
|
101
101
|
const rippleEl = createrippleElement(x, y, size, options);
|
|
102
|
-
incrementRippleCount(el);
|
|
103
102
|
let originalPositionValue = "";
|
|
104
|
-
if (computedStyles.position === "static") {
|
|
105
|
-
if (el.style.position)
|
|
106
|
-
originalPositionValue = el.style.position;
|
|
107
|
-
el.style.position = "relative";
|
|
108
|
-
}
|
|
109
|
-
rippleContainer.appendChild(rippleEl);
|
|
110
|
-
el.appendChild(rippleContainer);
|
|
111
103
|
let shouldDissolveripple = false;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
document.removeEventListener("pointerup", releaseripple);
|
|
115
|
-
document.removeEventListener("pointercancel", releaseripple);
|
|
116
|
-
}
|
|
117
|
-
if (shouldDissolveripple)
|
|
118
|
-
dissolveripple();
|
|
119
|
-
else
|
|
120
|
-
shouldDissolveripple = true;
|
|
121
|
-
};
|
|
122
|
-
const dissolveripple = () => {
|
|
104
|
+
let token = null;
|
|
105
|
+
function dissolveripple() {
|
|
123
106
|
rippleEl.style.transition = "opacity 150ms linear";
|
|
124
107
|
rippleEl.style.opacity = "0";
|
|
125
108
|
setTimeout(() => {
|
|
@@ -130,24 +113,44 @@ const ripple = (event, el, options) => {
|
|
|
130
113
|
el.style.position = originalPositionValue;
|
|
131
114
|
}
|
|
132
115
|
}, 150);
|
|
133
|
-
}
|
|
116
|
+
}
|
|
117
|
+
function releaseripple(e) {
|
|
118
|
+
if (typeof e !== "undefined") {
|
|
119
|
+
document.removeEventListener("pointerup", releaseripple);
|
|
120
|
+
document.removeEventListener("pointercancel", releaseripple);
|
|
121
|
+
}
|
|
122
|
+
if (shouldDissolveripple) {
|
|
123
|
+
dissolveripple();
|
|
124
|
+
} else {
|
|
125
|
+
shouldDissolveripple = true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function cancelripple() {
|
|
129
|
+
clearTimeout(token);
|
|
130
|
+
rippleContainer.remove();
|
|
131
|
+
document.removeEventListener("pointerup", releaseripple);
|
|
132
|
+
document.removeEventListener("pointercancel", releaseripple);
|
|
133
|
+
document.removeEventListener("pointercancel", cancelripple);
|
|
134
|
+
}
|
|
135
|
+
incrementRippleCount(el);
|
|
136
|
+
if (computedStyles.position === "static") {
|
|
137
|
+
if (el.style.position) {
|
|
138
|
+
originalPositionValue = el.style.position;
|
|
139
|
+
}
|
|
140
|
+
el.style.position = "relative";
|
|
141
|
+
}
|
|
142
|
+
rippleContainer.appendChild(rippleEl);
|
|
143
|
+
el.appendChild(rippleContainer);
|
|
134
144
|
document.addEventListener("pointerup", releaseripple);
|
|
135
145
|
document.addEventListener("pointercancel", releaseripple);
|
|
136
|
-
|
|
146
|
+
token = setTimeout(() => {
|
|
137
147
|
document.removeEventListener("pointercancel", cancelripple);
|
|
138
148
|
requestAnimationFrame(() => {
|
|
139
149
|
rippleEl.style.transform = `translate(-50%,-50%) scale(1)`;
|
|
140
150
|
rippleEl.style.opacity = `${options.finalOpacity}`;
|
|
141
|
-
setTimeout(() => releaseripple(), options.duration
|
|
151
|
+
setTimeout(() => releaseripple(), options.duration);
|
|
142
152
|
});
|
|
143
|
-
}, options.
|
|
144
|
-
const cancelripple = () => {
|
|
145
|
-
clearTimeout(token);
|
|
146
|
-
rippleContainer.remove();
|
|
147
|
-
document.removeEventListener("pointerup", releaseripple);
|
|
148
|
-
document.removeEventListener("pointercancel", releaseripple);
|
|
149
|
-
document.removeEventListener("pointercancel", cancelripple);
|
|
150
|
-
};
|
|
153
|
+
}, options.delay);
|
|
151
154
|
document.addEventListener("pointercancel", cancelripple);
|
|
152
155
|
};
|
|
153
156
|
const optionMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -158,10 +161,12 @@ var RippleDirective = {
|
|
|
158
161
|
optionMap.set(el, (_a = binding.value) != null ? _a : {});
|
|
159
162
|
el.addEventListener("pointerdown", (event) => {
|
|
160
163
|
const options = optionMap.get(el);
|
|
161
|
-
if (binding.value && binding.value.disabled)
|
|
164
|
+
if (binding.value && binding.value.disabled) {
|
|
162
165
|
return;
|
|
163
|
-
|
|
166
|
+
}
|
|
167
|
+
if (options === false) {
|
|
164
168
|
return;
|
|
169
|
+
}
|
|
165
170
|
ripple(event, el, __spreadValues(__spreadValues({}, globalOptions), options));
|
|
166
171
|
});
|
|
167
172
|
},
|
package/ripple/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var B=Object.defineProperty;var T=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var
|
|
1
|
+
var B=Object.defineProperty;var T=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable;var w=(s,r,l)=>r in s?B(s,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[r]=l,f=(s,r)=>{for(var l in r||(r={}))F.call(r,l)&&w(s,l,r[l]);if(T)for(var l of T(r))j.call(r,l)&&w(s,l,r[l]);return s};(function(s,r){typeof exports=="object"&&typeof module!="undefined"?r(exports):typeof define=="function"&&define.amd?define(["exports"],r):(s=typeof globalThis!="undefined"?globalThis:s||self,r(s.index={}))})(this,function(s){"use strict";const r={directive:"ripple",color:"currentColor",initialOpacity:.2,finalOpacity:.1,duration:400,easing:"ease-out",delay:75,disabled:!1},l=({borderTopLeftRadius:t,borderTopRightRadius:e,borderBottomLeftRadius:i,borderBottomRightRadius:o})=>{const n=document.createElement("div");return n.style.top="0",n.style.left="0",n.style.width="100%",n.style.height="100%",n.style.position="absolute",n.style.borderRadius=`${t} ${e} ${o} ${i}`,n.style.overflow="hidden",n.style.pointerEvents="none",n.style.webkitMaskImage="-webkit-radial-gradient(white, black)",n},M=(t,e,i,o)=>{const n=document.createElement("div");return n.style.position="absolute",n.style.width=`${i}px`,n.style.height=`${i}px`,n.style.top=`${e}px`,n.style.left=`${t}px`,n.style.background=o.color,n.style.borderRadius="50%",n.style.opacity=`${o.initialOpacity}`,n.style.transform="translate(-50%,-50%) scale(0)",n.style.transition=`transform ${o.duration/1e3}s ${o.easing}, opacity ${o.duration/1e3}s ${o.easing}`,n};function u(t,e,i,o){const n=t-i,a=e-o;return Math.sqrt(n*n+a*a)}function O(t,e,{width:i,height:o}){const n=u(t,e,0,0),a=u(t,e,i,0),d=u(t,e,0,o),g=u(t,e,i,o);return Math.max(n,a,d,g)}const P=({x:t,y:e},{top:i,left:o})=>({x:t-o,y:e-i}),y="vRippleCountInternal";function R(t,e){t.dataset[y]=e.toString()}function v(t){var e;return parseInt((e=t.dataset[y])!=null?e:"0",10)}function k(t){const e=v(t);R(t,e+1)}function I(t){const e=v(t);R(t,e-1)}function x(t){delete t.dataset[y]}const S=2.05,_=(t,e,i)=>{const o=e.getBoundingClientRect(),n=window.getComputedStyle(e),{x:a,y:d}=P(t,o),g=S*O(a,d,o),m=l(n),p=M(a,d,g,i);let h="",b=!1,$=null;function N(){p.style.transition="opacity 150ms linear",p.style.opacity="0",setTimeout(()=>{m.remove(),I(e),v(e)===0&&(x(e),e.style.position=h)},150)}function c(A){typeof A!="undefined"&&(document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",c)),b?N():b=!0}function C(){clearTimeout($),m.remove(),document.removeEventListener("pointerup",c),document.removeEventListener("pointercancel",c),document.removeEventListener("pointercancel",C)}k(e),n.position==="static"&&(e.style.position&&(h=e.style.position),e.style.position="relative"),m.appendChild(p),e.appendChild(m),document.addEventListener("pointerup",c),document.addEventListener("pointercancel",c),$=setTimeout(()=>{document.removeEventListener("pointercancel",C),requestAnimationFrame(()=>{p.style.transform="translate(-50%,-50%) scale(1)",p.style.opacity=`${i.finalOpacity}`,setTimeout(()=>c(),i.duration)})},i.delay),document.addEventListener("pointercancel",C)},E=new WeakMap,D=f({},r);var L={mounted(t,e){var i;E.set(t,(i=e.value)!=null?i:{}),t.addEventListener("pointerdown",o=>{const n=E.get(t);e.value&&e.value.disabled||n!==!1&&_(o,t,f(f({},D),n))})},updated(t,e){var i;E.set(t,(i=e.value)!=null?i:{})}},U={title:"Ripple \u6C34\u6CE2\u7EB9",category:"\u901A\u7528",status:"100%",install(t){t.directive("Ripple",L)}};s.RippleDirective=L,s.default=U,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
|
package/search/index.es.js
CHANGED
|
@@ -5723,6 +5723,16 @@ var Search = defineComponent({
|
|
|
5723
5723
|
ctx.emit("update:modelValue", event);
|
|
5724
5724
|
};
|
|
5725
5725
|
return () => {
|
|
5726
|
+
const inputProps2 = {
|
|
5727
|
+
size: props.size,
|
|
5728
|
+
disabled: props.disabled,
|
|
5729
|
+
autoFocus: props.autoFocus,
|
|
5730
|
+
modelValue: keywords.value,
|
|
5731
|
+
placeholder: props.placeholder,
|
|
5732
|
+
cssClass: props.cssClass,
|
|
5733
|
+
onKeydown: onInputKeydown,
|
|
5734
|
+
"onUpdate:modelValue": onInputUpdate
|
|
5735
|
+
};
|
|
5726
5736
|
return createVNode("div", {
|
|
5727
5737
|
"class": rootClasses.value
|
|
5728
5738
|
}, [props.iconPosition === "left" && createVNode("div", {
|
|
@@ -5732,17 +5742,7 @@ var Search = defineComponent({
|
|
|
5732
5742
|
"name": "search",
|
|
5733
5743
|
"size": "inherit",
|
|
5734
5744
|
"key": "search"
|
|
5735
|
-
}, null)]), createVNode(DInput, {
|
|
5736
|
-
"size": props.size,
|
|
5737
|
-
"disabled": props.disabled,
|
|
5738
|
-
"autoFocus": props.autoFocus,
|
|
5739
|
-
"modelValue": keywords.value,
|
|
5740
|
-
"maxLength": props.maxLength,
|
|
5741
|
-
"placeholder": props.placeholder,
|
|
5742
|
-
"cssClass": props.cssClass,
|
|
5743
|
-
"onKeydown": onInputKeydown,
|
|
5744
|
-
"onUpdate:modelValue": onInputUpdate
|
|
5745
|
-
}, null), clearIconShow.value && createVNode("div", {
|
|
5745
|
+
}, null)]), createVNode(DInput, inputProps2, null), clearIconShow.value && createVNode("div", {
|
|
5746
5746
|
"class": "devui-search__clear",
|
|
5747
5747
|
"onClick": onClearHandle
|
|
5748
5748
|
}, [createVNode(resolveComponent("d-icon"), {
|
|
@@ -5760,15 +5760,12 @@ var Search = defineComponent({
|
|
|
5760
5760
|
};
|
|
5761
5761
|
}
|
|
5762
5762
|
});
|
|
5763
|
-
Search.install = function(app) {
|
|
5764
|
-
app.component(Search.name, Search);
|
|
5765
|
-
};
|
|
5766
5763
|
var index = {
|
|
5767
5764
|
title: "Search \u641C\u7D22\u6846",
|
|
5768
5765
|
category: "\u901A\u7528",
|
|
5769
5766
|
status: "100%",
|
|
5770
5767
|
install(app) {
|
|
5771
|
-
app.
|
|
5768
|
+
app.component(Search.name, Search);
|
|
5772
5769
|
}
|
|
5773
5770
|
};
|
|
5774
|
-
export { Search, index as default };
|
|
5771
|
+
export { Search, index as default, searchProps };
|