doc: remove examples
parent
c45b93bc8e
commit
8d60808662
|
@ -1,8 +0,0 @@
|
||||||
import Empty from '../components/input-number';
|
|
||||||
import '../components/empty/style';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
render() {
|
|
||||||
return <Empty />;
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -1,31 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
|
||||||
<meta http-equiv="Pragma" content="no-cache" />
|
|
||||||
<meta http-equiv="Expires" content="0" />
|
|
||||||
<meta
|
|
||||||
name="description"
|
|
||||||
content="An enterprise-class UI components based on Ant Design and Vue"
|
|
||||||
/>
|
|
||||||
<title>Ant Design Vue</title>
|
|
||||||
<meta
|
|
||||||
name="keywords"
|
|
||||||
content="ant design vue,ant-design-vue,ant-design-vue admin,ant design pro,vue ant design,vue ant design pro,vue ant design admin,ant design vue官网,ant design vue中文文档,ant design vue文档"
|
|
||||||
/>
|
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="https://qn.antdv.com/favicon.ico" />
|
|
||||||
<style id="nprogress-style">
|
|
||||||
#nprogress {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script type="module" src="/index.ts"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="app" style="padding: 50px"></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,27 +0,0 @@
|
||||||
import '../components/style';
|
|
||||||
import { createApp, version } from 'vue';
|
|
||||||
import { createRouter, createWebHistory } from 'vue-router';
|
|
||||||
import App from './App.vue';
|
|
||||||
import antd from '../components';
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log('Vue version: ', version);
|
|
||||||
const basic = (_, { slots }) => {
|
|
||||||
return slots && slots.default && slots.default();
|
|
||||||
};
|
|
||||||
|
|
||||||
const router = createRouter({
|
|
||||||
history: createWebHistory(),
|
|
||||||
routes: [],
|
|
||||||
});
|
|
||||||
const app = createApp(App);
|
|
||||||
app.use(router);
|
|
||||||
app
|
|
||||||
.component('DemoSort', basic)
|
|
||||||
.component('md', basic)
|
|
||||||
.component('api', basic)
|
|
||||||
.component('CN', basic)
|
|
||||||
.component('US', basic)
|
|
||||||
.component('demo-container', basic)
|
|
||||||
.use(antd)
|
|
||||||
.mount('#app');
|
|
|
@ -1,54 +0,0 @@
|
||||||
import less from 'less';
|
|
||||||
import defaultVars from '../scripts/default-vars';
|
|
||||||
import dark from '../scripts/dark-vars';
|
|
||||||
const themeConfig = [
|
|
||||||
{
|
|
||||||
theme: 'dark',
|
|
||||||
htmlThemeAttr: 'dark',
|
|
||||||
modifyVars: {
|
|
||||||
hack: `true;@import "${require.resolve('../components/style/color/colorPalette.less')}";`,
|
|
||||||
...defaultVars,
|
|
||||||
...dark,
|
|
||||||
'text-color': 'fade(@white, 65%)',
|
|
||||||
'gray-8': '@text-color',
|
|
||||||
'background-color-base': '#555',
|
|
||||||
'skeleton-color': 'rgba(0,0,0,0.8)',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
|
||||||
const additionalData = async (content: string, filename: string): Promise<string> => {
|
|
||||||
const themePromises = themeConfig.map(async t => {
|
|
||||||
const { htmlThemeAttr, modifyVars = {} } = t;
|
|
||||||
const options = {
|
|
||||||
javascriptEnabled: true,
|
|
||||||
modifyVars,
|
|
||||||
relativeUrls: true,
|
|
||||||
filename,
|
|
||||||
};
|
|
||||||
try {
|
|
||||||
const { css } = await less.render(content, options);
|
|
||||||
let res = '';
|
|
||||||
if (htmlThemeAttr && css) {
|
|
||||||
res = `
|
|
||||||
[data-doc-theme=${htmlThemeAttr}] {
|
|
||||||
${css}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
}
|
|
||||||
return Promise.resolve(res);
|
|
||||||
} catch (error) {
|
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.log(error);
|
|
||||||
return Promise.reject(content);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let res = content;
|
|
||||||
for (const themePromise of themePromises) {
|
|
||||||
const theme = await themePromise;
|
|
||||||
res += theme;
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default themeConfig;
|
|
||||||
export { themeConfig, additionalData };
|
|
|
@ -1,57 +0,0 @@
|
||||||
import path from 'path';
|
|
||||||
import vue from '@vitejs/plugin-vue';
|
|
||||||
import md from '../plugin/md';
|
|
||||||
import docs from '../plugin/docs';
|
|
||||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
|
||||||
import { additionalData } from './themeConfig';
|
|
||||||
import defaultVar from '../scripts/default-vars';
|
|
||||||
/**
|
|
||||||
* @type {import('vite').UserConfig}
|
|
||||||
*/
|
|
||||||
export default {
|
|
||||||
resolve: {
|
|
||||||
alias: {
|
|
||||||
'@': path.join(__dirname, './src'),
|
|
||||||
vue: 'vue/dist/vue.esm-bundler.js',
|
|
||||||
'ant-design-vue/es': path.resolve(__dirname, '../components'),
|
|
||||||
'ant-design-vue': path.resolve(__dirname, '../components'),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
plugins: [
|
|
||||||
vueJsx({
|
|
||||||
// options are passed on to @vue/babel-plugin-jsx
|
|
||||||
mergeProps: false,
|
|
||||||
enableObjectSlots: false,
|
|
||||||
}),
|
|
||||||
docs(),
|
|
||||||
md(),
|
|
||||||
vue({
|
|
||||||
include: [/\.vue$/, /\.md$/],
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
optimizeDeps: {
|
|
||||||
include: [
|
|
||||||
'fetch-jsonp',
|
|
||||||
'@ant-design/icons-vue',
|
|
||||||
'lodash-es',
|
|
||||||
'dayjs',
|
|
||||||
'vue',
|
|
||||||
'vue-router',
|
|
||||||
'vue-i18n',
|
|
||||||
'async-validator',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
css: {
|
|
||||||
preprocessorOptions: {
|
|
||||||
less: {
|
|
||||||
modifyVars: {
|
|
||||||
hack: `true;@import "${require.resolve('../components/style/color/colorPalette.less')}";`,
|
|
||||||
...defaultVar,
|
|
||||||
},
|
|
||||||
javascriptEnabled: true,
|
|
||||||
// includePaths: ["node_modules/"],
|
|
||||||
additionalData,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -29,7 +29,6 @@
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"predev": "node node_modules/esbuild/install.js",
|
"predev": "node node_modules/esbuild/install.js",
|
||||||
"debugger": "yarn predev && vite serve examples",
|
|
||||||
"dev": "yarn predev && yarn routes && vite serve site",
|
"dev": "yarn predev && yarn routes && vite serve site",
|
||||||
"test": "cross-env NODE_ENV=test jest --config .jest.js",
|
"test": "cross-env NODE_ENV=test jest --config .jest.js",
|
||||||
"compile": "node antd-tools/cli/run.js compile",
|
"compile": "node antd-tools/cli/run.js compile",
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
// debugger tsx
|
||||||
|
import Demo from '../../components/table/demo/ajax.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
render() {
|
||||||
|
return <Demo />;
|
||||||
|
},
|
||||||
|
};
|
|
@ -140,6 +140,7 @@ const routes = [
|
||||||
{ path: '', redirect: '/docs/vue/introduce/' },
|
{ path: '', redirect: '/docs/vue/introduce/' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{ path: '/debugger', component: () => import('../../debugger') },
|
||||||
{ path: '/:lang(.*)', redirect: '/components/overview/' },
|
{ path: '/:lang(.*)', redirect: '/components/overview/' },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue