<template>
	<ciy-header title="工程化改进"></ciy-header>
	<view class="ciy-card">
		<view class="title">
			<view class="mk"></view>页面自动添加通用组件
		</view>
		<view class="right">template</view>
		<view class="content">
			<view>在vite.config.js中添加htmlPlugin_ciy plugins。</view>
			<view>在每个页面的template后添加通用组件。</view>
			<view>例如: ciy-auth、ciy-alert、ciy-toast、ciy-popmenu等。</view>
			<!-- 修改vite工具
			D:\Program Files\HBuilderX\plugins\uniapp-cli-vite\node_modules\@dcloudio\vite-plugin-uni\dist\utils\polyfill.js
			在if (options?.filename) {下加入
			if (options.filename.indexOf('/pages/') > -1)
			    source = source.replace('<template>','<template>\n<ciy-auth id="auth" ref="auth"></ciy-auth>'); -->
		</view>
	</view>
	<view class="ciy-card">
		<view class="title">自动生成pages.json路由</view>
		<view class="content">
			<view>将所有vue文件放入/pages/目录下。</view>
			<view>配置defpages.json，只保留pages数组第一行。</view>
			<view>自建公用目录xx，复制createpages.js。</view>
			<view>外部命令中添加ctrl+alt+p快捷键。</view>
			<view>[｛</view>
			<view>　"name":"Create Pages",</view>
			<view>　"command": ["node", "xx\createpages.js","$｛projectDir｝"],</view>
			<view>　"workingDir" : "xx\createpages",</view>
			<view>　"key": "ctrl+alt+p",</view>
			<view>　"type": "shell"</view>
			<view>｝]</view>
		</view>
	</view>
</template>

<style>
</style>

<script>
	export default {
		data() {
			return {
			}
		},
		onLoad() {},
		watch: {
		},
		computed: {
		},
		methods: {}
	}
</script>