mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-10-17 23:23:42 +08:00
Compare commits
3 Commits
65891a94d2
...
510ecfbe8b
Author | SHA1 | Date | |
---|---|---|---|
|
510ecfbe8b | ||
|
38b91d8c6a | ||
|
7db195e86a |
1
pnpm-lock.yaml
generated
1
pnpm-lock.yaml
generated
@@ -6961,7 +6961,6 @@ snapshots:
|
|||||||
- vue
|
- vue
|
||||||
|
|
||||||
'@vicons/antd@0.13.0': {}
|
'@vicons/antd@0.13.0': {}
|
||||||
|
|
||||||
'@visactor/vchart-theme@1.12.2(@visactor/vchart@1.13.7)':
|
'@visactor/vchart-theme@1.12.2(@visactor/vchart@1.13.7)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@visactor/vchart': 1.13.7
|
'@visactor/vchart': 1.13.7
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import { darkTheme } from 'naive-ui';
|
import { NConfigProvider, darkTheme } from 'naive-ui';
|
||||||
import type { WatermarkProps } from 'naive-ui';
|
import type { WatermarkProps } from 'naive-ui';
|
||||||
import { useAppStore } from './store/modules/app';
|
import { useAppStore } from './store/modules/app';
|
||||||
import { useThemeStore } from './store/modules/theme';
|
import { useThemeStore } from './store/modules/theme';
|
||||||
@@ -41,7 +41,7 @@ const watermarkProps = computed<WatermarkProps>(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ProConfigProvider
|
<NConfigProvider
|
||||||
:theme="naiveDarkTheme"
|
:theme="naiveDarkTheme"
|
||||||
:theme-overrides="themeStore.naiveTheme"
|
:theme-overrides="themeStore.naiveTheme"
|
||||||
:locale="naiveLocale"
|
:locale="naiveLocale"
|
||||||
@@ -52,7 +52,7 @@ const watermarkProps = computed<WatermarkProps>(() => {
|
|||||||
<RouterView class="bg-layout" />
|
<RouterView class="bg-layout" />
|
||||||
<NWatermark v-if="themeStore.watermark.visible" v-bind="watermarkProps" />
|
<NWatermark v-if="themeStore.watermark.visible" v-bind="watermarkProps" />
|
||||||
</AppProvider>
|
</AppProvider>
|
||||||
</ProConfigProvider>
|
</NConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import { dateEnUS, dateZhCN, enUS } from 'naive-ui';
|
import { dateEnUS, dateZhCN, enUS, zhCN } from 'naive-ui';
|
||||||
import type { NDateLocale, NLocale } from 'naive-ui';
|
import type { NDateLocale, NLocale } from 'naive-ui';
|
||||||
import { zhCN } from 'pro-naive-ui';
|
|
||||||
|
|
||||||
export const naiveLocales: Record<App.I18n.LangType, NLocale> = {
|
export const naiveLocales: Record<App.I18n.LangType, NLocale> = {
|
||||||
'zh-CN': zhCN,
|
'zh-CN': zhCN,
|
||||||
|
@@ -630,7 +630,7 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
title: 'pro-naive',
|
title: 'pro-naive',
|
||||||
i18nKey: 'route.pro-naive',
|
i18nKey: 'route.pro-naive',
|
||||||
order: 7,
|
order: 7,
|
||||||
icon:'material-symbols-light:demography-outline-rounded'
|
icon: 'material-symbols-light:demography-outline-rounded'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@@ -639,7 +639,7 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: 'pro-naive_form',
|
title: 'pro-naive_form',
|
||||||
i18nKey: 'route.pro-naive_form',
|
i18nKey: 'route.pro-naive_form',
|
||||||
icon:'fluent:form-28-regular'
|
icon: 'fluent:form-28-regular'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
@@ -677,7 +677,7 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
meta: {
|
meta: {
|
||||||
title: 'pro-naive_table',
|
title: 'pro-naive_table',
|
||||||
i18nKey: 'route.pro-naive_table',
|
i18nKey: 'route.pro-naive_table',
|
||||||
icon:'mynaui:table'
|
icon: 'mynaui:table'
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
17
src/views/pro-naive/ConfigProvider.vue
Normal file
17
src/views/pro-naive/ConfigProvider.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<script setup lang="tsx">
|
||||||
|
import { computed } from 'vue';
|
||||||
|
import { zhCN } from 'pro-naive-ui';
|
||||||
|
import { useAppStore } from '@/store/modules/app';
|
||||||
|
|
||||||
|
const appStore = useAppStore();
|
||||||
|
|
||||||
|
const locale = computed(() => {
|
||||||
|
return appStore.locale === 'zh-CN' ? zhCN : undefined;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<ProConfigProvider :locale="locale" class="h-full">
|
||||||
|
<slot></slot>
|
||||||
|
</ProConfigProvider>
|
||||||
|
</template>
|
@@ -1,8 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { createProForm } from 'pro-naive-ui';
|
import { createProForm, zhCN } from 'pro-naive-ui';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
|
import ConfigProvider from '../../ConfigProvider.vue';
|
||||||
|
|
||||||
const submiting = ref(false);
|
const submiting = ref(false);
|
||||||
const message = useMessage();
|
const message = useMessage();
|
||||||
@@ -56,6 +57,7 @@ function fillValues() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<ConfigProvider :locale="zhCN">
|
||||||
<ProForm
|
<ProForm
|
||||||
:form="form"
|
:form="form"
|
||||||
:loading="submiting"
|
:loading="submiting"
|
||||||
@@ -178,4 +180,5 @@ function fillValues() {
|
|||||||
</NGrid>
|
</NGrid>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
</ProForm>
|
</ProForm>
|
||||||
|
</ConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -4,6 +4,7 @@ import { useMessage } from 'naive-ui';
|
|||||||
import type { ProSearchFormColumns } from 'pro-naive-ui';
|
import type { ProSearchFormColumns } from 'pro-naive-ui';
|
||||||
import { createProSearchForm } from 'pro-naive-ui';
|
import { createProSearchForm } from 'pro-naive-ui';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
|
import ConfigProvider from '../../ConfigProvider.vue';
|
||||||
|
|
||||||
interface Info {
|
interface Info {
|
||||||
appName: string;
|
appName: string;
|
||||||
@@ -85,6 +86,7 @@ function delay(time: number) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<ConfigProvider>
|
||||||
<div class="bg-#fff">
|
<div class="bg-#fff">
|
||||||
<ProCard :title="$t('page.proNaive.form.query.title1')" :show-collapse="false">
|
<ProCard :title="$t('page.proNaive.form.query.title1')" :show-collapse="false">
|
||||||
<ProSearchForm :form="form" :loading="loading" :columns="columns" />
|
<ProSearchForm :form="form" :loading="loading" :columns="columns" />
|
||||||
@@ -93,4 +95,5 @@ function delay(time: number) {
|
|||||||
<ProSearchForm :form="form2" :loading="loading2" :columns="columns2" :collapsed-rows="2" />
|
<ProSearchForm :form="form2" :loading="loading2" :columns="columns2" :collapsed-rows="2" />
|
||||||
</ProCard>
|
</ProCard>
|
||||||
</div>
|
</div>
|
||||||
|
</ConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -3,6 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
import { createProForm } from 'pro-naive-ui';
|
import { createProForm } from 'pro-naive-ui';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
|
import ConfigProvider from '../../ConfigProvider.vue';
|
||||||
|
|
||||||
const step = ref(1);
|
const step = ref(1);
|
||||||
const submiting = ref(false);
|
const submiting = ref(false);
|
||||||
@@ -37,6 +38,7 @@ function delay(time: number) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<ConfigProvider>
|
||||||
<div class="color-#fff">
|
<div class="color-#fff">
|
||||||
<ProCard :title="$t('page.proNaive.form.step.title')" :segmented="{ content: true }" :show-collapse="false">
|
<ProCard :title="$t('page.proNaive.form.step.title')" :segmented="{ content: true }" :show-collapse="false">
|
||||||
<div class="flex flex-col items-center justify-center">
|
<div class="flex flex-col items-center justify-center">
|
||||||
@@ -66,4 +68,5 @@ function delay(time: number) {
|
|||||||
</div>
|
</div>
|
||||||
</ProCard>
|
</ProCard>
|
||||||
</div>
|
</div>
|
||||||
|
</ConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -10,6 +10,7 @@ import {
|
|||||||
useNDataTable
|
useNDataTable
|
||||||
} from 'pro-naive-ui';
|
} from 'pro-naive-ui';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
|
import ConfigProvider from '../../ConfigProvider.vue';
|
||||||
|
|
||||||
function fetchList(params: any, values: any) {
|
function fetchList(params: any, values: any) {
|
||||||
console.log(params, values);
|
console.log(params, values);
|
||||||
@@ -123,7 +124,8 @@ const {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col">
|
<ConfigProvider>
|
||||||
|
<div class="h-full flex flex-col">
|
||||||
<ProCard :title="$t('page.proNaive.table.remote.filterCondition')" class="mb-24px" :show-collapse="false">
|
<ProCard :title="$t('page.proNaive.table.remote.filterCondition')" class="mb-24px" :show-collapse="false">
|
||||||
<ProSearchForm :form="searchForm" label-placement="left" :columns="searchColumns" v-bind="proSearchFormProps" />
|
<ProSearchForm :form="searchForm" label-placement="left" :columns="searchColumns" v-bind="proSearchFormProps" />
|
||||||
</ProCard>
|
</ProCard>
|
||||||
@@ -136,4 +138,5 @@ const {
|
|||||||
v-bind="tableProps"
|
v-bind="tableProps"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</ConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
|
@@ -4,6 +4,7 @@ import { NButton, NFlex, useMessage } from 'naive-ui';
|
|||||||
import type { ProEditDataTableColumns } from 'pro-naive-ui';
|
import type { ProEditDataTableColumns } from 'pro-naive-ui';
|
||||||
import { createProForm } from 'pro-naive-ui';
|
import { createProForm } from 'pro-naive-ui';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
|
import ConfigProvider from '../../ConfigProvider.vue';
|
||||||
|
|
||||||
interface DataSourceType {
|
interface DataSourceType {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -103,6 +104,7 @@ const columns = computed<ProEditDataTableColumns<DataSourceType>>(() => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<ConfigProvider>
|
||||||
<ProForm :form="form" label-placement="left">
|
<ProForm :form="form" label-placement="left">
|
||||||
<ProConfigProvider
|
<ProConfigProvider
|
||||||
:prop-overrides="{
|
:prop-overrides="{
|
||||||
@@ -132,4 +134,5 @@ const columns = computed<ProEditDataTableColumns<DataSourceType>>(() => {
|
|||||||
</ProEditDataTable>
|
</ProEditDataTable>
|
||||||
</ProConfigProvider>
|
</ProConfigProvider>
|
||||||
</ProForm>
|
</ProForm>
|
||||||
|
</ConfigProvider>
|
||||||
</template>
|
</template>
|
||||||
|
Reference in New Issue
Block a user