我有一个 vue 项目,我已经使用 vue cli 安装了它。
我已经安装了 vue-router 并且所有路由在 npm run dev 模式下都可以正常工作。
网址是localhost:8000。之后,我运行npm run build命令,并导航localhost/projet_name到此部署空白页面的 url ,没有路由正在工作。
我正在使用 Windows 系统并在 wampp 服务器上工作。
如果我想使用该项目运行localhost/projet_name我应该怎么做?
这是我运行命令后的文件夹结构npm run build。
https://i.stack.imgur.com/HeoTG.png
webpack.config.js 文件是:
var path = require('path')
var webpack = require('webpack')
module.exports = {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'build.js'
},
module: {
rules: [
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
],
}, {
test: /\.vue$/,
loader: …Run Code Online (Sandbox Code Playgroud) 通过运行全局安装vue cli之后npm install -g vue-cli,我已经通过运行安装了项目文件夹“ myBlog”中的所有模块,npm install并且可以使用在本地环境中运行该项目npm run dev。但是,当我要在实时服务器中移动该项目时,这是npm run dev连续运行批处理程序()的正确方法,还是有其他方法可以npm run dev连续运行该项目?
我正在使用react-native-gesture-handler进行滑动删除目的。它做得很好,但是每当我滑动删除它时,它都会删除该行,但不会关闭Swipeable。我必须向左滑动才能将其关闭。不明白为什么会这样。我在这里提供代码:
import Swipeable from 'react-native-gesture-handler/Swipeable';
LeftActions = (progress,dragX)=>{
const scale = dragX.interpolate({
inputRange: [0, 100],
outputRange: [0, 1],
extrapolate: 'clamp',
});
return(
<View style={styles.leftAction}>
<Animated.Text
style={[
styles.textAction,
{
transform:[{
scale
}]
}
]}>Delete</Animated.Text>
</View>
)
}
class SwipeList extends React.Component {
constructor(props) {
super(props);
}
SwipeableRow = ({ item, index }) => {
return (
<Swipeable
renderLeftActions={LeftActions}
renderRightActions={RightActions}
onSwipeableLeftOpen={()=>this.deleteRow(index)}
>
<View style={{paddingHorizontal:10,backgroundColor:'#fff',paddingVertical:20}}>
<Text style={styles.fromText}>{item.from}</Text>
<Text numberOfLines={2} style={styles.messageText}>
{item.message}
</Text>
</View>
</Swipeable>
);
};
state = {
list:[
{
from: "1", …Run Code Online (Sandbox Code Playgroud)