ct-component-plus 0.0.42 → 0.0.43
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/package.json +36 -36
- package/packages/components/button/index.js +8 -8
- package/packages/components/button/src/button.vue +171 -171
- package/packages/components/cascader/index.js +7 -7
- package/packages/components/cascader/src/cascader.vue +247 -247
- package/packages/components/cascader/src/ct-cascader.vue +260 -260
- package/packages/components/cascader/src/index.js +50 -50
- package/packages/components/checkbox/index.js +7 -7
- package/packages/components/checkbox/src/checkbox.vue +51 -51
- package/packages/components/checkbox/src/index.js +12 -12
- package/packages/components/date-picker/index.js +8 -8
- package/packages/components/date-picker/src/clear-icon.vue +2 -2
- package/packages/components/date-picker/src/date-icon.vue +2 -2
- package/packages/components/date-picker/src/date-picker.vue +77 -77
- package/packages/components/date-picker/src/index.js +33 -33
- package/packages/components/dialog/index.js +8 -8
- package/packages/components/dialog/src/dialog.vue +103 -103
- package/packages/components/empty/index.js +8 -8
- package/packages/components/empty/src/empty.vue +97 -97
- package/packages/components/index.js +81 -81
- package/packages/components/input/index.js +7 -7
- package/packages/components/input/src/index.js +13 -13
- package/packages/components/input/src/input.vue +106 -106
- package/packages/components/input-range/index.js +7 -7
- package/packages/components/input-range/src/index.js +29 -29
- package/packages/components/input-range/src/input-range.vue +233 -233
- package/packages/components/loading/index.js +7 -7
- package/packages/components/loading/src/CtLoading.vue +74 -74
- package/packages/components/loading/src/beating.vue +71 -71
- package/packages/components/loading/src/progress.vue +120 -120
- package/packages/components/loading/src/spinner.vue +38 -38
- package/packages/components/menu/index.js +7 -7
- package/packages/components/menu/src/item.vue +46 -46
- package/packages/components/menu/src/link.vue +28 -28
- package/packages/components/menu/src/logo.vue +25 -25
- package/packages/components/menu/src/menu-item.vue +103 -103
- package/packages/components/menu/src/menu.vue +191 -191
- package/packages/components/menu/src/utils/index.js +4 -4
- package/packages/components/message/icon/ErrorIcon.vue +25 -25
- package/packages/components/message/icon/InfoIcon.vue +25 -25
- package/packages/components/message/icon/SuccessIcon.vue +25 -25
- package/packages/components/message/icon/WarningIcon.vue +25 -25
- package/packages/components/message/index.js +8 -8
- package/packages/components/message/src/method.js +54 -54
- package/packages/components/message-box/index.js +7 -7
- package/packages/components/message-box/src/message-box.vue +107 -107
- package/packages/components/page/index.js +7 -7
- package/packages/components/page/src/modules/DownloadButton.vue +21 -21
- package/packages/components/page/src/modules/TableTitle.vue +151 -151
- package/packages/components/page/src/page.vue +382 -382
- package/packages/components/pagination/index.js +7 -7
- package/packages/components/pagination/src/pagination.vue +36 -36
- package/packages/components/radio/index.js +7 -7
- package/packages/components/radio/src/index.js +12 -12
- package/packages/components/radio/src/radio.vue +47 -47
- package/packages/components/search-box/index.js +24 -24
- package/packages/components/search-box/src/index.js +29 -29
- package/packages/components/search-box/src/search-box.vue +250 -251
- package/packages/components/search-box/src/slot.vue +4 -4
- package/packages/components/select/index.js +7 -7
- package/packages/components/select/src/arrow-down.vue +2 -2
- package/packages/components/select/src/clear-icon.vue +2 -2
- package/packages/components/select/src/empty.vue +13 -13
- package/packages/components/select/src/index.js +51 -51
- package/packages/components/select/src/select.vue +380 -380
- package/packages/components/table/index.js +7 -7
- package/packages/components/table/src/TableSort.vue +179 -179
- package/packages/components/table/src/index.js +70 -66
- package/packages/components/table/src/table.vue +287 -287
- package/packages/components/tabs/index.js +7 -7
- package/packages/components/tabs/src/tabs.vue +225 -225
- package/packages/components/year-select/index.js +7 -7
- package/packages/components/year-select/src/index.js +44 -44
- package/packages/components/year-select/src/year-select.vue +273 -273
- package/packages/echarts/bar/index.js +63 -63
- package/packages/echarts/base.js +99 -99
- package/packages/echarts/line/index.js +106 -106
- package/packages/hooks/index.js +5 -5
- package/packages/hooks/use-buried/index.js +46 -46
- package/packages/hooks/use-checked-all/index.js +37 -37
- package/packages/hooks/use-echarts/index.js +1 -1
- package/packages/hooks/use-echarts/use-bar/index.js +72 -72
- package/packages/hooks/use-echarts/use-line/index.js +88 -88
- package/packages/hooks/use-namespace/index.js +65 -65
- package/packages/hooks/use-search-component/index.js +28 -28
- package/packages/style/element.less +725 -725
- package/packages/style/index.js +2 -2
- package/packages/style/init.less +114 -114
- package/packages/utils/index.js +1 -1
- package/packages/utils/operate.js +77 -77
- package/packages/utils/types.js +35 -35
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import CtPagination from './src/pagination.vue';
|
|
2
|
-
|
|
3
|
-
/* istanbul ignore next */
|
|
4
|
-
CtPagination.install = function (Vue) {
|
|
5
|
-
Vue.component('CtPagination', CtPagination);
|
|
6
|
-
};
|
|
7
|
-
|
|
1
|
+
import CtPagination from './src/pagination.vue';
|
|
2
|
+
|
|
3
|
+
/* istanbul ignore next */
|
|
4
|
+
CtPagination.install = function (Vue) {
|
|
5
|
+
Vue.component('CtPagination', CtPagination);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
8
|
export default CtPagination;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-pagination
|
|
3
|
-
:layout="$attrs.layout || paginationLayout"
|
|
4
|
-
:background="background"
|
|
5
|
-
:class="{ [ns.b()]: true, 'have-border': !background && border }"
|
|
6
|
-
:pager-count="9"
|
|
7
|
-
/>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script setup>
|
|
11
|
-
import { computed } from "vue";
|
|
12
|
-
import { useNamespace } from "../../../hooks";
|
|
13
|
-
const props = defineProps({
|
|
14
|
-
border: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: true,
|
|
17
|
-
},
|
|
18
|
-
background: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false,
|
|
21
|
-
},
|
|
22
|
-
showJump: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
const ns = useNamespace("pagination");
|
|
28
|
-
const paginationLayout = computed(() => {
|
|
29
|
-
const layout = ["prev", "pager", "next"];
|
|
30
|
-
if (props.showJump) {
|
|
31
|
-
layout.push("jumper");
|
|
32
|
-
}
|
|
33
|
-
return layout.join(",");
|
|
34
|
-
});
|
|
35
|
-
</script>
|
|
36
|
-
<style lang='less'>
|
|
1
|
+
<template>
|
|
2
|
+
<el-pagination
|
|
3
|
+
:layout="$attrs.layout || paginationLayout"
|
|
4
|
+
:background="background"
|
|
5
|
+
:class="{ [ns.b()]: true, 'have-border': !background && border }"
|
|
6
|
+
:pager-count="9"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import { computed } from "vue";
|
|
12
|
+
import { useNamespace } from "../../../hooks";
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
border: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: true,
|
|
17
|
+
},
|
|
18
|
+
background: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false,
|
|
21
|
+
},
|
|
22
|
+
showJump: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
const ns = useNamespace("pagination");
|
|
28
|
+
const paginationLayout = computed(() => {
|
|
29
|
+
const layout = ["prev", "pager", "next"];
|
|
30
|
+
if (props.showJump) {
|
|
31
|
+
layout.push("jumper");
|
|
32
|
+
}
|
|
33
|
+
return layout.join(",");
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
36
|
+
<style lang='less'>
|
|
37
37
|
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import CtRadio from './src/radio.vue';
|
|
2
|
-
|
|
3
|
-
/* istanbul ignore next */
|
|
4
|
-
CtRadio.install = function (Vue) {
|
|
5
|
-
Vue.component('CtRadio', CtRadio);
|
|
6
|
-
};
|
|
7
|
-
|
|
1
|
+
import CtRadio from './src/radio.vue';
|
|
2
|
+
|
|
3
|
+
/* istanbul ignore next */
|
|
4
|
+
CtRadio.install = function (Vue) {
|
|
5
|
+
Vue.component('CtRadio', CtRadio);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
8
|
export default CtRadio;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { buriedParamsKey, searchComponentProps } from '../../../hooks';
|
|
2
|
-
|
|
3
|
-
export const radioEmits = ["update:modelValue", buriedParamsKey];
|
|
4
|
-
export const radioProps = {
|
|
5
|
-
...searchComponentProps,
|
|
6
|
-
modelValue: [String, Number, Boolean],
|
|
7
|
-
options: {
|
|
8
|
-
type: Array,
|
|
9
|
-
default() {
|
|
10
|
-
return []
|
|
11
|
-
}
|
|
12
|
-
}
|
|
1
|
+
import { buriedParamsKey, searchComponentProps } from '../../../hooks';
|
|
2
|
+
|
|
3
|
+
export const radioEmits = ["update:modelValue", buriedParamsKey];
|
|
4
|
+
export const radioProps = {
|
|
5
|
+
...searchComponentProps,
|
|
6
|
+
modelValue: [String, Number, Boolean],
|
|
7
|
+
options: {
|
|
8
|
+
type: Array,
|
|
9
|
+
default() {
|
|
10
|
+
return []
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
13
|
}
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-radio-group :class="[ns.b()]" v-model="showValue" ref="radioRef">
|
|
3
|
-
<el-radio
|
|
4
|
-
:class="[ns.e('item')]"
|
|
5
|
-
v-for="item in optionList"
|
|
6
|
-
:key="item.value"
|
|
7
|
-
:label="item.value"
|
|
8
|
-
:disabled="item.disabled"
|
|
9
|
-
>{{ item.label }}</el-radio
|
|
10
|
-
>
|
|
11
|
-
</el-radio-group>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup>
|
|
15
|
-
import { computed, onMounted, ref } from "vue";
|
|
16
|
-
import { useNamespace, useBuriedParams } from "../../../hooks";
|
|
17
|
-
import { radioEmits, radioProps } from "./index";
|
|
18
|
-
const props = defineProps(radioProps);
|
|
19
|
-
const emit = defineEmits(radioEmits);
|
|
20
|
-
|
|
21
|
-
const ns = useNamespace("radio");
|
|
22
|
-
const radioRef = ref(null);
|
|
23
|
-
const showValue = computed({
|
|
24
|
-
get() {
|
|
25
|
-
return props.modelValue;
|
|
26
|
-
},
|
|
27
|
-
set(newValue) {
|
|
28
|
-
emit("update:modelValue", newValue);
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
const optionList = computed(() => {
|
|
32
|
-
return props.options;
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
useBuriedParams(props, emit, {
|
|
36
|
-
getContent: (value) => {
|
|
37
|
-
const item = optionList.value.find((item) => item.value === value);
|
|
38
|
-
return item ? item.label : "";
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
defineExpose({
|
|
43
|
-
ref: radioRef,
|
|
44
|
-
});
|
|
45
|
-
onMounted(() => {});
|
|
46
|
-
</script>
|
|
47
|
-
<style lang='less'>
|
|
1
|
+
<template>
|
|
2
|
+
<el-radio-group :class="[ns.b()]" v-model="showValue" ref="radioRef">
|
|
3
|
+
<el-radio
|
|
4
|
+
:class="[ns.e('item')]"
|
|
5
|
+
v-for="item in optionList"
|
|
6
|
+
:key="item.value"
|
|
7
|
+
:label="item.value"
|
|
8
|
+
:disabled="item.disabled"
|
|
9
|
+
>{{ item.label }}</el-radio
|
|
10
|
+
>
|
|
11
|
+
</el-radio-group>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup>
|
|
15
|
+
import { computed, onMounted, ref } from "vue";
|
|
16
|
+
import { useNamespace, useBuriedParams } from "../../../hooks";
|
|
17
|
+
import { radioEmits, radioProps } from "./index";
|
|
18
|
+
const props = defineProps(radioProps);
|
|
19
|
+
const emit = defineEmits(radioEmits);
|
|
20
|
+
|
|
21
|
+
const ns = useNamespace("radio");
|
|
22
|
+
const radioRef = ref(null);
|
|
23
|
+
const showValue = computed({
|
|
24
|
+
get() {
|
|
25
|
+
return props.modelValue;
|
|
26
|
+
},
|
|
27
|
+
set(newValue) {
|
|
28
|
+
emit("update:modelValue", newValue);
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
const optionList = computed(() => {
|
|
32
|
+
return props.options;
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
useBuriedParams(props, emit, {
|
|
36
|
+
getContent: (value) => {
|
|
37
|
+
const item = optionList.value.find((item) => item.value === value);
|
|
38
|
+
return item ? item.label : "";
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
defineExpose({
|
|
43
|
+
ref: radioRef,
|
|
44
|
+
});
|
|
45
|
+
onMounted(() => {});
|
|
46
|
+
</script>
|
|
47
|
+
<style lang='less'>
|
|
48
48
|
</style>
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import CtSearchBox from './src/search-box.vue';
|
|
2
|
-
|
|
3
|
-
import CtInput from '../input';
|
|
4
|
-
import CtSelect from '../select';
|
|
5
|
-
import CtDatePicker from '../date-picker';
|
|
6
|
-
import CtCascader from '../cascader';
|
|
7
|
-
import CtYearSelect from '../year-select';
|
|
8
|
-
|
|
9
|
-
export const searchComponents = {
|
|
10
|
-
CtInput,
|
|
11
|
-
CtSelect,
|
|
12
|
-
CtDatePicker,
|
|
13
|
-
CtCascader,
|
|
14
|
-
CtYearSelect
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* istanbul ignore next */
|
|
18
|
-
CtSearchBox.install = function (Vue) {
|
|
19
|
-
Vue.component('CtSearchBox', CtSearchBox);
|
|
20
|
-
// for (const key in searchComponents) {
|
|
21
|
-
// Vue.component(key, searchComponents[key]);
|
|
22
|
-
// }
|
|
23
|
-
};
|
|
24
|
-
|
|
1
|
+
import CtSearchBox from './src/search-box.vue';
|
|
2
|
+
|
|
3
|
+
import CtInput from '../input';
|
|
4
|
+
import CtSelect from '../select';
|
|
5
|
+
import CtDatePicker from '../date-picker';
|
|
6
|
+
import CtCascader from '../cascader';
|
|
7
|
+
import CtYearSelect from '../year-select';
|
|
8
|
+
|
|
9
|
+
export const searchComponents = {
|
|
10
|
+
CtInput,
|
|
11
|
+
CtSelect,
|
|
12
|
+
CtDatePicker,
|
|
13
|
+
CtCascader,
|
|
14
|
+
CtYearSelect
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* istanbul ignore next */
|
|
18
|
+
CtSearchBox.install = function (Vue) {
|
|
19
|
+
Vue.component('CtSearchBox', CtSearchBox);
|
|
20
|
+
// for (const key in searchComponents) {
|
|
21
|
+
// Vue.component(key, searchComponents[key]);
|
|
22
|
+
// }
|
|
23
|
+
};
|
|
24
|
+
|
|
25
25
|
export default CtSearchBox;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
export const searchBoxEmits = [
|
|
3
|
-
"update:modelValue",
|
|
4
|
-
'update:searchParams',
|
|
5
|
-
'update:searchParamsCurrent',
|
|
6
|
-
'doSearch',
|
|
7
|
-
'doReset'
|
|
8
|
-
];
|
|
9
|
-
export const searchBoxProps = {
|
|
10
|
-
modelValue: Object,
|
|
11
|
-
rowNumber: {
|
|
12
|
-
type: Number,
|
|
13
|
-
default: 5,
|
|
14
|
-
},
|
|
15
|
-
searchList: {
|
|
16
|
-
type: Array,
|
|
17
|
-
default: () => {
|
|
18
|
-
return []
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
outerBorder: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: true,
|
|
24
|
-
},
|
|
25
|
-
haveReset: Boolean,
|
|
26
|
-
searchBtnName: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: '查询'
|
|
29
|
-
}
|
|
1
|
+
|
|
2
|
+
export const searchBoxEmits = [
|
|
3
|
+
"update:modelValue",
|
|
4
|
+
'update:searchParams',
|
|
5
|
+
'update:searchParamsCurrent',
|
|
6
|
+
'doSearch',
|
|
7
|
+
'doReset'
|
|
8
|
+
];
|
|
9
|
+
export const searchBoxProps = {
|
|
10
|
+
modelValue: Object,
|
|
11
|
+
rowNumber: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 5,
|
|
14
|
+
},
|
|
15
|
+
searchList: {
|
|
16
|
+
type: Array,
|
|
17
|
+
default: () => {
|
|
18
|
+
return []
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
outerBorder: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true,
|
|
24
|
+
},
|
|
25
|
+
haveReset: Boolean,
|
|
26
|
+
searchBtnName: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: '查询'
|
|
29
|
+
}
|
|
30
30
|
}
|