1.特殊字体在css中怎么用
| 12
 3
 4
 5
 6
 7
 
 | @font-face { font-family: tszt;
 src: url('./tszt.ttf');
 }
 .a {
 font-family: tszt
 }
 
 | 
2.禁止页面缩放,user-scalable
| 1
 | <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, user-scalable=no;">
 | 
3.img标签的object-fit
4.webpack分析打包的插件webpack-bundle-analyzer
| 12
 3
 4
 5
 6
 7
 8
 
 | # yarn add webpack-bundle-analyzer
 
 chainWebpack: config => {
 config
 .plugin('webpack-bundle-analyzer')
 .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin,[])
 }
 
 | 
5.vue中使用v-model封装组件
相当于:value=”” @input=””
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 
 | 在子组件中如下使用props: {
 mypass: String,
 },
 model: {
 prop: 'mypass',
 event: 'myevent'
 },
 created() {
 console.log('myevent', this.mypass);
 },
 methods: {
 change() {
 this.$emit('myevent', 'pass1')
 }
 }
 
 |