fix: merge
This commit is contained in:
commit
ea151386b9
|
@ -17,12 +17,18 @@ module.exports = {
|
|||
'perf', // 性能优化
|
||||
]
|
||||
],
|
||||
'type-case': [0],
|
||||
'type-empty': [0],
|
||||
'scope-empty': [0],
|
||||
'scope-case': [0],
|
||||
'subject-full-stop': [0, 'never'],
|
||||
'subject-case': [0, 'never'],
|
||||
'header-max-length': [0, 'always', 72]
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
{
|
||||
rules: {
|
||||
"commit-rule": ({ raw }) => {
|
||||
return [
|
||||
/^\[(build|feat|fix|update|refactor|docs|chore|style|revert|perf)].+/g.test(raw),
|
||||
`commit备注信息格式错误,格式为 <[type] 修改内容>,type支持${types.join(",")}`
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -46,6 +46,8 @@ declare module '@vue/runtime-core' {
|
|||
PermissionButton: typeof import('./src/components/PermissionButton/index.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
SearchItem: typeof import('./src/components/Search/Item.vue')['default']
|
||||
SearchSearch: typeof import('./src/components/Search/Search.vue')['default']
|
||||
Table: typeof import('./src/components/Table/index.vue')['default']
|
||||
TitleComponent: typeof import('./src/components/TitleComponent/index.vue')['default']
|
||||
ValueItem: typeof import('./src/components/ValueItem/index.vue')['default']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export default {
|
||||
theme: {
|
||||
'primary-color': '#00A4FF',
|
||||
'primary-color': '#1d39c4',
|
||||
},
|
||||
logo: '/favicon.ico',
|
||||
title: 'Jetlinks'
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
import server from '@/utils/request'
|
||||
|
||||
export const queryNoPagingPost = (data: any) => server.post(`/device-product/_query/no-paging?paging=false`, data)
|
|
@ -241,7 +241,7 @@ watch(props.initValue, (newValue: any) => {
|
|||
})
|
||||
|
||||
defineExpose({
|
||||
resetModel,
|
||||
reset: resetModel,
|
||||
formValidate,
|
||||
setItemValue,
|
||||
setData
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<a-button v-else v-bind="buttonProps" :disabled="_isPermission"></a-button>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
<script setup lang="ts" name="PermissionButton">
|
||||
import type { ButtonProps, TooltipProps, PopconfirmProps } from 'ant-design-vue'
|
||||
import { usePermissionStore } from '@/store/permission';
|
||||
|
||||
|
|
|
@ -0,0 +1,125 @@
|
|||
<template>
|
||||
<div class='JSearch-item'>
|
||||
<div class='JSearch-item--type'>
|
||||
<a-select
|
||||
v-if='index !== 1 && index !== 4'
|
||||
:options='typeOptions'
|
||||
v-model:value='termsModel.type'
|
||||
style='width: 100%;'
|
||||
/>
|
||||
<span v-else>
|
||||
{{
|
||||
index === 1 ? '第一组' : '第二组'
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
<a-select
|
||||
class='JSearch-item--column'
|
||||
:options='columnOptions'
|
||||
v-model:value='termsModel.column'
|
||||
/>
|
||||
<a-select
|
||||
class='JSearch-item--termType'
|
||||
:options='termTypeOptions'
|
||||
v-model:value='termsModel.termType'
|
||||
/>
|
||||
<div class='JSearch-item--value'>
|
||||
<a-input
|
||||
v-if='component === componentType.input'
|
||||
v-model:value='termsModel.value'
|
||||
/>
|
||||
<a-select
|
||||
v-else-if='component === componentType.select'
|
||||
v-model:value='termsModel.value'
|
||||
:options='options'
|
||||
/>
|
||||
<a-inputnumber
|
||||
v-else-if='component === componentType.inputNumber'
|
||||
v-model:value='termsModel.value'
|
||||
/>
|
||||
<a-input-password
|
||||
v-else-if='component === componentType.password'
|
||||
v-model:value='termsModel.value'
|
||||
/>
|
||||
<a-switch
|
||||
v-else-if='component === componentType.switch'
|
||||
v-model:checked='termsModel.value'
|
||||
/>
|
||||
<a-radio-group
|
||||
v-else-if='component === componentType.radio'
|
||||
v-model:value='termsModel.value'
|
||||
/>
|
||||
<a-checkbox-group
|
||||
v-else-if='component === componentType.checkbox'
|
||||
v-model:value='termsModel.value'
|
||||
:options='options'
|
||||
/>
|
||||
<a-time-picker
|
||||
v-else-if='component === componentType.time'
|
||||
v-model:value='termsModel.value'
|
||||
/>
|
||||
<a-date-picker
|
||||
v-else-if='component === componentType.date'
|
||||
v-model:value='termsModel.value'
|
||||
/>
|
||||
<a-tree-select
|
||||
v-else-if='component === componentType.tree'
|
||||
v-model:value='termsModel.value'
|
||||
:tree-data='options'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts' name='SearchItem'>
|
||||
import { componentType } from 'components/Form'
|
||||
import { typeOptions } from './util'
|
||||
|
||||
const props = defineProps({
|
||||
component: {
|
||||
type: String,
|
||||
default: componentType.input
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: 1
|
||||
}
|
||||
})
|
||||
|
||||
const termsModel = reactive({})
|
||||
|
||||
const options = ref([])
|
||||
|
||||
const columnOptions = reactive([])
|
||||
|
||||
const termTypeOptions = reactive([])
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang='less'>
|
||||
.JSearch-item {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
|
||||
.JSearch-item--type {
|
||||
min-width: 120px;
|
||||
> span {
|
||||
line-height: 34px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.JSearch-item--column {
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.JSearch-item--termType {
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.JSearch-item--value {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,72 @@
|
|||
<template>
|
||||
<div class='JSearch-content'>
|
||||
<div class='left'>
|
||||
<SearchItem :index='1' />
|
||||
<SearchItem :index='2' />
|
||||
<SearchItem :index='3' />
|
||||
</div>
|
||||
<div class='center'>
|
||||
<a-select
|
||||
:options='typeOptions'
|
||||
/>
|
||||
</div>
|
||||
<div class='right'>
|
||||
<SearchItem :index='4' />
|
||||
<SearchItem :index='5' />
|
||||
<SearchItem :index='6' />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts' name='Search'>
|
||||
import SearchItem from './Item.vue'
|
||||
import { typeOptions } from './util'
|
||||
|
||||
const props = defineProps({
|
||||
defaultParams: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
columns: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'advanced'
|
||||
},
|
||||
|
||||
key: {
|
||||
type: String,
|
||||
default: '',
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const searchParams = reactive({
|
||||
data: {}
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang='less'>
|
||||
.JSearch-content {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
.left, & .right {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
flex-direction: column;
|
||||
width: 0;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.center {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
flex-basis: 120px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,3 @@
|
|||
import Search from './Search.vue'
|
||||
|
||||
export default Search
|
|
@ -0,0 +1,4 @@
|
|||
export const typeOptions = [
|
||||
{ label: '或者', value: 'or' },
|
||||
{ label: '并且', value: 'and' },
|
||||
]
|
|
@ -5,6 +5,7 @@ import JTable from './Table/index'
|
|||
import TitleComponent from "./TitleComponent/index.vue";
|
||||
import Form from './Form';
|
||||
import CardBox from './CardBox/index.vue';
|
||||
import Search from './Search'
|
||||
|
||||
export default {
|
||||
install(app: App) {
|
||||
|
@ -14,5 +15,6 @@ export default {
|
|||
.component('TitleComponent', TitleComponent)
|
||||
.component('Form', Form)
|
||||
.component('CardBox', CardBox)
|
||||
.component('Search', Search)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,9 +8,15 @@ const router = createRouter({
|
|||
routes: menus
|
||||
})
|
||||
|
||||
const filterPath = [
|
||||
'/form',
|
||||
'/search'
|
||||
]
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const token = LocalStore.get(TOKEN_KEY)
|
||||
if (token) {
|
||||
|
||||
if (token || filterPath.includes(to.path)) {
|
||||
next()
|
||||
} else {
|
||||
if (to.path === LoginPath) {
|
||||
|
|
|
@ -45,8 +45,8 @@ export default [
|
|||
component: () => import('@/views/demo/Form.vue')
|
||||
},
|
||||
{
|
||||
path: '/test',
|
||||
component: () => import('@/views/demo/test')
|
||||
path: '/search',
|
||||
component: () => import('@/views/demo/Search.vue')
|
||||
},
|
||||
// end: 测试用, 可删除
|
||||
|
||||
|
|
|
@ -26,23 +26,24 @@ export const request = axios.create({
|
|||
* @param {String} responseType 如果接口是需要导出文件流,那么responseType = 'blob'
|
||||
* @returns {AxiosInstance}
|
||||
*/
|
||||
export const post = function(url: string, data = {}, params = {}) {
|
||||
export const post = function<T>(url: string, data = {}, params = {}) {
|
||||
params = typeof params === 'string' ? { responseType: params } : params
|
||||
return request({
|
||||
return request<any, AxiosResponseRewrite<T>>({
|
||||
...params,
|
||||
method: 'POST',
|
||||
url,
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* put method request
|
||||
* @param {String} url
|
||||
* @param {Object} [data]
|
||||
* @returns {AxiosInstance}
|
||||
*/
|
||||
export const put = function(url: string, data = {},) {
|
||||
return request({
|
||||
export const put = function<T>(url: string, data = {},) {
|
||||
return request<any, AxiosResponseRewrite<T>>({
|
||||
method: 'PUT',
|
||||
url,
|
||||
data
|
||||
|
@ -55,8 +56,8 @@ export const put = function(url: string, data = {},) {
|
|||
* @param {Object} [data]
|
||||
* @returns {AxiosInstance}
|
||||
*/
|
||||
export const patch = function(url: string, data = {}) {
|
||||
return request({
|
||||
export const patch = function<T>(url: string, data = {}) {
|
||||
return request<any, AxiosResponseRewrite<T>>({
|
||||
method: 'PATCH',
|
||||
url,
|
||||
data
|
||||
|
@ -69,8 +70,8 @@ export const patch = function(url: string, data = {}) {
|
|||
* @param {Object} [ext] 扩展参数
|
||||
* @returns {AxiosInstance}
|
||||
*/
|
||||
export const get = function(url: string, params = {}, ext?: any) {
|
||||
return request({
|
||||
export const get = function<T>(url: string, params = {}, ext?: any) {
|
||||
return request<any, AxiosResponseRewrite<T>>({
|
||||
method: 'GET',
|
||||
url,
|
||||
params,
|
||||
|
@ -85,8 +86,8 @@ export const get = function(url: string, params = {}, ext?: any) {
|
|||
* @param {Object} [ext] 扩展参数
|
||||
* @returns {AxiosInstance}
|
||||
*/
|
||||
export const remove = function(url: string, params = {}, ext?: any) {
|
||||
return request({
|
||||
export const remove = function<T>(url: string, params = {}, ext?: any) {
|
||||
return request<any, AxiosResponseRewrite<T>>({
|
||||
method: 'DELETE',
|
||||
url,
|
||||
params,
|
||||
|
@ -101,7 +102,7 @@ export const remove = function(url: string, params = {}, ext?: any) {
|
|||
* @return {*}
|
||||
*/
|
||||
export const getStream = function(url: string, params = {}) {
|
||||
return get(url, params, {
|
||||
return get<any>(url, params, {
|
||||
responseType: 'arraybuffer' // 设置请求数据类型,返回blob可解析类型
|
||||
})
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ const submit = () => {
|
|||
}
|
||||
|
||||
const reset = () => {
|
||||
|
||||
form.value.reset()
|
||||
}
|
||||
|
||||
const setValue =() => {
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<template>
|
||||
<div class='search'>
|
||||
<Search />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.search {
|
||||
width: calc(100% - 330px);
|
||||
}
|
||||
</style>
|
|
@ -9,7 +9,6 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="lang" data-lang=""></div>
|
||||
<div class="content">
|
||||
<div class="top">
|
||||
<div class="header">
|
||||
|
@ -109,17 +108,13 @@
|
|||
</a-button>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
<div style="margin-top: 20px">
|
||||
<a-divider plain style="height: 12px">
|
||||
<div
|
||||
style="color: #807676d9, font-size: 12px"
|
||||
>
|
||||
<div class="other">
|
||||
<a-divider plain>
|
||||
<div class="other-text">
|
||||
其他方式登录
|
||||
</div>
|
||||
</a-divider>
|
||||
<div
|
||||
style="position: relative, bottom: 10px; text-align: center"
|
||||
>
|
||||
<div class="other-button">
|
||||
<a-button
|
||||
v-for="(item, index) in bindings"
|
||||
:key="index"
|
||||
|
@ -312,8 +307,6 @@ screenRotation(screenWidth.value, screenHeight.value);
|
|||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import 'ant-design-vue/es/style/themes/default.less';
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
height: 100vh;
|
||||
|
@ -336,22 +329,12 @@ screenRotation(screenWidth.value, screenHeight.value);
|
|||
background: #fff;
|
||||
}
|
||||
|
||||
.lang {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 44px;
|
||||
text-align: right;
|
||||
|
||||
:global(.ant-dropdown-trigger) {
|
||||
margin-right: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
justify-content: center;
|
||||
padding: 0 0 15% 0;
|
||||
margin-top: 20%;
|
||||
|
||||
.top {
|
||||
width: 100%;
|
||||
|
@ -404,17 +387,6 @@ screenRotation(screenWidth.value, screenHeight.value);
|
|||
max-width: 328px;
|
||||
}
|
||||
|
||||
// ::v-deep {
|
||||
// .@{ant-prefix}-tabs-nav-list {
|
||||
// margin: auto;
|
||||
// font-size: 16px;
|
||||
// }
|
||||
|
||||
// // .ant-formily-item-size-large .ant-formily-item-help {
|
||||
// // text-align: left;
|
||||
// // }
|
||||
// }
|
||||
|
||||
.icon {
|
||||
margin-left: 16px;
|
||||
color: rgba(0, 0, 0, 0.2);
|
||||
|
@ -429,12 +401,17 @@ screenRotation(screenWidth.value, screenHeight.value);
|
|||
}
|
||||
|
||||
.other {
|
||||
margin-top: 24px;
|
||||
line-height: 22px;
|
||||
text-align: left;
|
||||
margin-top: 20px;
|
||||
|
||||
.register {
|
||||
float: right;
|
||||
.other-text {
|
||||
color: #807676d9;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.other-button {
|
||||
position: relative;
|
||||
bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,11 @@
|
|||
"allowJs": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
"@/*": ["./src/*"],
|
||||
"components/*": ["./src/components/*"],
|
||||
"layouts/*": ["./src/layouts/*"],
|
||||
"store/*": ["./src/store/*"],
|
||||
"style/*": ["./src/style/*"],
|
||||
},
|
||||
"types": ["ant-design-vue/typings/global"],
|
||||
"suppressImplicitAnyIndexErrors": true
|
||||
|
|
|
@ -20,7 +20,7 @@ export default defineConfig(({ mode}) => {
|
|||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
'styles': path.resolve(__dirname, 'src/style'),
|
||||
'style': path.resolve(__dirname, 'src/style'),
|
||||
'layouts': path.resolve(__dirname, 'src/layouts'),
|
||||
'components': path.resolve(__dirname, 'src/components'),
|
||||
'store': path.resolve(__dirname, 'src/store'),
|
||||
|
@ -92,8 +92,8 @@ export default defineConfig(({ mode}) => {
|
|||
preprocessorOptions: {
|
||||
less: {
|
||||
modifyVars: {
|
||||
hack: `true; @import (reference) "${path.resolve('src/style/variable.less')}";`,
|
||||
...Config.theme,
|
||||
hack: `true; @import (reference) "${path.resolve('src/style/variable.less')}";`
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue