Commit f65ba74a by haojie

去掉部分没有使用的依赖

parent 6775b797
<!--
* @Author: walker.liu
* @Date: 2022-05-30 18:18:10
* @Copyright(C): 2019-2020 ZP Inc. All rights reserved.
-->
<template>
<div class="dimension-wrapper">
<t-radio-group class="dimension-group" v-model="radioCurrent" @change="changeDimension">
<t-radio-button v-for="item of radioOptions" :value="item.value" :key="item.value">{{
item.label
}}</t-radio-button>
</t-radio-group>
</div>
</template>
<script setup lang="tsx">
import { defineProps, defineEmits, computed, ref } from 'vue';
const props = defineProps({
current: [String, Number],
type: String,
options: {
type: Array,
default: () => [],
},
});
const radioCurrent = ref(props.current);
const radioOptions: any = computed(() => {
if (props.type === 'analysisDate') {
return [
{ label: '5M', value: '5m' },
{ label: '30M', value: '30m' },
{ label: '1H', value: '1h' },
{ label: '6H', value: '6h' },
{ label: '1D', value: '1d' },
];
} else if (props.options.length > 0) {
return props.options;
} else {
return [];
}
});
const emit = defineEmits(['update:current', 'change']);
const changeDimension = (v) => {
radioCurrent.value = v;
emit('update:current', v);
emit('change', v);
};
</script>
<!--
* @Author: walker.liu
* @Date: 2022-03-22 17:47:30
* @Copyright(C): 2019-2020 ZP Inc. All rights reserved.
-->
<template>
<icon v-bind="$attrs" :url="SVG_URL"></icon>
</template>
<script setup lang="ts">
import { Icon } from 'tdesign-icons-vue-next';
import { SVG_URL } from '@/config/global';
</script>
<template>
<div class="theme-change" @click="changeTheme">
<svg-icon v-if="Tmode === 'dark'" name="icon-night"></svg-icon>
<!-- <svg-icon v-else name="icon-night"></svg-icon> -->
<ThemeLight v-else></ThemeLight>
</div>
</template>
<script lang="ts" setup>
import { computed } from 'vue';
import STYLE_CONFIG from '@/config/style';
import SvgIcon from '@/components/SvgIcon.vue';
import { useStore } from 'vuex';
import ThemeLight from '@/assets/svg/home/theme-light.svg';
const store = useStore();
// 当前主题
const Tmode = computed(() => store.getters['setting/mode']);
const changeTheme = () => {
let mode = Tmode.value === 'dark' ? 'light' : 'dark';
store.dispatch('setting/changeTheme', {
...STYLE_CONFIG,
mode,
});
};
</script>
<style lang="less" scoped>
@import '@/style/flex.less';
.theme-change {
width: 32px;
height: 32px;
border-radius: 50%;
flex-shrink: 0;
.dja();
cursor: pointer;
&:hover {
background-color: var(--td-bg-color-container-hover);
}
.t-icon {
font-size: 20px;
}
}
</style>
<template>
<div class="">
<div class="custom_masking-box" v-if="modelValue">
{{ progress }}%&nbsp;
<t-loading size="small"></t-loading>
</div>
</div>
</template>
<script lang="ts" setup>
const props = defineProps<{
progress: number;
modelValue: boolean;
}>();
</script>
<style lang="less">
@import '@/style/flex.less';
.custom_masking-box {
position: absolute;
top: 0;
width: 100%;
height: 100%;
.dja();
background: rgba(60, 60, 60, 0.2);
color: var(--theme-color-2);
}
</style>
...@@ -3,14 +3,9 @@ ...@@ -3,14 +3,9 @@
*/ */
import { import {
Layout as TLayout, Layout as TLayout,
Header as THeader,
HeadMenu as THeadMenu,
Content as TContent, Content as TContent,
Footer as TFooter,
Button as TButton, Button as TButton,
Select as TSelect, Select as TSelect,
RadioGroup as TRadioGroup,
RadioButton as TRadioButton,
Option as TOption, Option as TOption,
Pagination as TPagination, Pagination as TPagination,
Table as TTable, Table as TTable,
...@@ -19,26 +14,17 @@ import { ...@@ -19,26 +14,17 @@ import {
Switch as TSwitch, Switch as TSwitch,
FormItem as TFormItem, FormItem as TFormItem,
Dialog as TDialog, Dialog as TDialog,
Loading as TLoading,
Icon as TIcon,
Checkbox as TCheckbox, Checkbox as TCheckbox,
Popup as TPopup, Popup as TPopup,
Progress as TProgress, Progress as TProgress,
Upload as TUpload, Upload as TUpload,
Swiper as TSwiper,
SwiperItem as TSwiperItem,
} from 'tdesign-vue-next'; } from 'tdesign-vue-next';
const components = [ const components = [
TLayout, TLayout,
THeader,
THeadMenu,
TContent, TContent,
TFooter,
TButton, TButton,
TSelect, TSelect,
TRadioGroup,
TRadioButton,
TOption, TOption,
TPagination, TPagination,
TForm, TForm,
...@@ -46,16 +32,13 @@ const components = [ ...@@ -46,16 +32,13 @@ const components = [
TInput, TInput,
TSwitch, TSwitch,
TDialog, TDialog,
TLoading,
TCheckbox, TCheckbox,
TPopup, TPopup,
TProgress, TProgress,
TUpload, TUpload,
TSwiper,
TSwiperItem,
]; ];
// 无法循环挂载的组件--单独拎出来 // 无法循环挂载的组件--单独拎出来
const oncomponents = [TTable, TIcon]; const oncomponents = [TTable];
export default { export default {
install(app) { install(app) {
components.forEach((component, index) => { components.forEach((component, index) => {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,9 +10,6 @@ import path from 'path'; ...@@ -10,9 +10,6 @@ import path from 'path';
import { visualizer } from 'rollup-plugin-visualizer'; import { visualizer } from 'rollup-plugin-visualizer';
// import importToCDN from 'vite-plugin-cdn-import'; // import importToCDN from 'vite-plugin-cdn-import';
// cdn https://unpkg.com/tdesign-vue-next@0.22.1/dist/tdesign.min.js
// https://unpkg.com/tdesign-vue-next@0.22.1/dist/tdesign.min.css
export default defineConfig(({ command, mode }) => { export default defineConfig(({ command, mode }) => {
// https://m.coinwg.com 测试服务器 // https://m.coinwg.com 测试服务器
// https://tidrk.com/ // https://tidrk.com/
...@@ -39,12 +36,12 @@ export default defineConfig(({ command, mode }) => { ...@@ -39,12 +36,12 @@ export default defineConfig(({ command, mode }) => {
}), }),
// viteCompression(), // viteCompression(),
// 打包体积分析 // 打包体积分析
// visualizer({ visualizer({
// open: true, //注意这里要设置为true,否则无效 open: true, //注意这里要设置为true,否则无效
// filename: 'stats.html', //分析图生成的文件名 filename: 'stats.html', //分析图生成的文件名
// gzipSize: true, // 收集 gzip 大小并将其显示 gzipSize: true, // 收集 gzip 大小并将其显示
// brotliSize: true, // 收集 brotli 大小并将其显示 brotliSize: true, // 收集 brotli 大小并将其显示
// }), }),
// importToCDN({ // importToCDN({
// modules: [ // modules: [
// { // {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment