提交 218e6867 authored 作者: lidongxu's avatar lidongxu

refactor(all): 重构所有 .sync 换成 v-model: 写法

同上
上级 2a16818c
......@@ -41,8 +41,8 @@
</template>
</el-tree>
<!-- 分页 -->
<pagination v-if="isPagination" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getPageList" />
<pagination v-if="isPagination" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getPageList" />
<!-- 折叠箭头 -->
<div class="arrow"
@click="hideSideBar = false">
......
<template>
<div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
<div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
<sidebar v-if="!sidebar.hide" class="sidebar-container" />
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
<div :class="classObj"
class="app-wrapper"
:style="{ '--current-color': theme }">
<div v-if="device === 'mobile' && sidebar.opened"
class="drawer-bg"
@click="handleClickOutside" />
<sidebar v-if="!sidebar.hide"
class="sidebar-container" />
<div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
class="main-container">
<div :class="{ 'fixed-header': fixedHeader }">
<navbar @setLayout="setLayout" />
<tags-view v-if="needTagsView" />
......@@ -17,7 +23,6 @@
import { useWindowSize } from '@vueuse/core'
import Sidebar from './components/Sidebar/index.vue'
import { AppMain, Navbar, Settings, TagsView } from './components'
import defaultSettings from '@/settings'
import useAppStore from '@/store/modules/app'
import useSettingsStore from '@/store/modules/settings'
......@@ -65,11 +70,12 @@ function setLayout() {
}
</script>
<style lang="scss" scoped>
<style lang="scss"
scoped>
@import "@/assets/styles/mixin.scss";
@import "@/assets/styles/variables.module.scss";
.app-wrapper {
.app-wrapper {
@include clearfix;
position: relative;
height: 100%;
......@@ -79,9 +85,9 @@ function setLayout() {
position: fixed;
top: 0;
}
}
}
.drawer-bg {
.drawer-bg {
background: #000;
opacity: 0.3;
width: 100%;
......@@ -89,31 +95,31 @@ function setLayout() {
height: 100%;
position: absolute;
z-index: 999;
}
}
.fixed-header {
.fixed-header {
position: fixed;
top: 0;
right: 0;
z-index: 9;
width: calc(100% - #{$base-sidebar-width});
transition: width 0.28s;
}
}
// 开启头部固定以后,main的高度需要设置为100vh
.fixed-header + .app-main{
// 开启头部固定以后,main的高度需要设置为100vh
.fixed-header+.app-main {
min-height: 100vh;
}
}
.hideSidebar .fixed-header {
.hideSidebar .fixed-header {
width: calc(100% - 54px);
}
}
.sidebarHide .fixed-header {
.sidebarHide .fixed-header {
width: 100%;
}
}
.mobile .fixed-header {
.mobile .fixed-header {
width: 100%;
}
}
</style>
\ No newline at end of file
......@@ -63,7 +63,6 @@ import LineCharts from './LineAndBar.vue'
import { getCmmListAPI } from '@/api'
import { generatorDayList, parseTime, getAdditionalColor, resetObjValue } from '@/utils'
import { useDatePickerOptions } from '@/hooks'
// 静态数据
const dateList = [new Date().setDate((new Date().getDate() - 30)), new Date().setDate((new Date().getDate() - 1))] // 最近 30 日日期数组
const dataTypeList = ['销售额', '观看人次'] // 数据类型
......
......@@ -75,7 +75,6 @@ import TableList from './TableList.vue';
import { getComPrdListAPI, getSycmListAPI } from '@/api'
import { generatorDayList, parseTime, getAdditionalColor, resetObjValue } from '@/utils'
import { useDatePickerOptions } from '@/hooks'
// 静态数据
const dateList = [new Date().setDate((new Date().getDate() - 30)), new Date().setDate((new Date().getDate() - 1))] // 最近 30 日日期数组
const dataTypeList = ['支付买家数', '交易增速', '独立访客范围', '流量增速'] // 数据类型
......
......@@ -52,7 +52,7 @@
<el-row :gutter="10"
class="mb8">
<right-toolbar :showSearch.sync="showSearch"
<right-toolbar v-model:showSearch="showSearch"
@queryTable="getProductList"
:columns="columns"></right-toolbar>
</el-row>
......@@ -167,7 +167,6 @@ const getProductList = () => {
}
/** 搜索表单触发操作 */
const handleQuery = () => {
console.log('queryParams', queryParams)
queryParams.pageNum = 1;
getProductList();
}
......
......@@ -42,7 +42,7 @@
</el-table>
<!-- 添加或修改商品-标签详情对话框 -->
<el-dialog :title="title"
:visible.sync="open"
v-model:visible="open"
append-to-body>
<el-form ref="formRef"
:model="form"
......
......@@ -262,7 +262,7 @@
@click="createTableAndECharts">新增套表</div>
<!-- 上传货需弹框 -->
<el-dialog title="上传货需"
:visible.sync="uploadDemandImportVisible">
v-model:visible="uploadDemandImportVisible">
<el-form :model="uploadDemand"
label-width="150px">
<el-form-item label="年份">
......
......@@ -49,7 +49,7 @@
@click="handleAdd"
v-hasPermi="['gen:store:add']">新增</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch"
<right-toolbar v-model:showSearch="showSearch"
@queryTable="getList"
:columns="columns"></right-toolbar>
</el-row>
......@@ -104,13 +104,13 @@
</el-table>
<pagination v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList" />
<!-- 添加或修改对话框 -->
<el-dialog :title="title"
:visible.sync="open"
v-model:visible="open"
append-to-body>
<el-form ref="form"
:model="form"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论