Initial commit: 上传整个code目录
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,22 @@
|
||||
import { defineComponent, h } from 'vue';
|
||||
|
||||
export const CustomItem = defineComponent({
|
||||
name: 'CustomItem',
|
||||
props: { label: String },
|
||||
setup(props, { slots }) {
|
||||
return () => h('div', {
|
||||
style: {
|
||||
background: 'rgba(255,255,255,0.15)',
|
||||
borderRadius: '8px',
|
||||
padding: '12px',
|
||||
},
|
||||
}, [
|
||||
h('div', {
|
||||
style: { fontSize: '12px', opacity: 0.8, marginBottom: '4px' },
|
||||
}, props.label),
|
||||
h('div', {
|
||||
style: { fontSize: '16px', fontWeight: 'bold' },
|
||||
}, slots.default?.()),
|
||||
]);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { defineComponent, h } from 'vue';
|
||||
|
||||
export const CustomLayout = defineComponent({
|
||||
name: 'CustomLayout',
|
||||
props: { title: String },
|
||||
setup(props, { slots }) {
|
||||
return () => h('div', {
|
||||
style: {
|
||||
background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
|
||||
borderRadius: '12px',
|
||||
padding: '20px',
|
||||
color: '#fff',
|
||||
},
|
||||
}, [
|
||||
props.title && h('h3', {
|
||||
style: { margin: '0 0 16px 0', fontSize: '18px' },
|
||||
}, props.title),
|
||||
h('div', {
|
||||
style: {
|
||||
display: 'grid',
|
||||
gridTemplateColumns: 'repeat(2, 1fr)',
|
||||
gap: '12px',
|
||||
},
|
||||
}, slots.default?.()),
|
||||
]);
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>useDetailRender Playground</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="./main.ts"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
import ElementPlus from 'element-plus-cisdi';
|
||||
import { createApp } from 'vue';
|
||||
import App from './App.vue';
|
||||
import 'element-plus-cisdi/dist/index.css';
|
||||
|
||||
const app = createApp(App);
|
||||
app.use(ElementPlus);
|
||||
app.mount('#app');
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": "../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"jsx": "preserve",
|
||||
"jsxFactory": "h",
|
||||
"jsxFragmentFactory": "Fragment",
|
||||
"jsxImportSource": "vue",
|
||||
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"noEmit": true
|
||||
},
|
||||
"include": ["vite-env.d.ts", "./**/*.ts", "./**/*.tsx", "./**/*.vue"]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
import type { VNode } from 'vue';
|
||||
|
||||
declare module '*.vue' {
|
||||
import type { DefineComponent } from 'vue';
|
||||
|
||||
const component: DefineComponent<object, object, unknown>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
// Override JSX namespace for Vue
|
||||
declare global {
|
||||
namespace JSX {
|
||||
interface Element extends VNode {}
|
||||
interface ElementClass {
|
||||
$props: object
|
||||
}
|
||||
interface ElementAttributesProperty {
|
||||
$props: object
|
||||
}
|
||||
interface IntrinsicElements {
|
||||
[elem: string]: any
|
||||
}
|
||||
interface IntrinsicAttributes {
|
||||
[elem: string]: any
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import { resolve } from 'node:path';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx(),
|
||||
],
|
||||
root: resolve(__dirname),
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, '../src'),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 3000,
|
||||
open: true,
|
||||
host: true,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user