diff --git a/packages/designer/src/components/components/form-designer/components/custom-class-editor/custom-class-editor.component.tsx b/packages/designer/src/components/components/form-designer/components/custom-class-editor/custom-class-editor.component.tsx index 880b94736952c3775b9c83654f0ff44794503dad..d582aaba6951dedda3a219f009a622314584ce95 100644 --- a/packages/designer/src/components/components/form-designer/components/custom-class-editor/custom-class-editor.component.tsx +++ b/packages/designer/src/components/components/form-designer/components/custom-class-editor/custom-class-editor.component.tsx @@ -5,6 +5,7 @@ import { useViewModelNavigation } from "../../../view-model-designer/method-mana import MonacoEditor from '../../../monaco-editor/monaco-editor.component'; import './custom-class-editor.scss'; import { CustomClassEditorProps, customClassEditorProps } from "./custom-class-editor.props"; +import { useLocation } from "../../../../composition/use-location"; export default defineComponent({ name: 'FCustomClassEditor', @@ -27,10 +28,13 @@ export default defineComponent({ const monacoEditorRef = ref(); /** 自定义样式Dom */ formSchema.module.customClass ??= {}; + const { customClass } = formSchema.module; /** 当前编辑器内的样式代码 */ const currentClassCode = ref(); + const { getUrlParam } = useLocation(); + /** 视图模型页签的样式 */ const viewModelTabClass = computed(() => (viewModelTabId: string) => { const showActiceClass = activeViewModel.value?.id === viewModelTabId; @@ -100,8 +104,17 @@ export default defineComponent({ updateCurrentClassCode(); } + function customStyleFilePath() { + const {code:formCode, projectName} = formSchema.module; + const basePath = getUrlParam('id').split('/').slice(0,3).join('/'); + return `/apps${basePath}/web/${projectName}/${formCode}/${formCode}.css`; + } + onBeforeMount(() => { updateCurrentClassCode(); + if (!formSchema.module.customStyleFile) { + formSchema.module.customStyleFile = customStyleFilePath(); + } }); context.expose({ @@ -136,15 +149,19 @@ export default defineComponent({ return (
{weekTitle.value} | @@ -216,7 +228,7 @@ export default defineComponent({ return (
---|
{week.numberInTheYear}
|
diff --git a/packages/ui-vue/components/date-picker/src/components/calendar/calendar.props.ts b/packages/ui-vue/components/date-picker/src/components/calendar/calendar.props.ts
index e27a940ec86421169a073b4f7b62e652db548df9..acac33ce993cf1a7175a5160bac350f97458ff47 100644
--- a/packages/ui-vue/components/date-picker/src/components/calendar/calendar.props.ts
+++ b/packages/ui-vue/components/date-picker/src/components/calendar/calendar.props.ts
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { ExtractPropTypes } from 'vue';
+import { ExtractPropTypes, PropType } from 'vue';
import { CalendarWeekItem } from '../../types/calendar';
-import { weekDays } from '../../types/common';
+import { FirstDayOfTheWeek } from '../../types/common';
export const datePickerCalendarProps = {
dates: { Type: Array